From 76effcaaee6ea13f0fcd9d8646af9a4d3910ee38 Mon Sep 17 00:00:00 2001 From: Karsten Weiss Date: Fri, 12 Oct 2018 10:54:11 +0200 Subject: statuscodes: Add RFC 5007/5460/7653/8156 status codes --- iana/statuscodes.go | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/iana/statuscodes.go b/iana/statuscodes.go index aa18433..d3ca410 100644 --- a/iana/statuscodes.go +++ b/iana/statuscodes.go @@ -1,10 +1,14 @@ package iana +// IANA Status Codes for DHCPv6 +// https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#dhcpv6-parameters-5 + // StatusCode represents a IANA status code for DHCPv6 type StatusCode uint16 -// IANA status codes as defined by rfc 3315 par. 24..4 +// IANA status codes const ( + // RFC 3315 par. 24..4 StatusSuccess StatusCode = 0 StatusUnspecFail StatusCode = 1 StatusNoAddrsAvail StatusCode = 2 @@ -12,6 +16,26 @@ const ( StatusNotOnLink StatusCode = 4 StatusUseMulticast StatusCode = 5 StatusNoPrefixAvail StatusCode = 6 + // RFC 5007 + StatusUnknownQueryType StatusCode = 7 + StatusMalformedQuery StatusCode = 8 + StatusNotConfigured StatusCode = 9 + StatusNotAllowed StatusCode = 10 + // RFC 5460 + StatusQueryTerminated StatusCode = 11 + // RFC 7653 + StatusDataMissing StatusCode = 12 + StatusCatchUpComplete StatusCode = 13 + StatusNotSupported StatusCode = 14 + StatusTLSConnectionRefused StatusCode = 15 + // RFC 8156 + StatusAddressInUse StatusCode = 16 + StatusConfigurationConflict StatusCode = 17 + StatusMissingBindingInformation StatusCode = 18 + StatusOutdatedBindingInformation StatusCode = 19 + StatusServerShuttingDown StatusCode = 20 + StatusDNSUpdateNotSupported StatusCode = 21 + StatusExcessiveTimeSkew StatusCode = 22 ) // StatusCodeToString returns a mnemonic name for a given status code @@ -31,4 +55,24 @@ var StatusCodeToStringMap = map[StatusCode]string{ StatusNotOnLink: "NotOnLink", StatusUseMulticast: "UseMulticast", StatusNoPrefixAvail: "NoPrefixAvail", + // RFC 5007 + StatusUnknownQueryType: "UnknownQueryType", + StatusMalformedQuery: "MalformedQuery", + StatusNotConfigured: "NotConfigured", + StatusNotAllowed: "NotAllowed", + // RFC 5460 + StatusQueryTerminated: "QueryTerminated", + // RFC 7653 + StatusDataMissing: "DataMissing", + StatusCatchUpComplete: "CatchUpComplete", + StatusNotSupported: "NotSupported", + StatusTLSConnectionRefused: "TLSConnectionRefused", + // RFC 8156 + StatusAddressInUse: "AddressInUse", + StatusConfigurationConflict: "ConfigurationConflict", + StatusMissingBindingInformation: "MissingBindingInformation", + StatusOutdatedBindingInformation: "OutdatedBindingInformation", + StatusServerShuttingDown: "ServerShuttingDown", + StatusDNSUpdateNotSupported: "DNSUpdateNotSupported", + StatusExcessiveTimeSkew: "ExcessiveTimeSkew", } -- cgit v1.2.3