Currently make install in libpcap never installs pcap/{vlan,bluetooth}.h
headers. Attached patch makes it install them in case support was built
in into libpcap.
Author: Peter Volkov <pva@gentoo.org>
Date: Thu Nov 6 01:30:04 2008 -0500
make DESTIDR=/tmp/libpcap install
fails with the following error:
/usr/bin/install -c pcap-config /tmp/test/home/pva/work/local/bin/pcap-config
/usr/bin/install: cannot create regular file `/tmp/test/home/pva/work/local/bin/pcap-config': No such file or directory
make: *** [install] Error 1
patch in attachment fixes this issue.
pcap-linktype man pages; it should be section 7 for UN*Xes using the
V7/BSD conventions (this includes *BSD, Linux, and Mac OS X), and
section 5 for UN*Xes using the System V conventions (this includes
Solaris and HP-UX, and possibly AIX).
soname doesn't have the full version number (as that means that programs
built with libpcap will expect *that particular version* of libpcap, not
just any compatible version).
the OS X shared library; that's what it is in OS X, and that's what gets
built into clients linked against it, so it's not going to change in OS
X as that'd break binary compatibility.
VLAN packets sent over devices supporting VLAN tagging/stripping in
hardware don't have a VLAN header when they are received on packet
sockets. The VLAN TCI is available through the PACKET_AUXDATA cmsg,
reconstruct the entire header when necessary.
check in the generated version, and don't put it into the distribution.
Fix a bunch of references to tcpdump-workers@tcpdump.org to refer to the
new address, tcpdump-workers@lists.tcpdump.org.
Fix a reference to the pcap man page from the pcap-filter(4) man page.
Note that patches should be submitted on the SourceForge site, not sent
to the spam-trap patches@tcpdump.org list.
for it, for Mac OS X 10.4 and later. (The script could be useful for
BPF-based systems that don't use devfs as well.) We're not installing it
at this point; that might happen later.
Update HDR in Makefile.in to include all headers.
Add pcap_activate.3pcap to the list of man pages in the 3PCAP section.
Add an EXTRA_DIST variable to include all the files that should go into
the tarball and that aren't in CSRC, HDR, MAN3PCAP, or MAN4.
Use CSRC, HDR, MAN3PCAP, MAN4, and EXTRA_DIST to determine what goes
into the tarball, rather than doing a "make distclean" and putting
everything into the tarball; that way, you can do "make releasetar"
without cleaning out the current directory.
Given that we're not just tarring up the entire source directory, we can
make the tarball directory as a subdirectory of the current directory and
put the tarball into the current directory, rather than putting it into
a (not-entirely-obvious) ../n directory. Clean out the tarball
directory when we're done.
library has to be freed by the library, as an application or other
library using that library might have been built with a different
version of the C runtime library.
functions plus an overall man page for libpcap, and put them all into
section 3PCAP. That means you can actually do "man pcap_open_live" and
get something meaningful, rather than having to do "man pcap" and then
scroll through all the other stuff in the man page.
the tcpdump manual page, so that documentation for other applications
using libpcap can refer to it.
Update pcap(3) to refer to it - and not to suggest sending patches to
patches@tcpdump.org, which is a spam magnet that's no longer read by
anybody.
for -o and Flex's support for it in a way that lets us more easily fail
if Lex/Flex fails (so that we don't try to compile a bogus scanner.c
that might be generated; that appears to have happened on at least one
occasion, with the resulting scanner.o missing some functions, causing
weird errors in configure scripts for programs using libpcap), and also
prepares us to handle newer versions of Flex where we want Flex to
generate a header file so we don't get "defined but not declared"
warnings.
source directory and the target include directory, and have include
files at the top-level directory to include those headers, for backwards
compatibility.
Update the FILES and INSTALL.txt files to reflect current reality.
when building a shared library, build with "-fPIC" on Linux, to
support x86_64;
link with "$(CC) -shared" rather than "ld -shared" when building
a ".so" shared library (as would be done with ELF systems that
use GCC);
add an explicit "-ldag" when building the shared library, so the
DAG library dependency is explicit.
"snprintf()", include one in libpcap with the name "pcap_snprintf()", so
applications don't have to supply their own "snprintf()" on those
platforms in order to use libpcap.
non-".devel" builds, with no automatically-generated dependencies,
"version.h" will be built before we try to build "pcap.o" ("pcap.c"
includes "version.h", so we need it to be built).
version of Red Hat Linux, HP-UX 11.00, and MacOS X 10.1, if a string in
a shared library is static, and returned by a function in that library,
the return value of that function, when called from a program, will
reflect the contents of the string in the version of the shared library
with which the program is running, not the version with which it's
linked.
Therefore we can just generate a definition of the version string and
put it into "version.h", which means that VERSION can contain any string
(as long as " and \ are escaped with \) rather than having to be N.M or
N.M.MM.
libpcap; it generates the string at run time on the first call, so that
it's not a constant string - in at least some UNIXes, constant data in a
shared library is kept separate from the library code, and is bound into
applications linked with that library at link time, not at run time, so
a constant string (such as "pcap_version[]") can reflect the version of
the library with which the application was built, not the version with
which it's running.
Document it, in the hopes that vendors will be less likely to omit it
from their libpcaps (unlike "pcap_version[]", which is absent from some
vendors' libpcaps).