dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

911 Commits

Author SHA1 Message Date
risso faecfbb7de Fixed the definition of SET_BINMODE(): the correct flag under VC6 is
_O_BINARY (which is accepted by Cygwin, as well).

Moved SET_BINMODE while reading from stdin *before* reading the savefile
header.
2005-04-26 00:20:33 +00:00
guy fa82a02ff2 "gen_portatom()" and "gen_portatom6()" are declared as static; define
them as static as well.
2005-04-25 18:59:20 +00:00
guy eb18a17db5 From Albert Chin: AC_CHECK_DECLS will define the HAVE_DECL_xxx variable
whether it succeeds or fails, so you can't erase a "no" result and try
again with a different header.  Use AC_CHECK_DECL, which doesn't define
HAVE_DECL_xxx, and then explicitly define it based on whether we found a
declaration or not.
2005-04-23 22:43:31 +00:00
guy f2c4434b82 From Albert Chin: just define __attribute__ as an empty macro if we
don't have __attribute__ support in the compiler.

While we're at it, get rid of the declaration of bpf_error() in
gencode.c, as it's already declared in gencode.h.
2005-04-23 22:27:37 +00:00
guy 6321271094 AC_TRY_COMPILE works only for code that fits inside "main()"; the test
for __attribute__ doesn't fit inside "main()" with GCC 4.0, as it
defines a function.
2005-04-21 03:42:09 +00:00
guy 7465687911 Include <sys/cfgodm.h> rather than <odmi.h> in the hopes that it'll
suppress some compiler warnings (and work on AIX 4.3 as well as 5.x).
2005-04-21 02:41:37 +00:00
guy c1a49ecabc Get rid of an unused variable. 2005-04-20 18:23:42 +00:00
guy 65dd7c80dc Some systems (*cough*Irix*cough) not only don't declare
"ether_hostton()" but don't even declare "struct ether_addr"; on those
systems, declare "struct ether_addr".
2005-04-20 11:13:50 +00:00
guy 2f97b1a82c <string.h> is the ANSI C standard header file to include for various
routines, including malloc() and company - and for string routines used
in this file, which aren't necessarily declared in <memory.h>, so
include <string.h>.
2005-04-20 10:38:03 +00:00
guy 73ce1b460d From Patrick Marie <mycroft@virgaria.org>: add support for port ranges
in tests - "portrange X-Y" matches all ports in the range [X,Y].

Support added for port ranges with IPv6.

Fix some comments.
2005-04-19 04:26:06 +00:00
guy 6e0b3eb7a1 From Albert Chin: fix a typo and a cut-and-pasteo. 2005-04-19 00:56:06 +00:00
guy 82cc6edb1c From Albert Chin: fix a cut-and-pasteo. 2005-04-19 00:54:16 +00:00
guy b8916c62b3 From Albert Chin: include <arpa/inet.h> in the test program that checks
whether netinet/if_ether.h declares ether_hostton() - that's required
for AIX 4.3.3.
2005-04-19 00:51:38 +00:00
guy fbfcab3706 Declare "bpf_error()" as "__attribute__((noreturn))" to squelch some
compiler warnings with GCC 4.0.
2005-04-18 22:40:14 +00:00
guy 1d1d486342 If we get EBUSY when binding to a SAP, clear out the error string we get
from it, so that our caller doesn't treat it as a warning.
2005-04-17 17:26:14 +00:00
guy 0dfd667893 Typo fix, from Mark C. Brown. 2005-04-17 17:20:59 +00:00
guy 4c4d7df517 Propagate
revision 1.65
	date: 2005/04/13 18:59:41;  author: mcr;  state: Exp;  lines: +5 -1
		include typedef for pcap_handler in documentation.

from the main branch.
2005-04-17 00:58:23 +00:00
guy 93c8df1490 Remove an extra character that snuck in. 2005-04-17 00:56:00 +00:00
guy bea2baa8ca From Mark C. Brown: don't use hard-code values of 22 and 24 for the SAP
on HP-UX, just keep trying different SAPs until we find one that doesn't
return EBUSY, as attempting to use a SAP that some other descriptor is
already bound to returns EBUSY.
2005-04-17 00:54:33 +00:00
guy 0f91287474 Put in a comment explaining what "gen_proto()" does.
What it does includes checking whether the packet is of the type
specified by the <proto> argument, so there's no need to add such a
check when checking whether the ISO protocol type field has a particular
value; remove the extra check against the ISO protocol.

Fix a typo in a comment.
2005-04-15 04:45:38 +00:00
hannes 0ad2826097 from TANAKA Shin-ya <zstanaka@archer.livedoor.com>:
fix a typo
2005-04-12 20:47:43 +00:00
hannes 4e10a0f84f backport the changes over the weekend from HEAD to 0_9 2005-04-10 18:04:47 +00:00
hannes e496c68791 backport the DLT_LAPD protocol to 0_9 2005-04-09 18:26:17 +00:00
hannes 09bff24188 backport for hierarchical vlan, mpls expressions 2005-04-09 18:16:50 +00:00
hannes 2bb9a4c5bd fix offset calculation for iso/isis/clnp/esis over DLT_EN10MB 2005-04-08 15:33:58 +00:00
hannes cba69f4084 -add support for llc based protocols (iso, etc..) for ethernet
by checking the proto against the ethermtu and bumping
 the link-layer offset by two.

