github.com/afumu/libc@v0.0.6/sys/socket/socket_netbsd_amd64.go (about)

     1  // Code generated by 'ccgo sys/socket/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/socket/socket_netbsd_amd64.go -pkgname socket', DO NOT EDIT.
     2  
     3  package socket
     4  
     5  import (
     6  	"math"
     7  	"reflect"
     8  	"sync/atomic"
     9  	"unsafe"
    10  )
    11  
    12  var _ = math.Pi
    13  var _ reflect.Kind
    14  var _ atomic.Value
    15  var _ unsafe.Pointer
    16  
    17  const (
    18  	AF_APPLETALK              = 16         // socket.h:218:1:
    19  	AF_ARP                    = 28         // socket.h:237:1:
    20  	AF_BLUETOOTH              = 31         // socket.h:243:1:
    21  	AF_CAN                    = 35         // socket.h:247:1:
    22  	AF_CCITT                  = 10         // socket.h:212:1:
    23  	AF_CHAOS                  = 5          // socket.h:206:1:
    24  	AF_CNT                    = 21         // socket.h:225:1:
    25  	AF_COIP                   = 20         // socket.h:224:1:
    26  	AF_DATAKIT                = 9          // socket.h:211:1:
    27  	AF_DECnet                 = 12         // socket.h:214:1:
    28  	AF_DLI                    = 13         // socket.h:215:1:
    29  	AF_E164                   = 26         // socket.h:235:1:
    30  	AF_ECMA                   = 8          // socket.h:210:1:
    31  	AF_ETHER                  = 36         // socket.h:248:1:
    32  	AF_HYLINK                 = 15         // socket.h:217:1:
    33  	AF_IEEE80211              = 32         // socket.h:244:1:
    34  	AF_IMPLINK                = 3          // socket.h:204:1:
    35  	AF_INET                   = 2          // socket.h:203:1:
    36  	AF_INET6                  = 24         // socket.h:230:1:
    37  	AF_IPX                    = 23         // socket.h:229:1:
    38  	AF_ISDN                   = 26         // socket.h:234:1:
    39  	AF_ISO                    = 7          // socket.h:208:1:
    40  	AF_LAT                    = 14         // socket.h:216:1:
    41  	AF_LINK                   = 18         // socket.h:220:1:
    42  	AF_LOCAL                  = 1          // socket.h:201:1:
    43  	AF_MAX                    = 37         // socket.h:249:1:
    44  	AF_MPLS                   = 33         // socket.h:245:1:
    45  	AF_NATM                   = 27         // socket.h:236:1:
    46  	AF_NS                     = 6          // socket.h:207:1:
    47  	AF_OROUTE                 = 17         // socket.h:219:1:
    48  	AF_OSI                    = 7          // socket.h:209:1:
    49  	AF_PUP                    = 4          // socket.h:205:1:
    50  	AF_ROUTE                  = 34         // socket.h:246:1:
    51  	AF_SNA                    = 11         // socket.h:213:1:
    52  	AF_UNIX                   = 1          // socket.h:202:1:
    53  	AF_UNSPEC                 = 0          // socket.h:200:1:
    54  	MSG_BCAST                 = 0x0100     // socket.h:497:1:
    55  	MSG_CMSG_CLOEXEC          = 0x0800     // socket.h:501:1:
    56  	MSG_CONTROLMBUF           = 0x2000000  // socket.h:515:1:
    57  	MSG_CTRUNC                = 0x0020     // socket.h:494:1:
    58  	MSG_DONTROUTE             = 0x0004     // socket.h:491:1:
    59  	MSG_DONTWAIT              = 0x0080     // socket.h:496:1:
    60  	MSG_EOR                   = 0x0008     // socket.h:492:1:
    61  	MSG_IOVUSRSPACE           = 0x4000000  // socket.h:516:1:
    62  	MSG_LENUSRSPACE           = 0x8000000  // socket.h:517:1:
    63  	MSG_MCAST                 = 0x0200     // socket.h:498:1:
    64  	MSG_NAMEMBUF              = 0x1000000  // socket.h:514:1:
    65  	MSG_NBIO                  = 0x1000     // socket.h:502:1:
    66  	MSG_NOSIGNAL              = 0x0400     // socket.h:499:1:
    67  	MSG_NOTIFICATION          = 0x4000     // socket.h:504:1:
    68  	MSG_OOB                   = 0x0001     // socket.h:489:1:
    69  	MSG_PEEK                  = 0x0002     // socket.h:490:1:
    70  	MSG_TRUNC                 = 0x0010     // socket.h:493:1:
    71  	MSG_USERFLAGS             = 0x0ffffff  // socket.h:513:1:
    72  	MSG_WAITALL               = 0x0040     // socket.h:495:1:
    73  	MSG_WAITFORONE            = 0x2000     // socket.h:503:1:
    74  	NET_RT_DUMP               = 1          // socket.h:457:1:
    75  	NET_RT_FLAGS              = 2          // socket.h:458:1:
    76  	NET_RT_IFLIST             = 6          // socket.h:462:1:
    77  	NET_RT_OIFLIST            = 5          // socket.h:461:1:
    78  	NET_RT_OOIFLIST           = 4          // socket.h:460:1:
    79  	NET_RT_OOOIFLIST          = 3          // socket.h:459:1:
    80  	PCB_ALL                   = 0          // socket.h:444:1:
    81  	PCB_SLOP                  = 20         // socket.h:443:1:
    82  	PF_APPLETALK              = 16         // socket.h:334:1:
    83  	PF_ARP                    = 28         // socket.h:351:1:
    84  	PF_BLUETOOTH              = 31         // socket.h:355:1:
    85  	PF_CAN                    = 35         // socket.h:358:1:
    86  	PF_CCITT                  = 10         // socket.h:328:1:
    87  	PF_CHAOS                  = 5          // socket.h:322:1:
    88  	PF_CNT                    = 21         // socket.h:341:1:
    89  	PF_COIP                   = 20         // socket.h:340:1:
    90  	PF_DATAKIT                = 9          // socket.h:327:1:
    91  	PF_DECnet                 = 12         // socket.h:330:1:
    92  	PF_DLI                    = 13         // socket.h:331:1:
    93  	PF_E164                   = 26         // socket.h:349:1:
    94  	PF_ECMA                   = 8          // socket.h:326:1:
    95  	PF_ETHER                  = 36         // socket.h:359:1:
    96  	PF_HYLINK                 = 15         // socket.h:333:1:
    97  	PF_IMPLINK                = 3          // socket.h:320:1:
    98  	PF_INET                   = 2          // socket.h:319:1:
    99  	PF_INET6                  = 24         // socket.h:342:1:
   100  	PF_IPX                    = 23         // socket.h:343:1:
   101  	PF_ISDN                   = 26         // socket.h:348:1:
   102  	PF_ISO                    = 7          // socket.h:324:1:
   103  	PF_KEY                    = 29         // socket.h:353:1:
   104  	PF_LAT                    = 14         // socket.h:332:1:
   105  	PF_LINK                   = 18         // socket.h:336:1:
   106  	PF_LOCAL                  = 1          // socket.h:317:1:
   107  	PF_MAX                    = 37         // socket.h:361:1:
   108  	PF_MPLS                   = 33         // socket.h:356:1:
   109  	PF_NATM                   = 27         // socket.h:350:1:
   110  	PF_NS                     = 6          // socket.h:323:1:
   111  	PF_OROUTE                 = 17         // socket.h:335:1:
   112  	PF_OSI                    = 7          // socket.h:325:1:
   113  	PF_PIP                    = 25         // socket.h:346:1:
   114  	PF_PUP                    = 4          // socket.h:321:1:
   115  	PF_ROUTE                  = 34         // socket.h:357:1:
   116  	PF_RTIP                   = 22         // socket.h:345:1:
   117  	PF_SNA                    = 11         // socket.h:329:1:
   118  	PF_UNIX                   = 1          // socket.h:318:1:
   119  	PF_UNSPEC                 = 0          // socket.h:316:1:
   120  	PF_XTP                    = 19         // socket.h:338:1:
   121  	SCM_CREDS                 = 0x10       // socket.h:581:1:
   122  	SCM_RIGHTS                = 0x01       // socket.h:576:1:
   123  	SCM_TIMESTAMP             = 0x08       // socket.h:580:1:
   124  	SHUT_RD                   = 0          // socket.h:587:1:
   125  	SHUT_RDWR                 = 2          // socket.h:589:1:
   126  	SHUT_WR                   = 1          // socket.h:588:1:
   127  	SOCK_CLOEXEC              = 0x10000000 // socket.h:113:1:
   128  	SOCK_CONN_DGRAM           = 6          // socket.h:110:1:
   129  	SOCK_DCCP                 = 6          // socket.h:111:1:
   130  	SOCK_DGRAM                = 2          // socket.h:106:1:
   131  	SOCK_FLAGS_MASK           = 0xf0000000 // socket.h:116:1:
   132  	SOCK_NONBLOCK             = 0x20000000 // socket.h:114:1:
   133  	SOCK_NOSIGPIPE            = 0x40000000 // socket.h:115:1:
   134  	SOCK_RAW                  = 3          // socket.h:107:1:
   135  	SOCK_RDM                  = 4          // socket.h:108:1:
   136  	SOCK_SEQPACKET            = 5          // socket.h:109:1:
   137  	SOCK_STREAM               = 1          // socket.h:105:1:
   138  	SOL_SOCKET                = 0xffff     // socket.h:195:1:
   139  	SOMAXCONN                 = 128        // socket.h:470:1:
   140  	SO_ACCEPTCONN             = 0x0002     // socket.h:122:1:
   141  	SO_ACCEPTFILTER           = 0x1000     // socket.h:133:1:
   142  	SO_BROADCAST              = 0x0020     // socket.h:126:1:
   143  	SO_DEBUG                  = 0x0001     // socket.h:121:1:
   144  	SO_DEFOPTS                = 27645      // socket.h:138:1:
   145  	SO_DONTROUTE              = 0x0010     // socket.h:125:1:
   146  	SO_ERROR                  = 0x1007     // socket.h:169:1:
   147  	SO_KEEPALIVE              = 0x0008     // socket.h:124:1:
   148  	SO_LINGER                 = 0x0080     // socket.h:128:1:
   149  	SO_NOHEADER               = 0x100a     // socket.h:173:1:
   150  	SO_NOSIGPIPE              = 0x0800     // socket.h:132:1:
   151  	SO_OOBINLINE              = 0x0100     // socket.h:129:1:
   152  	SO_OVERFLOWED             = 0x1009     // socket.h:171:1:
   153  	SO_RCVBUF                 = 0x1002     // socket.h:164:1:
   154  	SO_RCVLOWAT               = 0x1004     // socket.h:166:1:
   155  	SO_RCVTIMEO               = 0x100c     // socket.h:178:1:
   156  	SO_RERROR                 = 0x4000     // socket.h:135:1:
   157  	SO_REUSEADDR              = 0x0004     // socket.h:123:1:
   158  	SO_REUSEPORT              = 0x0200     // socket.h:130:1:
   159  	SO_SNDBUF                 = 0x1001     // socket.h:163:1:
   160  	SO_SNDLOWAT               = 0x1003     // socket.h:165:1:
   161  	SO_SNDTIMEO               = 0x100b     // socket.h:177:1:
   162  	SO_TIMESTAMP              = 0x2000     // socket.h:134:1:
   163  	SO_TYPE                   = 0x1008     // socket.h:170:1:
   164  	SO_USELOOPBACK            = 0x0040     // socket.h:127:1:
   165  	UIO_MAXIOV                = 1024       // uio.h:97:1:
   166  	X_AMD64_INT_TYPES_H_      = 0          // int_types.h:35:1:
   167  	X_FILE_OFFSET_BITS        = 64         // <builtin>:25:1:
   168  	X_LP64                    = 1          // <predefined>:268:1:
   169  	X_NETBSD_SOURCE           = 1          // featuretest.h:70:1:
   170  	X_SS_MAXSIZE              = 128        // socket.h:294:1:
   171  	X_SYS_ANSI_H_             = 0          // ansi.h:33:1:
   172  	X_SYS_CDEFS_ELF_H_        = 0          // cdefs_elf.h:31:1:
   173  	X_SYS_CDEFS_H_            = 0          // cdefs.h:37:1:
   174  	X_SYS_COMMON_ANSI_H_      = 0          // common_ansi.h:33:1:
   175  	X_SYS_COMMON_INT_TYPES_H_ = 0          // common_int_types.h:33:1:
   176  	X_SYS_SIGTYPES_H_         = 0          // sigtypes.h:40:1:
   177  	X_SYS_SOCKET_H_           = 0          // socket.h:64:1:
   178  	X_SYS_UIO_H_              = 0          // uio.h:35:1:
   179  	X_X86_64_CDEFS_H_         = 0          // cdefs.h:4:1:
   180  	Pseudo_AF_HDRCMPLT        = 30         // socket.h:240:1:
   181  	Pseudo_AF_KEY             = 29         // socket.h:239:1:
   182  	Pseudo_AF_PIP             = 25         // socket.h:232:1:
   183  	Pseudo_AF_RTIP            = 22         // socket.h:227:1:
   184  	Pseudo_AF_XTP             = 19         // socket.h:222:1:
   185  )
   186  
   187  // file offset
   188  
   189  const ( /* uio.h:69:1: */
   190  	UIO_READ  = 0
   191  	UIO_WRITE = 1
   192  )
   193  
   194  // Segment flag values.
   195  const ( /* uio.h:72:1: */
   196  	UIO_USERSPACE = 0 // from user data space
   197  	UIO_SYSSPACE  = 1
   198  )
   199  
   200  type Ptrdiff_t = int64 /* <builtin>:3:26 */
   201  
   202  type Size_t = uint64 /* <builtin>:9:23 */
   203  
   204  type Wchar_t = int32 /* <builtin>:15:24 */
   205  
   206  type X__int128_t = struct {
   207  	Flo int64
   208  	Fhi int64
   209  } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
   210  type X__uint128_t = struct {
   211  	Flo uint64
   212  	Fhi uint64
   213  } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
   214  
   215  type X__builtin_va_list = uintptr /* <builtin>:46:14 */
   216  type X__float128 = float64        /* <builtin>:47:21 */
   217  
   218  // return true if value 'a' fits in type 't'
   219  
   220  //	$NetBSD: int_types.h,v 1.7 2014/07/25 21:43:13 joerg Exp $
   221  
   222  // -
   223  // Copyright (c) 1990 The Regents of the University of California.
   224  // All rights reserved.
   225  //
   226  // Redistribution and use in source and binary forms, with or without
   227  // modification, are permitted provided that the following conditions
   228  // are met:
   229  // 1. Redistributions of source code must retain the above copyright
   230  //    notice, this list of conditions and the following disclaimer.
   231  // 2. Redistributions in binary form must reproduce the above copyright
   232  //    notice, this list of conditions and the following disclaimer in the
   233  //    documentation and/or other materials provided with the distribution.
   234  // 3. Neither the name of the University nor the names of its contributors
   235  //    may be used to endorse or promote products derived from this software
   236  //    without specific prior written permission.
   237  //
   238  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   239  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   240  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   241  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   242  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   243  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   244  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   245  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   246  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   247  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   248  // SUCH DAMAGE.
   249  //
   250  //	from: @(#)types.h	7.5 (Berkeley) 3/9/91
   251  
   252  //	$NetBSD: common_int_types.h,v 1.1 2014/07/25 21:43:13 joerg Exp $
   253  
   254  // -
   255  // Copyright (c) 2014 The NetBSD Foundation, Inc.
   256  // All rights reserved.
   257  //
   258  // This code is derived from software contributed to The NetBSD Foundation
   259  // by Joerg Sonnenberger.
   260  //
   261  // Redistribution and use in source and binary forms, with or without
   262  // modification, are permitted provided that the following conditions
   263  // are met:
   264  // 1. Redistributions of source code must retain the above copyright
   265  //    notice, this list of conditions and the following disclaimer.
   266  // 2. Redistributions in binary form must reproduce the above copyright
   267  //    notice, this list of conditions and the following disclaimer in the
   268  //    documentation and/or other materials provided with the distribution.
   269  //
   270  // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
   271  // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
   272  // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   273  // PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
   274  // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   275  // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   276  // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   277  // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   278  // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   279  // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   280  // POSSIBILITY OF SUCH DAMAGE.
   281  
   282  // 7.18.1 Integer types
   283  
   284  // 7.18.1.1 Exact-width integer types
   285  
   286  type X__int8_t = int8     /* common_int_types.h:45:27 */
   287  type X__uint8_t = uint8   /* common_int_types.h:46:27 */
   288  type X__int16_t = int16   /* common_int_types.h:47:27 */
   289  type X__uint16_t = uint16 /* common_int_types.h:48:27 */
   290  type X__int32_t = int32   /* common_int_types.h:49:27 */
   291  type X__uint32_t = uint32 /* common_int_types.h:50:27 */
   292  type X__int64_t = int64   /* common_int_types.h:51:27 */
   293  type X__uint64_t = uint64 /* common_int_types.h:52:27 */
   294  
   295  // 7.18.1.4 Integer types capable of holding object pointers
   296  
   297  type X__intptr_t = int64   /* common_int_types.h:58:27 */
   298  type X__uintptr_t = uint64 /* common_int_types.h:59:26 */
   299  
   300  // Types which are fundamental to the implementation and may appear in
   301  // more than one standard header are defined here.  Standard headers
   302  // then use:
   303  //	#ifdef	_BSD_SIZE_T_
   304  //	typedef	_BSD_SIZE_T_ size_t;
   305  //	#undef	_BSD_SIZE_T_
   306  //	#endif
   307  
   308  type X__caddr_t = uintptr        /* ansi.h:37:14 */ // core address
   309  type X__gid_t = X__uint32_t      /* ansi.h:38:20 */ // group id
   310  type X__in_addr_t = X__uint32_t  /* ansi.h:39:20 */ // IP(v4) address
   311  type X__in_port_t = X__uint16_t  /* ansi.h:40:20 */ // "Internet" port number
   312  type X__mode_t = X__uint32_t     /* ansi.h:41:20 */ // file permissions
   313  type X__off_t = X__int64_t       /* ansi.h:42:19 */ // file offset
   314  type X__pid_t = X__int32_t       /* ansi.h:43:19 */ // process id
   315  type X__sa_family_t = X__uint8_t /* ansi.h:44:19 */ // socket address family
   316  type X__socklen_t = uint32       /* ansi.h:45:22 */ // socket-related datum length
   317  type X__uid_t = X__uint32_t      /* ansi.h:46:20 */ // user id
   318  type X__fsblkcnt_t = X__uint64_t /* ansi.h:47:20 */ // fs block count (statvfs)
   319  type X__fsfilcnt_t = X__uint64_t /* ansi.h:48:20 */
   320  type X__wctrans_t = uintptr      /* ansi.h:51:32 */
   321  type X__wctype_t = uintptr       /* ansi.h:54:31 */
   322  
   323  // mbstate_t is an opaque object to keep conversion state, during multibyte
   324  // stream conversions.  The content must not be referenced by user programs.
   325  type X__mbstate_t = struct {
   326  	F__mbstateL  X__int64_t
   327  	F__ccgo_pad1 [120]byte
   328  } /* ansi.h:63:3 */
   329  
   330  type X__va_list = X__builtin_va_list /* ansi.h:72:27 */
   331  
   332  type Sa_family_t = X__sa_family_t /* socket.h:78:23 */
   333  
   334  type Socklen_t = X__socklen_t /* socket.h:83:21 */
   335  
   336  type Ssize_t = int64 /* socket.h:95:23 */
   337  
   338  //	$NetBSD: uio.h,v 1.36 2011/07/27 13:20:07 uebayasi Exp $
   339  
   340  // Copyright (c) 1982, 1986, 1993, 1994
   341  //	The Regents of the University of California.  All rights reserved.
   342  //
   343  // Redistribution and use in source and binary forms, with or without
   344  // modification, are permitted provided that the following conditions
   345  // are met:
   346  // 1. Redistributions of source code must retain the above copyright
   347  //    notice, this list of conditions and the following disclaimer.
   348  // 2. Redistributions in binary form must reproduce the above copyright
   349  //    notice, this list of conditions and the following disclaimer in the
   350  //    documentation and/or other materials provided with the distribution.
   351  // 3. Neither the name of the University nor the names of its contributors
   352  //    may be used to endorse or promote products derived from this software
   353  //    without specific prior written permission.
   354  //
   355  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   356  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   357  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   358  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   359  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   360  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   361  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   362  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   363  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   364  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   365  // SUCH DAMAGE.
   366  //
   367  //	@(#)uio.h	8.5 (Berkeley) 2/22/94
   368  
   369  //	$NetBSD: ansi.h,v 1.11 2019/05/07 03:49:26 kamil Exp $
   370  
   371  //	$NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $
   372  
   373  // -
   374  // Copyright (c) 2014 The NetBSD Foundation, Inc.
   375  // All rights reserved.
   376  //
   377  // This code is derived from software contributed to The NetBSD Foundation
   378  // by Matt Thomas of 3am Software Foundry.
   379  //
   380  // Redistribution and use in source and binary forms, with or without
   381  // modification, are permitted provided that the following conditions
   382  // are met:
   383  // 1. Redistributions of source code must retain the above copyright
   384  //    notice, this list of conditions and the following disclaimer.
   385  // 2. Redistributions in binary form must reproduce the above copyright
   386  //    notice, this list of conditions and the following disclaimer in the
   387  //    documentation and/or other materials provided with the distribution.
   388  //
   389  // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
   390  // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
   391  // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   392  // PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
   393  // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   394  // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   395  // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   396  // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   397  // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   398  // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   399  // POSSIBILITY OF SUCH DAMAGE.
   400  
   401  //	$NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $
   402  
   403  // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
   404  // Public domain.
   405  //
   406  // NOTE: Do not protect this header against multiple inclusion.  Doing
   407  // so can have subtle side-effects due to header file inclusion order
   408  // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE.  Instead,
   409  // protect each CPP macro that we want to supply.
   410  
   411  // Feature-test macros are defined by several standards, and allow an
   412  // application to specify what symbols they want the system headers to
   413  // expose, and hence what standard they want them to conform to.
   414  // There are two classes of feature-test macros.  The first class
   415  // specify complete standards, and if one of these is defined, header
   416  // files will try to conform to the relevant standard.  They are:
   417  //
   418  // ANSI macros:
   419  // _ANSI_SOURCE			ANSI C89
   420  //
   421  // POSIX macros:
   422  // _POSIX_SOURCE == 1		IEEE Std 1003.1 (version?)
   423  // _POSIX_C_SOURCE == 1		IEEE Std 1003.1-1990
   424  // _POSIX_C_SOURCE == 2		IEEE Std 1003.2-1992
   425  // _POSIX_C_SOURCE == 199309L	IEEE Std 1003.1b-1993
   426  // _POSIX_C_SOURCE == 199506L	ISO/IEC 9945-1:1996
   427  // _POSIX_C_SOURCE == 200112L	IEEE Std 1003.1-2001
   428  // _POSIX_C_SOURCE == 200809L   IEEE Std 1003.1-2008
   429  //
   430  // X/Open macros:
   431  // _XOPEN_SOURCE		System Interfaces and Headers, Issue 4, Ver 2
   432  // _XOPEN_SOURCE_EXTENDED == 1	XSH4.2 UNIX extensions
   433  // _XOPEN_SOURCE == 500		System Interfaces and Headers, Issue 5
   434  // _XOPEN_SOURCE == 520		Networking Services (XNS), Issue 5.2
   435  // _XOPEN_SOURCE == 600		IEEE Std 1003.1-2001, XSI option
   436  // _XOPEN_SOURCE == 700		IEEE Std 1003.1-2008, XSI option
   437  //
   438  // NetBSD macros:
   439  // _NETBSD_SOURCE == 1		Make all NetBSD features available.
   440  //
   441  // If more than one of these "major" feature-test macros is defined,
   442  // then the set of facilities provided (and namespace used) is the
   443  // union of that specified by the relevant standards, and in case of
   444  // conflict, the earlier standard in the above list has precedence (so
   445  // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
   446  // of rename() that's used is the POSIX one).  If none of the "major"
   447  // feature-test macros is defined, _NETBSD_SOURCE is assumed.
   448  //
   449  // There are also "minor" feature-test macros, which enable extra
   450  // functionality in addition to some base standard.  They should be
   451  // defined along with one of the "major" macros.  The "minor" macros
   452  // are:
   453  //
   454  // _REENTRANT
   455  // _ISOC99_SOURCE
   456  // _ISOC11_SOURCE
   457  // _LARGEFILE_SOURCE		Large File Support
   458  //		<http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
   459  
   460  type Iovec = struct {
   461  	Fiov_base uintptr
   462  	Fiov_len  Size_t
   463  } /* uio.h:56:1 */
   464  
   465  //	$NetBSD: ansi.h,v 1.14 2011/07/17 20:54:54 joerg Exp $
   466  
   467  // -
   468  // Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc.
   469  // All rights reserved.
   470  //
   471  // This code is derived from software contributed to The NetBSD Foundation
   472  // by Jun-ichiro itojun Hagino and by Klaus Klein.
   473  //
   474  // Redistribution and use in source and binary forms, with or without
   475  // modification, are permitted provided that the following conditions
   476  // are met:
   477  // 1. Redistributions of source code must retain the above copyright
   478  //    notice, this list of conditions and the following disclaimer.
   479  // 2. Redistributions in binary form must reproduce the above copyright
   480  //    notice, this list of conditions and the following disclaimer in the
   481  //    documentation and/or other materials provided with the distribution.
   482  //
   483  // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
   484  // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
   485  // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   486  // PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
   487  // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   488  // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   489  // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   490  // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   491  // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   492  // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   493  // POSSIBILITY OF SUCH DAMAGE.
   494  
   495  type Off_t = X__off_t /* uio.h:65:18 */
   496  
   497  //	$NetBSD: sigtypes.h,v 1.11 2017/01/12 18:29:14 christos Exp $
   498  
   499  // Copyright (c) 1982, 1986, 1989, 1991, 1993
   500  //	The Regents of the University of California.  All rights reserved.
   501  // (c) UNIX System Laboratories, Inc.
   502  // All or some portions of this file are derived from material licensed
   503  // to the University of California by American Telephone and Telegraph
   504  // Co. or Unix System Laboratories, Inc. and are reproduced herein with
   505  // the permission of UNIX System Laboratories, Inc.
   506  //
   507  // Redistribution and use in source and binary forms, with or without
   508  // modification, are permitted provided that the following conditions
   509  // are met:
   510  // 1. Redistributions of source code must retain the above copyright
   511  //    notice, this list of conditions and the following disclaimer.
   512  // 2. Redistributions in binary form must reproduce the above copyright
   513  //    notice, this list of conditions and the following disclaimer in the
   514  //    documentation and/or other materials provided with the distribution.
   515  // 3. Neither the name of the University nor the names of its contributors
   516  //    may be used to endorse or promote products derived from this software
   517  //    without specific prior written permission.
   518  //
   519  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   520  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   521  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   522  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   523  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   524  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   525  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   526  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   527  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   528  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   529  // SUCH DAMAGE.
   530  //
   531  //	@(#)signal.h	8.4 (Berkeley) 5/4/95
   532  
   533  // This header file defines various signal-related types.  We also keep
   534  // the macros to manipulate sigset_t here, to encapsulate knowledge of
   535  // its internals.
   536  
   537  //	$NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $
   538  
   539  // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
   540  // Public domain.
   541  //
   542  // NOTE: Do not protect this header against multiple inclusion.  Doing
   543  // so can have subtle side-effects due to header file inclusion order
   544  // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE.  Instead,
   545  // protect each CPP macro that we want to supply.
   546  
   547  // Feature-test macros are defined by several standards, and allow an
   548  // application to specify what symbols they want the system headers to
   549  // expose, and hence what standard they want them to conform to.
   550  // There are two classes of feature-test macros.  The first class
   551  // specify complete standards, and if one of these is defined, header
   552  // files will try to conform to the relevant standard.  They are:
   553  //
   554  // ANSI macros:
   555  // _ANSI_SOURCE			ANSI C89
   556  //
   557  // POSIX macros:
   558  // _POSIX_SOURCE == 1		IEEE Std 1003.1 (version?)
   559  // _POSIX_C_SOURCE == 1		IEEE Std 1003.1-1990
   560  // _POSIX_C_SOURCE == 2		IEEE Std 1003.2-1992
   561  // _POSIX_C_SOURCE == 199309L	IEEE Std 1003.1b-1993
   562  // _POSIX_C_SOURCE == 199506L	ISO/IEC 9945-1:1996
   563  // _POSIX_C_SOURCE == 200112L	IEEE Std 1003.1-2001
   564  // _POSIX_C_SOURCE == 200809L   IEEE Std 1003.1-2008
   565  //
   566  // X/Open macros:
   567  // _XOPEN_SOURCE		System Interfaces and Headers, Issue 4, Ver 2
   568  // _XOPEN_SOURCE_EXTENDED == 1	XSH4.2 UNIX extensions
   569  // _XOPEN_SOURCE == 500		System Interfaces and Headers, Issue 5
   570  // _XOPEN_SOURCE == 520		Networking Services (XNS), Issue 5.2
   571  // _XOPEN_SOURCE == 600		IEEE Std 1003.1-2001, XSI option
   572  // _XOPEN_SOURCE == 700		IEEE Std 1003.1-2008, XSI option
   573  //
   574  // NetBSD macros:
   575  // _NETBSD_SOURCE == 1		Make all NetBSD features available.
   576  //
   577  // If more than one of these "major" feature-test macros is defined,
   578  // then the set of facilities provided (and namespace used) is the
   579  // union of that specified by the relevant standards, and in case of
   580  // conflict, the earlier standard in the above list has precedence (so
   581  // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
   582  // of rename() that's used is the POSIX one).  If none of the "major"
   583  // feature-test macros is defined, _NETBSD_SOURCE is assumed.
   584  //
   585  // There are also "minor" feature-test macros, which enable extra
   586  // functionality in addition to some base standard.  They should be
   587  // defined along with one of the "major" macros.  The "minor" macros
   588  // are:
   589  //
   590  // _REENTRANT
   591  // _ISOC99_SOURCE
   592  // _ISOC11_SOURCE
   593  // _LARGEFILE_SOURCE		Large File Support
   594  //		<http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
   595  
   596  //	$NetBSD: int_types.h,v 1.7 2014/07/25 21:43:13 joerg Exp $
   597  
   598  // -
   599  // Copyright (c) 1990 The Regents of the University of California.
   600  // All rights reserved.
   601  //
   602  // Redistribution and use in source and binary forms, with or without
   603  // modification, are permitted provided that the following conditions
   604  // are met:
   605  // 1. Redistributions of source code must retain the above copyright
   606  //    notice, this list of conditions and the following disclaimer.
   607  // 2. Redistributions in binary form must reproduce the above copyright
   608  //    notice, this list of conditions and the following disclaimer in the
   609  //    documentation and/or other materials provided with the distribution.
   610  // 3. Neither the name of the University nor the names of its contributors
   611  //    may be used to endorse or promote products derived from this software
   612  //    without specific prior written permission.
   613  //
   614  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   615  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   616  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   617  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   618  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   619  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   620  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   621  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   622  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   623  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   624  // SUCH DAMAGE.
   625  //
   626  //	from: @(#)types.h	7.5 (Berkeley) 3/9/91
   627  
   628  //	$NetBSD: ansi.h,v 1.11 2019/05/07 03:49:26 kamil Exp $
   629  
   630  //	$NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $
   631  
   632  // -
   633  // Copyright (c) 2014 The NetBSD Foundation, Inc.
   634  // All rights reserved.
   635  //
   636  // This code is derived from software contributed to The NetBSD Foundation
   637  // by Matt Thomas of 3am Software Foundry.
   638  //
   639  // Redistribution and use in source and binary forms, with or without
   640  // modification, are permitted provided that the following conditions
   641  // are met:
   642  // 1. Redistributions of source code must retain the above copyright
   643  //    notice, this list of conditions and the following disclaimer.
   644  // 2. Redistributions in binary form must reproduce the above copyright
   645  //    notice, this list of conditions and the following disclaimer in the
   646  //    documentation and/or other materials provided with the distribution.
   647  //
   648  // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
   649  // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
   650  // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   651  // PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
   652  // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   653  // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   654  // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   655  // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   656  // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   657  // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   658  // POSSIBILITY OF SUCH DAMAGE.
   659  
   660  type Sigset_t = struct{ F__bits [4]X__uint32_t } /* sigtypes.h:62:3 */
   661  
   662  // Macro for manipulating signal masks.
   663  
   664  type Sigaltstack = struct {
   665  	Fss_sp       uintptr
   666  	Fss_size     Size_t
   667  	Fss_flags    int32
   668  	F__ccgo_pad1 [4]byte
   669  } /* sigtypes.h:108:9 */
   670  
   671  // Macro for manipulating signal masks.
   672  
   673  type Stack_t = Sigaltstack /* sigtypes.h:116:3 */
   674  
   675  // Socket types.
   676  
   677  // Option flags per-socket.
   678  // 	SO_OTIMESTAMP	0x0400
   679  
   680  // Allowed default option flags
   681  
   682  // Additional options, not kept in so_options.
   683  // SO_OSNDTIMEO		0x1005
   684  // SO_ORCVTIMEO		0x1006
   685  
   686  // Structure used for manipulating linger option.
   687  type Linger = struct {
   688  	Fl_onoff  int32
   689  	Fl_linger int32
   690  } /* socket.h:182:1 */
   691  
   692  type Accept_filter_arg = struct {
   693  	Faf_name [16]int8
   694  	Faf_arg  [240]int8
   695  } /* socket.h:187:1 */
   696  
   697  // Level number for (get/set)sockopt() to apply to socket itself.
   698  
   699  // Address families.
   700  
   701  // Structure used by kernel to store most
   702  // addresses.
   703  type Sockaddr = struct {
   704  	Fsa_len    X__uint8_t
   705  	Fsa_family X__sa_family_t
   706  	Fsa_data   [14]int8
   707  } /* socket.h:255:1 */
   708  
   709  // RFC 2553: protocol-independent placeholder for socket addresses
   710  
   711  type Sockaddr_storage = struct {
   712  	Fss_len     X__uint8_t
   713  	Fss_family  X__sa_family_t
   714  	F__ss_pad1  [6]int8
   715  	F__ss_align X__int64_t
   716  	F__ss_pad2  [112]int8
   717  } /* socket.h:301:1 */
   718  
   719  // Protocol families, same as address families for now.
   720  
   721  type Pid_t = X__pid_t /* socket.h:366:18 */ // process id
   722  
   723  type Gid_t = X__gid_t /* socket.h:371:18 */ // group id
   724  
   725  type Uid_t = X__uid_t /* socket.h:376:18 */ // user id
   726  
   727  // Socket credentials.
   728  type Sockcred = struct {
   729  	Fsc_pid     X__pid_t
   730  	Fsc_uid     X__uid_t
   731  	Fsc_euid    X__uid_t
   732  	Fsc_gid     X__gid_t
   733  	Fsc_egid    X__gid_t
   734  	Fsc_ngroups int32
   735  	Fsc_groups  [1]X__gid_t
   736  } /* socket.h:383:1 */
   737  
   738  // Compute size of a sockcred structure with groups.
   739  
   740  // Definition for CTL_NET PCB fetching sysctls
   741  type Kinfo_pcb = struct {
   742  	Fki_pcbaddr  X__uint64_t
   743  	Fki_ppcbaddr X__uint64_t
   744  	Fki_sockaddr X__uint64_t
   745  	Fki_family   X__uint32_t
   746  	Fki_type     X__uint32_t
   747  	Fki_protocol X__uint32_t
   748  	Fki_pflags   X__uint32_t
   749  	Fki_sostate  X__uint32_t
   750  	Fki_prstate  X__uint32_t
   751  	Fki_tstate   X__int32_t
   752  	Fki_tflags   X__uint32_t
   753  	Fki_rcvq     X__uint64_t
   754  	Fki_sndq     X__uint64_t
   755  	Fki_s        struct {
   756  		F_kis_src struct {
   757  			Fsa_len    X__uint8_t
   758  			Fsa_family X__sa_family_t
   759  			Fsa_data   [14]int8
   760  		}
   761  		F__ccgo_pad1 [248]byte
   762  	}
   763  	Fki_d struct {
   764  		F_kid_dst struct {
   765  			Fsa_len    X__uint8_t
   766  			Fsa_family X__sa_family_t
   767  			Fsa_data   [14]int8
   768  		}
   769  		F__ccgo_pad1 [248]byte
   770  	}
   771  	Fki_inode   X__uint64_t
   772  	Fki_vnode   X__uint64_t
   773  	Fki_conn    X__uint64_t
   774  	Fki_refs    X__uint64_t
   775  	Fki_nextref X__uint64_t
   776  } /* socket.h:404:1 */
   777  
   778  // PF_ROUTE - Routing table
   779  //
   780  // Three additional levels are defined:
   781  //	Fourth: address family, 0 is wildcard
   782  //	Fifth: type of info, defined below
   783  //	Sixth: flag(s) to mask with for NET_RT_FLAGS
   784  
   785  // Maximum queue length specifiable by listen(2).
   786  
   787  //	$NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $
   788  
   789  // * Copyright (c) 1991, 1993
   790  //	The Regents of the University of California.  All rights reserved.
   791  //
   792  // This code is derived from software contributed to Berkeley by
   793  // Berkeley Software Design, Inc.
   794  //
   795  // Redistribution and use in source and binary forms, with or without
   796  // modification, are permitted provided that the following conditions
   797  // are met:
   798  // 1. Redistributions of source code must retain the above copyright
   799  //    notice, this list of conditions and the following disclaimer.
   800  // 2. Redistributions in binary form must reproduce the above copyright
   801  //    notice, this list of conditions and the following disclaimer in the
   802  //    documentation and/or other materials provided with the distribution.
   803  // 3. Neither the name of the University nor the names of its contributors
   804  //    may be used to endorse or promote products derived from this software
   805  //    without specific prior written permission.
   806  //
   807  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   808  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   809  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   810  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   811  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   812  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   813  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   814  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   815  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   816  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   817  // SUCH DAMAGE.
   818  //
   819  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
   820  
   821  // Message header for recvmsg and sendmsg calls.
   822  // Used value-result for recvmsg, value only for sendmsg.
   823  type Msghdr = struct {
   824  	Fmsg_name       uintptr
   825  	Fmsg_namelen    X__socklen_t
   826  	F__ccgo_pad1    [4]byte
   827  	Fmsg_iov        uintptr
   828  	Fmsg_iovlen     int32
   829  	F__ccgo_pad2    [4]byte
   830  	Fmsg_control    uintptr
   831  	Fmsg_controllen X__socklen_t
   832  	Fmsg_flags      int32
   833  } /* socket.h:479:1 */
   834  
   835  type Mmsghdr = struct {
   836  	Fmsg_hdr struct {
   837  		Fmsg_name       uintptr
   838  		Fmsg_namelen    X__socklen_t
   839  		F__ccgo_pad1    [4]byte
   840  		Fmsg_iov        uintptr
   841  		Fmsg_iovlen     int32
   842  		F__ccgo_pad2    [4]byte
   843  		Fmsg_control    uintptr
   844  		Fmsg_controllen X__socklen_t
   845  		Fmsg_flags      int32
   846  	}
   847  	Fmsg_len     uint32
   848  	F__ccgo_pad1 [4]byte
   849  } /* socket.h:506:1 */
   850  
   851  // Extra flags used internally only
   852  
   853  // Header for ancillary data objects in msg_control buffer.
   854  // Used for additional information with/about a datagram
   855  // not expressible by flags.  The format is a sequence
   856  // of message elements headed by cmsghdr structures.
   857  type Cmsghdr = struct {
   858  	Fcmsg_len   X__socklen_t
   859  	Fcmsg_level int32
   860  	Fcmsg_type  int32
   861  } /* socket.h:525:1 */
   862  
   863  var _ int8 /* gen.c:2:13: */