dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

129 Commits

Author SHA1 Message Date
guy f6bcb3d546 Some versions of the HP C compiler can handle inlines, but not if they
return a structure pointer.  Check whether the C compiler can handle
inline functions that return a structure pointer, not whether they can
handle inline functions that return an int, as at least some versions of
autoconf's AC_C_INLINE do.
2002-06-28 10:34:35 +00:00
guy e2537440b7 Replace "target_cpu" and "target_os" with "host_cpu" and "host_os", as
per Maciej W. Rozycki's patch.
2001-12-10 08:33:41 +00:00
fenner 93abe845e9 Add comments to BDEBUG and YYDEBUG for autoheader 2001-11-12 22:18:57 +00:00
fenner 4da5bb94e1 Make it easy to turn on optimizer and parser debugging with
--enable-optimizer-dbg and --enable-yydebug
2001-11-12 22:08:46 +00:00
guy 519b0b5a59 If we have "/proc/net/dev", and don't have <ifaddrs.h> (i.e., don't have
"getifaddrs()"), after processing the list returned by SIOCGIFCONF, scan
"/proc/net/dev" for interface names, and add to the list of interfaces
entries for those interfaces, with no associated addresses (if the
interfaces were already added, with addresses, from the list returned by
SIOCGIFCONF, they won't get added again).

Clean up the error handling a bit.
2001-10-09 05:43:19 +00:00
guy 5a85948f80 We don't actually use HAVE_FREEIFADDRS, so there's no point in checking
whether we have "freeifaddrs()" (we don't check whether we have
"getifaddrs()", and if we have "getifaddrs()" but not "freeifaddrs()",
we're stuck with leaking memory).

Give the "any" device an instance number of INT_MAX, so it shows up
after all other non-loopback devices.

"getifaddrs()" sometimes appears to supply a destination address even
for non-point-to-point interfaces (it did so on a FreeBSD 4.1 system);
don't use the broadcast address it supplies if an interface isn't a
broadcast interface, and don't use the destination address it supplies
if an interface isn't a point-to-point interface.

If we had an error constructing the list of interfaces, don't attempt to
add the "any" device to the list.
2001-10-09 03:53:38 +00:00
guy 380a3dbf49 From Scott Barron <sb125499@ohiou.edu>: use the
SOL_PACKET/PACKET_STATISTICS "getsockopt()" call, on Linux kernels that
support it, to get packet statistics, so that we can report the number
of dropped packets, and always use <linux/if_packet.h> to get
definitions for PF_PACKET sockets, so that we don't depend on glibc's
header files having been updated to support all the latest shiniest
kernel features (many systems with 2.4[.x] kernels don't have a
<netpacket/packet.h> that defines "struct tpacket_stats", for example,
so we wouldn't have been able to support that kernel feature on those
systems).
2001-07-29 18:25:46 +00:00
guy 8a6db7a7d5 Sigh. Not all systems have <netinet/if_ether.h> - for example, at least
some libc5 Linux systems don't - so we have to check whether it exists,
and include it only if it does.
2001-01-17 18:18:48 +00:00
guy 5b0a98d641 Add support for a new link layer type DLT_LINUX_SLL, for use when doing
live captures with a "cooked" (SOCK_DGRAM) rather than a "raw"
(SOCK_RAW) PF_PACKET socket; it includes a bunch of the fields from the
"struct sockaddr_ll" you get in a "recvfrom()", including the Ethernet
protocol field.

This requires us to rewrite the BPF program if we're stuffing it into
the kernel; as long as we're doing *ex post facto* rewriting, we might
as well also do the "ret <snaplen>" -> "ret 65535" fixup there as well,
rather than in the code generator.
2000-12-21 10:29:21 +00:00
guy be7f1ec5ad We should no longer need to use our own versions of system header files
when compiling on Linux, as we extracted from those copies the
definitions and declarations we need in order to dissect packets, and
put them into our own header files in the regular source directory.
2000-10-21 04:50:43 +00:00
fenner af62365a17 Add a check for lame lex and fail with an error message recommending flex. 2000-08-16 20:28:52 +00:00
guy ab1c0634f4 libpcap doesn't use <sys/ioccom.h>, but the test program in
"AC_LBL_FIXINCLUDES" does, so we have to check for it, otherwise the
configure script fails on, among other platforms, Solaris.
2000-07-14 02:12:36 +00:00
assar f1eb21451b add config.h. remove gnuc.h, use AC_DEFINE/3 to get strings into config.h.in 2000-07-11 00:38:19 +00:00
assar cac15b82a8 add code for handling find the correct dlpi device on HP-UX 11.0
From: Guy Harris <gharris@flashcom.net>
2000-07-06 01:50:36 +00:00
assar 1cf3c4fbc9 remove setting of umask
remove check for malloc.h: not used any longer
2000-07-01 03:31:45 +00:00
assar fe8ad9b324 do not check for sys/ioccom.h and net/if_arp.h they are not being used 2000-06-26 04:20:36 +00:00
assar 80a0ed7346 use AC_PROG_RANLIB. be more cross-compilation friendly.
From cgd@netbsd.org (Chris G. Demetriou)
2000-06-10 14:18:39 +00:00
torsten 94de442535 Merged the Linux v2.2 packet support into the main trunk (from
tag linux-2-2-packet). Please test this code :)
2000-06-08 06:40:09 +00:00
itojun c86640a4b3 do not use strlcpy() if the platform does not supply one.
linkage of third-party source code can fail if the third-party code does
not have AC_REPLACE_FUNCS(strlcpy).  (exapmle: ethereal)

XXX the macro is ugly
2000-05-04 13:34:24 +00:00
itojun 20d9e08cde do not use sprintf(). always use snprintf().
from NetBSD/OpenBSD src/lib/libpcap.

use freeifaddrs() if exists.
2000-04-27 09:11:11 +00:00
assar fdf943d632 check for u_int32_t (used in genocde) 2000-04-09 17:44:26 +00:00
assar 737f88a2ea (AC_C___ATTRIBUTE__): call 2000-04-01 12:06:37 +00:00
itojun 03cc04a438 use getifaddrs whenever available.
SIOCGIFCONF is very complex API, so it would be good to avoid it whenever
possible.
2000-02-23 11:39:44 +00:00
assar c080e23470 (AC_REVISION): add 2000-01-08 06:08:49 +00:00
itojun 5b7ead9173 add configure option --disable-protochain, to make Arne happier. 1999-11-01 15:56:40 +00:00
itojun 78ba595629 fix bpf_filter.c lookup path for build outside of source code tree.
http://www.sics.se/~assar/tcpdump_patches/4
From: Assar Westerlund <assar@sics.se>
1999-10-30 05:33:45 +00:00
itojun 7fe3c1111a IPv6 packet filtering code.
./configure --enable-ipv6 (requires getaddrinfo(3) and getnameinfo(3)).

TODO: make it work even without getaddrinfo(3) or getnameinfo(3)
(or, tcpdump/configure.in should provide alternative version by
AC_REPLACE_FUNCS)
TODO: make IPv6 filtering code work by default
TODO: make "protochain" friendly with optimization
1999-10-19 15:18:28 +00:00
mcr e01084ceef patches from Assar Westerlund <assar@sics.se> 1999-10-10 01:47:05 +00:00
mcr b11ddf8a9b Initial revision 1999-10-07 23:46:40 +00:00