-add support for vlan and mpls hierarchies by not absolute
  setting offsets but rather incrementing them;

  example(s):

  mpls 100000 && mpls 1024
    =filters for outerlabel 100000 and inner label 1024
  vlan 100 && vlan 200
    =filters for vlan 200 encapsulated withing vlan 100
  vlan 300 && mpls 17
    =filters for mpls label 17 encapsulated in vlan 300
2005-04-08 14:40:38 +00:00
guy 16e088ff27 Update some comments. 2005-04-08 03:08:00 +00:00
guy 1b34dd0bbd Rename HAVE_HPUX10_20 to HAVE_HPUX10_20_OR_LATER, because it's also
defined for 11.x.
2005-04-08 02:15:49 +00:00
guy e8afe55f90 From Don Ebright: handle logical interfaces on HP-UX 10.20 and 11.x. 2005-04-08 02:04:41 +00:00
guy 2aaf5b8803 From Don Ebright: add support for Linux logical interfaces. 2005-04-08 02:01:19 +00:00
guy be07cb1988 At the request of Daniele Orlandi, add DLT_LAPD and LINKTYPE_LAPD for
raw LAPD.
2005-04-07 20:42:45 +00:00
guy fa084ff222 Define PCAP_FDDIPAD *before* you use it. 2005-04-07 02:47:34 +00:00
mcr 6a1948624f only define PCAPPAD on NetBSD newer than 1.6 2005-04-07 01:24:18 +00:00
guy bdb178648a Add a little more information to a comment. 2005-04-04 08:42:18 +00:00
guy ff5da1a402 "install_bpf_program()" already sets "p->errbuf" to an error string if
it fails; there's no need for "dag_setfilter()" to do so.
2005-04-03 23:56:47 +00:00
guy 73a0081c01 Fix some typoes for "ether_hostton".
If we don't have ether_hostton(), don't bother checking
NETINET_ETHER_H_DECLARES_ETHER_HOSTTON and including <netinet/ether.h>
if it's defined.
2005-03-27 22:26:25 +00:00
guy b3f8e4f640 Squelch some compiler warnings. 2005-03-27 22:10:23 +00:00
guy 4d2457ceee When testing whether <netinet/if_ether.h> declares ether_hostton(), add
all the extra #includes and definitions nametoaddr.c has.
2005-03-27 21:51:23 +00:00
guy cd3e743361 Unset ac_cv_have_decl_ether_hostton before testing whether
<netinet/ether.h> declares ether_hostton(), so the failure to find it
declared in <netinet/in_ether.h> doesn't cause us to assume we won't
find it anywhere.

Fix a typo in a comment.
2005-03-27 03:36:36 +00:00
guy 2bdb85977d When testing whether "inline" works, use the V_CCOPT flags, because some
of those might disable inlining; otherwise, the test for inlining will
succeed, but inlining won't work with the options we're using when
compiling.
2005-03-27 03:27:09 +00:00
guy 822f0efb5f If we don't get a declaration of ether_hostton() by including
<netinet/if_ether.h>, try <netinet/ether.h>.
2005-03-27 02:45:03 +00:00
guy 216c14f343 One more header Solaris needs to get at ether_hostton(). 2005-03-27 01:15:20 +00:00
guy 5277314c1e Make the first AC_CHECK_HEADERS test look the way it used to look, and
make the second one similar.

Get rid of the # in the "Rechecking with some additional #includes"
message, as it's a shell comment character and screws up the script.

Fix a typo in a comment.
2005-03-27 01:07:01 +00:00
guy 575134c351 Discard the cached result of a failure of the first test of
<netinet/if_ether.h>, so we try the second test with the additional
includes and definitions).

Log a message before doing the second test, to show why we're testing
twice.
2005-03-27 00:57:08 +00:00
guy d7ef1bcb71 On some platforms, some extra stuff is needed in order to include
<netinet/if_ether.h>, so, if we don't find <netinet/if_ether.h>, try
adding that extra stuff when looking for it.
2005-03-27 00:30:21 +00:00
guy 3c27416c4d Use AC_LBL_LIBRARY_NET before checking for ether_hostton(), as, at least
on Solaris, it's a "gethostbyname() -ish function", and we'll find it
only when we're linking with whatever libraries are required for finding
those functions.

Get the AC_LBL_LIBRARY_NET macro from tcpdump; that macro works with
autoconf 2.5x, but the one here didn't.
2005-03-26 23:57:42 +00:00
guy d3bc29242e If we have ether_hostton(), check whether we have <netinet/if_ether.h>
and if including it declares ether_hostton(), and define
HAVE_DECL_ETHER_HOSTTON appropriately, and use that to determine whether
to define it ourselves, rather than having a set of OSes that don't need
it, as that set can change over time.

Make the default declaration of "ether_hostton()" declare its first
argument as "const char *", as that's what it's *supposed* to be
(although it's not declared as such in some OSes, so we still have to
cast a "const char *" when passed as the first argument).
2005-03-26 23:07:50 +00:00
guy afe114b070 For "ether proto", allow LLC value names as well as Ethernet type value
names, so that, as the tcpdump man page claims to be the case, "ether
proto \{iso,stp,ipx,netbeui}" are equivalent to "{iso,stp,ipx,netbeui}".
2005-03-17 07:02:31 +00:00
guy 16889bae3e On the platforms where we do in-kernel filtering and can read more than
one packet from the kernel at a time, when the filter is changed, clear
the libpcap buffer to discard packets read from the kernel before the
filter was changed.
2005-02-26 21:58:05 +00:00
guy e6c1698e5e Install an initial filter that accepts all packets; you need a filter in
order to tell the kernel what the snapshot length is.
2005-02-24 08:59:38 +00:00