Commit Graph

96 Commits

Author SHA1 Message Date
Evan Huus a6415ece0a Rename a couple of to_str functions to have ep_ in the name. This makes it
obvious that the returned string is ephemeral, and opens up the original names
in the API for versions that take a wmem pool (and thus can work in any scope).

svn path=/trunk/; revision=54249
2013-12-19 15:49:09 +00:00
Jakub Zawadzki 715e2d6699 Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54095
2013-12-14 16:09:57 +00:00
Jakub Zawadzki 1899903f69 Include <epan/to_str.h> only when needed.
svn path=/trunk/; revision=53189
2013-11-09 13:41:10 +00:00
Bill Meier 9874da2fcb #if 0 numerous "unused const variables" (mostly value-string-arrays);
Also; fix a few "set but not used" warnings.

svn path=/trunk/; revision=52780
2013-10-23 06:29:11 +00:00
Anders Broman 49b08e6694 From Masayuki Takemura:
According to 3GPP R8/R9/R10/R11, the mobility option "3GPP Specific PMIPv6 error
code" is 1 octet length.

However, in the source file packet-mip6.c, the length of the option is set to 4 octets (around line 1744):

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

svn path=/trunk/; revision=52218
2013-09-25 21:11:25 +00:00
Pascal Quantin 102c452bcb More emem -> wmem conversion:
- tvb_get_g_stringz()/tvb_get_ephemeral_stringz()/tvb_get_seasonal_stringz() -> tvb_get_stringz()
- tvb_get_g_stringz_enc()/tvb_get_ephemeral_stringz_enc() -> tvb_get_stringz_enc()
- tvb_get_ephemeral_unicode_stringz() -> tvb_get_unicode_stringz()
- tvb_bcd_dig_to_ep_str() -> tvb_bcd_dig_to_wmem_packet_str()
- update docs accordingly

svn path=/trunk/; revision=52180
2013-09-22 20:04:35 +00:00
Pascal Quantin 514b38fbdd Make it more obvious that the function is using wmem memory
svn path=/trunk/; revision=52162
2013-09-21 11:08:35 +00:00
Michael Mann b38ee917b1 Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if hf_ field name is the first part of the formatted string. This was done with a perl script on the dissectors directory (packet-*.c), followed by manual inspection of the output. The manual inspection yielded a few cases that really should have been proto_tree_add_uint or proto_tree_add_item, so I updated them accordingly.
The script didn't catch as many as I would have liked, but it's a start.

The most common (ab)use of proto_tree_add_uint_format was for appending strings to CRC/checksum values to note good or bad CRC/checksum.

svn path=/trunk/; revision=52045
2013-09-15 01:48:30 +00:00
Pascal Quantin 84bf0acc00 Convert a few dissectors from EMEM to WMEM API
svn path=/trunk/; revision=51597
2013-08-30 14:49:55 +00:00
Gerald Combs ac22b33f4f Mark a parameter unused.
svn path=/trunk/; revision=50790
2013-07-22 15:41:46 +00:00
Pascal Quantin d5922fb41f Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8958 :
Highlight the right number of bytes for the PadN option data field

svn path=/trunk/; revision=50787
2013-07-22 14:19:04 +00:00
Pascal Quantin 4a84c0987e Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8957 :
remove a copy /paste error triggering a malformed exception when dissecting IPv4 DHCP Support Mode option

svn path=/trunk/; revision=50786
2013-07-22 13:00:41 +00:00
Chris Maynard e37533ced7 Fix warnings: comma at end of enumerator list.
svn path=/trunk/; revision=50640
2013-07-15 21:37:55 +00:00
Jeff Morriss df5c2548dd ip_proto.h now requires expert.h.
svn path=/trunk/; revision=50249
2013-06-30 11:06:32 +00:00
Michael Mann ea177a2575 Batch of filterable expert infos
svn path=/trunk/; revision=49596
2013-05-27 17:30:43 +00:00
Anders Broman af2cda1cc3 Introduce a dissector table for vendor extensions.
svn path=/trunk/; revision=48885
2013-04-16 18:13:40 +00:00
Anders Broman 9a5368a705 Dissect GRE Key and Service Selection.
svn path=/trunk/; revision=48254
2013-03-11 19:31:59 +00:00
Bill Meier 959ae3d687 Use '#if 0 ... #endif' rather than /** ... **/ to comment out
unused hf[] entries (which I should have done in the first place).


