Commit graph

204 commits

Author SHA1 Message Date
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
Evan Huus
260369a45d Build diameter's hf array in a wmem array instead of a garray. Fixes ~270KB of
leak when running epan_cleanup().

svn path=/trunk/; revision=50405
2013-07-06 12:45:33 +00:00
Anders Broman
51723864c1 - Move the export_pdu tap outside of if(tree)
- Have the diameter tap request a tree.

svn path=/trunk/; revision=49475
2013-05-21 05:47:20 +00:00
Anders Broman
e3f8090f76 Add export_pdu_tap to packet-diameter.c
svn path=/trunk/; revision=49448
2013-05-20 18:30:32 +00:00
Anders Broman
6cfe8894b3 set col fence, in case there are more Diameter PDU:s in a transport message.
svn path=/trunk/; revision=49381
2013-05-17 16:24:46 +00:00
Jeff Morriss
ba0b025dd3 Include padding length in the AVP's length.
svn path=/trunk/; revision=48702
2013-04-02 18:15:42 +00:00
Evan Huus
37600a157b Rename value string (and similar) functions to use a consistent pattern. This
was done using textual search+replace, not anything syntax-aware, so presumably
it got most comments as well (except where there were typos).

Use a consistent coding style, and make proper use of the WS_DLL_* defines.

Group the functions appropriately in the header.

I ended up getting rid of most of the explanatory comments since many of them
duplicated what was in the value_string.c file (and were out of sync with the
recent updates I made to those in r48633). Presumably most of the comments
should be in the .h file not the .c file, but there's enough churn ahead that
it's not worth fixing yet.

Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8467

svn path=/trunk/; revision=48634
2013-03-29 00:26:23 +00:00
Jeff Morriss
5c39978e35 And it happens again...
In Yet Another Protocol, implementation A neglected to set the padding bytes
to 0 and implementation B barfed on said padding (interestingly this
protocol's spec does not include the IETF-normal "receiver MUST ignore the
padding" blurb).

So:

Add the AVP to the dissection tree and add an expert info for when it's not
zero.

Also re-order a few of the hfs and remove a couple unneeded temporary
variables.

svn path=/trunk/; revision=48488
2013-03-22 18:13:31 +00:00
Anders Broman
4f5d04e115 From beroset:
remove C++ incompatibilities

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48013
2013-03-02 19:21:38 +00:00
Evan Huus
010c8f9d61 Use wmem memory to build most of the diameter hf and ett arrays.
Cleans up many valgrind errors, since we were losing our pointers to
the arrays before shutdown.

svn path=/trunk/; revision=47702
2013-02-17 15:06:35 +00:00
Jeff Morriss
d206dacb95 Initialize a variable to avoid a (false) may-be-used-uninitialized warning turned error.
svn path=/trunk/; revision=46555
2012-12-16 02:37:06 +00:00
Jeff Morriss
01fd357171 Handle hop-by-hop-id collisions (when matching requests and answers) better:
instead of storing the requests in an se_tree (keyed by hop-by-hop-id),
store an se_tree which is itself keyed by frame number.  When looking for
a matching request, first find the tree of pdus (by hop-by-hop-id) and then
look for the largest frame number less than or equal to the answer's frame
number.  Also verify that the end-to-end-id matches.

Move the conversation structure out of packet-diameter.h: it's only used in
packet-diameter.c

svn path=/trunk/; revision=46553
2012-12-16 01:12:59 +00:00
Guy Harris
f208489b56 Slightly less hacky way to arrange that dictionary_load() be called
before hf_base[] is initialized.

svn path=/trunk/; revision=46271
2012-11-28 23:11:08 +00:00
Jeff Morriss
3029a76dc3 Fix pretty-printing of the application ID in the protocol-details pane by
putting an "unused" variable (which was taken out in r24377) back in.  This
time add a (bogus) "use" of the variable and explain why we're doing what
we're doing.

Use VALS() (in one case anyway) and PINFO_FD_NUM.

svn path=/trunk/; revision=46266
2012-11-28 22:45:31 +00:00
Jeff Morriss
c1c964db17 There's a macro for the Request bit. Use it instead of hard-coded 0x80.
svn path=/trunk/; revision=46249
2012-11-28 16:29:31 +00:00
Martin Kaiser
4cd75a3ce9 make the variable that holds tvb_length_remaining() a signed integer
svn path=/trunk/; revision=45598
2012-10-16 21:07:59 +00:00
Anders Broman
92160cde38 Try to get rid of some of the" pedantic" warnings.
svn path=/trunk/; revision=45553
2012-10-15 08:05:32 +00:00