Commit Graph

140 Commits

Author SHA1 Message Date
Chris Maynard 67ffb10e64 Add checksum_bad, set to FALSE to the tree when the checksum is correct. Use PROTO_ITEM_SET_HIDDEN instead of PROTO_ITEM_SET_GENERATED so ICMP and ICMPv6 are consistent.
See: http://ask.wireshark.org/questions/19844/icmp-display-filter-checksum_bad-ignored

#BACKPORT(1.6, 1.8)

svn path=/trunk/; revision=48563
2013-03-26 18:08:05 +00:00
Anders Broman 55c498169d From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48400
2013-03-18 21:16:23 +00:00
Bill Meier ad0219d033 Change 'for (i=1; i<=n;...' to 'for (i=0; i<n; ...)
The changes fix definite problems or
are done "just in case" for cases not esily determined
to be a problem by quick inspection.

Note: in some cases for loop index variables have been renamed
      to ensure  all required codes changes detected.

##backport

svn path=/trunk/; revision=45477
2012-10-11 19:20:21 +00:00
Guy Harris f154882eb5 The usual idiom in C for "do this N times" is "for (i = 0; i < N; i++)",
not "for (i = 1; i < N+1; i++)".

Even if it weren't the idiom, it'd be safer, at least for unsigned
values, as, if i and N are the same width, and N has the maximum
possible value for that width, the first of those runs i from 0 to N-1,
all of which fit in a variable of that width, and the second of those
runs i from 1 to N, the latter of which doesn't fit into a variable of
that width, so modulo arithmetic turns it into 0 and the loop keeps
running forever.

Fixes bug 7844.

svn path=/trunk/; revision=45459
2012-10-11 00:02:14 +00:00
Chris Maynard a50e1a98ae Apply Ronnie Sahlberg's ICMP request/response tracking improvements from r45343 to ICMPv6. (Tested using captures from bug 5810).
svn path=/trunk/; revision=45439
2012-10-09 22:34:40 +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
Chris Maynard 4b5a9a2663 Since r41681, IPv6 sets pinfo->ip_ttl as the hop limit, so display that in the
INFO column, similar to how IPv4 displays the TTL.

svn path=/trunk/; revision=45008
2012-09-19 19:12:25 +00:00
Chris Maynard 86db174948 Fix request/response tracking with checksum corner case.
svn path=/trunk/; revision=45007
2012-09-19 17:57:54 +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
Alexis La Goutte 01079fba93 From Owen Kirby via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7704
IANA assignments for 6LoWPAN-ND

draft-ietf-6lowpan-nd-21 has entered the RFC editor's queue, and has been
officially assigned values for the ICMPv6 message and option type codes ( as
seen at http://www.iana.org/assignments/icmpv6-parameters/icmpv6-parameters.xml
)

This patch replaces the old placeholder values for the 6LoWPAN-ND types with
the official IANA assignments.

svn path=/trunk/; revision=44808
2012-09-07 11:54:25 +00:00
Anders Broman e128334750 From Owen Kirby:
6LoWPAN: Automatic context detection and draft-ietf-6lowpan-nd-19 updates.

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

svn path=/trunk/; revision=44723
2012-09-01 11:54:16 +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
Alexis La Goutte d229d813d0 Update to the last draft-ietf-6lowpan-nd-19 updates
Extended ABRO with longer version number and valid lifetime, 
while maintaining backward compatibility

svn path=/trunk/; revision=44164
2012-07-31 19:42:20 +00:00
Alexis La Goutte e761d193c9 Update ICMPv6 to last IANA Parameters (2012-07-18)
Add draft-irtf-rrg-ilnp-icmpv6-06: ICMP Locator Update message for ILNPv6 ID (Conflit with draft-ietf-6lowpan-nd-18...)

svn path=/trunk/; revision=44160
2012-07-31 17:16:52 +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
Pascal Quantin 472f036552 Do not use same name for filters with incompatible types
svn path=/trunk/; revision=43448
2012-06-23 14:36:21 +00:00
Guy Harris 5d4e982e93 Get rid of remaining Booleans-as-encoding-arguments in
proto_tree_add_item() calls.

