gitee.com/ks-custle/core-gm@v0.0.0-20230922171213-b83bdd97b62c/net/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  //go:build ignore
     6  // +build ignore
     7  
     8  // +godefs map struct_in6_addr [16]byte /* in6_addr */
     9  
    10  package ipv6
    11  
    12  /*
    13  #include <linux/in.h>
    14  #include <linux/in6.h>
    15  #include <linux/ipv6.h>
    16  #include <linux/icmpv6.h>
    17  #include <linux/filter.h>
    18  #include <sys/socket.h>
    19  */
    20  import "C"
    21  
    22  const (
    23  	sizeofKernelSockaddrStorage = C.sizeof_struct___kernel_sockaddr_storage
    24  	sizeofSockaddrInet6         = C.sizeof_struct_sockaddr_in6
    25  	sizeofInet6Pktinfo          = C.sizeof_struct_in6_pktinfo
    26  	sizeofIPv6Mtuinfo           = C.sizeof_struct_ip6_mtuinfo
    27  	sizeofIPv6FlowlabelReq      = C.sizeof_struct_in6_flowlabel_req
    28  
    29  	sizeofIPv6Mreq       = C.sizeof_struct_ipv6_mreq
    30  	sizeofGroupReq       = C.sizeof_struct_group_req
    31  	sizeofGroupSourceReq = C.sizeof_struct_group_source_req
    32  
    33  	sizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
    34  )
    35  
    36  type kernelSockaddrStorage C.struct___kernel_sockaddr_storage
    37  
    38  type sockaddrInet6 C.struct_sockaddr_in6
    39  
    40  type inet6Pktinfo C.struct_in6_pktinfo
    41  
    42  type ipv6Mtuinfo C.struct_ip6_mtuinfo
    43  
    44  type ipv6FlowlabelReq C.struct_in6_flowlabel_req
    45  
    46  type ipv6Mreq C.struct_ipv6_mreq
    47  
    48  type groupReq C.struct_group_req
    49  
    50  type groupSourceReq C.struct_group_source_req
    51  
    52  type icmpv6Filter C.struct_icmp6_filter