dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

442 Commits

Author SHA1 Message Date
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
guy 7989614935 Give the file an SCCS and RCS ID. 2002-08-05 07:45:09 +00:00
guy 465f10efe4 Sort the maintainers' names in alphabetical order by the given name, and
add Fulvio Risso and Juergen Schoenwaelder to the list of maintainers, as
they have CVS commit privileges.
2002-08-04 21:10:10 +00:00
guy d30929bf75 Remove directory names. 2002-08-03 22:58:26 +00:00
guy f574e0cca7 Add the include and source files used for building on Win32 to the list
of files in the tarball.
2002-08-03 22:56:34 +00:00
guy 48b3b4cdfb Get rid of an old comment (yes, including <net/if_types.h> is the right
thing to do on AIX to get the IFT_ values, at least on the AIX 4.3.3 or
so that I tried it on), and add some new comments about IBM's tcpdump
forcibly enabling BPF and asking whether AIX uses seconds/nanoseconds or
seconds/microseconds for timeouts.
2002-08-03 20:26:14 +00:00
guy 7c27bf6304 Put in a note about IPv6 addresses on platforms that have only
SIOCGIFLIST to get interface lists.
2002-08-03 20:24:33 +00:00
guy 1b05b89228 The genius who checked in the previous change removed a comma after a
format string.
2002-08-03 20:22:27 +00:00
guy 88ff6e1792 Add Gianluca Varenni to the list of contributors, as he's one of the
WinPcap developers.
2002-08-03 19:54:33 +00:00
risso 8f2da81edf Remove in6addr_any and in6addr_loopback, not needed by libpcap directly, from ip6_misc.h. 2002-08-02 13:59:03 +00:00
risso 13d78b6be1 Sorry, didn't see the patch that brought pcap-stdinc.h to version 1.2. This patch forgot an #endif at the end of the file that prevented compilation under Windows. Everything should be OK now. 2002-08-02 09:35:08 +00:00
risso 816ed4a225 Strangely, the file seems to be truncated after its commit on cvs.tcpdump.org. This update should fix the problem. 2002-08-02 09:07:07 +00:00
guy bf6b573fc3 Include "IP6_misc.h" even on UNIX if __MINGW32__ is defined, as had
been the case before the previous checkin.
2002-08-02 05:53:53 +00:00
guy f66b87464f Put in a comment on an #endif, as the #else has one. 2002-08-02 05:11:13 +00:00
guy 8bdbca52ed Crank the version up to 0.8, as that's what the next release from this
tree will be.
2002-08-02 04:42:51 +00:00
guy 536204d71b Add Loris Digioanni, as he's credited as the main programmer on the
WinPcap credits page.
2002-08-02 04:31:19 +00:00
guy cbac401208 Put the new files for Win32 into the tarball. 2002-08-02 04:27:26 +00:00
guy 309e386870 Use <pcap-stdinc.h> only on Windows; on UNIX, selectively include, in
each source file, only the headers that file needs, and all the headers
it needs in order to compile on various platforms and not to get any
avoidable compiler warnings on those platforms (as well as any
incomplete structure definitions needed to avoid those warnings).

That also means that <pcap.h> doesn't include <pcap-stdinc.h> on UNIX;
we don't want it to include <pcap-stdinc.h>, at least on UNIX, as doing
so

	1) would mean we'd have to install that, so that programs can
	   build with libpcap

and

	2) would mean that programs including <pcap.h> would drag in a
	   bunch of header files that they don't need.

Put a newline at the end of "inet.c" - the Sun C compiler doesn't like
it if the last line doesn't end with a newline.
2002-08-02 03:44:19 +00:00
guy 3073e4c400 Fix up the note on enabling packet capture to refer to "the
packetfilter(4) man page" rather than "man packetfilter(4)".

"end_dev_type" in "struct endevp" is a "u_char"; print it with "%u", not
"%lu".
2002-08-02 03:28:05 +00:00
guy 2f5ea0384c Add prototypes for routines now exported to other parts of libpcap from
"inet.c".
2002-08-02 03:25:32 +00:00
guy 0b2e4fbc02 Get rid of a bogus */ in the middle of a comment. 2002-08-02 03:24:15 +00:00
risso 6831542ec7 Added support for Win32, based on WinPcap. 2002-08-01 08:33:01 +00:00
guy 3d856fe865 Leave it up to the platform-dependent "get interface list" code to
figure out how big the addresses are, as the way that's done is, well,
platform-dependent....
2002-07-30 08:12:13 +00:00
guy 1f419aeb14 It appears that SIOCGIFMTU returns the MTU in the sense of "maximum
amount of payload you can put in a link-layer packet", i.e. "maximum
size of a link-layer packet minus the link-layer header size", rather
than returning the maximum size of a link-layer packet.

The snapshot length is the maximum amount of data to capture from the
entire packet, so it should be clipped at the MTU plus the link-layer
header, not at the MTU.
2002-07-30 07:48:20 +00:00
guy 2dcac1bb6b Put the different implementations of "pcap_findalldevs()" into separate
source files, rather than having a pile of #ifdefs in "inet.c".  Add
code to the configure script to determine which implementation to use on
the platform for which libpcap is being built.

Add a "pcap_findalldevs()" implementation for Solaris 8 and later that
handles IPv6 addresses.
2002-07-27 18:45:34 +00:00
guy 5b8139d3d4 Set the correct member of a YYSTYPE for an IPv6 address - it's returned
as a string, rather than as a binary address.  This removes a warning
from the Sun C compiler, although it probably doesn't change the
generated code (the "e" and "s" members of the union probably have the
same data representation and reside in the same part of the union; if
they didn't, the old code wouldn't have worked).
2002-07-27 18:41:23 +00:00
guy 1d0879987d Make "flags" in a "struct pcap_if" a "bpf_u_int32", as requested by
Fulvio Risso.
2002-07-20 23:50:21 +00:00
guy 721e3db2ed An additional update. 2002-07-16 05:03:34 +00:00
guy ff15c1f4d9 Update and fix up the list of files. 2002-07-16 05:00:00 +00:00
guy 0fa1dfb0b3 Make static the structure to which the test program checking what to use
for "inlines", so that we don't get tripped up by compilers complaining
that we're returning a pointer to an automatic variable.
2002-07-13 09:34:59 +00:00