defs_openbsd.go 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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_STATS = C.NET_RT_STATS
  26. sysNET_RT_TABLE = C.NET_RT_TABLE
  27. sysNET_RT_IFNAMES = C.NET_RT_IFNAMES
  28. sysNET_RT_MAXID = C.NET_RT_MAXID
  29. )
  30. const (
  31. sysCTL_MAXNAME = C.CTL_MAXNAME
  32. sysCTL_UNSPEC = C.CTL_UNSPEC
  33. sysCTL_KERN = C.CTL_KERN
  34. sysCTL_VM = C.CTL_VM
  35. sysCTL_FS = C.CTL_FS
  36. sysCTL_NET = C.CTL_NET
  37. sysCTL_DEBUG = C.CTL_DEBUG
  38. sysCTL_HW = C.CTL_HW
  39. sysCTL_MACHDEP = C.CTL_MACHDEP
  40. sysCTL_DDB = C.CTL_DDB
  41. sysCTL_VFS = C.CTL_VFS
  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_RESOLVE = C.RTM_RESOLVE
  55. sysRTM_NEWADDR = C.RTM_NEWADDR
  56. sysRTM_DELADDR = C.RTM_DELADDR
  57. sysRTM_IFINFO = C.RTM_IFINFO
  58. sysRTM_IFANNOUNCE = C.RTM_IFANNOUNCE
  59. sysRTM_DESYNC = C.RTM_DESYNC
  60. sysRTM_INVALIDATE = C.RTM_INVALIDATE
  61. sysRTM_BFD = C.RTM_BFD
  62. sysRTM_PROPOSAL = C.RTM_PROPOSAL
  63. sysRTA_DST = C.RTA_DST
  64. sysRTA_GATEWAY = C.RTA_GATEWAY
  65. sysRTA_NETMASK = C.RTA_NETMASK
  66. sysRTA_GENMASK = C.RTA_GENMASK
  67. sysRTA_IFP = C.RTA_IFP
  68. sysRTA_IFA = C.RTA_IFA
  69. sysRTA_AUTHOR = C.RTA_AUTHOR
  70. sysRTA_BRD = C.RTA_BRD
  71. sysRTA_SRC = C.RTA_SRC
  72. sysRTA_SRCMASK = C.RTA_SRCMASK
  73. sysRTA_LABEL = C.RTA_LABEL
  74. sysRTA_BFD = C.RTA_BFD
  75. sysRTA_DNS = C.RTA_DNS
  76. sysRTA_STATIC = C.RTA_STATIC
  77. sysRTA_SEARCH = C.RTA_SEARCH
  78. sysRTAX_DST = C.RTAX_DST
  79. sysRTAX_GATEWAY = C.RTAX_GATEWAY
  80. sysRTAX_NETMASK = C.RTAX_NETMASK
  81. sysRTAX_GENMASK = C.RTAX_GENMASK
  82. sysRTAX_IFP = C.RTAX_IFP
  83. sysRTAX_IFA = C.RTAX_IFA
  84. sysRTAX_AUTHOR = C.RTAX_AUTHOR
  85. sysRTAX_BRD = C.RTAX_BRD
  86. sysRTAX_SRC = C.RTAX_SRC
  87. sysRTAX_SRCMASK = C.RTAX_SRCMASK
  88. sysRTAX_LABEL = C.RTAX_LABEL
  89. sysRTAX_BFD = C.RTAX_BFD
  90. sysRTAX_DNS = C.RTAX_DNS
  91. sysRTAX_STATIC = C.RTAX_STATIC
  92. sysRTAX_SEARCH = C.RTAX_SEARCH
  93. sysRTAX_MAX = C.RTAX_MAX
  94. )
  95. const (
  96. sizeofRtMsghdr = C.sizeof_struct_rt_msghdr
  97. sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage
  98. sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
  99. sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
  100. )