Commit Graph

193 Commits

Author SHA1 Message Date
Yann Lejeune 05c1aa2231 BGP: fix dissection of BGP community tag
The offset used for BGP community tag dissection is a wrong one.

Bug: 10746
Change-Id: I1d1d443568bb97a0b3b95a312762ac0a3102326a
Reviewed-on: https://code.wireshark.org/review/5562
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-12-01 18:57:36 +00:00
Bill Meier c28f280c1d Fix a number of dup hf[] filter-names probably resulting from cut/paste errs.
Change-Id: I9242300b2ace3155c1506b584a90f073100a305e
Reviewed-on: https://code.wireshark.org/review/5512
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-11-26 23:27:31 +00:00
Michael Mann a2c2f872f4 Remove the use of pinfo->private_data from dissectors that just save it to restore it.
Change-Id: I13197cc48068bb35ee12a7023cfe5f76bbc4e264
Reviewed-on: https://code.wireshark.org/review/5486
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-26 16:20:59 +00:00
Bill Meier 18d72987cb Do encoding-arg changes (all benign)
For:
- FT_BYTES: Always use just ENC_NA
- integral/floating (other than FT_[U]INT8): Do ENC_NA --> ENC_BIG_ENDIAN

Also:
- FT_UINT... --> FT_UINT8 in a few cases (to match proto_tree_add_item...)
- Change one case of incorrect '||' to '|'

Change-Id: I427e0e61618ff8faf55691c8a695930f67d455b0
Reviewed-on: https://code.wireshark.org/review/4184
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-19 01:38:08 +00:00
Michael Mann 3df42e79a5 proto_tree_add_text cleanup
Create filters (expert and hf_) that have the "most bang for the buck" (ie have many instances for a single filter)

Change-Id: I61995e41c5b298df77e084e65cdf30ebe95da1e6
Reviewed-on: https://code.wireshark.org/review/4086
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-09-12 05:51:11 +00:00
Matthieu Texier d127b57311 BPG : issue with BGP AS path heuristic (AS_CONFED_SET)
Add also a expert info when unable determine ASN length (2 or 4 bytes)



Bug: 10399
Change-Id: I24978e29e24f38c2e01e4b953a5a51496f0cf5a6
Reviewed-on: https://code.wireshark.org/review/3831
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-08-25 15:00:12 +00:00
Evan Huus fade4b4d97 Fix another (valid) complaint from the mac buildbot
What mystical new compiler upgrade is this?

Change-Id: I89b3bfb53b9a19bbfb1cc8339d38cdc4a4652c62
Reviewed-on: https://code.wireshark.org/review/3347
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-02 02:14:12 +00:00
Alexis La Goutte fbc1a9af14 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I847c7217b520a5f7ec581e6170fe3dc77c628e96
Reviewed-on: https://code.wireshark.org/review/3322
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-01 18:02:20 +00:00
Matthieu Texier 4a1bd421c4 Bug 10302 - BGP attribute AIGP (draft-ietf-idr-aigp) not decoded - Fix
Change-Id: Ib8b3c5666932777218e33b74cca33b791c883fc9
Reviewed-on: https://code.wireshark.org/review/3226
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-29 01:45:56 +00:00
Matthieu Texier e95083d264 Support of draft-ietf-idr-flow-spec-v6 and some cosmetic improvments
Change-Id: Ieaf23c84d67ccdfdcb167afb382c86797bc1cd2b
Reviewed-on: https://code.wireshark.org/review/3006
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-18 05:34:39 +00:00
Michael Mann 188aa9a80e convert to proto_tree_add_subtree[_format]
Change-Id: Ib60ca75b7da8cfa21cfe2999c9b9448a02c332df
Reviewed-on: https://code.wireshark.org/review/2560
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-22 21:07:16 +00:00
Michael Mann daa70feddc Revert "Fixup: tvb_ensure_length_remaining -> tvb_ensure_captured_length_remaining"
See https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html

This reverts commit 021e7afc9f.

