Commit Graph

97 Commits

Author SHA1 Message Date
Jakub Zawadzki deb2b236f2 Add missing includes
svn path=/trunk/; revision=54332
2013-12-21 17:23:17 +00:00
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 f049bec3ca DHCPv6: update list of message types and options (from IANA)
svn path=/trunk/; revision=53992
2013-12-12 21:29:51 +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
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
Pascal Quantin a0c53ffaa1 emem -> wmem conversion:
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits()
- tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup()
- tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode()
- tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string()
- tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string()
- tvb_get_ephemeral_string_enc() -> tvb_get_string_enc()
- update docs accordingly

svn path=/trunk/; revision=52172
2013-09-22 15:50:55 +00:00
Evan Huus 4212b20048 Don't use g_strv_length on a single string, just use strlen. Also do the
null-check *before* calling strlen (if it's even necessary?)

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

svn path=/trunk/; revision=52156
2013-09-20 14:41:22 +00:00
Michael Mann 346f803d42 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 all manual inspection and most cases were either:
1. Case sensitivity differences between hf_ field name and formatted string.
2. Unnecessary whitespace between hf_ field name and colon in formatted string

There are cases where the hf_ field name doesn't quite match the proto_tree_add_uint_format, but it's close enough that one of them should be "right", I'm just not sure which is, I just know the string in proto_tree_add_uint_format is the one displayed.

svn path=/trunk/; revision=52098
2013-09-16 10:39:06 +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
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
Alexis La Goutte 1dfecc041c Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50244
2013-06-29 22:00:50 +00:00
Alexis La Goutte 0a249bf647 Fix errors found by fix-encoding-args script
epan/dissectors/packet-dhcpv6.c:  FT_IPv6:          proto_tree_add_item(pkt_s_tree, hf_packetcable_cccV6_prov_srv_ipv6, tvb, suboptoff+1, 4, [[ENC_BIG_ENDIAN]-->[ENC_NA]]);
epan/dissectors/packet-dhcpv6.c:  FT_BYTES:         proto_tree_add_item(subtree2, hf_capabilities_encoding_bytes, tvb, tlv5_cap_index, tlv5_cap_len, [[ENC_BIG_ENDIAN]-->[ENC_NA]]);

svn path=/trunk/; revision=50084
2013-06-20 20:17:21 +00:00
Alexis La Goutte dc82f1cc93 Fix packet-dhcpv6.c: In function 'dhcpv6_option': packet-dhcpv6.c:1826:36: error: 'ti' may be used uninitialized in this function [-Werror=maybe-uninitialized]
svn path=/trunk/; revision=50082
2013-06-20 18:32:18 +00:00
Evan Huus 612d14c883 From Brian Otte via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8592
Numerous fixes and improvements to DHCPv6 Cable Television Labs vendor-specific
information dissection.

svn path=/trunk/; revision=50075
2013-06-20 16:22:53 +00:00
Pascal Quantin 285bc53826 Fix typo error
svn path=/trunk/; revision=49918
2013-06-13 14:20:20 +00:00
Pascal Quantin 53c658bb19 Add basic dissection of Prefix Exclude option
svn path=/trunk/; revision=49917
2013-06-13 14:18:10 +00:00
Michael Mann 57fc882623 Simplify the "bad length" expert info into a single filterable item with formatting determining the particulars because the filter names just didn't make much sense to separate.
svn path=/trunk/; revision=49801
2013-06-06 02:10:22 +00:00
Michael Mann 7e8e5b347e Batch of filterable expert_infos.
svn path=/trunk/; revision=49581
2013-05-25 17:06:40 +00:00
Michael Mann b2027be0f8 Add filterable expert info.
svn path=/trunk/; revision=49573
2013-05-25 03:27:31 +00:00
Michael Mann 478ee0ae73 DHCPv6 option 56, RFC 5908
Bug 8421 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8421)

svn path=/trunk/; revision=49473
2013-05-21 03:24:55 +00:00
Alexis La Goutte 12517d1309 Fix encoding args (via fix-encodings-args tools) Add Modelines info
svn path=/trunk/; revision=48965
2013-04-22 17:28:16 +00:00
Anders Broman 2e52e2ac99 [-Wmissing-prototypes]
Use explicit casts.

svn path=/trunk/; revision=48347
2013-03-17 09:11:21 +00:00
Anders Broman 263a9d0683 [-Wmissing-prototypes]
Use explicit casts.

svn path=/trunk/; revision=48341
2013-03-16 16:25:41 +00:00
Michael Mann 4b3d76d426 Add new query types, options and message types for DHCPv6 Bulk Leasequery protocol. Also enforce message rules in RFC 5460 section 4 through expert_info
Part of bug 8172 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8172)

