aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
AgeCommit message (Collapse)AuthorFilesLines
2015-03-191.99.4 → 1.99.5.Gerald Combs2-2/+2
Change-Id: Ifa1a57ac2db5d921d9b53dbe997cfa1916720c26 Reviewed-on: https://code.wireshark.org/review/7759 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-10Change a lot of http:// URLs to https://.Gerald Combs1-3/+5
Most of our sites are now HTTPS-only. Update URLs accordingly. Update other URLs while we're at it. Remove or comment out dead links. Change-Id: I7c4f323e6585d22760bb90bf28fc0faa6b893a33 Reviewed-on: https://code.wireshark.org/review/7621 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-051.99.3 → 1.99.4.Gerald Combs2-2/+2
Change-Id: I96953b6ca34140972a783c3066614399981ca1e2 Reviewed-on: https://code.wireshark.org/review/7549 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-04Add CMake SOVERSIONs to make-version.pl.Gerald Combs1-1/+1
Change-Id: Ifd011288ca23263738ca50842d59a23cc25e7952 Reviewed-on: https://code.wireshark.org/review/7532 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-04Set packet encapsulation for HCIDUMP capturesMichal Labedzki1-3/+4
Change-Id: I2a523694a38b6fe296b6dbceb5a00e4202364e99 Reviewed-on: https://code.wireshark.org/review/7523 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-03-01Call TIMEDEFVn macros in all PACKET_DESCRIBE() macros.Guy Harris1-46/+70
Create TIMEDEFV10() and, for it and for V20, V21, and V22, undefine the ones used for the read routine and define dummy ones for the read-seek routines (as those record formats have relative, not absolute, times). Have all of them set presence_flags. That way: 1) if we *can* set the time stamps in the seek-read routine, we do; 2) we always set presence_flags in read and seek-read routines. Change-Id: I837507245e8a0cbc68c7c5fd8365f474d085488e Reviewed-on: https://code.wireshark.org/review/7445 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-28Remove some unneeded includes of <sys/time.h>.Guy Harris4-16/+0
Change-Id: I9e4e6efa9f8c7dbff7627f8d5fc3278ab383618d Reviewed-on: https://code.wireshark.org/review/7441 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-28Don't use struct timeval if we only care about seconds.Guy Harris1-8/+5
time_t suffices in that case. Change-Id: Ica7a79fb6f8c7cc7fb6decd5fcd391dccfdb3fc6 Reviewed-on: https://code.wireshark.org/review/7440 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-28Clean up timestamp handling.Guy Harris1-75/+59
Use nstime_t rather than struct timeval when we want seconds-and-fractions, so that, when writing the file, we can handle nanosecond-resolution time stamps. Calculate the relative time stamp as a 64-bit integer rather than using floating-point. Use time_t rather than struct timeval if we only want seconds. Have the routines that write out 16-bit and 32-bit numbers convert them to little-endian themselves, rather than having to be passed a little-endian number. Have a routine that writes out 48-bit values in little-endian order, and use that to write out packet time stamps. Change-Id: Ia6e047079e48915647502178e0a1c61177010c62 Reviewed-on: https://code.wireshark.org/review/7438 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-25Make the V10 path a bit more like the other paths.Guy Harris1-13/+17
Provide {FULL,PART}SIZEDEFV10 macros, similar to what's provided for the other versions, containing the code to set the packet length and captured data length, and use the TRACE_V10_REC_LEN_OFF() macro directly after that to set the various length and offset values in the pseudo-header. Change-Id: I3513371057601b44821d89ebaa7565ab370a67f5 Reviewed-on: https://code.wireshark.org/review/7393 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-25Make the _offset values static constants.Guy Harris1-5/+5
No need to export them outside this file, and making them constants might convince the compiler not to bother fetching their values from memory when referring to them. Change-Id: Ib8605bf0bb9091721a51827c45fe75d19a15ba26 Reviewed-on: https://code.wireshark.org/review/7378 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-25Have a PACKET_DESCRIBE() for V30's seek-read routine.Guy Harris1-4/+13
That way it'll set the captured length and reported length the same way it's done in the read routine. Change-Id: I8b1f2d0d8fa688f44b6f61f16dc2e21b5648fc12 Reviewed-on: https://code.wireshark.org/review/7376 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-25Make the V10 PACKET_DESCRIBE() macro a little more like the others.Guy Harris1-20/+18
Rename the V10 PACKET_DESCRIBE()'s "fpp" argument to "type", and have it declare the pointer variable. Change-Id: I3ac52ebdef0aec7bc95052277537185132886b57 Reviewed-on: https://code.wireshark.org/review/7374 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-25Rename the "type" argument to V10's PACKET_DESCRIBE() to "ver".Guy Harris1-10/+10
Move it in the argument list, and use it instead of a hard-coded 10 (even though it's always passed as 10), to match the other PACKET_DESCRIBE() macros. Change-Id: Idd0a23a58cc6bb0d2de799b039db776d279cc03e Reviewed-on: https://code.wireshark.org/review/7372 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-25Call the version-number argument to GENERATE_CASE_xxx() "ver".Guy Harris1-73/+73
The name "type" is thrown around to mean both a version number and a part of a structure member, and some other macros use "ver" for the version number; try to make things a little less inconsistent. Change-Id: I61405cf41cca43fe607154af7498944c5ec0ef11 Reviewed-on: https://code.wireshark.org/review/7370 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-25Use FULL/PART as an argument to all PACKET_DESCRIBE() macros.Guy Harris1-30/+30
Makes the various flavors of that macro more similar. Change-Id: Ie95ee8db0b226458146b055b54b7d61835f1e508 Reviewed-on: https://code.wireshark.org/review/7368 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-25Get rid of an unused argument to PACKET_DESCRIBE().Guy Harris1-12/+12
Change-Id: Ic2037f5bf7eb43f93ba39f91bca3fc267c8fb850 Reviewed-on: https://code.wireshark.org/review/7366 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-25Give all PACKET_DESCRIBE() macros a HEADERVER argument.Guy Harris1-3/+3
A bit of regularization. Change-Id: I60e0bd50891e1ba3e9c40f8d1d14d63534e08138 Reviewed-on: https://code.wireshark.org/review/7364 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-25Call header version arguments HEADERVER.Guy Harris1-34/+34
Use that rather than TYPE or acttype (to indicate that it's a header version number to use as the "xxx" in NSPR_HEADER_VERSIONxxx, and to use the same name throughout). Change-Id: I14cfc819e44ce4388c27d521a1256dec8d80df2e Reviewed-on: https://code.wireshark.org/review/7361 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-24More indentation cleanups.Guy Harris1-36/+36
Change-Id: Ia448727e6340723800d92097f0ef7f3582ef6340 Reviewed-on: https://code.wireshark.org/review/7359 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-24Clean up indentation.Guy Harris1-1/+1
Change-Id: I80f8c5c642ebc1fe0169e39c1af9584cfbb89d1a Reviewed-on: https://code.wireshark.org/review/7357 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-24Pull more into PACKET_DESCRIBE() for the V10 seek-read routine.Guy Harris1-17/+16
Just like the read routine. Change-Id: If6bd98bea15f1c8dc7454a5dac0ea57920bddc8c Reviewed-on: https://code.wireshark.org/review/7355 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-24Swallow up more V10 stuff into PACKET_DESCRIBE().Guy Harris1-39/+24
That makes it even more like V2x and V3x and slightly less unclear. Change-Id: I798ead123ba6418be0252067773a951390e26ce8 Reviewed-on: https://code.wireshark.org/review/7353 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-24Have PACKET_DESCRIBE() for V10.Guy Harris1-5/+21
Have it set the record type and initialize the presence bits. That makes it a bit more like V2x and V3x, and makes the code slightly less unclear. Change-Id: Ibfbe2143b24a68c3fa3f576616fde81918b01feb Reviewed-on: https://code.wireshark.org/review/7351 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-24Move the setting of rec_type.Guy Harris1-5/+2
This makes the code slightly less unclear. (You are in a maze of twisty little C macros, all different.) Change-Id: I9f1bcc7a9a1a7afe87ede8b1ba513e3d8e53845c Reviewed-on: https://code.wireshark.org/review/7349 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-24NS Trace (NetScaler Trace) file format is not able to export specified packetsranushekhar1-0/+1
Bug: 10998 Change-Id: Ic2c5ad5b01be3e0c39b1e93badcc4f2246c420fe Reviewed-on: https://code.wireshark.org/review/7327 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-24pcap-common: fix build error with gcc5Daniel Mack1-1/+1
gcc5 complains about the issue below, so add a trivial fixup. CC libwiretap_la-pcap-common.lo pcap-common.c: In function 'pcap_byteswap_nflog_pseudoheader': pcap-common.c:1290:30: error: logical not is only applied to the left hand side of comparison [-Werror=logical-not-parentheses] if (!(nfhdr->nflog_version) == 0) { ^ cc1: all warnings being treated as errors Change-Id: I9f5b090ffd564f203cc3fb4ff302f2e4752865f0 Reviewed-on: https://code.wireshark.org/review/7336 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-22Use file extensions even more as a heuristic.Guy Harris1-3/+56
If a file type has a list of "typical" extensions, and a file has an extension that is *not* one of those extensions, the file is unlikely to be of that type. For files that have extensions, after we try the heuristics that have a list of "typical" extensions that includes the file's extension, try the heuristics that have no such list, and after that try the heuristics that have such a list but where the list *doesn't* include the file's extension. This fixes, for example, some cases where non-PacketLogger files were getting identified as PacketLogger files. Change-Id: I2d8c3b983ed6ccd692beb888668f77eb9b5f437b Reviewed-on: https://code.wireshark.org/review/7315 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-21Set phdr encap for pcap fileMichal Labedzki1-0/+2
Change-Id: Id600b395d6fd2711c9b392a60454e5bd9a3eb465 Reviewed-on: https://code.wireshark.org/review/7288 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-18Eliminate some DIRTY_ file lists.Guy Harris1-10/+2
We don't want to encourage people to add to those lists, we want to encourage people to subtract *from* those lists (either by fixing warnings or, if an infelicitous API, or an infelicitous declaration of an API on some platforms, or a program generator that doesn't take sufficient care to avoid warnings - I'm looking at *you*, Flex - makes it impossible to fix without introducing other problems, using the DIAG_OFF()/DIAG_ON() macros if possible). Eliminate the empty lists, to make it harder to fill them up again. Change-Id: I298d07952c0cb1842a4ea71ba7e07c68e94a04e9 Reviewed-on: https://code.wireshark.org/review/7229 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-17Add missing json.hAndersBroman1-0/+1
Change-Id: Ib1d67fdcc016532ab6e4140df357a6d0dd5cf09d Reviewed-on: https://code.wireshark.org/review/7193 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-17Added JSON native file support.Dario Lombardo7-0/+208
libjsmn has also been moved from epan/ to wsutil/ to make it visible from wiretap. Change-Id: I59abb3419acb1baa83194b38152d3651ed5c123c Bug: 10878 Reviewed-on: https://code.wireshark.org/review/6716 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-02-15Handle DLT_LOOP differently from DLT_NULL.Guy Harris3-6/+10
That's a little cleaner, and lets us preserve the LINKTYPE_ value for DLT_LOOP captures. ("Preserve" here doesn't mean "write files with a link-layer header type of 12", as that's ambiguous; we write it with a link-layer header type of LINKTYPE_LOOP, i.e. 108. If programs on OpenBSD don't recognize that as DLT_LOOP, that's a bug in OpenBSD's libpcap or in the program.) Change-Id: I48a2e04aed41c013823ffb5c588d2a8e8b376e15 Reviewed-on: https://code.wireshark.org/review/7143 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-15Don't base interpretation of LINKTYPE_ values on DLT_ value definitions.Guy Harris1-27/+16
Instead, explicitly check for particular build platforms. This means that the interpretation of the link-layer type values with different meanings on different platforms won't be dependent on the particular version of libpcap with which Wireshark happens to be built, and also means that we don't have to fix pcap-common.c to include pcap.h or net/bpf.h. Fix some comments while we're at it. Bug: 10956 Change-Id: If331d9b92081fb0bdf416620fb2ad8dce57dea6b Reviewed-on: https://code.wireshark.org/review/7140 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-13Replace tabs by spaces when editor modelines has "expandtab"Bill Meier3-40/+40
Change-Id: If7a6f2697be732ae4f94ed8b845fd293c32510f7 Also: tabs-stops should be 8 Reviewed-on: https://code.wireshark.org/review/7100 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-02-041.99.2 → 1.99.3.Gerald Combs1-1/+1
Change-Id: Id03d0243f20b33873a92be7444b61952d0b18638 Reviewed-on: https://code.wireshark.org/review/6956 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-26Pcapng: Don't fetch past the end of a GArray.Gerald Combs1-3/+3
Due to an off-by-one error an invalid ISB interface ID could make us fetch past the end of a GArray. Found using American Fuzzy Lop. Bug: 10895 Change-Id: I7d4049ad7a386ae7e8013b8e741d54a31f353f1f Reviewed-on: https://code.wireshark.org/review/6798 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-24Get Wireshark to compile with afl-gcc.Gerald Combs1-1/+1
Fix errors found by American Fuzzy Lop's afl-gcc (http://lcamtuf.coredump.cx/afl/): peektagged.c: error: 'fileVersion' may be used uninitialized in this function packet-h223.c: error: variable 'circuit_id' might be clobbered by 'longjmp' or 'vfork' wslua_proto.c: error: variable 'd' might be clobbered by 'longjmp' or 'vfork' wslua_proto.c: error: variable 'dt' might be clobbered by 'longjmp' or 'vfork' Change-Id: Idd74a3ad7b236d3a8756c1e7e917b1c74143f381 Reviewed-on: https://code.wireshark.org/review/6767 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-17PacketLogger files can be big-endian or little-endian.Guy Harris1-12/+52
Bug: 10861 Change-Id: Iedb248aa4a96e65bb525ba6475dc767e5dfefbe0 Reviewed-on: https://code.wireshark.org/review/6579 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-11Fix CMake generation and use of Windows .rc filesGraham Bloice1-1/+1
CMake now generates local copies of .rc files for all the Windows components and uses the files in the build of the components. The .rc.in files that include an icon were modified to allow the icon path to be set by CMake. The path is removed for nmake builds. Updated build architecture detection, required for wireshark.manifest.in Change-Id: I7b1ff43050e9b0efb861d1041636fb4aef49a4f8 Reviewed-on: https://code.wireshark.org/review/6482 Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2015-01-03Remove unnecessary includes from wiretap folderMartin Mathieson46-81/+0
Change-Id: I10d3057801673bc1c8ea78f144215869cc4b1851 Reviewed-on: https://code.wireshark.org/review/6217 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-01-02Add '*.nativecodeanalysis.xml' to 'clean' targetsBill Meier1-1/+1
Change-Id: I90dbf0b31fc737150a01533763a7869b34c68cb6 Reviewed-on: https://code.wireshark.org/review/6220 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-01-02Add "Editor modelines"; Adjust whitespace as needed.Bill Meier48-1805/+2429
Change-Id: Ic5a5acb0f36d3aa144edbfb1ae71097b18426db4 Reviewed-on: https://code.wireshark.org/review/6216 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-31pcapng (wiretap): fix Copy-paste error (CID 1158591 & 1158592)Alexis La Goutte1-2/+2
Change-Id: I117c007c0a8be573bb3069fc44a490e6e5d2fef8 Reviewed-on: https://code.wireshark.org/review/6167 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-27Get rid of packet data members of header structures.Guy Harris1-43/+26
Instead, have a special macro using the size of the header structure to find the offset of the packet data. This means that: 1) you don't have to throw "-{size of data member}" into the macros that calculate the sizes of the header structures; 2) you don't have a bunch of randomly-chosen data field sizes; 3) you don't have sizes of 0, which cause problems with compilers that don't support zero-length arrays; 4) you don't have some apparently-incorrect "-{size of data member}" values (if they're correct, please fix the structure definitions). Change-Id: Iea368b83fa2d184bd6df453d51756e4749714e2c Reviewed-on: https://code.wireshark.org/review/6082 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-19Get rid of some accidentally-checked-in debugging stuff.Guy Harris1-1/+1
Change-Id: Iea54df783cdff2424d23ecfba8f219dae42d0c83 Reviewed-on: https://code.wireshark.org/review/5888 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-18Bluetooth: Add generic Bluetooth dissectorMichal Labedzki2-4/+6
Bluetooth dissector is used to add ability to filter all bluetooth payload from capture files (there are many transport like: hci_h4, hci_h1, hci_usb, hci_mon, btle). Also it is used to placeholder for all data tree used to store additional informations like bd_addrs, names, etc. Finally it is used to be one point for Bluetooth Endpoints/Conversation filtering what is enabled now. Also add Master/Slave Role and Connection Mode tracking. Change-Id: I67048080fb8ee16fa0f4ec429c1257de81ddd737 Reviewed-on: https://code.wireshark.org/review/5771 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-12-18Make sure err_info is always set, and print it iff it's non-null.Guy Harris2-0/+7
Change-Id: Ib5c600c491a3d8adcfa91c00fa9445283610545b Reviewed-on: https://code.wireshark.org/review/5830 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-18Rename WTAP_ERR_REC_TYPE_UNSUPPORTED to WTAP_ERR_UNWRITABLE_REC_TYPE.Guy Harris22-25/+25
That indicates that it's a problem specific to *writing* capture files; we've already converted some errors to that style, and added a new one in that style. Change-Id: I8268316fd8b1a9e301bf09ae970b4b1fbcb35c9d Reviewed-on: https://code.wireshark.org/review/5826 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-18Handle "I can't map this for that file format" better.Guy Harris25-48/+63
For cases where record (meta)data is something that can't be written out in a particular file format, return WTAP_ERR_UNWRITABLE_REC_DATA along with an err_info string. Report (and free) that err_info string in cases where WTAP_ERR_UNWRITABLE_REC_DATA is returned. Clean up some other error reporting cases, and flag with an XXX some cases where we aren't reporting errors at all, while we're at it. Change-Id: I91d02093af0d42c24ec4634c2c773b30f3d39ab3 Reviewed-on: https://code.wireshark.org/review/5823 Reviewed-by: Guy Harris <guy@alum.mit.edu>