summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/option_types.go
diff options
context:
space:
mode:
Diffstat (limited to 'dhcpv6/option_types.go')
-rw-r--r--dhcpv6/option_types.go287
1 files changed, 144 insertions, 143 deletions
diff --git a/dhcpv6/option_types.go b/dhcpv6/option_types.go
index 946dcd0..6a852ad 100644
--- a/dhcpv6/option_types.go
+++ b/dhcpv6/option_types.go
@@ -1,152 +1,153 @@
package dhcpv6
-// FIXME: rename all the options to have a consistent name, e.g. OPT_<NAME>
+// All DHCPv6 options.
const (
- OPTION_CLIENTID OptionCode = 1
- OPTION_SERVERID OptionCode = 2
- OPTION_IA_NA OptionCode = 3
- OPTION_IA_TA OptionCode = 4
- OPTION_IAADDR OptionCode = 5
- OPTION_ORO OptionCode = 6
- OPTION_PREFERENCE OptionCode = 7
- OPTION_ELAPSED_TIME OptionCode = 8
- OPTION_RELAY_MSG OptionCode = 9
+ OptionClientID OptionCode = 1
+ OptionServerID OptionCode = 2
+ OptionIANA OptionCode = 3
+ OptionIATA OptionCode = 4
+ OptionIAAddr OptionCode = 5
+ OptionORO OptionCode = 6
+ OptionPreference OptionCode = 7
+ OptionElapsedTime OptionCode = 8
+ OptionRelayMsg OptionCode = 9
// skip 10
- OPTION_AUTH OptionCode = 11
- OPTION_UNICAST OptionCode = 12
- OPTION_STATUS_CODE OptionCode = 13
- OPTION_RAPID_COMMIT OptionCode = 14
- OPTION_USER_CLASS OptionCode = 15
- OPTION_VENDOR_CLASS OptionCode = 16
- OPTION_VENDOR_OPTS OptionCode = 17
- OPTION_INTERFACE_ID OptionCode = 18
- OPTION_RECONF_MSG OptionCode = 19
- OPTION_RECONF_ACCEPT OptionCode = 20
- SIP_SERVERS_DOMAIN_NAME_LIST OptionCode = 21
- SIP_SERVERS_IPV6_ADDRESS_LIST OptionCode = 22
- DNS_RECURSIVE_NAME_SERVER OptionCode = 23
- DOMAIN_SEARCH_LIST OptionCode = 24
- OPTION_IA_PD OptionCode = 25
- OPTION_IAPREFIX OptionCode = 26
- OPTION_NIS_SERVERS OptionCode = 27
- OPTION_NISP_SERVERS OptionCode = 28
- OPTION_NIS_DOMAIN_NAME OptionCode = 29
- OPTION_NISP_DOMAIN_NAME OptionCode = 30
- SNTP_SERVER_LIST OptionCode = 31
- INFORMATION_REFRESH_TIME OptionCode = 32
- BCMCS_CONTROLLER_DOMAIN_NAME_LIST OptionCode = 33
- BCMCS_CONTROLLER_IPV6_ADDRESS_LIST OptionCode = 34
+ OptionAuth OptionCode = 11
+ OptionUnicast OptionCode = 12
+ OptionStatusCode OptionCode = 13
+ OptionRapidCommit OptionCode = 14
+ OptionUserClass OptionCode = 15
+ OptionVendorClass OptionCode = 16
+ OptionVendorOpts OptionCode = 17
+ OptionInterfaceID OptionCode = 18
+ OptionReconfMessage OptionCode = 19
+ OptionReconfAccept OptionCode = 20
+ OptionSIPServersDomainNameList OptionCode = 21
+ OptionSIPServersIPv6AddressList OptionCode = 22
+ OptionDNSRecursiveNameServer OptionCode = 23
+ OptionDomainSearchList OptionCode = 24
+ OptionIAPD OptionCode = 25
+ OptionIAPrefix OptionCode = 26
+ OptionNISServers OptionCode = 27
+ OptionNISPServers OptionCode = 28
+ OptionNISDomainName OptionCode = 29
+ OptionNISPDomainName OptionCode = 30
+ OptionSNTPServerList OptionCode = 31
+ OptionInformationRefreshTime OptionCode = 32
+ OptionBCMCSControllerDomainNameList OptionCode = 33
+ OptionBCMCSControllerIPv6AddressList OptionCode = 34
// skip 35
- OPTION_GEOCONF_CIVIC OptionCode = 36
- OPTION_REMOTE_ID OptionCode = 37
- RELAY_AGENT_SUBSCRIBER_ID OptionCode = 38
- FQDN OptionCode = 39
- PANA_AUTHENTICATION_AGENT OptionCode = 40
- OPTION_NEW_POSIX_TIMEZONE OptionCode = 41
- OPTION_NEW_TZDB_TIMEZONE OptionCode = 42
- ECHO_REQUEST OptionCode = 43
- OPTION_LQ_QUERY OptionCode = 44
- OPTION_CLIENT_DATA OptionCode = 45
- OPTION_CLT_TIME OptionCode = 46
- OPTION_LQ_RELAY_DATA OptionCode = 47
- OPTION_LQ_CLIENT_LINK OptionCode = 48
- MIPV6_HOME_NETWORK_ID_FQDN OptionCode = 49
- MIPV6_VISITED_HOME_NETWORK_INFORMATION OptionCode = 50
- LOST_SERVER OptionCode = 51
- CAPWAP_ACCESS_CONTROLLER_ADDRESSES OptionCode = 52
- RELAY_ID OptionCode = 53
- OPTION_IPV6_ADDRESS_MOS OptionCode = 54
- OPTION_IPV6_FQDN_MOS OptionCode = 55
- OPTION_NTP_SERVER OptionCode = 56
- OPTION_V6_ACCESS_DOMAIN OptionCode = 57
- OPTION_SIP_UA_CS_LIST OptionCode = 58
- OPT_BOOTFILE_URL OptionCode = 59
- OPT_BOOTFILE_PARAM OptionCode = 60
- OPTION_CLIENT_ARCH_TYPE OptionCode = 61
- OPTION_NII OptionCode = 62
- OPTION_GEOLOCATION OptionCode = 63
- OPTION_AFTR_NAME OptionCode = 64
- OPTION_ERP_LOCAL_DOMAIN_NAME OptionCode = 65
- OPTION_RSOO OptionCode = 66
- OPTION_PD_EXCLUDE OptionCode = 67
- VIRTUAL_SUBNET_SELECTION OptionCode = 68
- MIPV6_IDENTIFIED_HOME_NETWORK_INFORMATION OptionCode = 69
- MIPV6_UNRESTRICTED_HOME_NETWORK_INFORMATION OptionCode = 70
- MIPV6_HOME_NETWORK_PREFIX OptionCode = 71
- MIPV6_HOME_AGENT_ADDRESS OptionCode = 72
- MIPV6_HOME_AGENT_FQDN OptionCode = 73
+ OptionGeoConfCivic OptionCode = 36
+ OptionRemoteID OptionCode = 37
+ OptionRelayAgentSubscriberID OptionCode = 38
+ OptionFQDN OptionCode = 39
+ OptionPANAAuthenticationAgent OptionCode = 40
+ OptionNewPOSIXTimezone OptionCode = 41
+ OptionNewTZDBTimezone OptionCode = 42
+ OptionEchoRequest OptionCode = 43
+ OptionLQQuery OptionCode = 44
+ OptionClientData OptionCode = 45
+ OptionCLTTime OptionCode = 46
+ OptionLQRelayData OptionCode = 47
+ OptionLQClientLink OptionCode = 48
+ OptionMIPv6HomeNetworkIDFQDN OptionCode = 49
+ OptionMIPv6VisitedHomeNetworkInformation OptionCode = 50
+ OptionLoSTServer OptionCode = 51
+ OptionCAPWAPAccessControllerAddresses OptionCode = 52
+ OptionRelayID OptionCode = 53
+ OptionIPv6AddressMOS OptionCode = 54
+ OptionIPv6FQDNMOS OptionCode = 55
+ OptionNTPServer OptionCode = 56
+ OptionV6AccessDomain OptionCode = 57
+ OptionSIPUACSList OptionCode = 58
+ OptionBootfileURL OptionCode = 59
+ OptionBootfileParam OptionCode = 60
+ OptionClientArchType OptionCode = 61
+ OptionNII OptionCode = 62
+ OptionGeolocation OptionCode = 63
+ OptionAFTRName OptionCode = 64
+ OptionERPLocalDomainName OptionCode = 65
+ OptionRSOO OptionCode = 66
+ OptionPDExclude OptionCode = 67
+ OptionVirtualSubnetSelection OptionCode = 68
+ OptionMIPv6IdentifiedHomeNetworkInformation OptionCode = 69
+ OptionMIPv6UnrestrictedHomeNetworkInformation OptionCode = 70
+ OptionMIPv6HomeNetworkPrefix OptionCode = 71
+ OptionMIPv6HomeAgentAddress OptionCode = 72
+ OptionMIPv6HomeAgentFQDN OptionCode = 73
)
+// OptionCodeToString maps DHCPv6 OptionCodes to human-readable strings.
var OptionCodeToString = map[OptionCode]string{
- OPTION_CLIENTID: "OPTION_CLIENTID",
- OPTION_SERVERID: "OPTION_SERVERID",
- OPTION_IA_NA: "OPTION_IA_NA",
- OPTION_IA_TA: "OPTION_IA_TA",
- OPTION_IAADDR: "OPTION_IAADDR",
- OPTION_ORO: "OPTION_ORO",
- OPTION_PREFERENCE: "OPTION_PREFERENCE",
- OPTION_ELAPSED_TIME: "OPTION_ELAPSED_TIME",
- OPTION_RELAY_MSG: "OPTION_RELAY_MSG",
- OPTION_AUTH: "OPTION_AUTH",
- OPTION_UNICAST: "OPTION_UNICAST",
- OPTION_STATUS_CODE: "OPTION_STATUS_CODE",
- OPTION_RAPID_COMMIT: "OPTION_RAPID_COMMIT",
- OPTION_USER_CLASS: "OPTION_USER_CLASS",
- OPTION_VENDOR_CLASS: "OPTION_VENDOR_CLASS",
- OPTION_VENDOR_OPTS: "OPTION_VENDOR_OPTS",
- OPTION_INTERFACE_ID: "OPTION_INTERFACE_ID",
- OPTION_RECONF_MSG: "OPTION_RECONF_MSG",
- OPTION_RECONF_ACCEPT: "OPTION_RECONF_ACCEPT",
- SIP_SERVERS_DOMAIN_NAME_LIST: "SIP Servers Domain Name List",
- SIP_SERVERS_IPV6_ADDRESS_LIST: "SIP Servers IPv6 Address List",
- DNS_RECURSIVE_NAME_SERVER: "DNS Recursive Name Server",
- DOMAIN_SEARCH_LIST: "Domain Search List",
- OPTION_IA_PD: "OPTION_IA_PD",
- OPTION_IAPREFIX: "OPTION_IAPREFIX",
- OPTION_NIS_SERVERS: "OPTION_NIS_SERVERS",
- OPTION_NISP_SERVERS: "OPTION_NISP_SERVERS",
- OPTION_NIS_DOMAIN_NAME: "OPTION_NIS_DOMAIN_NAME",
- OPTION_NISP_DOMAIN_NAME: "OPTION_NISP_DOMAIN_NAME",
- SNTP_SERVER_LIST: "SNTP Server List",
- INFORMATION_REFRESH_TIME: "Information Refresh Time",
- BCMCS_CONTROLLER_DOMAIN_NAME_LIST: "BCMCS Controller Domain Name List",
- BCMCS_CONTROLLER_IPV6_ADDRESS_LIST: "BCMCS Controller IPv6 Address List",
- OPTION_GEOCONF_CIVIC: "OPTION_GEOCONF",
- OPTION_REMOTE_ID: "OPTION_REMOTE_ID",
- RELAY_AGENT_SUBSCRIBER_ID: "Relay-Agent Subscriber ID",
- FQDN: "FQDN",
- PANA_AUTHENTICATION_AGENT: "PANA Authentication Agent",
- OPTION_NEW_POSIX_TIMEZONE: "OPTION_NEW_POSIX_TIME_ZONE",
- OPTION_NEW_TZDB_TIMEZONE: "OPTION_NEW_TZDB_TIMEZONE",
- ECHO_REQUEST: "Echo Request",
- OPTION_LQ_QUERY: "OPTION_LQ_QUERY",
- OPTION_CLIENT_DATA: "OPTION_CLIENT_DATA",
- OPTION_CLT_TIME: "OPTION_CLT_TIME",
- OPTION_LQ_RELAY_DATA: "OPTION_LQ_RELAY_DATA",
- OPTION_LQ_CLIENT_LINK: "OPTION_LQ_CLIENT_LINK",
- MIPV6_HOME_NETWORK_ID_FQDN: "MIPv6 Home Network ID FQDN",
- MIPV6_VISITED_HOME_NETWORK_INFORMATION: "MIPv6 Visited Home Network Information",
- LOST_SERVER: "LoST Server",
- CAPWAP_ACCESS_CONTROLLER_ADDRESSES: "CAPWAP Access Controller Addresses",
- RELAY_ID: "RELAY_ID",
- OPTION_IPV6_ADDRESS_MOS: "OPTION-IPv6_Address-MoS",
- OPTION_IPV6_FQDN_MOS: "OPTION-IPv6-FQDN-MoS",
- OPTION_NTP_SERVER: "OPTION_NTP_SERVER",
- OPTION_V6_ACCESS_DOMAIN: "OPTION_V6_ACCESS_DOMAIN",
- OPTION_SIP_UA_CS_LIST: "OPTION_SIP_UA_CS_LIST",
- OPT_BOOTFILE_URL: "OPT_BOOTFILE_URL",
- OPT_BOOTFILE_PARAM: "OPT_BOOTFILE_PARAM",
- OPTION_CLIENT_ARCH_TYPE: "OPTION_CLIENT_ARCH_TYPE",
- OPTION_NII: "OPTION_NII",
- OPTION_GEOLOCATION: "OPTION_GEOLOCATION",
- OPTION_AFTR_NAME: "OPTION_AFTR_NAME",
- OPTION_ERP_LOCAL_DOMAIN_NAME: "OPTION_ERP_LOCAL_DOMAIN_NAME",
- OPTION_RSOO: "OPTION_RSOO",
- OPTION_PD_EXCLUDE: "OPTION_PD_EXCLUDE",
- VIRTUAL_SUBNET_SELECTION: "Virtual Subnet Selection",
- MIPV6_IDENTIFIED_HOME_NETWORK_INFORMATION: "MIPv6 Identified Home Network Information",
- MIPV6_UNRESTRICTED_HOME_NETWORK_INFORMATION: "MIPv6 Unrestricted Home Network Information",
- MIPV6_HOME_NETWORK_PREFIX: "MIPv6 Home Network Prefix",
- MIPV6_HOME_AGENT_ADDRESS: "MIPv6 Home Agent Address",
- MIPV6_HOME_AGENT_FQDN: "MIPv6 Home Agent FQDN",
+ OptionClientID: "OPTION_CLIENTID",
+ OptionServerID: "OPTION_SERVERID",
+ OptionIANA: "OPTION_IA_NA",
+ OptionIATA: "OPTION_IA_TA",
+ OptionIAAddr: "OPTION_IAADDR",
+ OptionORO: "OPTION_ORO",
+ OptionPreference: "OPTION_PREFERENCE",
+ OptionElapsedTime: "OPTION_ELAPSED_TIME",
+ OptionRelayMsg: "OPTION_RELAY_MSG",
+ OptionAuth: "OPTION_AUTH",
+ OptionUnicast: "OPTION_UNICAST",
+ OptionStatusCode: "OPTION_STATUS_CODE",
+ OptionRapidCommit: "OPTION_RAPID_COMMIT",
+ OptionUserClass: "OPTION_USER_CLASS",
+ OptionVendorClass: "OPTION_VENDOR_CLASS",
+ OptionVendorOpts: "OPTION_VENDOR_OPTS",
+ OptionInterfaceID: "OPTION_INTERFACE_ID",
+ OptionReconfMessage: "OPTION_RECONF_MSG",
+ OptionReconfAccept: "OPTION_RECONF_ACCEPT",
+ OptionSIPServersDomainNameList: "SIP Servers Domain Name List",
+ OptionSIPServersIPv6AddressList: "SIP Servers IPv6 Address List",
+ OptionDNSRecursiveNameServer: "DNS Recursive Name Server",
+ OptionDomainSearchList: "Domain Search List",
+ OptionIAPD: "OPTION_IA_PD",
+ OptionIAPrefix: "OPTION_IAPREFIX",
+ OptionNISServers: "OPTION_NIS_SERVERS",
+ OptionNISPServers: "OPTION_NISP_SERVERS",
+ OptionNISDomainName: "OPTION_NIS_DOMAIN_NAME",
+ OptionNISPDomainName: "OPTION_NISP_DOMAIN_NAME",
+ OptionSNTPServerList: "SNTP Server List",
+ OptionInformationRefreshTime: "Information Refresh Time",
+ OptionBCMCSControllerDomainNameList: "BCMCS Controller Domain Name List",
+ OptionBCMCSControllerIPv6AddressList: "BCMCS Controller IPv6 Address List",
+ OptionGeoConfCivic: "OPTION_GEOCONF",
+ OptionRemoteID: "OPTION_REMOTE_ID",
+ OptionRelayAgentSubscriberID: "Relay-Agent Subscriber ID",
+ OptionFQDN: "FQDN",
+ OptionPANAAuthenticationAgent: "PANA Authentication Agent",
+ OptionNewPOSIXTimezone: "OPTION_NEW_POSIX_TIME_ZONE",
+ OptionNewTZDBTimezone: "OPTION_NEW_TZDB_TIMEZONE",
+ OptionEchoRequest: "Echo Request",
+ OptionLQQuery: "OPTION_LQ_QUERY",
+ OptionClientData: "OPTION_CLIENT_DATA",
+ OptionCLTTime: "OPTION_CLT_TIME",
+ OptionLQRelayData: "OPTION_LQ_RELAY_DATA",
+ OptionLQClientLink: "OPTION_LQ_CLIENT_LINK",
+ OptionMIPv6HomeNetworkIDFQDN: "MIPv6 Home Network ID FQDN",
+ OptionMIPv6VisitedHomeNetworkInformation: "MIPv6 Visited Home Network Information",
+ OptionLoSTServer: "LoST Server",
+ OptionCAPWAPAccessControllerAddresses: "CAPWAP Access Controller Addresses",
+ OptionRelayID: "RELAY_ID",
+ OptionIPv6AddressMOS: "OPTION-IPv6_Address-MoS",
+ OptionIPv6FQDNMOS: "OPTION-IPv6-FQDN-MoS",
+ OptionNTPServer: "OPTION_NTP_SERVER",
+ OptionV6AccessDomain: "OPTION_V6_ACCESS_DOMAIN",
+ OptionSIPUACSList: "OPTION_SIP_UA_CS_LIST",
+ OptionBootfileURL: "OPT_BOOTFILE_URL",
+ OptionBootfileParam: "OPT_BOOTFILE_PARAM",
+ OptionClientArchType: "OPTION_CLIENT_ARCH_TYPE",
+ OptionNII: "OPTION_NII",
+ OptionGeolocation: "OPTION_GEOLOCATION",
+ OptionAFTRName: "OPTION_AFTR_NAME",
+ OptionERPLocalDomainName: "OPTION_ERP_LOCAL_DOMAIN_NAME",
+ OptionRSOO: "OPTION_RSOO",
+ OptionPDExclude: "OPTION_PD_EXCLUDE",
+ OptionVirtualSubnetSelection: "Virtual Subnet Selection",
+ OptionMIPv6IdentifiedHomeNetworkInformation: "MIPv6 Identified Home Network Information",
+ OptionMIPv6UnrestrictedHomeNetworkInformation: "MIPv6 Unrestricted Home Network Information",
+ OptionMIPv6HomeNetworkPrefix: "MIPv6 Home Network Prefix",
+ OptionMIPv6HomeAgentAddress: "MIPv6 Home Agent Address",
+ OptionMIPv6HomeAgentFQDN: "MIPv6 Home Agent FQDN",
}