dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

855 Commits

Author SHA1 Message Date
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
guy 738db2cb08 Add checks for interfaces that begin with "dummy" or that end with ":"
followed by a number; Ethereal has those checks in the code it uses when
not using "pcap_findalldevs()" - I'm not sure what the "dummy" is
checking for (Linux dummy interfaces?), but the ":" followed by a number
are Solaris virtual interfaces (I think that's how it implements
multiple IP addresses per "real" interface, with each additional address
getting a virtual interface; I'm not sure you can open a virtual
interface for capturing, and even if you can you won't, as far as I
know, see any packets other than the one you get for the "real"
interface - should we just ignore the ":{number}" and "add" that
interface so that we add its IP address?).
2005-01-28 20:33:51 +00:00
hannes d6d37a1ad0 remove duplicate Juniper ML-PPP DLT name 2005-01-27 18:32:28 +00:00
hannes b82f83587c add support for DLT_JUNIPER_{MLFR,MLPPP) 2005-01-25 22:38:23 +00:00
guy 2dd3e0acd6 From Koryn Grant:
The DAG 4.2 OC-48 cards (and revisions thereof) produce ERF
	records that do not contain the trailing FCS.  However,
	pcap-dag.c assumed that there is an FCS and strips the final
	word of the packet.  This meant that packets captured with
	libpcap on a DAG 4.2 are truncated by four bytes, unless a
	magical environment variable (ERF_FCS_BITS) was set.  This patch
	autodetects when the DAG card is a 4.2, and turns off the
	FCS-stripping feature so that packets are no longer truncated.

	Also, include "dagnew.h" and "dagapi.h" with quotes, not angle
	brackets, as they should be in the user search path, not the
	system search path.
2005-01-21 10:11:39 +00:00
guy 2f23c057fc Add to the beginning a note from Rick Jones that 11i (11.11) and later
don't have any known issues with promiscuous mode.
2005-01-15 01:23:56 +00:00
hannes f718fd1835 add support for Juniper PIC Peer DLT_ 2005-01-12 09:15:05 +00:00
hannes 6e18a333d2 add gencode support for Juniper ML/LS PIC DLT_ 2005-01-12 09:02:55 +00:00
guy 1a66ed9ea7 Add new DLT_ values for use in Gcom's T1/E1 line monitoring equipment. 2005-01-11 11:02:08 +00:00
guy c3411874c8 Add a magic number for Navtel Communications. 2005-01-07 11:21:01 +00:00
guy 54b7cfbafb Squelch a (valid) compiler warning. 2004-12-27 01:12:17 +00:00
guy b3a008a463 Mark some arguments as unused (pointers to those functions are assigned
to pointer variables, so the signature can't be changed).

From Gisle Vanem: assign to the right variables in the Win32
version-string construction code (where one criterion for being "right"
is that the variable exist...).
2004-12-19 20:02:45 +00:00
guy 7848712ee7 From Gisle Vanem: fix the include-only-once #define's name. 2004-12-19 19:48:37 +00:00
guy 0865b78db9 Actually add the RCS ID claimed to be added by the previous checkin. 2004-12-19 19:47:01 +00:00
guy 7379471bd6 From Gisle Vanem:
add note for djgpp;

	pcap_verbose() is gone;

	fix a typo.

Add an RCS ID.

Remove CRs - they get in the way of applying patches on UN*X, and
presumably either they aren't required on DOS or DOS CVS inserts them
when the file is checked out.
2004-12-19 19:44:29 +00:00
guy 8163c9ce4d From Gisle Vanem: produce a version.h from VERSION.
Add an RCS ID.

Remove CRs - they get in the way of applying patches on UN*X, and
presumably either they aren't required on DOS or DOS CVS inserts them
when the file is checked out.
2004-12-19 19:41:06 +00:00
guy 14e0f5d9f7 From Gisle Vanem: don't compile 32-bit drivers by default.
Add an RCS ID.

Remove CRs - they get in the way of applying patches on UN*X, and
presumably either they aren't required on DOS or DOS CVS inserts them
when the file is checked out.
2004-12-19 19:36:33 +00:00
guy f8a76d1d76 From Gisle Vanem: MS-DOS support. 2004-12-18 08:52:08 +00:00
guy f912cc399c From Gisle Vanem: there's no need to include <sys/time.h> in
"grammar.y", as "pcap.h" includes it.
2004-12-18 08:49:23 +00:00
guy 529f98f94f Use "version.h" if autoconf is being used (as that assumes a
UN*Xy-enough platform that the Makefile.in rules to generate "version.h"
work), and use the stuff from "version.h" iff HAVE_VERSION_H is defined,
so we can use it even with WinPcap.
2004-12-17 23:25:36 +00:00
guy 14eb2792bd Don't boldface the period at the end of a sentence. 2004-12-17 21:27:54 +00:00
guy 3ba117b68d On Win32, don't close "p->fd" in "pcap_close_common()", as there is no
"p->fd".  Do, however, use "pcap_close_common()" to free up "p->buffer",
as is done on other platforms.
2004-12-17 20:41:59 +00:00
guy f4531c5cf3 From Gisle Vanem:
don't include <sys/time.h>, as it's included, if necessary, by
	pcap.h;

	constify some arguments.
2004-12-17 20:32:35 +00:00
guy 875d60923d Don't close the input stream if "pcap_fopen_offline()" fails; only do so
in "pcap_open_offline()", where we were the one who opened the stream.
2004-12-17 20:26:16 +00:00
guy 8ab85b3b53 From Gisle Vanem: there's no need to include <sys/time.h> in
"gencode.c", as "pcap.h" includes it.
2004-12-17 20:16:44 +00:00
guy 6fdd92e436 From Gisle Vanem: add some new link-layer types to the "dlt_choices[]"
table.

Add some even newer ones that arrived after his patch.
2004-12-17 19:55:41 +00:00
guy 63f52c6dce If we don't have any support for packet capturing, don't bother
supplying a non-stub version of "pcap_findalldevs()", as a list of
devices won't do any good for a capture program.

Don't bother checking for "ifaddrs.h" unless we have "getifaddrs()" -
and if we have "getifaddrs()" but don't have a usable "ifaddrs.h",
report an error, rather than leaving the error for the compile stage.
2004-12-16 22:22:20 +00:00
guy b9974ec51a We don't call "getifaddrs()" in inet.c, so we don't need to include
<ifaddrs.h> in it.
2004-12-16 22:07:28 +00:00
guy efca1c6d92 Report short reads on the file header (as opposed to errors on it)
correctly.
2004-12-15 09:00:11 +00:00
guy 3573dfdacc Put the FDDI padding (if any) into the pcap_t structure on platforms
that require it, and make pcap_fddipad private to the code generator, as
that's the only place that needs it (ideally, all *its* state should be
local as well).  This makes opening an FDDI device, on platforms where
the padding is supplied as part of the packet, and opening other types
of devices or opening savefiles in the same program work better, as you
don't have to be sure you compile the filter for a given pcap_t before
opening the next pcap_t.
2004-12-15 00:25:08 +00:00
guy eec5cdca82 The BPF code is generated using pcap_fddipad, so if we have to evaluate
it in userland, we should do so *before* skipping the padding.
2004-12-15 00:05:48 +00:00
guy 16aa6d8892 Don't skip the FDDI padding before running a filter in userland - the
filter code was generated assuming that the packet would be preceded by
FDDI padding, if any.
2004-12-14 23:55:30 +00:00
guy 8a3038c58e Strip off the FDDI padding on NetBSD before processing the packet. 2004-12-14 23:33:57 +00:00
guy 84819baa2b Add new DLT_ values and LINKTYPE_ values for G.7041/Y.1303 Generic
Framing Procedure, as per Dumas Hwang (dumas.hwang@navtelcom.com).
2004-12-09 19:03:36 +00:00
guy 1e5f231e7b New link-layer header type for raw GPRS LLC frames, as per a request by
Marc Hermstein <mhermstein@yahoo.com>.
2004-12-07 17:27:45 +00:00
guy 0b2386c1f1 Add some notes based on comments from Rick Jones. 2004-12-02 21:31:46 +00:00
guy 6dc4f10b78 From Dug Song <dugsong@monkey.org>: don't fetch the filter code until
we're about to apply the filter, so that if it's changed by a callback
routine, we get the current filter, rather than the one in effect when
we started the loop.
2004-11-30 10:51:41 +00:00
guy 43dd00e859 Expand some comments. 2004-11-14 03:10:33 +00:00
guy 987ca50c71 Shuffle comments around a bit. 2004-11-14 00:28:18 +00:00
guy 02017c865c Add some additional comments, and beef up some existing comments. 2004-11-13 22:32:42 +00:00
guy 597103eedc From Koryn Grant:
correctly detect a rare error condition and return a sensible
	error message instead of blindly continuing;

	clean up some endian-specific code.
