epan/show_exception.c, as it's used outside
epan/dissectors/packet-frame.c. Update their callers to include
<epan/show_exception.h> to get their declaration.
Add a CATCH_NONFATAL_ERRORS macro that catches all exceptions that, if
there's more stuff in the packet to dissect after the dissector call
that threw the exception, doesn't mean you shouldn't go ahead and
dissect that stuff. Use it in all those cases, including ones where
BoundsError was inappropriately being caught (you want those passed up
to the top level, so that the packet is reported as having been cut
short in the capture process).
Add a CATCH_BOUNDS_ERRORS macro that catches all exceptions that
correspond to running past the end of the data for a tvbuff; use it
rather than explicitly catching those exceptions individually, and
rather than just catching all exceptions (the only place that
DissectorError should be caught, for example, is at the top level, so
dissector bugs show up in the protocol tree).
Don't catch and then immediately rethrow exceptions without doing
anything else; just let the exceptions go up to the final catcher.
Use show_exception() to report non-fatal errors, rather than doing it
yourself.
If a dissector is called from Lua, catch all non-fatal errors and use
show_exception() to report them rather than catching only
ReportedBoundsError and adding a proto_malformed item.
Don't catch exceptions when constructing a trailer tvbuff in
packet-ieee8023.c - just construct it after the payload has been
dissected, and let whatever exceptions that throws be handled at the top
level.
Avoid some TRY/CATCH/ENDTRY cases by using checks such as
tvb_bytes_exist() before even looking in the tvbuff.
svn path=/trunk/; revision=47924
Enhance Route Refresh Capability : Add draft-ietf-idr-bgp-enhanced-route-refresh-02
Not yet support new NOTIFICATION error code : ROUTE-REFRESH Message Error (Value To Be Defined)
From me :
* Make some Route Refresh fields filterable
svn path=/trunk/; revision=45217
BGP bad decoding for Graceful Restart Capability with only helper support
BGP Capability in OPEN message: Graceful restart capability (64).
So when the length of the capability value is smaller that 6 (6 meaning full
support of GR capa, with significants elements and at least one AFI/SAFI), the
code interprets it as erroneous.
However,as described in RFC4724: " When a sender of this capability does not
include any <AFI, SAFI> in the capability, it means that the sender is not
capable of preserving its forwarding state during BGP restart, but supports
procedures for the Receiving Speaker (as defined in Section 4.2 of this
document). In that case, the value of the Restart Time field advertised by the
sender is irrelevant".
So, length of exactly 2 is valid but has to be interpreted with a particular
meaning.
In the dissector code, a length of 2 should be a special case for this capa,
decoding as "Graceful Restart helper mode only" or something like that, and
maybe also displaying an expert message if the Restart flag is not 0 in this
case, since here it's not expected to be possible.
svn path=/trunk/; revision=45216
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
Merge .h files into .c files since .h files unused elsewhere;
Do whitespace, indentation & formatting cleanup.
packet-acn.c:
Fix 2 minor bugs wherein subtree not displayed in packet-details
because tree variable used in proto_tree_add_text() always NULL.
svn path=/trunk/; revision=42647
* Make field filterable (3 proto_tree_add_text less ! but there are still 147 proto_tree_add_text...)
* Remove bgp_notify struct
* Use expert info to display a unknown error type
svn path=/trunk/; revision=40987
I've updated the bgp dissector code to support the mcast-vpn nlri. These nlri's
are used to implement multicast vpn (mvpn) and are fully described in
draft-ietf-l3vpn-2547bis-mcast-bgp-08.txt (section 4).
svn path=/trunk/; revision=39549
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
* Make field filterable
* Remove bgp_open struct
* Fix a bug of offset in Optionnel Parameter TLV (Bug include by me in Revision #39098)
svn path=/trunk/; revision=39321
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
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
Fix a wrong offset of RD Type 2 and display AS4 in asdot+ notation (Add a pref to chose the type of display for AS4 ?)
svn path=/trunk/; revision=39097
In some BGP captures the AS_PATH attribute was decode wrong, if the asn length determines automatically
From me:
Fix some whitespace...
Fix error: ‘for’ loop initial declarations are only allowed in C99 mode
Replace unsigned by guint
svn path=/trunk/; revision=38723
Malformed Packet in decode for BGP-AD (autodiscovery) update (RFC6074)
From me:
Add support of RFC6074 (BGP-AD) in BGP dissector.
Both BGP-AD and VPLS-BGP (RFC4761) use the same AFI/SAFI, The NLRI length must be used as a demultiplexer. (See RFC6074 Section 7 : BGP-AD and VPLS-BGP Interoperability)
svn path=/trunk/; revision=38601
Wireshark doesn't decode BGP.MP_REACH_NLRI.NLRI when RD type is 2(defined in
RFC4364:4.2)
From me:
Add RD type 2 (FORMAT_AS4_LOC) (not tested... based only on RFC spec..)
svn path=/trunk/; revision=38589
Some fixes for 'set but not used' errors that GCC 4.6 emits.
From me:
#include <stdlib.h> not req'd;
Do some whitespace cleanup.
svn path=/trunk/; revision=36906
Apply rev 25869 to most of the rest of the TCP-desegmenting dissectors.
(The SSL dissector was already updated in one of two spots with bug 4535/rev
32456.)
A couple of the patches had to be manually applied.
From me: Fix the comments to match the change (including in the TCP and SSL
dissectors.)
svn path=/trunk/; revision=36332
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
This is necessary in case a subdissector had changed it but was unable to
restore it (due to the exception).
Remove check_col().
svn path=/trunk/; revision=34436