svn path=/trunk/; revision=42491
2012-05-07 23:40:44 +00:00
Chris Maynard 2eeb504807 From Klaus Heckelmann via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7221: Avoid wireshark crash on platforms where an 8 byte alignment is required by changing the resp_time field in the icmp_transaction_t from a double to an nstime_t.
svn path=/trunk/; revision=42393
2012-05-03 01:48:59 +00:00
Alexis La Goutte b40cea4d5b Update ICMPv6 to last IANA Parameters (2012-03-28)
* RFC-ietf-roll-rpl-19 => RFC6550
* draft-ietf-csi-proxy-send-05 => RFC 6496
* Add RFC6495 : Subject Key Identifier (SKI) SEND Name Type fields
* Add RFC6554 : An IPv6 Routing Header for Source Routes with RPL

svn path=/trunk/; revision=42047
2012-04-13 14:05:52 +00:00
Bill Meier 87cf82e056 Use tvb_new_subset_remaining() rather than tvb_new_subset();
#include <styring.h> not req'd (in a few cases);
Minor reformating & whitespace cleanup.

svn path=/trunk/; revision=41374
2012-03-06 16:58:09 +00:00
Chris Maynard 3db18f185e Fix some typos.
svn path=/trunk/; revision=40787
2012-02-01 02:05:19 +00:00
Jörg Mayer 1c789b44a5 Add comment about possible expert item
svn path=/trunk/; revision=40477
2012-01-13 19:27:01 +00:00
Bill Meier 34a0aba9d3 Don't do fcn calls in arg of g_?to??(); Macro may very well eval args multiple times.
svn path=/trunk/; revision=40444
2012-01-12 20:40:23 +00:00
Alexis La Goutte 8edf55985b Update ICMPv6 to last IANA Parameters (2011-12-21)
* RFC3775 => RFC6275
* draft-ietf-6lowpan-nd-17 => draft-ietf-6lowpan-nd-18

svn path=/trunk/; revision=40294
2011-12-26 14:59:50 +00:00
Chris Maynard 41d2fdaefc For a DNSSL lifetime of 0, add some useful text.
svn path=/trunk/; revision=40253
2011-12-20 18:15:52 +00:00
Jaap Keuter b6872d0a3b From Roy Marples:
ICMPv6 DNSSL option can contain padding, which does not represent a malformed option.

svn path=/trunk/; revision=40159
2011-12-12 08:18:18 +00:00
Chris Maynard 0af6a56971 Fix bug with updating rr_offset before we're done fetching the matchedprefix and causing malformed packets, not to mention incorrect matchedprefixes to be displayed. Some if() blocks need to execute regardless of whether tree is NULL or not. Add some additional expert infos to report invalid matchlen values > 128 in violation of RFC 2894. Fix hf_icmpv6_rr_rm_flag_reserved's bitmask from FFFD to FFFC and change order of flags displayed in tree so they appear from msb to lsb. Lastl, fix a typo.
svn path=/trunk/; revision=40079
2011-12-03 06:10:37 +00:00
Chris Maynard 647c5c0b27 packet_info's in_error_pkt is now a bitfield like in_gre_pkt.
svn path=/trunk/; revision=39764
2011-11-08 18:39:11 +00:00
Chris Maynard d55d8781b8 Improve ICMP conversation tracking, especially when capturing on multiple interfaces and one of them is a GRE tunnel. Resolves bug 5770, which was reopened.
svn path=/trunk/; revision=39757
2011-11-08 17:25:22 +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 d65261d344 Use ENC_NA as proto_tree_add_item() encoding arg for FT_ETHER hf[] field type.
(Some minor whitespace cleanup).

svn path=/trunk/; revision=39488
2011-10-20 14:07:54 +00:00
Bill Meier 33f6f89401 Specify ENC_TIME_TIMESPEC for a proto_tree_add_item() encoding arg for a field with type FT_ABSOLUTE_TIME.
svn path=/trunk/; revision=39482
2011-10-19 23:24:52 +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 126aa85393 Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, FT_STRINGZ, FT_UINT_STRING as follows:
1. If there's no character encoding (ENC_ASCII, ...) specified
    then use ENC_ASCII.
 2. For all but FT_UINT_STRING, always use ENC_NA
    (replacing any existing True/1/FALSE/0
    /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN).



