From: Guy (Core OS) Harris Date: Wed, 3 Jun 2009 20:58:27 +0000 (-0700) Subject: From Francois-Xavier Le Bail: use hyphens, rather than spaces, in DHCPv6 X-Git-Tag: tcpdump-4.1.0~109 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/7e6045579a1a6fc9c9ba6479ac97a50739e2ef21?ds=inline From Francois-Xavier Le Bail: use hyphens, rather than spaces, in DHCPv6 option names, so that the "-v" display, which prints options separated by spaces, isn't ambiguous. (The BOOTP dissector has hyphens in the BOOTP/DHCP option names.) --- diff --git a/print-dhcp6.c b/print-dhcp6.c index 4ba6728c..26855ccb 100644 --- a/print-dhcp6.c +++ b/print-dhcp6.c @@ -183,13 +183,13 @@ dhcp6opt_name(int type) static char genstr[sizeof("opt_65535") + 1]; /* XXX thread unsafe */ if (type > 65535) - return "INVALID option"; + return "INVALID-option"; switch(type) { case DH6OPT_CLIENTID: - return "client ID"; + return "client-ID"; case DH6OPT_SERVERID: - return "server ID"; + return "server-ID"; case DH6OPT_IA_NA: return "IA_NA"; case DH6OPT_IA_TA: @@ -197,87 +197,87 @@ dhcp6opt_name(int type) case DH6OPT_IA_ADDR: return "IA_ADDR"; case DH6OPT_ORO: - return "option request"; + return "option-request"; case DH6OPT_PREFERENCE: return "preference"; case DH6OPT_ELAPSED_TIME: - return "elapsed time"; + return "elapsed-time"; case DH6OPT_RELAY_MSG: - return "relay message"; + return "relay-message"; case DH6OPT_AUTH: return "authentication"; case DH6OPT_UNICAST: - return "server unicast"; + return "server-unicast"; case DH6OPT_STATUS_CODE: - return "status code"; + return "status-code"; case DH6OPT_RAPID_COMMIT: - return "rapid commit"; + return "rapid-commit"; case DH6OPT_USER_CLASS: - return "user class"; + return "user-class"; case DH6OPT_VENDOR_CLASS: - return "vendor class"; + return "vendor-class"; case DH6OPT_VENDOR_OPTS: - return "vendor-specific info"; + return "vendor-specific-info"; case DH6OPT_INTERFACE_ID: - return "interface ID"; + return "interface-ID"; case DH6OPT_RECONF_MSG: - return "reconfigure message"; + return "reconfigure-message"; case DH6OPT_RECONF_ACCEPT: - return "reconfigure 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"; + return "DNS-name"; case DH6OPT_IA_PD: return "IA_PD"; case DH6OPT_IA_PD_PREFIX: - return "IA_PD prefix"; + return "IA_PD-prefix"; case DH6OPT_NTP_SERVERS: - return "NTP Server"; + return "NTP-Server"; case DH6OPT_LIFETIME: return "lifetime"; case DH6OPT_NIS_SERVERS: - return "NIS server"; + return "NIS-server"; case DH6OPT_NISP_SERVERS: - return "NIS+ server"; + return "NIS+-server"; case DH6OPT_NIS_NAME: - return "NIS domain name"; + return "NIS-domain-name"; case DH6OPT_NISP_NAME: - return "NIS+ domain name"; + return "NIS+-domain-name"; case DH6OPT_BCMCS_SERVER_D: - return "BCMCS domain name"; + return "BCMCS-domain-name"; case DH6OPT_BCMCS_SERVER_A: - return "BCMCS server"; + return "BCMCS-server"; case DH6OPT_GEOCONF_CIVIC: - return "Geoconf Civic"; + return "Geoconf-Civic"; case DH6OPT_REMOTE_ID: - return "Remote ID"; + return "Remote-ID"; case DH6OPT_SUBSCRIBER_ID: - return "Subscriber ID"; + return "Subscriber-ID"; case DH6OPT_CLIENT_FQDN: - return "Client FQDN"; + return "Client-FQDN"; case DH6OPT_PANA_AGENT: - return "PANA agent"; + return "PANA-agent"; case DH6OPT_NEW_POSIX_TIMEZONE: - return "POSIX timezone"; + return "POSIX-timezone"; case DH6OPT_NEW_TZDB_TIMEZONE: - return "POSIX tz database"; + return "POSIX-tz-database"; case DH6OPT_ERO: - return "Echo request option"; + return "Echo-request-option"; case DH6OPT_LQ_QUERY: - return "Lease query"; + return "Lease-query"; case DH6OPT_CLIENT_DATA: - return "LQ client data"; + return "LQ-client-data"; case DH6OPT_CLT_TIME: - return "Clt time"; + return "Clt-time"; case DH6OPT_LQ_RELAY_DATA: - return "LQ relay data"; + return "LQ-relay-data"; case DH6OPT_LQ_CLIENT_LINK: - return "LQ client link"; + return "LQ-client-link"; default: snprintf(genstr, sizeof(genstr), "opt_%d", type); return(genstr);