0
0
Fork 0
mirror of https://github.com/slackhq/nebula.git synced 2025-01-11 03:48:12 +00:00
slackhq_nebula/test/tun.go
Nate Brown f2c32421c4 Support for ipv6 in the overlay with v2 certificates
---------

Co-authored-by: Jack Doan <jackdoan@rivian.com>
2024-10-23 22:25:20 -05:00

41 lines
602 B
Go

package test
import (
"errors"
"io"
"net/netip"
)
type NoopTun struct{}
func (NoopTun) RouteFor(addr netip.Addr) netip.Addr {
return netip.Addr{}
}
func (NoopTun) Activate() error {
return nil
}
func (NoopTun) Networks() []netip.Prefix {
return []netip.Prefix{}
}
func (NoopTun) Name() string {
return "noop"
}
func (NoopTun) Read([]byte) (int, error) {
return 0, nil
}
func (NoopTun) Write([]byte) (int, error) {
return 0, nil
}
func (NoopTun) NewMultiQueueReader() (io.ReadWriteCloser, error) {
return nil, errors.New("unsupported")
}
func (NoopTun) Close() error {
return nil
}