vendor: Update vishvanana/netlink dependency

This commit is contained in:
Aithal
2017-02-23 09:53:11 -08:00
parent 7eeb21a999
commit 460e1c5be3
46 changed files with 1773 additions and 230 deletions

View File

@@ -17,9 +17,10 @@ import (
const (
// Family type definitions
FAMILY_ALL = syscall.AF_UNSPEC
FAMILY_V4 = syscall.AF_INET
FAMILY_V6 = syscall.AF_INET6
FAMILY_ALL = syscall.AF_UNSPEC
FAMILY_V4 = syscall.AF_INET
FAMILY_V6 = syscall.AF_INET6
FAMILY_MPLS = AF_MPLS
)
// SupportedNlFamilies contains the list of netlink families this netlink package supports
@@ -656,6 +657,13 @@ func Uint32Attr(v uint32) []byte {
return bytes
}
func Uint64Attr(v uint64) []byte {
native := NativeEndian()
bytes := make([]byte, 8)
native.PutUint64(bytes, v)
return bytes
}
func ParseRouteAttr(b []byte) ([]syscall.NetlinkRouteAttr, error) {
var attrs []syscall.NetlinkRouteAttr
for len(b) >= syscall.SizeofRtAttr {