Change-Id: I0640eabce5ce8c4ff3a88ebf848b499f8bb8ed2f
Reviewed-on: https://code.wireshark.org/review/2429
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19 17:23:41 +00:00
Dario Lombardo 021e7afc9f Fixup: tvb_ensure_length_remaining -> tvb_ensure_captured_length_remaining
Change-Id: I0228f3b6b7067bc0ce51f9d359f99fd18feb2b66
Reviewed-on: https://code.wireshark.org/review/2378
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:20:32 +00:00
Matthieu Texier e9e4277f2a Add support of RFC 6514 PMSI bgp attribute and tunnel ID decoding
Change-Id: Ia170002fb5af5f6548595688956cc01ec4a72298
Reviewed-on: https://code.wireshark.org/review/960
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-14 16:44:50 +00:00
Bill Meier 4fbcfc1289 (Benign) Don't use "address-of" operator on arg of VALS() (not that it makes any actual difference)..
Change-Id: I0766d0f130648aaa5a58d9f4062fa24e898cbdc3
Reviewed-on: https://code.wireshark.org/review/545
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-03-07 05:03:41 +00:00
Bill Meier 7a4702d9d8 Ue TFS & VALS macros for certain 'fieldconvert' fields.
Change-Id: I8d7468e62d5de99eb68b554134be71b17d1b87c8
Reviewed-on: https://code.wireshark.org/review/525
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-03-06 03:19:41 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Michael Pergament 2da9162402 Enhance BGP Dissector
Add 
* BGP MPLS Based Ethernet VPN dissector (draft-ietf-l2vpn-evpn-05)
* PMSI Tunnel Attribut dissector (RFC6514)

Change-Id: I02caa67fc371bbc9666f343e20fa678e8b029a59
Reviewed-on: https://code.wireshark.org/review/296
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-25 20:12:13 +00:00
Alexis La Goutte b7bd4ff7ae Fix -Wunused-const-variable found by Clang
Change-Id: I57cfafea0e3110553ef03a34baad217f8109942d
Reviewed-on: https://code.wireshark.org/review/320
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-24 20:42:44 +00:00
Alexis La Goutte e009dc9843 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: Ic3a240a2e751700f653287dd84fe58016adab9e2
Reviewed-on: https://code.wireshark.org/review/297
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-21 20:49:35 +00:00
Matthieu Texier e1b265596b Moving custer list/cluster id attribut to items
Change-Id: If23c530b10c67613311aa8a8a1b1a8acf95f3c48
Reviewed-on: https://code.wireshark.org/review/294
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-21 16:56:02 +00:00
Matthieu Texier 64b474610c BGP : clean up of unused define and adding amount of ext-communities in community item
Change-Id: I55793e522d0bdaee0f19ca020a8ef0097f5fb5f1
Reviewed-on: https://code.wireshark.org/review/255
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-20 18:22:13 +00:00
Bill Meier 5a775b12c9 Fix incorrect definition and use of a val64_string which caused a crash.
Change-Id: Ib15ddef167c0e2af24938fc5bb68839eac65ca2c
Reviewed-on: https://code.wireshark.org/review/258
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-19 20:54:05 +00:00
Alexis La Goutte ff52d8b70f BGP : Update Capability Codes
From IANA page: http://www.iana.org/assignments/capability-codes/capability-codes.xhtml
Use decimal value (like iana page)
Fix Dynamic Capability value...

Change-Id: I9a6e672de840403943792b6ba4d913b186b1d09f
Reviewed-on: https://code.wireshark.org/review/243
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-17 22:25:09 +00:00
Alexis La Goutte 49abfc47cc Display the number of unknown BGP Path Attribut (use val_to_str)
Change-Id: I6aed8ee3a92cc08aebfef58372285bed5a62e8bd
Reviewed-on: https://code.wireshark.org/review/240
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-17 11:23:37 +00:00
Matthieu Texier 1eeb33a7b0 Redesign of BGP ext-com in a separate function, alignement with RFC and IANA, use of items instead of add_text
Change-Id: I4af2ee8e760aa80eeb28f71e93f8948ef5b26eb5
Reviewed-on: https://code.wireshark.org/review/95
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Evan Huus <eapache@gmail.com>
2014-02-13 22:27:36 +00:00
Gilbert Ramirez 4cc694839d Fix all -fstrict-alias warnings found by gcc 4.1.2
The majority of the fixes are for calls to uat_new(). Instead of
having each caller cast its private data to (void**), we use void*
in the uat_new() API itself. Inside uat_new(), we cast the void*
to void**.

Some dissectors use val64_string arrays, so a VALS64() macro was
added for those, to avoid using VALS(), which is useful only for
value_string arrays.

packet-mq.c was changed because dissect_nt_sid() requires
a char**, not a guint**. All other callers of dissect_nt_sid() use
char*'s (and take the address of it) for their local storage. So,
this was changed to follow the other practices.

A confusion between gint and absolute_time_display_e in packet-time.c
was cleared up.

The ugliest fix is the addition of ip6_guint8_to_str(), for exactly
one caller. The caller uses one type of ip6 address byte array,
while ip6_to_str() expects another. This new function is in place
until the various address implementations can be consolidated.

Add VALS64() to the developer documentation.

