golang.org/x/net@v0.25.1-0.20240516223405-c87a5b62e243/internal/socket/defs_linux.go (about)

     1  // Copyright 2017 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  package socket
     8  
     9  /*
    10  #include <linux/in.h>
    11  #include <linux/in6.h>
    12  
    13  #define _GNU_SOURCE
    14  #include <sys/socket.h>
    15  */
    16  import "C"
    17  
    18  type iovec C.struct_iovec
    19  
    20  type msghdr C.struct_msghdr
    21  
    22  type mmsghdr C.struct_mmsghdr
    23  
    24  type cmsghdr C.struct_cmsghdr
    25  
    26  const (
    27  	sizeofIovec  = C.sizeof_struct_iovec
    28  	sizeofMsghdr = C.sizeof_struct_msghdr
    29  )