github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/net/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  // +build ignore
     7  
     8  package socket
     9  
    10  /*
    11  #include <linux/in.h>
    12  #include <linux/in6.h>
    13  
    14  #define _GNU_SOURCE
    15  #include <sys/socket.h>
    16  */
    17  import "C"
    18  
    19  type iovec C.struct_iovec
    20  
    21  type msghdr C.struct_msghdr
    22  
    23  type mmsghdr C.struct_mmsghdr
    24  
    25  type cmsghdr C.struct_cmsghdr
    26  
    27  const (
    28  	sizeofIovec  = C.sizeof_struct_iovec
    29  	sizeofMsghdr = C.sizeof_struct_msghdr
    30  )