dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

535 Commits

Author SHA1 Message Date
guy e648c9e593 Add a "close" function pointer to the pcap_t structure, which handles
the platform-dependent part of closing a pcap_t (and the
live-vs-savefile part as well, so that function must close the file
descriptor and free up any buffers allocated).

In the Digital UNIX support, add in a check for a memory allocation
failure.
2003-07-25 03:25:45 +00:00
guy 04177dcda4 Check in Jesper Peterson's README.dag file, unintentionally left out of
the DAG support checkin.

Update FILES and INSTALL.txt.
2003-07-24 08:02:34 +00:00
guy 77cade932c From Jesper Peterson <jesper@endace.com>: support for capturing from
Endace DAG devices.
2003-07-23 05:29:19 +00:00
guy 69c370ff8a As per a suggestion by Alex Medvedev, boost %a to 16000 to let AIX 5.2's
Lex handle scanner.l.
2003-07-03 18:39:10 +00:00
guy 91063479a8 Fix the spelling of Dieter Siegmund's last name. 2003-06-27 07:59:20 +00:00
guy 21fd0c41cb Reserve a DLT_ value for Apple IP-over-IEEE 1394 cooked headers, as per
a request from Dieter Sigmund <dieter@apple.com>.
2003-06-27 07:57:09 +00:00
guy bd2783673c On Win32, get the packet.dll version string using "PacketGetVersion()",
and if it differs from the wpcap.dll version string, report both
versions (just in case somebody happens to have different versions of
wpcap.dll and packet.dll installed).
2003-06-07 10:26:04 +00:00
guy c2176de8a7 Back out the previous change - it reflected an earlier version of the
signature for "pcap_next_ex()".
2003-06-03 21:45:49 +00:00
risso a1851659e1 Avoid a compiler warning (at least) on BSD. 2003-05-26 08:52:42 +00:00
risso 6ca7c69b0b Modified the license at the beginning of the files created by the Politecno di Torino developers from the 4-clause BSD code to the modified BSD license 2003-05-15 14:30:29 +00:00
guy 2e69dd906a The value pointed to by "gen_pf_ifname()"'s argument isn't modified, so
make it a const pointer.

Cast the interface name in the "gen_bcmp()" call in "gen_pf_ifname()" to
squelch a compiler warning.
2003-05-02 08:37:43 +00:00
guy fdbc702c25 We have to include <net/bpf.h> on Digital UNIX to get various ioctls
defined.
2003-05-02 08:35:42 +00:00
hannes 7fcfe91807 allocate a DLT_ and LINKTYPE_ for Juniper-internal chassis encapsulation 2003-04-28 08:20:24 +00:00
guy 27a1815f96 From Shaun Clowes:
It appears that the reason why a read from a BPF device
	sometimes gets EFAULT on AIX might be that the pages into which
	you're reading haven't been ZFODded into existence the first
	time a read is done; "memset()"ting the buffer to all zeroes
	appears to mostly mitigate the problem, so we do that on AIX.

	Fix an error in a "sysconfig()" call.
2003-04-17 06:35:34 +00:00
guy 5e04b48676 From Shaun Clowes: update the to reflect the fact that it should now
create the BPF devices.

Further update to indicate that the configure script doesn't, on AIX,
require the devices to be there.
2003-04-17 06:32:37 +00:00
guy f102bd132c Add documentation for "pcap_next_ex()". 2003-04-10 06:21:00 +00:00
guy 401b04f629 Style cleanups, data type fix (make the "pkt_data" argument to
"pcap_next_ex()" a pointer to pointer to const u_char, to squelch
compiler warnings and to let the caller know that they're not supposed
to modify the data), and additional explanation in "pcap_next_ex()" of
the return-code conflict.
2003-04-10 06:10:37 +00:00
guy e0967f7bbc Add a prototype for "pcap_next_ex()", to squelch compiler complaints,
and to make it available to applications using it.
2003-04-10 06:08:06 +00:00
guy 82b59d865f Add a prototype for "pcap_strcasecmp()", to squelch compiler complaints. 2003-04-10 06:07:08 +00:00
risso 33bca3b31c Removed the _DEBUG definition that was erroneusly set in the release version of the Win32 project. Replaced it with NDEBUG 2003-04-09 10:10:04 +00:00
risso a0ef4ee0df Added a pcap_pkthdr field to the pcap structure. It is needed by pcap_next_ex().
sf_next_packet(), which was used by pcap_read_ex(), is no more exported under Win32.
2003-04-09 10:06:44 +00:00
risso 8103ed43f8 Added the definition of the bpf_hdr structure needed to compile under Win32. This definition was previously in bpf.h. 2003-04-09 10:01:10 +00:00
risso 66ed3857c4 Added the new pcap_next_ex() function and its support routines 2003-04-09 09:58:16 +00:00
risso 5e88d9288b uncommented the static modifier before sf_next_packet() in Win32. It was needed by pcap_read_ex(), which is now replaced by pcap_next_ex() 2003-04-09 09:55:20 +00:00
guy b3833482d0 Don't turn allmulti mode on if "promisc" isn't set; that causes problems
with some interfaces (see bug 599857 in the SourceForge list of libpcap
bugs), and, even if it doesn't cause problems, it's different from
what's done on other platforms.
2003-04-09 07:19:49 +00:00
guy 2edba7705d From Paul Mundt <lethal@linux-sh.org>: add SuperH to the list of CPUs
where we wire in the idea that it can't handle unaligned accesses.  (I
don't know why the test program doesn't work - but perhaps the test
program is the wrong answer anyway, as it doesn't work when
cross-compiling.)
2003-03-28 08:28:26 +00:00
guy 4175af1a53 Add support for "link broadcast" and "link multicast" for RFC 2625
IP-over-FC.