svn path=/trunk/; revision=47267
2013-01-25 03:40:53 +00:00
Michael Mann 8326a92942 Add RFC 5460 - DHCPv6 Bulk Leasequery
Bug 8172 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8172)

svn path=/trunk/; revision=47028
2013-01-11 14:41:17 +00:00
Alexis La Goutte da700a93b6 From François-Xavier Le Bail via https://www.wireshark.org/lists/wireshark-dev/201212/msg00027.html
Add some missing RFC references in DHCPv6 dissector

svn path=/trunk/; revision=46397
2012-12-05 09:38:28 +00:00
Jaap Keuter 6f1847f606 From Jérôme LAFORGE:
Patch that checks the length of OPTION_RECONF_ACCEPT (20).
As defined by RFC3315, its length has to be 0.

svn path=/trunk/; revision=45988
2012-11-10 14:00:30 +00:00
Chris Maynard b29f57e4e0 Fix Coverity CID 739070: Unused pointer value.
svn path=/trunk/; revision=45636
2012-10-18 16:50:49 +00:00
Michael Mann 8856e1a03a convert proto_tree_add_text to proto_tree_add_item and expert_add_info_format for packet-dhcpv6.c and packet-dhcp-failover.c
"Refactor" value_string in ARP dissector

svn path=/trunk/; revision=45535
2012-10-14 15:27:52 +00:00
Alexis La Goutte 3e602ee281 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=45398
2012-10-08 17:55:12 +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
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
Bill Meier 557ed5e971 Minor: reformatting, unneeded #includes, whitespace cleanup;
Also: use val_to_str_const(0 instead of val_to_str() in a few cases.

svn path=/trunk/; revision=42271
2012-04-26 16:47:37 +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 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 41a4ccb657 from Joe McEachern:
patch for DHCPv6 DS-Lite AFTR Option RFC 6334

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

svn path=/trunk/; revision=38478
2011-08-11 09:25:37 +00:00
Chris Maynard 955008c4b0 When parsing OPTION_REMOTE_ID, don't modify optlen or we'll return the wrong
number of bytes consumed.
Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5962

svn path=/trunk/; revision=37439
2011-05-27 14:38:42 +00:00
Stig Bjørlykke 1c45c1a243 From Michael Mann via bug 2794:
Fixed display filters with obvious typos.

svn path=/trunk/; revision=36713
2011-04-19 08:22:58 +00:00
Jaap Keuter ab3fbb4d31 From Hadar Shoham:
Add support to correlation ID under DHCPv6 according to 
"CL-SP-CANN-DHCP-Reg-I06-110210" 
DHCPv6 option 17 Vendor-specific Information, sub option 2172 (paragraph 5.4.3)

svn path=/trunk/; revision=36347
2011-03-26 11:23:46 +00:00
Jeff Morriss be81bc949a Rename arphrdaddr_to_str() to tvb_arphrdaddr_to_str() and make it take a pointer a TVB
and an offset instead of (generally) a pointer into a TVB.

svn path=/trunk/; revision=35913
2011-02-11 03:33:11 +00:00
Jeff Morriss d8659693ef Check for places where tvb_bytes_to_str() or tvb_get_bytes_to_str_punct()
should be used (instead of the non-tvb functions with a call to tvb_get_ptr()).

Use those functions in a bunch of places.

svn path=/trunk/; revision=35911
2011-02-11 02:43:07 +00:00
Bill Meier 1f1563946e I believe 0 was meant instead of sizeof(0)....
svn path=/trunk/; revision=35694
2011-01-28 21:02:40 +00:00
Stephen Fisher 624ebe8464 Fix bug #5627: DHCPv6 dissector formats DUID_LLT time incorrectly
Add 30 years of seconds, not 20 years, since the DHCP_LLT time is seconds
since Jan 1 2000 and epoch is 30 years before that.


svn path=/trunk/; revision=35686
2011-01-28 00:20:37 +00:00
Jeff Morriss 61876001c3 Replace some tvb_get_ptr()s with tvb_get_ephemeral_string()s to ensure the
return string is NULL terminated.

There's no need to pass the result of tvb_get_ptr() as the 'value' in
proto_tree_add_*(): just use proto_tree_add_item().

svn path=/trunk/; revision=35548
2011-01-16 03:57:12 +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
Bill Meier 03b57df5a0 Fix various typos and spelling errors.
svn path=/trunk/; revision=35126
2010-12-06 01:34:58 +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