dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

471 Commits

Author SHA1 Message Date
guy 5b474ef2bb Move the freeing of "p->dlt_list" to the proper place. 2003-01-16 07:44:27 +00:00
guy a41135fcd3 From NetBSD, as checked in by Antti Kantee <pooka@netbsd.org>: fix the
documentation for "pcap_next()" to indicate that it returns a "const
u_char *", not just a "u_char *".
2003-01-16 07:43:24 +00:00
guy 1445ed8be1 From NetBSD, as checked in by Antti Kantee <pooka@netbsd.org>: fix the
documentation for "pcap_next()" to indicate that it returns a "const
u_char *", not just a "u_char *".
2003-01-16 07:29:15 +00:00
guy 5060f872d8 Oops - fix a typo. 2003-01-10 09:15:18 +00:00
guy d4e32467f8 Test both for "sparc" and "__sparc__" in the case where LBL_ALIGN isn't
defined - Debian bug 171210 says that "sparc" isn't defined by GCC,
which presumably means "with the compiler we're using on Debian" as
there are versions of GCC that *do* define "sparc" on SPARC.
2003-01-10 09:14:07 +00:00
guy 3150af88f7 Squelch compiler warnings from Sun C. 2003-01-03 08:34:46 +00:00
guy a8d3536171 Make "split_dname()" take a "char *" as an argument and return a "char
*", and arrange never to pass it the argument to "pcap_open_live()" -
copy the device name to a buffer before doing anything else to it.
2003-01-03 08:33:54 +00:00
guy 123b602037 Put in a comment noting that you probably should Not Worry and just Be
Happy even with the warnings about passing a "const char *" to
"pfopen()".
2003-01-03 08:33:24 +00:00
guy 2b3d687c1e Constify the device argument to "pcap_open_live()", as was done for
other pcap-xxx.c files, and constify the argument to and return value
from "split_dname()" as well, to match.
2002-12-28 01:07:10 +00:00
guy 6f70bcdf95 "device" in the "pcap_md" structure is a copy of a string, and needn't
be "const" - not should it be, as that causes compiler whining for calls
that free the copy.
2002-12-28 00:44:04 +00:00
hannes 79c4d5bc62 from Chris Waters chris.waters[AT]networkchemistry.com:
reserve DLT and LINKTYPE for the Tazmen Sniffer
Protocol (TZSP).
2002-12-26 08:53:07 +00:00
guy dc9d85f819 Make "pcap_dump_flush()" return a success-vs-failure indication;
unfortunately, we can't fix "pcap_dump()" and "pcap_dump_close()" to do
that, as any application that tests the return value would fail to work
correctly if linked at runtime with an older libpcap, but we should
perhaps introduce "pcap_dump_ex()" and "pcap_dump_close_ex()" routines
that do return a success-vs-vailure indication.
2002-12-22 23:05:52 +00:00
guy 8cd68a0fa4 From Yoann Vandoorselaere <yoann@prelude-ids.org>: make the "device"
argument to "pcap_open_live()" a "const" pointer.

Constify some additional device name arguments, and update the man page
to reflect some arguments that were already consts.
2002-12-22 02:36:48 +00:00
guy eca5a61ef1 From Andrew Brown <atatat@atatdot.net>: add a "pcap_dump_flush()" call,
to flush the standard I/O buffer for a "pcap_dumper_t" and force all
packets written with "pcap_dump()" to the savefile.
2002-12-21 23:38:51 +00:00
guy 482fa426bc NetBSD support for multiple data link types on an interface, from David
Young <dyoung@ojctech.com>, with some minor changes by Jason R.  Thorpe
<thorpej@netbsd.org>, and further changes by me to support it on BPF
systems lacking BIOCGDLTLIST and other platforms lacking an equivalent
feature.

Update Jason Thorpe's e-mail address (Zembu is going away, if it hasn't
done so already).

