Ethereal-dev: Re: [ethereal-dev] Patch to diferentiate between BOOTP and DHCP

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

From: Gilbert Ramirez <gram@xxxxxxxxxx>
Date: Wed, 17 May 2000 10:30:55 -0500
On Wed, May 17, 2000 at 04:45:43AM -0500, Paul Ionescu wrote:
> 
> 
> I have made a quick patch for identifying DHCP packets and displaying in
> the COL_INFO and COL_PROTOCOL relevant info.
> Sometimes is useful to quickly differentiate between BOOTP and DHCP.
> I don't know if I should make and register a proto_register_dhcp
> function to be able to quick filter DHCP packets.

Thanks. To quickly filter for DHCP packets (as opposed to BOOTP) packets,
the easy way would be to add a new BOOTP field "bootp.dhcp", which would
be of FT_BOOLEAN type --- true if DHCP, false if not.

The other approach would be to add another protocol, "DHCP", and quickly
determine in the BOOTP dissector whether the packet is DHCP or regular
BOOTP, and then use the appropriate protocol. There would be a lot
of duplication of fields between BOOTP and DHCP, however. That's why
I'm leaning towards the "bootp.dhcp" solution. What do you think?

--gilbert