dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

103 Commits

Author SHA1 Message Date
hannes 9ab067e012 allocate 4 new DLTs on behalf of Juniper Networks, Inc. for
prepending meta-information like interface index, interface name
before a standard Ethernet, PPP, Frame Relay, C-HDLC Frame
2005-08-12 19:23:30 +00:00
guy 75b14d240d OK, we'll be putting out 0.9.2 soon, so add the API changes back in
again.
2005-07-07 01:57:00 +00:00
guy 5e92dec088 0.9's already been released, so, for better or worse, we're stuck with
the old names.
2005-07-05 22:31:57 +00:00
guy 727beef298 Rename "direction_t" to "pcap_direction_t", and rename "D_IN" and
"D_OUT" to "PCAP_D_IN" and "PCAP_D_OUT", to avoid potential namespace
collisions, as per a suggestion by Dean Gaudet.
2005-07-05 22:12:17 +00:00
guy 98bddc1384 Add a "pcap_dump_ftell()" routine, to fetch the current offset of a
pcap_dumper_t.  (Just doing an "ftell()" on the result of
"pcap_dump_file()" won't necessarily work on Windows, as Microsoft, in
their infinite wisdom, have multiple different versions of the C library
runtime, and if a DLL is built using one version, and another DLL or an
executable is built with another version, file descriptors and FILE *'s
opened in one of them cannot be used in the other.)
2005-06-03 20:36:19 +00:00
guy 9c2ab752b2 Give a more correct error if you try to set the direction when reading
from a savefile.
2005-05-23 20:30:44 +00:00
risso 520160b903 Renamed fileno to _fileno under MSVC, to avoid a compiler warning. 2005-05-04 19:40:15 +00:00
guy 37bd0411b4 Get rid of a redundant test (if we're in that branch of code, we've set
fp to stdin, so we know it's equal to stdin), and update a comment.
2005-05-01 19:57:31 +00:00
guy 9942a5dd4a Clean up white space. 2005-05-01 19:53:11 +00:00
guy 8561645aa2 Add the SS7 encapsulations to pcap-bpf.h, replacing the unused "raw SS7"
encapsulation with an "MTP2 plus pseudo-header" encapsulation.  Get rid
of "rawss7.h", as the LINKTYPE_RAWSS7 it's mainly dedicated to explain
was never implemented.  Update savefile.c for the changes.
2005-05-01 19:46:27 +00:00
risso 8c2c2e8bdb Fixed the definition of SET_BINMODE(): the correct flag under VC6 is
_O_BINARY (which is accepted by Cygwin, as well).

Moved SET_BINMODE while reading from stdin *before* reading the savefile
header.
2005-04-26 00:54:23 +00:00
guy 9d7ed6809f As per Daniele Orlandi's request, use DLT_LINUX_LAPD rather than
DLT_LAPD (it includes more than just the LAPD header).
2005-04-09 21:15:13 +00:00
guy be07cb1988 At the request of Daniele Orlandi, add DLT_LAPD and LINKTYPE_LAPD for
raw LAPD.
2005-04-07 20:42:45 +00:00
guy 8804809bf5 Add DLT_ values requested by Gregor Maier <gregor@endace.com> of Endace
Measurement Systems.
2005-02-08 20:03:15 +00:00
guy c1401d4725 The DLT_LINUX_PPP_WITHDIRECTION is also used for pppd on some BSDs, so
rename it again to DLT_PPP_PPPD, and rename other #defines to match.

Add backwards-compatibility #defines of DLT_PPP_WITH_DIRECTION and
DLT_LINUX_PPP_WITHDIRECTION for software that used them.
2005-02-08 19:52:18 +00:00
guy d9e0597103 Rename DLT_PPP_WITHDIRECTION to DLT_LINUX_PPP_WITHDIRECTION, as it's a
Linux-specific mechanism, and rename other #defines accordingly.  Give
more details about it in comments.
2005-01-31 01:47:27 +00:00
hannes f718fd1835 add support for Juniper PIC Peer DLT_ 2005-01-12 09:15:05 +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 f8a76d1d76 From Gisle Vanem: MS-DOS support. 2004-12-18 08:52:08 +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 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 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 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 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
hannes 00384d8605 allocate DLT_ and LINKTYPE_ 167,168 for Juniper Networks, Inc. 2004-10-20 14:28:49 +00:00
guy e49ca1f08b If we get an error trying to open a capture file, don't close the
capture file if the standard I/O stream is stdin (i.e., if the file name
was "-").  Thanks to Joshua Blanton <jblanton@masaka.cs.ohiou.edu> for
catching this one.
2004-09-28 01:09:52 +00:00
hannes 4017783b36 add support for another PPP variant as per request from Karsten Keil <kkeil@suse.de>
the first byte (0xff) of the PPP header (0xff03) is tweaked to accomodate
the direction 0x00 = IN, 0x01 = OUT

the DLT_ supports the libpcap tokens "inbound" and "outbound"
2004-08-18 14:25:01 +00:00
guy 3f7430de17 Add in another magic number, reserved for Francisco Mesquita
<francisco.mesquita@radiomovel.pt>.

Rename the Kuznetzov magic to note what it is, and add and expand some
comments.
2004-08-17 17:50:33 +00:00
guy 93306079a3 Add a DLT_ value and LINKTYPE_ value for BACnet MS/TP.
Clean up some white space.
2004-06-07 20:00:08 +00:00
guy 2d2890dd37 Add support for sending packets; includes contributions from Mark
Pizzolato <List-tcpdump-workers@subscriptions.pizzolato.net>.
2004-03-23 19:18:04 +00:00
risso fe6b7f8e33 Avoid a null pointer access in pcap_dump_open if fname is a read only file 2004-03-16 19:27:55 +00:00
guy 2f74e436ab Put the LINKTYPE_ values in numerical order, to make it easier to make
sure that all values from 100 to the current maximum value are in use;
put in comments to indicate for what purpose the reserved ones are
reserved.

Note in the "don't just grab a value and use it yourself" comment why
you shouldn't use values below 100 or above the maximum value you see in
the file.
2004-03-11 23:40:54 +00:00
guy 9876992f2c Add support for 99 as a linktype in a capture file. 2004-03-11 19:56:45 +00:00
hannes 673ea44790 assign DLT_ and LINKTYPE_ 164 to Juniper Networks Inc. 2004-02-11 22:06:58 +00:00
guy 7ac8a0a75b DLT_IEEE802_11_RADIO is used for the BSD radio header; add a new
DLT_IEEE802_11_RADIO_AVS for future use with the AVS radio header.

Fix a comment.

Put in reserved LINKTYPE_USERn values corresponding to the reserved
DLT_USERn values.
2004-01-29 10:36:43 +00:00
guy 175b9d75e8 "selectable_fd" doesn't make sense on Windows. 2003-12-21 21:58:50 +00:00
guy 808a1fd8e1 Reserve two DLT_ values for IBM's use. 2003-12-03 21:34:21 +00:00
guy c98ffbcabf Add a "pcap_get_selectable_fd()" API to get an FD on which you can do a
"select()" or "poll()" - or -1 if that won't work.
2003-11-21 10:19:33 +00:00
guy 2c618b93a0 Add "getnonblock" and "setnonblock" operations, and set the function
pointers appropriately, rather than using #ifdefs and run-time checks.

Get rid of declaration of non-existent "pcap_set_datalink_platform()"
routine.
2003-11-20 02:02:38 +00:00
guy a08248f680 From Jean Tourrilhes <jean2@sourceforge.net>: IrDA capture support for
Linux.
2003-11-18 21:06:50 +00:00
guy 0eac66d65e Add a "pcap_dump_file()" API to get the "FILE *" corresponding to a
"pcap_dumper_t".
2003-11-16 10:07:35 +00:00
guy 30e89f192a Add _U_ to "rcsid[]" definitions, to eliminate "unused variable"
warnings from newer versions of GCC.
2003-11-15 23:23:57 +00:00
guy 84217ae06c Add a DLT_ value for DOCSIS frames.
Note in "pcap-bpf.h" that DLT_ values 139 through 142 are reserved for
SS7.
2003-11-13 01:35:47 +00:00
guy 991d444f71 Add a "pcap_breakloop()" API to break out of the loop in
"pcap_dispatch()" and "pcap_loop()".
2003-11-04 07:05:32 +00:00
guy 4246a40e00 From a Debian patch by Eric Anderson <anderse@hpl.hp.com>, give more
detail if we get a premature EOF when reading packet data.

Also, do the same check when reading the packet *header*, and check for
I/O errors as well.
2003-11-04 01:49:07 +00:00
guy f580b78bae Handle DG/UX's wacky tcpdump format (major version 543, minor version 0,
caplen and len fields in the pre-2.3 order).

Move the version number checking to the open-file code; store a
tri-state (definitely swapped, definitely not swapped, maybe swapped)
value in the savefile information and use that when processing packets.
2003-10-24 23:55:06 +00:00