At 04:08 AM 1/6/00 -0800, Guy Harris wrote:
>On Tue, Sep 05, 2000 at 04:41:03PM +0900, Richard Sharpe wrote:
>> I have knocked up an example protocol description file for the identd
>> protocol, and am working on a parser (using the PERL XML parser) that can
>> parse it and generate a dissector ...
>
>Note that a dissector generator might be able to do less work if it uses
>the ptvcursor stuff - see "ptvcursor.c" and "ptvcursor.h". (An
>additional ptvcursor routine to increment the offset, in order to skip
>fields, might also be useful.)
Thanks for that info. I seems to contain the beginnings of what I need.
Now I think I need to write a couple of routines:
ptv_skip
Takes a character and a spec like 1+ or * and skips the required number
of characters. Returns the length than matched.
ptv_match
Takes a string and returns TRUE if matched in the TVB at the current
offset (and advances the offset), FALSE otherwise.
Regards
-------
Richard Sharpe, sharpe@xxxxxxxxxx
Samba (Team member, www.samba.org), Ethereal (Team member, www.zing.org)
Contributing author, SAMS Teach Yourself Samba in 24 Hours
Author, Special Edition, Using Samba