Hi,
I am thinking more about libdencode (thanks for John McDermott for the
inspiration for the name change).
I want to allow for protocols to be added at run-time, either by shared
libraries or via a scripting language.
This seems to imply that protocols are named, and are installed by a
routine that installs a protocol as a descendent of another protocol, or as
a top-level protocol.
Now, the problem I have is that some protocols are descended from many
other protocols: eg, IP, which is a descendent of Ethernet V2, 802.3 SNAP,
X.25, PPP, ATM LANE, Frame Relay, etc. Similarly, SMB is a descendent of
NetBIOS over TCP, IPX, and NetBEUI.
It would seem that I will need a routine to look up a protocol by name,
returning a handle, which can then be used to install the descendent based
on a number of differnet fields. There seems to be a multiplicity of ways
though, eg type field in Etherent2, type field in SNAP header, NLPID in
Frame, X.25, ATM etc, which may lead to a TYPE field in a SNAP header, or
one or other of Source or Destination PORT number, etc.
How can I generalize this?
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