2004-11-10 09:28:25 +00:00
guy cd5084b6f0 Regenerate. 2004-11-10 09:21:46 +00:00
guy 60d9468f45 From Koryn Grant: correctly detect and configure libpcap for both
2.4.x-series and and 2.5.x-series DAG software releases.
2004-11-09 18:32:22 +00:00
guy e67d61b9b3 Add a few comments, and shuffle the definition of NOP to keep the
definitions for register atoms together.

A conditional jump uses the X register as well as the A register if it's
comparing the A register against the X register rather than a constant;
handle that case when computing the set of registers used by a block.
2004-11-09 01:20:18 +00:00
guy 379d3179ed There are a bunch of optimizations we can only do in blocks that end
with jeq #x and that don't have a subsequent block that uses the value
the block leaves in the A register; make sure we only do them if the
last operation is a jeq with a constant operand and if nothing uses this
block's A register value.  (Some were being done with jeq x, and some
were done regardless of the branch that terminated the block and
regardless of whether the block's A register value is being used.)
2004-11-08 09:03:37 +00:00
guy 1e238b3877 If a block loads a value into the index register with a value different
from what it had on entry, we can't eliminate it, even if we don't use
the index register value.
2004-11-07 22:43:01 +00:00
guy cccbf10006 From Chris Lightfoot <cwrl@users.sourceforge.net>: add
"pcap_dump_fopen()" to open a pcap_t given a FILE *, and add
"pcap_dump_fopen()" to open a pcap_dumper_t given a FILE *.

On Windows, if we're opening the standard input, put it in binary mode.

Check for errors from "sf_write_header()" and return an error if we get
an error.
2004-11-07 21:40:48 +00:00
guy 1ab36e08d7 Fix a comment.
Clean up white space.
2004-11-06 22:57:28 +00:00