tcpdump mailing list archives
Re: pcap_inject troubleshooting
From: Guy Harris <guy () alum mit edu>
Date: Mon, 12 Jan 2009 20:51:14 -0800
On Jan 12, 2009, at 8:44 PM, David Murray wrote:
I am writing an application using the libpcap library that is capable of caching and replaying frames. I originally wrote and tested this program using a embedded ALIX system that runs a 500Mhz Geode processor. I felt that the slow performance of this CPU was causing a few problems so I decided to try it out on a proper desktop PC. However, I am having problems with the pcap_inject function. While the other functions appear to work fine, pcap_inject is returning the error ?send: message too long?. The function also returns -1.By printing out the packet size I know that this frame is 1552 bytes which is higher than the end-to-end MTU of 1500 bytes. However, this is also confusing, because when I run the same code on my embedded machine, which works, the packet size also appears to be 1552 bytes. The embedded machine is running a Debian variant called Voyage Linux whereas the Desktops I have tried this code on are running Ubuntu Intrepid. I have tried two IBM and Dell desktops and a range of wired NICs. Maybe a key difference between the two systems is that on the embedded system, packet injection occurs over a Atheros WiFi interface whereas on the desktops packet injection occurs over the Wired NIC.
I'm assuming your wired NICs are Ethernet NICs; the maximum payload size for Ethernet is 1500 bytes.
The maximum payload size for IEEE 802.11 is 2304 bytes, at least according to IEEE 802.11-1999:
6.2.1.1.2 Semantics of the service primitive ...The data parameter speciļ¬es the MSDU to be transmitted by the MAC sublayer entity. For IEEE 802.11, the
length of the MSDU must be less than or equal to 2304 octets. 1500 < 1552 < 2304. - This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- pcap_inject troubleshooting David Murray (Jan 12)
- Re: pcap_inject troubleshooting Guy Harris (Jan 12)
- Re: pcap_inject troubleshooting David Murray (Jan 12)
- Re: pcap_inject troubleshooting Guy Harris (Jan 12)
- Re: pcap_inject troubleshooting David Murray (Jan 12)
- Re: pcap_inject troubleshooting Guy Harris (Jan 12)