github.com/lianghucheng/zrddz@v0.0.0-20200923083010-c71f680932e2/src/golang.org/x/net/route/defs_dragonfly.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_MAXID  = C.NET_RT_MAXID
    34  )
    35  
    36  const (
    37  	sysCTL_MAXNAME = C.CTL_MAXNAME
    38  
    39  	sysCTL_UNSPEC   = C.CTL_UNSPEC
    40  	sysCTL_KERN     = C.CTL_KERN
    41  	sysCTL_VM       = C.CTL_VM
    42  	sysCTL_VFS      = C.CTL_VFS
    43  	sysCTL_NET      = C.CTL_NET
    44  	sysCTL_DEBUG    = C.CTL_DEBUG
    45  	sysCTL_HW       = C.CTL_HW
    46  	sysCTL_MACHDEP  = C.CTL_MACHDEP
    47  	sysCTL_USER     = C.CTL_USER
    48  	sysCTL_P1003_1B = C.CTL_P1003_1B
    49  	sysCTL_LWKT     = C.CTL_LWKT
    50  	sysCTL_MAXID    = C.CTL_MAXID
    51  )
    52  
    53  const (
    54  	sysRTM_VERSION = C.RTM_VERSION
    55  
    56  	sysRTM_ADD        = C.RTM_ADD
    57  	sysRTM_DELETE     = C.RTM_DELETE
    58  	sysRTM_CHANGE     = C.RTM_CHANGE
    59  	sysRTM_GET        = C.RTM_GET
    60  	sysRTM_LOSING     = C.RTM_LOSING
    61  	sysRTM_REDIRECT   = C.RTM_REDIRECT
    62  	sysRTM_MISS       = C.RTM_MISS
    63  	sysRTM_LOCK       = C.RTM_LOCK
    64  	sysRTM_OLDADD     = C.RTM_OLDADD
    65  	sysRTM_OLDDEL     = C.RTM_OLDDEL
    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_NEWMADDR   = C.RTM_NEWMADDR
    71  	sysRTM_DELMADDR   = C.RTM_DELMADDR
    72  	sysRTM_IFANNOUNCE = C.RTM_IFANNOUNCE
    73  	sysRTM_IEEE80211  = C.RTM_IEEE80211
    74  
    75  	sysRTA_DST     = C.RTA_DST
    76  	sysRTA_GATEWAY = C.RTA_GATEWAY
    77  	sysRTA_NETMASK = C.RTA_NETMASK
    78  	sysRTA_GENMASK = C.RTA_GENMASK
    79  	sysRTA_IFP     = C.RTA_IFP
    80  	sysRTA_IFA     = C.RTA_IFA
    81  	sysRTA_AUTHOR  = C.RTA_AUTHOR
    82  	sysRTA_BRD     = C.RTA_BRD
    83  	sysRTA_MPLS1   = C.RTA_MPLS1
    84  	sysRTA_MPLS2   = C.RTA_MPLS2
    85  	sysRTA_MPLS3   = C.RTA_MPLS3
    86  
    87  	sysRTAX_DST     = C.RTAX_DST
    88  	sysRTAX_GATEWAY = C.RTAX_GATEWAY
    89  	sysRTAX_NETMASK = C.RTAX_NETMASK
    90  	sysRTAX_GENMASK = C.RTAX_GENMASK
    91  	sysRTAX_IFP     = C.RTAX_IFP
    92  	sysRTAX_IFA     = C.RTAX_IFA
    93  	sysRTAX_AUTHOR  = C.RTAX_AUTHOR
    94  	sysRTAX_BRD     = C.RTAX_BRD
    95  	sysRTAX_MPLS1   = C.RTAX_MPLS1
    96  	sysRTAX_MPLS2   = C.RTAX_MPLS2
    97  	sysRTAX_MPLS3   = C.RTAX_MPLS3
    98  	sysRTAX_MAX     = C.RTAX_MAX
    99  )
   100  
   101  const (
   102  	sizeofIfMsghdrDragonFlyBSD4         = C.sizeof_struct_if_msghdr
   103  	sizeofIfaMsghdrDragonFlyBSD4        = C.sizeof_struct_ifa_msghdr
   104  	sizeofIfmaMsghdrDragonFlyBSD4       = C.sizeof_struct_ifma_msghdr
   105  	sizeofIfAnnouncemsghdrDragonFlyBSD4 = C.sizeof_struct_if_announcemsghdr
   106  
   107  	sizeofRtMsghdrDragonFlyBSD4  = C.sizeof_struct_rt_msghdr
   108  	sizeofRtMetricsDragonFlyBSD4 = C.sizeof_struct_rt_metrics
   109  
   110  	sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage
   111  	sizeofSockaddrInet    = C.sizeof_struct_sockaddr_in
   112  	sizeofSockaddrInet6   = C.sizeof_struct_sockaddr_in6
   113  )