* RFC3315: DHCPv6
* supported DHCPv6 options:
* RFC3319,
- * draft-ietf-dhc-dhcpv6-opt-dnsconfig-04.txt,
- * draft-ietf-dhc-dhcpv6-opt-prefix-delegation-05.txt
- * draft-ietf-dhc-dhcpv6-opt-timeconfig-02.txt,
+ * RFC3633,
+ * RFC3646,
+ * draft-ietf-dhc-dhcpv6-opt-timeconfig-03.txt,
+ * draft-ietf-dhc-lifetime-00.txt,
*/
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-dhcp6.c,v 1.27.2.4 2003-11-18 23:26:14 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-dhcp6.c,v 1.27.2.5 2004-06-16 00:16:48 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
#define DH6OPT_SIP_SERVER_A 22
#define DH6OPT_DNS 23
#define DH6OPT_DNSNAME 24
+#define DH6OPT_IA_PD 25
+#define DH6OPT_IA_PD_PREFIX 26
/*
- * The option type has not been assigned for the following options.
- * We temporarily adopt values used in the service specification document
+ * The old prefix delegation option used in the service specification document
* (200206xx version) by NTT Communications.
- * Note that we'll change the following definitions if different type values
- * are officially assigned.
*/
#define DH6OPT_PREFIX_DELEGATION 30
#define DH6OPT_PREFIX_INFORMATION 31
#define DH6OPT_PREFIX_REQUEST 32
/*
- * The followings are also unassigned numbers.
- * We temporarily use values as of KAME snap 20031013.
+ * The following one is an unassigned number.
+ * We temporarily use values as of KAME snap 20040322.
*/
-#define DH6OPT_IA_PD 33
-#define DH6OPT_IA_PD_PREFIX 34
#define DH6OPT_NTP_SERVERS 35
+#define DH6OPT_LIFETIME 36
struct dhcp6opt {
u_int16_t dh6opt_type;
return "elapsed time";
case DH6OPT_RELAY_MSG:
return "relay message";
+ case DH6OPT_AUTH:
+ return "authentication";
+ case DH6OPT_UNICAST:
+ return "server unicast";
case DH6OPT_STATUS_CODE:
return "status code";
case DH6OPT_RAPID_COMMIT:
return "rapid commit";
+ case DH6OPT_USER_CLASS:
+ return "user class";
+ case DH6OPT_VENDOR_CLASS:
+ return "vendor class";
+ case DH6OPT_VENDOR_OPTS:
+ return "vendor-specific info";
case DH6OPT_INTERFACE_ID:
return "interface ID";
case DH6OPT_RECONF_MSG:
case DH6OPT_RECONF_ACCEPT:
return "reconfigure accept";
case DH6OPT_SIP_SERVER_D:
- return "SIP Servers Domain";
+ return "SIP servers domain";
case DH6OPT_SIP_SERVER_A:
- return "SIP Servers Address";
+ return "SIP servers address";
case DH6OPT_DNS:
return "DNS";
+ case DH6OPT_DNSNAME:
+ return "DNS name";
case DH6OPT_PREFIX_DELEGATION:
return "prefix delegation";
case DH6OPT_PREFIX_INFORMATION:
return "IA_PD prefix";
case DH6OPT_NTP_SERVERS:
return "NTP Server";
+ case DH6OPT_LIFETIME:
+ return "lifetime";
default:
snprintf(genstr, sizeof(genstr), "opt_%d", type);
return(genstr);
}
printf(")");
break;
+ case DH6OPT_LIFETIME:
+ if (optlen != 4) {
+ printf(" ?)");
+ break;
+ }
+ memcpy(&val32, dh6o + 1, sizeof(val32));
+ val32 = ntohl(val32);
+ printf(" %d)", (int)val32);
+ break;
default:
printf(")");
break;