tcpdump mailing list archives
libpcap warning: arptype 801 not supported by libpcap -- why this happens?
From: Ying Ge <ying.ge () crc ca>
Date: Tue, 11 Feb 2003 17:37:41 -0500
Dear mailing list, I'm using Orinoco wireless network card (drive: Pcmcia-3.2.3) under Red-hat Linux 8.0. When put the card in monitor mode, I can see a lot of 802.11 raw packets (beacons from Access Point) over Ethereal. However, I would like to manipulate these 802.11 raw packets, and wrote a simple C program as follows: -----Quote----- /* my_capture.c */ #include <pcap.h> ..... int main() { char *dev; pcap_t* handle; char errbuf[PCAP_ERRBUF_SIZE]; const u_char *packet; struct pcap_pkthdr hdr; int linktype; dev = pcap_lookupdev(errbuf); pcap_lookupnet (dev, &netp, &maskp, errbuf); handle = pcap_open_live (dev, BUFSIZE, 1, 0, errbuf); packet = pcap_next (handle, &hdr); linktype = get_pcap_linktype (handle, dev); printf ("linktype: %d\n"); pcap_close (handle); return (0); } -------- Un Quote ------ I compile the above code with: gcc my_capture.c -lpcap, everything is OK. However, when I run the program, I got the following output: " Warning: arptype 801 not supported by libpcap - falling back to cooked socket linktype: 113 " I know that means that the 802.11 raw packet is not recognized by libpcap. Actually, the libpcap comes with the red-hat 8.0 is the old version, which did not support 802.11. And I download a later version of libpcap, compile Ethereal against it, so the Ethereal works fine to capture the 802.11 packets. But why my code can not recognize these packets? Is it because when I use "-lpcap", I'm still linking the old version of libpcap? If it is true, then how can I solve the problem??? Please give me some suggestions! Thanks a lot! Ying - This is the TCPDUMP workers list. It is archived at http://www.tcpdump.org/lists/workers/index.html To unsubscribe use mailto:tcpdump-workers-request () tcpdump org?body=unsubscribe
Current thread:
- libpcap warning: arptype 801 not supported by libpcap -- why this happens? Ying Ge (Feb 11)