mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-03 15:47:35 -04:00
unix: add IfaCacheinfo on linux
Change-Id: Ifda2eed10f75eeddff7720676fd0a5feee78a7a5 Reviewed-on: https://go-review.googlesource.com/c/sys/+/195257 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Matt Layher <mdlayher@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
committed by
Tobias Klauser
parent
bc967efca4
commit
c3b328c6e5
@@ -726,6 +726,7 @@ const (
|
|||||||
SizeofRtAttr = C.sizeof_struct_rtattr
|
SizeofRtAttr = C.sizeof_struct_rtattr
|
||||||
SizeofIfInfomsg = C.sizeof_struct_ifinfomsg
|
SizeofIfInfomsg = C.sizeof_struct_ifinfomsg
|
||||||
SizeofIfAddrmsg = C.sizeof_struct_ifaddrmsg
|
SizeofIfAddrmsg = C.sizeof_struct_ifaddrmsg
|
||||||
|
SizeofIfaCacheinfo = C.sizeof_struct_ifa_cacheinfo
|
||||||
SizeofRtMsg = C.sizeof_struct_rtmsg
|
SizeofRtMsg = C.sizeof_struct_rtmsg
|
||||||
SizeofRtNexthop = C.sizeof_struct_rtnexthop
|
SizeofRtNexthop = C.sizeof_struct_rtnexthop
|
||||||
SizeofNdUseroptmsg = C.sizeof_struct_nduseroptmsg
|
SizeofNdUseroptmsg = C.sizeof_struct_nduseroptmsg
|
||||||
@@ -746,6 +747,8 @@ type IfInfomsg C.struct_ifinfomsg
|
|||||||
|
|
||||||
type IfAddrmsg C.struct_ifaddrmsg
|
type IfAddrmsg C.struct_ifaddrmsg
|
||||||
|
|
||||||
|
type IfaCacheinfo C.struct_ifa_cacheinfo
|
||||||
|
|
||||||
type RtMsg C.struct_rtmsg
|
type RtMsg C.struct_rtmsg
|
||||||
|
|
||||||
type RtNexthop C.struct_rtnexthop
|
type RtNexthop C.struct_rtnexthop
|
||||||
|
|||||||
@@ -622,6 +622,7 @@ const (
|
|||||||
SizeofRtAttr = 0x4
|
SizeofRtAttr = 0x4
|
||||||
SizeofIfInfomsg = 0x10
|
SizeofIfInfomsg = 0x10
|
||||||
SizeofIfAddrmsg = 0x8
|
SizeofIfAddrmsg = 0x8
|
||||||
|
SizeofIfaCacheinfo = 0x10
|
||||||
SizeofRtMsg = 0xc
|
SizeofRtMsg = 0xc
|
||||||
SizeofRtNexthop = 0x8
|
SizeofRtNexthop = 0x8
|
||||||
SizeofNdUseroptmsg = 0x10
|
SizeofNdUseroptmsg = 0x10
|
||||||
@@ -672,6 +673,13 @@ type IfAddrmsg struct {
|
|||||||
Index uint32
|
Index uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type IfaCacheinfo struct {
|
||||||
|
Prefered uint32
|
||||||
|
Valid uint32
|
||||||
|
Cstamp uint32
|
||||||
|
Tstamp uint32
|
||||||
|
}
|
||||||
|
|
||||||
type RtMsg struct {
|
type RtMsg struct {
|
||||||
Family uint8
|
Family uint8
|
||||||
Dst_len uint8
|
Dst_len uint8
|
||||||
|
|||||||
@@ -623,6 +623,7 @@ const (
|
|||||||
SizeofRtAttr = 0x4
|
SizeofRtAttr = 0x4
|
||||||
SizeofIfInfomsg = 0x10
|
SizeofIfInfomsg = 0x10
|
||||||
SizeofIfAddrmsg = 0x8
|
SizeofIfAddrmsg = 0x8
|
||||||
|
SizeofIfaCacheinfo = 0x10
|
||||||
SizeofRtMsg = 0xc
|
SizeofRtMsg = 0xc
|
||||||
SizeofRtNexthop = 0x8
|
SizeofRtNexthop = 0x8
|
||||||
SizeofNdUseroptmsg = 0x10
|
SizeofNdUseroptmsg = 0x10
|
||||||
@@ -673,6 +674,13 @@ type IfAddrmsg struct {
|
|||||||
Index uint32
|
Index uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type IfaCacheinfo struct {
|
||||||
|
Prefered uint32
|
||||||
|
Valid uint32
|
||||||
|
Cstamp uint32
|
||||||
|
Tstamp uint32
|
||||||
|
}
|
||||||
|
|
||||||
type RtMsg struct {
|
type RtMsg struct {
|
||||||
Family uint8
|
Family uint8
|
||||||
Dst_len uint8
|
Dst_len uint8
|
||||||
|
|||||||
@@ -626,6 +626,7 @@ const (
|
|||||||
SizeofRtAttr = 0x4
|
SizeofRtAttr = 0x4
|
||||||
SizeofIfInfomsg = 0x10
|
SizeofIfInfomsg = 0x10
|
||||||
SizeofIfAddrmsg = 0x8
|
SizeofIfAddrmsg = 0x8
|
||||||
|
SizeofIfaCacheinfo = 0x10
|
||||||
SizeofRtMsg = 0xc
|
SizeofRtMsg = 0xc
|
||||||
SizeofRtNexthop = 0x8
|
SizeofRtNexthop = 0x8
|
||||||
SizeofNdUseroptmsg = 0x10
|
SizeofNdUseroptmsg = 0x10
|
||||||
@@ -676,6 +677,13 @@ type IfAddrmsg struct {
|
|||||||
Index uint32
|
Index uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type IfaCacheinfo struct {
|
||||||
|
Prefered uint32
|
||||||
|
Valid uint32
|
||||||
|
Cstamp uint32
|
||||||
|
Tstamp uint32
|
||||||
|
}
|
||||||
|
|
||||||
type RtMsg struct {
|
type RtMsg struct {
|
||||||
Family uint8
|
Family uint8
|
||||||
Dst_len uint8
|
Dst_len uint8
|
||||||
|
|||||||
@@ -624,6 +624,7 @@ const (
|
|||||||
SizeofRtAttr = 0x4
|
SizeofRtAttr = 0x4
|
||||||
SizeofIfInfomsg = 0x10
|
SizeofIfInfomsg = 0x10
|
||||||
SizeofIfAddrmsg = 0x8
|
SizeofIfAddrmsg = 0x8
|
||||||
|
SizeofIfaCacheinfo = 0x10
|
||||||
SizeofRtMsg = 0xc
|
SizeofRtMsg = 0xc
|
||||||
SizeofRtNexthop = 0x8
|
SizeofRtNexthop = 0x8
|
||||||
SizeofNdUseroptmsg = 0x10
|
SizeofNdUseroptmsg = 0x10
|
||||||
@@ -674,6 +675,13 @@ type IfAddrmsg struct {
|
|||||||
Index uint32
|
Index uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type IfaCacheinfo struct {
|
||||||
|
Prefered uint32
|
||||||
|
Valid uint32
|
||||||
|
Cstamp uint32
|
||||||
|
Tstamp uint32
|
||||||
|
}
|
||||||
|
|
||||||
type RtMsg struct {
|
type RtMsg struct {
|
||||||
Family uint8
|
Family uint8
|
||||||
Dst_len uint8
|
Dst_len uint8
|
||||||
|
|||||||
@@ -625,6 +625,7 @@ const (
|
|||||||
SizeofRtAttr = 0x4
|
SizeofRtAttr = 0x4
|
||||||
SizeofIfInfomsg = 0x10
|
SizeofIfInfomsg = 0x10
|
||||||
SizeofIfAddrmsg = 0x8
|
SizeofIfAddrmsg = 0x8
|
||||||
|
SizeofIfaCacheinfo = 0x10
|
||||||
SizeofRtMsg = 0xc
|
SizeofRtMsg = 0xc
|
||||||
SizeofRtNexthop = 0x8
|
SizeofRtNexthop = 0x8
|
||||||
SizeofNdUseroptmsg = 0x10
|
SizeofNdUseroptmsg = 0x10
|
||||||
@@ -675,6 +676,13 @@ type IfAddrmsg struct {
|
|||||||
Index uint32
|
Index uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type IfaCacheinfo struct {
|
||||||
|
Prefered uint32
|
||||||
|
Valid uint32
|
||||||
|
Cstamp uint32
|
||||||
|
Tstamp uint32
|
||||||
|
}
|
||||||
|
|
||||||
type RtMsg struct {
|
type RtMsg struct {
|
||||||
Family uint8
|
Family uint8
|
||||||
Dst_len uint8
|
Dst_len uint8
|
||||||
|
|||||||
@@ -624,6 +624,7 @@ const (
|
|||||||
SizeofRtAttr = 0x4
|
SizeofRtAttr = 0x4
|
||||||
SizeofIfInfomsg = 0x10
|
SizeofIfInfomsg = 0x10
|
||||||
SizeofIfAddrmsg = 0x8
|
SizeofIfAddrmsg = 0x8
|
||||||
|
SizeofIfaCacheinfo = 0x10
|
||||||
SizeofRtMsg = 0xc
|
SizeofRtMsg = 0xc
|
||||||
SizeofRtNexthop = 0x8
|
SizeofRtNexthop = 0x8
|
||||||
SizeofNdUseroptmsg = 0x10
|
SizeofNdUseroptmsg = 0x10
|
||||||
@@ -674,6 +675,13 @@ type IfAddrmsg struct {
|
|||||||
Index uint32
|
Index uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type IfaCacheinfo struct {
|
||||||
|
Prefered uint32
|
||||||
|
Valid uint32
|
||||||
|
Cstamp uint32
|
||||||
|
Tstamp uint32
|
||||||
|
}
|
||||||
|
|
||||||
type RtMsg struct {
|
type RtMsg struct {
|
||||||
Family uint8
|
Family uint8
|
||||||
Dst_len uint8
|
Dst_len uint8
|
||||||
|
|||||||
@@ -624,6 +624,7 @@ const (
|
|||||||
SizeofRtAttr = 0x4
|
SizeofRtAttr = 0x4
|
||||||
SizeofIfInfomsg = 0x10
|
SizeofIfInfomsg = 0x10
|
||||||
SizeofIfAddrmsg = 0x8
|
SizeofIfAddrmsg = 0x8
|
||||||
|
SizeofIfaCacheinfo = 0x10
|
||||||
SizeofRtMsg = 0xc
|
SizeofRtMsg = 0xc
|
||||||
SizeofRtNexthop = 0x8
|
SizeofRtNexthop = 0x8
|
||||||
SizeofNdUseroptmsg = 0x10
|
SizeofNdUseroptmsg = 0x10
|
||||||
@@ -674,6 +675,13 @@ type IfAddrmsg struct {
|
|||||||
Index uint32
|
Index uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type IfaCacheinfo struct {
|
||||||
|
Prefered uint32
|
||||||
|
Valid uint32
|
||||||
|
Cstamp uint32
|
||||||
|
Tstamp uint32
|
||||||
|
}
|
||||||
|
|
||||||
type RtMsg struct {
|
type RtMsg struct {
|
||||||
Family uint8
|
Family uint8
|
||||||
Dst_len uint8
|
Dst_len uint8
|
||||||
|
|||||||
@@ -625,6 +625,7 @@ const (
|
|||||||
SizeofRtAttr = 0x4
|
SizeofRtAttr = 0x4
|
||||||
SizeofIfInfomsg = 0x10
|
SizeofIfInfomsg = 0x10
|
||||||
SizeofIfAddrmsg = 0x8
|
SizeofIfAddrmsg = 0x8
|
||||||
|
SizeofIfaCacheinfo = 0x10
|
||||||
SizeofRtMsg = 0xc
|
SizeofRtMsg = 0xc
|
||||||
SizeofRtNexthop = 0x8
|
SizeofRtNexthop = 0x8
|
||||||
SizeofNdUseroptmsg = 0x10
|
SizeofNdUseroptmsg = 0x10
|
||||||
@@ -675,6 +676,13 @@ type IfAddrmsg struct {
|
|||||||
Index uint32
|
Index uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type IfaCacheinfo struct {
|
||||||
|
Prefered uint32
|
||||||
|
Valid uint32
|
||||||
|
Cstamp uint32
|
||||||
|
Tstamp uint32
|
||||||
|
}
|
||||||
|
|
||||||
type RtMsg struct {
|
type RtMsg struct {
|
||||||
Family uint8
|
Family uint8
|
||||||
Dst_len uint8
|
Dst_len uint8
|
||||||
|
|||||||
@@ -625,6 +625,7 @@ const (
|
|||||||
SizeofRtAttr = 0x4
|
SizeofRtAttr = 0x4
|
||||||
SizeofIfInfomsg = 0x10
|
SizeofIfInfomsg = 0x10
|
||||||
SizeofIfAddrmsg = 0x8
|
SizeofIfAddrmsg = 0x8
|
||||||
|
SizeofIfaCacheinfo = 0x10
|
||||||
SizeofRtMsg = 0xc
|
SizeofRtMsg = 0xc
|
||||||
SizeofRtNexthop = 0x8
|
SizeofRtNexthop = 0x8
|
||||||
SizeofNdUseroptmsg = 0x10
|
SizeofNdUseroptmsg = 0x10
|
||||||
@@ -675,6 +676,13 @@ type IfAddrmsg struct {
|
|||||||
Index uint32
|
Index uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type IfaCacheinfo struct {
|
||||||
|
Prefered uint32
|
||||||
|
Valid uint32
|
||||||
|
Cstamp uint32
|
||||||
|
Tstamp uint32
|
||||||
|
}
|
||||||
|
|
||||||
type RtMsg struct {
|
type RtMsg struct {
|
||||||
Family uint8
|
Family uint8
|
||||||
Dst_len uint8
|
Dst_len uint8
|
||||||
|
|||||||
@@ -625,6 +625,7 @@ const (
|
|||||||
SizeofRtAttr = 0x4
|
SizeofRtAttr = 0x4
|
||||||
SizeofIfInfomsg = 0x10
|
SizeofIfInfomsg = 0x10
|
||||||
SizeofIfAddrmsg = 0x8
|
SizeofIfAddrmsg = 0x8
|
||||||
|
SizeofIfaCacheinfo = 0x10
|
||||||
SizeofRtMsg = 0xc
|
SizeofRtMsg = 0xc
|
||||||
SizeofRtNexthop = 0x8
|
SizeofRtNexthop = 0x8
|
||||||
SizeofNdUseroptmsg = 0x10
|
SizeofNdUseroptmsg = 0x10
|
||||||
@@ -675,6 +676,13 @@ type IfAddrmsg struct {
|
|||||||
Index uint32
|
Index uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type IfaCacheinfo struct {
|
||||||
|
Prefered uint32
|
||||||
|
Valid uint32
|
||||||
|
Cstamp uint32
|
||||||
|
Tstamp uint32
|
||||||
|
}
|
||||||
|
|
||||||
type RtMsg struct {
|
type RtMsg struct {
|
||||||
Family uint8
|
Family uint8
|
||||||
Dst_len uint8
|
Dst_len uint8
|
||||||
|
|||||||
@@ -624,6 +624,7 @@ const (
|
|||||||
SizeofRtAttr = 0x4
|
SizeofRtAttr = 0x4
|
||||||
SizeofIfInfomsg = 0x10
|
SizeofIfInfomsg = 0x10
|
||||||
SizeofIfAddrmsg = 0x8
|
SizeofIfAddrmsg = 0x8
|
||||||
|
SizeofIfaCacheinfo = 0x10
|
||||||
SizeofRtMsg = 0xc
|
SizeofRtMsg = 0xc
|
||||||
SizeofRtNexthop = 0x8
|
SizeofRtNexthop = 0x8
|
||||||
SizeofNdUseroptmsg = 0x10
|
SizeofNdUseroptmsg = 0x10
|
||||||
@@ -674,6 +675,13 @@ type IfAddrmsg struct {
|
|||||||
Index uint32
|
Index uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type IfaCacheinfo struct {
|
||||||
|
Prefered uint32
|
||||||
|
Valid uint32
|
||||||
|
Cstamp uint32
|
||||||
|
Tstamp uint32
|
||||||
|
}
|
||||||
|
|
||||||
type RtMsg struct {
|
type RtMsg struct {
|
||||||
Family uint8
|
Family uint8
|
||||||
Dst_len uint8
|
Dst_len uint8
|
||||||
|
|||||||
@@ -623,6 +623,7 @@ const (
|
|||||||
SizeofRtAttr = 0x4
|
SizeofRtAttr = 0x4
|
||||||
SizeofIfInfomsg = 0x10
|
SizeofIfInfomsg = 0x10
|
||||||
SizeofIfAddrmsg = 0x8
|
SizeofIfAddrmsg = 0x8
|
||||||
|
SizeofIfaCacheinfo = 0x10
|
||||||
SizeofRtMsg = 0xc
|
SizeofRtMsg = 0xc
|
||||||
SizeofRtNexthop = 0x8
|
SizeofRtNexthop = 0x8
|
||||||
SizeofNdUseroptmsg = 0x10
|
SizeofNdUseroptmsg = 0x10
|
||||||
@@ -673,6 +674,13 @@ type IfAddrmsg struct {
|
|||||||
Index uint32
|
Index uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type IfaCacheinfo struct {
|
||||||
|
Prefered uint32
|
||||||
|
Valid uint32
|
||||||
|
Cstamp uint32
|
||||||
|
Tstamp uint32
|
||||||
|
}
|
||||||
|
|
||||||
type RtMsg struct {
|
type RtMsg struct {
|
||||||
Family uint8
|
Family uint8
|
||||||
Dst_len uint8
|
Dst_len uint8
|
||||||
|
|||||||
@@ -627,6 +627,7 @@ const (
|
|||||||
SizeofRtAttr = 0x4
|
SizeofRtAttr = 0x4
|
||||||
SizeofIfInfomsg = 0x10
|
SizeofIfInfomsg = 0x10
|
||||||
SizeofIfAddrmsg = 0x8
|
SizeofIfAddrmsg = 0x8
|
||||||
|
SizeofIfaCacheinfo = 0x10
|
||||||
SizeofRtMsg = 0xc
|
SizeofRtMsg = 0xc
|
||||||
SizeofRtNexthop = 0x8
|
SizeofRtNexthop = 0x8
|
||||||
SizeofNdUseroptmsg = 0x10
|
SizeofNdUseroptmsg = 0x10
|
||||||
@@ -677,6 +678,13 @@ type IfAddrmsg struct {
|
|||||||
Index uint32
|
Index uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type IfaCacheinfo struct {
|
||||||
|
Prefered uint32
|
||||||
|
Valid uint32
|
||||||
|
Cstamp uint32
|
||||||
|
Tstamp uint32
|
||||||
|
}
|
||||||
|
|
||||||
type RtMsg struct {
|
type RtMsg struct {
|
||||||
Family uint8
|
Family uint8
|
||||||
Dst_len uint8
|
Dst_len uint8
|
||||||
|
|||||||
Reference in New Issue
Block a user