aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
AgeCommit message (Collapse)AuthorFilesLines
2012-08-21Avoid some calls to strlen() by remembering return value frommartinm1-10/+11
g_strlcpy(). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@44608 f5534014-38df-0310-8fa8-9805f1628bb7
2012-08-11Ignore '\r' which will be found at the end of a line when a windows hostmartinm1-27/+32
writes a log. Also re-line-up args under function definitions. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@44444 f5534014-38df-0310-8fa8-9805f1628bb7
2012-08-06Create (fake)interface information when loading a libpcap file it might be ↵etxrab1-1/+27
needed when wrinting the file if the format is converted to pcapng. Should we do this for other file formats as well? A pcapng file with per packet encapsulation will need an IDB per encapsulation as the EPB does not have a linktype indicator only a interface index. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@44281 f5534014-38df-0310-8fa8-9805f1628bb7
2012-08-02From Richard Stearn: support for AX.25, including support forguy3-0/+5
LINKTYPE_AX25. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@44211 f5534014-38df-0310-8fa8-9805f1628bb7
2012-08-02From Richard Stearn: AX.25 KISS protocol support.guy3-1/+7
Part 1 of the fix for bug 7529. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@44202 f5534014-38df-0310-8fa8-9805f1628bb7
2012-07-30Avoid a division by zero due to overflow.tuexen1-2/+2
This should fix the crash in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7266 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@44141 f5534014-38df-0310-8fa8-9805f1628bb7
2012-07-30Added missing entry for WTAP_ENCAP_SDH.stig1-0/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@44138 f5534014-38df-0310-8fa8-9805f1628bb7
2012-07-27Some more debug info.tuexen1-0/+5
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@44076 f5534014-38df-0310-8fa8-9805f1628bb7
2012-07-27It seems that the length should unsigned, not signed.tuexen1-1/+1
This fixes part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7533 which deals with Crash in vwr.c while reading the capture file. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@44075 f5534014-38df-0310-8fa8-9805f1628bb7
2012-07-27Handle the case where no IDB follows the SHB. This fixes part oftuexen1-34/+30
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7533 which deals with Div by 0 crash in pcapng_read_packet_block(). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@44074 f5534014-38df-0310-8fa8-9805f1628bb7
2012-07-26Fix another uninitialised bug (the same bug in _read() I fixedmartinm1-1/+1
yesterday, also in _seek_read()). Spotted by running 'valgrind-wireshark.sh -2'. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@44043 f5534014-38df-0310-8fa8-9805f1628bb7
2012-07-25Initialize a byte to avoid more valgrind warnings.martinm1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@44019 f5534014-38df-0310-8fa8-9805f1628bb7
2012-07-25Don't write one payload byte too many. Spotted by valgrind!martinm1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@44016 f5534014-38df-0310-8fa8-9805f1628bb7
2012-07-20Add a routine that, given a set of packet encapsulation types, returnsguy3-13/+39
the per-file encapsulation type needed to write out a set of packets with all those encapsulation types. If there's only one such encapsulation type, that's the type, otherwise WTAP_ENCAP_PER_PACKET is needed. Use that in wtap_dump_can_write_encaps(). Also use it in cf_save_packets() and cf_export_specified_packets(), so that we can write out files with WTAP_ENCAP_PER_PACKET as the file encapsulation type and only one actual per-packet encapsulation type in some cases where that failed before. This fixes the case that showed up in bug 7505, although there are other cases where we *could* write out a capture in a given file format but won't be able to do so; fixing those will take more work. #BACKPORT (Note: this adds a routine to libwiretap, so, when backported, the *minor* version of the library should be increased. Code that worked with the version of the library prior to this change will continue to work, so there's no need to change the *major* version of the library.) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@43847 f5534014-38df-0310-8fa8-9805f1628bb7
2012-07-19Addresses https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3895. Note ↵mmann3-1/+57
that this doesn't write a Nokia file type properly, it just doesn't corrupt an existing one (read in by Wireshark) if resaved. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@43815 f5534014-38df-0310-8fa8-9805f1628bb7
2012-07-18Set the 802.11 "already decrypted" flag to FALSE for file formats otherguy6-0/+9
than Network Instruments Observer files, as we don't know whether they are already decrypted. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@43796 f5534014-38df-0310-8fa8-9805f1628bb7
2012-07-18Add to the 802.11 pseudo-header a "this is already decrypted" flag, setguy2-22/+11
it as appropriate in the code to read Network Instruments Observer captures (rather than tweaking the "protected" flag in the packet data), and use that flag in the 802.11 dissector. Fix indentation while we're at it (tabs are not *ipso facto* 4 spaces). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@43795 f5534014-38df-0310-8fa8-9805f1628bb7
2012-07-15From Network Instruments by Tom Brezinski When a Network Instruments ↵etxrab2-8/+30
wireless capture is decrypted a flag is set on the packet in the BFR file indicating that the packet is decrypted instead of modifying the protected flag in the frame control flags of the packet header. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7478 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@43727 f5534014-38df-0310-8fa8-9805f1628bb7
2012-07-11memcpy() is quite a bit faster than g_strlcpy()!martinm1-3/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@43675 f5534014-38df-0310-8fa8-9805f1628bb7
2012-07-11Don't ask for information about an interface greater than the maximumguy1-0/+7
interface for which we have information. Fixes bug 7467. Should also cause an error message, rather than an unreadable capture file, to be produced for the cases in bug 7381. (This isn't a fix for bug 7381; it's arguably an improvement, in the sense that a circuit breaker tripping or a fuse blowing for a short circuit is an improvement over a fire starting, but it's not a *fix*, any more than a circuit break or fuse *fixes* the short circuit.) #BACKPORT git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@43657 f5534014-38df-0310-8fa8-9805f1628bb7
2012-07-11AARGH. There are two lumps of (almost-)identical code to handleguy1-41/+26
interface information when opening an output file, one of which I fixed in my previous checkin and the other of which I didn't notice. Shuffle code around a little bit so that the lumps are identical and then put them into a common routine (*with* the fix in question). #BACKPORT git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@43655 f5534014-38df-0310-8fa8-9805f1628bb7
2012-07-10Set the time units per second correctly if, in wtap_dump_open_ng(),guy1-1/+1
we're making a fake interface description (it should match the time stamp resolution). The dump code for pcap-NG now requires the time units per second value, as it needs to correctly compute the time stamp value to write out in an EPB. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@43652 f5534014-38df-0310-8fa8-9805f1628bb7
2012-07-10When writing an EPB, calculate the time stamp based on the resolutionguy1-15/+22
for the interface, not based on the default resolution of 1 microsecond. Fixes bug 7457. Fix a comment. Clean up indentation. #BACKPORT git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@43649 f5534014-38df-0310-8fa8-9805f1628bb7
2012-07-09Fix up some comments.guy1-6/+6
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@43633 f5534014-38df-0310-8fa8-9805f1628bb7
2012-07-09Fix another comment.guy1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@43632 f5534014-38df-0310-8fa8-9805f1628bb7
2012-07-09Fix some comments.guy1-4/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@43631 f5534014-38df-0310-8fa8-9805f1628bb7
2012-07-09The names "etherpeek" and "airopeek" are a bit misleading, as theguy8-224/+236
"etherpeek.c" file format is used by AiroPeek and the "airopeek9.c" file format is used by EtherPeek. Instead, use the names that WildPackets apparently uses for those formats - "classic" and "tagged". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@43630 f5534014-38df-0310-8fa8-9805f1628bb7
2012-07-09From Evan Huus:etxrab1-6/+1
Grab-bag of unused variables. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7452 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@43616 f5534014-38df-0310-8fa8-9805f1628bb7
2012-06-29Initial support for D-Bus dissection (bug #5502)darkjames3-0/+6
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@43542 f5534014-38df-0310-8fa8-9805f1628bb7
2012-06-28Update Free Software Foundation address.darkjames92-92/+92
(COPYING will be updated in next commit) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@43536 f5534014-38df-0310-8fa8-9805f1628bb7
2012-06-20Use separate filters for the RTT found on a SACK and the RTT found on amorriss63-4984/+7864
DATA chunk: having them in both places is helpful when looking at the messages but having them separate is helpful when graphing the RTTs. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@43406 f5534014-38df-0310-8fa8-9805f1628bb7
2012-03-09From Jose Pedro Oliveira: Corrects several 'wdh->bytes_dumped += ...' lines. ↵etxrab1-5/+5
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6718 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@41443 f5534014-38df-0310-8fa8-9805f1628bb7
2012-03-07The User & Network direction is reversed ↵etxrab1-3/+3
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6656 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@41402 f5534014-38df-0310-8fa8-9805f1628bb7
2012-03-07From Martin Kaiser: correct sorting for wiretap's file type listetxrab1-6/+8
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@41387 f5534014-38df-0310-8fa8-9805f1628bb7
2012-03-06From Mike Wakerly: Add wiretap suport for LINKTYPE_NFC_LLCPetxrab3-1/+52
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@41368 f5534014-38df-0310-8fa8-9805f1628bb7
2012-03-05Use correct lenght when writing if_filter_str.etxrab1-1/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@41352 f5534014-38df-0310-8fa8-9805f1628bb7
2012-03-05Fix calculation of pading for if_filter_str.etxrab1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@41351 f5534014-38df-0310-8fa8-9805f1628bb7
2012-03-05From Martin Kaiser:etxrab1-2/+3
wiretap mpeg2 ts: eof vs short read https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6909 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@41350 f5534014-38df-0310-8fa8-9805f1628bb7
2012-03-05From Martin Kaiser:etxrab1-0/+13
wiretap mpeg2 ts: more thorough check for sync byte. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6908 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@41349 f5534014-38df-0310-8fa8-9805f1628bb7
2012-03-04Squelch a can't-really-happen uninitialized reference warning.guy1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@41342 f5534014-38df-0310-8fa8-9805f1628bb7
2012-03-04Use parenthesesetxrab1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@41341 f5534014-38df-0310-8fa8-9805f1628bb7
2012-03-04if_filter isn't a string per se,The first byte of the Option Data keeps a ↵etxrab3-25/+74
code of the filter used git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@41339 f5534014-38df-0310-8fa8-9805f1628bb7
2012-03-04Make sure all names in NRB records are null-terminated; report an errorguy1-13/+138
if they're not. Also report an error for zero-length names. Handle multiple names per IP address - the pcap-NG spec says "one or more zero-terminated strings containing the DNS entries for that address." Use a Buffer to hold NRB records, so there's no maximum size (well, there is a maximum size, because the record length is 16 bits, but let's not allocate 64KiB on the stack if we don't have to). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@41332 f5534014-38df-0310-8fa8-9805f1628bb7
2012-03-03From Jose Pedro Oliveira: Fix typosetxrab1-9/+9
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@41330 f5534014-38df-0310-8fa8-9805f1628bb7
2012-03-03Don't look at the interface_id field of the packet header ifguy1-1/+10
WTAP_HAS_INTERFACE_ID isn't set in the presence flags. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@41327 f5534014-38df-0310-8fa8-9805f1628bb7
2012-03-02Flag mp2t file as really having only relative time stamps. Put theguy2-1/+3
comment on its own line in mpeg.c as well. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@41294 f5534014-38df-0310-8fa8-9805f1628bb7
2012-03-02The additional_file_extensions member of struct file_type_info need notguy1-1/+1
and should not contain the extension in the default_file_extension member - that's why the name starts with "additional". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@41293 f5534014-38df-0310-8fa8-9805f1628bb7
2012-03-02Get rid of no-longer-needed argument to pcapng_write_section_header_block().guy1-25/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@41292 f5534014-38df-0310-8fa8-9805f1628bb7
2012-03-02Skip an intermediating wtapng_block_t in the code path to writeguy1-78/+44
Interface Description Blocks. Fix a typo (if_fcslen was meant rather than opt_comment when writing the FCS length). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@41291 f5534014-38df-0310-8fa8-9805f1628bb7
2012-03-02Simplify the code path for writing pcap-NG packets, and remove someguy1-87/+34
no-longer-needed elements from the wtapng_packet_t structure. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@41289 f5534014-38df-0310-8fa8-9805f1628bb7