Versions in this module Expand all Collapse all v0 v0.1.0 Aug 14, 2024 Changes in this version + const ChannelSize + const DefaultMTU + const EthernetOverhead + const FastDatapathCryptoInitSARemote + const FastDatapathHeartbeatAck + const FastHeartbeat + const FragTestInterval + const FragTestSize + const HeartbeatTimeout + const MTUVerifyAttempts + const MTUVerifyTimeout + const MaxDuration + const MaxMissedHeartbeats + const MaxUDPPacketSize + const NameSize + const PMTUDiscoverySize + const ProtocolConnectionEstablished + const ProtocolFragmentationReceived + const ProtocolPMTUVerified + const SlowHeartbeat + const UDPOverhead + const WindowSize + func PosixError(err error) error + type AWSVPC struct + func NewAWSVPC() AWSVPC + func (vpc AWSVPC) AddFeaturesTo(features map[string]string) + func (vpc AWSVPC) Diagnostics() interface{} + func (vpc AWSVPC) InvalidateRoutes() + func (vpc AWSVPC) InvalidateShortIDs() + func (vpc AWSVPC) PrepareConnection(params mesh.OverlayConnectionParams) (mesh.OverlayConnection, error) + func (vpc AWSVPC) StartConsumingPackets(localPeer *mesh.Peer, peers *mesh.Peers, consumer OverlayConsumer) error + func (vpc AWSVPC) Stop() + type AWSVPCConnection struct + func (conn *AWSVPCConnection) Attrs() map[string]interface{} + func (conn *AWSVPCConnection) Confirm() + func (conn *AWSVPCConnection) ControlMessage(tag byte, msg []byte) + func (conn *AWSVPCConnection) ErrorChannel() <-chan error + func (conn *AWSVPCConnection) EstablishedChannel() <-chan struct{} + func (conn *AWSVPCConnection) Forward(key ForwardPacketKey) FlowOp + func (conn *AWSVPCConnection) Stop() + type Consumer func(PacketKey) FlowOp + type Decryptor interface + IterateFrames func([]byte, FrameConsumer) error + type DiscardingFlowOp struct + func (DiscardingFlowOp) Discards() bool + func (DiscardingFlowOp) Process([]byte, *EthernetDecoder, bool) + type Encryptor interface + AppendFrame func(src []byte, dst []byte, frame []byte) + Bytes func() ([]byte, error) + FrameOverhead func() int + PacketOverhead func() int + TotalLen func() int + type EthernetDecoder struct + Eth layers.Ethernet + IP layers.IPv4 + func NewEthernetDecoder() *EthernetDecoder + func (dec *EthernetDecoder) DF() bool + func (dec *EthernetDecoder) DecodeLayers(data []byte) + func (dec *EthernetDecoder) IsSpecial() bool + func (dec *EthernetDecoder) PacketKey() (key PacketKey) + type FastDPMetrics struct + Flows int + TotalBytes uint64 + TotalPackets uint64 + type FastDPStatus struct + Flows []FlowStatus + Vports []VportStatus + func (s FastDPStatus) Metrics() interface{} + type FastDatapath struct + func NewFastDatapath(iface *net.Interface, port int, encryptionEnabled bool) (*FastDatapath, error) + func (fastdp *FastDatapath) Close() error + func (fastdp *FastDatapath) Error(err error, stopped bool) + func (fastdp *FastDatapath) InjectorConsumer() InjectorConsumer + func (fastdp *FastDatapath) Miss(packet []byte, fks odp.FlowKeys) error + func (fastdp *FastDatapath) Overlay() NetworkOverlay + func (fastdp *FastDatapath) VportCreated(dpid odp.DatapathID, vport odp.Vport) error + func (fastdp *FastDatapath) VportDeleted(dpid odp.DatapathID, vport odp.Vport) error + type FlowOp interface + Discards func() bool + Process func(frame []byte, dec *EthernetDecoder, broadcast bool) + func FlattenFlowOp(fop FlowOp) []FlowOp + type FlowStatus odp.FlowInfo + func (flowStatus *FlowStatus) MarshalJSON() ([]byte, error) + type ForwardPacketKey struct + DstPeer *mesh.Peer + SrcPeer *mesh.Peer + type FrameConsumer func(src []byte, dst []byte, frame []byte) + type InjectorConsumer interface + InjectPacket func(PacketKey) FlowOp + Interface func() *net.Interface + StartConsumingPackets func(Consumer) error + Stats func() map[string]int + String func() string + func NewPcap(iface *net.Interface, bufSz int) (InjectorConsumer, error) + type MAC [6]byte + func (mac MAC) String() string + type MACStatus struct + LastSeen time.Time + Mac string + Name string + NickName string + func NewMACStatusSlice(cache *MacCache) []MACStatus + type MacCache struct + func NewMacCache(maxAge time.Duration, onExpiry func(net.HardwareAddr, *mesh.Peer)) *MacCache + func (cache *MacCache) Add(mac net.HardwareAddr, peer *mesh.Peer) (bool, *mesh.Peer) + func (cache *MacCache) AddForced(mac net.HardwareAddr, peer *mesh.Peer) (bool, *mesh.Peer) + func (cache *MacCache) Delete(peer *mesh.Peer) bool + func (cache *MacCache) Lookup(mac net.HardwareAddr) *mesh.Peer + type MacCacheEntry struct + type MultiFlowOp struct + func NewMultiFlowOp(broadcast bool, ops ...FlowOp) *MultiFlowOp + func (mfop *MultiFlowOp) Add(op FlowOp) + func (mfop *MultiFlowOp) Discards() bool + func (mfop *MultiFlowOp) Process(frame []byte, dec *EthernetDecoder, broadcast bool) + type NaClDecryptor struct + func NewNaClDecryptor(sessionKey *[32]byte, outbound bool) *NaClDecryptor + func (nd *NaClDecryptor) IterateFrames(packet []byte, consumer FrameConsumer) error + type NaClDecryptorInstance struct + func NewNaClDecryptorInstance(outbound bool) *NaClDecryptorInstance + type NaClEncryptor struct + func NewNaClEncryptor(prefix []byte, sessionKey *[32]byte, outbound bool, df bool) *NaClEncryptor + func (ne *NaClEncryptor) Bytes() ([]byte, error) + func (ne *NaClEncryptor) PacketOverhead() int + func (ne *NaClEncryptor) TotalLen() int + type NetworkConfig struct + BufSz int + InjectorConsumer InjectorConsumer + PacketLogging PacketLogging + type NetworkOverlay interface + InvalidateRoutes func() + InvalidateShortIDs func() + StartConsumingPackets func(*mesh.Peer, *mesh.Peers, OverlayConsumer) error + func NewSleeveOverlay(host string, localPort int) NetworkOverlay + type NetworkRouter struct + Macs *MacCache + func NewNetworkRouter(config mesh.Config, networkConfig NetworkConfig, ...) (*NetworkRouter, error) + func (router *NetworkRouter) CreateRestartSentinel() error + func (router *NetworkRouter) ForgetConnections(peers []string) + func (router *NetworkRouter) HandleHTTP(muxRouter *mux.Router) + func (router *NetworkRouter) InitialPeers(resume bool, peers []string) ([]string, error) + func (router *NetworkRouter) InitiateConnections(peers []string, replace bool) []error + func (router *NetworkRouter) Start() + type NetworkRouterStatus struct + CaptureStats map[string]int + Interface string + MACs []MACStatus + func NewNetworkRouterStatus(router *NetworkRouter) *NetworkRouterStatus + type NonDecryptor struct + func NewNonDecryptor() *NonDecryptor + func (nd *NonDecryptor) IterateFrames(packet []byte, consumer FrameConsumer) error + type NonDiscardingFlowOp struct + func (NonDiscardingFlowOp) Discards() bool + type NonEncryptor struct + func NewNonEncryptor(prefix []byte) *NonEncryptor + func (ne *NonEncryptor) AppendFrame(src []byte, dst []byte, frame []byte) + func (ne *NonEncryptor) Bytes() ([]byte, error) + func (ne *NonEncryptor) FrameOverhead() int + func (ne *NonEncryptor) PacketOverhead() int + func (ne *NonEncryptor) TotalLen() int + type NullInjectorConsumer struct + func (NullInjectorConsumer) InjectPacket(PacketKey) FlowOp + func (NullInjectorConsumer) Interface() *net.Interface + func (NullInjectorConsumer) StartConsumingPackets(Consumer) error + func (NullInjectorConsumer) Stats() map[string]int + func (NullInjectorConsumer) String() string + type NullNetworkOverlay struct + func (NullNetworkOverlay) Forward(ForwardPacketKey) FlowOp + func (NullNetworkOverlay) InvalidateRoutes() + func (NullNetworkOverlay) InvalidateShortIDs() + func (NullNetworkOverlay) StartConsumingPackets(*mesh.Peer, *mesh.Peers, OverlayConsumer) error + type OverlayConsumer func(ForwardPacketKey) FlowOp + type OverlayForwarder interface + Forward func(ForwardPacketKey) FlowOp + HealthChannel func() <-chan bool + type OverlaySwitch struct + func NewOverlaySwitch() *OverlaySwitch + func (osw *OverlaySwitch) Add(name string, overlay NetworkOverlay) + func (osw *OverlaySwitch) AddFeaturesTo(features map[string]string) + func (osw *OverlaySwitch) Diagnostics() interface{} + func (osw *OverlaySwitch) InvalidateRoutes() + func (osw *OverlaySwitch) InvalidateShortIDs() + func (osw *OverlaySwitch) PrepareConnection(params mesh.OverlayConnectionParams) (mesh.OverlayConnection, error) + func (osw *OverlaySwitch) SetCompatOverlay(overlay NetworkOverlay) + func (osw *OverlaySwitch) StartConsumingPackets(localPeer *mesh.Peer, peers *mesh.Peers, consumer OverlayConsumer) error + func (osw *OverlaySwitch) Stop() + type PacketDecodingError struct + Desc string + func (pde PacketDecodingError) Error() string + type PacketKey struct + DstMAC MAC + SrcMAC MAC + type PacketLogging interface + LogForwardPacket func(string, ForwardPacketKey) + LogPacket func(string, PacketKey) + type Pcap struct + func (p *Pcap) InjectPacket(PacketKey) FlowOp + func (p *Pcap) Interface() *net.Interface + func (p *Pcap) Process(frame []byte, dec *EthernetDecoder, broadcast bool) + func (p *Pcap) StartConsumingPackets(consumer Consumer) error + func (p *Pcap) Stats() map[string]int + func (p *Pcap) String() string + type SleeveOverlay struct + func (*SleeveOverlay) AddFeaturesTo(map[string]string) + func (*SleeveOverlay) Diagnostics() interface{} + func (*SleeveOverlay) InvalidateRoutes() + func (*SleeveOverlay) InvalidateShortIDs() + func (*SleeveOverlay) Stop() + func (sleeve *SleeveOverlay) PrepareConnection(params mesh.OverlayConnectionParams) (mesh.OverlayConnection, error) + func (sleeve *SleeveOverlay) StartConsumingPackets(localPeer *mesh.Peer, peers *mesh.Peers, consumer OverlayConsumer) error + type VportStatus odp.Vport + func (vport *VportStatus) MarshalJSON() ([]byte, error)