cosmetic: move a bunch of error types to where they belong
This commit is contained in:
1 parent
c6b68dd2bd
commit
62da72e26d
5 files changed
+20
-20
No files matched your search
@@ -269,6 +269,11 @@ type NaClDecryptorInstance struct {
|
|||||||
nonceChan chan *[24]byte
|
nonceChan chan *[24]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type PacketDecodingError struct {
|
||||||
|
Fatal bool
|
||||||
|
Desc string
|
||||||
|
}
|
||||||
|
|
||||||
func NewNonDecryptor(conn *LocalConnection) *NonDecryptor {
|
func NewNonDecryptor(conn *LocalConnection) *NonDecryptor {
|
||||||
return &NonDecryptor{conn: conn}
|
return &NonDecryptor{conn: conn}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,10 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type FrameTooBigError struct {
|
||||||
|
EPMTU int // effective pmtu, i.e. what we tell packet senders
|
||||||
|
}
|
||||||
|
|
||||||
func (conn *LocalConnection) ensureForwarders() error {
|
func (conn *LocalConnection) ensureForwarders() error {
|
||||||
if conn.forwardChan != nil || conn.forwardChanDF != nil {
|
if conn.forwardChan != nil || conn.forwardChanDF != nil {
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@@ -16,6 +16,13 @@ type Peers struct {
|
|||||||
onGC func(*Peer)
|
onGC func(*Peer)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type UnknownPeersError struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
type NameCollisionError struct {
|
||||||
|
Name PeerName
|
||||||
|
}
|
||||||
|
|
||||||
func NewPeers(ourself *Peer, macs *MacCache, onGC func(*Peer)) *Peers {
|
func NewPeers(ourself *Peer, macs *MacCache, onGC func(*Peer)) *Peers {
|
||||||
return &Peers{
|
return &Peers{
|
||||||
ourself: ourself,
|
ourself: ourself,
|
||||||
|
|||||||
@@ -10,26 +10,6 @@ type UDPPacket struct {
|
|||||||
Sender *net.UDPAddr
|
Sender *net.UDPAddr
|
||||||
}
|
}
|
||||||
|
|
||||||
type MsgTooBigError struct {
|
|
||||||
PMTU int // actual pmtu, i.e. what the kernel told us
|
|
||||||
}
|
|
||||||
|
|
||||||
type FrameTooBigError struct {
|
|
||||||
EPMTU int // effective pmtu, i.e. what we tell packet senders
|
|
||||||
}
|
|
||||||
|
|
||||||
type UnknownPeersError struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
type NameCollisionError struct {
|
|
||||||
Name PeerName
|
|
||||||
}
|
|
||||||
|
|
||||||
type PacketDecodingError struct {
|
|
||||||
Fatal bool
|
|
||||||
Desc string
|
|
||||||
}
|
|
||||||
|
|
||||||
type LocalAddress struct {
|
type LocalAddress struct {
|
||||||
ip net.IP
|
ip net.IP
|
||||||
network *net.IPNet
|
network *net.IPNet
|
||||||
|
|||||||
@@ -26,6 +26,10 @@ type RawUDPSender struct {
|
|||||||
conn *LocalConnection
|
conn *LocalConnection
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type MsgTooBigError struct {
|
||||||
|
PMTU int // actual pmtu, i.e. what the kernel told us
|
||||||
|
}
|
||||||
|
|
||||||
func NewSimpleUDPSender(conn *LocalConnection) *SimpleUDPSender {
|
func NewSimpleUDPSender(conn *LocalConnection) *SimpleUDPSender {
|
||||||
return &SimpleUDPSender{udpConn: conn.Router.UDPListener, conn: conn}
|
return &SimpleUDPSender{udpConn: conn.Router.UDPListener, conn: conn}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user