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

R=golang-dev
CC=golang-dev
https://golang.org/cl/7382053

src/pkg/syscall/types_openbsd.go
src/pkg/syscall/zerrors_openbsd_386.go
src/pkg/syscall/zerrors_openbsd_amd64.go
src/pkg/syscall/ztypes_openbsd_386.go
src/pkg/syscall/ztypes_openbsd_amd64.go

index 518688833bd9eb2098274bd873d61d481d131d29..2430a166b412a7af60cda87eab3ab27e5827e91a 100644 (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
index 1dad64508ad69f1dfbed3f8ebcaa1fa2f7256741..5330d15b15005b75c79b763205ea112a4968aeb1 100644 (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
index 3668602895df19d86e8a12bfb6d08f707beeb826..5a7edd341b8dd4c87503b9607d85e0790145bc01 100644 (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
index 0505f80ef9fef397e36ddc36cb5afa7e2866e3a8..528e92c85daa4fd2f449ec50b727e7907b795d4d 100644 (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
index 362abac73bbd94f1b74c97c8aadf99ef7641a3a9..4b93930540ac90530ff712f84f0a6c45d42f138a 100644 (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