]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: add if_announce support for freebsd
authorMikio Hara <mikioh.mikioh@gmail.com>
Sun, 24 Feb 2013 03:04:48 +0000 (12:04 +0900)
committerMikio Hara <mikioh.mikioh@gmail.com>
Sun, 24 Feb 2013 03:04:48 +0000 (12:04 +0900)
Update #4866.

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/7398047

src/pkg/syscall/mkerrors.sh
src/pkg/syscall/types_freebsd.go
src/pkg/syscall/zerrors_freebsd_386.go
src/pkg/syscall/zerrors_freebsd_amd64.go
src/pkg/syscall/zerrors_freebsd_arm.go
src/pkg/syscall/ztypes_freebsd_386.go
src/pkg/syscall/ztypes_freebsd_amd64.go
src/pkg/syscall/ztypes_freebsd_arm.go

index 16738c5b66be288413f03e2f8eb5f1194396e912..ef9cdf6582f8916979af1886553776a81fb8239a 100755 (executable)
@@ -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)_/ ||
index 6e1dd4310af0c439b478346eff2ebcad66ad49cd..7d4923d5a52709a1f06447ec3dbb899c5807fbfd 100644 (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
index cc00f0dcfea24967a60b05a717c72a150918a6a1..9cf82f90e0b6323222e41b9024f3671818f0f394 100644 (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
index b7b27b56fab0d159771e17794998ef7cadff0ab3..73257065913aace6f36452b9004050b71ca7c9ff 100644 (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
index b02a84cf7cedf1f7be9a9fa55b68ae1e38c89be0..92cade265d3177952adcc7d1e7113beb391270e8 100644 (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
index 4149948c5888eb1e1d712cb39d2a5c9096b5fa5f..89de58e53fbce8fcb9eab371abd9feee87e25912 100644 (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
index 80c12f607b3d5dc9b9868816970765e3b47bf3f2..d5e87682da41b0a2f92c3ef6c8947ebf2f3a5222 100644 (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
index 790f06e837cc3a27233bd07c20db5e94afba2b0f..4f67a39e60893effdafabe1c4fb34642d780e4d4 100644 (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