Commit Graph

52258 Commits

Author SHA1 Message Date
Alexis La Goutte 757aa33220 Continue to remove $Id$ from top of file
(Using sed : sed -i '/^\# \$Id\$/,+1 d') (start with dash)

Change-Id: Ia4b5a6c2302f6a531f6a86c1ec3a2f8205c8c2dd
Reviewed-on: https://code.wireshark.org/review/881
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:48:06 +00:00
Alexis La Goutte fb61a0afa9 Continue to remove $Id$ from top of file
(Using sed :sed -i '/^  \* \$Id\$/,+1 d') (2 spaces before star)

Change-Id: I7060f198b4ae4dd271ecc454f6c6dd8bd4cfd8d4
Reviewed-on: https://code.wireshark.org/review/885
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:47:40 +00:00
Alexis La Goutte b0ba475fbf Continue to remove $Id$ from top of file
(Using sed : sed -i '/^  \$Id\$/,+1 d') (No star only 2 spaces before)

Change-Id: Id7b254031769a9dca2941304e4d3a0f4bdbc3f54
Reviewed-on: https://code.wireshark.org/review/883
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:46:57 +00:00
Alexis La Goutte 7287b58ff5 Continue to remove $Id$ from top of file
(Using sed : sed -i '/^<!-- \$Id\$ -->/,+0 d') (XML Comments)

Change-Id: Ifd03f70ae84dfbbbe04d91f10fd30857fd197014
Reviewed-on: https://code.wireshark.org/review/882
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:46:03 +00:00
Evan Huus a8f1e349c3 Doc tweaks and macro parameterization
Change-Id: I9898bedf05a785683e79866a149336cbbf402d27
Reviewed-on: https://code.wireshark.org/review/892
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-31 18:44:26 +00:00
Alexis La Goutte 0233001df0 Continue to remove $Id$ from top of file
Remove all $Id:$ (by hand)

Change-Id: Ia8790ee852fe338469e855713199220d345a59b7
Reviewed-on: https://code.wireshark.org/review/880
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:31:42 +00:00
Alexis La Goutte 09cd306d1c Continue to remove $Id$ from top of file
(Using sed : sed -i '/^\* \$Id\$/,+1 d') (no space before star)

Change-Id: I318968db2b8512ba1303b5fc5c624c66441658f0
Reviewed-on: https://code.wireshark.org/review/879
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:30:52 +00:00
Alexis La Goutte f2dfc39d94 Continue to remove $Id$ from top of file
(Using sed : sed -i '/^ \t$Id\$/,+0 d') (tab before $Id$)

Also modify generator (NDR.pm)

Change-Id: I348a1d129d1d1320bd80b428038ea5ed291d6ca8
Reviewed-on: https://code.wireshark.org/review/878
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:29:18 +00:00
Alexis La Goutte 94a791a76e Continue to remove $Id$ from top of file
(Using sed : sed -i '/^\$Id\$/,+1 d') (No space or star before $Id$)

Change-Id: I0801bd7cf234d32487008a8b6dcee64875b07688
Reviewed-on: https://code.wireshark.org/review/876
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-31 16:00:04 +00:00
Alexis La Goutte 3170f2e418 Continue to remove $Id$ from top of file
(Using sed : sed -i '/^ \*  \$Id\$/,+1 d') (Double space between star and $Id$)

Change-Id: If9b8f345e3b6493de0b573600e60005c8b0b33c3
Reviewed-on: https://code.wireshark.org/review/877
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-31 15:59:51 +00:00
AndersBroman d0edbd31eb Use tvb_get_string_enc() with UTF_8 when checking headers as it's faster.
Change-Id: I88cd6f71c1fcbf67948dd0ebdc6e5641d6ba111c
Reviewed-on: https://code.wireshark.org/review/891
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 15:59:15 +00:00
AndersBroman b3708a9c4a According to RFC 3261
7 SIP Messages

   SIP is a text-based protocol and uses the UTF-8 charset

