tcpdump mailing list archives

Re: libpcap: patches required for OpenSolaris/SXCE


From: Darren Reed <Darren.Reed () Sun COM>
Date: Mon, 30 Nov 2009 18:43:36 +1100

Doing some further testing of DLT lists, get_dlt_list() needs
some further work. On an OpenSolaris host with ethernet
and a tunnel created, they're visible here:

# dladm show-link
LINK        CLASS     MTU    STATE    BRIDGE     OVER
igb0        phys      1500   up       --         --
e1000g0     phys      1500   up       --         --
e1000g1     phys      1500   up       --         --
igb1        phys      1500   up       --         --
vnic0       vnic      1500   up       --         e1000g0
tun0        iptun     65515  down     --         --
# tcpdump -L -i e1000g0
Data link types (use option -y to set):
 DOCSIS (DOCSIS) (printing not supported)
 IPNET (Solaris IPNET)
 EN10MB (Ethernet)
# tcpdump -L -i tun0
Data link types (use option -y to set):
 IPNET (Solaris IPNET)
 RAW (Raw IP)

... but ..

# tcpdump -L
Data link types (use option -y to set):
 IPNET (Solaris IPNET)
 RAW (Raw IP)
# ifconfig tun0 unplumb
# tcpdump -L
Data link types (use option -y to set):
 DOCSIS (DOCSIS) (printing not supported)
 IPNET (Solaris IPNET)
 EN10MB (Ethernet)

When there is no network interface specified with
-i, what I expect from "tcpdump -L" is for tcpdump to
list all of the DLTs that are available for selection
with -y.

I suspect that tcpdump is choosing "tun0" for the output
of "tcpdump -L" rather than going through all of the
network interfaces and building a comprehensive list.

I think the easy way out for this would be to change the
header message to be:

Data link types (use option -y to set) for %s:

and then use something like "pcap_get_linkname()", but
there doesn't appear to be an equivalent of that?

Or even a "pcap_get_dev()" and then use pcap_datalink_val_to_name.

Darren

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


Current thread: