aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/libpcap.c
AgeCommit message (Collapse)AuthorFilesLines
2007-05-28Throw in some casts to suppress warnings.Guy Harris1-1/+1
svn path=/trunk/; revision=21971
2007-05-28Change the Wiretap code so that it doesn't dereferenceGuy Harris1-142/+146
possibly-unaligned pointers, and turn on -Wcast-align so at least some future code that does that will fail to compile. svn path=/trunk/; revision=21968
2007-04-14Beginnings of a Cisco ERSPAN dissector - the only thing missing is the codeJörg Mayer1-1/+5
to actually call this (aka to handle the ambiguities of DLT values). svn path=/trunk/; revision=21427
2007-03-21set compiler option "treat warnings as errors" - to prevent new warnings for ↵Ulf Lamping1-1/+1
wiretap remove all compiler warnings: a) prevent wrong malloc/free definitions by lex/yacc generated files b) add int/time_t casts - MSVC2005 is more "sensitive" about this than MSVC6 svn path=/trunk/; revision=21078
2007-01-30From Paolo Abeni: update to support the new DLT_USB_LINUX format header.Guy Harris1-19/+154
Modified to support the header as a pseudo_header rather than as part of the packet data. Fixed some calls that fetch data from the USB packet to fetch it in little-endian byte order. Got rid of redundant code to get conversation-specific data (the get_usb_conv_info() call already does that). For control packets, only parse the setup information if setup_flag is 0. Don't interpret a control packet as a standard request unless the setup type is "Standard". svn path=/trunk/; revision=20632
2007-01-08We support nanosecond resolution in Wiretap; use that with AIX libpcapGuy Harris1-6/+3
files. svn path=/trunk/; revision=20338
2006-11-27Map a DLT_ value of 188 to WTAP_ENCAP_IEEE802_16_MAC_CPS, and clarifyGuy Harris1-2/+3
what a DLT_ value of 187 is. svn path=/trunk/; revision=20004
2006-11-12Add a plain "radiotap.channel" field to the radiotap dissector.Gerald Combs1-4/+7
Check for an invalid channel frequency. Pass the channel, data rate, and quality to the 802.11 dissector, so that they show up there as well. Clean up whitespace. svn path=/trunk/; revision=19878
2006-11-05change all file offsets from long to gint64 so we can - theoretically - ↵Ulf Lamping1-4/+4
handle files > 2GB correct. Please distclean Win32 builds! svn path=/trunk/; revision=19814
2006-10-13Paolo Abeni:Jörg Mayer1-0/+2
the attached patch add support for the recently introduced pcap bluetooth data link type. Yes, pcap is going to support also bluetooth devices (at least on Linux) :-) svn path=/trunk/; revision=19513
2006-10-10From Paolo AbeniRonnie Sahlberg1-0/+2
USB dissector svn path=/trunk/; revision=19480
2006-08-17From Hannes Gredler:Anders Broman1-1/+3
A patch that adds support for dissection of libpcap DLT_JUNIPER_VP frames. In addition i have fixed also the indent for DLT_JUNIPER_GGSN. svn path=/trunk/; revision=18940
2006-05-28Ethareal->WiresharkAnders Broman1-8/+8
svn path=/trunk/; revision=18230
2006-05-22ethereal->wireshark updatesRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18206
2006-03-02From Daniele Orlandi:Anders Broman1-0/+132
The attached patch adds support for LAPD frames captured using vISDN thru libpcap. The support has already been included in libpcap. The patch adds a new wiretap encapsulation, the necessary glue to decode SLL-encapsulated frames, and some minor change in the LAPD dissector in order to support the remote-to-remote frames captured on the ISDN E-Channel. Please apply ethereal-encap-table.diff before, as it fixes a misalignment in the encapsulation names table. svn path=/trunk/; revision=17450
2005-12-19Add support for Juniper GGSN generated pcap files.Luis Ontanon1-0/+1
svn path=/trunk/; revision=16857
2005-09-20From Hannes Gredler:Anders Broman1-0/+10
patch to support 4 additional juniper DLTs. all those are wrappers for exisiting media types augmented with meta-information which gets also displayed using this patch; svn path=/trunk/; revision=15908
2005-09-14added compression support for capture file output. The Save/As dialog now ↵Ulf Lamping1-21/+21
has a checkbox "Compress with gzip" currently limited to Ethereal and all the variants of libpcap filetypes only. We might want to add output compression support to the other tools as well (tethereal, mergecap, ...). We might also want to add support for the other filetypes, but this is only possible if the filetype functions doesn't use special output operations like fseek. One bug is still left: if the input and output filetypes while saving are the same, Ethereal currently optimizes this by simply copy the binary file instead of using wiretap (so it will be faster but it will ignore the compress setting). Don't know a good workaround for this, as I don't know a way to find out if the input file is currently compressed or not. One idea might be to use a heuristic on the filesize (compared to the packet size summmary). Another workaround I see is to remove this optimization, which is of course not the way I like to do it ... svn path=/trunk/; revision=15804
2005-08-30Add support for slightly modified libpcap file format with nanosecond ↵Ulf Lamping1-3/+41
resolution (currently supported by Ethereal only). Support for both read and write was added. The file format stays the same as the common libpcap format, only the lower part of the timestamp field uses nanoseconds instead of microseconds. This file format uses the libpcap magic number 0xa1b23c4d. svn path=/trunk/; revision=15623
2005-08-25timestamp display precision:Ulf Lamping1-3/+4
- automatic adjustment depending on file format - manual adjustment through menu items save the setting in the recent file svn path=/trunk/; revision=15534
2005-08-24EVERYTHING IN THE BUILDBOT IS GOING TO BE RED!!! Sorry! Ulf Lamping1-6/+10
I've done more than a day to change the timestamp resolution from microseconds to nanoseconds. As I really don't want to loose those changes, I'm going to check in the changes I've done so far. Hopefully someone else will give me a helping hand with the things left ... What's done: I've changed the timestamp resolution from usec to nsec in almost any place in the sources. I've changed parts of the implementation in nstime.s/.h and a lot of places elsewhere. As I don't understand the editcap source (well, I'm maybe just too tired right now), hopefully someone else might be able to fix this soon. Doing all those changes, we get native nanosecond timestamp resolution in Ethereal. After fixing all the remaining issues, I'll take a look how to display this in a convenient way... As I've also changed the wiretap timestamp resolution from usec to nsec we might want to change the wiretap version number... svn path=/trunk/; revision=15520
2005-08-12From Hannes GredlerAnders Broman1-1/+2
- add support for Multi-Link Frame-Relay (FRF.15) captures taken on Juniper ML-, LS-, AS- PICs. - rework of the common juniper header dissector: test the extension flag (0x80) which indicates that there are meta-information like interface-index, interface-name etc. present - minor bugfix (LSQ L3-proto masks, direction masks were broken) svn path=/trunk/; revision=15316
2005-07-22From Hannes Gredler:Anders Broman1-2/+2
support for support for DLT_JUNIPER_MLPPP svn path=/trunk/; revision=14994
2005-06-04Fix some more leaks in error returns from open routines (if the open canGuy Harris1-0/+1
fail after the private data is allocated, you have to free the private data). The file header in nettl files is 128 bytes - use a #define for it, and also a #define for the magic number size. svn path=/trunk/; revision=14553
2005-05-13Add WTAP_GCOM_TIE1 and WTAP_GCOM_SERIAL forGilbert Ramirez1-0/+4
Oolan Zimmer <ethereal@gcom.com> svn path=/trunk/; revision=14362
2005-05-11From Hannes GredlerRonnie Sahlberg1-2/+7
support for Juniper PPPOE encapsulation svn path=/trunk/; revision=14346
2005-05-02- Add support for libpcap files for MTP2 with a per packet headerMichael Tüxen1-2/+112
indicating the direction, narrowband/broadband, and interface number. - Add support to display the direction and interface number. - Add support to packet-mtp2.c to use the broadband/narrowband indication. svn path=/trunk/; revision=14265
2005-04-01From Mark C Brown NETTL updatesRonnie Sahlberg1-0/+10
svn path=/trunk/; revision=13999
2005-01-31From Florian Lohoff: Redback SmartEdge SE400/800 tcpdump disassembly.Guy Harris1-0/+2
svn path=/trunk/; revision=13212
2005-01-20From Hannes Gredler: support for Juniper's DLT_JUNIPER_ATM{1,2} values.Guy Harris1-2/+4
svn path=/trunk/; revision=13130
2004-12-09Note that the link-layer types 170 and 171 are reserved (GFP-T is a bitGuy Harris1-0/+5
ugly, as it encapsulates, for example, the 8B/10B code for gigabit Ethernet and Fibre Channel, so code to read it might have to decode that; GPF-F isn't so bad). svn path=/trunk/; revision=12700
2004-12-07Add an entry for the new DLT_GPRS_LLC (so that nobody working onGuy Harris1-0/+12
Ethereal, unaware that the Ethereal team does *NOT* control libpcap format, thinks they can just grab 169 and use it for their own purposes). svn path=/trunk/; revision=12678
2004-10-29As Sam Leffler notes, the radiotap header isn't BSD-only, it's also usedGuy Harris1-3/+3
by his madwifi Atheros driver on Linux; rename WTAP_ENCAP_IEEE_802_11_WLAN_BSD to WTAP_ENCAP_IEEE_802_11_WLAN_RADIOTAP, and change its text name from "ieee-802-11-bsd" to "ieee-802-11-radiotap". svn path=/trunk/; revision=12429
2004-07-18Set the svn:eol-style property on all text files to "native", so thatGuy Harris1-1/+1
they have LF at the end of the line on UN*X and CR/LF on Windows; hopefully this means that if a CR/LF version is checked in on Windows, the CRs will be stripped so that they show up only when checked out on Windows, not on UN*X. svn path=/trunk/; revision=11400
2004-06-07Add an encapsulation type for BACnet MS/TP, and map the newly-assignedGuy Harris1-1/+3
libpcap DLT_ value for BACnet MS/TP to it. svn path=/trunk/; revision=11126
2004-03-23Add support for DLT_APPLE_IP_OVER_IEEE_1394.Guy Harris1-3/+6
svn path=/trunk/; revision=10446
2004-03-19In the read routine, set the 802.11 pseudo-header forGuy Harris1-1/+16
WTAP_ENCAP_PRISM_HEADER, WTAP_ENCAP_IEEE_802_11_WLAN_BSD, and WTAP_ENCAP_IEEE_802_11_WLAN_AVS. In the seek_read routine, set it for all 802.11 types. svn path=/trunk/; revision=10404
2004-03-11Add support for DLT_ value 99, as used by the Axent RaptorGuy Harris1-1/+9
firewall/Symantec Enterprise Firewall. Thanks, Axent/Symantec, for not asking us for a DLT_ value and not telling us about the link-layer type. svn path=/trunk/; revision=10361
2004-03-03Have "wtap_read()" set "wth->phdr.pkt_encap" to "wth->file_encap",Guy Harris1-2/+1
rather than requiring individual capture file type handlers to do it (unless they're doing per-packet encapsulation, in which case we check to make sure they didn't *leave* it as WTAP_ENCAP_PER_PACKET). svn path=/trunk/; revision=10290
2004-02-19A DLT_ value of 13, in a Nokia-format capture, appears to be an ATMGuy Harris1-51/+193
capture of some sort. svn path=/trunk/; revision=10109
2004-02-12Note that 164 is reserved for Juniper chassis-internal meta-informationGuy Harris1-2/+7
(DLT_JUNIPER_MONITOR/LINKTYPE_JUNIPER_MONITOR). Fix a typo. svn path=/trunk/; revision=10046
2004-02-11Map WTAP_ENCAP_IEEE_802_11_WITH_RADIO to DLT_IEEE802_11, for now; weGuy Harris1-4/+29
could probably map it to one of the many different 802.11+radio headers, but we should probably just have *one* Wiretap encapsulation for 802.11, with a radiotap-style list of attributes attached to it. svn path=/trunk/; revision=10041
2004-02-06Sort the link-layer type values a little better.Guy Harris1-4/+2
svn path=/trunk/; revision=9987
2004-01-29The DLT_ value 127 is being used for the BSD radio header, and theGuy Harris1-2/+4
current CVS libpcap uses 163 for the AVS radio header (127 was never used for the AVS radio header). Redo the Wiretap encapsulation values for that (and shuffle them to put the 802.11 Wiretap values together). svn path=/trunk/; revision=9904
2004-01-28From Tomas Kukosa: reserve private WTAP_ENCAP values and map them toGuy Harris1-1/+19
reserved private DLT_ values. svn path=/trunk/; revision=9892
2004-01-27Supply a pseudo-header for all 802.11 packets; add an "fcs_len" field toGuy Harris1-1/+10
it, similar to the Ethernet pseudo-header's "fcs_len" field, and use it in the 802.11 dissector. svn path=/trunk/; revision=9884
2004-01-25Have the Wiretap open, read, and seek-and-read routines return, inGuy Harris1-40/+44
addition to an error code, an error info string, for WTAP_ERR_UNSUPPORTED, WTAP_ERR_UNSUPPORTED_ENCAP, and WTAP_ERR_BAD_RECORD errors. Replace the error messages logged with "g_message()" for those errors with g_strdup()ed or g_strdup_printf()ed strings returned as the error info string, and change the callers of those routines to, for those errors, put the info string into the printed message or alert box for the error. Add messages for cases where those errors were returned without printing an additional message. Nobody uses the error code from "cf_read()" - "cf_read()" puts up the alert box itself for failures; get rid of the error code, so it just returns a success/failure indication. Rename "file_read_error_message()" to "cf_read_error_message()", as it handles read errors from Wiretap, and have it take an error info string as an argument. (That handles a lot of the work of putting the info string into the error message.) Make some variables in "ascend-grammar.y" static. Check the return value of "erf_read_header()" in "erf_seek_read()". Get rid of an unused #define in "i4btrace.c". svn path=/trunk/; revision=9852
2004-01-24Fix all fixable warningsJörg Mayer1-2/+2
Move addional warnings from extra-gcc-checks to normal compilation flags svn path=/trunk/; revision=9826
2004-01-05 removed some MSVC warnings (level 3)Ulf Lamping1-2/+2
svn path=/trunk/; revision=9558
2003-12-21removed some MSVC warnings (moved pcap.h before glib.h)Ulf Lamping1-2/+5
svn path=/trunk/; revision=9393