svn path=/trunk/; revision=47391
2013-01-31 18:35:06 +00:00
Bill Meier c929e42eb4 Fix various instances of unused hf[] entries found
by checkhf.

svn path=/trunk/; revision=47312
2013-01-26 22:43:34 +00:00
Anders Broman 39b51c7c07 Dissect 3GPP PCO option.
svn path=/trunk/; revision=47145
2013-01-18 09:49:22 +00:00
Anders Broman 27b5d556cb Dissect Handover Initiate/Handover Acknowledge messages.
svn path=/trunk/; revision=45836
2012-10-30 13:06:03 +00:00
Anders Broman 3d194979d6 Add IE/Options dissection.
svn path=/trunk/; revision=45829
2012-10-29 16:02:51 +00:00
Evan Huus 4105ae6c6c Fix null-pointer dereference in mip6 dissector when optp is NULL because
we don't recognize the option.

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

svn path=/trunk/; revision=45822
2012-10-28 20:23:06 +00:00
Bill Meier 953283a3d7 Changes:
- Remove 'if (tree)' around an indirect call to expert...();
- Create/use extended value strings as appropriate;
- Localize some variables;
- Remove unneeded initializers;
- Reformat hf[] array entries (use a consistent format);
- Use a consistent indentation and a consistent whitespace style.

svn path=/trunk/; revision=45821
2012-10-28 19:54:29 +00:00
Anders Broman 526f61a340 fix [-Werror=uninitialized]
svn path=/trunk/; revision=45819
2012-10-28 18:33:12 +00:00
Anders Broman 6266e87f84 Only add a subtree if optp->subtree_index is non NULL. should fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7920
svn path=/trunk/; revision=45818
2012-10-28 18:04:45 +00:00
Anders Broman a579e9875b Prepare to dissect 3GPP options.
svn path=/trunk/; revision=45797
2012-10-26 15:35:41 +00:00
Anders Broman b3572877da More options dissecton.
svn path=/trunk/; revision=45796
2012-10-26 13:29:02 +00:00
Jeff Morriss 827312f886 Mark a couple of parameters as unused. Fix up indentation (replace 4-space tabs with spaces) and trailing white space.
svn path=/trunk/; revision=45787
2012-10-25 16:15:58 +00:00
Anders Broman 59234a6b5e - Pretify output a bit more.
svn path=/trunk/; revision=45785
2012-10-25 15:57:05 +00:00
Anders Broman ae4115bcdb - Dissect more options.
- Correct a Timestamp bug.
- Try to pretify the options dissection.

svn path=/trunk/; revision=45783
2012-10-25 12:54:37 +00:00
Anders Broman 1d1575aae7 Mark unused parameter.
svn path=/trunk/; revision=45757
2012-10-24 14:08:47 +00:00
Anders Broman 7787c20c6b Add dissection of a number of options.
svn path=/trunk/; revision=45756
2012-10-24 13:44:25 +00:00
Anders Broman b0ee8f3403 Mark optlen as unused.
svn path=/trunk/; revision=45755
2012-10-24 07:08:39 +00:00
Anders Broman 5c86ab07dc Highlight the correct number of bytes for hf_mip6_acoa_acoa
svn path=/trunk/; revision=45754
2012-10-24 06:07:34 +00:00
Anders Broman afc96b6276 Add B flag to Proxy Binding messages.
svn path=/trunk/; revision=45738
2012-10-23 16:06:57 +00:00
Anders Broman 9887b09f88 Mark unused parameters.
svn path=/trunk/; revision=45737
2012-10-23 12:18:25 +00:00
Anders Broman 4c792b7214 - Use mip6_mh_types to build the INFO_COL string rather than a fixed string in the subroutines.
- Use proto_add_item for ipproto.
- extend an enum and use definse for new messages.

svn path=/trunk/; revision=45735
2012-10-23 11:47:57 +00:00
Anders Broman 3ae4bcd596 Extend value_strings with entries from IANA.
svn path=/trunk/; revision=45713
2012-10-22 14:47:44 +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
Michael Mann 1741731384 remove unnecessary underscores from display filters
svn path=/trunk/; revision=44181
2012-08-01 02:59:17 +00:00
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Alexis La Goutte fca94d1d2d From Martin Raison via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7414
PMIPV6 support over IPV4 network