So use ENC_UTF_8|ENC_NA.

Change-Id: I0101eca3dd7d8ff9ebf98fd733548131b862919e
Reviewed-on: https://code.wireshark.org/review/890
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 15:51:27 +00:00
AndersBroman 6a3394eefa Inlining wmem_strbuf_grow seems to give better performance.
Change-Id: I80f3d42fb01461af97984b463a6e8b8217eed552
Reviewed-on: https://code.wireshark.org/review/888
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 15:20:08 +00:00
Alexis La Goutte 280c2958f2 Add --enable-extra-clang-checks for autotools and CMakeList
With -Wunreachable-code flags (and disable for the moment -Wdocumentation)

Change-Id: I126c962b32e650a63b78092e95896736ae7335c9
Reviewed-on: https://code.wireshark.org/review/678
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-03-31 08:29:58 +00:00
Alexis La Goutte 0973a321a9 Fix Argument with 'nonnull' attribute passed null found by Clang
Change-Id: Ie59c379a4f00c807ebc50c95eea2017f8cac0c69
Reviewed-on: https://code.wireshark.org/review/796
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-31 08:29:18 +00:00
Hanspeter Portner 650ed5f249 packet-osc dissector bug fix of path validity func
- 'is_valid_path' function has been corrected
- an OSC path is valid if:
 - it consists of printable characters only
 - does not contain ' ' and '#'
- characters '*' ',' '?' '[' ']' '{' '}' are valid, but have special meaning at the receiving end (used for pattern matching)

