github.com/lianghucheng/zrddz@v0.0.0-20200923083010-c71f680932e2/src/golang.org/x/net/route/defs_darwin.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_STAT    = C.NET_RT_STAT
    34  	sysNET_RT_TRASH   = C.NET_RT_TRASH
    35  	sysNET_RT_IFLIST2 = C.NET_RT_IFLIST2
    36  	sysNET_RT_DUMP2   = C.NET_RT_DUMP2
    37  	sysNET_RT_MAXID   = C.NET_RT_MAXID
    38  )
    39  
    40  const (
    41  	sysCTL_MAXNAME = C.CTL_MAXNAME
    42  
    43  	sysCTL_UNSPEC  = C.CTL_UNSPEC
    44  	sysCTL_KERN    = C.CTL_KERN
    45  	sysCTL_VM      = C.CTL_VM
    46  	sysCTL_VFS     = C.CTL_VFS
    47  	sysCTL_NET     = C.CTL_NET
    48  	sysCTL_DEBUG   = C.CTL_DEBUG
    49  	sysCTL_HW      = C.CTL_HW
    50  	sysCTL_MACHDEP = C.CTL_MACHDEP
    51  	sysCTL_USER    = C.CTL_USER
    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_OLDADD    = C.RTM_OLDADD
    67  	sysRTM_OLDDEL    = C.RTM_OLDDEL
    68  	sysRTM_RESOLVE   = C.RTM_RESOLVE
    69  	sysRTM_NEWADDR   = C.RTM_NEWADDR
    70  	sysRTM_DELADDR   = C.RTM_DELADDR
    71  	sysRTM_IFINFO    = C.RTM_IFINFO
    72  	sysRTM_NEWMADDR  = C.RTM_NEWMADDR
    73  	sysRTM_DELMADDR  = C.RTM_DELMADDR
    74  	sysRTM_IFINFO2   = C.RTM_IFINFO2
    75  	sysRTM_NEWMADDR2 = C.RTM_NEWMADDR2
    76  	sysRTM_GET2      = C.RTM_GET2
    77  
    78  	sysRTA_DST     = C.RTA_DST
    79  	sysRTA_GATEWAY = C.RTA_GATEWAY
    80  	sysRTA_NETMASK = C.RTA_NETMASK
    81  	sysRTA_GENMASK = C.RTA_GENMASK
    82  	sysRTA_IFP     = C.RTA_IFP
    83  	sysRTA_IFA     = C.RTA_IFA
    84  	sysRTA_AUTHOR  = C.RTA_AUTHOR
    85  	sysRTA_BRD     = C.RTA_BRD
    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_MAX     = C.RTAX_MAX
    96  )
    97  
    98  const (
    99  	sizeofIfMsghdrDarwin15    = C.sizeof_struct_if_msghdr
   100  	sizeofIfaMsghdrDarwin15   = C.sizeof_struct_ifa_msghdr
   101  	sizeofIfmaMsghdrDarwin15  = C.sizeof_struct_ifma_msghdr
   102  	sizeofIfMsghdr2Darwin15   = C.sizeof_struct_if_msghdr2
   103  	sizeofIfmaMsghdr2Darwin15 = C.sizeof_struct_ifma_msghdr2
   104  	sizeofIfDataDarwin15      = C.sizeof_struct_if_data
   105  	sizeofIfData64Darwin15    = C.sizeof_struct_if_data64
   106  
   107  	sizeofRtMsghdrDarwin15  = C.sizeof_struct_rt_msghdr
   108  	sizeofRtMsghdr2Darwin15 = C.sizeof_struct_rt_msghdr2
   109  	sizeofRtMetricsDarwin15 = C.sizeof_struct_rt_metrics
   110  
   111  	sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage
   112  	sizeofSockaddrInet    = C.sizeof_struct_sockaddr_in
   113  	sizeofSockaddrInet6   = C.sizeof_struct_sockaddr_in6
   114  )