tcpdump mailing list archives

Re: [tcpdump-workers] libpcap 1.1.1 . kernel and libc on a boat . ‘PACKET_RESERVE’ undeclared


From: Guy Harris <guy () alum mit edu>
Date: Mon, 25 Apr 2011 03:29:22 -0700


On Apr 25, 2011, at 3:08 AM, Laurent Debricon wrote:

Hello,

I am a bit confused and missing some knowledge about the kernel & libc :

- I am trying to compile the latest libpcap 1.1.1 from github (
https://github.com/mcr/libpcap/tree/libpcap_1.1 ) (I am trying to build
because I need the fix from March 23, 2011 about packet capture size).
- My system is lenny with it's kernel 2.6.26
- Having a 10gig NIC from Intel and the right motherboard & chipset, I
wanted to get all the new features (like pcap_mmap ... ) , so I built a
2.6.37 kernel, and it's booting fine. So now I am on Lenny with a 2.6.37

- Now when I want to build libpcap, I have errors like that one :
./pcap-linux.c:3200: error: ‘PACKET_RESERVE’ undeclared (first use in this
function)

I'd suggest that you try building the latest version from the libpcap 1.2 branch or the trunk; there are no plans to 
release a libpcap 1.1.2, so I haven't been propagating fixes, such as the fix to handle older kernels that didn't 
define PACKET_RESERVE, to the 1.1 branch.  (The 1.1 branch has the fix that caused pcap-linux.c to use PACKET_RESERVE:

commit 9982024b5718fac524d8c637329206ea80d7b8ad
Author: Julien Moutinho <julm () savines alpes fr eu org>
Date:   Tue Mar 22 23:53:15 2011 -0700

    Fix the calculation of the frame size in memory-mapped captures.
    
    The old calculation truncated packets to a smaller value than the
    snapshot length.

but not the fix I made so that it builds on systems with kernels that don't define PACKET_RESERVE.)

Michael, there doesn't seem to be a libpcap_1.2 branch on github, but there is one on bpf.tcpdump.org.  The same is 
true for tcpdump - no tcpdump_4.2 branch on github.
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: