From abbdc2b6ce4577e854345b810d49df28d1ca2047 Mon Sep 17 00:00:00 2001 From: Johan Euphrosine Date: Fri, 17 Jan 2014 13:12:08 -0800 Subject: [PATCH] netlink: move Route type to common arch file Docker-DCO-1.1-Signed-off-by: Johan Euphrosine (github: proppy) --- netlink/netlink.go | 15 +++++++++++++++ netlink/netlink_linux.go | 7 ------- 2 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 netlink/netlink.go diff --git a/netlink/netlink.go b/netlink/netlink.go new file mode 100644 index 0000000..5098b4b --- /dev/null +++ b/netlink/netlink.go @@ -0,0 +1,15 @@ +// Packet netlink provide access to low level Netlink sockets and messages. +// +// Actual implementations are in: +// netlink_linux.go +// netlink_darwin.go +package netlink + +import "net" + +// A Route is a subnet associated with the interface to reach it. +type Route struct { + *net.IPNet + Iface *net.Interface + Default bool +} diff --git a/netlink/netlink_linux.go b/netlink/netlink_linux.go index a65bdaf..ab572e3 100644 --- a/netlink/netlink_linux.go +++ b/netlink/netlink_linux.go @@ -471,13 +471,6 @@ func NetworkLinkAdd(name string, linkType string) error { return s.HandleAck(wb.Seq) } -// A Route is a subnet associated with the interface to reach it. -type Route struct { - *net.IPNet - Iface *net.Interface - Default bool -} - // Returns an array of IPNet for all the currently routed subnets on ipv4 // This is similar to the first column of "ip route" output func NetworkGetRoutes() ([]Route, error) {