Ethereal-dev: Re: [Ethereal-dev] Dissector for DOCSIS

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

From: Guy Harris <gharris@xxxxxxxxx>
Date: Tue, 25 Jun 2002 21:18:26 -0700
On Mon, Jun 24, 2002 at 10:22:00AM -0400, Anand V. Narwani wrote:
> So this is starting to make a little more sense.   I have one more question 
> though:   If I add a DLT_DOCSIS encapsulation type to libpcap, would I lose 
> the ability to  "Save as..." other file types (Sniffer for example)?

If the file type has support for DOCSIS as a link-layer type, no, you
wouldn't lose it, as long as you added the right mapping from
WTAP_ENCAP_DOCSIS to the appropriate link-layer type.

If the file type *doesn't* have support for DOCSIS as a link-layer type,
you would have to map WTAP_ENCAP_DOCSIS to "Ethernet".  (It's not as if
the other network analyzer whose file format you were writing could
dissect the traffic as DOCSIS traffic if it doesn't support DOCSIS as a
link-layer type, unless it has its own "pretend that Ethernet is DOCSIS"
option.)

However, if you added DLT_DOCSIS, you'd also need to add some mechanism
to libpcap by which you could override the OS's idea of what the
link-layer type of the capture device should be.