Commit Graph

220 Commits

Author SHA1 Message Date
Michael Mann 9d5f9141af Eliminate proto_tree_add_text from some dissectors.
Other minor cleanup while in the area.

Change-Id: Id8d957d3d68a2e3dd5089f490bd59d773e1be967
Reviewed-on: https://code.wireshark.org/review/3427
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-05 07:36:26 +00:00
AndersBroman 0f85608d3a Use wmem for application Ids
Remove soft deprecated APIs

Change-Id: Iecd2f552c1abb7bb2c6969073b3c245af22f4fcd
Reviewed-on: https://code.wireshark.org/review/3230
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-28 18:27:45 +00:00
AndersBroman ff01321da2 Sort diameter.applicationId fix a typo.
Change-Id: Id585371df929cdff17f98dddbebf063fa000ff56
Reviewed-on: https://code.wireshark.org/review/3229
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-28 17:36:37 +00:00
Kevin Cox 34e413f66d Make value_string_ext const-correct.
There is still some const-incorrect usage of them but those can be ironed
out after this change has been made.

Change-Id: Iba0631c804bdab34d7c0232b49967130e3370488
Reviewed-on: https://code.wireshark.org/review/3199
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-27 22:02:42 +00:00
Michael Mann 14824e6adf Revert "Fixup: tvb_* -> tvb_captured"
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html

This reverts commit 246fe2ca4c.

Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f
Reviewed-on: https://code.wireshark.org/review/2430
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19 18:25:59 +00:00
Dario Lombardo 246fe2ca4c Fixup: tvb_* -> tvb_captured
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f
Reviewed-on: https://code.wireshark.org/review/2377
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:14:58 +00:00
Michael Mann 73217d9f3f tvb_new_subset -> tvb_new_subset_length when length parameters are equal.
tvb_new_subset -> tvb_new_subset_remaining it appears that's what the intention is.

Change-Id: I2334bbf3f10475b3c22391392fc8b6864454de2d
Reviewed-on: https://code.wireshark.org/review/1999
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-07 15:41:07 +00:00
Pascal Quantin b2af5b066a Convert a few dissectors with simple request/response tracking from red/black tree to hash map
Update the readme file accordingly

Change-Id: I056d1ab1f77df641b83fa9b3618b6c25d66e1a83
Reviewed-on: https://code.wireshark.org/review/1420
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-29 10:23:32 +00:00
Pascal Quantin ad33357e62 Exported PDU: add support for more than 32 tags
Change-Id: Idc9f105164919827a8a81c88b5a56de4fa25df0b
Reviewed-on: https://code.wireshark.org/review/1197
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-18 20:15:04 +00:00
Jeff Morriss 26dcdbb402 Tweak the Diameter heuristics a bit more.
Increase the max Diameter message size to 65534 and reject messages whose
flags have both the E- and R-bits set.

Change-Id: Ib11701a47d23ff042a346d59c56f9f0f4410e6b7
Reviewed-on: https://code.wireshark.org/review/990
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-07 04:12:13 +00:00
Jeff Morriss 5bb64c00b6 Strengthen the Diameter heuristics to avoid trying to reassemble enormous messages.
Fixes some heuristics mistakes pointed out in
http://ask.wireshark.org/questions/31227/diameter-reassembly-malformed-packets

Change-Id: Iffc97d46cee5dd532fec0031286927fbcb86c095
Reviewed-on: https://code.wireshark.org/review/949
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-04 00:11:12 +00:00
Pascal Quantin 488f2a0974 Exported PDU: add support for data length on the wire
Change-Id: Iff14ec4d0297ec85f3597b33871fb0ab5256a597
Reviewed-on: https://code.wireshark.org/review/728
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-19 05:13:30 +00:00
AndersBroman fcf1c44b50 Make the avp_str available to sub dissectors and Let the subdissector have
precedence filling in the avp_item string. Use that in a couple of places.

Change-Id: I1af7a1ca4c14fb56ddeaab336202e6c2a18e556b
Reviewed-on: https://code.wireshark.org/review/699
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-16 19:15:54 +00:00
AndersBroman 4b2ec6b335 Display framed_ipv6_prefix as an IPv6 address even when it's not the full
16 bits.

Change-Id: I6cef08e2da9467cb54b5d08526c77c87e7afe1fa
Reviewed-on: https://code.wireshark.org/review/645
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-14 14:33:41 +00:00
AndersBroman c9956e35f2 Use dissector_try_uint_new() and include diam_sub_dis_inf when calling all
AVP sub dissectors.

Change-Id: I6dcc362ea755794d3e18d8d27ed2128b46bd887b
Reviewed-on: https://code.wireshark.org/review/642
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-13 20:33:54 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Anders Broman 95ed1b4977 As spotted by Joerg; make a HFILL_INIT(hf) macro and use it to init the private part of the hf structure.
svn path=/trunk/; revision=54843
2014-01-19 09:40:04 +00:00
Anders Broman 493ba3e367 Try to fix warning: initializer element is not computable at load time.
svn path=/trunk/; revision=54832
2014-01-17 18:58:50 +00:00
Anders Broman a49fee443b Fix a bug intrduced in http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=54820
svn path=/trunk/; revision=54831
2014-01-17 18:55:49 +00:00
Anders Broman efbecb3e9a Fix a couple of
warning: initializer element is not computable at load time

svn path=/trunk/; revision=54820
2014-01-15 19:29:03 +00:00
Guy Harris c1b602584d Don't make promises of constness that we can't honor.
svn path=/trunk/; revision=54757
2014-01-14 03:24:37 +00:00
Anders Broman 21cc278905 Fix a typo.
svn path=/trunk/; revision=54597
2014-01-04 23:41:22 +00:00
Evan Huus adff2b3b50 Get rid of some useless intermediate ep-memory when building Diameter arrays.
svn path=/trunk/; revision=54421
2013-12-23 21:09:26 +00:00
Bill Meier ffb3264a99 #if 0 some unused #defines.
svn path=/trunk/; revision=54306
2013-12-20 16:03:24 +00:00
Jakub Zawadzki 2c015bb386 Fix some const/ not const warnings.
svn path=/trunk/; revision=54114
2013-12-15 12:35:00 +00:00
Jakub Zawadzki 5c79cbf152 Fix some trivial warnings.
svn path=/trunk/; revision=54085
2013-12-14 10:29:26 +00:00
Chris Maynard c5e358116c Reject the packet if data is NULL.
svn path=/trunk/; revision=53898
2013-12-10 03:25:04 +00:00
Jakub Zawadzki c67d38cf15 Rename base_display_* to field_display
This is preparation to support ->display for FT_STRING values.

svn path=/trunk/; revision=53820
2013-12-07 10:41:42 +00:00
Jörg Mayer 53394aca2c Fix
[  5%] Building C object epan/CMakeFiles/epan.dir/dissectors/packet-diameter.c.o
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-diameter.c: In function ‘dissect_diameter_avp’:
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-diameter.c:621:37: error: ‘avp_str’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  if (avp_str) proto_item_append_text(avp_item," val=%s", avp_str);
                                     ^
cc1: all warnings being treated as errors
make[2]: *** [epan/CMakeFiles/epan.dir/dissectors/packet-diameter.c.o] Error 1


svn path=/trunk/; revision=53787
2013-12-04 21:32:16 +00:00
Anders Broman 5c40dde043 "RFC 6733 [5] specifies the Experimental-Result AVP containing Vendor-Id AVP and Experimental-Result-Code AVP. The Experimental-Result-Code AVP (AVP Code 298) is of type Unsigned32 and contains a vendor-assigned value representing the result of processing a request."
This means we have to store the value of the Vendor Id AVP in the grouped  Experimental-Result AVP to be able to dissect the value of 
Experimental-Result-Code according to the vendor specified values(if known). This patch implements that with a dissector table to register vendor dissectors for the result code.

svn path=/trunk/; revision=53785
2013-12-04 20:55:52 +00:00
Bill Meier 7727623d8c Do some constification;
Create/use value_string_ext_free();
Display certain numbers also as hex in the
   "forced to fall back to linear search: ..." value-string warning msg
Add editor-modelines to some files;
Do some whitespace changes.

svn path=/trunk/; revision=53484
2013-11-21 18:46:40 +00:00
Guy Harris db25270df8 Move the epan/filesystem.c routines to wsutil; they're not specific to
packet dissection, they're specific to the entire Wireshark suite of
programs.

svn path=/trunk/; revision=53377
2013-11-17 02:55:14 +00:00
Jakub Zawadzki ae59b09443 Add missing includes in order to remove exceptions.h from proto.h (next commit).
svn path=/trunk/; revision=53230
2013-11-10 15:59:37 +00:00
Michael Mann 8081cf1d90 Add data parameter to tcp_dissect_pdus() as well as convert it to using "new" style dissectors.
Now that "bytes consumed" can be determined, should tcp_dissect_pdus() take advantage of that?

Should tcp_dissect_pdus return length (bytes consumed)?  There are many dissectors that just call tcp_dissect_pdus() then return tvb_length(tvb).  Seems like that could all be rolled into one.

svn path=/trunk/; revision=53198
2013-11-09 17:46:28 +00:00
Michael Mann 86951290ea Adjust when dissect_diameter_avp loop is called to avoid access violations.
from Lukasz Markowski

svn path=/trunk/; revision=52951
2013-10-29 15:18:05 +00:00
Michael Tüxen 9a2f5a2db2 Fix the compilation.
I guess this is what is meant. Only compile tested...

svn path=/trunk/; revision=52928
2013-10-28 18:59:33 +00:00
Michael Mann 5de5fe6cb1 Pass diam_sub_dis_t directly to the subdissectors instead of using pinfo->private_data.
svn path=/trunk/; revision=52919
2013-10-28 15:59:26 +00:00
Pascal Quantin 074349264e Convert some dissectors to wmem (leaving uat-like memory with emem for now)
svn path=/trunk/; revision=52031
2013-09-14 10:53:29 +00:00
Anders Broman 753afe5fa4 Fix UDP port range.
svn path=/trunk/; revision=51977
2013-09-12 18:17:41 +00:00
Michael Mann 9e3f9b449f expert_add_info_format_text -> expert_add_info_format
svn path=/trunk/; revision=51852
2013-09-09 00:44:09 +00:00
Evan Huus 48089ba4ca Use epan-scoped memory for building more of the diameter table stuff.
svn path=/trunk/; revision=51754
2013-09-04 21:06:56 +00:00
Michael Mann e597acdc48 Batch of filterable expert info.
svn path=/trunk/; revision=51625
2013-09-01 13:05:27 +00:00
Evan Huus 44c91cb02a More wmem.
svn path=/trunk/; revision=51617
2013-08-31 15:58:15 +00:00
Anders Broman 2a0b65b827 Make the UDP port preference a range.
svn path=/trunk/; revision=51521
2013-08-26 05:14:53 +00:00
Anders Broman d8e8f48636 Simplify adding and deletetion of port ranges by adding new methods.
If no one has any objection I'll edit the deocumentation later.

svn path=/trunk/; revision=51517
2013-08-25 18:48:26 +00:00
Anders Broman ba1bee9516 On request from Tommy Wu:
Enable Diameter over UDP dissection as there is an application using it.

svn path=/trunk/; revision=51473
2013-08-22 17:21:20 +00:00
Michael Mann a22331bbd2 Convert remaining proto_item_set_expert_flags in dissector directory.
svn path=/trunk/; revision=51142
2013-08-05 01:54:15 +00:00
Anders Broman 5e56e72953 Dissect S6 feature list.
svn path=/trunk/; revision=50796
2013-07-22 20:44:01 +00:00
Jeff Morriss 7d76eb0ad3 Catch exceptions from AVP subdissectors in case the AVPs following the one
that threw the exception are OK--this allows us to view as much of the message
as possible even when Wireshark doesn't like whatever was in a particular
AVP.

Instead of using the 'volatile' keyword to avoid variable-clobbering warnings,
put the exception-catching code in its own function with no local variables.

svn path=/trunk/; revision=50728
2013-07-18 15:08:15 +00:00
Evan Huus b4df55d204 Build dynamic diameter value_string arrays with wmem arrays not garrays.
Fixes another ~60KB of leaks.

svn path=/trunk/; revision=50412
2013-07-06 18:01:57 +00:00