generic network protocols parser ?

Bosko Milekic bmilekic at technokratis.com
Fri Mar 4 16:21:52 GMT 2005


On Fri, Mar 04, 2005 at 11:07:34AM -0500, Aziz KEZZOU wrote:
> Hi all,
> I am wondering if any one knows  about a generic parser which takes a
> packet (mbuf) of a certain protocol (e.g RSVP ) as input and generates
> some data structre representing the packet ?
> 
> I've been searching for a while and found that ethereal and tcpdump
> for example use specific data structres and functions to dissect each
> protocol packets. Is this the only approach possible ?
> 
> My supervisor suggested using a TLV (Type/Length/Value) approach
> instead. Any opinions about that?
> 
> If no such a parser exists is there any practical reason why ?
> 
> Thanks,
> Aziz

  You can only go so far with generic parsing.  Eventually you will want
  some protocol specific value to be extracted and your parser will have
  to know about what the packet looks like.

  What are you trying to do, exactly?

-- 
Bosko Milekic
bmilekic at technokratis.com
bmilekic at FreeBSD.org


More information about the freebsd-hackers mailing list