...

Source file src/golang.org/x/net/ipv4/defs_freebsd.go

Documentation: golang.org/x/net/ipv4

     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  
     7  // +godefs map struct_in_addr [4]byte /* in_addr */
     8  
     9  package ipv4
    10  
    11  /*
    12  #include <sys/socket.h>
    13  
    14  #include <netinet/in.h>
    15  */
    16  import "C"
    17  
    18  const (
    19  	sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage
    20  	sizeofSockaddrInet    = C.sizeof_struct_sockaddr_in
    21  
    22  	sizeofIPMreq         = C.sizeof_struct_ip_mreq
    23  	sizeofIPMreqSource   = C.sizeof_struct_ip_mreq_source
    24  	sizeofGroupReq       = C.sizeof_struct_group_req
    25  	sizeofGroupSourceReq = C.sizeof_struct_group_source_req
    26  )
    27  
    28  type sockaddrStorage C.struct_sockaddr_storage
    29  
    30  type sockaddrInet C.struct_sockaddr_in
    31  
    32  type ipMreq C.struct_ip_mreq
    33  
    34  type ipMreqSource C.struct_ip_mreq_source
    35  
    36  type groupReq C.struct_group_req
    37  
    38  type groupSourceReq C.struct_group_source_req
    39  

View as plain text