-
Notifications
You must be signed in to change notification settings - Fork 0
/
errors.go
36 lines (32 loc) · 2.2 KB
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package stun
type errorString string
func (e errorString) Error() string { return string(e) }
const (
ErrMalformedAttribute = errorString("malformed attribute")
ErrNotASTUNMessage = errorString("not a stun message")
ErrFingerprint = errorString("fingerprint check failed")
ErrMessageIntegrity = errorString("messageintegrity check failed")
ErrMessageIntegritySHA256 = errorString("messageintegritysha256 check failed")
ErrUnknownPasswordAlgorithm = errorString("unknown password algorithm")
ErrUnexpectedEOF = errorString("unexpected EOF")
ErrUsernameTooLong = errorString("username too long")
ErrRealmTooLong = errorString("realm too long")
ErrNonceTooLong = errorString("nonce too long")
ErrSoftwareTooLong = errorString("software too long")
ErrMissingUsername = errorString("missing username")
ErrMissingRealm = errorString("missing realm")
ErrInvalidUserHashLength = errorString("invalid userhash length")
ErrInvalidErrorCode = errorString("invalid error code")
ErrReasonTooLong = errorString("reason too long")
ErrDomainTooLong = errorString("domain too long")
ErrInvalidIPAddress = errorString("invalid IP address length")
ErrInvalidAttributeSequence = errorString("invalid attribute sequence")
ErrInvalidMessageIntegritySHA256Length = errorString("invalid MessageIntegritySHA256 length")
ErrInvalidPriorityComponentID = errorString("invalid priority component id")
ErrInvalidUserHash = errorString("invalid user hash")
ErrMissingMessageIntegrityKey = errorString("missing message integrity key")
ErrUnknownAddressAttribute = errorString("unknown address attribute")
ErrUnknownIPFamily = errorString("unknown IP family")
ErrKeySet = errorString("key already set previously")
ErrKeyNotUsed = errorString("key set but no messageintegrity or messageintegritysha256 attributes used")
)