defs_linux.go 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. // Copyright 2014 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. // +godefs map struct_in6_addr [16]byte /* in6_addr */
  6. package ipv6
  7. /*
  8. #include <linux/in.h>
  9. #include <linux/in6.h>
  10. #include <linux/ipv6.h>
  11. #include <linux/icmpv6.h>
  12. #include <linux/filter.h>
  13. #include <sys/socket.h>
  14. */
  15. import "C"
  16. const (
  17. sysIPV6_ADDRFORM = C.IPV6_ADDRFORM
  18. sysIPV6_2292PKTINFO = C.IPV6_2292PKTINFO
  19. sysIPV6_2292HOPOPTS = C.IPV6_2292HOPOPTS
  20. sysIPV6_2292DSTOPTS = C.IPV6_2292DSTOPTS
  21. sysIPV6_2292RTHDR = C.IPV6_2292RTHDR
  22. sysIPV6_2292PKTOPTIONS = C.IPV6_2292PKTOPTIONS
  23. sysIPV6_CHECKSUM = C.IPV6_CHECKSUM
  24. sysIPV6_2292HOPLIMIT = C.IPV6_2292HOPLIMIT
  25. sysIPV6_NEXTHOP = C.IPV6_NEXTHOP
  26. sysIPV6_FLOWINFO = C.IPV6_FLOWINFO
  27. sysIPV6_UNICAST_HOPS = C.IPV6_UNICAST_HOPS
  28. sysIPV6_MULTICAST_IF = C.IPV6_MULTICAST_IF
  29. sysIPV6_MULTICAST_HOPS = C.IPV6_MULTICAST_HOPS
  30. sysIPV6_MULTICAST_LOOP = C.IPV6_MULTICAST_LOOP
  31. sysIPV6_ADD_MEMBERSHIP = C.IPV6_ADD_MEMBERSHIP
  32. sysIPV6_DROP_MEMBERSHIP = C.IPV6_DROP_MEMBERSHIP
  33. sysMCAST_JOIN_GROUP = C.MCAST_JOIN_GROUP
  34. sysMCAST_LEAVE_GROUP = C.MCAST_LEAVE_GROUP
  35. sysMCAST_JOIN_SOURCE_GROUP = C.MCAST_JOIN_SOURCE_GROUP
  36. sysMCAST_LEAVE_SOURCE_GROUP = C.MCAST_LEAVE_SOURCE_GROUP
  37. sysMCAST_BLOCK_SOURCE = C.MCAST_BLOCK_SOURCE
  38. sysMCAST_UNBLOCK_SOURCE = C.MCAST_UNBLOCK_SOURCE
  39. sysMCAST_MSFILTER = C.MCAST_MSFILTER
  40. sysIPV6_ROUTER_ALERT = C.IPV6_ROUTER_ALERT
  41. sysIPV6_MTU_DISCOVER = C.IPV6_MTU_DISCOVER
  42. sysIPV6_MTU = C.IPV6_MTU
  43. sysIPV6_RECVERR = C.IPV6_RECVERR
  44. sysIPV6_V6ONLY = C.IPV6_V6ONLY
  45. sysIPV6_JOIN_ANYCAST = C.IPV6_JOIN_ANYCAST
  46. sysIPV6_LEAVE_ANYCAST = C.IPV6_LEAVE_ANYCAST
  47. //sysIPV6_PMTUDISC_DONT = C.IPV6_PMTUDISC_DONT
  48. //sysIPV6_PMTUDISC_WANT = C.IPV6_PMTUDISC_WANT
  49. //sysIPV6_PMTUDISC_DO = C.IPV6_PMTUDISC_DO
  50. //sysIPV6_PMTUDISC_PROBE = C.IPV6_PMTUDISC_PROBE
  51. //sysIPV6_PMTUDISC_INTERFACE = C.IPV6_PMTUDISC_INTERFACE
  52. //sysIPV6_PMTUDISC_OMIT = C.IPV6_PMTUDISC_OMIT
  53. sysIPV6_FLOWLABEL_MGR = C.IPV6_FLOWLABEL_MGR
  54. sysIPV6_FLOWINFO_SEND = C.IPV6_FLOWINFO_SEND
  55. sysIPV6_IPSEC_POLICY = C.IPV6_IPSEC_POLICY
  56. sysIPV6_XFRM_POLICY = C.IPV6_XFRM_POLICY
  57. sysIPV6_RECVPKTINFO = C.IPV6_RECVPKTINFO
  58. sysIPV6_PKTINFO = C.IPV6_PKTINFO
  59. sysIPV6_RECVHOPLIMIT = C.IPV6_RECVHOPLIMIT
  60. sysIPV6_HOPLIMIT = C.IPV6_HOPLIMIT
  61. sysIPV6_RECVHOPOPTS = C.IPV6_RECVHOPOPTS
  62. sysIPV6_HOPOPTS = C.IPV6_HOPOPTS
  63. sysIPV6_RTHDRDSTOPTS = C.IPV6_RTHDRDSTOPTS
  64. sysIPV6_RECVRTHDR = C.IPV6_RECVRTHDR
  65. sysIPV6_RTHDR = C.IPV6_RTHDR
  66. sysIPV6_RECVDSTOPTS = C.IPV6_RECVDSTOPTS
  67. sysIPV6_DSTOPTS = C.IPV6_DSTOPTS
  68. sysIPV6_RECVPATHMTU = C.IPV6_RECVPATHMTU
  69. sysIPV6_PATHMTU = C.IPV6_PATHMTU
  70. sysIPV6_DONTFRAG = C.IPV6_DONTFRAG
  71. sysIPV6_RECVTCLASS = C.IPV6_RECVTCLASS
  72. sysIPV6_TCLASS = C.IPV6_TCLASS
  73. sysIPV6_ADDR_PREFERENCES = C.IPV6_ADDR_PREFERENCES
  74. sysIPV6_PREFER_SRC_TMP = C.IPV6_PREFER_SRC_TMP
  75. sysIPV6_PREFER_SRC_PUBLIC = C.IPV6_PREFER_SRC_PUBLIC
  76. sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = C.IPV6_PREFER_SRC_PUBTMP_DEFAULT
  77. sysIPV6_PREFER_SRC_COA = C.IPV6_PREFER_SRC_COA
  78. sysIPV6_PREFER_SRC_HOME = C.IPV6_PREFER_SRC_HOME
  79. sysIPV6_PREFER_SRC_CGA = C.IPV6_PREFER_SRC_CGA
  80. sysIPV6_PREFER_SRC_NONCGA = C.IPV6_PREFER_SRC_NONCGA
  81. sysIPV6_MINHOPCOUNT = C.IPV6_MINHOPCOUNT
  82. sysIPV6_ORIGDSTADDR = C.IPV6_ORIGDSTADDR
  83. sysIPV6_RECVORIGDSTADDR = C.IPV6_RECVORIGDSTADDR
  84. sysIPV6_TRANSPARENT = C.IPV6_TRANSPARENT
  85. sysIPV6_UNICAST_IF = C.IPV6_UNICAST_IF
  86. sysICMPV6_FILTER = C.ICMPV6_FILTER
  87. sysICMPV6_FILTER_BLOCK = C.ICMPV6_FILTER_BLOCK
  88. sysICMPV6_FILTER_PASS = C.ICMPV6_FILTER_PASS
  89. sysICMPV6_FILTER_BLOCKOTHERS = C.ICMPV6_FILTER_BLOCKOTHERS
  90. sysICMPV6_FILTER_PASSONLY = C.ICMPV6_FILTER_PASSONLY
  91. sizeofKernelSockaddrStorage = C.sizeof_struct___kernel_sockaddr_storage
  92. sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
  93. sizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
  94. sizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo
  95. sizeofIPv6FlowlabelReq = C.sizeof_struct_in6_flowlabel_req
  96. sizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
  97. sizeofGroupReq = C.sizeof_struct_group_req
  98. sizeofGroupSourceReq = C.sizeof_struct_group_source_req
  99. sizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
  100. )
  101. type kernelSockaddrStorage C.struct___kernel_sockaddr_storage
  102. type sockaddrInet6 C.struct_sockaddr_in6
  103. type inet6Pktinfo C.struct_in6_pktinfo
  104. type ipv6Mtuinfo C.struct_ip6_mtuinfo
  105. type ipv6FlowlabelReq C.struct_in6_flowlabel_req
  106. type ipv6Mreq C.struct_ipv6_mreq
  107. type groupReq C.struct_group_req
  108. type groupSourceReq C.struct_group_source_req
  109. type icmpv6Filter C.struct_icmp6_filter