-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patherrors.go
24 lines (22 loc) · 1.16 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
package pcp
import (
"errors"
)
var (
ErrNoInternalAddress = errors.New("no internal address")
ErrNoExternalAddress = errors.New("no external address")
ErrGatewayNotFound = errors.New("gateway not found")
ErrPacketTooLarge = errors.New("packet exceeds 1100 octet size limit")
ErrUnsupportedVersion = errors.New("the specified version is not supported")
ErrWrongPacketType = errors.New("the packet is not of the correct type")
ErrAddressMismatch = errors.New("the sender and gateway addresses do not match")
ErrPortNotSpecified = errors.New("you must specify a port")
ErrNonceGeneration = errors.New("an error occured whilst generating nonce")
ErrMapDataPayload = errors.New("could not create the map data payload")
ErrPeerDataPayload = errors.New("could not create the peer data payload")
ErrRequestDataPayload = errors.New("could not create the request data payload")
ErrNetworkSend = errors.New("an error occured whilst sending the network request")
ErrNetworkTimeout = errors.New("the connection timed out")
ErrMappingNotFound = errors.New("mapping not found")
ErrNoAddress = errors.New("no address specified")
)