This also fixes configure-script problems on OSes that have IPv6 support
but don't have <netinet6/in6.h> - no standard I could find requires that
header for IPv6 support (the Single UNIX Specification speaks of
<netinet/in.h> for both IPv4 and IPv6, and RFCs 2292 and 3542 don't
mention <netinet6/in6.h>, just <netinet/in.h> and <netinet6/ip6.h>).
See section 11.6 "Shell Substitutions" in the autoconf documentation,
especially the
There is just no portable way to use double-quoted strings
inside double-quoted back-quoted expressions (pfew!).
part.
Rather than hardcode the WIN32 define, add proper fork checks to the
configure script and check those. This fixes building for nommu systems
which lack the fork function.
While we're here though, add support for this functionality via vfork
so that it does work on nommu systems. And fix an old bug where we
exit properly in the forked child when the exec failed instead of just
returning to the calling code (which isn't expecting it).
Reviewed-By: Guy Harris <guy@alum.mit.edu>
The PROG variant does not take into consideration cross-compilation, so
it always looks for "pcap-config" which finds the host script. So use
the TOOL variant instead which first searches for the cross-prefixed
pcap-config before falling back to the bare "pcap-config".
Reviewed-By: Guy Harris <guy@alum.mit.edu>
After finding libpcap and getting a list of other flags needed when
linking, we check for "pcap_loop()", to make sure we found a working
libpcap and have all the right other libraries with which dnl to link.
(Otherwise, for example, the check for pcap_list_datalinks() will fail,
not because the routines are missing from the library, but because we
aren't linking properly with libpcap, and that will cause confusing
errors at build time.)
In addition to Paul's change, I added a comment explaining why we do
this, and explaining that doing so after opening the first savefile
doesn't help with subsequent savefiles, so you'll have to come up with a
better fix if you want the savefiles opened by the original UID or
outside the chroot.
Reviewed-By: Guy Harris <guy@alum.mit.edu>
This prevents GCC on SPARC from generating code that assumes those
structures are aligned naturally, which they are not guaranteed to be.
Move some #defines from interface.h to tcpdump-stdinc.h to make them
available to code that doesn't include interface.h.
Move the declaration of nextproto6_cksum() to ip6.h, so that only files
that use it get it declared, and thus so that you don't need to define
"struct ip6_hdr" in everything that includes interface.h. Don't include
ip6.h in tcpdump-stdinc.h.
We have our own copies of those include files, which we use; we haven't
used the system versions for a long time, so we don't need to drag them
along for compiling WinDump.
Don't include the win32/Include/Arpa copy in print-udp.c; don't put that
copy into the release tarball; and don't talk about <arpa/tftp.h>, or
work around its deficiencies in some OSes, as we no longer include it,
we include our own tftp.h, which has a th_stuff array in its structure
definition.
Pick up from FreeBSD:
revision 1.3
date: 1996/09/11 06:18:26; author: pst; state: Exp; lines: +9 -12
branches: 1.3.2;
Print appletalk layer 3 addresses as 16 bit unsigned decimal numbers,
not two 8 bit values. This conforms to industry standard.
These changes have been sent back to LBL.
Inside AppleTalk(R), Second Edition speaks of node numbers as 16-bit.
We no longer guarantee alignment in any printer routine; all printers
must use the EXTRACT_ macros to extract integral quantities - and the
Appletalk printers now do so.
At least some versions of GCC will, on SPARC, generate code for
if (bp->bp_htype == 1 && bp->bp_hlen == 6 && bp->bp_op == BOOTPREQUEST) {
where bp is a pointer to a struct bootp, that loads the first 4-byte
word in that structure, masks out the field in that structure that's not
being compared, and compares against a word with the appropriate values
in the other fields. That won't work, because there's no guarantee that
bp points to a value aligned on a 4-byte boundary.
Declaring "struct bootp" to be packed appears to keep at least GCC 4.2.4
from performing that optimization; we define an "UNALIGNED" tag to apply
to structures to prevent that optimization, and apply that tag to the
structures in bootp.h. (We'll apply it to other structures as we
discover the need for it.)