Add APIs to map DLT names to DLT values and vice versa.
2002-12-19 09:05:45 +00:00
guy 1e574aa6fd Indicate when "pcap_next()" returns NULL, and that, unfortunately, you
don't know whether that happens because of an error or because no
packets were available at the time.
2002-12-17 07:32:55 +00:00
guy 656dd0eafa Add gencode support for DLT_IEEE802_11_RADIO. 2002-12-12 07:04:17 +00:00
guy cb1f8ef14d Add new DLT_ type for AVS's WLAN header. 2002-12-11 22:43:31 +00:00
hannes bd4881668c add BPF_ filters for misc. IS-IS PDU Types 2002-12-06 00:01:33 +00:00
hannes 531a7bbb14 fixed BPF generation of OSI over {CHDLC and ATM-LLC} frames 2002-12-04 21:40:13 +00:00
guy 215669fbe8 As per Ayamura Kikuchi, on some UNIXes, such as IRIX, "sa_len" is
apparently defined in such a way that you can't use it as a variable
name; use "sa_length" instead.
2002-11-13 06:46:16 +00:00
risso b323d42b7a Added support for raw ARCNET (878.1) under Win32. 2002-11-11 10:34:06 +00:00
risso 8b5f7cc99e There was a bug in pcap_open_offline: in case of error, the returned pointer was freed but the open file was not closed. Thus, a handle on the opened file was kept and could not be released as the returned pointer was null. 2002-10-24 08:09:42 +00:00
guy de4c0d816c From Kazushi Sugyo: address pointers in entries returned by
"getifaddrs()" can be null, so make "SA_LEN()" return 0 if the argument
is null, rather than dereferencing the argument and crashing if it's
null.
2002-10-19 02:25:40 +00:00
guy d1d0fe1d98 Add support for RFC 2625 IP-over-Fibre Channel, mapping all the Linux
ARPHRD_FC* types to it.
2002-10-18 08:46:13 +00:00
guy f8a3b72cd9 Add LINKTYPE_ values and mapping table entries for the new DLT_ values
added for Kent Dahlgren.
2002-10-09 19:02:56 +00:00
hannes bc70a87fce Reserved as per request from Kent Dahlgren <kent@praesum.com> for private use 2002-10-09 13:28:27 +00:00
guy 45ba69f093 Split the README items into "using BPF" and "using DLPI" items; if you
can use BPF, you don't need to have the latest DLPI driver or make sure
it's loaded (and maybe we're finally at the point where you can use
BPF).

Reformat a bit.

