chore(netlink): separate linux only and OS independent code
- Move `Addr` and its `String` method to `types.go` - Move `IsWireguardSupported` to `wireguard.go` to have `family.go` OS independant - Remove dependency on vishvananda/netlink in `ipv6.go` - Move `Link` to `types.go` - Move `Route` to `types.go` - Move `Rule` and its `String` method to `types.go`
This commit is contained in:
@@ -1,22 +1,9 @@
|
||||
package netlink
|
||||
|
||||
import (
|
||||
"net/netip"
|
||||
|
||||
"github.com/vishvananda/netlink"
|
||||
)
|
||||
|
||||
type Route struct {
|
||||
LinkIndex int
|
||||
Dst netip.Prefix
|
||||
Src netip.Addr
|
||||
Gw netip.Addr
|
||||
Priority int
|
||||
Family int
|
||||
Table int
|
||||
Type int
|
||||
}
|
||||
|
||||
func (n *NetLink) RouteList(link *Link, family int) (
|
||||
routes []Route, err error) {
|
||||
netlinkLink := linkToNetlinkLink(link)
|
||||
|
||||
Reference in New Issue
Block a user