defs_netbsd.go 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. */
  13. import "C"
  14. const (
  15. sysAF_UNSPEC = C.AF_UNSPEC
  16. sysAF_INET = C.AF_INET
  17. sysAF_ROUTE = C.AF_ROUTE
  18. sysAF_LINK = C.AF_LINK
  19. sysAF_INET6 = C.AF_INET6
  20. sysNET_RT_DUMP = C.NET_RT_DUMP
  21. sysNET_RT_FLAGS = C.NET_RT_FLAGS
  22. sysNET_RT_IFLIST = C.NET_RT_IFLIST
  23. sysNET_RT_MAXID = C.NET_RT_MAXID
  24. )
  25. const (
  26. sysCTL_MAXNAME = C.CTL_MAXNAME
  27. sysCTL_UNSPEC = C.CTL_UNSPEC
  28. sysCTL_KERN = C.CTL_KERN
  29. sysCTL_VM = C.CTL_VM
  30. sysCTL_VFS = C.CTL_VFS
  31. sysCTL_NET = C.CTL_NET
  32. sysCTL_DEBUG = C.CTL_DEBUG
  33. sysCTL_HW = C.CTL_HW
  34. sysCTL_MACHDEP = C.CTL_MACHDEP
  35. sysCTL_USER = C.CTL_USER
  36. sysCTL_DDB = C.CTL_DDB
  37. sysCTL_PROC = C.CTL_PROC
  38. sysCTL_VENDOR = C.CTL_VENDOR
  39. sysCTL_EMUL = C.CTL_EMUL
  40. sysCTL_SECURITY = C.CTL_SECURITY
  41. sysCTL_MAXID = C.CTL_MAXID
  42. )
  43. const (
  44. sysRTM_VERSION = C.RTM_VERSION
  45. sysRTM_ADD = C.RTM_ADD
  46. sysRTM_DELETE = C.RTM_DELETE
  47. sysRTM_CHANGE = C.RTM_CHANGE
  48. sysRTM_GET = C.RTM_GET
  49. sysRTM_LOSING = C.RTM_LOSING
  50. sysRTM_REDIRECT = C.RTM_REDIRECT
  51. sysRTM_MISS = C.RTM_MISS
  52. sysRTM_LOCK = C.RTM_LOCK
  53. sysRTM_OLDADD = C.RTM_OLDADD
  54. sysRTM_OLDDEL = C.RTM_OLDDEL
  55. sysRTM_RESOLVE = C.RTM_RESOLVE
  56. sysRTM_NEWADDR = C.RTM_NEWADDR
  57. sysRTM_DELADDR = C.RTM_DELADDR
  58. sysRTM_IFANNOUNCE = C.RTM_IFANNOUNCE
  59. sysRTM_IEEE80211 = C.RTM_IEEE80211
  60. sysRTM_SETGATE = C.RTM_SETGATE
  61. sysRTM_LLINFO_UPD = C.RTM_LLINFO_UPD
  62. sysRTM_IFINFO = C.RTM_IFINFO
  63. sysRTM_CHGADDR = C.RTM_CHGADDR
  64. sysRTA_DST = C.RTA_DST
  65. sysRTA_GATEWAY = C.RTA_GATEWAY
  66. sysRTA_NETMASK = C.RTA_NETMASK
  67. sysRTA_GENMASK = C.RTA_GENMASK
  68. sysRTA_IFP = C.RTA_IFP
  69. sysRTA_IFA = C.RTA_IFA
  70. sysRTA_AUTHOR = C.RTA_AUTHOR
  71. sysRTA_BRD = C.RTA_BRD
  72. sysRTA_TAG = C.RTA_TAG
  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_TAG = C.RTAX_TAG
  82. sysRTAX_MAX = C.RTAX_MAX
  83. )
  84. const (
  85. sizeofIfMsghdrNetBSD7 = C.sizeof_struct_if_msghdr
  86. sizeofIfaMsghdrNetBSD7 = C.sizeof_struct_ifa_msghdr
  87. sizeofIfAnnouncemsghdrNetBSD7 = C.sizeof_struct_if_announcemsghdr
  88. sizeofRtMsghdrNetBSD7 = C.sizeof_struct_rt_msghdr
  89. sizeofRtMetricsNetBSD7 = C.sizeof_struct_rt_metrics
  90. )