Change-Id: I4ff4308d0955da2ef377d606b7778819b97754a0
Reviewed-on: https://code.wireshark.org/review/868
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-03-31 06:43:10 +00:00
Bill Meier 550e3153bf Fix fuzz-test.sh '-b' option so it works again; Do some other tools/*test*.sh changes
- Add -b option to randpkt-test.sh and test-captures.sh;
- Create/ue a common function to do '-x' tests on files/dirs;
- Rename exit_error function to ws_exit_error

Change-Id: I032c9d784bec1fb6b0717aaad08a061e4d935476
Reviewed-on: https://code.wireshark.org/review/872
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-03-30 21:03:15 +00:00
Hadriel Kaplan b63b503456 Fix Bug 9938 'tshark "-Y -2 -w" saves non-dependent frames'
When the '-Y' display filter option is given with a '-2', and a '-w' to write out
the packets, tshark grabs *all* dependent frames in the catprue file, even those
that weren't dependents of a matching packet. Note that this also uses the '-2'
two-pass option, since only two-pass mode writes out dependent frames to begin with.

Change-Id: I17726447bec434ba2566e98fb78893d1331e3056
Reviewed-on: https://code.wireshark.org/review/866
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-30 17:36:18 +00:00
Gerald Combs 5cdf04e6c7 [Automatic manuf, services and enterprise-numbers update for 2014-03-30]
Change-Id: Iff714193adc4035d96f69d4944b43da7edb3cfa8
Reviewed-on: https://code.wireshark.org/review/869
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-30 15:31:27 +00:00
Guy Harris bda08a2881 Hide unused variable.
Leave it there, but commented out, just in case it *should* be used.
"#if 0" out the code that sets it.

Change-Id: I8802fc416030106d9d8421b0d7b8612597794bab
Reviewed-on: https://code.wireshark.org/review/867
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-03-29 23:01:58 +00:00
Guy Harris d156deff04 Rename "size" variable to "length", to match other string routines.
Change-Id: I385345cfafc7e7b4d3e66713fb0fe570b39f438d
Reviewed-on: https://code.wireshark.org/review/865
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-03-29 20:23:09 +00:00
Guy Harris 8ffdf4249a Add a pcorey48tohll() macro, and use #defines for some offsets.
The "48 bits, in a weird byte order" is a variant of 64-bit
"Corey-endian", with the upper 16 bits of the result - which are in the
*middle* of the bytes of the number - ignored.  Define a pcorey48tohll()
macro and use that, rather than the loop.

There are a bunch of #defines for offsets in the headers; use them
rather than magic constants.

Change-Id: Idfdc8a741278d71a5db47c067914c97615c3e02d
Reviewed-on: https://code.wireshark.org/review/864
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-03-29 20:11:46 +00:00
Evan Huus 521bab1e1c Use sized strbufs when extracting tvb strings
We rarely know exactly how long a string will be, but we frequently have a good
lower bound (that's better than the default strbuf size of 16). Starting at that
size probably reduces the amount of allocation/copying needed.

Also make use of the new _finalize() method to save memory and avoid constness
problems.

Change-Id: I3f043bd12c1ccfce5990168fb6531ecd287bec5b
Reviewed-on: https://code.wireshark.org/review/856
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-29 20:01:17 +00:00
Evan Huus 7df883954e Splay tree implementation for wmem
This is a tree implementation intended to replace the current red-black tree in
wmem_tree (which was inherited from emem), assuming there are no regressions.
Splay trees bubble recently accessed keys to the top, and as such have a number
of very nice properties: https://en.wikipedia.org/wiki/Splay_tree

This implementation is a variant known as "independent semi-splaying", which has
better practical performance. It should do about as well as the red-black tree
for random insertions and accesses, but somewhat better for patterned accesses
(such as accessing each key in order, or accessing certain keys very
frequently).

There are a few other changes relative to the red-black tree implementation that
are worth mentioning:
 - Instead of requiring complex keys to be split into guint32 chunks and doing
   this weird trick with sub-trees, I let the keys be arbitrary pointers and
   allowed the user to specify an arbitrary comparison function. If the function
   is NULL then the pointers are compared directly for the simple integer-key
   case.
 - Splay trees do not need to store a red-black colour flag for each node. It is
   also much easier to do without the parent pointer in each node. And due to
   the simpler system for complex keys, I was able to remove the "is_subtree"
   boolean. As such, splay nodes are 12 bytes smaller on 32-bit platforms, and
   16 bytes smaller on a 64-bit platform.

All done in about half the lines of code.

Change-Id: I89fb57e07d2bb7e3197190c7c2597b0c5adcc03b
Reviewed-on: https://code.wireshark.org/review/758
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-29 18:01:55 +00:00
Pascal Quantin a1d4189c5e Upgrade Windows builds to Lua 5.2.1
Change-Id: I5d2058673b69beb8393aae0571703cd9dbb79c4e
Reviewed-on: https://code.wireshark.org/review/863
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-03-29 16:30:53 +00:00
Evan Huus adc46f571c Tighten the NO_MORE_DATA_CHECK macros
We should return if we've already somehow overflowed the apparent length, not
just if we've hit it dead on.

Fixes bug #9932 and probably others.

Change-Id: I2719c3bd38f03e18ea557df962ee4a1beb64c2e8
Reviewed-on: https://code.wireshark.org/review/862
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-29 16:04:50 +00:00
Hadriel Kaplan 302632f4b3 Fix some compiler issues on windows with Lua 5.2
Change-Id: I5c692bbc5fd1a9f0d361413e44e70282c3299901
Reviewed-on: https://code.wireshark.org/review/860
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-03-29 12:36:48 +00:00
Evan Huus 48fc43baad Implement finalize() method for wmem strbuf.
Change-Id: Ib7a2b0d348b3624f41253e2d0995a4a38a9fe45d
Reviewed-on: https://code.wireshark.org/review/859
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-29 12:11:21 +00:00
Pascal Quantin 7785dd00cd Please checkAPI.pl
Change-Id: I78e9d3781df81fd4edda7e9b20749cb096a05499
Reviewed-on: https://code.wireshark.org/review/861
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-03-28 22:51:50 +00:00
Hadriel Kaplan c39060a21c Update README.wslua with latest info.
Change-Id: I20ea6c374f791054f16f0aaba33967b869348ff5
Reviewed-on: https://code.wireshark.org/review/857
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-03-28 19:58:03 +00:00
Bill Meier a8562b2a66 Add handling of OSC over TCP; fix a bug in the UDP heuristic.
Bug Fixed: UDP heuristic wasn't properly setting the dissector
for the UDP conversation.

From https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9837#c3:

 I did a little survey about alternative OSC transmission, but UDP.

 As OSC is packet-based, it is tramitted raw via packet-oriented protocols (e.g. UDP).

 For reliable stream-based protocols (TCP, USB), the raw OSC packet is
 prefixed with the packets Int32 size as a packetization scheme.

 For unreliable stream-based protocols (RS232 and other serial lines),
 the raw OSC packet is SLIP and/or double SLIP encoded as packetization
 scheme.

 There was discussion in the past to make SLIP encoding the default for
 all stream-based protocols, but apparently it has never been adopted
 for any OSC via TCP implementation I've found in the web.

 As OSC is used in networked Audio, most implementations run with the
 Nagle algorithm disable, and send the prefixed length and the raw OSC
 packet separately.

Change-Id: Ife690cc5ea0575c65124a7b441431e1cc6ba5091
Reviewed-on: https://code.wireshark.org/review/858
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-03-28 18:00:41 +00:00
AndersBroman f7c62543f9 tvb_get_ascii_string is really expensive. On a large capture file which I
profiled in october Fetch cost has gone from 15,6M to 24,2M, changing
tvb_get_string() to tvb_get_string_enc() with ENC_UTF_8 where it seems
safe helps a bit and should be done any way.

Change-Id: I4d3e640bfde3304a991c09e2a30ad7dd132fc5ac
Reviewed-on: https://code.wireshark.org/review/855
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-28 14:05:29 +00:00
Pascal Quantin 3438243c1e Fix crash when calling "MAP Summary" dialog when no file is open
Fixes bug 9934

Change-Id: I2915d0715431cf983511fe7f5f036be99bbd2467
Reviewed-on: https://code.wireshark.org/review/853
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-03-28 12:48:50 +00:00
AndersBroman b2509f67b8 Deleted one line to much in previous chgange.
Change-Id: I19d1153558130356286bac55f6cb321d30a767b1
Reviewed-on: https://code.wireshark.org/review/852
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-28 05:48:20 +00:00
Hadriel Kaplan 2c1e673fa2 Allow chained calls with Lua TreeItem functions, and fix a couple of minor errors.
A common Lua idiom is to use chained calls, i.e. tree:foo():bar():choo(). This actually
works for tree:add() because it returns the new child tree item which is then the one
being applied to the next chained call. But it doesn't work beyond that for things like
set_generated() and so on.  So this commit fixes that.

This also fixes the Lua tree:add() function for the FT_BOOL type to let it be a Lua boolean value.
And it reverts a previous change to Struct.tohex() to allow coercion of the argument.

Change-Id: I10f819d363163914ba320c87d4bedebe5b50cacf
Reviewed-on: https://code.wireshark.org/review/851
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-28 04:27:43 +00:00
Martin Kaiser 0ffc690da4 dissect sRGB chunk
Change-Id: I5a9eefb7f5108de0e46b70453a4485b1cbc3983d
Reviewed-on: https://code.wireshark.org/review/850
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-03-27 21:42:23 +00:00
Martin Kaiser ca384a1324 use an expert info if a png chunk is too large for us
Change-Id: I6a06bf297ef68ca351deff2e08eec7cd12ba8fe0
Reviewed-on: https://code.wireshark.org/review/849
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-03-27 21:42:05 +00:00
Hadriel Kaplan ca9c160933 Fix bug9931 'Encapsulated ethernet packets sometimes show invalid FCS'
This fixes part-1 of bug9931: the uninitialized use of a wtap_pkthdr
struct. The second part of the bug deals with dissectors calling
the Ethernet dissector for ecnapsulated Ethernet packets but using
the wrong dissector handle to do so. That's unrelated to the issue this
commit addresses, so I'm splitting them up.

Change-Id: I87be7b736f82dd74d8c261062f88143372b5344c
Reviewed-on: https://code.wireshark.org/review/848
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-27 21:39:57 +00:00
AndersBroman 9a977fc8d0 Add dissection of 3G Interface Type package and add some comments about
the usage of variables in the h248_package_t struct.

Change-Id: Ic5419ab5c20051e56963fe8ea1728d78f95538f0
Reviewed-on: https://code.wireshark.org/review/846
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-27 16:54:05 +00:00
AndersBroman d1bef29125 Regenerate the dissector with the latest template.
Change-Id: Iefdd7122537108c37e71650ad2674418109d2f1b
Reviewed-on: https://code.wireshark.org/review/845
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-27 14:09:23 +00:00
Pascal Quantin 418c3a7f62 NAS EPS: display also detach cause in case of network initiated procedure
Change-Id: I36fef9eb8a81b03f29c812f94524f4cdf056448b
Reviewed-on: https://code.wireshark.org/review/844
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-03-27 12:52:20 +00:00
Pascal Quantin 3dd4ef59bb MBIM: fix identification of DSS streams and add a way to register an external dissector for DSS
Change-Id: Ic7f5708b60ee5846d95725dbbd14d8958d43372e
Reviewed-on: https://code.wireshark.org/review/843
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-03-27 10:12:27 +00:00
AndersBroman 3584a21c87 From Martin Mathiesson: Display Detach Type in info col.
Change-Id: I33692ac93f60cbabec0804f6ee7e75a9d5b9497c
Reviewed-on: https://code.wireshark.org/review/842
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-27 09:50:44 +00:00
Hadriel Kaplan f3fe29f0fc Add paths to Lua package.path so require works for user scripts
This adds the global and personal plugins directories to the
package.path setting in Lua, so doing 'require' will work
properly.

Change-Id: Iec33bc60cd7d41aa122da456db91d4ccc3085f82
Reviewed-on: https://code.wireshark.org/review/841
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-27 05:03:39 +00:00
Martin Kaiser 09055f18a5 two more chunk names
Change-Id: I5a34a59c88a4119be2fac4acdd352d474ffc62cd
Reviewed-on: https://code.wireshark.org/review/840
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-03-26 22:24:44 +00:00
Martin Kaiser 949747697c add some more chunk names
Change-Id: I6d294a901af88f993ca6a44ababad194fb44a693
Reviewed-on: https://code.wireshark.org/review/839
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-03-26 22:16:40 +00:00
Martin Kaiser d5ddfed512 clean up the png dissector
use value_string instead of our own data type
read the type string in one go

Change-Id: I115c99c4636540702c1fd301f09a92a0dd466fcd
Reviewed-on: https://code.wireshark.org/review/838
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-03-26 22:16:22 +00:00
Martin Kaiser 436100c66a use the correct png chunk len
the parameter for proto_tree_add_text() is the length, not the end offset

Change-Id: Ie24d5982b7ff13363061fb087438dd714cae748a
Reviewed-on: https://code.wireshark.org/review/837
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-03-26 22:16:03 +00:00
AndersBroman 482a3cd1f1 More fiddling with heuristic.
Change-Id: I50b78cc38c6f529695ecd54ced0ed94e8a683534
Reviewed-on: https://code.wireshark.org/review/835
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-26 14:57:14 +00:00
AndersBroman 873a96fab1 Fix off by one error
Change-Id: I24c9e988786a95489f918bed2c043e6eb23e4caa
Reviewed-on: https://code.wireshark.org/review/834
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-26 12:11:39 +00:00