aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-cdp.c
AgeCommit message (Collapse)AuthorFilesLines
2012-04-24Minor cleanup: whitespace, indentation, long-lines, style, typos, etc;Bill Meier1-921/+918
Also: remove unneeded #include <stdlib.h> in 2 cases. svn path=/trunk/; revision=42226
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-15Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, ↵Bill Meier1-3/+3
FT_STRINGZ, FT_UINT_STRING as follows: 1. If there's no character encoding (ENC_ASCII, ...) specified then use ENC_ASCII. 2. For all but FT_UINT_STRING, always use ENC_NA (replacing any existing True/1/FALSE/0 /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN). svn path=/trunk/; revision=39426
2011-10-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-57/+57
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-01-21Introduce, and start using, tvb_eth_to_str().Jeff Morriss1-6/+6
Export tvb_*_to_str() and put them in alphabetical order. svn path=/trunk/; revision=35602
2011-01-16From Vaibhav Katkade:Jaap Keuter1-1/+57
Add support for newly defined LLDP Four-wire Power-via-MDI and CDP Spare Pair PoE TLVs svn path=/trunk/; revision=35559
2011-01-14Replace ip_to_str((tvb_get_ptr(...)) with tvb_ip_to_str().Jeff Morriss1-25/+25
Replace ip6_to_str((tvb_get_ptr(...)) with tvb_ip6_to_str(). 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(). Replace some tvb_get_ptr()s with tvb_get_ephemeral_string()s. Replace some memcpy()+tvb_get_ptr() with tvb_memcpy(). svn path=/trunk/; revision=35529
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-3/+3
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
2009-11-17From Aamer Akhter:Anders Broman1-129/+80
Add fields for: cdp platform cdp device id cdp port id From me: Chnge ..add_uint to add_item in a couple of places, get rid of check_col. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4244 svn path=/trunk/; revision=30999
2009-08-16Switch a bunch of dissectors over to using tvb_new_subset_remaining()Kovarththanan Rajaratnam1-1/+1
svn path=/trunk/; revision=29446
2009-08-09Don't guard col_clear with col_checkKovarththanan Rajaratnam1-2/+1
svn path=/trunk/; revision=29344
2009-08-09Don't guard col_set_str (COL_PROTOCOL) with col_checkKovarththanan Rajaratnam1-2/+1
svn path=/trunk/; revision=29340
2009-06-18From Kovarththanan Rajaratnam via bug 3548:Stig Bjørlykke1-6/+6
(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 svn path=/trunk/; revision=28770
2009-04-20Remove code duplication.Jaap Keuter1-9/+1
svn path=/trunk/; revision=28091
2009-03-29More size_t casts.Anders Broman1-1/+1
svn path=/trunk/; revision=27880
2009-03-11From Brian Julin:Jaap Keuter1-0/+167
Add EnergyWise TLV dissection to CDP dissector. svn path=/trunk/; revision=27698
2009-01-06Fix for bug 3112:Jaap Keuter1-4/+35
CDP checksum calculation has some deviations from the RFC 1071 Internet checksum algorithm, in particular when faced with odd length packets. svn path=/trunk/; revision=27171
2008-10-31Fix some "format not a string literal and no format arguments" warnings.Stig Bjørlykke1-7/+7
svn path=/trunk/; revision=26646
2008-06-25Constify a bunch of stuff, to squelch -Wwrite-strings warnings. Guy Harris1-1/+1
epan/dissectors/packet-ncp2222.inc is a bit hard to fix, so we're not ready to enable that warning by default yet. Throw in some casts to handle GLib routines that take arbitrary non-const pointers (they can later return the pointers, and some callers might want to modify or free up those pointers in cases where they're known to be writable or allocated). Use ep_tvb_memdup() rather than a combination of ep_alloc() and tvb_memcpy(). Clean up some indentation. svn path=/trunk/; revision=25601
2008-02-07Rewrote some "if(tree)" code inside a switch-case to avoid unused code Stig Bjørlykke1-591/+650
(which did not work as expected). switch(type) { case 1: ... break; if(tree) { case 2: ... break; } } svn path=/trunk/; revision=24284
2008-01-13From Michael Earnhart:Jaap Keuter1-3/+88
Patch to add cdp Power_request and Power_available fields This added the support for the 0x0019 and 0x001a power_request and power_available fields. Submitted patch slightly modified to present summary line and make more robust. svn path=/trunk/; revision=24074
2007-04-26Tiny formatting changeJörg Mayer1-1/+2
svn path=/trunk/; revision=21596
2006-12-14Some source code clean up.Jaap Keuter1-6/+8
svn path=/trunk/; revision=20135
2006-12-14Add checksum verification to the CDP dissector and add an entry for thisStephen Fisher1-10/+55
in the main colorfilters file. svn path=/trunk/; revision=20134
2006-08-17From Stephen Fisher:Anders Broman1-3/+3
the attached patch removes the redundant "Cisco Discovery Protocol" from the info column: Before: Cisco Discovery Protocol Device ID: myswitch.domain.com Port ID: GigabitEthernet3/17 After: Device ID: myswitch.domain.com Port ID: GigabitEthernet3/17 svn path=/trunk/; revision=18941
2006-08-02From Stephen Fisher:Anders Broman1-427/+470
This patch adds the most commonly referenced items from CDP frames to the info column: the device id (hostname) and port id. For example: Cisco Discovery Protocol Device ID: myswitch.me.com Port ID: GigabitEthernet7/12 svn path=/trunk/; revision=18821
2006-05-21change a whole bunch of ethereal into wiresharkRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18196
2006-03-19No negative power consumption, so unsigned value.Jaap Keuter1-3/+2
svn path=/trunk/; revision=17669
2006-02-16Use the new "proto_tree_add_*_format_value" routines.Guy Harris1-4/+4
svn path=/trunk/; revision=17316
2005-12-23from jaap kRonnie Sahlberg1-0/+16
Hi list, On the Ethereal Wiki is a CDP capture of a Broadcom BCM1100 VoIP chipset. It has a power consumption TLV, which was not yet dissected. The attached patch does that. svn path=/trunk/; revision=16890
2005-10-19Point specifically to the CDP information on the various Cisco pages.Guy Harris1-2/+2
svn path=/trunk/; revision=16265
2005-09-17Move a pile of protocol-related headers from the top-level sourceGuy Harris1-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. svn path=/trunk/; revision=15844
2005-09-11Replace tvb_memcpy() calls that extract IPv4 addresses into a guint32,Guy Harris1-2/+2
and that extract IPv6 addresses into a "struct e_in6_addr", with tvb_get_ipv4() and tvb_get_ipv6() calls - except for some that we remove, by using proto_tree_add_item(), rather than replacing. Have epan/tvbuff.h include epan/ipv6-utils.h, to define "struct e_in6_addr" (not necessary to declare the tvbuff routines, but including it there means "struct e_in6_addr" is guaranteed to be defined before those declarations, so we don't get compiler complaints if we define it *after* those declarations). svn path=/trunk/; revision=15758
2005-07-28char -> const char warning fixesJörg Mayer1-1/+1
svn path=/trunk/; revision=15126
2005-06-26Get rid of the private "my_match_strval()" routine in many dissectors;Guy Harris1-1/+1
add a "match_strval_idx()" routine that does the same thing, and have "match_strval()" call it. Make those routines, and "val_to_str()", return a "const" pointer. Update dissectors as necessary to squelch compiler warnings produced by that. Use "val_to_str()" rather than using "match_strval()" and then, if the result is null, substituting a specific string. Clean up some other "match_strval()"/"val_to_str()" usages. Add a null pointer check in the NDPS dissector's "attribute_value()" routine, as it's not clear that "global_attribute_name" won't be null at that point. Make some global variables in the AFS4INT dissector local. Make some routines not used outside the module they're in static. Make some tables "static const". Clean up white space. Fix Gerald's address in some files. svn path=/trunk/; revision=14786
2005-03-14Some VoIP VLAN query and reply fields have a length of 6, not 7, withGuy Harris1-10/+38
only 2 bytes of data; dissect those differently. svn path=/trunk/; revision=13752
2005-03-09From Ricardo Muggli: decode the voice VLAN field in CDP packets.Guy Harris1-4/+10
svn path=/trunk/; revision=13676
2004-07-18Move dissectors to epan/dissectors directory.Gilbert Ramirez1-0/+832
Also move ncp222.py, x11-fields, process-x11-fields.pl, make-reg-dotc, and make-reg-dotc.py. Adjust #include lines in files that include packet-*.h files. svn path=/trunk/; revision=11410