Commit d41dede2 authored by Mikio Hara's avatar Mikio Hara

syscall: add if_announce support for netbsd

Update #4866.

R=golang-dev, bradfitz, dave
CC=golang-dev
https://golang.org/cl/7382052
parent b1d51c63
...@@ -171,11 +171,12 @@ type FdSet C.fd_set ...@@ -171,11 +171,12 @@ type FdSet C.fd_set
// Routing and interface messages // Routing and interface messages
const ( const (
SizeofIfMsghdr = C.sizeof_struct_if_msghdr SizeofIfMsghdr = C.sizeof_struct_if_msghdr
SizeofIfData = C.sizeof_struct_if_data SizeofIfData = C.sizeof_struct_if_data
SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
SizeofRtMsghdr = C.sizeof_struct_rt_msghdr SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr
SizeofRtMetrics = C.sizeof_struct_rt_metrics SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
SizeofRtMetrics = C.sizeof_struct_rt_metrics
) )
type IfMsghdr C.struct_if_msghdr type IfMsghdr C.struct_if_msghdr
...@@ -184,6 +185,8 @@ type IfData C.struct_if_data ...@@ -184,6 +185,8 @@ type IfData C.struct_if_data
type IfaMsghdr C.struct_ifa_msghdr type IfaMsghdr C.struct_ifa_msghdr
type IfAnnounceMsghdr C.struct_if_announcemsghdr
type RtMsghdr C.struct_rt_msghdr type RtMsghdr C.struct_rt_msghdr
type RtMetrics C.struct_rt_metrics type RtMetrics C.struct_rt_metrics
......
...@@ -572,6 +572,8 @@ const ( ...@@ -572,6 +572,8 @@ const (
ICANON = 0x100 ICANON = 0x100
ICRNL = 0x100 ICRNL = 0x100
IEXTEN = 0x400 IEXTEN = 0x400
IFAN_ARRIVAL = 0x0
IFAN_DEPARTURE = 0x1
IFA_ROUTE = 0x1 IFA_ROUTE = 0x1
IFF_ALLMULTI = 0x200 IFF_ALLMULTI = 0x200
IFF_BROADCAST = 0x2 IFF_BROADCAST = 0x2
......
...@@ -562,6 +562,8 @@ const ( ...@@ -562,6 +562,8 @@ const (
ICANON = 0x100 ICANON = 0x100
ICRNL = 0x100 ICRNL = 0x100
IEXTEN = 0x400 IEXTEN = 0x400
IFAN_ARRIVAL = 0x0
IFAN_DEPARTURE = 0x1
IFA_ROUTE = 0x1 IFA_ROUTE = 0x1
IFF_ALLMULTI = 0x200 IFF_ALLMULTI = 0x200
IFF_BROADCAST = 0x2 IFF_BROADCAST = 0x2
......
...@@ -562,6 +562,8 @@ const ( ...@@ -562,6 +562,8 @@ const (
ICANON = 0x100 ICANON = 0x100
ICRNL = 0x100 ICRNL = 0x100
IEXTEN = 0x400 IEXTEN = 0x400
IFAN_ARRIVAL = 0x0
IFAN_DEPARTURE = 0x1
IFA_ROUTE = 0x1 IFA_ROUTE = 0x1
IFF_ALLMULTI = 0x200 IFF_ALLMULTI = 0x200
IFF_BROADCAST = 0x2 IFF_BROADCAST = 0x2
......
...@@ -219,11 +219,12 @@ type FdSet struct { ...@@ -219,11 +219,12 @@ type FdSet struct {
} }
const ( const (
SizeofIfMsghdr = 0x98 SizeofIfMsghdr = 0x98
SizeofIfData = 0x84 SizeofIfData = 0x84
SizeofIfaMsghdr = 0x18 SizeofIfaMsghdr = 0x18
SizeofRtMsghdr = 0x78 SizeofIfAnnounceMsghdr = 0x18
SizeofRtMetrics = 0x50 SizeofRtMsghdr = 0x78
SizeofRtMetrics = 0x50
) )
type IfMsghdr struct { type IfMsghdr struct {
...@@ -272,6 +273,15 @@ type IfaMsghdr struct { ...@@ -272,6 +273,15 @@ type IfaMsghdr struct {
Pad_cgo_0 [6]byte Pad_cgo_0 [6]byte
} }
type IfAnnounceMsghdr struct {
Msglen uint16
Version uint8
Type uint8
Index uint16
Name [16]int8
What uint16
}
type RtMsghdr struct { type RtMsghdr struct {
Msglen uint16 Msglen uint16
Version uint8 Version uint8
......
...@@ -226,11 +226,12 @@ type FdSet struct { ...@@ -226,11 +226,12 @@ type FdSet struct {
} }
const ( const (
SizeofIfMsghdr = 0x98 SizeofIfMsghdr = 0x98
SizeofIfData = 0x88 SizeofIfData = 0x88
SizeofIfaMsghdr = 0x18 SizeofIfaMsghdr = 0x18
SizeofRtMsghdr = 0x78 SizeofIfAnnounceMsghdr = 0x18
SizeofRtMetrics = 0x50 SizeofRtMsghdr = 0x78
SizeofRtMetrics = 0x50
) )
type IfMsghdr struct { type IfMsghdr struct {
...@@ -278,6 +279,15 @@ type IfaMsghdr struct { ...@@ -278,6 +279,15 @@ type IfaMsghdr struct {
Pad_cgo_0 [6]byte Pad_cgo_0 [6]byte
} }
type IfAnnounceMsghdr struct {
Msglen uint16
Version uint8
Type uint8
Index uint16
Name [16]int8
What uint16
}
type RtMsghdr struct { type RtMsghdr struct {
Msglen uint16 Msglen uint16
Version uint8 Version uint8
......
...@@ -219,11 +219,12 @@ type FdSet struct { ...@@ -219,11 +219,12 @@ type FdSet struct {
} }
const ( const (
SizeofIfMsghdr = 0x98 SizeofIfMsghdr = 0x98
SizeofIfData = 0x84 SizeofIfData = 0x84
SizeofIfaMsghdr = 0x18 SizeofIfaMsghdr = 0x18
SizeofRtMsghdr = 0x78 SizeofIfAnnounceMsghdr = 0x18
SizeofRtMetrics = 0x50 SizeofRtMsghdr = 0x78
SizeofRtMetrics = 0x50
) )
type IfMsghdr struct { type IfMsghdr struct {
...@@ -272,6 +273,15 @@ type IfaMsghdr struct { ...@@ -272,6 +273,15 @@ type IfaMsghdr struct {
Pad_cgo_0 [6]byte Pad_cgo_0 [6]byte
} }
type IfAnnounceMsghdr struct {
Msglen uint16
Version uint8
Type uint8
Index uint16
Name [16]int8
What uint16
}
type RtMsghdr struct { type RtMsghdr struct {
Msglen uint16 Msglen uint16
Version uint8 Version uint8
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment