mirror of
https://github.com/slackhq/nebula.git
synced 2026-05-16 04:47:38 +02:00
better and batched tun interface
This commit is contained in:
@@ -4,15 +4,21 @@ import (
|
||||
"io"
|
||||
"net/netip"
|
||||
|
||||
"github.com/slackhq/nebula/overlay/tio"
|
||||
"github.com/slackhq/nebula/routing"
|
||||
)
|
||||
|
||||
// defaultBatchBufSize is the per-Queue scratch size for Read on backends
|
||||
// that don't do TSO segmentation. 65535 covers any single IP packet.
|
||||
const defaultBatchBufSize = 65535
|
||||
|
||||
type Device interface {
|
||||
io.ReadWriteCloser
|
||||
io.Closer
|
||||
Activate() error
|
||||
Networks() []netip.Prefix
|
||||
Name() string
|
||||
RoutesFor(netip.Addr) routing.Gateways
|
||||
SupportsMultiqueue() bool
|
||||
NewMultiQueueReader() (io.ReadWriteCloser, error)
|
||||
SupportsMultiqueue() bool //todo remove?
|
||||
NewMultiQueueReader() error
|
||||
Readers() []tio.Queue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user