File tree 2 files changed +17
-1
lines changed 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,12 @@ var StringToAlgorithm = reverseInt8(AlgorithmToString)
23
23
// StringToHash is a map of names to hash IDs.
24
24
var StringToHash = reverseInt8 (HashToString )
25
25
26
- // StringToCertType is the reverseof CertTypeToString.
26
+ // StringToCertType is the reverse of CertTypeToString.
27
27
var StringToCertType = reverseInt16 (CertTypeToString )
28
28
29
+ // StringToStatefulType is the reverse of StatefulTypeToString.
30
+ var StringToStatefulType = reverseInt16 (StatefulTypeToString )
31
+
29
32
// Reverse a map
30
33
func reverseInt8 (m map [uint8 ]string ) map [string ]uint8 {
31
34
n := make (map [string ]uint8 , len (m ))
Original file line number Diff line number Diff line change @@ -181,6 +181,19 @@ const (
181
181
AMTRELAYHost = IPSECGatewayHost
182
182
)
183
183
184
+ // Stateful types as defined in RFC 8490.
185
+ const (
186
+ StatefulTypeKeepAlive uint16 = iota + 1
187
+ StatefulTypeRetryDelay
188
+ StatefulTypeEncryptionPadding
189
+ )
190
+
191
+ var StatefulTypeToString = map [uint16 ]string {
192
+ StatefulTypeKeepAlive : "KeepAlive" ,
193
+ StatefulTypeRetryDelay : "RetryDelay" ,
194
+ StatefulTypeEncryptionPadding : "EncryptionPadding" ,
195
+ }
196
+
184
197
// Header is the wire format for the DNS packet header.
185
198
type Header struct {
186
199
Id uint16
You can’t perform that action at this time.
0 commit comments