svn path=/trunk/; revision=39426
2011-10-15 18:46:26 +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
Bill Meier 4c46725c2c Fix vi "modeline" so it works;
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5748

svn path=/trunk/; revision=39074
2011-09-21 16:28:53 +00:00
Chris Maynard afb6549467 Add dissection of router address(R) flag. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6350.
svn path=/trunk/; revision=39029
2011-09-16 19:23:26 +00:00
Alexis La Goutte cc2b9a77d8 * Replace FALSE by ENC_BIG_ENDIAN for encoding parameter
* Remove some whitespace...

svn path=/trunk/; revision=38272
2011-07-30 14:11:08 +00:00
Alexis La Goutte b7fad24596 From Eric Zhu via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5846
Wireshark cannot display Reachable time & Retrans timer in IPv6 RA messages

svn path=/trunk/; revision=38227
2011-07-27 15:19:17 +00:00
Alexis La Goutte 79754d8f50 Make checkAPIs Happy
Error: the blurb for field "Status" ("icmpv6.6lowpannd.da.status") has leading space in epan/dissectors/packet-icmpv6.c

svn path=/trunk/; revision=37667
2011-06-15 08:55:01 +00:00
Alexis La Goutte 97fcab0f33 From Colin O'Flynn via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5363
Add latest 6lowpan-nd Support

From me :
* Add Description in Header Field
* Use FT_EUI64 for EUI64 Field


svn path=/trunk/; revision=37666
2011-06-15 08:52:38 +00:00
Alexis La Goutte 17bb20ea8f From Colin O'Flynn via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5363
Fix some error in ICMPv6 dissector...

svn path=/trunk/; revision=37665
2011-06-15 08:32:10 +00:00
Alexis La Goutte d4a80250c0 Add EUI64 display type for Source/Target Link-layer Address (RFC4861)
svn path=/trunk/; revision=37165
2011-05-15 18:48:39 +00:00
Alexis La Goutte d05788974e From Colin O'Flynn via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5921
Fix for RPL DAO-ACK Processing when DODAG ID present

Reported and fixed by Jakob Ruhe

svn path=/trunk/; revision=37162
2011-05-15 17:47:56 +00:00
Alexis La Goutte 7d317e553b Add FT_EUI64 Field Type
* Remove proto_tree_add_eui64 function from 802.15.4 Dissector 
* Replace print_eui64/print_eui64 by eui64_to_str/get_eui64_name
* Update Documentation (README.dev)
* Add new function in libwireshark.def
* Support of encoding for tvb_eui64_to_str
* Use FT_EUI64 for ICMPv6, CAPWAP, Zbee ... dissector

svn path=/trunk/; revision=37015
2011-05-08 10:23:53 +00:00
Alexis La Goutte 9b5f811b4e Convert ICMPv6 dissector to "new-style" dissector
Fix Dead Store Warning ( warning: Value stored to '*offset*' is never read )


svn path=/trunk/; revision=36668
2011-04-16 17:14:39 +00:00
Alexis La Goutte 12dae38bb7 Update to last IANA parameters (2011-04-08)
Update to last RPL Draft (19)
Add new ICMPv6 Option: Proxy Signature (PS) draft-ietf-csi-proxy-send-05
Fix 2 Clang Warning (unused variable):
packet-icmpv6.c:2755:9: warning: Value stored to 'oplength' is never read
        oplength = tvb_get_guint8(tvb, rr_offset);
packet-icmpv6.c:2916:5: warning: Value stored to 'nb_mcast_records' is never read
    nb_mcast_records = tvb_get_ntohs(tvb, mldr_offset);

svn path=/trunk/; revision=36641
2011-04-14 09:40:07 +00:00
Chris Maynard 26e4e13c06 Neither checksum_item nor length are used uninitialized, but for some reason,
the OSX buildbots think they can be.  Initialize them to avoid a build failure.

svn path=/trunk/; revision=36562
2011-04-11 18:40:36 +00:00