aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dhcp-failover.c
AgeCommit message (Collapse)AuthorFilesLines
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.wmeier1-1/+1
Also: remove trailing whitespace for a number of files. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39503 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-15Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, ↵wmeier1-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). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39426 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-04Use ENC_NA as encoding for proto_tree_add_item() calls which directly ↵wmeier1-5/+5
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 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39260 f5534014-38df-0310-8fa8-9805f1628bb7
2011-09-26Get rid of check_col, while at it set ENC.etxrab1-19/+16
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39149 f5534014-38df-0310-8fa8-9805f1628bb7
2011-02-11Rename arphrdaddr_to_str() to tvb_arphrdaddr_to_str() and make it take a ↵morriss1-3/+1
pointer a TVB and an offset instead of (generally) a pointer into a TVB. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35913 f5534014-38df-0310-8fa8-9805f1628bb7
2011-01-14Replace ip_to_str((tvb_get_ptr(...)) with tvb_ip_to_str().morriss1-5/+3
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(). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35529 f5534014-38df-0310-8fa8-9805f1628bb7
2010-12-20Rename the routines that handle dissector tables with unsigned integerguy1-2/+2
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-05-21Have abs_time_to_str() and abs_time_to_str_secs() take an additionalguy1-8/+8
argument indicating whether to include the time zone in the string. If we're constructing a display filter, don't include the time zone, otherwise do. Fixes bug 4756. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32913 f5534014-38df-0310-8fa8-9805f1628bb7
2010-04-26Move proto_reg_handoff... to the end of the file.wmeier1-16/+20
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32568 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@32410 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
2010-02-28Added svn:ignore targets.stig1-8/+8
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32055 f5534014-38df-0310-8fa8-9805f1628bb7
2009-12-19For fields of type FT_ABSOLUTE_TIME, have the "display" value be one ofguy1-1/+1
ABSOLUTE_TIME_LOCAL or ABSOLUTE_TIME_UTC, indicating whether to display the date/time in local time or UTC. (int)ABSOLUTE_TIME_LOCAL == (int)BASE_NONE, so there's no source or binary compatiblity issue, although we might want to eliminate BASE_NONE at some point and have the BASE_ values used with integral types start at 0, so that you can't specify BASE_NONE for an integral field. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31319 f5534014-38df-0310-8fa8-9805f1628bb7
2009-12-10Add an argument to abs_time_to_str() and abs_time_secs_to_str()guy1-8/+8
indicating whether the time should be shown as local time or UTC. For now, always pass FALSE, meaning "show as local time". Clean up some stuff in the SNMP dissector, use abs_time_secs_to_str() for times with one-second resolution, and update a comment in various macros in the WSP dissector, while we're at it. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31227 f5534014-38df-0310-8fa8-9805f1628bb7
2009-08-09Don't guard col_clear with col_checkkrj1-2/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29344 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-35/+35
(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
2008-09-15Minor cleanup related to proto_reg_handoffwmeier1-10/+8
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26196 f5534014-38df-0310-8fa8-9805f1628bb7
2008-08-26#include <emem.h> not req'dwmeier1-1/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26091 f5534014-38df-0310-8fa8-9805f1628bb7
2008-06-27Fix some warnings reported by gcc -Wshadow ... wmeier1-5/+5
Fix some spacing in packet-dcom.c git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25618 f5534014-38df-0310-8fa8-9805f1628bb7
2008-06-25Constify a bunch of stuff, to squelch -Wwrite-strings warnings. guy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25601 f5534014-38df-0310-8fa8-9805f1628bb7
2007-03-28Remove almost all of the casts I committed recently and in place ofsfisher1-2/+2
them, add -Wno-pointer-sign to CFLAGS when gcc will accept it. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21253 f5534014-38df-0310-8fa8-9805f1628bb7
2007-03-27Fix about 100 simple to fix warnings from gcc 4.0 in epan/dissectors sfisher1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21233 f5534014-38df-0310-8fa8-9805f1628bb7
2006-10-31change the signature for the get_pdu_len() function pointer passed to ↵sahlberg1-1/+1
tcp_dissect_pdus() to also include a packet_info pointer. there are many reasons why some protocols actually need to be able to access the pinfo structure while determining the pdu size git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19751 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-20waste a couple of bytes per tcp conversation and make the tree for ↵sahlberg1-0/+1
acked_packets (i.e. packets that have interesting tcp properties such as being retransmissions etc) hang off the per conversation tcpd struct instead of being global. while this should improve performance by unmeasurably little it does have the sideeffect that once we finish the rewrite tcp analysis might actually work and work well even for tcp over tcp tunnelling. this also means that if you include packet-tcp.h you also need to include emem.h . git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17681 f5534014-38df-0310-8fa8-9805f1628bb7
2006-02-16Use the new "proto_tree_add_*_format_value" routines.guy1-20/+20
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17316 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-10rename ep_tvb_get_string() to tvb_get_ephemeral_string() asnd update the ↵sahlberg1-2/+2
documentation in README.developer git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15270 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-10ememify tywo more tvb_get_string()sahlberg1-4/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15269 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-07DHCP Failover runs over TCP; use tcp_dissect_pdus.guy1-635/+627
There's no need to build a list of all the options and then dissect them individually; just have one loop that dissects them. (The full list wasn't being freed, so we were leaking memory.) Add some more sanity checks. Clean up a bunch of other things. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15255 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-07Fix the spelling of "transferred".guy1-27/+77
Fix the sizes of some items to match what's in the I-D and what's being fetched from the packet. Check for the length of items before doing *anything* with the item, including fetching the data from the packet. Just put a "bad length" indication into the protocol tree; don't abort the dissection (we can just move on to the next TLV). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15254 f5534014-38df-0310-8fa8-9805f1628bb7
2005-07-27Squelch another qualifier warning.guy1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15122 f5534014-38df-0310-8fa8-9805f1628bb7
2005-07-21More warining fixes: char -> const charjmayer1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14976 f5534014-38df-0310-8fa8-9805f1628bb7
2005-06-26Get rid of the private "my_match_strval()" routine in many dissectors;guy1-37/+20
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14786 f5534014-38df-0310-8fa8-9805f1628bb7
2005-04-29Make sure we're passing the proper lengths to proto_tree_add_item(). Fixes gerald1-0/+16
bug 142. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14230 f5534014-38df-0310-8fa8-9805f1628bb7
2004-08-16According to draft-ietf-dhc-failover-10, the message digest type is 1guy1-3/+8
byte - and a length of 1 is used to put the message digest into the protocol tree, which agrees with that. Therefore, "tvb_get_guint8()" should be used to fetch it. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11746 f5534014-38df-0310-8fa8-9805f1628bb7
2004-08-15Make message_digest_type a guint16. Removed cast.jmayer1-2/+3
Spotted by Ulf Lamping. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11742 f5534014-38df-0310-8fa8-9805f1628bb7
2004-08-15remove MSVC compiler warning (required a type cast)ulfl1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11741 f5534014-38df-0310-8fa8-9805f1628bb7
2004-08-10Use the protocol short name as the Protocol column value, as is done inguy1-1/+1
other dissectors. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11640 f5534014-38df-0310-8fa8-9805f1628bb7
2004-08-09- Small cosmetic fix to DHCP failover prefsjmayer1-3/+2
- free -> g_free (we are using g_malloc) - remove debug prinf git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11632 f5534014-38df-0310-8fa8-9805f1628bb7
2004-08-09Enable the configurable port number - and make the filter name for theguy1-22/+14
protocol "dhcpfo", to match the filter names of its fields; that - or changing the long name or abbreviation of the protocol - fixes the core dump (which was in a check for a name being legal). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11631 f5534014-38df-0310-8fa8-9805f1628bb7
2004-08-09M. Ortega y Strupp <moys@loplof.de>jmayer1-0/+1179
ISC DHCP Server 3.0 failover protocol dissection Note: I tried to make the port configurable via prefs but failed to do so: It always cashed on startup so it is commented out for now. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11630 f5534014-38df-0310-8fa8-9805f1628bb7