cosmetic: move a bunch of error types to where they belong

This commit is contained in:
Matthias Radestock committed 2015-01-20 21:01:50 +00:00
1 parent c6b68dd2bd
commit 62da72e26d
5 files changed
+20 -20

No files matched your search

+5
View File
@@ -269,6 +269,11 @@ type NaClDecryptorInstance struct {
nonceChan chan *[24]byte
}
type PacketDecodingError struct {
Fatal bool
Desc string
}
func NewNonDecryptor(conn *LocalConnection) *NonDecryptor {
return &NonDecryptor{conn: conn}
}
+4
View File
@@ -7,6 +7,10 @@ import (
"time"
)
type FrameTooBigError struct {
EPMTU int // effective pmtu, i.e. what we tell packet senders
}
func (conn *LocalConnection) ensureForwarders() error {
if conn.forwardChan != nil || conn.forwardChanDF != nil {
return nil
+7
View File
@@ -16,6 +16,13 @@ type Peers struct {
onGC func(*Peer)
}
type UnknownPeersError struct {
}
type NameCollisionError struct {
Name PeerName
}
func NewPeers(ourself *Peer, macs *MacCache, onGC func(*Peer)) *Peers {
return &Peers{
ourself: ourself,
-20
View File
@@ -10,26 +10,6 @@ type UDPPacket struct {
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 {
ip net.IP
network *net.IPNet
+4
View File
@@ -26,6 +26,10 @@ type RawUDPSender struct {
conn *LocalConnection
}
type MsgTooBigError struct {
PMTU int // actual pmtu, i.e. what the kernel told us
}
func NewSimpleUDPSender(conn *LocalConnection) *SimpleUDPSender {
return &SimpleUDPSender{udpConn: conn.Router.UDPListener, conn: conn}
}