2004-08-09 01:53:26 +00:00
|
|
|
/* packet-dhcpfo.c
|
|
|
|
* Routines for ISC DHCP Server failover protocol dissection
|
|
|
|
* Copyright 2004, M. Ortega y Strupp <moys@loplof.de>
|
|
|
|
*
|
2006-05-21 04:49:01 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2004-08-09 01:53:26 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2012-06-28 22:56:06 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2004-08-09 01:53:26 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This implementation is loosely based on draft-ietf-dhc-failover-07.txt.
|
|
|
|
* As this document does not represent the actual implementation, the
|
|
|
|
* source code of ISC DHCPD 3.0 was used too.
|
2004-08-16 01:13:11 +00:00
|
|
|
*
|
|
|
|
* See also
|
|
|
|
*
|
|
|
|
* http://community.roxen.com/developers/idocs/drafts/draft-ietf-dhc-failover-10.html
|
|
|
|
*
|
|
|
|
* upon which the handling of the message-digest option is based.
|
2004-08-09 01:53:26 +00:00
|
|
|
*/
|
|
|
|
|
2012-09-20 02:03:38 +00:00
|
|
|
#include "config.h"
|
2004-08-09 01:53:26 +00:00
|
|
|
|
|
|
|
#include <epan/packet.h>
|
2005-08-07 20:06:01 +00:00
|
|
|
#include <epan/strutil.h>
|
|
|
|
#include <epan/prefs.h>
|
2012-10-14 15:27:52 +00:00
|
|
|
#include <epan/expert.h>
|
2013-12-21 17:23:17 +00:00
|
|
|
#include <epan/to_str.h>
|
|
|
|
|
2004-08-09 01:53:26 +00:00
|
|
|
#include "packet-arp.h"
|
2005-08-07 20:06:01 +00:00
|
|
|
#include "packet-tcp.h"
|
2004-08-09 01:53:26 +00:00
|
|
|
|
|
|
|
#define TCP_PORT_DHCPFO 519
|
|
|
|
|
2013-03-16 16:25:41 +00:00
|
|
|
void proto_register_dhcpfo(void);
|
|
|
|
void proto_reg_handoff_dhcpfo(void);
|
|
|
|
|
2008-09-15 15:38:34 +00:00
|
|
|
static guint tcp_port_pref = TCP_PORT_DHCPFO;
|
2004-08-09 01:53:26 +00:00
|
|
|
|
2005-08-07 20:06:01 +00:00
|
|
|
/* desegmentation of DHCP failover over TCP */
|
|
|
|
static gboolean dhcpfo_desegment = TRUE;
|
|
|
|
|
2004-08-09 01:53:26 +00:00
|
|
|
/* Initialize the protocol and registered fields */
|
|
|
|
static int proto_dhcpfo = -1;
|
|
|
|
static int hf_dhcpfo_length = -1;
|
|
|
|
static int hf_dhcpfo_type = -1;
|
|
|
|
static int hf_dhcpfo_poffset = -1;
|
|
|
|
static int hf_dhcpfo_time = -1;
|
|
|
|
static int hf_dhcpfo_xid = -1;
|
|
|
|
static int hf_dhcpfo_additional_HB = -1;
|
|
|
|
static int hf_dhcpfo_payload_data = -1;
|
|
|
|
static int hf_dhcpfo_option_code = -1;
|
|
|
|
static int hf_dhcpfo_dhcp_style_option = -1;
|
|
|
|
static int hf_dhcpfo_option_length = -1;
|
|
|
|
static int hf_dhcpfo_binding_status = -1;
|
|
|
|
static int hf_dhcpfo_server_state = -1;
|
|
|
|
static int hf_dhcpfo_assigned_ip_address = -1;
|
|
|
|
static int hf_dhcpfo_sending_server_ip_address = -1;
|
2005-08-07 18:03:34 +00:00
|
|
|
static int hf_dhcpfo_addresses_transferred = -1;
|
2004-08-09 01:53:26 +00:00
|
|
|
static int hf_dhcpfo_client_identifier = -1;
|
|
|
|
static int hf_dhcpfo_client_hw_type = -1;
|
|
|
|
static int hf_dhcpfo_client_hardware_address = -1;
|
|
|
|
static int hf_dhcpfo_ftddns = -1;
|
|
|
|
static int hf_dhcpfo_reject_reason = -1;
|
|
|
|
static int hf_dhcpfo_message = -1;
|
|
|
|
static int hf_dhcpfo_mclt = -1;
|
|
|
|
static int hf_dhcpfo_vendor_class = -1;
|
|
|
|
static int hf_dhcpfo_lease_expiration_time = -1;
|
|
|
|
static int hf_dhcpfo_grace_expiration_time = -1;
|
|
|
|
static int hf_dhcpfo_potential_expiration_time = -1;
|
|
|
|
static int hf_dhcpfo_client_last_transaction_time = -1;
|
|
|
|
static int hf_dhcpfo_start_time_of_state = -1;
|
|
|
|
static int hf_dhcpfo_vendor_option = -1;
|
|
|
|
static int hf_dhcpfo_max_unacked_bndupd = -1;
|
|
|
|
static int hf_dhcpfo_protocol_version = -1;
|
|
|
|
static int hf_dhcpfo_receive_timer = -1;
|
|
|
|
static int hf_dhcpfo_message_digest = -1;
|
|
|
|
static int hf_dhcpfo_hash_bucket_assignment = -1;
|
2012-10-14 15:27:52 +00:00
|
|
|
static int hf_dhcpfo_message_digest_type = -1;
|
|
|
|
static int hf_dhcpfo_tls_request = -1;
|
|
|
|
static int hf_dhcpfo_serverflag = -1;
|
2004-08-09 01:53:26 +00:00
|
|
|
|
|
|
|
/* Initialize the subtree pointers */
|
|
|
|
static gint ett_dhcpfo = -1;
|
|
|
|
static gint ett_fo_payload = -1;
|
|
|
|
static gint ett_fo_option = -1;
|
|
|
|
|
2013-06-08 02:06:24 +00:00
|
|
|
static expert_field ei_dhcpfo_bad_length = EI_INIT;
|
|
|
|
static expert_field ei_dhcpfo_message_digest_type_not_allowed = EI_INIT;
|
|
|
|
|
|
|
|
|
2005-08-07 20:06:01 +00:00
|
|
|
/* Length of fixed-length portion of header */
|
|
|
|
#define DHCPFO_FL_HDR_LEN 12
|
2004-08-09 01:53:26 +00:00
|
|
|
|
|
|
|
/* message-types of failover */
|
|
|
|
enum {
|
|
|
|
DHCP_FO_RESERVED,
|
|
|
|
DHCP_FO_POOLREQ,
|
|
|
|
DHCP_FO_POOLRESP,
|
|
|
|
DHCP_FO_BNDUPD,
|
|
|
|
DHCP_FO_BNDACK,
|
|
|
|
DHCP_FO_CONNECT,
|
|
|
|
DHCP_FO_CONNECTACK,
|
|
|
|
DHCP_FO_UPDREQ,
|
|
|
|
DHCP_FO_UPDDONE,
|
|
|
|
DHCP_FO_UPDREQALL,
|
|
|
|
DHCP_FO_STATE,
|
|
|
|
DHCP_FO_CONTACT,
|
|
|
|
DHCP_FO_DISCONNECT
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string failover_vals[] =
|
|
|
|
{
|
|
|
|
{DHCP_FO_RESERVED, "Reserved"},
|
|
|
|
{DHCP_FO_POOLREQ, "Pool request"},
|
|
|
|
{DHCP_FO_POOLRESP, "Pool response"},
|
|
|
|
{DHCP_FO_BNDUPD, "Binding update"},
|
|
|
|
{DHCP_FO_BNDACK, "Binding acknowledge"},
|
|
|
|
{DHCP_FO_CONNECT, "Connect"},
|
|
|
|
{DHCP_FO_CONNECTACK, "Connect acknowledge"},
|
|
|
|
{DHCP_FO_UPDREQ, "Update request all"},
|
|
|
|
{DHCP_FO_UPDDONE, "Update done"},
|
|
|
|
{DHCP_FO_UPDREQALL, "Update request"},
|
|
|
|
{DHCP_FO_STATE, "State"},
|
|
|
|
{DHCP_FO_CONTACT, "Contact"},
|
|
|
|
{DHCP_FO_DISCONNECT, "Disconnect"},
|
|
|
|
{0, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
/*options of payload-data*/
|
|
|
|
enum {
|
|
|
|
DHCP_FO_PD_UNKNOWN_PACKET0,
|
2005-08-07 20:06:01 +00:00
|
|
|
DHCP_FO_PD_BINDING_STATUS,
|
2004-08-09 01:53:26 +00:00
|
|
|
DHCP_FO_PD_ASSIGNED_IP_ADDRESS,
|
|
|
|
DHCP_FO_PD_SENDING_SERVER_IP_ADDRESS,
|
|
|
|
DHCP_FO_PD_ADDRESSES_TRANSFERED,
|
|
|
|
DHCP_FO_PD_CLIENT_IDENTIFIER,
|
|
|
|
DHCP_FO_PD_CLIENT_HARDWARE_ADDRESS,
|
|
|
|
DHCP_FO_PD_FTDDNS,
|
|
|
|
DHCP_FO_PD_REJECT_REASON,
|
|
|
|
DHCP_FO_PD_MESSAGE,
|
|
|
|
DHCP_FO_PD_MCLT,
|
|
|
|
DHCP_FO_PD_VENDOR_CLASS,
|
|
|
|
DHCP_FO_PD_UNKNOWN_PACKET12,
|
|
|
|
DHCP_FO_PD_LEASE_EXPIRATION_TIME,
|
|
|
|
DHCP_FO_PD_POTENTIAL_EXPIRATION_TIME,
|
|
|
|
DHCP_FO_PD_GRACE_EXPIRATION_TIME,
|
|
|
|
DHCP_FO_PD_CLIENT_LAST_TRANSACTION_TIME,
|
|
|
|
DHCP_FO_PD_START_TIME_OF_STATE,
|
|
|
|
DHCP_FO_PD_SERVERSTATE,
|
|
|
|
DHCP_FO_PD_SERVERFLAG,
|
|
|
|
DHCP_FO_PD_VENDOR_OPTION,
|
|
|
|
DHCP_FO_PD_MAX_UNACKED_BNDUPD,
|
|
|
|
DHCP_FO_PD_UNKNOWN_PACKET22,
|
|
|
|
DHCP_FO_PD_RECEIVE_TIMER,
|
|
|
|
DHCP_FO_PD_HASH_BUCKET_ASSIGNMENT,
|
|
|
|
DHCP_FO_PD_MESSAGE_DIGEST,
|
|
|
|
DHCP_FO_PD_PROTOCOL_VERSION,
|
|
|
|
DHCP_FO_PD_TLS_REQUEST,
|
|
|
|
DHCP_FO_PD_TLS_REPLY,
|
|
|
|
DHCP_FO_PD_REQUEST_OPTION,
|
|
|
|
DHCP_FO_PD_REPLY_OPTION
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string option_code_vals[] =
|
|
|
|
{
|
|
|
|
{DHCP_FO_PD_UNKNOWN_PACKET0, "Unknown Packet"},
|
|
|
|
{DHCP_FO_PD_BINDING_STATUS, "binding-status"},
|
|
|
|
{DHCP_FO_PD_ASSIGNED_IP_ADDRESS, "assigned-IP-address"},
|
|
|
|
{DHCP_FO_PD_SENDING_SERVER_IP_ADDRESS, "sending-server-IP-address"},
|
2005-08-07 18:03:34 +00:00
|
|
|
{DHCP_FO_PD_ADDRESSES_TRANSFERED, "addresses-transferred"},
|
2004-08-09 01:53:26 +00:00
|
|
|
{DHCP_FO_PD_CLIENT_IDENTIFIER, "client-identifier"},
|
|
|
|
{DHCP_FO_PD_CLIENT_HARDWARE_ADDRESS, "client-hardware-address"},
|
|
|
|
{DHCP_FO_PD_FTDDNS, "FTDDNS"},
|
|
|
|
{DHCP_FO_PD_REJECT_REASON, "reject-reason"},
|
|
|
|
{DHCP_FO_PD_MESSAGE, "message"},
|
|
|
|
{DHCP_FO_PD_MCLT, "MCLT"},
|
|
|
|
{DHCP_FO_PD_VENDOR_CLASS, "vendor-class"},
|
|
|
|
{DHCP_FO_PD_UNKNOWN_PACKET12, "Unknown Packet"},
|
|
|
|
{DHCP_FO_PD_LEASE_EXPIRATION_TIME, "lease-expiration-time"},
|
|
|
|
{DHCP_FO_PD_POTENTIAL_EXPIRATION_TIME, "potential-expiration-time"},
|
|
|
|
{DHCP_FO_PD_GRACE_EXPIRATION_TIME, "grace-expiration-time"},
|
|
|
|
{DHCP_FO_PD_CLIENT_LAST_TRANSACTION_TIME, "client-last-transaction-time"},
|
|
|
|
{DHCP_FO_PD_START_TIME_OF_STATE, "start-time-of-state"},
|
|
|
|
{DHCP_FO_PD_SERVERSTATE, "server-state"},
|
|
|
|
{DHCP_FO_PD_SERVERFLAG, "server-flag"},
|
|
|
|
{DHCP_FO_PD_VENDOR_OPTION, "vendor-option"},
|
|
|
|
{DHCP_FO_PD_MAX_UNACKED_BNDUPD, "max-unacked-BNDUPD"},
|
|
|
|
{DHCP_FO_PD_UNKNOWN_PACKET22, "Unknown Packet"},
|
|
|
|
{DHCP_FO_PD_RECEIVE_TIMER, "receive-timer"},
|
|
|
|
{DHCP_FO_PD_HASH_BUCKET_ASSIGNMENT, "hash-bucket-assignment"},
|
|
|
|
{DHCP_FO_PD_MESSAGE_DIGEST, "message-digest"},
|
|
|
|
{DHCP_FO_PD_PROTOCOL_VERSION, "protocol-version"},
|
|
|
|
{DHCP_FO_PD_TLS_REQUEST, "TLS-request"},
|
|
|
|
{DHCP_FO_PD_TLS_REPLY, "TLS-reply"},
|
|
|
|
{DHCP_FO_PD_REQUEST_OPTION, "request-option"},
|
|
|
|
{DHCP_FO_PD_REPLY_OPTION, "reply-option"},
|
|
|
|
{0, NULL}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Binding-status */
|
|
|
|
enum {
|
2005-08-07 20:06:01 +00:00
|
|
|
DHCP_FO_BS_UNKNOWN_PACKET,
|
2004-08-09 01:53:26 +00:00
|
|
|
DHCP_FO_BS_FREE,
|
|
|
|
DHCP_FO_BS_ACTIVE,
|
|
|
|
DHCP_FO_BS_EXPIRED,
|
|
|
|
DHCP_FO_BS_RELEASED,
|
|
|
|
DHCP_FO_BS_ABANDONED,
|
|
|
|
DHCP_FO_BS_RESET,
|
|
|
|
DHCP_FO_BS_BACKUP
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string binding_status_vals[] =
|
|
|
|
{
|
2005-08-07 20:06:01 +00:00
|
|
|
{DHCP_FO_BS_UNKNOWN_PACKET, "Unknown Packet"},
|
2004-08-09 01:53:26 +00:00
|
|
|
{DHCP_FO_BS_FREE, "FREE"},
|
|
|
|
{DHCP_FO_BS_ACTIVE, "ACTIVE"},
|
|
|
|
{DHCP_FO_BS_EXPIRED, "EXPIRED"},
|
|
|
|
{DHCP_FO_BS_RELEASED, "RELEASED"},
|
|
|
|
{DHCP_FO_BS_ABANDONED, "ABANDONED"},
|
|
|
|
{DHCP_FO_BS_RESET, "RESET"},
|
|
|
|
{DHCP_FO_BS_BACKUP, "BACKUP"},
|
|
|
|
{0, NULL}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Server-status */
|
|
|
|
enum {
|
|
|
|
DHCP_FO_SS_UNKNOWN_PACKET,
|
|
|
|
DHCP_FO_SS_PARTNER_DOWN,
|
|
|
|
DHCP_FO_SS_NORMAL,
|
|
|
|
DHCP_FO_SS_COMMUNICATION_INTERRUPTED,
|
|
|
|
DHCP_FO_SS_RESOLUTION_INTERRUPTED,
|
|
|
|
DHCP_FO_SS_POTENTIAL_CONFLICT,
|
|
|
|
DHCP_FO_SS_RECOVER,
|
|
|
|
DHCP_FO_SS_RECOVER_DONE,
|
|
|
|
DHCP_FO_SS_SHUTDOWN,
|
|
|
|
DHCP_FO_SS_PAUSED,
|
|
|
|
DHCP_FO_SS_STARTUP,
|
|
|
|
DHCP_FO_SS_RECOVER_WAIT
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
static const value_string server_state_vals[] =
|
|
|
|
{
|
2005-08-07 20:06:01 +00:00
|
|
|
{DHCP_FO_SS_UNKNOWN_PACKET, "Unknown Packet"},
|
2004-08-09 01:53:26 +00:00
|
|
|
{DHCP_FO_SS_PARTNER_DOWN, "partner down"},
|
|
|
|
{DHCP_FO_SS_NORMAL, "normal"},
|
|
|
|
{DHCP_FO_SS_COMMUNICATION_INTERRUPTED, "communication interrupted"},
|
|
|
|
{DHCP_FO_SS_RESOLUTION_INTERRUPTED, "resolution interrupted"},
|
|
|
|
{DHCP_FO_SS_POTENTIAL_CONFLICT, "potential conflict"},
|
|
|
|
{DHCP_FO_SS_RECOVER, "recover"},
|
|
|
|
{DHCP_FO_SS_RECOVER_DONE, "recover done"},
|
|
|
|
{DHCP_FO_SS_SHUTDOWN, "shutdown"},
|
|
|
|
{DHCP_FO_SS_PAUSED, "paused"},
|
|
|
|
{DHCP_FO_SS_STARTUP, "startup"},
|
|
|
|
{DHCP_FO_SS_RECOVER_WAIT, "recover wait"},
|
|
|
|
{0, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
/* reject reasons */
|
|
|
|
|
|
|
|
|
|
|
|
enum {
|
|
|
|
DHCP_FO_RR_0,
|
|
|
|
DHCP_FO_RR_1,
|
|
|
|
DHCP_FO_RR_2,
|
|
|
|
DHCP_FO_RR_3,
|
|
|
|
DHCP_FO_RR_4,
|
|
|
|
DHCP_FO_RR_5,
|
|
|
|
DHCP_FO_RR_6,
|
|
|
|
DHCP_FO_RR_7,
|
|
|
|
DHCP_FO_RR_8,
|
|
|
|
DHCP_FO_RR_9,
|
|
|
|
DHCP_FO_RR_10,
|
|
|
|
DHCP_FO_RR_11,
|
|
|
|
DHCP_FO_RR_12,
|
|
|
|
DHCP_FO_RR_13,
|
|
|
|
DHCP_FO_RR_14,
|
|
|
|
DHCP_FO_RR_15,
|
|
|
|
DHCP_FO_RR_16,
|
|
|
|
DHCP_FO_RR_17,
|
|
|
|
DHCP_FO_RR_18,
|
|
|
|
DHCP_FO_RR_19,
|
2005-08-07 20:06:01 +00:00
|
|
|
DHCP_FO_RR_254 = 254
|
|
|
|
|
2004-08-09 01:53:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
static const value_string reject_reason_vals[] =
|
|
|
|
{
|
2005-08-07 20:06:01 +00:00
|
|
|
{DHCP_FO_RR_0, "Reserved"},
|
2004-08-09 01:53:26 +00:00
|
|
|
{DHCP_FO_RR_1, "Illegal IP address (not part of any address pool)"},
|
|
|
|
{DHCP_FO_RR_2, "Fatal conflict exists: address in use by other client"},
|
|
|
|
{DHCP_FO_RR_3, "Missing binding information"},
|
|
|
|
{DHCP_FO_RR_4, "Connection rejected, time mismatch too great"},
|
|
|
|
{DHCP_FO_RR_5, "Connection rejected, invalid MCLT"},
|
|
|
|
{DHCP_FO_RR_6, "Connection rejected, unknown reason"},
|
|
|
|
{DHCP_FO_RR_7, "Connection rejected, duplicate connection"},
|
|
|
|
{DHCP_FO_RR_8, "Connection rejected, invalid failover partner"},
|
|
|
|
{DHCP_FO_RR_9, "TLS not supported"},
|
|
|
|
{DHCP_FO_RR_10, "TLS supported but not configured"},
|
|
|
|
{DHCP_FO_RR_11, "TLS required but not supported by partner"},
|
|
|
|
{DHCP_FO_RR_12, "Message digest not supported"},
|
|
|
|
{DHCP_FO_RR_13, "Message digest not configured"},
|
|
|
|
{DHCP_FO_RR_14, "Protocol version mismatch"},
|
|
|
|
{DHCP_FO_RR_15, "Missing binding information"},
|
|
|
|
{DHCP_FO_RR_16, "Outdated binding information"},
|
|
|
|
{DHCP_FO_RR_17, "Less critical binding information"},
|
|
|
|
{DHCP_FO_RR_18, "No traffic within sufficient time"},
|
|
|
|
{DHCP_FO_RR_19, "Hash bucket assignment conflict"},
|
2005-08-07 20:06:01 +00:00
|
|
|
{DHCP_FO_RR_254, "Unknown: Error occurred but does not match any reason"},
|
|
|
|
{0, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string tls_request_vals[] =
|
|
|
|
{
|
|
|
|
{0, "No TLS operation"},
|
|
|
|
{1, "TLS operation desired but not required"},
|
|
|
|
{2, "TLS operation is required"},
|
2004-08-09 01:53:26 +00:00
|
|
|
{0, NULL}
|
|
|
|
};
|
|
|
|
|
2012-10-14 15:27:52 +00:00
|
|
|
static const value_string message_digest_type_vals[] =
|
|
|
|
{
|
|
|
|
{1, "HMAC-MD5"},
|
|
|
|
{0, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string serverflag_vals[] =
|
|
|
|
{
|
|
|
|
{0, "NONE"},
|
|
|
|
{1, "STARTUP"},
|
|
|
|
{0, NULL}
|
|
|
|
};
|
|
|
|
|
2004-08-09 01:53:26 +00:00
|
|
|
/* Code to actually dissect the packets */
|
2005-08-07 20:06:01 +00:00
|
|
|
static guint
|
2006-10-31 09:29:07 +00:00
|
|
|
get_dhcpfo_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
|
2004-08-09 01:53:26 +00:00
|
|
|
{
|
2005-08-07 20:06:01 +00:00
|
|
|
/*
|
|
|
|
* Return the length of the DHCP failover packet.
|
|
|
|
*/
|
|
|
|
return tvb_get_ntohs(tvb, offset);
|
|
|
|
}
|
2004-08-09 01:53:26 +00:00
|
|
|
|
2013-11-09 17:46:28 +00:00
|
|
|
static int
|
|
|
|
dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
2005-08-07 20:06:01 +00:00
|
|
|
{
|
|
|
|
int offset = 0;
|
|
|
|
proto_item *ti, *pi, *oi;
|
|
|
|
proto_tree *dhcpfo_tree = NULL, *payload_tree, *option_tree;
|
2004-08-09 01:53:26 +00:00
|
|
|
guint16 length, tls_request;
|
|
|
|
guint type, serverflag;
|
2005-08-07 20:06:01 +00:00
|
|
|
int poffset;
|
2004-08-09 01:53:26 +00:00
|
|
|
guint32 xid;
|
2008-06-27 16:15:30 +00:00
|
|
|
nstime_t timex;
|
2012-10-14 15:27:52 +00:00
|
|
|
guint32 lease_expiration_time, grace_expiration_time,
|
|
|
|
potential_expiration_time, client_last_transaction_time,
|
|
|
|
start_time_of_state;
|
2005-08-07 20:06:01 +00:00
|
|
|
gboolean bogus_poffset;
|
2012-10-14 15:27:52 +00:00
|
|
|
guint16 opcode, option_length;
|
|
|
|
guint8 htype, reject_reason, message_digest_type, binding_status;
|
|
|
|
guint8 *vendor_class_str;
|
2005-06-26 19:56:52 +00:00
|
|
|
const gchar *htype_str;
|
2012-10-14 15:27:52 +00:00
|
|
|
gchar *lease_expiration_time_str, *grace_expiration_time_str, *potential_expiration_time_str,
|
|
|
|
*client_last_transaction_time_str, *start_time_of_state_str;
|
2004-08-09 01:53:26 +00:00
|
|
|
guint32 mclt;
|
2012-10-14 15:27:52 +00:00
|
|
|
guint8 server_state;
|
2004-08-09 01:53:26 +00:00
|
|
|
guint32 max_unacked_bndupd, receive_timer;
|
|
|
|
|
|
|
|
/* Make entries in Protocol column and Info column on summary display */
|
2009-08-09 06:26:46 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "DHCPFO");
|
2009-08-09 07:36:13 +00:00
|
|
|
col_clear(pinfo->cinfo, COL_INFO);
|
2004-08-09 01:53:26 +00:00
|
|
|
|
2005-08-07 20:06:01 +00:00
|
|
|
length = tvb_get_ntohs(tvb, offset);
|
2004-08-09 01:53:26 +00:00
|
|
|
if (tree) {
|
|
|
|
/* create display subtree for the protocol */
|
2011-10-21 02:10:19 +00:00
|
|
|
ti = proto_tree_add_item(tree, proto_dhcpfo, tvb, 0, -1, ENC_NA);
|
2004-08-09 01:53:26 +00:00
|
|
|
|
|
|
|
dhcpfo_tree = proto_item_add_subtree(ti, ett_dhcpfo);
|
|
|
|
|
2005-08-07 20:06:01 +00:00
|
|
|
if (length >= DHCPFO_FL_HDR_LEN) {
|
|
|
|
proto_tree_add_uint(dhcpfo_tree,
|
|
|
|
hf_dhcpfo_length, tvb, offset, 2, length);
|
|
|
|
} else {
|
2006-02-16 11:43:38 +00:00
|
|
|
proto_tree_add_uint_format_value(dhcpfo_tree,
|
2005-08-07 20:06:01 +00:00
|
|
|
hf_dhcpfo_length, tvb, offset, 2, length,
|
2006-02-16 11:43:38 +00:00
|
|
|
"%u (bogus, must be >= %u)",
|
2005-08-07 20:06:01 +00:00
|
|
|
length, DHCPFO_FL_HDR_LEN);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
offset += 2;
|
2004-08-09 01:53:26 +00:00
|
|
|
|
2005-08-07 20:06:01 +00:00
|
|
|
type = tvb_get_guint8(tvb, offset);
|
|
|
|
if (tree) {
|
|
|
|
proto_tree_add_uint(dhcpfo_tree,
|
|
|
|
hf_dhcpfo_type, tvb, offset, 1, type);
|
|
|
|
}
|
2013-10-29 14:09:20 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_INFO,
|
2012-08-10 22:55:02 +00:00
|
|
|
val_to_str_const(type, failover_vals, "Unknown Packet"));
|
2005-08-07 20:06:01 +00:00
|
|
|
offset += 1;
|
|
|
|
|
|
|
|
poffset = tvb_get_guint8(tvb, offset);
|
|
|
|
if (poffset < DHCPFO_FL_HDR_LEN) {
|
|
|
|
bogus_poffset = TRUE;
|
|
|
|
if (tree) {
|
2006-02-16 11:43:38 +00:00
|
|
|
proto_tree_add_uint_format_value(dhcpfo_tree,
|
2005-08-07 20:06:01 +00:00
|
|
|
hf_dhcpfo_poffset, tvb, offset, 1, poffset,
|
2006-02-16 11:43:38 +00:00
|
|
|
"%u (bogus, must be >= %u)",
|
2005-08-07 20:06:01 +00:00
|
|
|
poffset, DHCPFO_FL_HDR_LEN);
|
|
|
|
}
|
|
|
|
} else if (poffset > length) {
|
|
|
|
bogus_poffset = TRUE;
|
|
|
|
if (tree) {
|
2006-02-16 11:43:38 +00:00
|
|
|
proto_tree_add_uint_format_value(dhcpfo_tree,
|
2005-08-07 20:06:01 +00:00
|
|
|
hf_dhcpfo_poffset, tvb, offset, 1, poffset,
|
2006-02-16 11:43:38 +00:00
|
|
|
"%u (bogus, must be <= length of message)",
|
2005-08-07 20:06:01 +00:00
|
|
|
poffset);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
bogus_poffset = FALSE;
|
|
|
|
if (tree) {
|
|
|
|
proto_tree_add_uint(dhcpfo_tree,
|
|
|
|
hf_dhcpfo_poffset, tvb, offset, 1, poffset);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
offset += 1;
|
|
|
|
|
|
|
|
if (tree) {
|
|
|
|
/*
|
|
|
|
* XXX - this is *almost* like a time_t, but it's unsigned.
|
|
|
|
* Also, we need a way to keep from displaying nanoseconds,
|
|
|
|
* so as not to make it look as if it has higher
|
|
|
|
*/
|
2008-06-27 16:15:30 +00:00
|
|
|
timex.secs = tvb_get_ntohl(tvb, offset);
|
|
|
|
timex.nsecs = 0;
|
2006-02-16 11:43:38 +00:00
|
|
|
proto_tree_add_time_format_value(dhcpfo_tree, hf_dhcpfo_time, tvb,
|
2008-06-27 16:15:30 +00:00
|
|
|
offset, 4, &timex, "%s",
|
2014-06-16 06:42:14 +00:00
|
|
|
abs_time_secs_to_str(wmem_packet_scope(), timex.secs, ABSOLUTE_TIME_LOCAL, TRUE));
|
2005-08-07 20:06:01 +00:00
|
|
|
}
|
|
|
|
offset += 4;
|
2004-08-09 01:53:26 +00:00
|
|
|
|
2005-08-07 20:06:01 +00:00
|
|
|
xid = tvb_get_ntohl(tvb, offset);
|
|
|
|
if (tree) {
|
2004-08-09 01:53:26 +00:00
|
|
|
proto_tree_add_item(dhcpfo_tree,
|
2011-09-26 14:50:59 +00:00
|
|
|
hf_dhcpfo_xid, tvb, offset, 4, ENC_BIG_ENDIAN);
|
2005-08-07 20:06:01 +00:00
|
|
|
}
|
2011-09-26 14:50:59 +00:00
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO," xid: %x", xid);
|
2005-08-07 20:06:01 +00:00
|
|
|
offset += 4;
|
2004-08-09 01:53:26 +00:00
|
|
|
|
2005-08-07 20:06:01 +00:00
|
|
|
if (bogus_poffset)
|
2013-11-09 17:46:28 +00:00
|
|
|
return offset; /* payload offset was bogus */
|
2004-08-09 01:53:26 +00:00
|
|
|
|
2005-08-07 20:06:01 +00:00
|
|
|
if (!tree)
|
2014-06-19 17:18:16 +00:00
|
|
|
return tvb_length(tvb);
|
2005-08-07 20:06:01 +00:00
|
|
|
|
|
|
|
/* if there are any additional header bytes */
|
|
|
|
if (poffset != offset) {
|
|
|
|
proto_tree_add_item(dhcpfo_tree, hf_dhcpfo_additional_HB, tvb,
|
2011-10-04 22:44:31 +00:00
|
|
|
offset, poffset-offset, ENC_NA);
|
2005-08-07 20:06:01 +00:00
|
|
|
offset = poffset;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* payload-data */
|
|
|
|
if (poffset == length)
|
2013-11-09 17:46:28 +00:00
|
|
|
return length; /* no payload */
|
2005-08-07 20:06:01 +00:00
|
|
|
/* create display subtree for the payload */
|
|
|
|
pi = proto_tree_add_item(dhcpfo_tree, hf_dhcpfo_payload_data,
|
2011-10-04 22:44:31 +00:00
|
|
|
tvb, poffset, length-poffset, ENC_NA);
|
2005-08-07 20:06:01 +00:00
|
|
|
payload_tree = proto_item_add_subtree(pi, ett_fo_payload);
|
|
|
|
while (offset < length) {
|
|
|
|
opcode = tvb_get_ntohs(tvb, offset);
|
|
|
|
option_length = tvb_get_ntohs(tvb, offset+2);
|
|
|
|
|
|
|
|
oi = proto_tree_add_item(payload_tree,
|
|
|
|
hf_dhcpfo_dhcp_style_option, tvb, offset,
|
2011-10-04 22:44:31 +00:00
|
|
|
option_length+4, ENC_NA);
|
2005-08-07 20:06:01 +00:00
|
|
|
option_tree = proto_item_add_subtree(oi, ett_fo_option);
|
|
|
|
|
|
|
|
/*** DHCP-Style-Options ****/
|
|
|
|
|
|
|
|
proto_item_append_text(oi, ", %s (%u)",
|
2012-08-10 22:55:02 +00:00
|
|
|
val_to_str_const(opcode, option_code_vals, "Unknown Option"),
|
2005-08-07 20:06:01 +00:00
|
|
|
opcode);
|
|
|
|
|
|
|
|
proto_tree_add_uint(option_tree, hf_dhcpfo_option_code, tvb,
|
|
|
|
offset, 2, opcode);
|
|
|
|
|
|
|
|
proto_tree_add_uint(option_tree, hf_dhcpfo_option_length, tvb,
|
|
|
|
offset+2, 2, option_length);
|
|
|
|
|
|
|
|
offset += 4;
|
|
|
|
|
|
|
|
/** opcode dependent format **/
|
|
|
|
|
|
|
|
switch (opcode) {
|
|
|
|
|
|
|
|
case DHCP_FO_PD_BINDING_STATUS:
|
|
|
|
binding_status = tvb_get_guint8(tvb, offset);
|
|
|
|
proto_item_append_text(oi, ", %s (%d)",
|
2012-08-10 22:55:02 +00:00
|
|
|
val_to_str_const(binding_status,
|
2005-08-07 20:06:01 +00:00
|
|
|
binding_status_vals,
|
|
|
|
"Unknown Packet"),
|
|
|
|
binding_status);
|
|
|
|
|
|
|
|
proto_tree_add_item(option_tree,
|
|
|
|
hf_dhcpfo_binding_status, tvb,
|
2011-09-26 14:50:59 +00:00
|
|
|
offset, 1, ENC_BIG_ENDIAN);
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case DHCP_FO_PD_ASSIGNED_IP_ADDRESS:
|
|
|
|
if (option_length != 4) {
|
2013-09-09 00:44:09 +00:00
|
|
|
expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "assigned ip address is not 4 bytes long");
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
}
|
2012-10-14 15:27:52 +00:00
|
|
|
proto_item_append_text(oi, ", %s ", tvb_ip_to_str(tvb, offset));
|
2005-08-07 20:06:01 +00:00
|
|
|
|
|
|
|
proto_tree_add_item(option_tree,
|
|
|
|
hf_dhcpfo_assigned_ip_address, tvb, offset,
|
2011-09-26 14:50:59 +00:00
|
|
|
option_length, ENC_BIG_ENDIAN);
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case DHCP_FO_PD_SENDING_SERVER_IP_ADDRESS:
|
|
|
|
if (option_length != 4) {
|
2013-09-09 00:44:09 +00:00
|
|
|
expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "sending server ip address is not 4 bytes long");
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2012-10-14 15:27:52 +00:00
|
|
|
proto_item_append_text(oi, ", %s ", tvb_ip_to_str(tvb, offset));
|
|
|
|
|
2005-08-07 20:06:01 +00:00
|
|
|
proto_tree_add_item(option_tree,
|
|
|
|
hf_dhcpfo_sending_server_ip_address, tvb,
|
2011-09-26 14:50:59 +00:00
|
|
|
offset, option_length, ENC_BIG_ENDIAN);
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case DHCP_FO_PD_ADDRESSES_TRANSFERED:
|
|
|
|
if (option_length != 4) {
|
2013-09-09 00:44:09 +00:00
|
|
|
expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "addresses transferred is not 4 bytes long");
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2012-10-14 15:27:52 +00:00
|
|
|
proto_item_append_text(oi,", %u", tvb_get_ntohl(tvb, offset));
|
|
|
|
|
|
|
|
proto_tree_add_item(option_tree,
|
2005-08-07 20:06:01 +00:00
|
|
|
hf_dhcpfo_addresses_transferred, tvb, offset,
|
2012-10-14 15:27:52 +00:00
|
|
|
option_length, ENC_BIG_ENDIAN);
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case DHCP_FO_PD_CLIENT_IDENTIFIER:
|
|
|
|
/*
|
|
|
|
* XXX - if this is truly like DHCP option 81,
|
|
|
|
* we need to dissect it as such.
|
|
|
|
*/
|
2014-06-17 15:30:58 +00:00
|
|
|
proto_item_append_text(oi,", \"%s\"", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, option_length, ENC_ASCII));
|
2012-10-14 15:27:52 +00:00
|
|
|
|
|
|
|
proto_tree_add_item(option_tree,
|
2005-08-07 20:06:01 +00:00
|
|
|
hf_dhcpfo_client_identifier, tvb, offset,
|
2012-10-14 15:27:52 +00:00
|
|
|
option_length, ENC_ASCII|ENC_NA);
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case DHCP_FO_PD_CLIENT_HARDWARE_ADDRESS:
|
|
|
|
if (option_length < 2) {
|
2013-09-09 00:44:09 +00:00
|
|
|
expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "hardware address is too short");
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
htype = tvb_get_guint8(tvb, offset);
|
2012-10-14 15:27:52 +00:00
|
|
|
htype_str = tvb_arphrdaddr_to_str(tvb, offset+1, option_length-1,
|
2005-08-07 20:06:01 +00:00
|
|
|
htype);
|
|
|
|
|
|
|
|
proto_item_append_text(oi, ", %s, %s", htype_str,
|
2012-10-14 15:27:52 +00:00
|
|
|
htype_str);
|
2005-08-07 20:06:01 +00:00
|
|
|
|
2012-10-14 15:27:52 +00:00
|
|
|
proto_tree_add_item(option_tree, hf_dhcpfo_client_hw_type, tvb,
|
2014-12-13 17:52:20 +00:00
|
|
|
offset, 1, ENC_BIG_ENDIAN);
|
2012-10-14 15:27:52 +00:00
|
|
|
proto_tree_add_string(option_tree, hf_dhcpfo_client_hardware_address, tvb,
|
|
|
|
offset+1, option_length-1, htype_str);
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case DHCP_FO_PD_FTDDNS:
|
|
|
|
proto_tree_add_item(option_tree, hf_dhcpfo_ftddns, tvb,
|
2011-10-15 18:46:26 +00:00
|
|
|
offset, option_length, ENC_ASCII|ENC_NA);
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case DHCP_FO_PD_REJECT_REASON:
|
|
|
|
if (option_length != 1) {
|
2013-09-09 00:44:09 +00:00
|
|
|
expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "Reject reason is not 1 byte long");
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
reject_reason = tvb_get_guint8(tvb, offset);
|
|
|
|
|
|
|
|
proto_item_append_text(oi, ", %s (%d)",
|
2012-08-10 22:55:02 +00:00
|
|
|
val_to_str_const(reject_reason, reject_reason_vals,
|
2005-08-07 20:06:01 +00:00
|
|
|
"Unknown Packet"),
|
|
|
|
reject_reason);
|
|
|
|
|
|
|
|
proto_tree_add_uint(option_tree,
|
|
|
|
hf_dhcpfo_reject_reason, tvb, offset,
|
|
|
|
option_length, reject_reason);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case DHCP_FO_PD_MESSAGE:
|
|
|
|
proto_tree_add_item(option_tree, hf_dhcpfo_message, tvb,
|
2011-10-15 18:46:26 +00:00
|
|
|
offset, option_length, ENC_ASCII|ENC_NA);
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case DHCP_FO_PD_MCLT:
|
|
|
|
if (option_length != 4) {
|
2013-09-09 00:44:09 +00:00
|
|
|
expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "MCLT is not 4 bytes long");
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
mclt = tvb_get_ntohl(tvb, offset);
|
|
|
|
proto_item_append_text(oi,", %u seconds", mclt);
|
|
|
|
proto_tree_add_uint(option_tree, hf_dhcpfo_mclt, tvb,
|
|
|
|
offset, option_length, mclt);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case DHCP_FO_PD_VENDOR_CLASS:
|
|
|
|
vendor_class_str =
|
2014-06-17 15:30:58 +00:00
|
|
|
tvb_get_string_enc(wmem_packet_scope(), tvb, offset, option_length, ENC_ASCII);
|
2005-08-07 20:06:01 +00:00
|
|
|
proto_item_append_text(oi,", \"%s\"",
|
|
|
|
format_text(vendor_class_str, option_length));
|
|
|
|
proto_tree_add_string(option_tree,
|
|
|
|
hf_dhcpfo_vendor_class, tvb, offset,
|
2007-03-28 21:55:11 +00:00
|
|
|
option_length, vendor_class_str);
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case DHCP_FO_PD_LEASE_EXPIRATION_TIME:
|
|
|
|
if (option_length != 4) {
|
2013-09-09 00:44:09 +00:00
|
|
|
expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "Lease expiration time is not 4 bytes long");
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
lease_expiration_time =
|
|
|
|
tvb_get_ntohl(tvb, offset);
|
|
|
|
lease_expiration_time_str =
|
2014-06-16 06:42:14 +00:00
|
|
|
abs_time_secs_to_str(wmem_packet_scope(), lease_expiration_time, ABSOLUTE_TIME_LOCAL, TRUE);
|
2005-08-07 20:06:01 +00:00
|
|
|
|
|
|
|
proto_item_append_text(oi, ", %s",
|
|
|
|
lease_expiration_time_str);
|
|
|
|
|
2006-02-16 11:43:38 +00:00
|
|
|
proto_tree_add_uint_format_value(option_tree,
|
2005-08-07 20:06:01 +00:00
|
|
|
hf_dhcpfo_lease_expiration_time, tvb,
|
|
|
|
offset, option_length,
|
|
|
|
lease_expiration_time,
|
2006-02-16 11:43:38 +00:00
|
|
|
"%s",
|
2005-08-07 20:06:01 +00:00
|
|
|
lease_expiration_time_str);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case DHCP_FO_PD_POTENTIAL_EXPIRATION_TIME:
|
|
|
|
if (option_length != 4) {
|
2013-09-09 00:44:09 +00:00
|
|
|
expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "Potential expiration time is not 4 bytes long");
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
potential_expiration_time =
|
|
|
|
tvb_get_ntohl(tvb, offset);
|
|
|
|
|
|
|
|
potential_expiration_time_str =
|
2014-06-16 06:42:14 +00:00
|
|
|
abs_time_secs_to_str(wmem_packet_scope(), potential_expiration_time, ABSOLUTE_TIME_LOCAL, TRUE);
|
2005-08-07 20:06:01 +00:00
|
|
|
|
|
|
|
proto_item_append_text(oi, ", %s",
|
|
|
|
potential_expiration_time_str);
|
|
|
|
|
2006-02-16 11:43:38 +00:00
|
|
|
proto_tree_add_uint_format_value(option_tree,
|
2005-08-07 20:06:01 +00:00
|
|
|
hf_dhcpfo_potential_expiration_time, tvb,
|
|
|
|
offset, option_length,
|
|
|
|
potential_expiration_time,
|
2006-02-16 11:43:38 +00:00
|
|
|
"%s",
|
2005-08-07 20:06:01 +00:00
|
|
|
potential_expiration_time_str);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case DHCP_FO_PD_GRACE_EXPIRATION_TIME:
|
|
|
|
if (option_length != 4) {
|
2013-09-09 00:44:09 +00:00
|
|
|
expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "Grace expiration time is not 4 bytes long");
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
grace_expiration_time =
|
|
|
|
tvb_get_ntohl(tvb, offset);
|
|
|
|
|
|
|
|
grace_expiration_time_str =
|
2014-06-16 06:42:14 +00:00
|
|
|
abs_time_secs_to_str(wmem_packet_scope(), grace_expiration_time, ABSOLUTE_TIME_LOCAL, TRUE);
|
2005-08-07 20:06:01 +00:00
|
|
|
|
|
|
|
proto_item_append_text(oi, ", %s",
|
|
|
|
grace_expiration_time_str);
|
|
|
|
|
2006-02-16 11:43:38 +00:00
|
|
|
proto_tree_add_uint_format_value(option_tree,
|
2005-08-07 20:06:01 +00:00
|
|
|
hf_dhcpfo_grace_expiration_time, tvb,
|
|
|
|
offset, option_length,
|
|
|
|
grace_expiration_time,
|
2006-02-16 11:43:38 +00:00
|
|
|
"%s",
|
2005-08-07 20:06:01 +00:00
|
|
|
grace_expiration_time_str);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case DHCP_FO_PD_CLIENT_LAST_TRANSACTION_TIME:
|
|
|
|
if (option_length != 4) {
|
2013-09-09 00:44:09 +00:00
|
|
|
expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "Last transaction time is not 4 bytes long");
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
client_last_transaction_time =
|
|
|
|
tvb_get_ntohl(tvb, offset);
|
|
|
|
client_last_transaction_time_str =
|
2014-06-16 06:42:14 +00:00
|
|
|
abs_time_secs_to_str(wmem_packet_scope(), client_last_transaction_time, ABSOLUTE_TIME_LOCAL, TRUE);
|
2005-08-07 20:06:01 +00:00
|
|
|
|
|
|
|
proto_item_append_text(oi, ", %s",
|
|
|
|
client_last_transaction_time_str);
|
|
|
|
|
2006-02-16 11:43:38 +00:00
|
|
|
proto_tree_add_uint_format_value(option_tree,
|
2005-08-07 20:06:01 +00:00
|
|
|
hf_dhcpfo_client_last_transaction_time, tvb,
|
|
|
|
offset, option_length,
|
|
|
|
client_last_transaction_time,
|
2006-02-16 11:43:38 +00:00
|
|
|
"%s",
|
2014-06-16 06:42:14 +00:00
|
|
|
abs_time_secs_to_str(wmem_packet_scope(), client_last_transaction_time, ABSOLUTE_TIME_LOCAL, TRUE));
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case DHCP_FO_PD_START_TIME_OF_STATE:
|
|
|
|
if (option_length != 4) {
|
2013-09-09 00:44:09 +00:00
|
|
|
expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "Start time of state is not 4 bytes long");
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
start_time_of_state =
|
|
|
|
tvb_get_ntohl(tvb, offset);
|
|
|
|
start_time_of_state_str =
|
2014-06-16 06:42:14 +00:00
|
|
|
abs_time_secs_to_str(wmem_packet_scope(), start_time_of_state, ABSOLUTE_TIME_LOCAL, TRUE);
|
2005-08-07 20:06:01 +00:00
|
|
|
|
|
|
|
proto_item_append_text(oi, ", %s",
|
|
|
|
start_time_of_state_str);
|
|
|
|
|
2006-02-16 11:43:38 +00:00
|
|
|
proto_tree_add_uint_format_value(option_tree,
|
2005-08-07 20:06:01 +00:00
|
|
|
hf_dhcpfo_start_time_of_state, tvb,
|
|
|
|
offset, option_length,
|
|
|
|
start_time_of_state,
|
2006-02-16 11:43:38 +00:00
|
|
|
"%s",
|
2014-06-16 06:42:14 +00:00
|
|
|
abs_time_secs_to_str(wmem_packet_scope(), start_time_of_state, ABSOLUTE_TIME_LOCAL, TRUE));
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case DHCP_FO_PD_SERVERSTATE:
|
|
|
|
if (option_length != 1) {
|
2013-09-09 00:44:09 +00:00
|
|
|
expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "server status is not 1 byte long");
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
server_state = tvb_get_guint8(tvb, offset);
|
|
|
|
|
|
|
|
proto_item_append_text(oi, ", %s (%u)",
|
2012-08-10 22:55:02 +00:00
|
|
|
val_to_str_const(server_state, server_state_vals,
|
2005-08-07 20:06:01 +00:00
|
|
|
"Unknown"),
|
|
|
|
server_state);
|
|
|
|
|
|
|
|
proto_tree_add_uint(option_tree,
|
|
|
|
hf_dhcpfo_server_state, tvb, offset, 1,
|
|
|
|
server_state);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case DHCP_FO_PD_SERVERFLAG:
|
|
|
|
if (option_length != 1) {
|
2013-09-09 00:44:09 +00:00
|
|
|
expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "Serverflag is not 1 byte long");
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
serverflag = tvb_get_guint8(tvb, offset);
|
2012-10-14 15:27:52 +00:00
|
|
|
proto_item_append_text(oi, ", %s (%d)",
|
2012-10-14 16:24:17 +00:00
|
|
|
val_to_str_const(serverflag, serverflag_vals, "UNKNOWN FLAGS"),
|
2012-10-14 15:27:52 +00:00
|
|
|
serverflag);
|
|
|
|
proto_tree_add_item(option_tree, hf_dhcpfo_serverflag, tvb, offset, option_length, ENC_BIG_ENDIAN);
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case DHCP_FO_PD_VENDOR_OPTION:
|
|
|
|
proto_tree_add_item(option_tree,
|
|
|
|
hf_dhcpfo_vendor_option, tvb, offset,
|
2011-10-04 22:44:31 +00:00
|
|
|
option_length, ENC_NA);
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case DHCP_FO_PD_MAX_UNACKED_BNDUPD:
|
|
|
|
if (option_length != 4) {
|
2013-09-09 00:44:09 +00:00
|
|
|
expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "Max unacked BNDUPD is not 4 bytes long");
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
max_unacked_bndupd = tvb_get_ntohl(tvb, offset);
|
|
|
|
proto_item_append_text(oi, ", %u", max_unacked_bndupd);
|
|
|
|
|
|
|
|
proto_tree_add_uint(option_tree,
|
|
|
|
hf_dhcpfo_max_unacked_bndupd, tvb, offset,
|
|
|
|
option_length, max_unacked_bndupd);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case DHCP_FO_PD_RECEIVE_TIMER:
|
|
|
|
if (option_length != 4) {
|
2013-09-09 00:44:09 +00:00
|
|
|
expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "Receive timer is not 4 bytes long");
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
receive_timer = tvb_get_ntohl(tvb, offset);
|
|
|
|
proto_item_append_text(oi,", %u seconds",
|
|
|
|
receive_timer);
|
|
|
|
|
2006-02-16 11:43:38 +00:00
|
|
|
proto_tree_add_uint_format_value(option_tree,
|
2005-08-07 20:06:01 +00:00
|
|
|
hf_dhcpfo_receive_timer, tvb, offset,
|
|
|
|
option_length, receive_timer,
|
2006-02-16 11:43:38 +00:00
|
|
|
"%u seconds",
|
2005-08-07 20:06:01 +00:00
|
|
|
receive_timer);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case DHCP_FO_PD_HASH_BUCKET_ASSIGNMENT:
|
|
|
|
proto_tree_add_item(option_tree,
|
|
|
|
hf_dhcpfo_hash_bucket_assignment, tvb,
|
2011-10-04 22:44:31 +00:00
|
|
|
offset, option_length, ENC_NA);
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case DHCP_FO_PD_MESSAGE_DIGEST:
|
|
|
|
if (option_length < 2) {
|
2013-09-09 00:44:09 +00:00
|
|
|
expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "Message digest is too short");
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
}
|
2012-10-14 15:27:52 +00:00
|
|
|
|
2005-08-07 20:06:01 +00:00
|
|
|
message_digest_type = tvb_get_guint8(tvb, offset);
|
2012-10-14 15:27:52 +00:00
|
|
|
ti = proto_tree_add_item(option_tree, hf_dhcpfo_message_digest_type, tvb, offset, 1, ENC_BIG_ENDIAN);
|
|
|
|
|
2005-08-07 20:06:01 +00:00
|
|
|
if (message_digest_type == 1) {
|
|
|
|
proto_item_append_text(oi, ", HMAC-MD5");
|
|
|
|
} else {
|
|
|
|
proto_item_append_text(oi, ", type not allowed");
|
2013-09-09 00:44:09 +00:00
|
|
|
expert_add_info_format(pinfo, ti, &ei_dhcpfo_message_digest_type_not_allowed, "Message digest type: %u, not allowed", message_digest_type);
|
2004-08-09 01:53:26 +00:00
|
|
|
}
|
|
|
|
|
2005-08-07 20:06:01 +00:00
|
|
|
proto_tree_add_item(option_tree,
|
|
|
|
hf_dhcpfo_message_digest, tvb, offset+1,
|
2011-10-15 18:46:26 +00:00
|
|
|
option_length-1, ENC_ASCII|ENC_NA);
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case DHCP_FO_PD_PROTOCOL_VERSION:
|
|
|
|
if (option_length != 1) {
|
2013-09-09 00:44:09 +00:00
|
|
|
expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "Protocol version is not 1 byte long");
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
}
|
2012-10-14 15:27:52 +00:00
|
|
|
proto_item_append_text(oi, ", version: %u", tvb_get_guint8(tvb, offset));
|
|
|
|
proto_tree_add_item(option_tree, hf_dhcpfo_protocol_version, tvb, offset, option_length, ENC_BIG_ENDIAN);
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case DHCP_FO_PD_TLS_REQUEST:
|
|
|
|
if (option_length != 2) {
|
2013-09-09 00:44:09 +00:00
|
|
|
expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "TLS request is not 2 bytes long");
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
tls_request = tvb_get_ntohs(tvb, offset);
|
2012-10-14 15:27:52 +00:00
|
|
|
proto_item_append_text(oi, ", %s", val_to_str(tls_request, tls_request_vals, "Unknown (%u)"));
|
|
|
|
proto_tree_add_item(option_tree, hf_dhcpfo_tls_request, tvb, offset, option_length, ENC_BIG_ENDIAN);
|
2005-08-07 20:06:01 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case DHCP_FO_PD_TLS_REPLY:
|
|
|
|
break;
|
|
|
|
case DHCP_FO_PD_REQUEST_OPTION:
|
|
|
|
break;
|
|
|
|
case DHCP_FO_PD_REPLY_OPTION:
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
2004-08-09 01:53:26 +00:00
|
|
|
}
|
|
|
|
|
2005-08-07 20:06:01 +00:00
|
|
|
offset += option_length;
|
2004-08-09 01:53:26 +00:00
|
|
|
}
|
2013-11-09 17:46:28 +00:00
|
|
|
|
2014-06-19 17:18:16 +00:00
|
|
|
return tvb_length(tvb);
|
2005-08-07 20:06:01 +00:00
|
|
|
}
|
2004-08-09 01:53:26 +00:00
|
|
|
|
2013-11-09 17:46:28 +00:00
|
|
|
static int
|
|
|
|
dissect_dhcpfo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
|
2005-08-07 20:06:01 +00:00
|
|
|
{
|
|
|
|
tcp_dissect_pdus(tvb, pinfo, tree, dhcpfo_desegment, 2,
|
2013-11-09 17:46:28 +00:00
|
|
|
get_dhcpfo_pdu_len, dissect_dhcpfo_pdu, data);
|
2014-06-19 17:18:16 +00:00
|
|
|
return tvb_length(tvb);
|
2004-08-09 01:53:26 +00:00
|
|
|
}
|
|
|
|
|
2010-04-26 22:12:48 +00:00
|
|
|
/* Register the protocol with Wireshark */
|
2004-08-09 01:53:26 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
proto_register_dhcpfo(void)
|
2005-08-07 20:06:01 +00:00
|
|
|
{
|
2004-08-09 01:53:26 +00:00
|
|
|
|
|
|
|
/* Setup list of header fields See Section 1.6.1 for details*/
|
|
|
|
static hf_register_info hf[] = {
|
|
|
|
{ &hf_dhcpfo_length,
|
2005-08-07 20:06:01 +00:00
|
|
|
{ "Message length", "dhcpfo.length",
|
|
|
|
FT_UINT16, BASE_DEC, NULL, 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
{ &hf_dhcpfo_type,
|
2005-08-07 20:06:01 +00:00
|
|
|
{ "Message Type", "dhcpfo.type",
|
|
|
|
FT_UINT8, BASE_DEC, VALS(failover_vals), 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{ &hf_dhcpfo_poffset,
|
2005-08-07 20:06:01 +00:00
|
|
|
{ "Payload Offset", "dhcpfo.poffset",
|
|
|
|
FT_UINT8, BASE_DEC, NULL, 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{ &hf_dhcpfo_time,
|
2005-08-07 20:06:01 +00:00
|
|
|
{ "Time", "dhcpfo.time",
|
2009-12-19 03:17:44 +00:00
|
|
|
FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{ &hf_dhcpfo_xid,
|
2005-08-07 20:06:01 +00:00
|
|
|
{ "Xid", "dhcpfo.xid",
|
|
|
|
FT_UINT32, BASE_HEX, NULL, 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{ &hf_dhcpfo_additional_HB,
|
|
|
|
{"Additional Header Bytes", "dhcpfo.additionalheaderbytes",
|
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{ &hf_dhcpfo_payload_data,
|
|
|
|
{"Payload Data", "dhcpfo.payloaddata",
|
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{ &hf_dhcpfo_dhcp_style_option,
|
|
|
|
{"DHCP Style Option", "dhcpfo.dhcpstyleoption",
|
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
2005-08-07 20:06:01 +00:00
|
|
|
|
2004-08-09 01:53:26 +00:00
|
|
|
{ &hf_dhcpfo_option_code,
|
|
|
|
{"Option Code", "dhcpfo.optioncode",
|
|
|
|
FT_UINT16, BASE_DEC, VALS(option_code_vals), 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2005-08-07 20:06:01 +00:00
|
|
|
},
|
2004-08-09 01:53:26 +00:00
|
|
|
|
|
|
|
{&hf_dhcpfo_option_length,
|
|
|
|
{"Length", "dhcpfo.optionlength",
|
|
|
|
FT_UINT16, BASE_DEC, NULL, 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{&hf_dhcpfo_binding_status,
|
|
|
|
{"Type", "dhcpfo.bindingstatus",
|
|
|
|
FT_UINT32, BASE_DEC, VALS(binding_status_vals), 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
2005-08-07 20:06:01 +00:00
|
|
|
|
2004-08-09 01:53:26 +00:00
|
|
|
{&hf_dhcpfo_server_state,
|
|
|
|
{"server status", "dhcpfo.serverstatus",
|
|
|
|
FT_UINT8, BASE_DEC, VALS(server_state_vals), 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
{&hf_dhcpfo_assigned_ip_address,
|
|
|
|
{"assigned ip address", "dhcpfo.assignedipaddress",
|
|
|
|
FT_IPv4, BASE_NONE, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{&hf_dhcpfo_sending_server_ip_address,
|
|
|
|
{"sending server ip-address", "dhcpfo.sendingserveripaddress",
|
|
|
|
FT_IPv4, BASE_NONE, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
|
2005-08-07 18:03:34 +00:00
|
|
|
{&hf_dhcpfo_addresses_transferred,
|
|
|
|
{"addresses transferred", "dhcpfo.addressestransferred",
|
|
|
|
FT_UINT32, BASE_DEC, NULL, 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
{&hf_dhcpfo_client_identifier,
|
|
|
|
{"Client Identifier", "dhcpfo.clientidentifier",
|
|
|
|
FT_STRING, BASE_NONE, NULL, 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{&hf_dhcpfo_client_hw_type,
|
|
|
|
{"Client Hardware Type", "dhcpfo.clienthardwaretype",
|
2012-10-14 15:27:52 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(arp_hrd_vals), 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }},
|
2004-08-09 01:53:26 +00:00
|
|
|
|
|
|
|
{&hf_dhcpfo_client_hardware_address,
|
|
|
|
{"Client Hardware Address", "dhcpfo.clienthardwareaddress",
|
2012-10-14 15:27:52 +00:00
|
|
|
FT_STRING, BASE_NONE, NULL, 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{&hf_dhcpfo_ftddns,
|
|
|
|
{"FTDDNS", "dhcpfo.ftddns",
|
|
|
|
FT_STRING, BASE_NONE, NULL, 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{&hf_dhcpfo_reject_reason,
|
|
|
|
{"Reject reason", "dhcpfo.rejectreason",
|
|
|
|
FT_UINT8, BASE_DEC, VALS(reject_reason_vals), 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{&hf_dhcpfo_message,
|
|
|
|
{"Message", "dhcpfo.message",
|
|
|
|
FT_STRING, BASE_NONE, NULL, 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
2005-08-07 20:06:01 +00:00
|
|
|
|
2004-08-09 01:53:26 +00:00
|
|
|
{&hf_dhcpfo_mclt,
|
|
|
|
{"MCLT", "dhcpfo.mclt",
|
|
|
|
FT_UINT32, BASE_DEC, NULL, 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{&hf_dhcpfo_vendor_class,
|
|
|
|
{"Vendor class", "dhcpfo.vendorclass",
|
|
|
|
FT_STRING, BASE_NONE, NULL, 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{&hf_dhcpfo_lease_expiration_time,
|
|
|
|
{"Lease expiration time", "dhcpfo.leaseexpirationtime",
|
2005-08-07 20:06:01 +00:00
|
|
|
FT_UINT32, BASE_DEC, NULL, 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{&hf_dhcpfo_grace_expiration_time,
|
|
|
|
{"Grace expiration time", "dhcpfo.graceexpirationtime",
|
2005-08-07 20:06:01 +00:00
|
|
|
FT_UINT32, BASE_DEC, NULL, 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{&hf_dhcpfo_potential_expiration_time,
|
|
|
|
{"Potential expiration time", "dhcpfo.potentialexpirationtime",
|
2005-08-07 20:06:01 +00:00
|
|
|
FT_UINT32, BASE_DEC, NULL, 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{&hf_dhcpfo_client_last_transaction_time,
|
|
|
|
{"Client last transaction time", "dhcpfo.clientlasttransactiontime",
|
2005-08-07 20:06:01 +00:00
|
|
|
FT_UINT32, BASE_DEC, NULL, 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
2005-08-07 20:06:01 +00:00
|
|
|
|
2004-08-09 01:53:26 +00:00
|
|
|
{&hf_dhcpfo_start_time_of_state,
|
|
|
|
{"Start time of state", "dhcpfo.starttimeofstate",
|
2005-08-07 20:06:01 +00:00
|
|
|
FT_UINT32, BASE_DEC, NULL, 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{&hf_dhcpfo_vendor_option,
|
|
|
|
{"Vendor option", "dhcpfo.vendoroption",
|
2005-08-07 20:06:01 +00:00
|
|
|
FT_NONE, BASE_NONE, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{&hf_dhcpfo_max_unacked_bndupd,
|
|
|
|
{"Max unacked BNDUPD", "dhcpfo.maxunackedbndupd",
|
2005-08-07 18:03:34 +00:00
|
|
|
FT_UINT32, BASE_DEC, NULL, 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{&hf_dhcpfo_protocol_version,
|
|
|
|
{"Protocol version", "dhcpfo.protocolversion",
|
|
|
|
FT_UINT8, BASE_DEC, NULL, 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{&hf_dhcpfo_receive_timer,
|
|
|
|
{"Receive timer", "dhcpfo.receivetimer",
|
2005-08-07 18:03:34 +00:00
|
|
|
FT_UINT32, BASE_DEC, NULL, 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{&hf_dhcpfo_message_digest,
|
|
|
|
{"Message digest", "dhcpfo.messagedigest",
|
|
|
|
FT_STRING, BASE_NONE, NULL, 0,
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{&hf_dhcpfo_hash_bucket_assignment,
|
|
|
|
{"Hash bucket assignment", "dhcpfo.hashbucketassignment",
|
From Kovarththanan Rajaratnam via bug 3548:
(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-06-18 21:30:42 +00:00
|
|
|
FT_BYTES, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }
|
2004-08-09 01:53:26 +00:00
|
|
|
},
|
2012-10-14 15:27:52 +00:00
|
|
|
|
|
|
|
{&hf_dhcpfo_message_digest_type,
|
|
|
|
{"Message digest type", "dhcpfo.message_digest_type",
|
|
|
|
FT_UINT8, BASE_DEC, VALS(message_digest_type_vals), 0,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
|
|
|
|
{&hf_dhcpfo_tls_request,
|
|
|
|
{"TLS Request", "dhcpfo.tls_request",
|
|
|
|
FT_UINT16, BASE_DEC, VALS(tls_request_vals), 0,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
|
|
|
|
{&hf_dhcpfo_serverflag,
|
|
|
|
{"Serverflag", "dhcpfo.serverflag",
|
|
|
|
FT_UINT8, BASE_DEC, VALS(serverflag_vals), 0,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
2004-08-09 01:53:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Setup protocol subtree array */
|
|
|
|
static gint *ett[] = {
|
|
|
|
&ett_dhcpfo,
|
|
|
|
&ett_fo_payload,
|
|
|
|
&ett_fo_option,
|
|
|
|
};
|
|
|
|
|
2013-06-08 02:06:24 +00:00
|
|
|
static ei_register_info ei[] = {
|
|
|
|
{ &ei_dhcpfo_bad_length, { "dhcpfo.bad_length", PI_PROTOCOL, PI_WARN, "Bad length", EXPFILL }},
|
|
|
|
{ &ei_dhcpfo_message_digest_type_not_allowed, { "dhcpfo.message_digest_type_not_allowed", PI_PROTOCOL, PI_WARN, "Message digest type not allowed", EXPFILL }},
|
|
|
|
};
|
|
|
|
|
2004-08-09 01:53:26 +00:00
|
|
|
module_t *dhcpfo_module;
|
2013-06-08 02:06:24 +00:00
|
|
|
expert_module_t* expert_dhcpfo;
|
2004-08-09 01:53:26 +00:00
|
|
|
|
|
|
|
/* Register the protocol name and description */
|
2004-08-09 02:41:41 +00:00
|
|
|
proto_dhcpfo = proto_register_protocol("DHCP Failover", "DHCPFO",
|
|
|
|
"dhcpfo");
|
2004-08-09 01:53:26 +00:00
|
|
|
|
|
|
|
/* Required function calls to register the header fields and subtrees used */
|
|
|
|
proto_register_field_array(proto_dhcpfo, hf, array_length(hf));
|
|
|
|
proto_register_subtree_array(ett, array_length(ett));
|
2013-06-08 02:06:24 +00:00
|
|
|
expert_dhcpfo = expert_register_protocol(proto_dhcpfo);
|
|
|
|
expert_register_field_array(expert_dhcpfo, ei, array_length(ei));
|
2004-08-09 01:53:26 +00:00
|
|
|
|
2004-08-09 02:41:41 +00:00
|
|
|
dhcpfo_module = prefs_register_protocol(proto_dhcpfo, proto_reg_handoff_dhcpfo);
|
|
|
|
prefs_register_uint_preference(dhcpfo_module, "tcp_port",
|
2004-08-09 03:07:50 +00:00
|
|
|
"DHCP failover TCP Port", "Set the port for DHCP failover communications",
|
2004-08-09 02:41:41 +00:00
|
|
|
10, &tcp_port_pref);
|
2005-08-07 20:06:01 +00:00
|
|
|
prefs_register_bool_preference(dhcpfo_module, "desegment",
|
|
|
|
"Reassemble DHCP failover messages spanning multiple TCP segments",
|
|
|
|
"Whether the DHCP failover dissector should reassemble messages spanning multiple TCP segments."
|
|
|
|
" To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
|
|
|
|
&dhcpfo_desegment);
|
2004-08-09 01:53:26 +00:00
|
|
|
}
|
2010-04-26 22:12:48 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
proto_reg_handoff_dhcpfo(void)
|
|
|
|
{
|
|
|
|
static gboolean initialized = FALSE;
|
|
|
|
static dissector_handle_t dhcpfo_handle;
|
|
|
|
static guint saved_tcp_port;
|
|
|
|
|
|
|
|
if (!initialized) {
|
2013-11-09 17:46:28 +00:00
|
|
|
dhcpfo_handle = new_create_dissector_handle(dissect_dhcpfo, proto_dhcpfo);
|
2010-04-26 22:12:48 +00:00
|
|
|
initialized = TRUE;
|
|
|
|
} else {
|
2010-12-20 05:35:29 +00:00
|
|
|
dissector_delete_uint("tcp.port", saved_tcp_port, dhcpfo_handle);
|
2010-04-26 22:12:48 +00:00
|
|
|
}
|
2010-12-20 05:35:29 +00:00
|
|
|
dissector_add_uint("tcp.port", tcp_port_pref, dhcpfo_handle);
|
2010-04-26 22:12:48 +00:00
|
|
|
saved_tcp_port = tcp_port_pref;
|
|
|
|
}
|
|
|
|
|
2014-09-30 20:59:17 +00:00
|
|
|
/*
|
|
|
|
* Editor modelines - http://www.wireshark.org/tools/modelines.html
|
|
|
|
*
|
|
|
|
* Local variables:
|
|
|
|
* c-basic-offset: 8
|
|
|
|
* tab-width: 8
|
|
|
|
* indent-tabs-mode: t
|
|
|
|
* End:
|
|
|
|
*
|
|
|
|
* vi: set shiftwidth=8 tabstop=8 noexpandtab:
|
|
|
|
* :indentSize=8:tabSize=8:noTabs=false:
|
|
|
|
*/
|