aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/libpcap.c
AgeCommit message (Collapse)AuthorFilesLines
2010-06-06Rename wtap_dump_file_write_all() to wtap_dump_file_write(), and haveGuy Harris1-30/+4
everybody use it; the places using the old wtap_dump_file_write() were using it in the same way the old wtap_dump_file_write_all() did. That also lets us get rid of wtap_dump_file_ferror(). Also, have the new wtap_dump_file_write() check for errors from gzwrite() and fwrite() differently - the former returns 0 on error, the latter can return a short write on error. svn path=/trunk/; revision=33113
2010-04-21From Chris Maynard:Guy Harris1-4/+7
Support PPP-over-USB. Don't remove the USB pseudo-header from the packet data for Linux USB packets, just byte-swap it if necessary and have the USB dissector fetch the pseudo-header from the raw packet data. Update USB language ID values. svn path=/trunk/; revision=32534
2010-02-26Move the definitions of all the private data structures out ofGuy Harris1-21/+13
wtap-int.h, and change the unions of pointers to those private data structures into just void *'s. Have the generic wtap close routine free up the private data, rather than the type-specific close routine, just as the wtap_dumper close routine does for its private data. Get rid of close routines that don't do anything any more. svn path=/trunk/; revision=32015
2010-02-24Define the private data structures for some particular capture fileGuy Harris1-23/+49
types in the modules for those capture file types, not in wtap-int.h, so wtap-int.h doesn't have to change when the code to handle that particular capture type changes, or a new capture file type is added. (Ultimately, we should do this for all the private data structures.) svn path=/trunk/; revision=31974
2010-02-23Move the declarations of wtap_pcap_encap_to_wtap_encap() andGuy Harris1-0/+1
wtap_wtap_encap_to_pcap_encap() to wiretap/pcap-encap.h. Include it where it's needed; don't include other Wiretap headers where they're not needed. Include pcapng.h in pcapng.c, to declare the functions defined in pcapng.c. Add some casts to squelch some warnings, and add to a comment to indicate one of the problems. svn path=/trunk/; revision=31960
2010-01-27Fix a comment.Guy Harris1-4/+6
svn path=/trunk/; revision=31693
2009-09-25Treat 13 as if it came from OpenBSD except on BSD/OS, so that if thereGuy Harris1-27/+12
are any BSD/OS users still out there using Wireshark to read RFC 1483 ATM captures from BSD/OS, they can still do so, but all other users get to read OpenBSD DLT_ENC captures, not just users *on* OpenBSD. That also lets us simplify some hacks to deal with a link-layer type of 13 on Nokia IPSO captures. svn path=/trunk/; revision=30159
2009-06-27Fix copy/paste error introduced in rev. 28863.Michael Tüxen1-1/+1
Thanks to Guy for finding and reporting it. svn path=/trunk/; revision=28865
2009-06-27Cleanup. Should be included in Wireshark 1.2.1 and higher to keepMichael Tüxen1-2/+2
merging future bug fixes simple. svn path=/trunk/; revision=28863
2009-06-27This patchMichael Tüxen1-1/+1
* adds an encapsulation argument to pcap_write_phdr. * writes the pseudo header when writing pcapng files. This fixes a bug where you could not write pcapng files when using encapsulations requiring pseudo headers. svn path=/trunk/; revision=28859
2009-06-27This commitMichael Tüxen1-2/+2
* adds an encap argument to pcap_process_pseudo_header. * adds support for reading pseudo headers. It fixes Bug 3560. Thanks to Tyson Key for reporting the bug and providing trace files. This fix will be scheduled for inclusion in Wireshark 1.2.1 and higher. svn path=/trunk/; revision=28857
2009-06-02When doing a seek-and-read, don't check the packet size, as we don'tGuy Harris1-2/+2
have it (we have the size with the pseudo-header length already removed); we've already read the packet, and thus have already checked it. Fixes bug 3501. svn path=/trunk/; revision=28607
2009-04-27Move pseudo-header routines from libpcap.c to pcap-common.c, for useGuy Harris1-1324/+24
with pcap-NG files. svn path=/trunk/; revision=28184
2009-04-27Have the libpcap and pcap-NG code share the LINKTYPE_-to-WTAP_ENCAP_Guy Harris1-587/+1
mapping table - they should be using the same values. Share the mapping routines as well. svn path=/trunk/; revision=28173
2009-04-22Clean up some 64-bit issues.Guy Harris1-15/+15
svn path=/trunk/; revision=28117
2008-12-24Name changes to match libpcap name change of the corresponding DLT_Guy Harris1-5/+5
value. svn path=/trunk/; revision=27113
2008-12-23Handle the new DLT_USB_LINUX_MMAP link-layer type.Guy Harris1-0/+6
svn path=/trunk/; revision=27099
2008-12-22Move wtap_pcap_encap_to_wtap_encap() and wtap_wtap_encap_to_pcap_encap()Guy Harris1-1/+585
back to libwiretap for now, as it's inherently tied to reading libpcap files; at some point we might want to have pcap-reading (and pcap-ng-reading?) code in a separate library, for use by, for example, dumpcap (and rawshark?). svn path=/trunk/; revision=27076
2008-11-13For libpcap captures with the DLT DLT_BLUETOOTH_HCI_H4, make sure weGerald Combs1-4/+14
initialize the P2P direction. This keeps Valgrind from complaining. svn path=/trunk/; revision=26765
2008-09-29From Francesco Fusco:Anders Broman1-7/+64
Endace ERFII (extension header) support. svn path=/trunk/; revision=26287
2008-09-19Move wtap_pcap_encap_to_wtap_encap and wtap_wtap_encap_to_pcap_encap toGerald Combs1-583/+2
libwsutil. svn path=/trunk/; revision=26233
2008-08-12From Alexey Neyman:Anders Broman1-18/+116
Implement dissector for IPMB (DLT_IPMB_LINUX, 209). svn path=/trunk/; revision=25986
2008-05-30Fix references to tcpdump-workers@tcpdump.org to refer to the newGuy Harris1-7/+7
address, tcpdump-workers@lists.tcpdump.org. svn path=/trunk/; revision=25396
2008-04-23From Hannes Kälber:Anders Broman1-0/+4
new WTAP_ENCAP files(X2E Xoraya serial frame and X2E Xoraya frame ) http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2418 svn path=/trunk/; revision=25154
2008-03-14From Hannes Kalber:Gerald Combs1-0/+8
This patch adds some new ENCAP and FILE types for wiretap. It also adds new entries to pcap_to_wtap_map[] to provide a mapping of the new types to some pcap DLTs. svn path=/trunk/; revision=24622
2008-03-05From Owen Kirby :Anders Broman1-0/+2
IEEE 802.15.4 dissector and DLT_ type. svn path=/trunk/; revision=24564
2008-02-25Add support for DLT_IPMB (199). The dissector for these packets is in ↵Jeff Morriss1-0/+1
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1970 (pending review) svn path=/trunk/; revision=24463
2008-01-17Add support for DLT_SCCP (SCCP without MTP2, MTP3, or any pseudo-header).Jeff Morriss1-0/+1
svn path=/trunk/; revision=24119
2007-12-16From Fulko Hew:Stig Bjørlykke1-0/+103
1/ patches to support the libpcap/SITA format 'WTAP_ENCAP_SITA'. 2/ patches to the LAPB dissector to accept MLP (Multi-link protocol) (although MLP dissection has _not_ been added (yet)). 3/ New protocol dissectors for: a) SITA's WAN layer 0 status header, b) An airline protocol ALC, c) An airline (and other industry) protocol UTS. These patches are submitted as a set since the new protocol dissectors are not useful without the libpcap/SITA related changes, and there is no point in having those changes without the additional dissectors. This fixes bug/enhancement 2016. svn path=/trunk/; revision=23885
2007-12-16From Marton Nemeth:Stig Bjørlykke1-1/+1
Error message when capturing too short WTAP_ENCAP_USB_LINUX type packets contains a copy-paste typo. From me: Fix some addresses in AUTHORS. svn path=/trunk/; revision=23882
2007-12-08Get rid of wtap_process_pcap_packet(); it's no longer used. Get rid ofGuy Harris1-211/+0
no-longer-needed wiretap/wtap-capture.h. Clean up wiretap/libwiretap.vcproj (note: this isn't going to scale, if it has to contain a list of all the files, as most committers will be editing only Makefile.common files). svn path=/trunk/; revision=23803
2007-12-07HAVE_PCAP_H is no longer defined; just use HAVE_LIBPCAP.Guy Harris1-4/+4
Fix indentation. svn path=/trunk/; revision=23798
2007-11-30first steps to support MSVC 2008 Express EditionUlf Lamping1-4/+4
svn path=/trunk/; revision=23691
2007-10-28Bug 1751: From Allan M. Madsen : Sake Blok1-0/+2
When trying to open a pcap file with the new pseudo-header/DLT (using SVN version, changelist 23283) I get the error message: "libpcap: ERF file has a 13-byte packet, too small to have even an ERF pseudo-header". After reviewing Paolo's patch I found that there are 2 places with missing breaks in switch case structures. svn path=/trunk/; revision=23298
2007-10-16From Paolo Abeni via bug 1751:Jeff Morriss1-16/+88
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1751 The patch adds support to wiretap for a new libpcap DLT for bluetooth captures. This DLT carries the direction information, which now can be displayed correctly. The hci H4 dissector is updated to handle also the newly introduced wtap encap. svn path=/trunk/; revision=23208
2007-10-08From Florent DROUIN:Anders Broman1-9/+302
This is a replacement of the existing decoding of ERF files (Extensible Record Format from Endace). For the decoding of the ERF files, according to the "type of record" given in the ERF header, several decoders can be used. Up to now, the decoder is determined according to an environment variable, or with a kind of heuristic. And, all the treatment is done during the file extraction. The new architecture, will separate the ERF file decoding, and the ERF record decoding. The ERF records will be decoded with a specific dissector. This dissector can be configured with options, to replace the environment variable. http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1839 svn path=/trunk/; revision=23092
2007-09-11From Pieter de Boer:Jaap Keuter1-0/+1
tshark can read a HP-UX nettl IP packet dump (written with 'nettl -traceon all -entity ns_ls_ip -file dump'), but cannot convert it to a pcap raw IP packet dump, with 'tshark -r dump.nettl -w dump.pcap'. A single-line patch to wiretap/libpcap.c makes it possible to do this. The input file uses encapsulation type WTAP_ENCAP_NETTL_RAW_IP. svn path=/trunk/; revision=22849
2007-06-13Add support for PPI (the Per-Packet Information header), described atGerald Combs1-1/+3
http://www.cacetech.com/documents/PPI_Header_format_1.0.pdf . svn path=/trunk/; revision=22094
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