Commit Graph

163 Commits

Author SHA1 Message Date
Ebben Aries 23c6a0f97f [bmp] Support for decoding of BGP Peer Distinguisher
re-utilize decode_bgp_rd() logic from packet-bgp

Change-Id: I588a58e0b2f7da5d3c9b86b28abb9c5b29e0dc8f
Reviewed-on: https://code.wireshark.org/review/7537
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-03-05 15:39:48 +00:00
Ebben Aries a6c44c2402 [bmp] Adding dissector for BGP Monitoring Protocol
* Support per draft-ietf-grow-bmp-07

Change-Id: Iadb833157e7832077429c048e28e9814da29e2c6
Reviewed-on: https://code.wireshark.org/review/7192
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-02-19 18:36:53 +00:00
Alexis La Goutte b41065e223 BGP: EVPN - Route Type 4 - "Invalid length of IP Address" - "Expert Info" shows a false error
Wrong offset (14 -> 20) to get IP Address Legnth

Issue Reported by Rui
Bug: 10873

Change-Id: Ib7aa80ac78028a2c8d548f4030278166be9ed0cc
Reviewed-on: https://code.wireshark.org/review/6657
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-01-19 20:34:21 +00:00
Alexis La Goutte 9fd507827e BGP: fix field bgp.evpn.nlri.mpls_ls is not of type FT_STRING, FT_STRINGZ, or FT_STRINGZPAD
Change-Id: Ida14611dee9eb01e1eab13a96c15ab3d759ed1cd
Reviewed-on: https://code.wireshark.org/review/6656
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-01-19 20:33:39 +00:00
Michael Mann 20414ebf4b Replace some ep_alloc and ep_alloc0 with its wmem equivalent.
These cases were pretty easy to identify.  Also replaced some comments that referenced ep_alloced memory, when it's now in fact wmem_alloced.

Change-Id: I07d2f390a9c0b34aa2956880476755d1acf5db0a
Reviewed-on: https://code.wireshark.org/review/6392
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>
2015-01-08 07:24:15 +00:00
Michael Mann 64a7bac641 tvb_bytes_to_ep_str -> tvb_bytes_to_str
Change-Id: I79c613cbdd8dc939dd4c29ebc477fb6eefd5bfc4
Reviewed-on: https://code.wireshark.org/review/6371
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-01-07 18:16:23 +00:00
Ebben Aries a3d946ce56 BGP : Simple typo fix for BGP Attribute
Change-Id: I793eed5c7d63c82e13847c8a6c8fd6def3025b8c
Reviewed-on: https://code.wireshark.org/review/6158
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Hadriel Kaplan <hadrielk@yahoo.com>
2014-12-31 08:03:25 +00:00
Michael Mann 1d598bbff7 Replace ip6_to_str and ip6_guint8_to_str with address_to_str and tvb_ip_to_str.
Change-Id: I1d258923a7a63539ec8456d3e306bca5016a1e4b
Reviewed-on: https://code.wireshark.org/review/6060
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-28 14:09:27 +00:00
Pascal Quantin ea6a5780c5 Try to fix compilation broken by g3d3f973
Change-Id: I26833e9a4f7557b5824effaff16b38d2c4367772
Reviewed-on: https://code.wireshark.org/review/6059
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-26 21:50:24 +00:00
Michael Mann 3d3f97320b Replace ip_to_str with [ep_]address_to_str and tvb_ip_to_str.
Change-Id: I40d0c8253743183aecef252040b7dd6742ae5c71
Reviewed-on: https://code.wireshark.org/review/5934
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-26 21:17:10 +00:00
Martin Mathieson 596669f921 First batch of unincludes. Last attempt...
Change-Id: I3681462aeb98ca62ed3ec5eb226b2553317391a9
Reviewed-on: https://code.wireshark.org/review/5997
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-22 21:03:13 +00:00
Ebben Aries 859360a6c4 BGP : Update BGP-LS Attribute + Display NEXT_HOP
From IANA page: http://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml

Change-Id: Ibc85dccee94aa69306c88b48d680e48fede08f2e
Reviewed-on: https://code.wireshark.org/review/5965
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-22 02:58:55 +00:00
Guy Harris c30aa115fe Register the ORFEntry IP address as an IPv4 address.
We're adding it with proto_tree_add_ipv4(), so that it's displayed as,
and can be tested as, an IPv4 address.  That means that the field for it
must be of type FT_IPv4, *even though it's calculated from an 8-bit
prefix value* - you can't make it an FT_UINT8.

Change-Id: I7d668fb2a707cdda4ad228afcbdcaf47ee6cba1b
Reviewed-on: https://code.wireshark.org/review/5960
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-21 23:36:04 +00:00
Bill Meier b5d7b7ab6e Cleanup use of #includes in non-generated epan/dissector/*.c
Specifically:
- Set packet.h to be the first wireshark #include after
   config.h and "system" #includes.
   packet.h added as an #include in some cases when missing.
- Remove some #includes included (directly/indirectly) in
   packet.h. E.g., glib.h.
   (Done only for those files including packet.h).
- As needed, move "system" #includes to be after config.h and
   before wireshark #includes.
- Rework various #include file specifications for consistency.
- Misc.

Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95
Reviewed-on: https://code.wireshark.org/review/5923
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-21 05:46:22 +00:00
Bill Meier f412c9a01a Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ...
(for some dissectors which fetch all other integral fields using
   ENC_BIG_ENDIAN).

Change-Id: Ic18e3172aad76af12b12d6732c88497be22aed56
Reviewed-on: https://code.wireshark.org/review/5748
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-13 18:45:56 +00:00
Yann Lejeune 0ef1aef2df BGP: add support of RFC6368 - Internal BGP as the Provider/Customer Edge
Protocol for BGP/MPLS IP Virtual Private Networks (VPNs).

Bug: 10762
Change-Id: Ifbe2af639ee5a2d96ec3546708060cadcc349df2
Reviewed-on: https://code.wireshark.org/review/5664
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-12-11 13:55:22 +00:00
Yann Lejeune 9036f09335 BGP: extract the bgp path attribute dissection to a dedicated function.
Change-Id: I228f1402007d8570bfdeb0105ce5e89c48357481
Reviewed-on: https://code.wireshark.org/review/5721
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-12-11 13:55:13 +00:00
Michael Mann e050ad27a4 Eliminate some proto_tree_add_text in packet-bgp.c
Change-Id: I05fabe9786125e2167fe4010733f61000d0e7914
Reviewed-on: https://code.wireshark.org/review/5670
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Matthieu Texier <matthieu@texier.tv>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-10 08:50:27 +00:00
Bill Meier c681091a2a Fix instances of duplicate display-filter-names with incompatible types.
Change-Id: I3b5afb8a59f6443624708b9fecfdcbe93dad59ef
Note: Some of the filters, when/if used, could have caused Wireshark crashes.
Reviewed-on: https://code.wireshark.org/review/5575
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-02 22:40:26 +00:00
Matthieu Texier f260f9aa2d BGP: Incorrect decoding AS numbers when mixed AS size
Fix AS Path Heuristic

Issue reported by Jon

Bug: 10742
Change-Id: Ie5e4108bd93464a2d1076dcc4f322171ea8e68cb
Reviewed-on: https://code.wireshark.org/review/5564
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-12-02 09:38:39 +00:00
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