Change-Id: If93ff5c6c8c7cc3c9510d7fb78fa9108e4552805
Reviewed-on: https://code.wireshark.org/review/48
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-03 09:26:10 +00:00
Bill Meier 80b5c57713 Fix: value string specified as a BASE_VAL64_STRING in
an hf[] entry but defined as a 'value_string' intead of
 as a 'val64_string'.

Caused 'tshark -G values' to crash
 (and presumably would also cause a crash when the value-string
  is referenced in a dissection):

Introduced in svn #54728

(Note: There's still another 'tshark -G values' crash to to found & fixed)


svn path=/trunk/; revision=54983
2014-01-27 17:20:44 +00:00
Guy Harris 7ef949bc39 No reason for decode_bgp_rd()'s return value to be non-const, so make it
const.

svn path=/trunk/; revision=54734
2014-01-13 22:38:56 +00:00
Alexis La Goutte 10345a6b2e From Miroslav Miklus via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9504 Enhance BGP dissector : bgp-ls dissector (draft-ietf-idr-ls-distribution-04)
BGPTYPE_LINK_STATE_ATTR is temporarily set to 99, would need change when IANA allocate a Path Attribute value for BGP-LS

From me :
* Fix indent
* fix arg encoding (via encoding-args tools)

svn path=/trunk/; revision=54728
2014-01-13 22:24:32 +00:00
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
Alexis La Goutte 50989f30a3 From Matt Texier
Enhance BGP Dissector : Communities

Use proto_tree_add_item

From me
Missing space for well known community

svn path=/trunk/; revision=53783
2013-12-04 15:13:24 +00:00
Alexis La Goutte 785ebdc13c From Matt Texier Enhance BGP Dissector : AS_PATH
Full rewrite of BGP AS_PATH attribut using items and a clearer (and documentated !) heuristic

From me
Fix indent

svn path=/trunk/; revision=53419
2013-11-18 22:02:50 +00:00
Jakub Zawadzki ae59b09443 Add missing includes in order to remove exceptions.h from proto.h (next commit).
svn path=/trunk/; revision=53230
2013-11-10 15:59:37 +00:00
Pascal Quantin 6cedc2c336 Convert a few more dissectors to wmem
svn path=/trunk/; revision=51991
2013-09-12 22:03:31 +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 90e273cb91 Enhance BGP Update
Step 4 : Convert proto_tree_add_text calls to proto_tree_add_item and use new name of RFC4271 (  Withdrawn Routes Length ...)

svn path=/trunk/; revision=51184
2013-08-07 12:05:23 +00:00
Alexis La Goutte 8da9a76650 From Matt Texier
Enhance BGP Dissector

Step 3 :Variable consistency and renaming, adding RFC and draft as comments (Preperation for next enhance...)

From me :
Fix some typo/whitespace
Make checkhf happy...

Signed-off-by: Alexis La Goutte <alexis.lagoutte@gmail.com>

svn path=/trunk/; revision=51182
2013-08-07 12:04:04 +00:00
Alexis La Goutte f15a20c9f0 Enhance BGP Update (Path Attribute)
Step 2 ! Make Path Attribute field filterable...

svn path=/trunk/; revision=50918
2013-07-26 16:26:29 +00:00
Alexis La Goutte 54fc4025e6 Enhance BGP Update
First step ! Remove ugly double switch(bgpa_type)... (use proto_item_append_text)

svn path=/trunk/; revision=50917
2013-07-26 16:26:21 +00:00
Alexis La Goutte c44977663a From Matt Texier via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8691 Improvement of previous support of RFC5575 BGP flow spec
From me
* Enhance and fix some display tree stuff
* Add Matt to AUTHORS

svn path=/trunk/; revision=50534
2013-07-12 13:55:29 +00:00
Michael Mann 6b3ac2d952 Batch of filterable expert infos.
svn path=/trunk/; revision=50454
2013-07-09 01:18:52 +00:00
Alexis La Goutte 8e4e4a3d76 From report of Alexander Okonnikov and Patch of Matt Texier via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8802 Incorrect decoding of Layer2 Info Extended Community
Within BGP Update message for BGP VPLS (RFC 4761) some parts of Extended Community "Layer2 Info" are incorrectly decoded:

1. Encapsulation - Unknown (0x13). Per RFC 4761 encap type 0x13 is "VPLS" (clause 3.2.4);

2. Control Flags - per RFC 4761 (clause 3.2.4) two least-significant bits (6 and 7) are defined as:
"C" (bit 6, Control Word): value 1 - Control Word is required - and value 0 - Control Word is not required; decoding is correct (at least for value 0);
"S" (bit 7, Sequence delivery): value 1 - Sequence delivery is required - and value 0 - Sequence delivery is not required; decoding is incorrect, because for value 0 (sequence delivery is not required) you provide description that "Sequence delivery  is required".

Also, there is description (at the same string) "F Flag (reserved) set. IETF document draft-ietf-l2vpn-vpls-multihoming (clause 3.3.1) updates RFC 4761 and defines two additional bits within Control Flags byte - D (bit 0, "Down") and F (bit 2, "Flush"). You provide description that "F Flag (reserved) set" when this flag actually is not set (value 0). Furthermore, you don't provide description about status of flag D (in attached dump in the first packet flag D is set and unset in the second packet).

svn path=/trunk/; revision=50085
2013-06-20 20:17:25 +00:00
Martin Kaiser 27598e20a2 fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8806
assign the return values of decode_...() functions to a signed int
check for negative return values

svn path=/trunk/; revision=49963
2013-06-16 15:29:14 +00:00
Michael Mann e1b7a26463 Adding support of BGP flow spec RFC 5575.
From Matt Texier, bug 8691 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8691)

svn path=/trunk/; revision=49914
2013-06-13 02:35:23 +00:00
Michael Mann 2d37ec3cb0 Batch of filterable expert infos.
svn path=/trunk/; revision=49853
2013-06-09 03:28:05 +00:00
Jaap Keuter 97136126bc Typo's. That is all.
svn path=/trunk/; revision=48685
2013-04-01 15:29:49 +00:00
Anders Broman b539916835 [-Wmissing-prototypes]
explicit casts.

svn path=/trunk/; revision=48293
2013-03-14 07:37:13 +00:00
Alexis La Goutte 1d74daaec3 Remove unused bgp_route_refresh struct
svn path=/trunk/; revision=48278
2013-03-13 15:02:17 +00:00
Guy Harris 6b629c4d92 Move show_exception() and show_reported_bounds_error() to
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
2013-02-27 22:43:54 +00:00
Alexis La Goutte 2e8cb1c5cd Enhance BGP ORF (Make field filterable)
svn path=/trunk/; revision=46508
2012-12-11 23:24:02 +00:00
Jeff Morriss 0266cceef3 Make all enum_val_t's const.
svn path=/trunk/; revision=46292
2012-11-29 20:15:37 +00:00
Alexis La Goutte 7c59618e8d From Olivier Benghozi via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7734
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
2012-09-30 10:38:37 +00:00
Alexis La Goutte cd519e450c From Olivier Benghozi via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7734
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
2012-09-30 10:05:18 +00:00
Michael Mann 65ef9e9d6b replaced decode_numeric_bitfield calls with filterable item or removed it if it didn't mathematically do anything.
svn path=/trunk/; revision=45166
2012-09-27 04:36:40 +00:00
Michael Mann 4f9707469d replaced decode_boolean_bitfield calls with itemized filters
added tfs_no_yes to tfs.[ch]

svn path=/trunk/; revision=45115
2012-09-25 01:00:41 +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 1b17369504 Fix: code under 'if(tree)' (in)directly calls sub-dissector/col_...()/expert...() fcns
svn path=/trunk/; revision=43226
2012-06-12 21:22:46 +00:00
pascal 7bbbb88068 From Thomas Loockx via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7269 :
Add BGP MDT-SAFI dissection (RFC6037)

svn path=/trunk/; revision=42713
2012-05-19 12:32:10 +00:00
Bill Meier 2ed4baea4f all:
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
2012-05-16 01:41:03 +00:00
Alexis La Goutte 3fa9ea87ce Add RFC6608 Subcodes for BGP Finite State Machine Error
Update other notify subcodes (draft-ietf-idr-cease-subcode-02 => RFC4484)...

svn path=/trunk/; revision=42510
2012-05-08 17:31:05 +00:00
Alexis La Goutte dbce54c4f3 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=41049
2012-02-17 13:33:53 +00:00
Alexis La Goutte a34db114cc Enhance BGP Notification message
* 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
2012-02-12 17:41:57 +00:00
Chris Maynard c2208aa172 Fix some duplicate display filter names.
svn path=/trunk/; revision=40586
2012-01-19 19:15:13 +00:00
Jaap Keuter db1ea8f80d From astramax57:
After r38723, some BGP AS_PATH packets were no longer dissected.

svn path=/trunk/; revision=40130
2011-12-09 16:34:02 +00:00
Jaap Keuter f0525ee415 From Michael Sakaluk:
This patch adds support to the BGP dissector for RFC 5512 and RFC 5640.

svn path=/trunk/; revision=40082
2011-12-03 13:35:06 +00:00
Alexis La Goutte 5fb574c69e Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=39655
2011-10-28 17:44:01 +00:00
Jeff Morriss bcd13b0d6f From Thomas Loockx via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6324 :
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
2011-10-25 00:51:58 +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
Alexis La Goutte 097e9bb397 Enhance BGP Capability message
* Make field filterable 
* Use expert info to display a wrong length
* Remove duplicate code for type and length

svn path=/trunk/; revision=39446
2011-10-17 18:19:18 +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
Alexis La Goutte 10056d45c1 Enhance BGP Open message
* 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
2011-10-09 13:06:32 +00:00
Alexis La Goutte fc823d7b6a Enhance BGP Header
* Remove a not needed subtree
* Make field filtereable
* Use expert info to display a wrong length

svn path=/trunk/; revision=39316
2011-10-08 18:12:59 +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
Alexis La Goutte 89b307973a Fix checkhf
* Remove hf_bgp_cluster_identifier never use ! (Add in Revision #7546)

svn path=/trunk/; revision=39195
2011-09-30 15:14:33 +00:00
Alexis La Goutte 50c6e8bb0f Enhance extended communities when RD Type 2
svn path=/trunk/; revision=39194
2011-09-30 15:08:52 +00:00
Alexis La Goutte c22e483238 Fix a typo in RD offset
svn path=/trunk/; revision=39120
2011-09-24 13:36:51 +00:00
Alexis La Goutte 5d51177ad8 Convert "space tabs" to spaces
Add modeline information

svn path=/trunk/; revision=39099
2011-09-23 09:03:26 +00:00
Alexis La Goutte 93e7484c63 Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=39098
2011-09-23 08:44:53 +00:00
Alexis La Goutte d70a78c152 From https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6128 : Wireshark doesn't decode BGP.MP_REACH_NLRI.NLRI when RD type is 2(defined in RFC4364:4.2)
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
2011-09-23 08:41:23 +00:00
Alexis La Goutte 154b424ed3 From Olivier Montanuy via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5458
BGP add-path (Additional Paths) support for IPv4 unicast

From me:
Fix some whitespace/tab...

svn path=/trunk/; revision=38724
2011-08-24 21:58:14 +00:00
Alexis La Goutte 11f1f1a019 From astramax57 via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6188
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
2011-08-24 21:37:37 +00:00
Alexis La Goutte cd3e81d97c From Ryan Hoffman via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6122
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
2011-08-18 13:43:24 +00:00
Alexis La Goutte 21e7a7a277 Enhance support of RD Type 2 (FORMAT_AS4_LOC) (RFC4364)
svn path=/trunk/; revision=38600
2011-08-18 12:51:30 +00:00
Alexis La Goutte 2c649f7b78 From Sergey V. Lobanov via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6128
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
2011-08-17 18:09:27 +00:00
Guy Harris 464778ed69 More misspellings of "unknown", for bug 6244.
svn path=/trunk/; revision=38565
2011-08-16 16:26:50 +00:00
Bill Meier e777d9e375 From Yaniv Kaul:
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
2011-04-27 17:15:57 +00:00
Bill Meier 7d8633af66 Don't assign to a proto_item* if the value won't be used: Coverity 852,854;
Add a hidden item to the correct subtree: Coverity 853.

svn path=/trunk/; revision=36334
2011-03-25 21:09:28 +00:00
Jeff Morriss cc6fc23812 From Didier via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3055 :
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
2011-03-25 19:02:18 +00:00
Anders Broman ed66081a4d From Alexis La Goutte:
Cleanup packet-ipv6.h and dependency.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5713

svn path=/trunk/; revision=36031
2011-02-23 13:51:49 +00:00
Chris Maynard e867b10b98 Properly define and dissect BGP_EXT_COM_LINKBAND. Fixes bug 4409 reported by
Max Ivanov.

svn path=/trunk/; revision=35260
2010-12-24 13:53:26 +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
Jeff Morriss 33f116a46d Restore pinfo->private_data after an exception was thrown by a subdissector.
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
2010-10-08 17:48:22 +00:00
Stig Bjørlykke f4955fcae2 Avoid a possible dereference of null pointer.
svn path=/trunk/; revision=33708
2010-08-04 13:32:44 +00:00
Bill Meier 0fc9115705 Use consistent indentation; Whitesapce & formatting cleanup.
svn path=/trunk/; revision=32755
2010-05-11 16:54:55 +00:00
Bill Meier 09764dd969 Remove unneeded #include <stdio.h>
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +00:00