summaryrefslogtreecommitdiffhomepage
path: root/iana
diff options
context:
space:
mode:
authorKarsten Weiss <knweiss@gmail.com>2018-10-12 10:54:11 +0200
committerKarsten Weiss <knweiss@gmail.com>2018-10-12 10:55:18 +0200
commit76effcaaee6ea13f0fcd9d8646af9a4d3910ee38 (patch)
treef7dd9a11bd463f849d8717f0e5b7b8957ff9e59d /iana
parentdc01165c86340093eacf62c0856ae4e2164a4845 (diff)
statuscodes: Add RFC 5007/5460/7653/8156 status codes
Diffstat (limited to 'iana')
-rw-r--r--iana/statuscodes.go46
1 files changed, 45 insertions, 1 deletions
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",
}