Commit Graph

150 Commits

Author SHA1 Message Date
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
Jeff Morriss b87a80f196 Add support for 4-byte NTP times (only the seconds) in proto_tree_add_item().
Use it in packet-diameter.c .  Eliminate an unnecessary local variable.

svn path=/trunk/; revision=35875
2011-02-08 02:38:51 +00:00
Guy Harris 9c94a0e7f1 If we have no value to dissect, because the AVP has the wrong length for
the value's type, return NULL as the label, rather than returning an
uninitialized value as the label.

svn path=/trunk/; revision=35335
2011-01-03 08:21:35 +00:00
Guy Harris cff9f14959 Do length checking for Integer32, Integer64, Unsigned64, Float32, and
Float64, as well as for Unsigned32.

svn path=/trunk/; revision=35332
2011-01-03 03:30:20 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Jeff Morriss 19b2af1e70 Make some symbols static.
svn path=/trunk/; revision=35140
2010-12-06 23:20:21 +00:00
Anders Broman 4aef1cc2ed Use value_string ext for address family.
svn path=/trunk/; revision=34887
2010-11-15 21:05:03 +00:00
Anders Broman 768498f956 Make value_string_ext for all AVP:s with enums.
svn path=/trunk/; revision=34835
2010-11-10 20:11:38 +00:00
Anders Broman 1fbfce3411 Make a more descriptive name for the per vendor avp value_string_ext.
svn path=/trunk/; revision=34831
2010-11-10 14:43:20 +00:00
Anders Broman 8785d27bd8 Define unused AVP:s to make it possible to use value_string_ext for
common AVP:s.

svn path=/trunk/; revision=34824
2010-11-09 17:23:57 +00:00
Bill Meier a88357dbf4 Remove some #if 0'd code I left in by mistake a while back....
svn path=/trunk/; revision=34572
2010-10-19 17:43:52 +00:00
Anders Broman 88622252b1 From Tamás Regõs:
Make application ID readable from sub dissectors.

svn path=/trunk/; revision=34570
2010-10-19 15:21:05 +00:00
Jeff Morriss b0ab72ac70 Use port range for SCTP too.
svn path=/trunk/; revision=34557
2010-10-18 15:56:06 +00:00
Bill Meier 15851701e8 Rework "extended value strings":
- Allow direct access when a range of values begins with a value other than 0;
- Provide value_string_ext_new() for creating extended value strings at runtime;
- Do access to value_string_ext members via a macro (all but value_string.c);
- Update documentation.

svn path=/trunk/; revision=34514
2010-10-14 17:50:35 +00:00
Bill Meier 7219ee2a49 Use val_to_str_ext() & friends to access sminmpec_values[];
Also: packet-nhrp.c: #include sminmpec.h not req'd;

svn path=/trunk/; revision=34143
2010-09-17 04:51:21 +00:00
Martin Mathieson a5532739d6 Remove a few more calls to check_col()
svn path=/trunk/; revision=34124
2010-09-15 16:16:23 +00:00
Anders Broman a9e4145c94 Fix a copy paste error.
svn path=/trunk/; revision=33200
2010-06-09 20:24:23 +00:00
Bill Meier 7b85f43d0e Do some constifying [or other] based upon gcc -Wwrite-strings warnings.
svn path=/trunk/; revision=33198
2010-06-09 18:12:17 +00:00
Jeff Morriss a9b0b95b8a Initialize no_vs_avps_ext with a pointer to a valid 'match' function so we don't crash in val_to_str_ext() if an AVP from an unknown vendor is encountered.
svn path=/trunk/; revision=33051
2010-06-02 16:01:51 +00:00
Anders Broman 2543a7ab91 Use value_string_ext for AVP:s
svn path=/trunk/; revision=32932
2010-05-24 14:20:53 +00:00
Jeff Morriss 729de1a635 As suggested in http://www.wireshark.org/lists/wireshark-dev/200809/msg00075.html
(as referenced in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2907 ) and
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3411 :

Write a new convenience routine for finding a conversation and, if it is not
found, create it.  The frame number and addresses are taken from pinfo (as is
the common case).

Use this function in a bunch of dissectors.

svn path=/trunk/; revision=32790
2010-05-13 18:28:34 +00:00
Anders Broman f5aa11cf3e Register a dissector table for dissecting Ericsson AVP:s.
svn path=/trunk/; revision=32712
2010-05-07 11:08:56 +00:00
Bill Meier c7b2d41346 Move proto_reg_handoff... to the end of the file.
Whitespace cleanup: remove trailing spaces from a few lines.

svn path=/trunk/; revision=32569
2010-04-26 22:19:34 +00:00
Anders Broman 1a855bfde2 From Andrej Kuehnal:
New feature: extract specified diameter AVPs from large capture files.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4560

svn path=/trunk/; revision=32132
2010-03-06 20:54:58 +00:00
Jaap Keuter fe2a12d423 Clean up header fields.
svn path=/trunk/; revision=30395
2009-10-08 05:43:19 +00:00
Kovarththanan Rajaratnam 17c9803cac Sanitize epan includes
svn path=/trunk/; revision=29499
2009-08-21 20:25:24 +00:00
Kovarththanan Rajaratnam 083729e02c Add PTREE_FINFO and use PITEM_FINFO when possible.
svn path=/trunk/; revision=29355
2009-08-09 17:57:31 +00:00
Kovarththanan Rajaratnam e971354a54 Don't guard col_set_str (COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29340
2009-08-09 06:26:46 +00:00