Note that the DLPI support has problems with DL_PROMISC_MULTI failing.
2002-10-08 07:27:39 +00:00
guy 6d1a64f8b0 From Jon Lindgren <jonl@yubyub.net>, based on a note from Don Ebright
<Don.Ebright@compuware.com>: ignore EFAULT from a BPF read in AIX.
2002-10-08 07:18:07 +00:00
guy 7a30eb46ce On Solaris, if the "to_ms" argument is zero, we don't do an SBIOCSTIME;
if, as I suspect is the case, that causes no timeout to be set, and if
that's the same as explicitly clearing the timeout with SBIOCCTIME, that
would appear to mean that it'd wait forever for a full chunk's worth of
packets to arrive.
2002-09-18 19:07:57 +00:00
guy 6782a9f4a7 Document that a zero value of the timeout argument to "pcap_open_live()"
can have one of two different behaviors, depending on the OS (it means
"don't return from a read until enough data has arrived" on BSD and
Digital/Tru64 UNIX, and means "return immediately" on Solaris, for
example, at least according to the man pages on Digital/Tru64 UNIX and
Solaris and the code in BSD).
2002-09-18 18:56:57 +00:00
guy ffabca7439 Emphasize that you get only "caplen" bytes of data in the callback from
"pcap_dispatch()" and "pcap_loop()", give more details on the effect of
the "snaplen" argument to "pcap_open_live()", and suggest 65535 as a
value if you want to capture the entire packet.
2002-09-12 19:42:03 +00:00
guy 23bfb470c5 Explain, in more detail, the "netmask" argument to "pcap_compile()"; in
particular, point out that it's only used when checking for IPv4
broadcast addresses, and that if you don't care whether those checks are
done correctly, you can supply 0 if the netmask isn't known or isn't
available.
2002-09-06 21:14:46 +00:00
guy 073fc17a9d Red Hat Linux 7.2 appears to have a <net/raw.h> file, which causes the
configure script to think it's IRIX, so test for
"/usr/include/linux/socket.h" before testing for
"/usr/include/net/raw.h" (which is done before testing for
"/usr/include/sys/dlpi.h"; hopefully no future IRIX release, or future
release of Solaris/HP-UX/AIX/other OS that supports DLPI, will add
"/usr/include/linux/socket.h" as a "helpful" header file for Linux
compatibility).
2002-09-04 20:31:33 +00:00
guy d698d6aed8 From an anonymous Sourceforge user: include <net/if.h> to declare the
IFF_ flags.
2002-08-26 09:50:45 +00:00
guy bf2270da5b From Guillaume Pelat <endymion_@users.sourceforge.net>: properly
null-terminate the interface name when doing an NIOCBIND.
2002-08-25 21:13:52 +00:00
risso ee9e2f0c05 Since the maximum error message size of libpcap is PCAP_ERRBUF_SIZE, this prevents having problems when using printf() to print the buffer, since the buffer will always be zero-terminated. 2002-08-20 15:33:31 +00:00
itojun 36d47557dd correct arg to calloc() - it is (nelem, size), not (size, nelem). from openbsd 2002-08-12 02:38:11 +00:00
guy 2a22d604c4 Make "lane" behave like "vlan", i.e. have it tweak the interpretation
of packet headers so that, in all expressions after it, the tests assume
LANE encapsulation of packets.  (We also assume the emulated LAN is an
Ethernet LAN, rather than a Token Ring LAN.)

Allow ATM tests to be combined with non-ATM tests in expressions, so
that you can do, for example, "lane and icmp".
2002-08-11 18:27:13 +00:00
risso fe62fd54f4 Added a readme that explains how to compile libpcap under win32. 2002-08-09 13:55:12 +00:00
risso 5101a35095 Added the Win32 project files, that allow to compile libpcap and include it in the WinPcap source tree to generate wpcap.dll. 2002-08-09 13:54:19 +00:00
guy 6c3e3a0f27 Redo the code generation for 802.11 MAC address tests to reorder the
tests so that better code is generated.
2002-08-08 11:07:27 +00:00
guy 9c622ec1bf Give it an SCCS and RCS ID.
Put in a comment noting why we don't return an error if
"PacketGetNetInfoEx()" returns an error.
2002-08-08 09:15:57 +00:00
guy 32bfe40547 Token Ring multicasts are handled the same way other 802.x multicasts
are handled, with an I/G bit at the bottom (when handed to the host) of
the first byte of the destination address.
2002-08-08 09:09:58 +00:00
guy 949aa751a1 Add support for operations that test 802.11 SA or DA fields, and for
"wlan" as an alias for "link".
2002-08-08 08:22:45 +00:00
risso 2a4f3047d6 pcap_add_if_win32 added a fake ip address (0.0.0.0) to interfaces without addresses. Now it doesn't add anything to the address list. 2002-08-07 13:21:39 +00:00
guy a08f7e4faa Support the "inbound" and "outbound" qualifiers on Linux cooked
captures.
2002-08-06 07:35:46 +00:00
guy 24481411c8 The Frame Realay and SunATM link-layer types are no longer reserved for
future use, they're being used.
2002-08-06 06:27:49 +00:00
guy f3c313fdbd Fix a typo in a comment. 2002-08-06 06:13:20 +00:00
guy 68634dadde Get rid of probably-unnecessary includes of <net/if.h>. 2002-08-05 07:59:43 +00:00