aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2014-04-01Fixed display of IIN during reads and writes of IIN object.Graham Bloice1-17/+28
Added (hidden) dnp3.addr field set by both source and destination dnp3 addresses to allow easier filtering. Change-Id: I04980c24c1b9f30a2ee5a0d5ea4ac32ae877504e Reviewed-on: https://code.wireshark.org/review/908 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Graham Bloice <graham.bloice@trihedral.com>
2014-04-01For now use UTF-8 for all strings for performance reasons.AndersBroman1-78/+78
Change-Id: If47ffbee58d534ce3d44f00e1e5b966bc42a2ea8 Reviewed-on: https://code.wireshark.org/review/906 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-01Fix checkApis perl script false positive proto_tree_add with ENC_*Hadriel Kaplan1-1/+2
In epan/proto.c in function proto_tree_add_split_bits_crumb, the proto_tree_add_text function is called with one of its arguments using ENC_BIG_ENDIAN, but it's not an argument for proto_tree_add_text itself but instead a function being called inside it. checkAPIs.pl tries to avoid this in check_proto_tree_add_XXX_encoding, by removing parenthesis arguments, but in this acse there are newlines between the arguments, causing the regex to not catch them. This commit fixes the regex. Change-Id: I70ef79d5436ba2ec04ffdc3d9939c7aa2cdf6a1f Reviewed-on: https://code.wireshark.org/review/902 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-01Fix tshark.c to pass checkAPIs scriptHadriel Kaplan1-3/+3
Since tshark.c was using strdup, perror, and g_main_quit, changes to the file won't pass checkAPIs; so this commit replaces those with the approved functions; except strdup, which was unecessary. Change-Id: I031aa44594f2b96960a45f48537ab4e9a10d34b1 Reviewed-on: https://code.wireshark.org/review/898 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-01Fix proto.c to pass checkAPIs scriptHadriel Kaplan1-7/+7
Since proto.c was using strcat(), changes to the file won't pass checkAPIs. So this commit replaces it with the appropriate function, and also replaces the deprecated tvb_length_remaining and tvb_ensure_length_remaining function calls with the new versions, since checkAPIs was warning about that too. This commit does not change the ep_* memorry calls to the new wmem-based ones though, as that's a bigger deal than this trivial commit I think. Change-Id: I51e6d5b3a6e03233f2695c890ff4c10d02fdb0c0 Reviewed-on: https://code.wireshark.org/review/905 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-01Update encap_table_base.Guy Harris1-0/+24
As the comment after the WTAP_ENCAP_ list says, "After adding new item here, please also add new item to encap_table_base array". Change-Id: I918603fa271978b3a81525466c5f4067efc7a783 Reviewed-on: https://code.wireshark.org/review/897 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-01Copy randpkt.exe & randpkt.pdb to install directory during windows build.Bill Meier1-0/+2
Change-Id: I6ef6b181897bd3d35dc94ebb2d04aaa209d8df6e Reviewed-on: https://code.wireshark.org/review/904 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2014-04-01Fix two bugs and do misc other minor changes;Bill Meier1-168/+240
Bugs fixed: - col_...() should not be called under 'if (tree)'; - proto_reg_handoff_pdc(): pdc tcp.port preference change was handled incorrectly; Minor changes: - Move proto_reg_handoff...() to the end of the file as per convention; - new_register_dissector...() call not needed; - Remove some unneeded initializers; - 'xxx++' ==> 'xxx += 1' in a few instances; - widen a few variables (guint? ==> guint); - Add XXX comment about possible simplification of the code; - Remove unneeded #include <epan/reassemble.h>; - Reformat hf[] entries for readability; - Do whitespace changes; Change-Id: Ib9224f0c6392a45c19656a63bbac97fbaf3acc08 Reviewed-on: https://code.wireshark.org/review/900 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2014-04-01Fix expert_...() calls to not be under 'if (tree)';Do other minor changes;Bill Meier1-117/+122
Minor changes; - Remove #include <epan/etypes.h>; It's not needed; - Do some whitespace changes; - Use tab-width=8 in editor modelines Change-Id: I84a1c9bc814fae384c4d5a434c2f9aed865c76ae Reviewed-on: https://code.wireshark.org/review/899 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2014-03-31Remove 3 dups from .gitignoreBill Meier1-3/+0
Change-Id: I81434f311568d42dd897461365a5c345dd9ff1bc Reviewed-on: https://code.wireshark.org/review/893 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2014-03-31Continue to remove $Id$ from top of fileAlexis La Goutte24-47/+0
(Using sed : sed -i '/^\*\* \$Id\$/,+1 d') (2 star and space) Change-Id: I48505ffb8bfa103cd7db0117e18cdb1925a7034d Reviewed-on: https://code.wireshark.org/review/884 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31Continue to remove $Id$ from top of fileAlexis La Goutte7-14/+5
Last one $Id$ (remove by hand) to make checkAPI haapy ! Change-Id: I5adfdcac0629a36e08c5fe3ea7960bdbc251364f Reviewed-on: https://code.wireshark.org/review/887 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31Continue to remove $Id$ from top of fileAlexis La Goutte15-17/+0
(Using sed :sed -i '/^\/\* \$Id\$ \*\//,+0 d') ( /* $Id */ ) Change-Id: I46e928d7f2a307c35876ed5d34cb6b7cccfcd6e9 Reviewed-on: https://code.wireshark.org/review/886 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31Continue to remove $Id$ from top of fileAlexis La Goutte339-634/+6
(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-31Continue to remove $Id$ from top of fileAlexis La Goutte11-22/+0
(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-31Continue to remove $Id$ from top of fileAlexis La Goutte17-33/+0
(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-31Continue to remove $Id$ from top of fileAlexis La Goutte47-47/+0
(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-31Doc tweaks and macro parameterizationEvan Huus2-62/+73
Change-Id: I9898bedf05a785683e79866a149336cbbf402d27 Reviewed-on: https://code.wireshark.org/review/892 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-31Continue to remove $Id$ from top of fileAlexis La Goutte6-18/+0
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-31Continue to remove $Id$ from top of fileAlexis La Goutte35-69/+1
(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-31Continue to remove $Id$ from top of fileAlexis La Goutte39-116/+38
(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-31Continue to remove $Id$ from top of fileAlexis La Goutte35-74/+0
(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-31Continue to remove $Id$ from top of fileAlexis La Goutte7-14/+0
(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-31Use tvb_get_string_enc() with UTF_8 when checking headers as it's faster.AndersBroman1-1/+1
Change-Id: I88cd6f71c1fcbf67948dd0ebdc6e5641d6ba111c Reviewed-on: https://code.wireshark.org/review/891 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31According to RFC 3261AndersBroman1-50/+51
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-31Inlining wmem_strbuf_grow seems to give better performance.AndersBroman1-1/+1
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-31Add --enable-extra-clang-checks for autotools and CMakeListAlexis La Goutte3-8/+41
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-31Fix Argument with 'nonnull' attribute passed null found by ClangAlexis La Goutte1-0/+1
Change-Id: Ie59c379a4f00c807ebc50c95eea2017f8cac0c69 Reviewed-on: https://code.wireshark.org/review/796 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-31packet-osc dissector bug fix of path validity funcHanspeter Portner1-2/+3
- '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-30Fix fuzz-test.sh '-b' option so it works again; Do some other ↵Bill Meier4-36/+44
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-30Fix Bug 9938 'tshark "-Y -2 -w" saves non-dependent frames'Hadriel Kaplan1-3/+10
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[Automatic manuf, services and enterprise-numbers update for 2014-03-30]Gerald Combs3-8/+185
Change-Id: Iff714193adc4035d96f69d4944b43da7edb3cfa8 Reviewed-on: https://code.wireshark.org/review/869 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-29Hide unused variable.Guy Harris1-1/+4
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-29Rename "size" variable to "length", to match other string routines.Guy Harris1-4/+4
Change-Id: I385345cfafc7e7b4d3e66713fb0fe570b39f438d Reviewed-on: https://code.wireshark.org/review/865 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-03-29Add a pcorey48tohll() macro, and use #defines for some offsets.Guy Harris1-26/+25
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-29Use sized strbufs when extracting tvb stringsEvan Huus1-33/+19
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-29Splay tree implementation for wmemEvan Huus6-1/+711
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-29Upgrade Windows builds to Lua 5.2.1Pascal Quantin6-11/+12
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-29Tighten the NO_MORE_DATA_CHECK macrosEvan Huus2-2/+2
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-29Fix some compiler issues on windows with Lua 5.2Hadriel Kaplan4-6/+13
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-29Implement finalize() method for wmem strbuf.Evan Huus3-0/+30
Change-Id: Ib7a2b0d348b3624f41253e2d0995a4a38a9fe45d Reviewed-on: https://code.wireshark.org/review/859 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-28Please checkAPI.plPascal Quantin1-3/+3
Change-Id: I78e9d3781df81fd4edda7e9b20749cb096a05499 Reviewed-on: https://code.wireshark.org/review/861 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-03-28Update README.wslua with latest info.Hadriel Kaplan1-56/+135
Change-Id: I20ea6c374f791054f16f0aaba33967b869348ff5 Reviewed-on: https://code.wireshark.org/review/857 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-03-28Add handling of OSC over TCP; fix a bug in the UDP heuristic.Bill Meier1-26/+92
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-28tvb_get_ascii_string is really expensive. On a large capture file which IAndersBroman2-49/+49
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-28Fix crash when calling "MAP Summary" dialog when no file is openPascal Quantin1-0/+4
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-28Deleted one line to much in previous chgange.AndersBroman1-0/+1
Change-Id: I19d1153558130356286bac55f6cb321d30a767b1 Reviewed-on: https://code.wireshark.org/review/852 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-28Allow chained calls with Lua TreeItem functions, and fix a couple of minor ↵Hadriel Kaplan5-23/+121
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-27dissect sRGB chunkMartin Kaiser1-0/+23
Change-Id: I5a9eefb7f5108de0e46b70453a4485b1cbc3983d Reviewed-on: https://code.wireshark.org/review/850 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-03-27use an expert info if a png chunk is too large for usMartin Kaiser1-8/+20
Change-Id: I6a06bf297ef68ca351deff2e08eec7cd12ba8fe0 Reviewed-on: https://code.wireshark.org/review/849 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>