defs_darwin.go 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. // +build ignore
  5. package route
  6. /*
  7. #include <sys/socket.h>
  8. #include <sys/sysctl.h>
  9. #include <net/if.h>
  10. #include <net/if_dl.h>
  11. #include <net/route.h>
  12. #include <netinet/in.h>
  13. */
  14. import "C"
  15. const (
  16. sysAF_UNSPEC = C.AF_UNSPEC
  17. sysAF_INET = C.AF_INET
  18. sysAF_ROUTE = C.AF_ROUTE
  19. sysAF_LINK = C.AF_LINK
  20. sysAF_INET6 = C.AF_INET6
  21. sysSOCK_RAW = C.SOCK_RAW
  22. sysNET_RT_DUMP = C.NET_RT_DUMP
  23. sysNET_RT_FLAGS = C.NET_RT_FLAGS
  24. sysNET_RT_IFLIST = C.NET_RT_IFLIST
  25. sysNET_RT_STAT = C.NET_RT_STAT
  26. sysNET_RT_TRASH = C.NET_RT_TRASH
  27. sysNET_RT_IFLIST2 = C.NET_RT_IFLIST2
  28. sysNET_RT_DUMP2 = C.NET_RT_DUMP2
  29. sysNET_RT_MAXID = C.NET_RT_MAXID
  30. )
  31. const (
  32. sysCTL_MAXNAME = C.CTL_MAXNAME
  33. sysCTL_UNSPEC = C.CTL_UNSPEC
  34. sysCTL_KERN = C.CTL_KERN
  35. sysCTL_VM = C.CTL_VM
  36. sysCTL_VFS = C.CTL_VFS
  37. sysCTL_NET = C.CTL_NET
  38. sysCTL_DEBUG = C.CTL_DEBUG
  39. sysCTL_HW = C.CTL_HW
  40. sysCTL_MACHDEP = C.CTL_MACHDEP
  41. sysCTL_USER = C.CTL_USER
  42. sysCTL_MAXID = C.CTL_MAXID
  43. )
  44. const (
  45. sysRTM_VERSION = C.RTM_VERSION
  46. sysRTM_ADD = C.RTM_ADD
  47. sysRTM_DELETE = C.RTM_DELETE
  48. sysRTM_CHANGE = C.RTM_CHANGE
  49. sysRTM_GET = C.RTM_GET
  50. sysRTM_LOSING = C.RTM_LOSING
  51. sysRTM_REDIRECT = C.RTM_REDIRECT
  52. sysRTM_MISS = C.RTM_MISS
  53. sysRTM_LOCK = C.RTM_LOCK
  54. sysRTM_OLDADD = C.RTM_OLDADD
  55. sysRTM_OLDDEL = C.RTM_OLDDEL
  56. sysRTM_RESOLVE = C.RTM_RESOLVE
  57. sysRTM_NEWADDR = C.RTM_NEWADDR
  58. sysRTM_DELADDR = C.RTM_DELADDR
  59. sysRTM_IFINFO = C.RTM_IFINFO
  60. sysRTM_NEWMADDR = C.RTM_NEWMADDR
  61. sysRTM_DELMADDR = C.RTM_DELMADDR
  62. sysRTM_IFINFO2 = C.RTM_IFINFO2
  63. sysRTM_NEWMADDR2 = C.RTM_NEWMADDR2
  64. sysRTM_GET2 = C.RTM_GET2
  65. sysRTA_DST = C.RTA_DST
  66. sysRTA_GATEWAY = C.RTA_GATEWAY
  67. sysRTA_NETMASK = C.RTA_NETMASK
  68. sysRTA_GENMASK = C.RTA_GENMASK
  69. sysRTA_IFP = C.RTA_IFP
  70. sysRTA_IFA = C.RTA_IFA
  71. sysRTA_AUTHOR = C.RTA_AUTHOR
  72. sysRTA_BRD = C.RTA_BRD
  73. sysRTAX_DST = C.RTAX_DST
  74. sysRTAX_GATEWAY = C.RTAX_GATEWAY
  75. sysRTAX_NETMASK = C.RTAX_NETMASK
  76. sysRTAX_GENMASK = C.RTAX_GENMASK
  77. sysRTAX_IFP = C.RTAX_IFP
  78. sysRTAX_IFA = C.RTAX_IFA
  79. sysRTAX_AUTHOR = C.RTAX_AUTHOR
  80. sysRTAX_BRD = C.RTAX_BRD
  81. sysRTAX_MAX = C.RTAX_MAX
  82. )
  83. const (
  84. sizeofIfMsghdrDarwin15 = C.sizeof_struct_if_msghdr
  85. sizeofIfaMsghdrDarwin15 = C.sizeof_struct_ifa_msghdr
  86. sizeofIfmaMsghdrDarwin15 = C.sizeof_struct_ifma_msghdr
  87. sizeofIfMsghdr2Darwin15 = C.sizeof_struct_if_msghdr2
  88. sizeofIfmaMsghdr2Darwin15 = C.sizeof_struct_ifma_msghdr2
  89. sizeofIfDataDarwin15 = C.sizeof_struct_if_data
  90. sizeofIfData64Darwin15 = C.sizeof_struct_if_data64
  91. sizeofRtMsghdrDarwin15 = C.sizeof_struct_rt_msghdr
  92. sizeofRtMsghdr2Darwin15 = C.sizeof_struct_rt_msghdr2
  93. sizeofRtMetricsDarwin15 = C.sizeof_struct_rt_metrics
  94. sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage
  95. sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
  96. sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
  97. )