netlink: move Route type to common arch file

Docker-DCO-1.1-Signed-off-by: Johan Euphrosine <proppy@google.com> (github: proppy)
Upstream-commit: dadd54dba395f68c492a8ce5e2bf9488f9db0830
Component: engine
This commit is contained in:
Johan Euphrosine
2014-01-17 14:04:11 -08:00
parent 06869c7c04
commit 5a27089624
2 changed files with 15 additions and 7 deletions
+15
View File
@@ -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
}
@@ -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) {