ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: [ethereal-dev] libdencode, A proposal

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Richard Sharpe <sharpe@xxxxxxxxxx>
Date: Mon, 06 Dec 1999 03:07:05 +1000
INTRODUCTION

Ethereal is a great little program, but it has become clear that a lot of
effort that has been invested in protocol decode modules cannot be
leveraged in other areas.

This is because protocol decode modules in Ethereal are too closely tied to
Ethereal's task of displaying protocols in a broken out fashion.  For
example, protocol decode modules know about Ethereal's summary display
lines as well as the protocol tree.

This effort is to develop a library that can perform protocol decode and
encode.  It is expected that this library will be used by GUI tools like
Ethereal and others which might simply show what type of packets are in the
trace and generate  graphs and other graphical displays.

ACKNOWLEDGMENTS

Thanks to John McDermott for suggesting an encode side.  Thanks to other
like Guy Harris for suggesting something like this idea a long time ago.

PROTOCOLS

It is expected that there will be a number of built-in protocols that
libdencode understands, as well as the need to add more protocols at
run-time.  This has to be allowed for.  Protocols will be referred to by
name, to facilitate the installation of new protocols at run time, since
most protocols will be descendents of other protocols.

Protocol IDs will need to be allocated at run-time.

ROUTINES

It is expected that the following routines are needed:

proto_t denc_lookup_protocol(char *name)

int denc_register_protocol(char *name, parent_proto, proto_value,
decode_routine, encode_routine);

int denc_decode(char *pd, int offset, proto_node_t *tree[], int maxdepth)

int denc_encode(char *pd, int offset, ...)

Regards
-------
Richard Sharpe, sharpe@xxxxxxxxxx, Master Linux Administrator :-),
Samba (Team member, www.samba.org), Ethereal (Team member, www.zing.org)
Co-author, SAMS Teach Yourself Samba in 24 Hours
Author: First Australian 5-day, intensive, hands-on Linux SysAdmin course