aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-lldp.c
AgeCommit message (Collapse)AuthorFilesLines
2011-05-11Remove some unused variable assignments. Fixes Coverity CID 1202.gerald1-3/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37065 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-07From Jens Osterkamp:jake1-6/+150
The following patch adds some code to decode the EVB TLV being standardized in the upcoming IEEE 802.1Qbg draft 0. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37014 f5534014-38df-0310-8fa8-9805f1628bb7
2011-03-03There's no need to pass the result of tvb_get_ptr() as the 'value' inmorriss1-17/+12
proto_tree_add_*(): just use proto_tree_add_item(). Use tvb_ether_to_str(). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36128 f5534014-38df-0310-8fa8-9805f1628bb7
2011-01-31From Johan Kristell:jake1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35737 f5534014-38df-0310-8fa8-9805f1628bb7
2011-01-16From Vaibhav Katkade:jake1-3/+75
Add support for newly defined LLDP Four-wire Power-via-MDI and CDP Spare Pair PoE TLVs git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35559 f5534014-38df-0310-8fa8-9805f1628bb7
2011-01-16Replace some tvb_get_ptr()s with tvb_get_ephemeral_string()s to ensure themorriss1-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(). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35548 f5534014-38df-0310-8fa8-9805f1628bb7
2010-12-20Rename the routines that handle dissector tables with unsigned integerguy1-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.) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35224 f5534014-38df-0310-8fa8-9805f1628bb7
2010-10-10Define some fcns & vars as static; Some #includes not req'd; packet-mikey.h ↵wmeier1-5/+3
not req'd. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34464 f5534014-38df-0310-8fa8-9805f1628bb7
2010-04-06#include <string.h> not needed.wmeier1-1/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32411 f5534014-38df-0310-8fa8-9805f1628bb7
2010-04-03Remove unneeded #include <stdio.h>wmeier1-1/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32367 f5534014-38df-0310-8fa8-9805f1628bb7
2009-10-22From Greg Schwendimann:jake1-0/+77
The 802.3at Power Via MDI TLV dissector is incomplete as it does not decode the last three bytes. I have attached a patch that decodes the type/source/priority, PD requested power value, and PSE allocated power value fields. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30662 f5534014-38df-0310-8fa8-9805f1628bb7
2009-10-05Initialize ip_addr to avoid an uninitialized warning.stig1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30335 f5534014-38df-0310-8fa8-9805f1628bb7
2009-08-09Don't guard col_clear with col_checkkrj1-3/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29346 f5534014-38df-0310-8fa8-9805f1628bb7
2009-08-09Don't guard col_set_str (COL_INFO) with col_checkkrj1-12/+6
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29342 f5534014-38df-0310-8fa8-9805f1628bb7
2009-08-09Don't guard col_set_str (COL_PROTOCOL) with col_checkkrj1-2/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29340 f5534014-38df-0310-8fa8-9805f1628bb7
2009-06-18From Kovarththanan Rajaratnam via bug 3548:stig1-38/+38
(1) Trailing/leading spaces are removed from 'name's/'blurb's (2) Duplicate 'blurb's are replaced with NULL (3) Empty ("") 'blurb's are replaced with NULL (4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME, FT_PROTOCOL, FT_STRING and FT_STRINGZ field types (5) Only allow non-zero value for 'display' if 'bitmask' is non-zero git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28770 f5534014-38df-0310-8fa8-9805f1628bb7
2009-06-15Remove non-ASCII charactermorriss1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28737 f5534014-38df-0310-8fa8-9805f1628bb7
2009-06-09Add decoding of auto-neg capabilites in inverse (wrong) order asjmayer1-0/+106
proposed in: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1455#c32 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28680 f5534014-38df-0310-8fa8-9805f1628bb7
2009-06-09Powervalue is in units of 100mW, print effective value and unitjmayer1-3/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28674 f5534014-38df-0310-8fa8-9805f1628bb7
2009-02-09add some display detailsulfl1-2/+7
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27404 f5534014-38df-0310-8fa8-9805f1628bb7
2008-12-17Fix typos and spelling (mostly in text strings) wmeier1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27028 f5534014-38df-0310-8fa8-9805f1628bb7
2008-08-25#include <prefs.h> not req'dwmeier1-1/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26089 f5534014-38df-0310-8fa8-9805f1628bb7
2007-05-29Use G_GINT64_MODIFIER, rather than the PRI[douxX]64 macros, for GLibguy1-3/+3
routines and routines using those routines. GLib might use different modifiers for 64-bit quantities than the platform's C library does. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21990 f5534014-38df-0310-8fa8-9805f1628bb7
2007-03-03use the official PROFINET names (only comments changed)ulfl1-6/+6
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20962 f5534014-38df-0310-8fa8-9805f1628bb7
2007-03-02Bugs 1095 and 1096 in the Ethereal bug database both pointed out that we gerald1-331/+331
were looking at the wrong bits when displaying the port and protocol VLAN flags. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20960 f5534014-38df-0310-8fa8-9805f1628bb7
2007-01-10append period values to the PROFINET PTCP statusulfl1-2/+76
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20384 f5534014-38df-0310-8fa8-9805f1628bb7
2006-12-05fix output of PROFINET specific MAC addresses - it simply displayed garbageulfl1-3/+5
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20044 f5534014-38df-0310-8fa8-9805f1628bb7
2006-11-17add dissection for PROFINET "PTCP Status"ulfl1-2/+33
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19922 f5534014-38df-0310-8fa8-9805f1628bb7
2006-11-11add dissection of PROFINET "MRP Port Status"ulfl1-1/+33
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19876 f5534014-38df-0310-8fa8-9805f1628bb7
2006-06-22add another PROFINET specific subtype (5:CHASSIS_MAC)ulfl1-1/+16
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18549 f5534014-38df-0310-8fa8-9805f1628bb7
2006-06-21update PROFINET port2/3 status textulfl1-6/+16
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18529 f5534014-38df-0310-8fa8-9805f1628bb7
2006-05-21change a whole bunch of ethereal into wiresharksahlberg1-3/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18196 f5534014-38df-0310-8fa8-9805f1628bb7
2006-03-24Mark the value_strings static.etxrab1-31/+31
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17718 f5534014-38df-0310-8fa8-9805f1628bb7
2006-03-24add another comment what's currently missing in the PROFINET specific partsulfl1-0/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17713 f5534014-38df-0310-8fa8-9805f1628bb7
2006-01-28Squelch a compiler warning.guy1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17115 f5534014-38df-0310-8fa8-9805f1628bb7
2006-01-28Expand the set of #defines in afn.h (and give a URL for the *current*guy1-65/+11
list of address families) and the list of strings in afn.c, and use them in packet-lldp.c instead of having it define its own. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17114 f5534014-38df-0310-8fa8-9805f1628bb7
2006-01-23Bugfix: network address not dissected correctlyetxrab1-41/+112
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17084 f5534014-38df-0310-8fa8-9805f1628bb7
2005-12-16From Jaap Keuter:etxrab1-14/+6
- Editcap Mikko Tiihonen filed bug 379 including a patch for editcap. This wasn't picked up so far. I've ported the patch to svn 16820 and included a documentation patch. -packet-ieee80211.c Radek Vokal of RedHat filed a bug found by Vladimir Kondratiev of Intel in the 802.11 dissector. Radek provided a sample capture and Vladimir a oneliner patch. I've ported the patch to svn 16820 and tested it against the provided capture. Works well. -From Kan Sasaki A patch for packet-ospf.c is attached: - Fix the handling of the DN-bit of options field. - Add a new function dissect_ospf_bitfield() to dissect a bitfield such as options, flags. The following functions are merged by using this function. - dissect_ospf_lls_extended_options() - dissect_ospf_dbd() - dissect_ospf_options() - dissect_ospf_v3_prefix_options() - dissect the flags and prefix-options bitfield. - lldp Bugfix Bug 596 LLDP TIA Network Policy Decode is not correct - Camel make it possible to dissect based on OID. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16822 f5534014-38df-0310-8fa8-9805f1628bb7
2005-11-12(on behalf of the PROFIBUS Nutzerorganisation e.V. Deutschland):ulfl1-3/+161
add some PROFINET specific LLDP extensions git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16488 f5534014-38df-0310-8fa8-9805f1628bb7
2005-10-16IPv6 addresses are 16 bytes.gerald1-1/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16243 f5534014-38df-0310-8fa8-9805f1628bb7
2005-09-23remove some compiler warningssahlberg1-10/+10
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15975 f5534014-38df-0310-8fa8-9805f1628bb7
2005-09-20Give it an RCS ID.guy1-0/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15909 f5534014-38df-0310-8fa8-9805f1628bb7
2005-09-20fix: packet-lldp.c(2071) : warning C4761: integral size mismatch in ↵ulfl1-1/+1
argument; conversion supplied git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15893 f5534014-38df-0310-8fa8-9805f1628bb7
2005-09-19Jim Young: LLDP improvementsjmayer1-6/+172
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15879 f5534014-38df-0310-8fa8-9805f1628bb7
2005-09-17Move a pile of protocol-related headers from the top-level sourceguy1-2/+2
directory to the epan directory. Some of them should perhaps ultimately be moved to epan/dissectors, if they pertain only to stuff exported by a particular dissector. Fix Gerald's e-mail address in files we're moving. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15844 f5534014-38df-0310-8fa8-9805f1628bb7
2005-09-16Fix a type.guy1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15832 f5534014-38df-0310-8fa8-9805f1628bb7
2005-09-15Move OUIs from LLDP dissector to oui.h.guy1-35/+39
Get rid of remaining sprintf'ing into on-the-stack buffers. Note where some items came from. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15815 f5534014-38df-0310-8fa8-9805f1628bb7
2005-09-15Rename TLV_INFO_MASK to TLV_INFO_LEN_MASK, to match TLV_TYPE_MASK.guy1-68/+123
Use "tvb_format_stringzpad()" rather than "tvb_format_text()" on strings, as some of them are null-padded. (XXX - are they null-padded or null-terminated?) Clean up the TLV length checks, and do many more such checks. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15809 f5534014-38df-0310-8fa8-9805f1628bb7
2005-09-15We already define ETHERTYPE_LLDP in "etypes.h" - use that, don't defineguy1-659/+594
our own. Get rid of MAC_to_str() - ether_to_str() suffices. Don't copy to on-the-stack fixed-size string buffers, just save the results of various formatting calls as pointers. Use tvb_format_text() to get displayable versions of text strings. Use tvb_get_ipv4() and tvb_get_ipv6(). Don't put an item into the protocol tree as text and then put in a hidden item that, if unhidden, would display the same or almost exactly the same; just put the item into the tree unhidden. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15808 f5534014-38df-0310-8fa8-9805f1628bb7
2005-09-15Properly handle 64-bit integer constants (they don't happen by magic,guy1-23/+23
and the stuff you have to do is compiler-dependent, so use G_GINT64_CONSTANT()). Properly handle formatting 64-bit quantities (they don't format correctly by magic, and the stuff you have to do is compiler-dependent, so use PRI[duoxX]64). Don't copy the result of tvb_bytes_to_str() to a string buffer and then only use it as an argument to a "%s" - just use the result directly. Don't copy constant strings to a buffer - just use the strings directly. Fetch 64-bit integral quantities with tvb_get_ntoh64(); they're presumably in a standard byte order, which is probably big-endian for Internet-family protocols, and using tvb_memcpy() is *guaranteed* to be wrong on some platforms. Fix up a format string. Fix up indentation a bit. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15807 f5534014-38df-0310-8fa8-9805f1628bb7