Commit Graph

26 Commits

Author SHA1 Message Date
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
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
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 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
Bill Meier 09764dd969 Remove unneeded #include <stdio.h>
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +00:00
Jeff Morriss 7841dc8c5b From Chris Maynard via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3950 :
The attached patch improves NHRP dissection and encompasses the following
changes:
1) Now displays Request ID and CIE Reply code or Error code in Info column.

2) Added support for RFC 2520 and RFC 2735 extensions and error codes.
   References:
       -> http://www.ietf.org/rfc/rfc2520.txt?number=2520
       -> http://www.ietf.org/rfc/rfc2735.txt?number=2735
   Note: Cisco's NAT Address Extension conflicts with RFC 2735's published
Device Capabilities Extension.  Both are assigned type 9.  As such, I have had
to add some heuristics to differentiate between them.  It should be reliable
though since the former carries a CIE with length > 8 bytes, and the latter a
fixed-length payload of 8 bytes.

3) A few fields previously not filterable now are: hf_nhrp_hdr_op_type,
hf_nhrp_hdr_version and hf_nhrp_error_code.

4) Added support for authentication and vendor-private extension header decode.
   NOTE: The authentication extension has been added according to RFC 2332.  In
practice, it seems that at least with certain Cisco equipment (I tested with
cisco 2851 IOS version 12.4(15)T), they use their own non-standard
authentication extension format.  Because of this, Cisco's version of the
extension will likely either be displayed a little differently than one may
expect or be indicated as being mal-formed ... because in reality, it is.

5) Utilizes expert info in a couple more places to indicate mal-formed packets.
 Cisco's Error Indication packet, for example, violates RFC 2332 Section 5.2.7
by including extensions in the Error Indication packet as well as by including
erroneous data following the End Extension.  Both cases are reported via expert
info now.  Previously, at least with the case of the erroneous data following
the End Extension, the packet would almost certainly have been marked
mal-formed anyway.  I now just prevent Wireshark from even attempting to decode
the non-sensical mess.


svn path=/trunk/; revision=29833
2009-09-10 02:40:19 +00:00
Kovarththanan Rajaratnam 8b515e9340 Switch a bunch of dissectors over to using tvb_new_subset_remaining()
svn path=/trunk/; revision=29446
2009-08-16 12:36:22 +00:00
Kovarththanan Rajaratnam ac463d2697 Don't guard col_clear with col_check
svn path=/trunk/; revision=29346
2009-08-09 08:14:59 +00:00
Kovarththanan Rajaratnam 6110a96f68 Don't guard col_set_str (COL_INFO/COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29345
2009-08-09 07:59:51 +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
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
Guy Harris efafedd3e0 Add support for the IANA's OUI, and recognize NHRP-over-SNAP.
An NHRP extension offset of 0 is not an error - it means there are no
extensions.

Start using the address family number to determine the type of
link-layer addresses in NHRP.  Don't fetch IPv4 addresses and add them
to the tree - just use proto_tree_add_item().

svn path=/trunk/; revision=28286
2009-05-05 22:35:19 +00:00
Guy Harris b4d3b4244b Get rid of some other uses of ethertype() for protocols that don't have
a trailer.

Clean up the NHRP dissector's handling of the protocol ID to fully
implement RFC 2332 (and mention that 2332 is the RFC for NHRP).  Don't
compute the checksum unless we have all the packet data, and don't use
the captured length as the actual packet length.  Check for an invalid
extension offset value.  Get rid of some unneeded
tvb_ensure_bytes_exist() calls.  Dissect - and set the columns -
regardless of whether we're building the protocol tree.  Mark the packet
in error reports as an error packet.

svn path=/trunk/; revision=28273
2009-05-05 03:50:06 +00:00
Jaap Keuter ee4aafbef1 From Reinhard Speyerer:
This patch fixes several misspellings/typos in Wireshark SVN revision 28201.

svn path=/trunk/; revision=28218
2009-05-01 07:15:56 +00:00
Anders Broman a92cd3fddd From Chris Maynard:
Misc. NHRP bug fixes & additions and AFN udpates
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3379

svn path=/trunk/; revision=27933
2009-04-02 17:21:18 +00:00
Bill Meier 33c99f44fd Fix typos and spelling (mostly in text strings)
svn path=/trunk/; revision=27028
2008-12-17 00:08:38 +00:00
Bill Meier ffa7320de2 Minor cleanup related to proto_register & proto_reg_handoff
svn path=/trunk/; revision=26280
2008-09-26 20:06:40 +00:00
Bill Meier 77b81b391b #include <prefs.h> not req'd
svn path=/trunk/; revision=26089
2008-08-25 22:06:20 +00:00
Sake Blok 9f829f4ba2 Bug 1997 From Timo Teras:
Patch to do the following:
1) Dissect CIE Lists in NHRP Extensions
2) Dissect original NHRP packet in Error Indication
3) Support for Cisco NAT extensions
4) Support for Cisco NHRP Traffic Indication packet


svn path=/trunk/; revision=23587
2007-11-25 18:10:01 +00:00
Anders Broman 1950ffc214 Apply the small performance enhancment patches for:
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster.
Replace 
- col_append_fstr() with faster  col_append_str() 
- col_add_str() with col_set_str()
when it's safe

svn path=/trunk/; revision=23252
2007-10-23 05:50:00 +00:00
Jörg Mayer dd26a7021b nikai@nikai.net:
Remaining fixes from:
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1225

svn path=/trunk/; revision=19895
2006-11-14 20:32:29 +00:00
Ronnie Sahlberg feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00
Jörg Mayer dba7a99e1d warning: C++ style comments are not allowed in ISO C90
svn path=/trunk/; revision=16853
2005-12-18 23:22:47 +00:00
Jörg Mayer b06bd208d0 warning: function declaration isn't a prototype
svn path=/trunk/; revision=16852
2005-12-18 23:18:06 +00:00
Anders Broman fdec74f1c7 From: Deepak Jain
changes/addition to support decode for Next Hop Resolution Protocol

svn path=/trunk/; revision=16744
2005-12-09 16:14:42 +00:00