tcpdump mailing list archives

Re: Extra DLT types required for opensolaris DLPI DL


From: Darren Reed <Darren.Reed () Sun COM>
Date: Fri, 27 Mar 2009 13:45:53 -0700

On 27/03/09 11:27 AM, Guy Harris wrote:

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).

The devices in Solaris all use the DLPI types from <sys/dlpi.h>.

I'm working on providing a native BPF for Solaris and I need to translate those DL_ types to DLT_ things.

I'll have a look at the dlpisubs.c file...

While I'm here, additionally I'm looking at making PF_PACKET work and using pcap-linux.c as a guide, it isn't clear what or where a relevant header file should be called (yay linux mess!) Any thoughts on what you see making the most sense there?

If you're wondering "why both", imho, one is designed to program with and one is designed for packet capture.

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)?

Yes, thanks. It's 32bits.
zoneid_t is an "id_t", which is an int on LP64 and long otherwise, according to my <sys/types.h>.

Darren

-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: