aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-lldp.c
AgeCommit message (Collapse)AuthorFilesLines
2023-01-30Fix or suppress more warnings from check_typed_item_callsMartin Mathieson1-7/+7
2022-09-18Fix some spelling errorsMartin Mathieson1-1/+1
2022-08-09Use `register_dissector()` for more protocolsDavid Perry1-3/+3
2022-06-11LLDP: Add CIP TLVsDylan Ulis1-0/+7
2022-05-22Some check_typed_item_calls.py warning fixes.Martin Mathieson1-2/+1
2022-04-26LLDP: Fix malformed packets when EndOfLLDPDU TLV missingeasonweii1-6/+6
The End of LLDPDU TLV is optional, should not as malformed even if missing. Resolve it by checking whether the total length of each TLV reaches the total length of TVB. Close #18029
2022-04-20LLDP: Profinet TSN TLV DissectionVahap Emin Agaogullari1-7/+119
Profinet TSN TLV Dissection implemented
2022-02-15Tools: Fix fix-encoding-args.pl ASCII string validationJoão Valverde1-22/+22
Do not require a useless ENC_NA parameter for string encodings. FT_STRING and FT_STRINGZ types don't have any ndianness. Follow-up to 6ec429622c9258eefd388caf21ce92ab5b9f54b4.
2022-02-08Tidy up some masks in items.Martin Mathieson1-0/+1
2022-02-03More mask/field-length fixesMartin Mathieson1-4/+4
2021-12-19Replace g_snprintf() with snprintf() (dissectors)João Valverde1-3/+3
Use macros from inttypes.h with format strings.
2021-10-07to_str: scope tvb_ip6_to_strEvan Huus1-2/+2
2021-10-07to_str: scope tvb_ip_to_strEvan Huus1-2/+2
2021-10-04to_str: pull scope arg up into tvb_ether_to_strEvan Huus1-2/+2
There are a bunch of near-identical macros here, but I'm gonna change one at a time or else the builder times out at the number of files changed in one merge.
2021-09-01tvbuff: convert helper methods to pinfo->poolEvan Huus1-10/+10
A few of them just needed scratch memory, so allocate and free it manually after doing any exception-raising checks. A few others were returning memory, and needed conversion to accept a wmem scope argument.
2021-07-30Fix some copy-paste filter names.Martin Mathieson1-1/+1
Detected with tools/check_typed_item_calls.py --consecutive
2021-07-26Move epan/wmem/wmem_scopes.h to epan/João Valverde1-1/+1
This header was installed incorrectly to epan/wmem_scopes.h. Instead of creating additional installation rules for a single header in a subfolder (kept for backward compatibility) just rename the standard "epan/wmem/wmem.h" include to "epan/wmem_scopes.h" and fix the documentation. Now the header is installed *correctly* to epan/wmem_scopes.h.
2021-07-21First pass pinfo->pool conversionEvan Huus1-28/+28
Automated find/replace of wmem_packet_scope() with pinfo->pool in all files where it didn't cause a build failure. I also tweaked a few of the docs which got caught up.
2021-04-01lldp: Extreme TLV 4 is ZTFv2 Fabric Connect and first byte is CapabilityJoerg Mayer1-9/+9
As ususal: Once you have pushed a commit about some reverse engineered stuff, you find some docs that show your were wrong in some places.
2021-04-01lldp: Add Extreme/Avaya Fabric Vendor specific sub-TLV decodingJoerg Mayer1-3/+97
- Add Vendor Code d8:84:66 - Add Vendor sub-TLV 4
2021-03-11LLDP: Allow organizational specific TLVs without payloadRonald Wahl1-1/+3
Currently organizational specific TLVs without payload cause an exception which leads to a 'malformed packet' error. Add a check that allows correctly parsing those TLVs.
2021-02-04LLDP: Add new IEEE 802.1 subtypesJaap Keuter1-0/+4
2020-10-12Cisco ACI specific protocol enhancementsJoerg Mayer1-57/+86
Add Ethertype for Cisco ACI ARP gleaning and dissect its payload Improve some Cisco ACI vendor specific DHCP options Update mcp after looking at knet_parser.py Update lldp after looking at knet_parser.py Also reorder some ETHERTYPEs by value
2020-10-03Update URLs pointing to the bug database.Guy Harris1-1/+1
Switch from bugs.wireshark.org to the GitLab issues list.
2020-09-13More dissector string spelling fixes.Martin Mathieson1-1/+1
Finally, it is becoming difficult to find more.
2020-08-31More spelling fixes, part 2 of 2nd pass of dissectors.Martin Mathieson1-1/+1
2020-08-29Fix more spelling errors in dissector strings.Martin Mathieson1-1/+1
A second batch of spelling errors, detected using a script that uses pyspellcheck and a Wireshark-specific dictionary file. I will take at least one more pass through the dissectors, as further improvements are made to the script.
2020-08-22lldp: show the Protocol Identity as bytes, not a text string.Guy Harris1-2/+32
Section D.2.4.3 "protocol identity" of IEEE 802.1Q-2018 says: The protocol identity field shall contain the first n octets of the protocol after the layer 2 addresses (i.e., for example, starting with the EtherType field) that the sender would like to advertise. Show it as FT_BYTES, not FT_STRINGZ. Add a comment explaining that, and expand a comment to indicate what specifications there are for LLDP and some Organizationally Specific TLVs. Change-Id: I8c41026379731d1c05134d6e7ad563227f9fbfde Reviewed-on: https://code.wireshark.org/review/38229 Petri-Dish: Guy Harris <gharris@sonic.net> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <gharris@sonic.net>
2020-06-19Fix the type of arrays of pointers to hf_ values for bitfield routines.Guy Harris1-1/+1
The static arrays are supposed to be arrays of const pointers to int, not arrays of non-const pointers to const int. Fixing that means some bugs (scribbling on what's *supposed* to be a const array) will be caught (see packet-ieee80211-radiotap.c for examples, the first of which inspired this change and the second of which was discovered while testing compiles with this change), and removes the need for some annoying casts. Also make some of those arrays static while we're at it. Update documentation and dissector-generator tools. Change-Id: I789da5fc60aadc15797cefecfd9a9fbe9a130ccc Reviewed-on: https://code.wireshark.org/review/37517 Petri-Dish: Guy Harris <gharris@sonic.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-04-25Add a routine to get the representation of a protocol tree item and use it.Guy Harris1-54/+17
Add proto_item_get_display_repr(), which returns a string, allocated with a specified wmem scope, containing the display representation of the value of a proto_item. Use it in the LLDP dissector, to append that string to the parent protocol tree item; use packet scope, so it doesn't hang around forever (the previous code used the NULL scope, meaning explicit freeing was required, but it wasn't explicitly freeing the value, so it was leaking). Change-Id: I146380118833b1daef9dea8bd9463001e5b9325f Reviewed-on: https://code.wireshark.org/review/36931 Petri-Dish: Guy Harris <gharris@sonic.net> Reviewed-by: Guy Harris <gharris@sonic.net>
2020-02-15packet-lldp: Report only the consumed octetsJason Cohen1-1/+3
Allow unconsumed octets to be passed back to the caller so that possible trailer dissctors can be ran. Bug: 16387 Change-Id: I289b4b077d40581d5d0f884e30c2f882d58fccf1 Reviewed-on: https://code.wireshark.org/review/36097 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Jason Cohen <kryojenik2@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-30LLDP: Add ONOS Ether Type (0x8942)Alexis La Goutte1-0/+1
Bug: 16227 Change-Id: I78b21823d7d639c51d897ce78dfeaeb0e78dae96 Reviewed-on: https://code.wireshark.org/review/35972 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-29LLDP: Add ONOS TLV (Chassis, Port and TTL)Alexis La Goutte1-0/+67
Based from https://github.com/opennetworkinglab/onos/blob/master/utils/misc/src/main/java/org/onlab/packet/LLDP.java Bug: 16227 Change-Id: If35b7b9d6088caf7809f84b1569d7259421bc717 Reviewed-on: https://code.wireshark.org/review/35971 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-11-10lldp: add mandatory items chassis and port to info columnJoerg Mayer1-7/+34
Change-Id: Id01d85147adb5d9194e97bde31ca76d3de2fb7c1 Reviewed-on: https://code.wireshark.org/review/35036 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2019-11-07lldp: Add aggregation status bits to LACP TLVJoerg Mayer1-0/+14
Change-Id: Ia83c64dfc4a99e6e13ff807f2c0bfdb09d83a94e Reviewed-on: https://code.wireshark.org/review/35027 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2019-10-08Update some ACI field namesJoerg Mayer1-17/+16
Change-Id: I2add057ae4ebd9e2faca5e9ff201817810e10562 Reviewed-on: https://code.wireshark.org/review/34735 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2019-07-26HTTPS (almost) everywhere.Guy Harris1-1/+1
Change all wireshark.org URLs to use https. Fix some broken links while we're at it. Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c Reviewed-on: https://code.wireshark.org/review/34089 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-05-24Add support decode extremeNetworks-avaya access point TLVszhongweisitu1-2/+137
Uploaded a LLDP test file, Bug 15793 Change-Id: I65bdf496df64a5a957b132a402c6535bec60cf84 Reviewed-on: https://code.wireshark.org/review/31598 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-23Small update up LLDP sub-tlvsJoerg Mayer1-10/+16
Change-Id: I33ed38d4819236e2d6f6b7384650fa182233ce30 Reviewed-on: https://code.wireshark.org/review/31706 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-10-23Update some ACI valuesJoerg Mayer1-19/+33
Change-Id: I25631fe63209023cf016e078b40d34bbafc02cb3 Reviewed-on: https://code.wireshark.org/review/30354 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-09-03lldp: fix typo on 802.3 BTAlexis La Goutte1-6/+6
Paris -> Pairs Autoclass supported -> Autoclass completed Bug: 15035 Change-Id: I2540ce586fa5036f6efd7711294facf944760019 Reviewed-on: https://code.wireshark.org/review/29396 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-20lldp: 802.3 BT add missing Autoclass and Power Down fieldsAlexis La Goutte1-0/+60
Bug: 15035 Change-Id: If76fc996508a9e4a09665dcee985d8e14bc72450 Reviewed-on: https://code.wireshark.org/review/29187 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-12LLDP: Add dissection of 802.3BT TLV ExtensionAlexis La Goutte1-0/+108
Bug: 15035 Change-Id: I6e513b825819843fe8e7bd95bceea2ee4fa5e727 Reviewed-on: https://code.wireshark.org/review/29059 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-12llpd: fix indentAlexis La Goutte1-10/+10
remove a space before comma Change-Id: Ib8ca547d054aa1672557044efc35e865923ffce5 Reviewed-on: https://code.wireshark.org/review/29053 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-12lldp: add expert info when there is extra data for 802.3 TLVAlexis La Goutte1-0/+5
Ping-Bug: 15035 Change-Id: I0611dff8cb0da2769ab3ac7e0012f6dd439dc4d8 Reviewed-on: https://code.wireshark.org/review/29052 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-28packet-lldp.c: Some updates to Cisco vendor subtypes (UPOE and ACI)Joerg Mayer1-38/+109
- Use UPOE instead of four-wire - it's the term everyone knows. Also provide a link to the "spec". - Add some more ACI fields I found in some traces. Guess the function of unknown-CA to be Node Role. Change-Id: I7bdb4c1f720868da4f502ba43ba9e2b1c072d4e0 Reviewed-on: https://code.wireshark.org/review/28422 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-06-26Shorten the text of System Name and System Description in the info columnJoerg Mayer1-2/+2
Change-Id: I77056fe7baadc6cec0662d513d2e18c9e80d2726 Reviewed-on: https://code.wireshark.org/review/28446 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-06-24Add support for Cisco ACIJoerg Mayer1-3/+215
Experiment with a generic way of adding values to the parent tree Change-Id: I50dc44da3cafac79a0ac100121c83f8d0ff28457 Reviewed-on: https://code.wireshark.org/review/28395 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-06-22Try to make sure we don't overrun sub-tlvsJoerg Mayer1-28/+58
Change-Id: Idde2861ecdd1edc8f84488361695dc8d5b38d51d Reviewed-on: https://code.wireshark.org/review/28383 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-04-10Add, and use, "fetch signed value" for lengths < 40 bits.Guy Harris1-4/+4
Add 8-bit, 16-bit, 24-bit, and 32-bit "fetch signed value" routines, and use them rather than casting the result of the 8/16/24/32-bit "fetch unsigned value" routines to a signed type (which, BTW, isn't sufficient for 24-bit values, so this appears to fix a bug in epan/dissectors/packet-zbee-zcl.c). Use numbers rather than sizeof()s in various tvb_get_ routines. Change-Id: I0e48a57fac9f70fe42de815c3fa915f1592548bd Reviewed-on: https://code.wireshark.org/review/26844 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>