mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 08:16:39 +00:00
25 lines
539 B
Go
25 lines
539 B
Go
package iface
|
|
|
|
import (
|
|
"net"
|
|
"net/netip"
|
|
|
|
"golang.zx2c4.com/wireguard/tun/netstack"
|
|
|
|
"github.com/netbirdio/netbird/client/iface/device"
|
|
"github.com/netbirdio/netbird/client/iface/wgaddr"
|
|
)
|
|
|
|
type wgIfaceBase interface {
|
|
AddAllowedIP(peerKey string, allowedIP netip.Prefix) error
|
|
RemoveAllowedIP(peerKey string, allowedIP netip.Prefix) error
|
|
|
|
Name() string
|
|
Address() wgaddr.Address
|
|
ToInterface() *net.Interface
|
|
IsUserspaceBind() bool
|
|
GetFilter() device.PacketFilter
|
|
GetDevice() *device.FilteredDevice
|
|
GetNet() *netstack.Net
|
|
}
|