1
0
mirror of https://github.com/golang/go synced 2024-11-26 10:48:22 -07:00

syscall: add if_announce support for openbsd

Update #4866.

R=golang-dev
CC=golang-dev
https://golang.org/cl/7382053
This commit is contained in:
Mikio Hara 2013-02-24 12:07:20 +09:00
parent d41dede280
commit 6a41b9983c
5 changed files with 44 additions and 15 deletions

View File

@ -187,11 +187,12 @@ type FdSet C.fd_set
// Routing and interface messages
const (
SizeofIfMsghdr = C.sizeof_struct_if_msghdr
SizeofIfData = C.sizeof_struct_if_data
SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
SizeofRtMetrics = C.sizeof_struct_rt_metrics
SizeofIfMsghdr = C.sizeof_struct_if_msghdr
SizeofIfData = C.sizeof_struct_if_data
SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr
SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
SizeofRtMetrics = C.sizeof_struct_rt_metrics
)
type IfMsghdr C.struct_if_msghdr
@ -200,6 +201,8 @@ type IfData C.struct_if_data
type IfaMsghdr C.struct_ifa_msghdr
type IfAnnounceMsghdr C.struct_if_announcemsghdr
type RtMsghdr C.struct_rt_msghdr
type RtMetrics C.struct_rt_metrics

View File

@ -441,6 +441,8 @@ const (
ICANON = 0x100
ICRNL = 0x100
IEXTEN = 0x400
IFAN_ARRIVAL = 0x0
IFAN_DEPARTURE = 0x1
IFA_ROUTE = 0x1
IFF_ALLMULTI = 0x200
IFF_BROADCAST = 0x2

View File

@ -447,6 +447,8 @@ const (
ICANON = 0x100
ICRNL = 0x100
IEXTEN = 0x400
IFAN_ARRIVAL = 0x0
IFAN_DEPARTURE = 0x1
IFA_ROUTE = 0x1
IFF_ALLMULTI = 0x200
IFF_BROADCAST = 0x2

View File

@ -260,11 +260,12 @@ type FdSet struct {
}
const (
SizeofIfMsghdr = 0xe8
SizeofIfData = 0xd0
SizeofIfaMsghdr = 0x18
SizeofRtMsghdr = 0x58
SizeofRtMetrics = 0x30
SizeofIfMsghdr = 0xe8
SizeofIfData = 0xd0
SizeofIfaMsghdr = 0x18
SizeofIfAnnounceMsghdr = 0x1a
SizeofRtMsghdr = 0x58
SizeofRtMetrics = 0x30
)
type IfMsghdr struct {
@ -321,6 +322,16 @@ type IfaMsghdr struct {
Metric int32
}
type IfAnnounceMsghdr struct {
Msglen uint16
Version uint8
Type uint8
Hdrlen uint16
Index uint16
What uint16
Name [16]int8
}
type RtMsghdr struct {
Msglen uint16
Version uint8

View File

@ -265,11 +265,12 @@ type FdSet struct {
}
const (
SizeofIfMsghdr = 0xf8
SizeofIfData = 0xe0
SizeofIfaMsghdr = 0x18
SizeofRtMsghdr = 0x58
SizeofRtMetrics = 0x30
SizeofIfMsghdr = 0xf8
SizeofIfData = 0xe0
SizeofIfaMsghdr = 0x18
SizeofIfAnnounceMsghdr = 0x1a
SizeofRtMsghdr = 0x58
SizeofRtMetrics = 0x30
)
type IfMsghdr struct {
@ -328,6 +329,16 @@ type IfaMsghdr struct {
Metric int32
}
type IfAnnounceMsghdr struct {
Msglen uint16
Version uint8
Type uint8
Hdrlen uint16
Index uint16
What uint16
Name [16]int8
}
type RtMsghdr struct {
Msglen uint16
Version uint8