> While trying to link tcpdump to libpcap 0.6.1 on linux, I got an error
> that fix_program() was not defined. Looking at pcap-linux.c, it seems
> that SO_ATTACH_FILTER was defined in my environment but not
> HAVE_NETPACKET_PACKET_H.
Err, umm, what particular flavor of Linux (what distribution, and what
version) are you running?
If it has SO_ATTACH_FILTER, it presumably has socket filter support, and
is either 2.2 or later, or is some weird mutant 2.0[.x] to which
somebody added socket filter support - or the header files don't match
the kernel, or the header files match the kernel header files but don't
reflect what the kernel actually supports in the code.
But if it doesn't have "/usr/include/netpacket/packet.h", either
1) it lacks PF_PACKET socket support, which I think means it's a
2.0[.x] kernel, which conflicts with the presence of
SO_ATTACH_FILTER;
2) it's using some version of libc that doesn't supply headers
for PF_PACKET, in which case whoever put that distribution
together needs to acquire a clue;
3) somehow the distribution was misinstalled and that header
file wasn't installed even though it should have been.
If it does have "/usr/include/netpacket/packet.h", then the configure
script has a problem.
Remove your workaround from "pcap-linux.c" (i.e., change
#if defined(HAVE_NETPACKET_PACKET_H) || defined(SO_ATTACH_FILTER)
back to
#ifdef HAVE_NETPACKET_PACKET_H
), do a "make distclean", and then run "configure" *and save the output
fron the configure script to a file* (e.g.,
configure | tee /tmp/configure.out
) and then try rebuilding.
If it *still* fails to build due to a lack of "fix_program()", then send
us:
the output of "uname -sr", which tells the version number of the
kernel on your system;
the name and version of the *distribution* you're running, *and*
any modifications you've done to it (installing a kernel other
than the one that came with the system, installing a libc other
than the one that came with the system, etc.);
the output of the configure script.
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe