Reorg to separate different NETLINK_ROUTE functions. Try adding vlan interfaces

This commit is contained in:
Brian Candler
2011-05-03 12:41:10 +01:00
parent 6688d17cab
commit 0a7297a86d
11 changed files with 585 additions and 368 deletions

View File

@@ -9,8 +9,8 @@ require 'netlink/route'
# and then manipulated internally.
nl = Netlink::Route::Socket.new
pp nl.link["eth0"]
pp nl.addrs["eth0"]
pp nl.if["eth0"]
pp nl.if.addrs["eth0"]
# Find the route with the shortest prefix len (probably default route)
pp nl.routes[Socket::AF_INET].min_by { |route| route.dst_len }
pp nl.rt[Socket::AF_INET].min_by { |route| route.dst_len }