github.com/Andyfoo/golang/x/net@v0.0.0-20190901054642-57c1bf301704/ipv6/defs_linux.go (about)

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