PMIPv6 is an extension of MIPv6, adding a certain number of options to the
MIPv6 protocol. These options are already implemented in the wireshark
dissector, and the MIPv6 headers are recognized, but only inside IPv6 packets.

However, RFC5844 extends the PMIPv6 protocol to make it work over IPv4 networks
: as explained in section 4 of this RFC, the MIPv6 message is carried inside an
IPv4 packet with a UDP header. The port number in the UDP header is 5436


svn path=/trunk/; revision=43505
2012-06-27 13:27:28 +00:00
Bill Meier 70cc6362fe Don't define value_string arrays in a .h file (included in multiple places).
Also:
 - don't use val_to_str_const() with a "format" default string;
 - rename 'opt_len_type' enumeration  identifiers to be less generic.

svn path=/trunk/; revision=43210
2012-06-11 18:47:42 +00:00
Bill Meier 30cee99009 Fix a number of proto_tree_add_item() encoding args.
svn path=/trunk/; revision=39774
2011-11-09 17:33:18 +00:00
Jeff Morriss f5e838b602 Remove comma at the end of several enumerator lists.
svn path=/trunk/; revision=39700
2011-11-01 01:23:10 +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 293049dfba Do some conversions of proto_tree_add_item() 'encoding' arg.
(previously missed).

    57   FT_BOOLEAN:       FALSE-->ENC_BIG_ENDIAN
    31   FT_BOOLEAN:       TRUE-->ENC_LITTLE_ENDIAN

    10   FT_BYTES:         ENC_BIG_ENDIAN-->ENC_NA
     1   FT_BYTES:         ENC_LITTLE_ENDIAN-->ENC_NA
    21   FT_BYTES:         FALSE-->ENC_NA
     2   FT_BYTES:         TRUE-->ENC_NA

     2   FT_IPXNET:        ENC_BIG_ENDIAN-->ENC_NA

     6   FT_IPv6:          ENC_BIG_ENDIAN-->ENC_NA
     1   FT_IPv6:          FALSE-->ENC_NA

     6   FT_NONE:          ENC_BIG_ENDIAN-->ENC_NA
    19   FT_NONE:          FALSE-->ENC_NA
     3   FT_NONE:          TRUE-->ENC_NA

     1   FT_STRING:        ENC_BIG_ENDIAN-->ENC_ASCII|ENC_NA
     1   FT_STRING:        ENC_LITTLE_ENDIAN-->ENC_ASCII|ENC_NA
     5   FT_STRING:        FALSE-->ENC_ASCII|ENC_NA
     1   FT_STRING:        TRUE-->ENC_ASCII|ENC_NA

     4   FT_STRINGZ:       ENC_NA-->ENC_ASCII|ENC_NA
     8   FT_STRINGZ:       FALSE-->ENC_ASCII|ENC_NA

     1   FT_INT32:         FALSE-->ENC_BIG_ENDIAN
     1   FT_INT32:         TRUE-->ENC_LITTLE_ENDIAN

    11   FT_UINT8:         0-->ENC_BIG_ENDIAN
   111   FT_UINT8:         FALSE-->ENC_BIG_ENDIAN
    17   FT_UINT8:         TRUE-->ENC_LITTLE_ENDIAN
     1   FT_UINT16:        0-->ENC_BIG_ENDIAN
    68   FT_UINT16:        FALSE-->ENC_BIG_ENDIAN
    18   FT_UINT16:        TRUE-->ENC_LITTLE_ENDIAN
     4   FT_UINT24:        FALSE-->ENC_BIG_ENDIAN
    70   FT_UINT32:        FALSE-->ENC_BIG_ENDIAN
     1   FT_UINT32:        TRUE-->ENC_LITTLE_ENDIAN
     4   FT_UINT64:        FALSE-->ENC_BIG_ENDIAN
     1   FT_UINT64:        TRUE-->ENC_LITTLE_ENDIAN

     1   FT_UINT_STRING:   FALSE-->ENC_ASCII|ENC_BIG_ENDIAN


svn path=/trunk/; revision=39442
2011-10-16 23:38:49 +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