Add the IFA_FLAGS RTAttr and a couple of new flags

This commit is contained in:
nick
2014-04-15 14:12:06 +01:00
parent 810c743583
commit 28cda0ee62
2 changed files with 24 additions and 17 deletions

View File

@@ -318,6 +318,7 @@ module Linux
IFA_ANYCAST = 5
IFA_CACHEINFO = 6
IFA_MULTICAST = 7
IFA_FLAGS = 8
IFA_F_SECONDARY = 0x01
IFA_F_TEMPORARY = IFA_F_SECONDARY
@@ -328,6 +329,8 @@ module Linux
IFA_F_DEPRECATED = 0x20
IFA_F_TENTATIVE = 0x40
IFA_F_PERMANENT = 0x80
IFA_F_MANAGETEMPADDR = 0x100
IFA_F_NOPREFIXROUTE = 0x200
# from linux/if_arp.h - selected subset
ARPHRD_NETROM = 0

View File

@@ -24,6 +24,10 @@ module Netlink
:pack => lambda { |val,obj| val.to_a.pack("L*") },
:unpack => lambda { |str,obj| IFACacheInfo.new(*(str.unpack("L*"))) }
rtattr :multicast, IFA_MULTICAST, :l3addr
# TODO: is there any difference between flags and ifa_flags? The latter only
# shows up on newer kernels
rtattr :ifa_flags, IFA_FLAGS, :uint
end
module Route