Documentation ¶
Index ¶
- Constants
- Variables
- func AddDatapathInterface(dpname string, ifname string) error
- func Concat(elems ...[]byte) []byte
- func CreateDatapath(dpname string) error
- func DeleteDatapath(dpname string) error
- func FormSessionKey(remotePublicKey, localPrivateKey *[32]byte, secretKey []byte) *[32]byte
- func GenerateKeyPair() (publicKey, privateKey *[32]byte, err error)
- func GobEncode(items ...interface{}) []byte
- func NewTargetSlice(cm *ConnectionMaker) []string
- func PosixError(err error) error
- func StartLocalConnection(connRemote *RemoteConnection, tcpConn *net.TCPConn, udpAddr *net.UDPAddr, ...)
- type Bridge
- type BridgeConsumer
- type BroadcastRouteStatus
- type Config
- type Connection
- type ConnectionAction
- type ConnectionMaker
- func (cm *ConnectionMaker) ConnectionAborted(address string, err error)
- func (cm *ConnectionMaker) ConnectionCreated(conn Connection)
- func (cm *ConnectionMaker) ConnectionTerminated(conn Connection, err error)
- func (cm *ConnectionMaker) ForgetConnections(peers []string)
- func (cm *ConnectionMaker) InitiateConnections(peers []string, replace bool) []error
- func (cm *ConnectionMaker) Refresh()
- type ConnectionMakerAction
- type ConnectionSet
- type ConnectionStatus
- type ConnectionSummary
- type ConnectionTieBreak
- type Decryptor
- type DiscardingFlowOp
- type EncryptedTCPReceiver
- type EncryptedTCPSender
- type Encryptor
- type EthernetDecoder
- type FastDatapath
- func (fastdp *FastDatapath) Bridge() Bridge
- func (fastdp *FastDatapath) Close() error
- func (fastdp *FastDatapath) Error(err error, stopped bool)
- func (fastdp *FastDatapath) Miss(packet []byte, fks odp.FlowKeys) error
- func (fastdp *FastDatapath) Overlay() Overlay
- func (fastdp *FastDatapath) VportCreated(dpid odp.DatapathID, vport odp.Vport) error
- func (fastdp *FastDatapath) VportDeleted(dpid odp.DatapathID, vport odp.Vport) error
- type FastDatapathConfig
- type FlowOp
- type FlowStatus
- type ForwardPacketKey
- type ForwarderParams
- type FrameConsumer
- type GobTCPReceiver
- type GobTCPSender
- type Gossip
- type GossipChannel
- type GossipChannels
- type GossipData
- type GossipSender
- type Gossiper
- type LengthPrefixTCPReceiver
- type LengthPrefixTCPSender
- type ListOfPeers
- type LocalConnection
- type LocalConnectionStatus
- type LocalPeer
- func (peer *LocalPeer) AddConnection(conn *LocalConnection) error
- func (peer *LocalPeer) ConnectionEstablished(conn *LocalConnection)
- func (peer *LocalPeer) ConnectionTo(name PeerName) (Connection, bool)
- func (peer *LocalPeer) Connections() ConnectionSet
- func (peer *LocalPeer) ConnectionsTo(names []PeerName) []Connection
- func (peer *LocalPeer) CreateConnection(peerAddr string, acceptNewPeer bool) error
- func (peer *LocalPeer) DeleteConnection(conn *LocalConnection)
- func (peer *LocalPeer) Encode(enc *gob.Encoder)
- type LocalPeerAction
- type MAC
- type MACStatus
- type MacCache
- type MacCacheEntry
- type MultiFlowOp
- type NaClDecryptor
- type NaClDecryptorInstance
- type NaClEncryptor
- type NameCollisionError
- type NonDecryptor
- type NonDiscardingFlowOp
- type NonEncryptor
- type NullBridge
- type NullOverlay
- func (NullOverlay) AddFeaturesTo(map[string]string)
- func (NullOverlay) Confirm()
- func (NullOverlay) ControlMessage(byte, []byte)
- func (NullOverlay) Diagnostics() interface{}
- func (NullOverlay) DisplayName() string
- func (NullOverlay) ErrorChannel() <-chan error
- func (NullOverlay) EstablishedChannel() <-chan struct{}
- func (NullOverlay) Forward(ForwardPacketKey) FlowOp
- func (NullOverlay) InvalidateRoutes()
- func (NullOverlay) InvalidateShortIDs()
- func (NullOverlay) MakeForwarder(ForwarderParams) (OverlayForwarder, error)
- func (NullOverlay) StartConsumingPackets(*Peer, *Peers, OverlayConsumer) error
- func (NullOverlay) Stop()
- type Overlay
- type OverlayConsumer
- type OverlayCrypto
- type OverlayForwarder
- type OverlaySwitch
- func (osw *OverlaySwitch) Add(name string, overlay Overlay)
- func (osw *OverlaySwitch) AddFeaturesTo(features map[string]string)
- func (osw *OverlaySwitch) Diagnostics() interface{}
- func (osw *OverlaySwitch) InvalidateRoutes()
- func (osw *OverlaySwitch) InvalidateShortIDs()
- func (osw *OverlaySwitch) MakeForwarder(params ForwarderParams) (OverlayForwarder, error)
- func (osw *OverlaySwitch) SetCompatOverlay(overlay Overlay)
- func (osw *OverlaySwitch) StartConsumingPackets(localPeer *Peer, peers *Peers, consumer OverlayConsumer) error
- type PacketDecodingError
- type PacketKey
- type PacketLogging
- type Pcap
- type Peer
- type PeerName
- type PeerNameSet
- type PeerShortID
- type PeerStatus
- type PeerSummary
- type PeerUID
- type Peers
- func (peers *Peers) ApplyUpdate(update []byte) (PeerNameSet, PeerNameSet, error)
- func (peers *Peers) Dereference(peer *Peer)
- func (peers *Peers) EncodePeers(names PeerNameSet) []byte
- func (peers *Peers) Fetch(name PeerName) *Peer
- func (peers *Peers) FetchAndAddRef(name PeerName) *Peer
- func (peers *Peers) FetchByShortID(shortID PeerShortID) *Peer
- func (peers *Peers) FetchWithDefault(peer *Peer) *Peer
- func (peers *Peers) ForEach(fun func(*Peer))
- func (peers *Peers) GarbageCollect()
- func (peers *Peers) Names() PeerNameSet
- func (peers *Peers) OnGC(callback func(*Peer))
- func (peers *Peers) OnInvalidateShortIDs(callback func())
- type PeersPendingNotifications
- type ProtocolIntroConn
- type ProtocolIntroParams
- type ProtocolIntroResults
- type ProtocolMsg
- type ProtocolSender
- type ProtocolTag
- type RemoteConnection
- func (conn *RemoteConnection) BreakTie(Connection) ConnectionTieBreak
- func (conn *RemoteConnection) ErrorLog(args ...interface{})
- func (conn *RemoteConnection) Established() bool
- func (conn *RemoteConnection) Local() *Peer
- func (conn *RemoteConnection) Log(args ...interface{})
- func (conn *RemoteConnection) Outbound() bool
- func (conn *RemoteConnection) Remote() *Peer
- func (conn *RemoteConnection) RemoteTCPAddr() string
- func (conn *RemoteConnection) Shutdown(error)
- type Router
- func (router *Router) BroadcastTopologyUpdate(update []*Peer)
- func (router *Router) Gossip() GossipData
- func (router *Router) HandleHTTP(muxRouter *mux.Router)
- func (router *Router) NewGossip(channelName string, g Gossiper) Gossip
- func (router *Router) OnGossip(update []byte) (GossipData, error)
- func (router *Router) OnGossipBroadcast(_ PeerName, update []byte) (GossipData, error)
- func (router *Router) OnGossipUnicast(sender PeerName, msg []byte) error
- func (router *Router) SendAllGossip()
- func (router *Router) SendAllGossipDown(conn Connection)
- func (router *Router) Start()
- func (router *Router) Stop() error
- func (router *Router) UsingPassword() bool
- type Routes
- func (routes *Routes) Broadcast(name PeerName) []PeerName
- func (routes *Routes) BroadcastAll(name PeerName) []PeerName
- func (routes *Routes) EnsureRecalculated()
- func (routes *Routes) PeerNames() PeerNameSet
- func (routes *Routes) RandomNeighbours(except PeerName) PeerNameSet
- func (routes *Routes) Recalculate()
- func (routes *Routes) Unicast(name PeerName) (PeerName, bool)
- func (routes *Routes) UnicastAll(name PeerName) (PeerName, bool)
- type ShortIDPeers
- type SleeveOverlay
- func (*SleeveOverlay) AddFeaturesTo(map[string]string)
- func (*SleeveOverlay) Diagnostics() interface{}
- func (*SleeveOverlay) InvalidateRoutes()
- func (*SleeveOverlay) InvalidateShortIDs()
- func (sleeve *SleeveOverlay) MakeForwarder(params ForwarderParams) (OverlayForwarder, error)
- func (sleeve *SleeveOverlay) StartConsumingPackets(localPeer *Peer, peers *Peers, consumer OverlayConsumer) error
- type Status
- type SurrogateGossipData
- type SurrogateGossiper
- type TCPCryptoState
- type TCPReceiver
- type TCPSender
- type Target
- type TargetState
- type TokenBucket
- type TopologyGossipData
- type UnicastRouteStatus
- type UnknownPeerError
- type VportStatus
Constants ¶
const ( InitialInterval = 2 * time.Second MaxInterval = 6 * time.Minute ResetAfter = 1 * time.Minute )
const ( Port = 6783 HTTPPort = Port + 1 MaxUDPPacketSize = 65535 ChannelSize = 16 TCPHeartbeat = 30 * time.Second GossipInterval = 30 * time.Second MaxDuration = time.Duration(math.MaxInt64) MaxTCPMsgSize = 10 * 1024 * 1024 FastHeartbeat = 500 * time.Millisecond SlowHeartbeat = 10 * time.Second MaxMissedHeartbeats = 6 HeartbeatTimeout = MaxMissedHeartbeats * SlowHeartbeat )
const ( PeerNameFlavour = "mac" NameSize = 6 UnknownPeerName = PeerName(0) )
const ( Protocol = "weave" ProtocolMinVersion = 1 ProtocolMaxVersion = 2 )
const ( ProtocolHeartbeat = iota ProtocolConnectionEstablished ProtocolFragmentationReceived ProtocolPMTUVerified ProtocolGossip ProtocolGossipUnicast ProtocolGossipBroadcast ProtocolOverlayControlMsg )
const ( EthernetOverhead = 14 UDPOverhead = 28 // 20 bytes for IPv4, 8 bytes for UDP DefaultMTU = 65535 FragTestSize = 60001 PMTUDiscoverySize = 60000 FragTestInterval = 5 * time.Minute MTUVerifyAttempts = 8 MTUVerifyTimeout = 10 * time.Millisecond // doubled with each attempt )
const (
FastDatapathHeartbeatAck = iota
)
const PeerShortIDBits = 12
const (
WindowSize = 20 // bits
)
Variables ¶
var ( ProtocolBytes = []byte(Protocol) HeaderTimeout = 10 * time.Second ProtocolV1Features = []string{ "ConnID", "Name", "NickName", "PeerNameFlavour", "UID", } ErrExpectedCrypto = fmt.Errorf("Password specified, but peer requested an unencrypted connection") ErrExpectedNoCrypto = fmt.Errorf("No password specificed, but peer requested an encrypted connection") )
var ErrConnectToSelf = fmt.Errorf("Cannot connect to ourself")
Functions ¶
func AddDatapathInterface ¶ added in v1.2.0
func CreateDatapath ¶ added in v1.2.0
func DeleteDatapath ¶ added in v1.2.0
func FormSessionKey ¶
func GenerateKeyPair ¶
func NewTargetSlice ¶ added in v1.1.0
func NewTargetSlice(cm *ConnectionMaker) []string
func PosixError ¶
Look inside an error produced by the net package to get to the syscall.Errno at the root of the problem.
func StartLocalConnection ¶ added in v1.1.0
func StartLocalConnection(connRemote *RemoteConnection, tcpConn *net.TCPConn, udpAddr *net.UDPAddr, router *Router, acceptNewPeer bool)
Does not return anything. If the connection is successful, it will end up in the local peer's connections map.
Types ¶
type Bridge ¶ added in v1.2.0
type Bridge interface { // Inject a packet to be delivered locally InjectPacket(PacketKey) FlowOp // Start consuming packets from the bridge. Injected packets // should not be included. StartConsumingPackets(BridgeConsumer) error String() string Stats() map[string]int }
Interface to packet handling on the local virtual bridge
type BridgeConsumer ¶ added in v1.2.0
A function that determines how to handle locally captured packets.
type BroadcastRouteStatus ¶ added in v1.1.0
func NewBroadcastRouteStatusSlice ¶ added in v1.1.0
func NewBroadcastRouteStatusSlice(routes *Routes) []BroadcastRouteStatus
type Connection ¶
type Connection interface { Local() *Peer Remote() *Peer RemoteTCPAddr() string Outbound() bool Established() bool BreakTie(Connection) ConnectionTieBreak Shutdown(error) Log(args ...interface{}) }
type ConnectionAction ¶ added in v0.10.0
type ConnectionAction func() error
type ConnectionMaker ¶
type ConnectionMaker struct {
// contains filtered or unexported fields
}
func NewConnectionMaker ¶ added in v0.9.0
func NewConnectionMaker(ourself *LocalPeer, peers *Peers, port int, discovery bool) *ConnectionMaker
func (*ConnectionMaker) ConnectionAborted ¶ added in v1.2.0
func (cm *ConnectionMaker) ConnectionAborted(address string, err error)
func (*ConnectionMaker) ConnectionCreated ¶ added in v1.2.0
func (cm *ConnectionMaker) ConnectionCreated(conn Connection)
func (*ConnectionMaker) ConnectionTerminated ¶
func (cm *ConnectionMaker) ConnectionTerminated(conn Connection, err error)
func (*ConnectionMaker) ForgetConnections ¶ added in v1.0.0
func (cm *ConnectionMaker) ForgetConnections(peers []string)
func (*ConnectionMaker) InitiateConnections ¶ added in v1.0.0
func (cm *ConnectionMaker) InitiateConnections(peers []string, replace bool) []error
func (*ConnectionMaker) Refresh ¶
func (cm *ConnectionMaker) Refresh()
type ConnectionMakerAction ¶ added in v0.10.0
type ConnectionMakerAction func() bool
type ConnectionSet ¶ added in v0.10.0
type ConnectionSet map[Connection]struct{}
type ConnectionStatus ¶ added in v1.1.0
type ConnectionSummary ¶ added in v0.11.0
type ConnectionTieBreak ¶ added in v0.9.0
type ConnectionTieBreak int
const ( TieBreakWon ConnectionTieBreak = iota TieBreakLost TieBreakTied )
type Decryptor ¶
type Decryptor interface {
IterateFrames([]byte, FrameConsumer) error
}
type DiscardingFlowOp ¶ added in v1.2.0
type DiscardingFlowOp struct{}
func (DiscardingFlowOp) Discards ¶ added in v1.2.0
func (DiscardingFlowOp) Discards() bool
func (DiscardingFlowOp) Process ¶ added in v1.2.0
func (DiscardingFlowOp) Process([]byte, *EthernetDecoder, bool)
type EncryptedTCPReceiver ¶
type EncryptedTCPReceiver struct {
// contains filtered or unexported fields
}
func NewEncryptedTCPReceiver ¶
func NewEncryptedTCPReceiver(receiver TCPReceiver, sessionKey *[32]byte, outbound bool) *EncryptedTCPReceiver
func (*EncryptedTCPReceiver) Receive ¶ added in v1.1.0
func (receiver *EncryptedTCPReceiver) Receive() ([]byte, error)
type EncryptedTCPSender ¶
func NewEncryptedTCPSender ¶
func NewEncryptedTCPSender(sender TCPSender, sessionKey *[32]byte, outbound bool) *EncryptedTCPSender
func (*EncryptedTCPSender) Send ¶
func (sender *EncryptedTCPSender) Send(msg []byte) error
type EthernetDecoder ¶
type EthernetDecoder struct { Eth layers.Ethernet IP layers.IPv4 // contains filtered or unexported fields }
func NewEthernetDecoder ¶
func NewEthernetDecoder() *EthernetDecoder
func (*EthernetDecoder) DF ¶ added in v1.1.0
func (dec *EthernetDecoder) DF() bool
func (*EthernetDecoder) DecodeLayers ¶
func (dec *EthernetDecoder) DecodeLayers(data []byte)
func (*EthernetDecoder) IsSpecial ¶ added in v0.9.0
func (dec *EthernetDecoder) IsSpecial() bool
func (*EthernetDecoder) PacketKey ¶ added in v1.2.0
func (dec *EthernetDecoder) PacketKey() (key PacketKey)
type FastDatapath ¶ added in v1.2.0
type FastDatapath struct {
// contains filtered or unexported fields
}
func NewFastDatapath ¶ added in v1.2.0
func NewFastDatapath(config FastDatapathConfig) (*FastDatapath, error)
func (*FastDatapath) Bridge ¶ added in v1.2.0
func (fastdp *FastDatapath) Bridge() Bridge
func (*FastDatapath) Close ¶ added in v1.2.0
func (fastdp *FastDatapath) Close() error
func (*FastDatapath) Error ¶ added in v1.2.0
func (fastdp *FastDatapath) Error(err error, stopped bool)
func (*FastDatapath) Miss ¶ added in v1.2.0
func (fastdp *FastDatapath) Miss(packet []byte, fks odp.FlowKeys) error
func (*FastDatapath) Overlay ¶ added in v1.2.0
func (fastdp *FastDatapath) Overlay() Overlay
func (*FastDatapath) VportCreated ¶ added in v1.2.0
func (fastdp *FastDatapath) VportCreated(dpid odp.DatapathID, vport odp.Vport) error
func (*FastDatapath) VportDeleted ¶ added in v1.2.0
func (fastdp *FastDatapath) VportDeleted(dpid odp.DatapathID, vport odp.Vport) error
type FastDatapathConfig ¶ added in v1.2.0
type FlowOp ¶ added in v1.2.0
type FlowOp interface { // The caller must supply an EthernetDecoder specific to this // thread, which has already been used to decode the frame. // The broadcast parameter is a hint whether the packet is // being broadcast. Process(frame []byte, dec *EthernetDecoder, broadcast bool) // Does the FlowOp discard the packet? Discards() bool }
func FlattenFlowOp ¶ added in v1.2.0
type FlowStatus ¶ added in v1.2.0
func (*FlowStatus) MarshalJSON ¶ added in v1.2.0
func (flowStatus *FlowStatus) MarshalJSON() ([]byte, error)
type ForwardPacketKey ¶ added in v1.2.0
type ForwarderParams ¶ added in v1.2.0
type ForwarderParams struct { RemotePeer *Peer // The local IP address to use for sending. Derived from the // local address of the corresponding TCP socket, so may // differ for different forwarders. LocalIP net.IP // The remote address to send to. nil if unknown, i.e. an // incoming connection, in which case the Overlay needs to // discover it (e.g. from incoming datagrams). RemoteAddr *net.UDPAddr // Unique identifier for this connection ConnUID uint64 // Crypto bits. Nil if not encrypting Crypto *OverlayCrypto // Function to send a control message to the counterpart // forwarder. SendControlMessage func(tag byte, msg []byte) error // Features passed at connection initiation Features map[string]string }
type FrameConsumer ¶
type GobTCPReceiver ¶ added in v1.1.0
type GobTCPReceiver struct {
// contains filtered or unexported fields
}
func NewGobTCPReceiver ¶ added in v1.1.0
func NewGobTCPReceiver(decoder *gob.Decoder) *GobTCPReceiver
func (*GobTCPReceiver) Receive ¶ added in v1.1.0
func (receiver *GobTCPReceiver) Receive() ([]byte, error)
type GobTCPSender ¶ added in v1.1.0
type GobTCPSender struct {
// contains filtered or unexported fields
}
func NewGobTCPSender ¶ added in v1.1.0
func NewGobTCPSender(encoder *gob.Encoder) *GobTCPSender
func (*GobTCPSender) Send ¶ added in v1.1.0
func (sender *GobTCPSender) Send(msg []byte) error
type Gossip ¶ added in v0.9.0
type Gossip interface { // specific message from one peer to another // intermediate peers relay it using unicast topology. GossipUnicast(dstPeerName PeerName, msg []byte) error // send gossip to every peer, relayed using broadcast topology. GossipBroadcast(update GossipData) error }
type GossipChannel ¶ added in v0.9.0
func NewGossipChannel ¶ added in v1.0.0
func NewGossipChannel(channelName string, ourself *LocalPeer, routes *Routes, g Gossiper) *GossipChannel
func (*GossipChannel) GossipBroadcast ¶ added in v0.9.0
func (c *GossipChannel) GossipBroadcast(update GossipData) error
func (*GossipChannel) GossipUnicast ¶ added in v0.9.0
func (c *GossipChannel) GossipUnicast(dstPeerName PeerName, msg []byte) error
func (*GossipChannel) Send ¶ added in v0.10.0
func (c *GossipChannel) Send(srcName PeerName, data GossipData)
func (*GossipChannel) SendDown ¶ added in v0.10.0
func (c *GossipChannel) SendDown(conn Connection, data GossipData)
type GossipChannels ¶ added in v1.0.0
type GossipChannels map[string]*GossipChannel
type GossipData ¶ added in v0.10.0
type GossipData interface { Encode() [][]byte Merge(GossipData) }
type GossipSender ¶ added in v0.10.0
type GossipSender struct {
// contains filtered or unexported fields
}
Accumulates GossipData that needs to be sent to one destination, and sends it when possible.
func NewGossipSender ¶ added in v0.10.0
func NewGossipSender(send func(GossipData)) *GossipSender
func (*GossipSender) Send ¶ added in v0.10.0
func (sender *GossipSender) Send(data GossipData)
func (*GossipSender) Stop ¶ added in v0.10.0
func (sender *GossipSender) Stop()
type Gossiper ¶ added in v0.9.0
type Gossiper interface { OnGossipUnicast(sender PeerName, msg []byte) error // merge received data into state and return a representation of // the received data, for further propagation OnGossipBroadcast(sender PeerName, update []byte) (GossipData, error) // return state of everything we know; gets called periodically Gossip() GossipData // merge received data into state and return "everything new I've // just learnt", or nil if nothing in the received data was new OnGossip(update []byte) (GossipData, error) }
type LengthPrefixTCPReceiver ¶ added in v1.1.0
type LengthPrefixTCPReceiver struct {
// contains filtered or unexported fields
}
func NewLengthPrefixTCPReceiver ¶ added in v1.1.0
func NewLengthPrefixTCPReceiver(reader io.Reader) *LengthPrefixTCPReceiver
func (*LengthPrefixTCPReceiver) Receive ¶ added in v1.1.0
func (receiver *LengthPrefixTCPReceiver) Receive() ([]byte, error)
type LengthPrefixTCPSender ¶ added in v1.1.0
type LengthPrefixTCPSender struct {
// contains filtered or unexported fields
}
func NewLengthPrefixTCPSender ¶ added in v1.1.0
func NewLengthPrefixTCPSender(writer io.Writer) *LengthPrefixTCPSender
func (*LengthPrefixTCPSender) Send ¶ added in v1.1.0
func (sender *LengthPrefixTCPSender) Send(msg []byte) error
type ListOfPeers ¶
type ListOfPeers []*Peer
func (ListOfPeers) Len ¶
func (lop ListOfPeers) Len() int
func (ListOfPeers) Less ¶
func (lop ListOfPeers) Less(i, j int) bool
func (ListOfPeers) Swap ¶
func (lop ListOfPeers) Swap(i, j int)
type LocalConnection ¶
type LocalConnection struct { sync.RWMutex RemoteConnection TCPConn *net.TCPConn SessionKey *[32]byte Router *Router // contains filtered or unexported fields }
func (*LocalConnection) BreakTie ¶ added in v0.9.0
func (conn *LocalConnection) BreakTie(dupConn Connection) ConnectionTieBreak
func (*LocalConnection) Established ¶
func (conn *LocalConnection) Established() bool
func (*LocalConnection) Forward ¶
func (conn *LocalConnection) Forward(key ForwardPacketKey) FlowOp
func (*LocalConnection) SendProtocolMsg ¶ added in v0.9.0
func (conn *LocalConnection) SendProtocolMsg(m ProtocolMsg)
Send directly, not via the Actor. If it goes via the Actor we can get a deadlock where LocalConnection is blocked talking to LocalPeer and LocalPeer is blocked trying send a ProtocolMsg via LocalConnection, and the channels are full in both directions so nothing can proceed.
type LocalConnectionStatus ¶ added in v1.1.0
func NewLocalConnectionStatusSlice ¶ added in v1.1.0
func NewLocalConnectionStatusSlice(cm *ConnectionMaker) []LocalConnectionStatus
type LocalPeer ¶
func NewLocalPeer ¶ added in v0.9.0
func (*LocalPeer) AddConnection ¶
func (peer *LocalPeer) AddConnection(conn *LocalConnection) error
Sync.
func (*LocalPeer) ConnectionEstablished ¶
func (peer *LocalPeer) ConnectionEstablished(conn *LocalConnection)
Async.
func (*LocalPeer) ConnectionTo ¶ added in v0.11.0
func (peer *LocalPeer) ConnectionTo(name PeerName) (Connection, bool)
func (*LocalPeer) Connections ¶ added in v0.11.0
func (peer *LocalPeer) Connections() ConnectionSet
func (*LocalPeer) ConnectionsTo ¶ added in v0.10.0
func (peer *LocalPeer) ConnectionsTo(names []PeerName) []Connection
func (*LocalPeer) CreateConnection ¶
func (*LocalPeer) DeleteConnection ¶
func (peer *LocalPeer) DeleteConnection(conn *LocalConnection)
Sync.
type LocalPeerAction ¶ added in v0.10.0
type LocalPeerAction func()
type MACStatus ¶ added in v1.1.0
func NewMACStatusSlice ¶ added in v1.1.0
type MacCache ¶
func NewMacCache ¶
type MacCacheEntry ¶
type MacCacheEntry struct {
// contains filtered or unexported fields
}
type MultiFlowOp ¶ added in v1.2.0
type MultiFlowOp struct {
// contains filtered or unexported fields
}
func NewMultiFlowOp ¶ added in v1.2.0
func NewMultiFlowOp(broadcast bool, ops ...FlowOp) *MultiFlowOp
func (*MultiFlowOp) Add ¶ added in v1.2.0
func (mfop *MultiFlowOp) Add(op FlowOp)
func (*MultiFlowOp) Discards ¶ added in v1.2.0
func (mfop *MultiFlowOp) Discards() bool
func (*MultiFlowOp) Process ¶ added in v1.2.0
func (mfop *MultiFlowOp) Process(frame []byte, dec *EthernetDecoder, broadcast bool)
type NaClDecryptor ¶
type NaClDecryptor struct { NonDecryptor // contains filtered or unexported fields }
func NewNaClDecryptor ¶
func NewNaClDecryptor(sessionKey *[32]byte, outbound bool) *NaClDecryptor
func (*NaClDecryptor) IterateFrames ¶
func (nd *NaClDecryptor) IterateFrames(packet []byte, consumer FrameConsumer) error
type NaClDecryptorInstance ¶
type NaClDecryptorInstance struct {
// contains filtered or unexported fields
}
func NewNaClDecryptorInstance ¶ added in v0.11.0
func NewNaClDecryptorInstance(outbound bool) *NaClDecryptorInstance
type NaClEncryptor ¶
type NaClEncryptor struct { NonEncryptor // contains filtered or unexported fields }
func NewNaClEncryptor ¶
func NewNaClEncryptor(prefix []byte, sessionKey *[32]byte, outbound bool, df bool) *NaClEncryptor
func (*NaClEncryptor) Bytes ¶
func (ne *NaClEncryptor) Bytes() ([]byte, error)
func (*NaClEncryptor) PacketOverhead ¶
func (ne *NaClEncryptor) PacketOverhead() int
func (*NaClEncryptor) TotalLen ¶
func (ne *NaClEncryptor) TotalLen() int
type NameCollisionError ¶
type NameCollisionError struct {
Name PeerName
}
func (NameCollisionError) Error ¶
func (nce NameCollisionError) Error() string
type NonDecryptor ¶
type NonDecryptor struct { }
func NewNonDecryptor ¶
func NewNonDecryptor() *NonDecryptor
func (*NonDecryptor) IterateFrames ¶
func (nd *NonDecryptor) IterateFrames(packet []byte, consumer FrameConsumer) error
type NonDiscardingFlowOp ¶ added in v1.2.0
type NonDiscardingFlowOp struct{}
func (NonDiscardingFlowOp) Discards ¶ added in v1.2.0
func (NonDiscardingFlowOp) Discards() bool
type NonEncryptor ¶
type NonEncryptor struct {
// contains filtered or unexported fields
}
func NewNonEncryptor ¶
func NewNonEncryptor(prefix []byte) *NonEncryptor
func (*NonEncryptor) AppendFrame ¶
func (ne *NonEncryptor) AppendFrame(src []byte, dst []byte, frame []byte)
func (*NonEncryptor) Bytes ¶
func (ne *NonEncryptor) Bytes() ([]byte, error)
func (*NonEncryptor) FrameOverhead ¶
func (ne *NonEncryptor) FrameOverhead() int
func (*NonEncryptor) PacketOverhead ¶
func (ne *NonEncryptor) PacketOverhead() int
func (*NonEncryptor) TotalLen ¶
func (ne *NonEncryptor) TotalLen() int
type NullBridge ¶ added in v1.2.0
type NullBridge struct{}
func (NullBridge) InjectPacket ¶ added in v1.2.0
func (NullBridge) InjectPacket(PacketKey) FlowOp
func (NullBridge) StartConsumingPackets ¶ added in v1.2.0
func (NullBridge) StartConsumingPackets(BridgeConsumer) error
func (NullBridge) Stats ¶ added in v1.2.0
func (NullBridge) Stats() map[string]int
func (NullBridge) String ¶ added in v1.2.0
func (NullBridge) String() string
type NullOverlay ¶ added in v1.2.0
type NullOverlay struct{}
func (NullOverlay) AddFeaturesTo ¶ added in v1.2.0
func (NullOverlay) AddFeaturesTo(map[string]string)
func (NullOverlay) Confirm ¶ added in v1.2.0
func (NullOverlay) Confirm()
func (NullOverlay) ControlMessage ¶ added in v1.2.0
func (NullOverlay) ControlMessage(byte, []byte)
func (NullOverlay) Diagnostics ¶ added in v1.2.0
func (NullOverlay) Diagnostics() interface{}
func (NullOverlay) DisplayName ¶ added in v1.2.0
func (NullOverlay) DisplayName() string
func (NullOverlay) ErrorChannel ¶ added in v1.2.0
func (NullOverlay) ErrorChannel() <-chan error
func (NullOverlay) EstablishedChannel ¶ added in v1.2.0
func (NullOverlay) EstablishedChannel() <-chan struct{}
func (NullOverlay) Forward ¶ added in v1.2.0
func (NullOverlay) Forward(ForwardPacketKey) FlowOp
func (NullOverlay) InvalidateRoutes ¶ added in v1.2.0
func (NullOverlay) InvalidateRoutes()
func (NullOverlay) InvalidateShortIDs ¶ added in v1.2.0
func (NullOverlay) InvalidateShortIDs()
func (NullOverlay) MakeForwarder ¶ added in v1.2.0
func (NullOverlay) MakeForwarder(ForwarderParams) (OverlayForwarder, error)
func (NullOverlay) StartConsumingPackets ¶ added in v1.2.0
func (NullOverlay) StartConsumingPackets(*Peer, *Peers, OverlayConsumer) error
func (NullOverlay) Stop ¶ added in v1.2.0
func (NullOverlay) Stop()
type Overlay ¶ added in v1.2.0
type Overlay interface { // Start consuming forwarded packets. StartConsumingPackets(*Peer, *Peers, OverlayConsumer) error // Form a packet-forwarding connection. MakeForwarder(ForwarderParams) (OverlayForwarder, error) // The routes have changed, so any cached information should // be discarded. InvalidateRoutes() // A mapping of a short id to a peer has changed InvalidateShortIDs() // Enhance a features map with overlay-related features AddFeaturesTo(map[string]string) // Obtain diagnostic information specific to the overlay Diagnostics() interface{} }
Interface to overlay network packet handling
func NewSleeveOverlay ¶ added in v1.2.0
type OverlayConsumer ¶ added in v1.2.0
type OverlayConsumer func(ForwardPacketKey) FlowOp
When a consumer is called, the decoder will already have been used to decode the frame.
type OverlayCrypto ¶ added in v1.2.0
Crypto settings for a forwarder.
type OverlayForwarder ¶ added in v1.2.0
type OverlayForwarder interface { // Forward a packet across the connection. May be called as // soon as the forwarder is created, in particular before // Confirm(). The return value nil means the key could not be // handled by this forwarder. Forward(ForwardPacketKey) FlowOp // Confirm that the connection is really wanted, and so the // Overlay should begin heartbeats etc. to verify the // operation of the forwarder. Confirm() // A channel indicating that the forwarder is established, // i.e. its operation has been confirmed. EstablishedChannel() <-chan struct{} // A channel indicating an error from the forwarder. The // forwarder is not expected to be operational after the first // error, so the channel only needs to buffer a single error. ErrorChannel() <-chan error Stop() // Handle a message from the peer. 'tag' exists for // compatibility, and should always be // ProtocolOverlayControlMessage for non-sleeve overlays. ControlMessage(tag byte, msg []byte) // User facing overlay name DisplayName() string }
All of the machinery to forward packets to a particular peer
type OverlaySwitch ¶ added in v1.2.0
type OverlaySwitch struct {
// contains filtered or unexported fields
}
func NewOverlaySwitch ¶ added in v1.2.0
func NewOverlaySwitch() *OverlaySwitch
func (*OverlaySwitch) Add ¶ added in v1.2.0
func (osw *OverlaySwitch) Add(name string, overlay Overlay)
func (*OverlaySwitch) AddFeaturesTo ¶ added in v1.2.0
func (osw *OverlaySwitch) AddFeaturesTo(features map[string]string)
func (*OverlaySwitch) Diagnostics ¶ added in v1.2.0
func (osw *OverlaySwitch) Diagnostics() interface{}
func (*OverlaySwitch) InvalidateRoutes ¶ added in v1.2.0
func (osw *OverlaySwitch) InvalidateRoutes()
func (*OverlaySwitch) InvalidateShortIDs ¶ added in v1.2.0
func (osw *OverlaySwitch) InvalidateShortIDs()
func (*OverlaySwitch) MakeForwarder ¶ added in v1.2.0
func (osw *OverlaySwitch) MakeForwarder( params ForwarderParams) (OverlayForwarder, error)
func (*OverlaySwitch) SetCompatOverlay ¶ added in v1.2.0
func (osw *OverlaySwitch) SetCompatOverlay(overlay Overlay)
func (*OverlaySwitch) StartConsumingPackets ¶ added in v1.2.0
func (osw *OverlaySwitch) StartConsumingPackets(localPeer *Peer, peers *Peers, consumer OverlayConsumer) error
type PacketDecodingError ¶
type PacketDecodingError struct {
Desc string
}
func (PacketDecodingError) Error ¶
func (pde PacketDecodingError) Error() string
type PacketLogging ¶ added in v1.2.0
type PacketLogging interface { LogPacket(string, PacketKey) LogForwardPacket(string, ForwardPacketKey) }
type Pcap ¶ added in v1.2.0
type Pcap struct { NonDiscardingFlowOp // contains filtered or unexported fields }
func (*Pcap) InjectPacket ¶ added in v1.2.0
func (*Pcap) Process ¶ added in v1.2.0
func (p *Pcap) Process(frame []byte, dec *EthernetDecoder, broadcast bool)
func (*Pcap) StartConsumingPackets ¶ added in v1.2.0
func (p *Pcap) StartConsumingPackets(consumer BridgeConsumer) error
type Peer ¶
type Peer struct { Name PeerName PeerSummary // contains filtered or unexported fields }
func NewPeerFrom ¶ added in v1.2.0
func NewPeerFromSummary ¶ added in v1.2.0
func NewPeerFromSummary(summary PeerSummary) *Peer
func (*Peer) ForEachConnectedPeer ¶ added in v0.11.0
func (*Peer) Routes ¶
Calculate the routing table from this peer to all peers reachable from it, returning a "next hop" map of PeerNameX -> PeerNameY, which says "in order to send a message to X, the peer should send the message to its neighbour Y".
Because currently we do not have weightings on the connections between peers, there is no need to use a minimum spanning tree algorithm. Instead we employ the simpler and cheaper breadth-first widening. The computation is deterministic, which ensures that when it is performed on the same data by different peers, they get the same result. This is important since otherwise we risk message loss or routing cycles.
When the 'establishedAndSymmetric' flag is set, only connections that are marked as 'established' and are symmetric (i.e. where both sides indicate they have a connection to the other) are considered.
When a non-nil stopAt peer is supplied, the widening stops when it reaches that peer. The boolean return indicates whether that has happened.
NB: This function should generally be invoked while holding a read lock on Peers and LocalPeer.
type PeerName ¶
type PeerName uint64
PeerName is used as a map key. Since net.HardwareAddr isn't suitable for that - it's a slice, and slices can't be map keys - we convert that to/from uint64.
func PeerNameFromBin ¶
func PeerNameFromString ¶
func PeerNameFromUserInput ¶
type PeerNameSet ¶ added in v0.10.0
type PeerNameSet map[PeerName]struct{}
type PeerShortID ¶ added in v1.2.0
type PeerShortID uint16
Short IDs exist for the sake of fast datapath. They are 12 bits, randomly assigned, but we detect and recover from collisions. This does limit us to 4096 peers, but that should be sufficient for a while.
type PeerStatus ¶ added in v1.1.0
type PeerStatus struct { Name string NickName string UID PeerUID ShortID PeerShortID Version uint64 Connections []ConnectionStatus }
func NewPeerStatusSlice ¶ added in v1.1.0
func NewPeerStatusSlice(peers *Peers) []PeerStatus
type PeerSummary ¶ added in v0.11.0
type Peers ¶
func (*Peers) ApplyUpdate ¶
func (peers *Peers) ApplyUpdate(update []byte) (PeerNameSet, PeerNameSet, error)
Merge an incoming update with our own topology.
We add peers hitherto unknown to us, and update peers for which the update contains a more recent version than known to us. The return value is a) a representation of the received update, and b) an "improved" update containing just these new/updated elements.
func (*Peers) Dereference ¶ added in v0.11.0
func (*Peers) EncodePeers ¶ added in v0.10.0
func (peers *Peers) EncodePeers(names PeerNameSet) []byte
func (*Peers) FetchAndAddRef ¶ added in v1.1.0
func (*Peers) FetchByShortID ¶ added in v1.2.0
func (peers *Peers) FetchByShortID(shortID PeerShortID) *Peer
func (*Peers) FetchWithDefault ¶
func (*Peers) GarbageCollect ¶
func (peers *Peers) GarbageCollect()
func (*Peers) Names ¶ added in v0.10.0
func (peers *Peers) Names() PeerNameSet
func (*Peers) OnInvalidateShortIDs ¶ added in v1.2.0
func (peers *Peers) OnInvalidateShortIDs(callback func())
type PeersPendingNotifications ¶ added in v1.2.0
type PeersPendingNotifications struct {
// contains filtered or unexported fields
}
Pending notifications due to changes to Peers that need to be sent out once the Peers is unlocked.
type ProtocolIntroConn ¶ added in v1.1.0
type ProtocolIntroConn interface { // io.Reader Read(b []byte) (n int, err error) // io.Writer Write(b []byte) (n int, err error) // net.Conn's deadline methods SetDeadline(t time.Time) error SetReadDeadline(t time.Time) error SetWriteDeadline(t time.Time) error }
We don't need the full net.TCPConn to do the protocol intro. This interface contains just the parts we do need, to support testing
type ProtocolIntroParams ¶ added in v1.1.0
type ProtocolIntroParams struct { MinVersion byte MaxVersion byte Features map[string]string Conn ProtocolIntroConn Password []byte Outbound bool }
func (ProtocolIntroParams) DoIntro ¶ added in v1.1.0
func (params ProtocolIntroParams) DoIntro() (res ProtocolIntroResults, err error)
type ProtocolIntroResults ¶ added in v1.1.0
type ProtocolMsg ¶ added in v0.9.0
type ProtocolMsg struct {
// contains filtered or unexported fields
}
type ProtocolSender ¶ added in v0.9.0
type ProtocolSender interface {
SendProtocolMsg(m ProtocolMsg)
}
type ProtocolTag ¶ added in v0.9.0
type ProtocolTag byte
type RemoteConnection ¶
type RemoteConnection struct {
// contains filtered or unexported fields
}
func NewRemoteConnection ¶
func NewRemoteConnection(from, to *Peer, tcpAddr string, outbound bool, established bool) *RemoteConnection
func (*RemoteConnection) BreakTie ¶ added in v0.9.0
func (conn *RemoteConnection) BreakTie(Connection) ConnectionTieBreak
func (*RemoteConnection) ErrorLog ¶ added in v1.1.0
func (conn *RemoteConnection) ErrorLog(args ...interface{})
func (*RemoteConnection) Established ¶
func (conn *RemoteConnection) Established() bool
func (*RemoteConnection) Local ¶
func (conn *RemoteConnection) Local() *Peer
func (*RemoteConnection) Log ¶ added in v0.10.0
func (conn *RemoteConnection) Log(args ...interface{})
func (*RemoteConnection) Outbound ¶ added in v0.10.0
func (conn *RemoteConnection) Outbound() bool
func (*RemoteConnection) Remote ¶
func (conn *RemoteConnection) Remote() *Peer
func (*RemoteConnection) RemoteTCPAddr ¶
func (conn *RemoteConnection) RemoteTCPAddr() string
func (*RemoteConnection) Shutdown ¶
func (conn *RemoteConnection) Shutdown(error)
type Router ¶
type Router struct { Config Ourself *LocalPeer Macs *MacCache Peers *Peers Routes *Routes ConnectionMaker *ConnectionMaker TopologyGossip Gossip UDPListener *net.UDPConn // contains filtered or unexported fields }
func (*Router) BroadcastTopologyUpdate ¶ added in v1.2.0
func (*Router) Gossip ¶ added in v0.9.0
func (router *Router) Gossip() GossipData
func (*Router) HandleHTTP ¶ added in v1.1.0
func (*Router) OnGossip ¶ added in v0.9.0
func (router *Router) OnGossip(update []byte) (GossipData, error)
func (*Router) OnGossipBroadcast ¶ added in v0.9.0
func (router *Router) OnGossipBroadcast(_ PeerName, update []byte) (GossipData, error)
func (*Router) OnGossipUnicast ¶ added in v0.9.0
func (*Router) SendAllGossip ¶ added in v0.9.0
func (router *Router) SendAllGossip()
func (*Router) SendAllGossipDown ¶ added in v0.9.0
func (router *Router) SendAllGossipDown(conn Connection)
func (*Router) Start ¶
func (router *Router) Start()
Start listening for TCP connections, locally captured packets, and forwarded packets. This is separate from NewRouter so that gossipers can register before we start forming connections.
func (*Router) UsingPassword ¶
type Routes ¶
func (*Routes) BroadcastAll ¶ added in v0.10.0
func (*Routes) EnsureRecalculated ¶ added in v0.10.0
func (routes *Routes) EnsureRecalculated()
Wait for any preceding Recalculate requests to be processed.
func (*Routes) PeerNames ¶ added in v0.10.0
func (routes *Routes) PeerNames() PeerNameSet
func (*Routes) RandomNeighbours ¶ added in v0.10.0
func (routes *Routes) RandomNeighbours(except PeerName) PeerNameSet
Choose min(log2(n_peers), n_neighbouring_peers) neighbours, with a random distribution that is topology-sensitive, favouring neighbours at the end of "bottleneck links". We determine the latter based on the unicast routing table. If a neighbour appears as the value more frequently than others - meaning that we reach a higher proportion of peers via that neighbour than other neighbours - then it is chosen with a higher probability.
Note that we choose log2(n_peers) *neighbours*, not peers. Consequently, on sparsely connected peers this function returns a higher proportion of neighbours than elsewhere. In extremis, on peers with fewer than log2(n_peers) neighbours, all neighbours are returned.
func (*Routes) Recalculate ¶
func (routes *Routes) Recalculate()
Request recalculation of the routing table. This is async but can effectively be made synchronous with a subsequent call to EnsureRecalculated.
type ShortIDPeers ¶ added in v1.2.0
type ShortIDPeers struct {
// contains filtered or unexported fields
}
type SleeveOverlay ¶ added in v1.2.0
type SleeveOverlay struct {
// contains filtered or unexported fields
}
func (*SleeveOverlay) AddFeaturesTo ¶ added in v1.2.0
func (*SleeveOverlay) AddFeaturesTo(map[string]string)
func (*SleeveOverlay) Diagnostics ¶ added in v1.2.0
func (*SleeveOverlay) Diagnostics() interface{}
func (*SleeveOverlay) InvalidateRoutes ¶ added in v1.2.0
func (*SleeveOverlay) InvalidateRoutes()
func (*SleeveOverlay) InvalidateShortIDs ¶ added in v1.2.0
func (*SleeveOverlay) InvalidateShortIDs()
func (*SleeveOverlay) MakeForwarder ¶ added in v1.2.0
func (sleeve *SleeveOverlay) MakeForwarder(params ForwarderParams) (OverlayForwarder, error)
func (*SleeveOverlay) StartConsumingPackets ¶ added in v1.2.0
func (sleeve *SleeveOverlay) StartConsumingPackets(localPeer *Peer, peers *Peers, consumer OverlayConsumer) error
type Status ¶ added in v1.1.0
type Status struct { Protocol string ProtocolMinVersion int ProtocolMaxVersion int Encryption bool PeerDiscovery bool Name string NickName string Port int Interface string CaptureStats map[string]int MACs []MACStatus Peers []PeerStatus UnicastRoutes []UnicastRouteStatus BroadcastRoutes []BroadcastRouteStatus Connections []LocalConnectionStatus Targets []string OverlayDiagnostics interface{} }
type SurrogateGossipData ¶ added in v1.0.0
type SurrogateGossipData struct {
// contains filtered or unexported fields
}
func NewSurrogateGossipData ¶ added in v1.0.0
func NewSurrogateGossipData(msg []byte) *SurrogateGossipData
func (*SurrogateGossipData) Encode ¶ added in v1.0.0
func (d *SurrogateGossipData) Encode() [][]byte
func (*SurrogateGossipData) Merge ¶ added in v1.0.0
func (d *SurrogateGossipData) Merge(other GossipData)
type SurrogateGossiper ¶ added in v1.0.0
type SurrogateGossiper struct{}
func (*SurrogateGossiper) Gossip ¶ added in v1.0.0
func (*SurrogateGossiper) Gossip() GossipData
func (*SurrogateGossiper) OnGossip ¶ added in v1.0.0
func (*SurrogateGossiper) OnGossip(update []byte) (GossipData, error)
func (*SurrogateGossiper) OnGossipBroadcast ¶ added in v1.0.0
func (*SurrogateGossiper) OnGossipBroadcast(_ PeerName, update []byte) (GossipData, error)
func (*SurrogateGossiper) OnGossipUnicast ¶ added in v1.0.0
func (*SurrogateGossiper) OnGossipUnicast(sender PeerName, msg []byte) error
type TCPCryptoState ¶ added in v0.11.0
type TCPCryptoState struct {
// contains filtered or unexported fields
}
The lowest 64 bits of the nonce contain the message sequence number. The top most bit indicates the connection polarity at the sender - '1' for outbound; the next indicates protocol type - '1' for TCP. The remaining 126 bits are zero. The polarity is needed so that the two ends of a connection do not use the same nonces; the protocol type so that the TCP and UDP sender nonces are disjoint. This is a requirement of the NaCl Security Model; see http://nacl.cr.yp.to/box.html.
func NewTCPCryptoState ¶ added in v0.11.0
func NewTCPCryptoState(sessionKey *[32]byte, outbound bool) *TCPCryptoState
type TCPReceiver ¶
type Target ¶
type Target struct {
// contains filtered or unexported fields
}
Information about an address where we may find a peer
type TargetState ¶ added in v1.2.0
type TargetState int
const ( TargetWaiting TargetState = iota // we are waiting to connect there TargetAttempting // we are attempting to connect there TargetConnected // we are connected to there )
type TokenBucket ¶ added in v1.0.2
type TokenBucket struct {
// contains filtered or unexported fields
}
func NewTokenBucket ¶ added in v1.0.2
func NewTokenBucket(capacity int64, tokenInterval time.Duration) *TokenBucket
func (*TokenBucket) Wait ¶ added in v1.0.2
func (tb *TokenBucket) Wait()
type TopologyGossipData ¶ added in v0.10.0
type TopologyGossipData struct {
// contains filtered or unexported fields
}
func (*TopologyGossipData) Encode ¶ added in v0.10.0
func (d *TopologyGossipData) Encode() [][]byte
func (*TopologyGossipData) Merge ¶ added in v0.10.0
func (d *TopologyGossipData) Merge(other GossipData)
type UnicastRouteStatus ¶ added in v1.1.0
type UnicastRouteStatus struct {
Dest, Via string
}
func NewUnicastRouteStatusSlice ¶ added in v1.1.0
func NewUnicastRouteStatusSlice(routes *Routes) []UnicastRouteStatus
type UnknownPeerError ¶ added in v0.9.0
type UnknownPeerError struct {
Name PeerName
}
func (UnknownPeerError) Error ¶ added in v0.9.0
func (upe UnknownPeerError) Error() string
type VportStatus ¶ added in v1.2.0
func (*VportStatus) MarshalJSON ¶ added in v1.2.0
func (vport *VportStatus) MarshalJSON() ([]byte, error)
Source Files ¶
- bridge.go
- connection.go
- connection_maker.go
- consts.go
- crypto.go
- ethernet_decoder.go
- fastdp.go
- flow.go
- gossip.go
- gossip_channel.go
- http.go
- local_peer.go
- mac_cache.go
- odp.go
- overlay.go
- overlay_switch.go
- pcap.go
- peer.go
- peer_name_mac.go
- peers.go
- protocol.go
- router.go
- routes.go
- sleeve.go
- status.go
- surrogate_gossiper.go
- token_bucket.go
- utils.go