Ethereal-dev: [Ethereal-dev] decoding packets

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

From: "Brian Burrows" <brianb@xxxxxxxx>
Date: Wed, 07 Jul 2004 15:26:45 -0700
I am working on a small app in an effort to learn more about packets, sockets and such.
 
I can now capture packets as binary or hex using tjescomponents winpcap wrapper for borland builder. I ca nput them into char arrays or strings with no drama.

I need some sample code showing how to decode the packets, for instance to tell what kind of packets they are, and how big they are etc. I can determin the source, and dest from the first 12, then 12 bytes.

I am particularly interested in decoding bootp and dhcp packets. Breaking them apart to their individual fields.

It does not have to be winpcap, just a way to decode a binary or hex packet dump. I would really appreciate anything you can share. Links are good too. If it makes a difference I am using borland c++ 6. Please fee free to email me directly at brianb@xxxxxxxx. Thanks in advance