Skip to content

Commit

Permalink
netlink: move Route type to common arch file
Browse files Browse the repository at this point in the history
Docker-DCO-1.1-Signed-off-by: Johan Euphrosine <[email protected]> (github: proppy)
  • Loading branch information
proppy committed Jan 17, 2014
1 parent a886fbf commit dadd54d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
15 changes: 15 additions & 0 deletions pkg/netlink/netlink.go
Original file line number Diff line number Diff line change
@@ -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
}
7 changes: 0 additions & 7 deletions pkg/netlink/netlink_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit dadd54d

Please sign in to comment.