1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-10 01:17:44 +03:00
Susant Sahani 2020-04-13 12:17:22 +02:00 committed by Lennart Poettering
parent daf8f72b4e
commit 76643fedc8
2 changed files with 51 additions and 15 deletions

View File

@ -82,6 +82,10 @@ enum {
DHCP6_NTP_SUBOPTION_SRV_FQDN = 3, DHCP6_NTP_SUBOPTION_SRV_FQDN = 3,
}; };
/*
* RFC 8415, RFC 5007 and RFC 7653 status codes:
* https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#dhcpv6-parameters-5
*/
enum { enum {
DHCP6_STATUS_SUCCESS = 0, DHCP6_STATUS_SUCCESS = 0,
DHCP6_STATUS_UNSPEC_FAIL = 1, DHCP6_STATUS_UNSPEC_FAIL = 1,
@ -90,7 +94,23 @@ enum {
DHCP6_STATUS_NOT_ON_LINK = 4, DHCP6_STATUS_NOT_ON_LINK = 4,
DHCP6_STATUS_USE_MULTICAST = 5, DHCP6_STATUS_USE_MULTICAST = 5,
DHCP6_STATUS_NO_PREFIX_AVAIL = 6, DHCP6_STATUS_NO_PREFIX_AVAIL = 6,
_DHCP6_STATUS_MAX = 7, DHCP6_STATUS_UNKNOWN_QUERY_TYPE = 7,
DHCP6_STATUS_MALFORMED_QUERY = 8,
DHCP6_STATUS_NOT_CONFIGURED = 9,
DHCP6_STATUS_NOT_ALLOWED = 10,
DHCP6_STATUS_QUERY_TERMINATED = 11,
DHCP6_STATUS_DATA_MISSING = 12,
DHCP6_STATUS_CATCHUP_COMPLETE = 13,
DHCP6_STATUS_NOT_SUPPORTED = 14,
DHCP6_STATUS_TLS_CONNECTION_REFUSED = 15,
DHCP6_STATUS_ADDRESS_IN_USE = 16,
DHCP6_STATUS_CONFIGURATION_CONFLICT = 17,
DHCP6_STATUS_MISSING_BINDING_INFORMATION = 18,
DHCP6_STATUS_OUTDATED_BINDING_INFORMATION = 19,
DHCP6_STATUS_SERVER_SHUTTING_DOWN = 20,
DHCP6_STATUS_DNS_UPDATE_NOT_SUPPORTED = 21,
DHCP6_STATUS_EXCESSIVE_TIME_SKEW = 22,
_DHCP6_STATUS_MAX = 23,
}; };
enum { enum {

View File

@ -113,6 +113,22 @@ const char * dhcp6_message_status_table[_DHCP6_STATUS_MAX] = {
[DHCP6_STATUS_NOT_ON_LINK] = "Not on link", [DHCP6_STATUS_NOT_ON_LINK] = "Not on link",
[DHCP6_STATUS_USE_MULTICAST] = "Use multicast", [DHCP6_STATUS_USE_MULTICAST] = "Use multicast",
[DHCP6_STATUS_NO_PREFIX_AVAIL] = "No prefix available", [DHCP6_STATUS_NO_PREFIX_AVAIL] = "No prefix available",
[DHCP6_STATUS_UNKNOWN_QUERY_TYPE] = "Unknown query type",
[DHCP6_STATUS_MALFORMED_QUERY] = "Malformed query",
[DHCP6_STATUS_NOT_CONFIGURED] = "Not configured",
[DHCP6_STATUS_NOT_ALLOWED] = "Not allowed",
[DHCP6_STATUS_QUERY_TERMINATED] = "Query terminated",
[DHCP6_STATUS_DATA_MISSING] = "Data missing",
[DHCP6_STATUS_CATCHUP_COMPLETE] = "Catch up complete",
[DHCP6_STATUS_NOT_SUPPORTED] = "Not supported",
[DHCP6_STATUS_TLS_CONNECTION_REFUSED] = "TLS connection refused",
[DHCP6_STATUS_ADDRESS_IN_USE] = "Address in use",
[DHCP6_STATUS_CONFIGURATION_CONFLICT] = "Configuration conflict",
[DHCP6_STATUS_MISSING_BINDING_INFORMATION] = "Missing binding information",
[DHCP6_STATUS_OUTDATED_BINDING_INFORMATION] = "Outdated binding information",
[DHCP6_STATUS_SERVER_SHUTTING_DOWN] = "Server shutting down",
[DHCP6_STATUS_DNS_UPDATE_NOT_SUPPORTED] = "DNS update not supported",
[DHCP6_STATUS_EXCESSIVE_TIME_SKEW] = "Excessive time skew",
}; };
DEFINE_STRING_TABLE_LOOKUP(dhcp6_message_status, int); DEFINE_STRING_TABLE_LOOKUP(dhcp6_message_status, int);