-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.go
More file actions
67 lines (48 loc) · 2.64 KB
/
Copy patherrors.go
File metadata and controls
67 lines (48 loc) · 2.64 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package gotacacs
import "errors"
// Protocol errors for TACACS+ operations.
var (
// ErrInvalidHeader indicates the packet header is malformed or invalid.
ErrInvalidHeader = errors.New("invalid header")
// ErrInvalidPacket indicates the packet body is malformed or invalid.
ErrInvalidPacket = errors.New("invalid packet")
// ErrInvalidVersion indicates an unsupported protocol version.
ErrInvalidVersion = errors.New("invalid version")
// ErrInvalidType indicates an unsupported packet type.
ErrInvalidType = errors.New("invalid packet type")
// ErrInvalidSequence indicates a sequence number violation.
ErrInvalidSequence = errors.New("invalid sequence number")
// ErrSessionNotFound indicates the session ID is unknown.
ErrSessionNotFound = errors.New("session not found")
// ErrConnectionClosed indicates the connection was terminated.
ErrConnectionClosed = errors.New("connection closed")
// ErrTimeout indicates an operation timed out.
ErrTimeout = errors.New("operation timeout")
// ErrAuthenticationFailed indicates authentication failed.
ErrAuthenticationFailed = errors.New("authentication failed")
// ErrAuthorizationDenied indicates authorization was denied.
ErrAuthorizationDenied = errors.New("authorization denied")
// ErrAccountingFailed indicates accounting operation failed.
ErrAccountingFailed = errors.New("accounting failed")
// ErrBufferTooShort indicates the buffer is too short for the operation.
ErrBufferTooShort = errors.New("buffer too short")
// ErrBodyTooLarge indicates the packet body exceeds maximum size.
ErrBodyTooLarge = errors.New("body too large")
// ErrAuthenFollow indicates the server requested authentication follow.
// The client should connect to an alternate server specified in ServerMsg.
ErrAuthenFollow = errors.New("authentication follow requested")
// ErrAuthenRestart indicates the server requested authentication restart.
// The client should restart authentication from the beginning.
ErrAuthenRestart = errors.New("authentication restart requested")
// ErrSequenceOverflow indicates the sequence number would overflow.
// This happens after 255 packets in a session.
ErrSequenceOverflow = errors.New("sequence number overflow")
// ErrMaxPrompts indicates that an ASCII authentication exchange exceeded
// the maximum number of interactive prompt round-trips.
ErrMaxPrompts = errors.New("maximum prompt count exceeded")
// ErrBadSecret indicates the shared secret may be incorrect.
// This error is returned when packet parsing fails in a way that
// suggests the body was deobfuscated with the wrong secret,
// resulting in garbage length fields.
ErrBadSecret = errors.New("bad secret")
)