summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-bgp.c
AgeCommit message (Collapse)AuthorFilesLines
2017-01-25Clean up EVPN NLRIs dissection.Guy Harris1-25/+93
Do the NLRI length checks in the switch cases for each route type, and do them for *all* route types, rather than throwing a random check in for one particular route type. There is no need to fail up front for unknown route types; at least dissect the type and length, and fail in the switch statement. Dissect the route descriptor in each of the switch cases, after the length check, rather than doing it up front. Add a comment noting where the prefix route type comes from. Change-Id: Iae26ecd467d4b36dbcf52e7998bd2881405281aa Reviewed-on: https://code.wireshark.org/review/19774 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-01-25That field is a route type, not an address family identifier.Guy Harris1-2/+2
Change-Id: I547dd12479b9634d8176eca9fd2ae6c9e1f87981 Reviewed-on: https://code.wireshark.org/review/19772 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-01-25Clean up and update list of RFCs and I-Ds supported.Guy Harris1-3/+2
Change-Id: Ided8496b1d57a7906c805bca4ed848903d553721 Reviewed-on: https://code.wireshark.org/review/19771 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-01-25Update comment, clean up identation.Guy Harris1-72/+72
Change-Id: I30812657e3fa5dc21e64ed2fb7605e5f2a36ab03 Reviewed-on: https://code.wireshark.org/review/19770 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-01-10Rename tvb_new_subset() to tvb_new_subset_length_caplen().Guy Harris1-1/+1
This emphasizes that there is no such thing as *the* routine to construct a subset tvbuff; you need to choose one of tvb_new_subset_remaining() (if you want a new tvbuff that contains everything past a certain point in an existing tvbuff), tvb_new_subset_length() (if you want a subset that contains everything past a certain point, for some number of bytes, in an existing tvbuff), and tvb_new_subset_length_caplen() (for all other cases). Many of the calls to tvb_new_subset_length_caplen() should really be calling one of the other routines; that's the next step. (This also makes it easier to find the calls that need fixing.) Change-Id: Ieb3d676d8cda535451c119487d7cd3b559221f2b Reviewed-on: https://code.wireshark.org/review/19597 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-12-13Add BGP dissector support for draft-ietf-idr-shutdown-01Arjen Zonneveld1-1/+21
Parse the communication bits of a BGP Cease NOTIFICATION: Border Gateway Protocol - NOTIFICATION Message Marker: ffffffffffffffffffffffffffffffff Length: 146 Type: NOTIFICATION Message (3) Major error Code: Cease (6) Minor error Code (Cease): Administratively Shutdown (2) BGP Shutdown Communication Length: 124 Shutdown Communication: NTT will perform maintenance on this router. This is tracked in TICKET-1-24824294. Contact noc@ntt.net for more information. Draft at https://tools.ietf.org/html/draft-ietf-idr-shutdown-01, sample file taken from from http://instituut.net/~job/shutdown.pcap Change-Id: I2ab633883cc69e560ff79cb6239e02fcffd71e10 Reviewed-on: https://code.wireshark.org/review/19144 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> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-11-21bgp: remove dead code (CID 1158699).Dario Lombardo1-2/+0
Change-Id: Ib7f766819bb81858fa0c3a0b49fe39de7123bf6d Reviewed-on: https://code.wireshark.org/review/18908 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-11-17BGP: Fix length in decode_prefix4()Uli Heilmeier1-10/+9
When decode_prefix4() gets called with more prefixes the length of proto_tree_add_subtree_format() should not be the total length. As the "Withdrawn route" part was the only one where decode_prefix4() has been called with a tlen not equal 0 we can eliminate the tlen parameter. Bug: 13146 Change-Id: I708dec2cecbed6054b60190104b82c72d54e8037 Reviewed-on: https://code.wireshark.org/review/18852 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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-11-02Add BGP dissector support for draft-heitz-idr-large-community-04Arjen Zonneveld1-0/+49
Parses large communities as specified in https://tools.ietf.org/html/draft-heitz-idr-large-community-04 Path Attribute - LARGE_COMMUNITY: 65536:1:1 65536:1:2 65536:1:3 Flags: 0xc0, Optional, Transitive: Optional, Transitive, Complete 1... .... = Optional: Optional .1.. .... = Transitive: Transitive ..0. .... = Partial: Complete ...0 .... = Length: Regular length Type Code: LARGE_COMMUNITY (32) Length: 36 Large communities: 65536:1:1 Global Administrator: 65536 Local Data Part 1: 1 Local Data Part 2: 1 Large communities: 65536:1:2 Global Administrator: 65536 Local Data Part 1: 1 Local Data Part 2: 2 Large communities: 65536:1:3 Global Administrator: 65536 Local Data Part 1: 1 Local Data Part 2: 3 Bug: 13083 Change-Id: I8db0601f621ceb6fb2e170ed9bfc2747091495ee Reviewed-on: https://code.wireshark.org/review/18172 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-18BGP: fix bgp.ls.tlv.link_protection_type_value is not of an FT_{U}INTn type]Alexis La Goutte1-2/+2
Bug: 13021 Change-Id: I3464c7af61323efb25dd89655865d536aeae6e59 Reviewed-on: https://code.wireshark.org/review/18261 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-09Note the registry for the bgp_l2vpn_encaps values.Guy Harris1-0/+7
Change-Id: Id8ccf81c08d84124e1d7361ce6e87080fa6b440d Reviewed-on: https://code.wireshark.org/review/18128 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-10-08Combine Decode As and port preferences for tcp.port dissector table.Michael Mann1-1/+1
This patch introduces new APIs to allow dissectors to have a preference for a (TCP) port, but the underlying data is actually part of Decode As functionality. For now the APIs are intentionally separate from the regular APIs that register a dissector within a dissector table. It may be possible to eventually combine the two so that all dissectors that register with a dissector table have an opportunity to "automatically" have a preference to adjust the "table value" through the preferences dialog. The tcp.port dissector table was used as the guinea pig. This will eventually be expanded to other dissector tables as well (most notably UDP ports). Some dissectors that "shared" a TCP/UDP port preference were also converted. It also removed the need for some preference callback functions (mostly when the callback function was the proto_reg_handoff function) so there is cleanup around that. Dissectors that has a port preference whose default was 0 were switched to using the dissector_add_for_decode_as_with_preference API rather than dissector_add_uint_with_preference Also added comments for TCP ports used that aren't IANA registered. Change-Id: I99604f95d426ad345f4b494598d94178b886eb67 Reviewed-on: https://code.wireshark.org/review/17724 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-09-26BGP: Support for Cost, EIGRP and OSPF extended communitiesPeter Palúch1-60/+432
Bug: 12891 Change-Id: I70ed7f8a08122c559128b8df4d65e03be8201e1a Reviewed-on: https://code.wireshark.org/review/17683 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Palúch <Peter.Paluch@fri.uniza.sk> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-09-02Reworked dissection of BGP Extended Community attributesPeter Palúch1-172/+352
This patch contains a partial rewrite of the BGP dissector for Extended Communities. The changes were primarily motivated by my dissatisfaction with the generally unreadable way in which the types, names and values of BGP Extended Communities were displayed in Wireshark GUI. The rewrite provides a hopefully more readable and eye-pleasing way of displaying the extended communities. I have also corrected numerous other flaws with the Extended Community dissector I stumbled across. In particular, the changes encompass the following: 1.) The Type octet of an Extended Community is now analyzed including its Authority and Transitivity bits. These were not dissected before. 2.) Dissection for EVPN Extended Community was improved. The original implementation blindly assumed that there is just a single subtype and decoded the community ignoring the actual subtype. 3.) I have removed the hf_bgp_ext_com_value_unknown16 and ..._unknown32. The current code uses a different approach to display values of unrecognized communities, and for recognized communities, there are no "unknown" subfields. 4.) Removed a couple of variables declared at the dissect_bgp_update_ext_com() level. These stored the result of a tvb_get_...() call but the value was used only once. I have replaced them with the direct use of tvb_get_...() 5.) Moved duplicate code to add the Type value into the community_tree from each branch in the switch(com_type_high_byte) out of it and placed it before the switch(). 6.) Reworked the style in which individual communities are displayed. Each community item (collapsed) is now displayed using the following label format: Community name: Values [Generic community type] Examples: Route Target: 1:1 [Transitive 2-Octet AS-Specific] Unknown subtype 0x01: 0x8081 0x0000 0x2800 [Non-Transitive Opaque] Unknown type 0x88 subtype 0x00: 0x0000 0x0000 0x0000 [Unknown community] 6.) To keep the filter names more consistent, changed names of selected filters: bgp.ext_com.type_high -> bgp.ext_com.type bgp.ext_com.type_low -> bgp.ext_com.stype_unknown In particular, I do not want to call the subtype as bgp.ext_com.type_low because that filter applied only to unrecognized subtypes even though its name would suggest to users that they can filter any community based on it. 7.) Numerous corrections in text labels, names and labels that have been incorrect or incomplete. Bug: 12794 Change-Id: I9653dbbc8a8f85d0cd2753dd12fd537f0a604cf3 Reviewed-on: https://code.wireshark.org/review/17377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-08-18BGP: Add no supported AFI/SAFI (Cisco) Open Message ErrorAlexis La Goutte1-0/+1
Bug:12601 Change-Id: I555ee8097ea81e1afa8f2f5b2aba8fce60742016 Reviewed-on: https://code.wireshark.org/review/17107 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-08-12bgp: remove dead code (CID 1228878).Dario Lombardo1-4/+2
afi can take only one of the 2 above values, according to the check at the beginning of the function. Change-Id: I6652a5c64b4fbc8d2e907afb3b4f66d187ff9745 Reviewed-on: https://code.wireshark.org/review/17011 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-26BGP: Fix Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-3/+0
Change-Id: Iaec85cbe8fbced461a56f55f8813506054356369 Reviewed-on: https://code.wireshark.org/review/16688 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-07-26MP-BGP dissector: Fix EVPN route type 5 decodingMatt Texier1-71/+104
Route type 5 do have optional fields that was not properly decoded (MPLS labels) Bug: 12631 Change-Id: I12d61ef170d4e0f6e6d2c7bf25f149db84c186d7 Reviewed-on: https://code.wireshark.org/review/16576 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>
2016-07-10BGP: Add support of Vendor Capability 131 (Multisession Cisco)Alexis La Goutte1-0/+18
Issue reported by Garri Djavadyan Change-Id: I6dd4bd20d82a3f2cb8aa45f740f72d33e33053da Ping-Bug:12604 Reviewed-on: https://code.wireshark.org/review/16374 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-10BGP: Add (Cisco) for "Vendor" Cisco capabilityAlexis La Goutte1-2/+2
* Route Refresh Cisco capability (128) * ORF Cisco capability (130) Issue reported by Garri Djavadyan Bug: 12605 Change-Id: Icb19cd6a75315e5af4772dd7833a5b762bdd7ff4 Reviewed-on: https://code.wireshark.org/review/16373 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-05bgp: add return check (CID 1354417).Dario Lombardo1-2/+3
Change-Id: Id8be1d5f6346686087d747167ec44df2b88dd35e Reviewed-on: https://code.wireshark.org/review/16304 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-07-02BGP: Fixed an side effect of length coding on offsetMatt Texier1-2/+2
Bug: 12568 Change-Id: Ibf063293041d749664f6e6ecd2455024ea3fd4ed Reviewed-on: https://code.wireshark.org/review/16237 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-30BGP dissector: Fixing NLRI length for flow spec NLRIMatt Texier1-1/+1
Bug: 12568 Change-Id: Id2b89c2d133865771e21acf3ee224f57ac9d262b Reviewed-on: https://code.wireshark.org/review/16203 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-06-05Resolve false positive ERROR: NO ARRAY found in ei array entriesJim Young1-2/+2
The enhanced checkhf.pl in https://code.wireshark.org/review/#/c/15717/ validates ei items in addition to href items. This patch addresses the false positive ERRORS reported by the enhanced checkhf.pl for a "cosmetic" issue (missing space after { in ei array entries). Change-Id: I87876ce2cfa4b0e11cb22f457bd9ab025d939e5c Reviewed-on: https://code.wireshark.org/review/15739 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-18BGP : Add Virtual-Network Identifier Extended CommunityAlexis La Goutte1-0/+2
From draft-drao-bgp-l3vpn-virtual-network-overlays Change-Id: I0a0137b6a8b8fbb4b4efd6f5e08eba5ed6d7a9d6 Reviewed-on: https://code.wireshark.org/review/15477 Reviewed-by: Anders Broman <a.broman58@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-10BGP-LS: fix Prefix-SID parsing, add SR-Capabilities and SR-AlgorithmFrancesco Fondelli1-3/+124
dissection. - 20 *rightmost* bits of the 'SID/Label' field represent a MPLS label (Adjacency-SID already fixed). - Add support for SR-Capabilities (TLV 1034) and SR-Algorithm (TLV 1035) dissection (draft-gredler-idr-bgp-ls-segment-routing-ext-01). Change-Id: Ib02137f1c41c4a201afee5d61cf2b6bf88d59991 Signed-off-by: Francesco Fondelli <francesco.fondelli@gmail.com> Reviewed-on: https://code.wireshark.org/review/15306 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>
2016-03-08BGP: Fix detection of additional pathUli Heilmeier1-1/+1
When additional path index are in use there must be more remaining data bytes. Therefore we return only 1 when the len is greater 1. Bug has been reported by Garri. Bug: 12240 Change-Id: Ia24311dcedc450e4208df875bc254c9744dec5dd Reviewed-on: https://code.wireshark.org/review/14396 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-23BGP-LS: Protocol-ID aware Prefix/Adj Flags dissectionFrancesco Fondelli1-70/+276
BGP-LS is just a collector of IGP link state information. Some fields are encoded "as-is" from the IGP, hence in order to dissect them properly we must be aware of their origin, e.g. IS-IS or OSPF. So, *before* dissecting LINK_STATE attributes we must get the 'Protocol-ID' field that is present in the MP_[UN]REACH_NLRI attribute. The tricky thing is that there is no strict order for path attributes on the wire, hence we have to keep track of 1) the 'Protocol-ID' from the MP_[UN]REACH_NLRI and 2) the offset/len of the LINK_STATE attribute. We store them in per-packet proto_data and once we got both we are ready for the LINK_STATE attribute dissection. Change-Id: Ibe2b7f5c9039ad63a72f3f9fb8a9c33c0be44ed0 Signed-off-by: Francesco Fondelli <francesco.fondelli@gmail.com> Reviewed-on: https://code.wireshark.org/review/13970 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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-02-10BGP-LS: fix Adjacency-SID parsingFrancesco Fondelli1-1/+1
if length is set to 7 then the 20 *rightmost* bits of the 'SID/Label/Index' field represent a MPLS label. Change-Id: If196af244549b75a80de11c1d8e11507e9a6ce58 Signed-off-by: Francesco Fondelli <francesco.fondelli@gmail.com> Reviewed-on: https://code.wireshark.org/review/13848 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-02-02BGP-LS: fix 'TE Default Metric TLV' and 'IGP Metric TLV' lengthFrancesco Fondelli1-15/+58
parsing Change-Id: I55d0b435ae1b12e14a20dd9ea18ba05188b0e378 Signed-off-by: Francesco Fondelli <francesco.fondelli@gmail.com> Reviewed-on: https://code.wireshark.org/review/13666 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> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-01BGP: Link-State extensions for Segment Routing as perFrancesco Fondelli1-60/+227
draft-gredler-idr-bgp-ls-segment-routing-ext-01 Bug: 12060 Change-Id: I53c837ac5c195bdee716a48d8494633b663e751d Signed-off-by: Francesco Fondelli <francesco.fondelli@gmail.com> Reviewed-on: https://code.wireshark.org/review/13579 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-01-13Use result of register_dissectorPeter Wu1-4/+3
Assign result of `register_dissector(..., func, proto)` to FOO_handle and remove `FOO_handle = create_dissector_handle(func, proto)`. Found by looking for files named packet-FOO.c having the above create_dissector_handle pattern. Some files (with different dissect routines for the two functions) remain unchanged. Change-Id: Ifbed8202c6dbc63a1dae9acc03313980ffbbbb90 Reviewed-on: https://code.wireshark.org/review/13247 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-08Fix a lot of typos and misspellingsmoshekaplan1-4/+4
Change-Id: I8512cfa1d424f82a873a0e0e1d22c7b075fdd7f3 Reviewed-on: https://code.wireshark.org/review/13069 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-04Rename ipv4_addr and ipv6_addr to indicate their full contents.Guy Harris1-12/+12
They're not just addresses, they also include a mask length for IPv4 and a prefix length for IPv6. Rename them appropriately. Rename the old ipv4_addr_and_mask() and ipv6_addr_and_mask() to reflect that 1) they fetch data from a tvbuff and 2) *don't* fetch the mask length or prefix length, those lengths are passed as arguments to indicate how many bytes worth of address to fetch. Change-Id: I4cad5a186ad7bfcb60022a91dbe8bc8479e6471f Reviewed-on: https://code.wireshark.org/review/13035 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-18Removed local definitions of offsetof().Stig Bjørlykke1-5/+0
The offsetof() macro is an ANSI C library feature. Change-Id: I2ac91b0b4c94c6f6baf14133b076fdc5ed2e182b Reviewed-on: https://code.wireshark.org/review/12707 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-11Fix Recurring check found by PVS Studio (V571)Alexis La Goutte1-5/+3
packet-ncp2222.inc: The 'ncp_rec->func == 0x59' condition was already verified in line 7300. packet-bgp: The 'nlri_len < 21' condition was already verified in line 3879 packet-rtp.c: The 'p_conv_data' condition was already verified in line 1460 Change-Id: I65299718b26454596e3f25665d413a17a99e4ce0 Reviewed-on: https://code.wireshark.org/review/12341 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>
2015-12-09new_register_dissector -> register_dissector for dissector directory.Michael Mann1-1/+1
Change-Id: Ie39ef054a4a942687bd079f3a4d8c2cc55d5f22c Reviewed-on: https://code.wireshark.org/review/12485 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-1/+1
Some of the ASN.1 dissectors still generate a new_create_dissector_handle from the tool itself, so leave those for now. Change-Id: Ic6e5803b1444d7ac24070949f5fd557909a5641f Reviewed-on: https://code.wireshark.org/review/12484 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-05BGP: fix some issueMatt Texier1-5/+22
Fixing ESI Label extended community Fixing PMSI label field decoding on 20 bits Fixing inclusive multicast Ethernet tag route Fixing Ethernet segment route Bug: 11650 Change-Id: Ifadcc3099f681a5c9480d1ccdd50b29ef4c0069f Reviewed-on: https://code.wireshark.org/review/12430 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-24Adding RFC5512 extended communityMatt Texier1-14/+70
BGP: add the ability to decode Opaque extented community and in particular tunnel type Change-Id: Ife53a267a2311397123a4e670924c673904bccbd Ping-Bug: 11650 Reviewed-on: https://code.wireshark.org/review/12076 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-23register_dissector -> new_register_dissectorMichael Mann1-7/+8
Change-Id: Ic368dd8e83cf39e0c934da0ae2744778e2d54ce6 Reviewed-on: https://code.wireshark.org/review/12050 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-18BGP: Add dissection of ESI NLRI (EVPN) RFC7432Matt Texier1-10/+174
Ping-Bug: 11650 Change-Id: I1e6418afe1d02da9f30c429c0220932d74344b8d Reviewed-on: https://code.wireshark.org/review/11775 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-04Don't include "file.h" if you don't need it.Guy Harris1-1/+1
It ends up dragging in libwireshark headers, which programs not linking with libwireshark shouldn't do. In particular, including <epan/address.h> causes some functions that refer to libwireshark functions to be defined if the compiler doesn't handle "static inline" the way GCC does, and you end up requiring libwireshark even though you shouldn't require it. Move plurality() to wsutil/str_util.h, so that non-libwireshark code can get it without include epan/packet.h. Fix includes as necessary. Change-Id: Ie4819719da4c2b349f61445112aa419e99b977d3 Reviewed-on: https://code.wireshark.org/review/11545 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-26Clean up more unnecessary use of the 'volatile' key word.Jeff Morriss1-2/+1
Change-Id: I3e72fddc6ed380780d7e2e1c8df87e580138188d Reviewed-on: https://code.wireshark.org/review/11271 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-22Use address functions instead of ADDRESS macros in asn1 and epanGerald Combs1-12/+12
Replace CMP_ADDRESS, COPY_ADDRESS, et al with their lower-case equivalents in the asn1 and epan directories. Change-Id: I4043b0931d4353d60cffbd829e30269eb8d08cf4 Reviewed-on: https://code.wireshark.org/review/11200 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-14Change proto_tree_add_ipv6() to take a struct e_in6_addr pointerJoão Valverde1-5/+3
tvb_get_ipv6() takes a struct e_in6_addr *, use that here too. Change-Id: Id8b368daa05c151a61d4bc01dc88c00da13e9c88 Reviewed-on: https://code.wireshark.org/review/10953 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: Balint Reczey <balint@balintreczey.hu> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-10-07BGP: Add BGP-Extended Message CapabilityAlexis La Goutte1-2/+4
From draft-ietf-idr-bgp-extended-messages Update BGP Capability Codes to 2015-09-30 Change-Id: I2f3b44ad8ad7a9e5444cdfbfb22bf7d0538ffbfc Reviewed-on: https://code.wireshark.org/review/10826 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-08BGP: Update BGP Capability ListAlexis La Goutte1-2/+43
from IANA capability-codes 2015-07-23 * draft-ietf-idr-bgp-enhanced-route-refresh => RFC7313 * Add CP-ORF (RFC7543) * Add FQDN draft-walton-bgp-hostname-capability Change-Id: I9de73be9eca1ed2456d4a15150b040454eb01add Reviewed-on: https://code.wireshark.org/review/10442 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-09-04BGP: Fix typoguydavies1-1/+1
Change-Id: I2d33af7da22fee543d08624d06ca8880472f3586 Reviewed-on: https://code.wireshark.org/review/10377 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-08-30BGP: fixed incorrect NLRI decodingPyeole1-0/+6
Bug: 11308 Change-Id: I967b9596edad1e3656e139d0ca3a0e3c389d80ea Reviewed-on: https://code.wireshark.org/review/10308 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>