Commit graph

139 commits

Author SHA1 Message Date
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
Stig Bjørlykke
4d8dd01e8e Changed flags_set_truth -> tfs_set_notset
svn path=/trunk/; revision=28989
2009-07-07 14:54:15 +00:00
Stig Bjørlykke
0437f102c3 From Kovarththanan Rajaratnam:
More FT_XXX cleanup.

svn path=/trunk/; revision=28971
2009-07-07 09:02:59 +00:00
Anders Broman
6a5ea97ff6 From Sebastien Decugis:
Add Missing Diameter EAP support.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3600

svn path=/trunk/; revision=28849
2009-06-26 05:48:03 +00:00
Stig Bjørlykke
8531980952 From Kovarththanan Rajaratnam:
More hf_register_info related cleanup.

svn path=/trunk/; revision=28832
2009-06-24 02:17:12 +00:00
Stig Bjørlykke
b228488bc0 From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
    for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
    FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero

svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
Anders Broman
4dd4f565ce From Abhik Sarkar:
Diameter SRT stats - split by command
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3403

svn path=/trunk/; revision=28039
2009-04-13 18:14:25 +00:00
Bill Meier
6f92b028aa Use some default true_false_string's.
svn path=/trunk/; revision=27983
2009-04-07 12:20:41 +00:00
Gerald Combs
6d04f793f0 Back out r27047 and r27053.
svn path=/trunk/; revision=27062
2008-12-19 17:39:52 +00:00
Gerald Combs
fc71188963 Update calls to proto_tree_add_bytes_format to reflect r27047.
svn path=/trunk/; revision=27053
2008-12-18 20:19:49 +00:00
Anders Broman
68ef96b3bf From Abhik Sarkar:
Support for Diameter conversations and service response time.

svn path=/trunk/; revision=26785
2008-11-15 15:52:39 +00:00
Bill Meier
5ac2ba6354 Minor changes related to proto_reg_handoff & pref ranges
svn path=/trunk/; revision=26254
2008-09-23 15:03:39 +00:00