device.go 537 B

123456789101112131415161718192021222324
  1. package overlay
  2. import (
  3. "io"
  4. "net/netip"
  5. "github.com/slackhq/nebula/overlay/tio"
  6. "github.com/slackhq/nebula/routing"
  7. )
  8. // defaultBatchBufSize is the per-Queue scratch size for Read on backends
  9. // that don't do TSO segmentation. 65535 covers any single IP packet.
  10. const defaultBatchBufSize = 65535
  11. type Device interface {
  12. io.Closer
  13. Activate() error
  14. Networks() []netip.Prefix
  15. Name() string
  16. RoutesFor(netip.Addr) routing.Gateways
  17. SupportsMultiqueue() bool //todo remove?
  18. NewMultiQueueReader() error
  19. Readers() []tio.Queue
  20. }