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.
7 // +godefs map struct_in_addr [4]byte /* in_addr */
8 // +godefs map struct_in6_addr [16]byte /* in6_addr */
14 #include <linux/in6.h>
17 #include <sys/socket.h>
22 sysAF_UNSPEC = C.AF_UNSPEC
23 sysAF_INET = C.AF_INET
24 sysAF_INET6 = C.AF_INET6
26 sysSOCK_RAW = C.SOCK_RAW
29 type iovec C.struct_iovec
31 type msghdr C.struct_msghdr
33 type mmsghdr C.struct_mmsghdr
35 type cmsghdr C.struct_cmsghdr
37 type sockaddrInet C.struct_sockaddr_in
39 type sockaddrInet6 C.struct_sockaddr_in6
42 sizeofIovec = C.sizeof_struct_iovec
43 sizeofMsghdr = C.sizeof_struct_msghdr
44 sizeofMmsghdr = C.sizeof_struct_mmsghdr
45 sizeofCmsghdr = C.sizeof_struct_cmsghdr
47 sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
48 sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6