dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

902 Commits

Author SHA1 Message Date
guy 97a8e5112d 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:25:00 +00:00
guy b423e17024 From Albert Chin: fix a typo and a cut-and-pasteo. 2005-04-19 00:55:48 +00:00
guy b791874357 From Albert Chin: fix a cut-and-pasteo. 2005-04-19 00:54:00 +00:00
guy 0002aa6d52 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:49:37 +00:00
guy 83f2e11be6 Declare "bpf_error()" as "__attribute__((noreturn))" to squelch some
compiler warnings with GCC 4.0.
2005-04-18 22:36:45 +00:00
guy 14f186752d 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:25:51 +00:00
guy ad93efab7c Typo fix, from Mark C. Brown. 2005-04-17 17:18:03 +00:00
guy 75e966b257 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:47:40 +00:00
guy 88917fcb87 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:39:09 +00:00
mcr 38a0d60bcb include typedef for pcap_handler in documentation. 2005-04-13 18:59:41 +00:00
hannes c71f20189b from TANAKA Shin-ya <zstanaka@archer.livedoor.com>:
fix a typo
2005-04-12 20:46:28 +00:00
hannes b464d55402 as per guy's suggestion:
backout some of the ethernet specific isis plumbings
    (already done in 1.226)
  and rather make Q_ISIS to cmp right;
2005-04-10 17:48:38 +00:00
guy 1ed95a858a Rename "gen_llc()" to "gen_llc_linktype()", to match
"gen_ether_linktype()" and "gen_linux_sll_linktype()", as well as
"gen_linktype()".

Add comments for those routines to indicate how they handle the protocol
type argument.

In "gen_linux_sll_linktype()", merge together the handling of
LLCSAP_ISONS, LLCSAP_IP, and LLCSAP_NETBEUI, as was done in
"gen_ether_linktype()" and "gen_llc_linktype()".
2005-04-10 03:40:24 +00:00
guy 8dd4d1132c Fix off_nl_nosnap for Apple IP-over-IEEE 1394.
Merge the code to handle the LLCSAP_ISONS, LLCSAP_IP, and
LLCSAP_NETBEUI.

"gen_ether_linktype()" already handles SAPs as protocol IDs; just use it
for Ethernet, rather than using "gen_llc()" (which isn't prepared to
handle Ethernet, with off_linktype pointing to the type/length field
rather than the DSAP).

That also means that "gen_linktype(LLCSAP_ISONS)" can be used to test
for OSI packets on Ethernet.

Expand some comments.

Fix a typo ("off_nl = +4" should've been "off_nl += 4").
2005-04-09 23:38:36 +00:00
guy 9d7ed6809f As per Daniele Orlandi's request, use DLT_LINUX_LAPD rather than
DLT_LAPD (it includes more than just the LAPD header).
2005-04-09 21:15:13 +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
guy 34f7067751 Gisle Vanem notes that some compilers warn about "const register char
*" - use "register const char *" instead.
2005-02-10 19:38:06 +00:00
guy 8804809bf5 Add DLT_ values requested by Gregor Maier <gregor@endace.com> of Endace
Measurement Systems.
2005-02-08 20:03:15 +00:00
guy c1401d4725 The DLT_LINUX_PPP_WITHDIRECTION is also used for pppd on some BSDs, so
rename it again to DLT_PPP_PPPD, and rename other #defines to match.

Add backwards-compatibility #defines of DLT_PPP_WITH_DIRECTION and
DLT_LINUX_PPP_WITHDIRECTION for software that used them.
2005-02-08 19:52:18 +00:00
guy d9e0597103 Rename DLT_PPP_WITHDIRECTION to DLT_LINUX_PPP_WITHDIRECTION, as it's a
Linux-specific mechanism, and rename other #defines accordingly.  Give
more details about it in comments.
2005-01-31 01:47:27 +00:00
guy f08856ee2d Apparently, Redback used a DLT_ value of 32 for captures from its
SmartEdge 400 and 800.
2005-01-31 01:00:07 +00:00
guy 547b1dec36 Don't ignore Solaris logical interface entries, as they could give
additional IP addresses for the underlying interface; instead, strip off
the logical interface number, and add them so that the additional
addresses are added.
2005-01-29 10:34:04 +00:00
guy 2c29645015 Clean up indentation.
Get rid of some unnecessary casts.
2005-01-29 00:52:22 +00:00
guy 07ea050fd6 Explain why we're discarding interfaces we can't open for capturing. 2005-01-29 00:47:25 +00:00
guy a16432cb28 Put back the code to try opening a device for capture before adding it
to the list of interfaces, so we don't, for example, include the
loopback device in the list on Solaris - SIOCGIFCONF/SIOCGLIFCONF will
find the device, as it has an IP address, but it's not a DLPI device so
you can't open it for capturing.
2005-01-28 20:51:20 +00:00