aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-lldp.c
AgeCommit message (Collapse)AuthorFilesLines
2014-05-06Fix build failures caused by lldp cleanupAnish Bhatt1-51/+2
Change-Id: I4d4aeb71720f02e4a6f4a8e5f803fd63dc7aed81 Signed-off-by: Anish Bhatt <anish@chelsio.com> Reviewed-on: https://code.wireshark.org/review/1524 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-06Cleanup LLDP dissection, convert add_text to tree items.Anish Bhatt1-17/+41
Just started on this, more changes incoming Change-Id: Idc88442f382cea1f29f05edb991b920488cfc113 Signed-off-by: Anish Bhatt <anish@chelsio.com> Reviewed-on: https://code.wireshark.org/review/1502 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-02LLDP: Remove packet-lldp.hAlexis La Goutte1-1/+27
Change-Id: If6d1fd1b7961f975447db43f616e016f70ca5cb8 Reviewed-on: https://code.wireshark.org/review/1473 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-05-02Add support for Logical Link Down TLV.Anish Bhatt1-0/+25
TLV is 1 octet long, and only MSB holds info with 7 unused bits Change-Id: Ic1f5ce1b774bb7439cd2a23bc9bfb44f7dc25888 Signed-off-by: Anish Bhatt <anish@chelsio.com> Reviewed-on: https://code.wireshark.org/review/1450 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-29Add support for Congestion Notification TLVs (802.1Qau)Anish Bhatt1-0/+114
I don't have sample captures for this, but the TLV layout is pretty simple and only contains two 1 octet bitmaps Change-Id: Ibd7db7f40187904bbbf348c2cb89a5494cd46aab Signed-off-by: Anish Bhatt <anish@chelsio.com> Reviewed-on: https://code.wireshark.org/review/1427 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-28Fix checkAPIs warnings in packet-lldp.c. repoted_length() used instead of ↵Anish Bhatt1-4/+4
captured_length() as is seems more logical Change-Id: I02860d5c45e3fd794d9f99e2d382bc02ae886b36 Signed-off-by: Anish Bhatt <anish@chelsio.com> Reviewed-on: https://code.wireshark.org/review/1422 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-28This block of defines was always changed when I was retabbing my additions, ↵Anish Bhatt1-7/+7
this change fixes the tabs Change-Id: I10e260a68cadf18d1aca10c7f037d45d311b6477 Signed-off-by: Anish Bhatt <anish@chelsio.com> Reviewed-on: https://code.wireshark.org/review/1418 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-28With the use of tvb_reported_length_remaining(), there is no need to ↵Anish Bhatt1-6/+2
calculate consumedLen anymore Change-Id: I8f4c32012061d3bff5e4efb80dfce8d82f7400df Signed-off-by: Anish Bhatt <anish@chelsio.com> Reviewed-on: https://code.wireshark.org/review/1417 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-28Fix Dead Store (Dead assignement/Dead increment) warning found by ClangAlexis La Goutte1-4/+1
Change-Id: I349a5aa7248979aa32eda9f853fd660dc01bdd08 Reviewed-on: https://code.wireshark.org/review/1407 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-28Add Support for IEEE DCBx (8021az)Anish Bhatt1-5/+361
Sample captures attached at https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10055 Closed-bug:10055 Change-Id: Ib10e8d2a8aecdcf488eb174ed76a259433528f4a Signed-off-by: Anish Bhatt <anish@chelsio.com> Reviewed-on: https://code.wireshark.org/review/1403 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-28Add support for DCBX cee/cin protocolMichael Mann1-0/+464
CEE Spec here : http://www.ieee802.org/1/files/public/docs2008/az-wadekar-dcbx-capability-exchange-discovery-protocol-1108-v1.01.pdf From a wireshark POV, CIN is the same as CEE with a different OUI subtype, and one less supported TLV. bug:10039 Change-Id: I5aa4f1be2ecc43ecad6e86633231e6e39695af6e Reviewed-on: https://code.wireshark.org/review/1330 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(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>
2013-12-19Rename a couple of to_str functions to have ep_ in the name. This makes itEvan Huus1-4/+4
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-19Use proto_tree_add_item() in cases where we don't actually look at theGuy Harris1-14/+6
value. svn path=/trunk/; revision=54243
2013-12-17Fix what appears to be a misuse of pointers in the LLDP dissector as caught byEvan Huus1-7/+7
Alexis's ASAN fuzzing. Pass the address of a guid on the stack, not the address of a pointer to a guid which doesn't actually point to anything... svn path=/trunk/; revision=54203
2013-12-14Fix warningsJakub Zawadzki1-0/+3
svn path=/trunk/; revision=54089
2013-09-24From Wido Kelling via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9176 :Jeff Morriss1-3/+3
Fix decoding of the Auto-Negotiation bits in LLDP (they were off by one). svn path=/trunk/; revision=52199
2013-09-15More wmem conversion (leaving uat related functions aside)Pascal Quantin1-3/+3
svn path=/trunk/; revision=52055
2013-09-15Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if ↵Michael Mann1-2/+2
hf_ field name is the first part of the formatted string. This was done with a perl script on the dissectors directory (packet-*.c), followed by manual inspection of the output. The manual inspection yielded a few cases that really should have been proto_tree_add_uint or proto_tree_add_item, so I updated them accordingly. The script didn't catch as many as I would have liked, but it's a start. The most common (ab)use of proto_tree_add_uint_format was for appending strings to CRC/checksum values to note good or bad CRC/checksum. svn path=/trunk/; revision=52045
2013-09-02Fix indent (Mix of tab and space...) => use tabAlexis La Goutte1-102/+102
svn path=/trunk/; revision=51686
2013-09-02Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-16/+8
svn path=/trunk/; revision=51664
2013-06-14Removed check_col() and the occasional tree.Michael Mann1-8/+4
svn path=/trunk/; revision=49938
2012-11-18From Wido KellingMartin Kaiser1-4/+5
updated Port3 status values to conform to IEC 61158 added decoding of some more values https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7996 svn path=/trunk/; revision=46075
2012-11-07Fix for bug 7757:Jaap Keuter1-2/+2
When subtype is unknown show whole subtype contents as bytes. svn path=/trunk/; revision=45962
2012-11-02Assign a default value to temp_tree;Anders Broman1-0/+3
svn path=/trunk/; revision=45871
2012-11-02packet-ssl.c add a cast to build on Win64Anders Broman1-0/+2
pccket-lldp.c #if 0 out not used variables. svn path=/trunk/; revision=45870
2012-11-02From Wido Kelling:Anders Broman1-1/+156
updated the TLVs for Profinet IEC 61158 updated the MRP decoding wrong formattype changed to avoid fault in unknown subtype (atatched capture) https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7757 svn path=/trunk/; revision=45868
2012-09-26replaced decode_boolean_bitfield calls with itemized filtersMichael Mann1-1/+0
svn path=/trunk/; revision=45152
2012-09-22Fixup vlan_flags bug introduced with r45054Chris Maynard1-4/+4
svn path=/trunk/; revision=45055
2012-09-22replaced decode_boolean_bitfield calls with itemized filtersMichael Mann1-463/+602
svn path=/trunk/; revision=45054
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45017
2012-08-10Use val_to_str_const() where appropriate;Bill Meier1-20/+20
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-06-28Update FSF address - part II.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=43538
2012-05-03Delete extraneous return statement, which effectively made the entire ↵Chris Maynard1-1/+1
dissect_ieee_802_3_tlv() function dead code. Fixes Coverity CID 281470 (formerly CID 1470). [I guess the new Coverity version does cross-reference the CID's after all.] svn path=/trunk/; revision=42398
2012-04-13"OUI", not "OID", for IEEE OUIs.Guy Harris1-4/+4
svn path=/trunk/; revision=42056
2012-04-13Patch from Alex Lindberg to update the LLDP dissector to displayGuy Harris1-43/+64
registered OUIs from manuf and allow custom dissectors for Organizationally Specific TLVs. Fixes bug 7080. Use uint_get_manuf_name() and uint_get_manuf_name_if_known(), rather than tvb_get_manuf_name() and tvb_get_manuf_name_if_known(), in cases where we've fetched the OUI. Have the ECP/VDP dissector also display registered OUIs from manuf. Get rid of the OUI_CISCO_2 OUI from tlv_oui_subtype_vals, as that can come from the manuf file. Leave in comments explaining why, for now, we aren't using the manuf file for *all* the OUIs. svn path=/trunk/; revision=42055
2012-02-28From Mijo Safradin:Anders Broman1-36/+2
Add ECP VDP TLV dissector. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6849 Fixed encoding arguments, removed unused variables checkapi errors etc. svn path=/trunk/; revision=41221
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.Bill Meier1-1/+1
Also: remove trailing whitespace for a number of files. svn path=/trunk/; revision=39503
2011-10-10 Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-2/+2
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-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-33/+33
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-04Use ENC_NA as encoding for proto_tree_add_item() calls which directly ↵Bill Meier1-6/+6
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-08-16Based on patch from Denis Ovsienko viaJeff Morriss1-1/+1
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6244 : Fix typo: s/unkown/unknown/ svn path=/trunk/; revision=38561
2011-08-08Dissectors don't need to #include <gmodule.h>Bill Meier1-1/+0
Also: #include <stdlib.h> not req'd in some cases. svn path=/trunk/; revision=38409
2011-05-11Remove some unused variable assignments. Fixes Coverity CID 1202.Gerald Combs1-3/+3
svn path=/trunk/; revision=37065
2011-05-07From Jens Osterkamp:Jaap Keuter1-6/+150
The following patch adds some code to decode the EVB TLV being standardized in the upcoming IEEE 802.1Qbg draft 0. svn path=/trunk/; revision=37014
2011-03-03There's no need to pass the result of tvb_get_ptr() as the 'value' inJeff Morriss1-17/+12
proto_tree_add_*(): just use proto_tree_add_item(). Use tvb_ether_to_str(). svn path=/trunk/; revision=36128
2011-01-31From Johan Kristell:Jaap Keuter1-2/+5
In the standard 802.3at-2009 the PoE+ TLVs are 12 bytes long, but in the earlier version 802.3bc-2009, they are 7 bytes long (the power type/ source/priority, and the requested and allocated fields are lacking). Not respecting the length of the TLV leads to wireshark displaying garbage data and could lead to reading outside of buffer. svn path=/trunk/; revision=35737
2011-01-16From Vaibhav Katkade:Jaap Keuter1-3/+75
Add support for newly defined LLDP Four-wire Power-via-MDI and CDP Spare Pair PoE TLVs svn path=/trunk/; revision=35559
2011-01-16Replace some tvb_get_ptr()s with tvb_get_ephemeral_string()s to ensure theJeff Morriss1-5/+2
return string is NULL terminated. There's no need to pass the result of tvb_get_ptr() as the 'value' in proto_tree_add_*(): just use proto_tree_add_item(). svn path=/trunk/; revision=35548
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-1/+1
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