defs_openbsd.go 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. sysRTA_DST = C.RTA_DST
  61. sysRTA_GATEWAY = C.RTA_GATEWAY
  62. sysRTA_NETMASK = C.RTA_NETMASK
  63. sysRTA_GENMASK = C.RTA_GENMASK
  64. sysRTA_IFP = C.RTA_IFP
  65. sysRTA_IFA = C.RTA_IFA
  66. sysRTA_AUTHOR = C.RTA_AUTHOR
  67. sysRTA_BRD = C.RTA_BRD
  68. sysRTA_SRC = C.RTA_SRC
  69. sysRTA_SRCMASK = C.RTA_SRCMASK
  70. sysRTA_LABEL = C.RTA_LABEL
  71. sysRTAX_DST = C.RTAX_DST
  72. sysRTAX_GATEWAY = C.RTAX_GATEWAY
  73. sysRTAX_NETMASK = C.RTAX_NETMASK
  74. sysRTAX_GENMASK = C.RTAX_GENMASK
  75. sysRTAX_IFP = C.RTAX_IFP
  76. sysRTAX_IFA = C.RTAX_IFA
  77. sysRTAX_AUTHOR = C.RTAX_AUTHOR
  78. sysRTAX_BRD = C.RTAX_BRD
  79. sysRTAX_SRC = C.RTAX_SRC
  80. sysRTAX_SRCMASK = C.RTAX_SRCMASK
  81. sysRTAX_LABEL = C.RTAX_LABEL
  82. sysRTAX_MAX = C.RTAX_MAX
  83. )
  84. const (
  85. sizeofRtMsghdr = C.sizeof_struct_rt_msghdr
  86. sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage
  87. sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
  88. sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
  89. )