dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

26 Commits

Author SHA1 Message Date
itojun 1b3a318d83 typo 2003-12-24 09:14:21 +00:00
itojun 08ef9a54d2 some getaddrinfo(3) can return multiple address against SOCK_STREAM (like tcp
adn sctp).  hardcode to tcp for now.  suz@kame
2003-12-24 08:27:04 +00:00
guy d7bc98d08b Typo fix from Brian Ginsbach. 2003-11-19 18:14:18 +00:00
guy 52c71acb69 From Brian Ginsbach <ginsbach@cray.com>: add UNICOS/mp to the list of
OSes that declare "ether_hostton()" themselves.
2003-11-16 09:48:25 +00:00
guy 30e89f192a Add _U_ to "rcsid[]" definitions, to eliminate "unused variable"
warnings from newer versions of GCC.
2003-11-15 23:23:57 +00:00
fenner c5419d46c8 Only look up "tcp" and "udp" in pcap_nametoport(). This fixes the
case in e.g. FreeBSD where /etc/services lists port 4 for the ddp "echo"
 service.

Submitted by:	Alan Bawden <Alan@LCS.MIT.EDU>
2003-02-25 22:12:03 +00:00
guy bf6b573fc3 Include "IP6_misc.h" even on UNIX if __MINGW32__ is defined, as had
been the case before the previous checkin.
2002-08-02 05:53:53 +00:00
guy 309e386870 Use <pcap-stdinc.h> only on Windows; on UNIX, selectively include, in
each source file, only the headers that file needs, and all the headers
it needs in order to compile on various platforms and not to get any
avoidable compiler warnings on those platforms (as well as any
incomplete structure definitions needed to avoid those warnings).

That also means that <pcap.h> doesn't include <pcap-stdinc.h> on UNIX;
we don't want it to include <pcap-stdinc.h>, at least on UNIX, as doing
so

	1) would mean we'd have to install that, so that programs can
	   build with libpcap

and

	2) would mean that programs including <pcap.h> would drag in a
	   bunch of header files that they don't need.

Put a newline at the end of "inet.c" - the Sun C compiler doesn't like
it if the last line doesn't end with a newline.
2002-08-02 03:44:19 +00:00
risso 6831542ec7 Added support for Win32, based on WinPcap. 2002-08-01 08:33:01 +00:00
itojun 5918c491c1 whitespace cleanup 2002-06-11 17:04:44 +00:00
guy 55dba26a62 Indicate why we have incomplete definitions for "struct mbuf" and
"struct rtentry" (in <net/if.h> on some systems, e.g.  Digital UNIX 4.0,
there are prototypes for kernel functions that include "struct mbuf *"
and "struct rtentry *" arguments, and they are included even if you're
just user-mode code).

We don't need to include <netinet/if_ether.h> unless we have
"ether_hostton()", and we don't need to include <net/if.h> unless we're
including <netinet/if_ether.h>, and we don't need to define "struct
mbuf" or "struct rtentry" unless we're including <net/if.h>.
2002-04-09 07:41:19 +00:00
guy 67a0588585 No need to include <sys/socket.h> twice. 2002-04-07 00:22:30 +00:00
guy 8d52bdae65 There's no need to include <netdb.h> twice. 2002-04-06 23:27:33 +00:00
guy b92ebafe8e Cast the argument to <ctype.h> macros to "unsigned char", to eliminate
GCC warnings and to keep the macros from referring outside an array when
handed bytes with the 8th bit set.
2001-07-28 22:56:34 +00:00
guy 70836ff6e9 Put a "return (0);" into "__pcap_nametodnaddr()" to squelch complaints
the Digital^H^H^H^H^H^H^HTru64 UNIX C compiler.
2001-06-27 05:11:48 +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 892c4a4436 Put in a comment noting that we should, perhaps, declare
"ether_hostton()" in "lbl/os-XXX.h" files rather than in "nametoaddr.c".
2000-12-18 03:45:34 +00:00
guy 839690365f As per many suggestions, the most recent in mail to
"patches@tcpdump.org" by Jonathan Wilkins
<jwilkins@madscience.dyndns.org>, we don't declare "ether_hostton()" on
FreeBSD - it's declared in <net/ethernet.h> in 3.0 and later, and is
declared with the first argument as "const char *" in 4.0 and later so
that if we declare it with the first argument as "char *" we get errors.
(If we declare it with "const char *", you get errors on FreeBSD 3.x and
other systems that *don't* declare it with "const char *".)

XXX - should it go, instead, into "lbl/os-XXX.h" files, for those OS
versions that don't declare it, and not be declared at all here?
2000-12-18 03:42:39 +00:00
guy bcb41391ec Eliminate a warning with some compilers. 2000-10-10 04:53:54 +00:00
assar 0e2f8c8892 add config.h, remove gnuc.h. remove __dead 2000-07-11 00:37:04 +00:00
assar 7b517010e0 remove non-STDC code and malloc.h 2000-07-01 03:35:07 +00:00
itojun a906e591fb revert renaming of pcap_nametoaddrinfo to pcap_nametoaddr. this gets
painful when upgrading old libpcap to tcpdump.org pcap (function rename
usually requires shlib major number bump, while api addition only require
minor)
2000-04-27 09:18:57 +00:00
itojun 45ac9150b7 restrict result from getaddrinfo() by specifying hints.ai_socktype.
otherwise, multiple answer may be returned for single numeric address
(for SOCK_STREAM and SOCK_DGRAM, for example).
1999-11-25 08:25:35 +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 db0e314c6d removed prototype to permit building on NetBSD 1999-10-17 21:29:18 +00:00
mcr b11ddf8a9b Initial revision 1999-10-07 23:46:40 +00:00