github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/net/ipv4/defs_solaris.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_in_addr [4]byte /* in_addr */
     9  
    10  package ipv4
    11  
    12  /*
    13  #include <sys/socket.h>
    14  
    15  #include <netinet/in.h>
    16  */
    17  import "C"
    18  
    19  const (
    20  	sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage
    21  	sizeofSockaddrInet    = C.sizeof_struct_sockaddr_in
    22  	sizeofInetPktinfo     = C.sizeof_struct_in_pktinfo
    23  
    24  	sizeofIPMreq         = C.sizeof_struct_ip_mreq
    25  	sizeofIPMreqSource   = C.sizeof_struct_ip_mreq_source
    26  	sizeofGroupReq       = C.sizeof_struct_group_req
    27  	sizeofGroupSourceReq = C.sizeof_struct_group_source_req
    28  )
    29  
    30  type sockaddrStorage C.struct_sockaddr_storage
    31  
    32  type sockaddrInet C.struct_sockaddr_in
    33  
    34  type inetPktinfo C.struct_in_pktinfo
    35  
    36  type ipMreq C.struct_ip_mreq
    37  
    38  type ipMreqSource C.struct_ip_mreq_source
    39  
    40  type groupReq C.struct_group_req
    41  
    42  type groupSourceReq C.struct_group_source_req