This commit is contained in:
JackDoan
2025-11-04 15:40:33 -06:00
parent 2ea8a72d5c
commit 2ab75709ad
6 changed files with 73 additions and 61 deletions

View File

@@ -4,19 +4,19 @@ import (
"net/netip"
"github.com/slackhq/nebula/config"
"github.com/slackhq/nebula/packet"
)
const MTU = 9001
type EncReader func(
addr netip.AddrPort,
payload []byte,
)
type EncReader func(*packet.Packet)
type PacketBufferGetter func() *packet.Packet
type Conn interface {
Rebind() error
LocalAddr() (netip.AddrPort, error)
ListenOut(r EncReader) error
ListenOut(pg PacketBufferGetter, pc chan *packet.Packet) error
WriteTo(b []byte, addr netip.AddrPort) error
ReloadConfig(c *config.C)
Close() error