github.com/Andyfoo/golang/x/net@v0.0.0-20190901054642-57c1bf301704/internal/socket/defs_netbsd.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 // +build ignore 6 7 // +godefs map struct_in_addr [4]byte /* in_addr */ 8 // +godefs map struct_in6_addr [16]byte /* in6_addr */ 9 10 package socket 11 12 /* 13 #include <sys/socket.h> 14 15 #include <netinet/in.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 type sockaddrInet C.struct_sockaddr_in 28 29 type sockaddrInet6 C.struct_sockaddr_in6 30 31 const ( 32 sizeofIovec = C.sizeof_struct_iovec 33 sizeofMsghdr = C.sizeof_struct_msghdr 34 sizeofMmsghdr = C.sizeof_struct_mmsghdr 35 sizeofCmsghdr = C.sizeof_struct_cmsghdr 36 37 sizeofSockaddrInet = C.sizeof_struct_sockaddr_in 38 sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 39 )