github.com/lianghucheng/zrddz@v0.0.0-20200923083010-c71f680932e2/src/golang.org/x/net/route/defs_openbsd.go (about)

     1  // Copyright 2016 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // +build ignore
     6  
     7  package route
     8  
     9  /*
    10  #include <sys/socket.h>
    11  #include <sys/sysctl.h>
    12  
    13  #include <net/if.h>
    14  #include <net/if_dl.h>
    15  #include <net/route.h>
    16  
    17  #include <netinet/in.h>
    18  */
    19  import "C"
    20  
    21  const (
    22  	sysAF_UNSPEC = C.AF_UNSPEC
    23  	sysAF_INET   = C.AF_INET
    24  	sysAF_ROUTE  = C.AF_ROUTE
    25  	sysAF_LINK   = C.AF_LINK
    26  	sysAF_INET6  = C.AF_INET6
    27  
    28  	sysSOCK_RAW = C.SOCK_RAW
    29  
    30  	sysNET_RT_DUMP    = C.NET_RT_DUMP
    31  	sysNET_RT_FLAGS   = C.NET_RT_FLAGS
    32  	sysNET_RT_IFLIST  = C.NET_RT_IFLIST
    33  	sysNET_RT_STATS   = C.NET_RT_STATS
    34  	sysNET_RT_TABLE   = C.NET_RT_TABLE
    35  	sysNET_RT_IFNAMES = C.NET_RT_IFNAMES
    36  	sysNET_RT_MAXID   = C.NET_RT_MAXID
    37  )
    38  
    39  const (
    40  	sysCTL_MAXNAME = C.CTL_MAXNAME
    41  
    42  	sysCTL_UNSPEC  = C.CTL_UNSPEC
    43  	sysCTL_KERN    = C.CTL_KERN
    44  	sysCTL_VM      = C.CTL_VM
    45  	sysCTL_FS      = C.CTL_FS
    46  	sysCTL_NET     = C.CTL_NET
    47  	sysCTL_DEBUG   = C.CTL_DEBUG
    48  	sysCTL_HW      = C.CTL_HW
    49  	sysCTL_MACHDEP = C.CTL_MACHDEP
    50  	sysCTL_DDB     = C.CTL_DDB
    51  	sysCTL_VFS     = C.CTL_VFS
    52  	sysCTL_MAXID   = C.CTL_MAXID
    53  )
    54  
    55  const (
    56  	sysRTM_VERSION = C.RTM_VERSION
    57  
    58  	sysRTM_ADD        = C.RTM_ADD
    59  	sysRTM_DELETE     = C.RTM_DELETE
    60  	sysRTM_CHANGE     = C.RTM_CHANGE
    61  	sysRTM_GET        = C.RTM_GET
    62  	sysRTM_LOSING     = C.RTM_LOSING
    63  	sysRTM_REDIRECT   = C.RTM_REDIRECT
    64  	sysRTM_MISS       = C.RTM_MISS
    65  	sysRTM_LOCK       = C.RTM_LOCK
    66  	sysRTM_RESOLVE    = C.RTM_RESOLVE
    67  	sysRTM_NEWADDR    = C.RTM_NEWADDR
    68  	sysRTM_DELADDR    = C.RTM_DELADDR
    69  	sysRTM_IFINFO     = C.RTM_IFINFO
    70  	sysRTM_IFANNOUNCE = C.RTM_IFANNOUNCE
    71  	sysRTM_DESYNC     = C.RTM_DESYNC
    72  	sysRTM_INVALIDATE = C.RTM_INVALIDATE
    73  	sysRTM_BFD        = C.RTM_BFD
    74  	sysRTM_PROPOSAL   = C.RTM_PROPOSAL
    75  
    76  	sysRTA_DST     = C.RTA_DST
    77  	sysRTA_GATEWAY = C.RTA_GATEWAY
    78  	sysRTA_NETMASK = C.RTA_NETMASK
    79  	sysRTA_GENMASK = C.RTA_GENMASK
    80  	sysRTA_IFP     = C.RTA_IFP
    81  	sysRTA_IFA     = C.RTA_IFA
    82  	sysRTA_AUTHOR  = C.RTA_AUTHOR
    83  	sysRTA_BRD     = C.RTA_BRD
    84  	sysRTA_SRC     = C.RTA_SRC
    85  	sysRTA_SRCMASK = C.RTA_SRCMASK
    86  	sysRTA_LABEL   = C.RTA_LABEL
    87  	sysRTA_BFD     = C.RTA_BFD
    88  	sysRTA_DNS     = C.RTA_DNS
    89  	sysRTA_STATIC  = C.RTA_STATIC
    90  	sysRTA_SEARCH  = C.RTA_SEARCH
    91  
    92  	sysRTAX_DST     = C.RTAX_DST
    93  	sysRTAX_GATEWAY = C.RTAX_GATEWAY
    94  	sysRTAX_NETMASK = C.RTAX_NETMASK
    95  	sysRTAX_GENMASK = C.RTAX_GENMASK
    96  	sysRTAX_IFP     = C.RTAX_IFP
    97  	sysRTAX_IFA     = C.RTAX_IFA
    98  	sysRTAX_AUTHOR  = C.RTAX_AUTHOR
    99  	sysRTAX_BRD     = C.RTAX_BRD
   100  	sysRTAX_SRC     = C.RTAX_SRC
   101  	sysRTAX_SRCMASK = C.RTAX_SRCMASK
   102  	sysRTAX_LABEL   = C.RTAX_LABEL
   103  	sysRTAX_BFD     = C.RTAX_BFD
   104  	sysRTAX_DNS     = C.RTAX_DNS
   105  	sysRTAX_STATIC  = C.RTAX_STATIC
   106  	sysRTAX_SEARCH  = C.RTAX_SEARCH
   107  	sysRTAX_MAX     = C.RTAX_MAX
   108  )
   109  
   110  const (
   111  	sizeofRtMsghdr = C.sizeof_struct_rt_msghdr
   112  
   113  	sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage
   114  	sizeofSockaddrInet    = C.sizeof_struct_sockaddr_in
   115  	sizeofSockaddrInet6   = C.sizeof_struct_sockaddr_in6
   116  )