udp_raw_unsupported.go 700 B

1234567891011121314151617181920212223242526272829
  1. //go:build !linux || android || e2e_testing
  2. // +build !linux android e2e_testing
  3. package udp
  4. import (
  5. "fmt"
  6. "net/netip"
  7. "runtime"
  8. "github.com/sirupsen/logrus"
  9. "github.com/slackhq/nebula/config"
  10. )
  11. const RawOverhead = 0
  12. type RawConn struct{}
  13. func NewRawConn(l *logrus.Logger, ip string, port int, basePort uint16) (*RawConn, error) {
  14. return nil, fmt.Errorf("multiport tx is not supported on %s", runtime.GOOS)
  15. }
  16. func (u *RawConn) WriteTo(raw []byte, fromPort uint16, addr netip.AddrPort) error {
  17. return fmt.Errorf("multiport tx is not supported on %s", runtime.GOOS)
  18. }
  19. func (u *RawConn) ReloadConfig(c *config.C) {}
  20. func NewRawStatsEmitter(rawConn *RawConn) func() { return func() {} }