dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

832 Commits

Author SHA1 Message Date
guy ace6eadb69 RFC 1483 handles more than just IP and more than just SNAP. 2005-05-27 23:33:00 +00:00
guy f076c1d329 Note that "pcap_setdirection()" isn't supported on savefiles. 2005-05-23 20:38:06 +00:00
guy 9463892af7 Give a more correct error if you try to set the direction when reading
from a savefile.
2005-05-23 20:32:39 +00:00
hannes d0e62b4eb2 add basic support for DLT_JUNIPER_{GGSN,ES,MONITOR,SERVICES} 2005-05-19 10:05:31 +00:00
hannes 5496c3bd84 add basic support for DLT_JUNIPER_PPPOE_ATM 2005-05-12 07:06:14 +00:00
risso eb99b397f3 Renamed fileno to _fileno under MSVC, to avoid a compiler warning. 2005-05-04 19:40:01 +00:00
risso a1b08cb922 Added support for 64 bit integers under Windows. 2005-05-04 19:39:05 +00:00
hannes 8967214d9c add minimalistic code support for DLT_JUNIPER_PPPOE 2005-05-03 20:33:51 +00:00
guy 345029aaf9 From Pawel Pokrywka: add support for requesting that only received
packets, only sent packets, or all packets be accepted, with an
implementation for Linux.

Add an implementation for BPF platforms that support BIOCSSEESENT.
2005-05-03 18:54:33 +00:00
guy ec356682a8 Fix a bunch of places to support all the 802.11+radio header DLT_ values
where DLT_IEEE802_11 is supported.
2005-05-02 21:22:57 +00:00
guy c04804d259 Make "link[N:M]" refer to the 802.11 header for all 802.11 DLT_ values,
including those with fixed-length radio headers (it already refers to
the 802.11 header for radiotap).

Add a new "radio" keyword, to allow access to the radio header.  In
theory, something to allow testing for specific signal strengths, etc.
might be useful, but radiotap makes that difficult as the code can't
loop through the header looking for the signal strength field, the loop
has to be unrolled, and some of the other headers might not have
standardized the meaning of some of the fields, so we require the user
to construct such a filter themselves, for now.
2005-05-02 21:13:38 +00:00
guy b8cc5a7ae1 Update a comment. 2005-05-01 20:00:46 +00:00
guy 26e96c31ee Clean up white space. 2005-05-01 19:54:42 +00:00
guy 60dd8f12bc Add the SS7 encapsulations to pcap-bpf.h, replacing the unused "raw SS7"
encapsulation with an "MTP2 plus pseudo-header" encapsulation.  Get rid
of "rawss7.h", as the LINKTYPE_RAWSS7 it's mainly dedicated to explain
was never implemented.  Update savefile.c for the changes.
2005-05-01 19:50:51 +00:00
guy a27315a887 Add support for most filter operations for captures with the radiotap
header.

Handle MAC broadcasts with the AVS and Prism header as well.
2005-05-01 19:33:11 +00:00
guy b06ba3a4e4 Use "gen_load_ipxhdrlen()" in more places. 2005-05-01 09:18:08 +00:00
guy 98b22a19e0 Add a routine to load into the X register the length of the IPv4 header. 2005-05-01 09:05:30 +00:00
guy 27cd2f8c65 Make the value argument to "gen_ncmp()" a bpf_int32, the same as the
value arguments are to other routines.  Do the same with the value
argument to "gen_atmfield_code()".

"gen_load_a()" can return more than one statement; append to the list of
statements it returns with "sappend()", rather than manually appending
to the first statement.

Fix the argument list to one "gen_ncmp()" call, and get rid of the casts
in the other calls, as the arguments already have the right types.

Fix the casts in calls to "gen_atmfield_code()".
2005-05-01 08:37:48 +00:00
guy 8b9f740d4c Replace all the "gen_load_*rel()" routines with "gen_load_a()", which
takes an argument indicating what the offset is relative to.

Make the various comparison generators take an argument of that sort as
well.

Tweak the arguments to "gen_ncmp()" to match those of the other
comparison routines, and make all the other comparison routines just
call "gen_ncmp()".
2005-05-01 04:14:15 +00:00
guy 800ef10d8c Add a routine to generate code to load a value relative to the beginning
of the transport-layer header, where the network layer is an IPv6
header, and use that.
2005-05-01 00:56:07 +00:00
guy 52cbb102dc Add routines to generate code to load values relative to the beginning
of the link-layer, network-layer, and transport-layer (assuming the
network layer is IPv4) headers.  This makes it a bit clearer what stuff
would be changed for variable-length link-layer headers or
variable-length pseudo-headers before the link-layer header.
2005-05-01 00:38:34 +00:00
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