dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

559 Commits

Author SHA1 Message Date
guy 67ccc964bf If "--with-dag" isn't specified, assume they want it if it's present and
not otherwise; in particular, don't quit with an error if we're on a
platform that doesn't support the DAG software.
2003-10-14 07:46:57 +00:00
guy 7b3d3c4ba0 Describe the return value of "pcap_findalldevs()". 2003-10-10 00:27:45 +00:00
guy 00f79e19a4 From Krzysztof Halasa <khc@pm.waw.pl>:
support Linux Frame Relay ARPHRD_FRAD as Frame Relay with an FR
	header;

	support Linux Frame Relay ARPHRD_DLCI in cooked mode;

	current Linux kernels use the name ARPHRD_CISCO for Cisco HDLC
	(513).
2003-10-06 07:04:55 +00:00
guy b583959753 From Jesper Peterson:
Fix the pcap-dag atexit() handler for non-execing child
	processes.  Previously a fork()/exit() would stop the packet
	capture (doh!).

	Add a couple of optimizations.
2003-10-02 07:07:49 +00:00
guy ec72fd24fe Get rid of an unused variable. 2003-09-25 22:22:25 +00:00
risso 18c85291c8 Avoids a compiler warning in case _WINSOCKAPI_ was already defined (someone defined _WINSOCKAPI_ when including 'windows.h', in order * to prevent it from including 'winsock.h') 2003-09-25 15:59:42 +00:00
risso c9f7277b0d pcap_lookupdev() converts the adapter list to unicode for backward compatibility. 2003-09-22 11:51:37 +00:00
risso 9cc72b7f06 Updated pcap_open_live() since PacketOpenAdapter() now requires an ascii string under WinNTx as well. 2003-09-22 11:48:40 +00:00
risso 9386c7125c add_addr_to_list() now supports the IPv6 addresses returned by WinPcap inside sockaddr_storage structures.
Simplified pcap_findalldevs() since PacketGetAdapterNames() now returns ascii strings under WinNTx as well.
2003-09-22 11:45:58 +00:00
guy bf56c44d21 From Mike Wiacek: have "get_sa_len()" return 0 if the "addr" pointer
passed to it is NULL, as it might be if, for example, the address or the
netmask isn't supplied.
2003-09-10 23:06:43 +00:00
itojun ea2d307af2 sa_len for netmask is undefined. 2003-09-10 22:29:55 +00:00
mcr 4c9ef7e98f renamed rawssw7 to rawss7.h 2003-09-10 19:55:36 +00:00
mcr bf1cc6af29 updates from Jeff 2003-09-10 19:13:34 +00:00
mcr c8573ae67f allocated SS7 links types to raw captures. 2003-09-09 17:10:15 +00:00
guy 4321cb1b08 Packets are *not* written in network byte order; the bytes of the packet
are written in the order in which they're received.  The old comment
saying that they're written in network byte order misled at least one
person.
2003-08-22 18:27:36 +00:00
guy 3e221afd71 Squelch signed vs. unsigned comparison warnings. 2003-08-18 22:16:13 +00:00
guy e7bf9c5777 Squelch signed vs. unsigned comparison warnings. 2003-08-18 22:09:30 +00:00
guy ff1b994eb7 From Jesper Peterson: for HDLC packet-over-SONET DAG captures, don't
assume Cisco HDLC, look at the first frame to see whether it has a
PPP-in-HDLC-like-frameing header, and use DLT_PPP_SERIAL for that and
DLT_CHDLC otherwise.
2003-08-18 22:00:16 +00:00
hannes 4ed4d62d8f bogus generation of PSNP codepoint for CSNP PDUs 2003-07-29 08:53:51 +00:00
guy 0f2fcd859b Updates from Jesper Peterson. 2003-07-25 06:36:23 +00:00
guy cd0d893ef9 Add a "read" function pointer to the pcap_t structure, which handles
reading packets from a pcap_t, and make "pcap_read()" call it.  That
removes the last place where we have to check for a pcap_t that refers
to a DAG card rather than a live capture, so get rid of the "is_dag" flag.
2003-07-25 05:32:02 +00:00
guy 08658f1c93 Add a "set_datalink" function pointer to the pcap_t structure, whichhandles
setting a filter for a pcap_t.  Have "pcap_set_datalink()" call it,
rather than explicitly calling "pcap_set_datalink_platform()".
2003-07-25 05:07:01 +00:00
guy cd2807e08d Add a "setfilter" function pointer to the pcap_t structure, which
handles setting a filter for a pcap_t.  Have "pcap_setfilter()" call it,
rather than being a per-platform function.  The per-platform functions
don't need to check for an offline capture any more, as they're not
called for an offline capture (and the ones that just call
"install_bpf_program()" don't need to exist at all).
2003-07-25 04:42:02 +00:00
guy 9792990eb8 Add a "stats" function pointer to the pcap_t structure, which handles
getting statistics for a pcap_t.  Have "pcap_stats()" call it, rather
than being a per-platform function; have stats routines for non-live
pcap_t's that return an error.
2003-07-25 04:04:56 +00:00
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