tcpdump mailing list archives

Re: Extra DLT types required for opensolaris DLPI DL


From: Guy Harris <guy () alum mit edu>
Date: Fri, 27 Mar 2009 11:27:30 -0700


On Mar 27, 2009, at 10:58 AM, Darren Reed wrote:

Seriously, for my purposes, it is "Cisco HDLC".

So it should be mapped to DLT_C_HDLC.

For the purposes of my table, I'd like to map the mediums that have passed (or are passing) from active use to "unsupported" and call it DLT_UNSUP (0xffffffff). On one level this is strange, because it isn't a DLT type, but it is a useful programming tool.

So what's the table being used for? libpcap has a switch statement (in the top of the tree, it's in pcap_process_mactype() in dlpisubs.c), as it needs to know more than just the DLT_ value for particular link-layer types (and it maps DL_TPR to DLT_IEEE802).

From NetBSD:
#define DLT_HIPPI    15    /* HIPPI */

From a quick look at sys/net/if_hippi.h and sys/net/if_hippisubr.c, the header appears to be:
...
If there are interfaces using DL_HIPPI, and they supply the same link-layer header, a DLT_HIPPI would make sense. Unfortunately, 15 is in the Badlands of DLT_ values, where various OSes have used the same numerical value for different purposes, so we'd probably end up assigning a new value in the range starting with 100 (which is the range we're maintaining).

If you can give it a new number, I can see to it that the change gets into NetBSD. I can't see a whole lot of people screaming if it does change ;)

So is the header what I described it as?

While you're at it, you might change the drivers in NetBSD that use DLT_HDLC for Cisco HDLC (such as sys/dev/ic/hd64570.c) to use DLT_C_HDLC, as NetBSD's sys/net/dlt.h already defines DLT_C_HDLC with the correct value.

Additionally, I'm considering creating a new datalink type for loopback packets on OpenSolaris. The contents would be something like:
version (16 bits: 1)
protocol family (16 bits: AF_INET, AF_INET6)
capture point (32bits enum: local, in, out)
interface index (32bits)
group interface index (32bits)
source zone (32 or 64bits?)
destination zone (32 or 64bits?)
I'm guessing that this should be called DLT_LOOP_SOLARIS.

That would probably be the right name. Shall I assign it (once you've decided how big the source and destination zones are, or whether there are two flavors, one with 32 bits and one with 64 bits)?
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: