Commit Graph

177 Commits

Author SHA1 Message Date
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
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Jakub Zawadzki 5a8783f5b1 Initial commit to support yet another method of passing data between dissectors.
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL

svn path=/trunk/; revision=44860
2012-09-10 21:40:21 +00:00
Jeff Morriss 70851c9765 Register for Diameter's SCTP PPID.
svn path=/trunk/; revision=44501
2012-08-14 20:44:58 +00:00
Bill Meier 638d74d43f Use val_to_str_const() where appropriate;
Also (for a few files):
- create/use some extended value strings;
- remove unneeded #include files;
- remove unneeded variable initialization;
- re-order fcns slightly so prefs_reg_handoff...() at end, etc

svn path=/trunk/; revision=44438
2012-08-10 22:55:02 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Chris Maynard 951b5b9c54 Do not use BASE_NONE for FT_*INT* types.
svn path=/trunk/; revision=43179
2012-06-09 17:56:08 +00:00
Jeff Morriss be965bff75 Don't register 3 (IPAddress) hf's with the same abbreviation but with 3
different types; instead use different abbreviations (filters).

This is in order to prevent running into

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

and seg-faulting when someone applies a filter of, for example,
diameter.Framed-IP-Address .

svn path=/trunk/; revision=43166
2012-06-08 22:23:11 +00:00
Jeff Morriss b4f3ea200c Thinking about it more, how we're storing the application ID isn't a problem.
svn path=/trunk/; revision=43163
2012-06-08 20:08:43 +00:00
Jeff Morriss c75657ad14 Don't call val_to_str() only to then compare the result with "Uknown": use
match_strval() instead.

Also, don't retrieve the application ID 3 more times; we've already got it
in a variable...

Point out a bug regarding how we're storing the application ID for use by
subdissectors (from r34570).

svn path=/trunk/; revision=43162
2012-06-08 19:59:33 +00:00
Bill Meier f0c3ee5c4a Whitespace cleanup: Indentation, trailing, ...
svn path=/trunk/; revision=42266
2012-04-26 16:05:05 +00:00
Bill Meier c1d8dfccb9 It's not kosher to alloc and init a GArray ourselves instead of calling g_array_new().
Fixes Bug #7138 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7138)

A puzzle: why did the buildbot fuzz-testing only start failing on this on 04/18/2012
          since the bug has existed for quite some time ?

svn path=/trunk/; revision=42200
2012-04-23 01:36:57 +00:00
Jeff Morriss c07876603f Fix crash (caused by a corrupted Diameter dictionary) reported in
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6664 :

Add some sanity checks before adding types, vendors, commands, and AVPs.

svn path=/trunk/; revision=41675
2012-03-19 17:12:04 +00:00
Jeff Morriss e043774143 Add detailed decoding for Framed-IPv6-Prefix.
svn path=/trunk/; revision=41532
2012-03-13 15:06:40 +00:00
Jeff Morriss 55634ab2e3 Don't mark a couple of unused parameters are unused.
svn path=/trunk/; revision=41531
2012-03-13 14:43:45 +00:00
Jeff Morriss 2df50d5269 Fix a typo in a function name and some indentation.
svn path=/trunk/; revision=41509
2012-03-12 17:30:38 +00:00
Guy Harris d332082386 Amazingly, there *are* apparently protocols with IPv4 addresses in
byte-swapped form - i.e., not network byte order, but the reverse of
network byte order - as, a long time ago, somebody asked to have the
"little_endian" flag affect the way proto_tree_add_item() fetched IPv4
addresses from the packet.

Use ENC_BIG_ENDIAN for IPv4 addresses (ENC_NA and ENC_BIG_ENDIAN have
the same value, but this makes it clearer that we, sadly, need to care).

svn path=/trunk/; revision=39708
2011-11-02 01:53:37 +00:00
Anders Broman 11d6d8a777 Set the ENC_ on the remaining proto_add_item().
svn path=/trunk/; revision=39683
2011-10-31 07:05:52 +00:00
Bill Meier 794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +00:00
Bill Meier cca6984ab9 Do some more conversions of proto_tree_add_item() 'encoding' arg
(previously missed).

svn path=/trunk/; revision=39450
2011-10-18 00:17:48 +00:00
Bill Meier 67ee5049d4 Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
  the encoding parameter for proto_tree_add_item() calls which directly reference
  an item in hf[] which has a type of:
     FT_BOOLEAN
     FT_IPv4
     FT_EUI64
     FT_GUID
     FT_UINT_STRING

Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260)

svn path=/trunk/; revision=39328
2011-10-10 00:39:31 +00:00
Bill Meier 4e57694d4a Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
 the encoding parameter for proto_tree_add_item() calls which directly reference
 an item in hf[] which has a type of:
    FT_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39288
2011-10-06 03:35:44 +00:00
Bill Meier 94f36ca4ff Use ENC_NA as encoding for proto_tree_add_item() calls which directly reference an hf item (in hf[] with types:
FT_NONE
   FT_BYTES
   FT_IPV6
   FT_IPXNET
   FT_OID

Note: Encoding field set to ENC_NA only if the field was previously TRUE|FALSE|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN

svn path=/trunk/; revision=39260
2011-10-04 22:44:31 +00:00
Anders Broman e9e32d7844 We need to start reassembly on a segment boundary.
svn path=/trunk/; revision=37740
2011-06-21 11:53:33 +00:00
Bill Meier a2b58f051d Add #include <stdlib.h> to files which reference fcns declared in stdlib.h;
(In many cases I previously incorrectly removed the #include <stdlib.h>).

svn path=/trunk/; revision=37334
2011-05-20 19:00:09 +00:00
Bill Meier 9a8d5de2b5 Don't create 2 unneeded subtrees; Fixes Coverity 879 & 880 [UNUSED];
#include <stdio.h> & <time.h> not needed.

svn path=/trunk/; revision=37269
2011-05-18 23:24:50 +00:00
Stephen Fisher 40620b4af5 Change enum type in struct to an int to allow different enum types to
be used for the field display type in the struct.


svn path=/trunk/; revision=36818
2011-04-22 17:25:25 +00:00
Jeff Morriss 50e1634f4c Modify proto_tree_add_bytes_format() and proto_tree_add_bytes_format_value()
so that if the start_ptr is NULL the bytes are extracted from the given TVB
using the given offset and length.

Replace a bunch of:

proto_tree_add_bytes_format*(tree, hf, tvb, offset, length, tvb_get_ptr(tvb, offset, length), [...])

with:

proto_tree_add_bytes_format*(tree, hf, tvb, offset, length, NULL, [...])

svn path=/trunk/; revision=35896
2011-02-10 16:31:00 +00:00