tcpdump mailing list archives

Re: pcap_inject and 802.1q subinterfaces on Solaris?


From: Guy Harris <guy () alum mit edu>
Date: Thu, 19 May 2011 19:43:23 -0700


On May 19, 2011, at 3:33 PM, Tim Sammut wrote:

I have a small tool that uses pcap_inject to send ethernet frames on
specific host interfaces. When injecting on a 802.1q virtual interface
on Solaris the frame is ultimately transmitted without the 802.1q header
that should have been add by the host OS. This is Solaris 10 on SPARC
with libpcap 1.1.1, and the same scenario works perfectly on Linux.

Is this something that should work on Solaris too?

Ultimately, libpcap depends on the OS to provide raw packet capture and injection capabilities.  If the Solaris 
networking stack allows a DLPI device bound to a VLAN interface to have packets handed to it with a full Ethernet 
header and to use the Ethernet header but add in the appropriate VLAN header, by doing, for example, a special ioctl - 
and either that ioctl is harmless on other interfaces or libpcap can somehow determine whether it needs to make that 
ioctl - then libpcap could (and should) be changed to do that.  If the Solaris networking stack doesn't allow that, 
you're out of luck - you might have to open the hardware interface, construct the packets complete with VLAN header, 
and send the packets out on that.

I don't know which of those is the case; a quick look at the Sun^WOracle documentation didn't find anything obvious.
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: