Commit Graph

2561 Commits

Author SHA1 Message Date
Guy Harris 8d7e0fc703 Don't initialize a variable if the first thing we do is set it.
Change-Id: I14e8a15fdea1526c1c4bd2a0f19925ff41c15608
Reviewed-on: https://code.wireshark.org/review/8800
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-06 19:29:47 +00:00
anilkumar911 4490d5eb49 Netscaler: Fix issue where packets were lost when selected packets were exported
Only this issue with a netscaler trace file

Bug: 11248
Change-Id: I2bc2cae5c988eeff7bdd08471bf421faafcd4e73
Reviewed-on: https://code.wireshark.org/review/8672
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-06-03 13:32:16 +00:00
Gerald Combs 1955dd2dec 1.99.6 → 1.99.7.
Change-Id: I8c431f162d199c8507ba57d84e496dce5f5a0933
Reviewed-on: https://code.wireshark.org/review/8677
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-28 20:29:06 +00:00
Guy Harris bb89e77242 Make option_content a guint8 *.
It points to an array of bytes, not a character string.

Add some casts to squelch other Sun/Oracle C warnings.

Clean up some comments while we're at it.

Change-Id: Id0908178cb00d537e95569b9ce6f745c8fd6d716
Reviewed-on: https://code.wireshark.org/review/8369
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-05-09 19:36:47 +00:00
Guy Harris 795211b330 Fix definition of tnef_open().
Change-Id: I8d030ab48fc47e4948c9f6dcad08f0bd08ca5ff8
Reviewed-on: https://code.wireshark.org/review/8364
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-05-09 01:34:21 +00:00
Guy Harris 17ea21f902 Make everything unsigned.
The LHS of the & operation is unsigned; make the RHS unsigned as well.
That squelches a Sun/Oracle C warning.

Change-Id: I6983cc89603a512020b8e8b560c00632de6b2fb3
Reviewed-on: https://code.wireshark.org/review/8363
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-05-09 01:31:01 +00:00
Gerald Combs 1e3be59fbe WildPackets → Savvius.
Change-Id: I2494c2b1dcc9e324535b3f659b51b44059c478bd
Reviewed-on: https://code.wireshark.org/review/8304
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-06 16:48:03 +00:00
Alexis La Goutte 70be586a82 nettrace 3GPP: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: Ie94165a45d9af23eee6e4d6406ad6fba4de785c0
Reviewed-on: https://code.wireshark.org/review/8281
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-04 06:01:13 +00:00
Joerg Mayer ecd16b43b4 Fix checkAPI: Warning: i4b_trace.h has an SVN Id tag. Please remove it!
Change-Id: Ia82801866edb2783f896e624da4553717370c36b
Reviewed-on: https://code.wireshark.org/review/8267
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-05-01 17:22:51 +00:00
Guy Harris 9fba5f0764 Fix some cases where we're shifting a signed 1 left.
Shift 1U instead, to make sure it's unsigned; the result of, for
example, the result of shifting a signed value left is undefined if the
value times 2^{shift count} doesn't fit in the *signed* type of the
shifted value.  That means, in particular, that the result of shifting 1
left by {number of bits in an int - 1} is undefined.  (In *practice*,
it'll probably be -2^32, with the bit you want set, but that's not
guaranteed, and GCC 5.1 seems not to like it.)

Change-Id: I0d27565c382a04ceda9eec65f45a430ceb74cf53
Reviewed-on: https://code.wireshark.org/review/8255
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-30 22:22:59 +00:00
AndersBroman 45a5a1a4b4 [nettrace_3gpp_32_423] Fix nettrace_3gpp_32_423.c:292: warning:
declaration of 'random' shadows a global declaration.

Change-Id: I2dde89a3f0e5abb3b8acc3c7d09e1a0d53a6c0f7
Reviewed-on: https://code.wireshark.org/review/8245
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-30 12:19:55 +00:00
AndersBroman 2d8b4a233e Add the abillity to read 3GPP trace records with format accoding to
TS 32 423(XML)

Change-Id: I37895ec35797089a32c7d1695e735046d6aa979e
Reviewed-on: https://code.wireshark.org/review/8237
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-30 10:52:01 +00:00
Guy Harris 8b720910d2 Calculate *Peek tagged timestamps in fixed-point.
Add a variant of filetime_to_nstime() that takes a value that's like a
FILETIME but in units of nanoseconds rather than tenths of a
microsecond, and use that.  (It looks as if they might just get FILETIME
values from the OS and multiply them by 100, as the nanosecond-FILETIME
values appear to be multiples of 100 in the captures I've seen, but they
might have chosen nanosecond resolution in case they need to support a
higher-resolution time stamp source, so we don't assume that the values
will always be a multiple of 100.)

Change-Id: If6a1cb2cb673688b042eb113b79cfd267f5454a5
Reviewed-on: https://code.wireshark.org/review/8150
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-21 01:28:15 +00:00
Guy Harris 94dc9cd113 Have a common routine to convert FILETIME to nstime_t.
We had several copies of that code; put it into a filetime_to_nstime()
routine in wsutil, and call that common routine instead.

Change-Id: I1eb5579c36c129ff8d23f9212285ab3f63be0f43
Reviewed-on: https://code.wireshark.org/review/8142
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-20 20:41:38 +00:00
Guy Harris 3695abdaf9 Make various structure members the right size for time-in-seconds.
I.e., make them time_t's.

Change-Id: I102e9f585ae2798927757fe7f0f7a5a3fa251ec2
Reviewed-on: https://code.wireshark.org/review/8134
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-20 07:48:21 +00:00
Guy Harris 7fa7422a1e Visual Networks captures have only millisecond resolution.
Change-Id: I59d7a6b5e29a068fd820075c913ac3c546593b9e
Reviewed-on: https://code.wireshark.org/review/8133
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-20 07:20:58 +00:00
Guy Harris ff4ca0adb9 Simplify the calculation of the time stamp.
The time is calculated based on a 32-bit "seconds since the Epoch" value
for the start time and a 32-bit delta from that time, in milliseconds.
We can just split that delta into seconds and milliseconds, add the
seconds to the start time to get the seconds part of the time stamp, and
multiply the milliseconds by 1,000,000 to get the nanoseconds part of
the time stamp.  The only 64-bit arithmetic needed is adding the seconds
to a 64-bit version of the start time (just in case seconds+start time
goes past Y2.038K).

Change-Id: Id7c4c6255870627f81fc99dae919abaf47efc710
Reviewed-on: https://code.wireshark.org/review/8132
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-20 07:14:20 +00:00
Guy Harris 9194aab0ab Use 64-bit fixed point to calculate time stamps.
Change-Id: I77c470937366dbaf50adbf174569ef0676ae3658
Reviewed-on: https://code.wireshark.org/review/8126
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-19 21:10:39 +00:00
Michal Labedzki 39968ac432 MIME: Allow to dissect big files
Increase file size limit for mime files that can be
loaded by Wireshark to AddressSpace/2. On 32bit machines the limit can be
2 GiB.

Change-Id: I5b38b3ebe401077f4e1e873cff4b37da560d592f
Reviewed-on: https://code.wireshark.org/review/4907
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-04-18 15:11:02 +00:00
anilkumar911 62a70e8a0b Support for new netscaler 3.5 trace format.
Change-Id: Ica74f3f9239a96486967cf248feb4313bc390734
Reviewed-on: https://code.wireshark.org/review/7751
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-04-13 14:27:46 +00:00
Bill Meier d3f2d8ce4f ieee80211.c: "IEEE 802.11 plus Network Monitor radio header" encap: Fix dissection
Specifically: Management/Control frames saved by Microsoft Netmon (3.4?)
with "IEEE 802.11 plus Network Monitor radio header"  encapsulation
may or may not be saved with an FCS.

See Bug 11105.

Fix: Use "check fcs" preference to specify whether Management & Control
frames have an fcs for this encapsulation.

Change-Id: Ibd0be7b4765c2df2b959cb2234aeed027266246b
Reviewed-on: https://code.wireshark.org/review/7939
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-04-07 15:23:25 +00:00
Martin Kaiser 267e169252 try to silence the OS X builbots by renaming index to idx
mp2t.c: In function 'mp2t_find_next_pcr':
mp2t.c:160: warning: declaration of 'index' shadows a global declaration
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/include/string.h:125:
warning: shadowed declaration is here
mp2t.c: In function 'mp2t_bits_per_second':
mp2t.c:208: warning: declaration of 'index' shadows a global declaration
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/include/string.h:125:
warning: shadowed declaration is here

Change-Id: Ia8591990409a0730d913c50d80b6950425a22052
Reviewed-on: https://code.wireshark.org/review/7905
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-04-04 11:55:27 +00:00
Weston Schmidt 7253ee7611 Add PCR based stream times for MPEG ts files.
Change-Id: Ie1308829c3ad44d842bf12c7ebc5c200c942d8cc
Reviewed-on: https://code.wireshark.org/review/7750
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-04-04 09:02:40 +00:00
Gerald Combs 019c3af0b1 1.99.5 → 1.99.6.
Change-Id: Iff642606bdb9858dc54b90abe02bf1572f44fc25
Reviewed-on: https://code.wireshark.org/review/7766
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-20 00:53:49 +00:00
Gerald Combs cc7e565711 1.99.4 → 1.99.5.
Change-Id: Ifa1a57ac2db5d921d9b53dbe997cfa1916720c26
Reviewed-on: https://code.wireshark.org/review/7759
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-19 19:16:02 +00:00
Gerald Combs cac102eee3 Change a lot of http:// URLs to https://.
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-10 19:30:50 +00:00
Gerald Combs 89270fbe0f 1.99.3 → 1.99.4.
Change-Id: I96953b6ca34140972a783c3066614399981ca1e2
Reviewed-on: https://code.wireshark.org/review/7549
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-05 20:15:36 +00:00
Gerald Combs fb03d49fca Add CMake SOVERSIONs to make-version.pl.
Change-Id: Ifd011288ca23263738ca50842d59a23cc25e7952
Reviewed-on: https://code.wireshark.org/review/7532
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-04 20:33:08 +00:00
Michal Labedzki 23b07cb3ca Set packet encapsulation for HCIDUMP captures
Change-Id: I2a523694a38b6fe296b6dbceb5a00e4202364e99
Reviewed-on: https://code.wireshark.org/review/7523
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-03-04 16:03:33 +00:00
Guy Harris 0f3ae32290 Call TIMEDEFVn macros in all PACKET_DESCRIBE() macros.
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-03-01 03:04:06 +00:00
Guy Harris 65303efe4d Remove some unneeded includes of <sys/time.h>.
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-28 04:59:08 +00:00
Guy Harris 3b235615bf Don't use struct timeval if we only care about seconds.
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-28 03:50:26 +00:00
Guy Harris 60cc2e0e93 Clean up timestamp handling.
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-28 02:23:49 +00:00
Guy Harris 0692d75455 Make the V10 path a bit more like the other paths.
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-25 21:05:26 +00:00
Guy Harris 9dfade3494 Make the _offset values static constants.
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-25 08:12:28 +00:00
Guy Harris 6b6c11c3c3 Have a PACKET_DESCRIBE() for V30's seek-read routine.
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-25 06:12:23 +00:00
Guy Harris 98e8d527c9 Make the V10 PACKET_DESCRIBE() macro a little more like the others.
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-25 05:23:56 +00:00
Guy Harris 0856de5b5f Rename the "type" argument to V10's PACKET_DESCRIBE() to "ver".
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-25 04:25:43 +00:00
Guy Harris 825a833763 Call the version-number argument to GENERATE_CASE_xxx() "ver".
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-25 04:16:17 +00:00
Guy Harris fc6df642be Use FULL/PART as an argument to all PACKET_DESCRIBE() macros.
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-25 03:13:02 +00:00
Guy Harris 22b4b6321b Get rid of an unused argument to PACKET_DESCRIBE().
Change-Id: Ic2037f5bf7eb43f93ba39f91bca3fc267c8fb850
Reviewed-on: https://code.wireshark.org/review/7366
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-25 03:00:39 +00:00
Guy Harris 04b6b56228 Give all PACKET_DESCRIBE() macros a HEADERVER argument.
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-25 00:15:54 +00:00
Guy Harris 08c85ecc3c Call header version arguments HEADERVER.
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-25 00:07:15 +00:00
Guy Harris c4b76a94ef More indentation cleanups.
Change-Id: Ia448727e6340723800d92097f0ef7f3582ef6340
Reviewed-on: https://code.wireshark.org/review/7359
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-24 22:32:46 +00:00
Guy Harris 0dc5edfe95 Clean up indentation.
Change-Id: I80f8c5c642ebc1fe0169e39c1af9584cfbb89d1a
Reviewed-on: https://code.wireshark.org/review/7357
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-24 22:30:14 +00:00
Guy Harris 37c09e35b0 Pull more into PACKET_DESCRIBE() for the V10 seek-read routine.
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-24 22:22:42 +00:00
Guy Harris 592ee9e83b Swallow up more V10 stuff into PACKET_DESCRIBE().
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-24 21:56:56 +00:00
Guy Harris 2a31311f81 Have PACKET_DESCRIBE() for V10.
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-24 21:22:51 +00:00
Guy Harris fe5aea7c62 Move the setting of rec_type.
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-24 21:02:54 +00:00
ranushekhar c466d401d9 NS Trace (NetScaler Trace) file format is not able to export specified packets
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-24 06:37:10 +00:00