Clean up some error messages.
2003-03-28 08:09:48 +00:00
guy ef67e8fa3f Add support for loopback devices on AIX (under the assumption that they
have a DLT_NULL-style link-layer header).
2003-03-28 08:08:11 +00:00
guy dc0242b509 Note that if this is ever compiled on a SuperH platform where LBL_ALIGN
is not defined by the configure or build procedure, e.g. building for
WinCE SuperH, this probably won't work, as it'll assume unaligned
accesses are OK.
2003-03-22 07:24:49 +00:00
risso dfa68b1635 Fixed some compiler warnings 2003-03-12 13:28:54 +00:00
guy 23d8b7205b Add support for OpenBSD DLT_PFLOG.
Get rid of bogus newline in BPF error string.
2003-03-11 06:23:52 +00:00
guy d5c3be9ab6 FreeBSD also defines DLT_SLIP_BSDOS as 13 and DLT_PPP_BSDOS as 14, so we
define them that way on FreeBSD as well as NetBSD.
2003-03-08 09:21:37 +00:00
guy cb73be0549 Check for OpenBSD and, if we're building on OpenBSD, #define various
DLT_ values to have the same value they have in OpenBSD.
2003-03-08 09:13:39 +00:00
guy 786403c0a7 Add support for OpenBSD DLT_ENC - and map it to a value of 109, as its
value in OpenBSD, 13, is Yet Another DLT_ Value That Other OSes Use For
Their Own Purposes.
2003-03-08 08:42:13 +00:00
guy 78da480204 From clodder@acm.org, via OpenBSD: add checks for memory allocation
failure.
2003-03-08 08:26:31 +00:00
guy 8c2a3a235c From clodder@acm.org, via OpenBSD: add a check for memory allocation
failure.
2003-03-08 08:23:47 +00:00
guy 39c13cd5ee Boost some table sizes even more, as the HP-UX lex requires it. 2003-03-08 05:53:11 +00:00
guy a9c93b1828 From Motonori Shindo: version.h is a generated file, ignore it when
doing CVS operations.
2003-03-01 05:04:40 +00:00
fenner c5419d46c8 Only look up "tcp" and "udp" in pcap_nametoport(). This fixes the
case in e.g. FreeBSD where /etc/services lists port 4 for the ddp "echo"
 service.

Submitted by:	Alan Bawden <Alan@LCS.MIT.EDU>
2003-02-25 22:12:03 +00:00
fenner bb7cf360b1 Don't make the bpf buffer smaller than the default. 2003-02-25 21:58:48 +00:00
guy 164af2f0bf Alas, there are some versions of GNU libc that don't have "SA_LEN()"; at
least for those that also have "getifaddrs()", we have to get the size
by looking at the address family.
2003-02-25 07:50:28 +00:00
guy 463507912d Include "config.h", so that LBL_ALIGN is defined as appropriate, and add
"__arm__" to the list of #defines we check for if LBL_ALIGN isn't
defined, so that on ARM we assume unaligned accesses are unsafe (which
they are, on at least some ARM processors).
2003-02-23 00:22:00 +00:00
guy 0e96f354ca From Andrew Brown: make "pcap.o" depend on "version.h", so that even in
non-".devel" builds, with no automatically-generated dependencies,
"version.h" will be built before we try to build "pcap.o" ("pcap.c"
includes "version.h", so we need it to be built).
2003-02-21 03:19:19 +00:00
guy e592efb3bc According to the bufmod man page for Solaris 2.4 and 9 (meaning it's
probably true in all versions), "sbh_drops" is "the cumulative number of
input messages that this instance of bufmod has dropped due to flow
control or resource exhaustion."

"Cumulative" presumably means "don't add it to the count of drops, as
it's *already* a count since the capture started; just set the count of
drops to the value".  Do so.
2003-02-19 08:06:26 +00:00
guy 4244b90c15 Unfortunately, there is no direction flag for DLT_PPP. 2003-02-14 07:48:25 +00:00
guy 896263cfdc The comment in the rules for "version.h" was getting printed when
"version.h" was getting built; put the comment before the rules.
2003-02-13 07:56:38 +00:00
guy 694746f160 At least on SunOS 5.x, Digital UNIX 4.0, AIX 4.3, FreeBSD 3.4, some
version of Red Hat Linux, HP-UX 11.00, and MacOS X 10.1, if a string in
a shared library is static, and returned by a function in that library,
the return value of that function, when called from a program, will
reflect the contents of the string in the version of the shared library
with which the program is running, not the version with which it's
linked.

Therefore we can just generate a definition of the version string and
put it into "version.h", which means that VERSION can contain any string
(as long as " and \ are escaped with \) rather than having to be N.M or
N.M.MM.
2003-02-13 07:54:59 +00:00
hannes 9378712f13 allocate a bunch of DLT_ and LINKTYPES_ for Juniper-internal chassis encapsulation 2003-02-11 17:03:22 +00:00
guy 2807261207 Don't describe the string returned by "pcap_lib_version()" as a version
number - it has more than just a version number in it (and may have two
version numbers for WinPcap).
2003-02-11 08:03:21 +00:00
guy be8c1efc2c Support dot-dot version numbers.
Generate version.h before generating dependencies.
2003-02-11 08:01:40 +00:00