1
0
mirror of https://github.com/golang/go synced 2024-09-25 11:20:13 -06:00

syscall: add if_announce support for freebsd

Update #4866.

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/7398047
This commit is contained in:
Mikio Hara 2013-02-24 12:04:48 +09:00
parent 72b6daa3ba
commit b1d51c63d6
8 changed files with 64 additions and 25 deletions

View File

@ -207,7 +207,7 @@ ccflags="$@"
$2 ~ /^LINUX_REBOOT_CMD_/ ||
$2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||
$2 !~ "NLA_TYPE_MASK" &&
$2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|RT|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P)_/ ||
$2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P)_/ ||
$2 ~ /^SIOC/ ||
$2 ~ /^TIOC/ ||
$2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ ||

View File

@ -193,12 +193,13 @@ 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
SizeofIfmaMsghdr = C.sizeof_struct_ifma_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
SizeofIfmaMsghdr = C.sizeof_struct_ifma_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
@ -209,6 +210,8 @@ type IfaMsghdr C.struct_ifa_msghdr
type IfmaMsghdr C.struct_ifma_msghdr
type IfAnnounceMsghdr C.struct_if_announcemsghdr
type RtMsghdr C.struct_rt_msghdr
type RtMetrics C.struct_rt_metrics

View File

@ -369,6 +369,8 @@ const (
F_UNLCK = 0x2
F_UNLCKSYS = 0x4
F_WRLCK = 0x3
IFAN_ARRIVAL = 0x0
IFAN_DEPARTURE = 0x1
IFF_ALLMULTI = 0x200
IFF_ALTPHYS = 0x4000
IFF_BROADCAST = 0x2

View File

@ -369,6 +369,8 @@ const (
F_UNLCK = 0x2
F_UNLCKSYS = 0x4
F_WRLCK = 0x3
IFAN_ARRIVAL = 0x0
IFAN_DEPARTURE = 0x1
IFF_ALLMULTI = 0x200
IFF_ALTPHYS = 0x4000
IFF_BROADCAST = 0x2

View File

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

View File

@ -271,12 +271,13 @@ type FdSet struct {
}
const (
SizeofIfMsghdr = 0x60
SizeofIfData = 0x50
SizeofIfaMsghdr = 0x14
SizeofIfmaMsghdr = 0x10
SizeofRtMsghdr = 0x5c
SizeofRtMetrics = 0x38
SizeofIfMsghdr = 0x60
SizeofIfData = 0x50
SizeofIfaMsghdr = 0x14
SizeofIfmaMsghdr = 0x10
SizeofIfAnnounceMsghdr = 0x18
SizeofRtMsghdr = 0x5c
SizeofRtMetrics = 0x38
)
type IfMsghdr struct {
@ -339,6 +340,15 @@ type IfmaMsghdr struct {
Pad_cgo_0 [2]byte
}
type IfAnnounceMsghdr struct {
Msglen uint16
Version uint8
Type uint8
Index uint16
Name [16]int8
What uint16
}
type RtMsghdr struct {
Msglen uint16
Version uint8

View File

@ -273,12 +273,13 @@ type FdSet struct {
}
const (
SizeofIfMsghdr = 0xa8
SizeofIfData = 0x98
SizeofIfaMsghdr = 0x14
SizeofIfmaMsghdr = 0x10
SizeofRtMsghdr = 0x98
SizeofRtMetrics = 0x70
SizeofIfMsghdr = 0xa8
SizeofIfData = 0x98
SizeofIfaMsghdr = 0x14
SizeofIfmaMsghdr = 0x10
SizeofIfAnnounceMsghdr = 0x18
SizeofRtMsghdr = 0x98
SizeofRtMetrics = 0x70
)
type IfMsghdr struct {
@ -341,6 +342,15 @@ type IfmaMsghdr struct {
Pad_cgo_0 [2]byte
}
type IfAnnounceMsghdr struct {
Msglen uint16
Version uint8
Type uint8
Index uint16
Name [16]int8
What uint16
}
type RtMsghdr struct {
Msglen uint16
Version uint8

View File

@ -273,12 +273,13 @@ type FdSet struct {
}
const (
SizeofIfMsghdr = 0x68
SizeofIfData = 0x58
SizeofIfaMsghdr = 0x14
SizeofIfmaMsghdr = 0x10
SizeofRtMsghdr = 0x5c
SizeofRtMetrics = 0x38
SizeofIfMsghdr = 0x68
SizeofIfData = 0x58
SizeofIfaMsghdr = 0x14
SizeofIfmaMsghdr = 0x10
SizeofIfAnnounceMsghdr = 0x18
SizeofRtMsghdr = 0x5c
SizeofRtMetrics = 0x38
)
type IfMsghdr struct {
@ -341,6 +342,15 @@ type IfmaMsghdr struct {
Pad_cgo_0 [2]byte
}
type IfAnnounceMsghdr struct {
Msglen uint16
Version uint8
Type uint8
Index uint16
Name [16]int8
What uint16
}
type RtMsghdr struct {
Msglen uint16
Version uint8