github.com/afumu/libc@v0.0.6/sys/socket/socket_openbsd_arm64.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_openbsd_arm64.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:181:1:
    19  	AF_BLUETOOTH                   = 32     // socket.h:199:1:
    20  	AF_CCITT                       = 10     // socket.h:175:1:
    21  	AF_CHAOS                       = 5      // socket.h:169:1:
    22  	AF_CNT                         = 21     // socket.h:186:1:
    23  	AF_COIP                        = 20     // socket.h:185:1:
    24  	AF_DATAKIT                     = 9      // socket.h:174:1:
    25  	AF_DECnet                      = 12     // socket.h:177:1:
    26  	AF_DLI                         = 13     // socket.h:178:1:
    27  	AF_E164                        = 26     // socket.h:192:1:
    28  	AF_ECMA                        = 8      // socket.h:173:1:
    29  	AF_ENCAP                       = 28     // socket.h:194:1:
    30  	AF_HYLINK                      = 15     // socket.h:180:1:
    31  	AF_IMPLINK                     = 3      // socket.h:167:1:
    32  	AF_INET                        = 2      // socket.h:166:1:
    33  	AF_INET6                       = 24     // socket.h:189:1:
    34  	AF_IPX                         = 23     // socket.h:188:1:
    35  	AF_ISDN                        = 26     // socket.h:191:1:
    36  	AF_ISO                         = 7      // socket.h:171:1:
    37  	AF_KEY                         = 30     // socket.h:196:1:
    38  	AF_LAT                         = 14     // socket.h:179:1:
    39  	AF_LINK                        = 18     // socket.h:183:1:
    40  	AF_LOCAL                       = 1      // socket.h:165:1:
    41  	AF_MAX                         = 36     // socket.h:203:1:
    42  	AF_MPLS                        = 33     // socket.h:200:1:
    43  	AF_NATM                        = 27     // socket.h:193:1:
    44  	AF_NS                          = 6      // socket.h:170:1:
    45  	AF_OSI                         = 7      // socket.h:172:1:
    46  	AF_PUP                         = 4      // socket.h:168:1:
    47  	AF_ROUTE                       = 17     // socket.h:182:1:
    48  	AF_SIP                         = 29     // socket.h:195:1:
    49  	AF_SNA                         = 11     // socket.h:176:1:
    50  	AF_UNIX                        = 1      // socket.h:164:1:
    51  	AF_UNSPEC                      = 0      // socket.h:163:1:
    52  	BIG_ENDIAN                     = 4321   // endian.h:45:1:
    53  	BYTE_ORDER                     = 1234   // endian.h:47:1:
    54  	LITTLE_ENDIAN                  = 1234   // endian.h:44:1:
    55  	MSG_BCAST                      = 0x100  // socket.h:508:1:
    56  	MSG_CMSG_CLOEXEC               = 0x800  // socket.h:511:1:
    57  	MSG_CTRUNC                     = 0x20   // socket.h:505:1:
    58  	MSG_DONTROUTE                  = 0x4    // socket.h:502:1:
    59  	MSG_DONTWAIT                   = 0x80   // socket.h:507:1:
    60  	MSG_EOR                        = 0x8    // socket.h:503:1:
    61  	MSG_MCAST                      = 0x200  // socket.h:509:1:
    62  	MSG_NOSIGNAL                   = 0x400  // socket.h:510:1:
    63  	MSG_OOB                        = 0x1    // socket.h:500:1:
    64  	MSG_PEEK                       = 0x2    // socket.h:501:1:
    65  	MSG_TRUNC                      = 0x10   // socket.h:504:1:
    66  	MSG_WAITALL                    = 0x40   // socket.h:506:1:
    67  	MSG_WAITFORONE                 = 0x1000 // socket.h:512:1:
    68  	NET_BPF_BUFSIZE                = 1      // socket.h:452:1:
    69  	NET_BPF_MAXBUFSIZE             = 2      // socket.h:453:1:
    70  	NET_BPF_MAXID                  = 3      // socket.h:454:1:
    71  	NET_KEY_MAXID                  = 3      // socket.h:441:1:
    72  	NET_KEY_SADB_DUMP              = 1      // socket.h:439:1:
    73  	NET_KEY_SPD_DUMP               = 2      // socket.h:440:1:
    74  	NET_LINK_IFRXQ                 = 1      // socket.h:416:1:
    75  	NET_LINK_IFRXQ_MAXID           = 3      // socket.h:428:1:
    76  	NET_LINK_IFRXQ_PRESSURE_DROP   = 2      // socket.h:426:1:
    77  	NET_LINK_IFRXQ_PRESSURE_RETURN = 1      // socket.h:424:1:
    78  	NET_LINK_MAXID                 = 2      // socket.h:417:1:
    79  	NET_MAXID                      = 36     // socket.h:314:1:
    80  	NET_PFLOW_MAXID                = 2      // socket.h:466:1:
    81  	NET_PFLOW_STATS                = 1      // socket.h:465:1:
    82  	NET_RT_DUMP                    = 1      // socket.h:365:1:
    83  	NET_RT_FLAGS                   = 2      // socket.h:366:1:
    84  	NET_RT_IFLIST                  = 3      // socket.h:367:1:
    85  	NET_RT_IFNAMES                 = 6      // socket.h:370:1:
    86  	NET_RT_MAXID                   = 8      // socket.h:372:1:
    87  	NET_RT_SOURCE                  = 7      // socket.h:371:1:
    88  	NET_RT_STATS                   = 4      // socket.h:368:1:
    89  	NET_RT_TABLE                   = 5      // socket.h:369:1:
    90  	NET_UNIX_DEFERRED              = 7      // socket.h:389:1:
    91  	NET_UNIX_INFLIGHT              = 6      // socket.h:388:1:
    92  	NET_UNIX_MAXID                 = 8      // socket.h:390:1:
    93  	NET_UNIX_PROTO_MAXID           = 3      // socket.h:405:1:
    94  	PDP_ENDIAN                     = 3412   // endian.h:46:1:
    95  	PF_APPLETALK                   = 16     // socket.h:267:1:
    96  	PF_BLUETOOTH                   = 32     // socket.h:283:1:
    97  	PF_BPF                         = 31     // socket.h:282:1:
    98  	PF_CCITT                       = 10     // socket.h:261:1:
    99  	PF_CHAOS                       = 5      // socket.h:255:1:
   100  	PF_CNT                         = 21     // socket.h:272:1:
   101  	PF_COIP                        = 20     // socket.h:271:1:
   102  	PF_DATAKIT                     = 9      // socket.h:260:1:
   103  	PF_DECnet                      = 12     // socket.h:263:1:
   104  	PF_DLI                         = 13     // socket.h:264:1:
   105  	PF_ECMA                        = 8      // socket.h:259:1:
   106  	PF_ENCAP                       = 28     // socket.h:279:1:
   107  	PF_HYLINK                      = 15     // socket.h:266:1:
   108  	PF_IMPLINK                     = 3      // socket.h:253:1:
   109  	PF_INET                        = 2      // socket.h:252:1:
   110  	PF_INET6                       = 24     // socket.h:274:1:
   111  	PF_IPX                         = 23     // socket.h:273:1:
   112  	PF_ISDN                        = 26     // socket.h:277:1:
   113  	PF_ISO                         = 7      // socket.h:257:1:
   114  	PF_KEY                         = 30     // socket.h:281:1:
   115  	PF_LAT                         = 14     // socket.h:265:1:
   116  	PF_LINK                        = 18     // socket.h:269:1:
   117  	PF_LOCAL                       = 1      // socket.h:250:1:
   118  	PF_MAX                         = 36     // socket.h:287:1:
   119  	PF_MPLS                        = 33     // socket.h:284:1:
   120  	PF_NATM                        = 27     // socket.h:278:1:
   121  	PF_NS                          = 6      // socket.h:256:1:
   122  	PF_OSI                         = 7      // socket.h:258:1:
   123  	PF_PFLOW                       = 34     // socket.h:285:1:
   124  	PF_PIP                         = 25     // socket.h:276:1:
   125  	PF_PIPEX                       = 35     // socket.h:286:1:
   126  	PF_PUP                         = 4      // socket.h:254:1:
   127  	PF_ROUTE                       = 17     // socket.h:268:1:
   128  	PF_RTIP                        = 22     // socket.h:275:1:
   129  	PF_SIP                         = 29     // socket.h:280:1:
   130  	PF_SNA                         = 11     // socket.h:262:1:
   131  	PF_UNIX                        = 1      // socket.h:251:1:
   132  	PF_UNSPEC                      = 0      // socket.h:249:1:
   133  	PF_XTP                         = 19     // socket.h:270:1:
   134  	RT_TABLEID_BITS                = 8      // socket.h:150:1:
   135  	RT_TABLEID_MASK                = 0xff   // socket.h:151:1:
   136  	RT_TABLEID_MAX                 = 255    // socket.h:149:1:
   137  	SCM_RIGHTS                     = 0x01   // socket.h:560:1:
   138  	SCM_TIMESTAMP                  = 0x04   // socket.h:561:1:
   139  	SHUT_RD                        = 0      // socket.h:292:1:
   140  	SHUT_RDWR                      = 2      // socket.h:294:1:
   141  	SHUT_WR                        = 1      // socket.h:293:1:
   142  	SOCK_CLOEXEC                   = 0x8000 // socket.h:76:1:
   143  	SOCK_DGRAM                     = 2      // socket.h:64:1:
   144  	SOCK_DNS                       = 0x1000 // socket.h:81:1:
   145  	SOCK_NONBLOCK                  = 0x4000 // socket.h:77:1:
   146  	SOCK_RAW                       = 3      // socket.h:65:1:
   147  	SOCK_RDM                       = 4      // socket.h:66:1:
   148  	SOCK_SEQPACKET                 = 5      // socket.h:67:1:
   149  	SOCK_STREAM                    = 1      // socket.h:63:1:
   150  	SOL_SOCKET                     = 0xffff // socket.h:158:1:
   151  	SOMAXCONN                      = 128    // socket.h:477:1:
   152  	SO_ACCEPTCONN                  = 0x0002 // socket.h:88:1:
   153  	SO_BINDANY                     = 0x1000 // socket.h:98:1:
   154  	SO_BROADCAST                   = 0x0020 // socket.h:92:1:
   155  	SO_DEBUG                       = 0x0001 // socket.h:87:1:
   156  	SO_DOMAIN                      = 0x1024 // socket.h:116:1:
   157  	SO_DONTROUTE                   = 0x0010 // socket.h:91:1:
   158  	SO_ERROR                       = 0x1007 // socket.h:110:1:
   159  	SO_KEEPALIVE                   = 0x0008 // socket.h:90:1:
   160  	SO_LINGER                      = 0x0080 // socket.h:94:1:
   161  	SO_NETPROC                     = 0x1020 // socket.h:112:1:
   162  	SO_OOBINLINE                   = 0x0100 // socket.h:95:1:
   163  	SO_PEERCRED                    = 0x1022 // socket.h:114:1:
   164  	SO_PROTOCOL                    = 0x1025 // socket.h:117:1:
   165  	SO_RCVBUF                      = 0x1002 // socket.h:105:1:
   166  	SO_RCVLOWAT                    = 0x1004 // socket.h:107:1:
   167  	SO_RCVTIMEO                    = 0x1006 // socket.h:109:1:
   168  	SO_REUSEADDR                   = 0x0004 // socket.h:89:1:
   169  	SO_REUSEPORT                   = 0x0200 // socket.h:96:1:
   170  	SO_RTABLE                      = 0x1021 // socket.h:113:1:
   171  	SO_SNDBUF                      = 0x1001 // socket.h:104:1:
   172  	SO_SNDLOWAT                    = 0x1003 // socket.h:106:1:
   173  	SO_SNDTIMEO                    = 0x1005 // socket.h:108:1:
   174  	SO_SPLICE                      = 0x1023 // socket.h:115:1:
   175  	SO_TIMESTAMP                   = 0x0800 // socket.h:97:1:
   176  	SO_TYPE                        = 0x1008 // socket.h:111:1:
   177  	SO_USELOOPBACK                 = 0x0040 // socket.h:93:1:
   178  	SO_ZEROIZE                     = 0x2000 // socket.h:99:1:
   179  	UIO_MAXIOV                     = 1024   // uio.h:84:1:
   180  	UNPCTL_RECVSPACE               = 1      // socket.h:403:1:
   181  	UNPCTL_SENDSPACE               = 2      // socket.h:404:1:
   182  	X_BIG_ENDIAN                   = 4321   // _endian.h:43:1:
   183  	X_BYTE_ORDER                   = 1234   // endian.h:60:1:
   184  	X_CLOCKID_T_DEFINED_           = 0      // types.h:162:1:
   185  	X_CLOCK_T_DEFINED_             = 0      // types.h:157:1:
   186  	X_FILE_OFFSET_BITS             = 64     // <builtin>:25:1:
   187  	X_INT16_T_DEFINED_             = 0      // types.h:84:1:
   188  	X_INT32_T_DEFINED_             = 0      // types.h:94:1:
   189  	X_INT64_T_DEFINED_             = 0      // types.h:104:1:
   190  	X_INT8_T_DEFINED_              = 0      // types.h:74:1:
   191  	X_LITTLE_ENDIAN                = 1234   // _endian.h:42:1:
   192  	X_LP64                         = 1      // <predefined>:1:1:
   193  	X_MACHINE_CDEFS_H_             = 0      // cdefs.h:4:1:
   194  	X_MACHINE_ENDIAN_H_            = 0      // endian.h:20:1:
   195  	X_MACHINE__TYPES_H_            = 0      // _types.h:35:1:
   196  	X_MAX_PAGE_SHIFT               = 12     // _types.h:57:1:
   197  	X_OFF_T_DEFINED_               = 0      // types.h:192:1:
   198  	X_PDP_ENDIAN                   = 3412   // _endian.h:44:1:
   199  	X_PID_T_DEFINED_               = 0      // types.h:167:1:
   200  	X_QUAD_HIGHWORD                = 1      // _endian.h:95:1:
   201  	X_QUAD_LOWWORD                 = 0      // _endian.h:96:1:
   202  	X_RET_PROTECTOR                = 1      // <predefined>:2:1:
   203  	X_SA_FAMILY_T_DEFINED_         = 0      // socket.h:51:1:
   204  	X_SIZE_T_DEFINED_              = 0      // uio.h:42:1:
   205  	X_SOCKLEN_T_DEFINED_           = 0      // socket.h:46:1:
   206  	X_SSIZE_T_DEFINED_             = 0      // uio.h:47:1:
   207  	X_STACKALIGNBYTES              = 15     // _types.h:54:1:
   208  	X_SYS_CDEFS_H_                 = 0      // cdefs.h:39:1:
   209  	X_SYS_ENDIAN_H_                = 0      // endian.h:38:1:
   210  	X_SYS_SOCKET_H_                = 0      // socket.h:36:1:
   211  	X_SYS_TYPES_H_                 = 0      // types.h:41:1:
   212  	X_SYS_UIO_H_                   = 0      // uio.h:36:1:
   213  	X_SYS__ENDIAN_H_               = 0      // _endian.h:34:1:
   214  	X_SYS__TYPES_H_                = 0      // _types.h:35:1:
   215  	X_TIMER_T_DEFINED_             = 0      // types.h:187:1:
   216  	X_TIMEVAL_DECLARED             = 0      // socket.h:130:1:
   217  	X_TIME_T_DEFINED_              = 0      // types.h:182:1:
   218  	X_UINT16_T_DEFINED_            = 0      // types.h:89:1:
   219  	X_UINT32_T_DEFINED_            = 0      // types.h:99:1:
   220  	X_UINT64_T_DEFINED_            = 0      // types.h:109:1:
   221  	X_UINT8_T_DEFINED_             = 0      // types.h:79:1:
   222  	Pseudo_AF_HDRCMPLT             = 31     // socket.h:197:1:
   223  	Pseudo_AF_PFLOW                = 34     // socket.h:201:1:
   224  	Pseudo_AF_PIP                  = 25     // socket.h:190:1:
   225  	Pseudo_AF_PIPEX                = 35     // socket.h:202:1:
   226  	Pseudo_AF_RTIP                 = 22     // socket.h:187:1:
   227  	Pseudo_AF_XTP                  = 19     // socket.h:184:1:
   228  	Unix                           = 1      // <predefined>:360:1:
   229  )
   230  
   231  const ( /* uio.h:57:1: */
   232  	UIO_READ  = 0
   233  	UIO_WRITE = 1
   234  )
   235  
   236  // Segment flag values.
   237  const ( /* uio.h:60:1: */
   238  	UIO_USERSPACE = 0 // from user data space
   239  	UIO_SYSSPACE  = 1
   240  )
   241  
   242  type Ptrdiff_t = int64 /* <builtin>:3:26 */
   243  
   244  type Size_t = uint64 /* <builtin>:9:23 */
   245  
   246  type Wchar_t = int32 /* <builtin>:15:24 */
   247  
   248  type X__int128_t = struct {
   249  	Flo int64
   250  	Fhi int64
   251  } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
   252  type X__uint128_t = struct {
   253  	Flo uint64
   254  	Fhi uint64
   255  } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
   256  
   257  type X__builtin_va_list = uintptr /* <builtin>:46:14 */
   258  type X__float128 = float64        /* <builtin>:47:21 */
   259  
   260  //	$OpenBSD: socket.h,v 1.105 2022/09/03 21:13:48 mbuhl Exp $
   261  //	$NetBSD: socket.h,v 1.14 1996/02/09 18:25:36 christos Exp $
   262  
   263  // Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994
   264  //	The Regents of the University of California.  All rights reserved.
   265  //
   266  // Redistribution and use in source and binary forms, with or without
   267  // modification, are permitted provided that the following conditions
   268  // are met:
   269  // 1. Redistributions of source code must retain the above copyright
   270  //    notice, this list of conditions and the following disclaimer.
   271  // 2. Redistributions in binary form must reproduce the above copyright
   272  //    notice, this list of conditions and the following disclaimer in the
   273  //    documentation and/or other materials provided with the distribution.
   274  // 3. Neither the name of the University nor the names of its contributors
   275  //    may be used to endorse or promote products derived from this software
   276  //    without specific prior written permission.
   277  //
   278  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   279  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   280  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   281  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   282  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   283  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   284  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   285  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   286  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   287  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   288  // SUCH DAMAGE.
   289  //
   290  //	@(#)socket.h	8.4 (Berkeley) 2/21/94
   291  
   292  // get the definitions for struct iovec, size_t, ssize_t, and <sys/cdefs.h>
   293  //	$OpenBSD: uio.h,v 1.19 2018/08/20 16:00:22 mpi Exp $
   294  //	$NetBSD: uio.h,v 1.12 1996/02/09 18:25:45 christos Exp $
   295  
   296  // Copyright (c) 1982, 1986, 1993, 1994
   297  //	The Regents of the University of California.  All rights reserved.
   298  //
   299  // Redistribution and use in source and binary forms, with or without
   300  // modification, are permitted provided that the following conditions
   301  // are met:
   302  // 1. Redistributions of source code must retain the above copyright
   303  //    notice, this list of conditions and the following disclaimer.
   304  // 2. Redistributions in binary form must reproduce the above copyright
   305  //    notice, this list of conditions and the following disclaimer in the
   306  //    documentation and/or other materials provided with the distribution.
   307  // 3. Neither the name of the University nor the names of its contributors
   308  //    may be used to endorse or promote products derived from this software
   309  //    without specific prior written permission.
   310  //
   311  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   312  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   313  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   314  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   315  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   316  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   317  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   318  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   319  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   320  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   321  // SUCH DAMAGE.
   322  //
   323  //	@(#)uio.h	8.5 (Berkeley) 2/22/94
   324  
   325  //	$OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
   326  //	$NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
   327  
   328  // Copyright (c) 1991, 1993
   329  //	The Regents of the University of California.  All rights reserved.
   330  //
   331  // This code is derived from software contributed to Berkeley by
   332  // Berkeley Software Design, Inc.
   333  //
   334  // Redistribution and use in source and binary forms, with or without
   335  // modification, are permitted provided that the following conditions
   336  // are met:
   337  // 1. Redistributions of source code must retain the above copyright
   338  //    notice, this list of conditions and the following disclaimer.
   339  // 2. Redistributions in binary form must reproduce the above copyright
   340  //    notice, this list of conditions and the following disclaimer in the
   341  //    documentation and/or other materials provided with the distribution.
   342  // 3. Neither the name of the University nor the names of its contributors
   343  //    may be used to endorse or promote products derived from this software
   344  //    without specific prior written permission.
   345  //
   346  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   347  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   348  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   349  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   350  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   351  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   352  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   353  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   354  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   355  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   356  // SUCH DAMAGE.
   357  //
   358  //	@(#)cdefs.h	8.7 (Berkeley) 1/21/94
   359  
   360  //	$OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $
   361  
   362  // Macro to test if we're using a specific version of gcc or later.
   363  
   364  // The __CONCAT macro is used to concatenate parts of symbol names, e.g.
   365  // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
   366  // The __CONCAT macro is a bit tricky -- make sure you don't put spaces
   367  // in between its arguments.  Do not use __CONCAT on double-quoted strings,
   368  // such as those from the __STRING macro: to concatenate strings just put
   369  // them next to each other.
   370  
   371  // GCC1 and some versions of GCC2 declare dead (non-returning) and
   372  // pure (no side effects) functions using "volatile" and "const";
   373  // unfortunately, these then cause warnings under "-ansi -pedantic".
   374  // GCC >= 2.5 uses the __attribute__((attrs)) style.  All of these
   375  // work for GNU C++ (modulo a slight glitch in the C++ grammar in
   376  // the distribution version of 2.5.5).
   377  
   378  // __returns_twice makes the compiler not assume the function
   379  // only returns once.  This affects registerisation of variables:
   380  // even local variables need to be in memory across such a call.
   381  // Example: setjmp()
   382  
   383  // __only_inline makes the compiler only use this function definition
   384  // for inlining; references that can't be inlined will be left as
   385  // external references instead of generating a local copy.  The
   386  // matching library should include a simple extern definition for
   387  // the function to handle those references.  c.f. ctype.h
   388  
   389  // GNU C version 2.96 adds explicit branch prediction so that
   390  // the CPU back-end can hint the processor and also so that
   391  // code blocks can be reordered such that the predicted path
   392  // sees a more linear flow, thus improving cache behavior, etc.
   393  //
   394  // The following two macros provide us with a way to utilize this
   395  // compiler feature.  Use __predict_true() if you expect the expression
   396  // to evaluate to true, and __predict_false() if you expect the
   397  // expression to evaluate to false.
   398  //
   399  // A few notes about usage:
   400  //
   401  //	* Generally, __predict_false() error condition checks (unless
   402  //	  you have some _strong_ reason to do otherwise, in which case
   403  //	  document it), and/or __predict_true() `no-error' condition
   404  //	  checks, assuming you want to optimize for the no-error case.
   405  //
   406  //	* Other than that, if you don't know the likelihood of a test
   407  //	  succeeding from empirical or other `hard' evidence, don't
   408  //	  make predictions.
   409  //
   410  //	* These are meant to be used in places that are run `a lot'.
   411  //	  It is wasteful to make predictions in code that is run
   412  //	  seldomly (e.g. at subsystem initialization time) as the
   413  //	  basic block reordering that this affects can often generate
   414  //	  larger code.
   415  
   416  // Delete pseudo-keywords wherever they are not available or needed.
   417  
   418  // The __packed macro indicates that a variable or structure members
   419  // should have the smallest possible alignment, despite any host CPU
   420  // alignment requirements.
   421  //
   422  // The __aligned(x) macro specifies the minimum alignment of a
   423  // variable or structure.
   424  //
   425  // These macros together are useful for describing the layout and
   426  // alignment of messages exchanged with hardware or other systems.
   427  
   428  // "The nice thing about standards is that there are so many to choose from."
   429  // There are a number of "feature test macros" specified by (different)
   430  // standards that determine which interfaces and types the header files
   431  // should expose.
   432  //
   433  // Because of inconsistencies in these macros, we define our own
   434  // set in the private name space that end in _VISIBLE.  These are
   435  // always defined and so headers can test their values easily.
   436  // Things can get tricky when multiple feature macros are defined.
   437  // We try to take the union of all the features requested.
   438  //
   439  // The following macros are guaranteed to have a value after cdefs.h
   440  // has been included:
   441  //	__POSIX_VISIBLE
   442  //	__XPG_VISIBLE
   443  //	__ISO_C_VISIBLE
   444  //	__BSD_VISIBLE
   445  
   446  // X/Open Portability Guides and Single Unix Specifications.
   447  // _XOPEN_SOURCE				XPG3
   448  // _XOPEN_SOURCE && _XOPEN_VERSION = 4		XPG4
   449  // _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1	XPG4v2
   450  // _XOPEN_SOURCE == 500				XPG5
   451  // _XOPEN_SOURCE == 520				XPG5v2
   452  // _XOPEN_SOURCE == 600				POSIX 1003.1-2001 with XSI
   453  // _XOPEN_SOURCE == 700				POSIX 1003.1-2008 with XSI
   454  //
   455  // The XPG spec implies a specific value for _POSIX_C_SOURCE.
   456  
   457  // POSIX macros, these checks must follow the XOPEN ones above.
   458  //
   459  // _POSIX_SOURCE == 1		1003.1-1988 (superseded by _POSIX_C_SOURCE)
   460  // _POSIX_C_SOURCE == 1		1003.1-1990
   461  // _POSIX_C_SOURCE == 2		1003.2-1992
   462  // _POSIX_C_SOURCE == 199309L	1003.1b-1993
   463  // _POSIX_C_SOURCE == 199506L   1003.1c-1995, 1003.1i-1995,
   464  //				and the omnibus ISO/IEC 9945-1:1996
   465  // _POSIX_C_SOURCE == 200112L   1003.1-2001
   466  // _POSIX_C_SOURCE == 200809L   1003.1-2008
   467  //
   468  // The POSIX spec implies a specific value for __ISO_C_VISIBLE, though
   469  // this may be overridden by the _ISOC99_SOURCE macro later.
   470  
   471  // _ANSI_SOURCE means to expose ANSI C89 interfaces only.
   472  // If the user defines it in addition to one of the POSIX or XOPEN
   473  // macros, assume the POSIX/XOPEN macro(s) should take precedence.
   474  
   475  // _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus
   476  // override any of the other macros since they are non-exclusive.
   477  
   478  // Finally deal with BSD-specific interfaces that are not covered
   479  // by any standards.  We expose these when none of the POSIX or XPG
   480  // macros is defined or if the user explicitly asks for them.
   481  
   482  // Default values.
   483  
   484  //	$OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $
   485  
   486  // -
   487  // Copyright (c) 1990, 1993
   488  //	The Regents of the University of California.  All rights reserved.
   489  //
   490  // Redistribution and use in source and binary forms, with or without
   491  // modification, are permitted provided that the following conditions
   492  // are met:
   493  // 1. Redistributions of source code must retain the above copyright
   494  //    notice, this list of conditions and the following disclaimer.
   495  // 2. Redistributions in binary form must reproduce the above copyright
   496  //    notice, this list of conditions and the following disclaimer in the
   497  //    documentation and/or other materials provided with the distribution.
   498  // 3. Neither the name of the University nor the names of its contributors
   499  //    may be used to endorse or promote products derived from this software
   500  //    without specific prior written permission.
   501  //
   502  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   503  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   504  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   505  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   506  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   507  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   508  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   509  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   510  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   511  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   512  // SUCH DAMAGE.
   513  //
   514  //	@(#)types.h	8.3 (Berkeley) 1/5/94
   515  
   516  // $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $
   517  // -
   518  // Copyright (c) 1990, 1993
   519  //	The Regents of the University of California.  All rights reserved.
   520  //
   521  // Redistribution and use in source and binary forms, with or without
   522  // modification, are permitted provided that the following conditions
   523  // are met:
   524  // 1. Redistributions of source code must retain the above copyright
   525  //    notice, this list of conditions and the following disclaimer.
   526  // 2. Redistributions in binary form must reproduce the above copyright
   527  //    notice, this list of conditions and the following disclaimer in the
   528  //    documentation and/or other materials provided with the distribution.
   529  // 3. Neither the name of the University nor the names of its contributors
   530  //    may be used to endorse or promote products derived from this software
   531  //    without specific prior written permission.
   532  //
   533  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   534  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   535  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   536  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   537  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   538  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   539  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   540  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   541  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   542  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   543  // SUCH DAMAGE.
   544  //
   545  //	@(#)types.h	8.3 (Berkeley) 1/5/94
   546  //	@(#)ansi.h	8.2 (Berkeley) 1/4/94
   547  
   548  // _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned
   549  // value for all data types (int, long, ...).   The result is an
   550  // unsigned long and must be cast to any desired pointer type.
   551  //
   552  // _ALIGNED_POINTER is a boolean macro that checks whether an address
   553  // is valid to fetch data elements of type t from on this architecture.
   554  // This does not reflect the optimal alignment, just the possibility
   555  // (within reasonable limits).
   556  
   557  // 7.18.1.1 Exact-width integer types
   558  type X__int8_t = int8     /* _types.h:60:22 */
   559  type X__uint8_t = uint8   /* _types.h:61:24 */
   560  type X__int16_t = int16   /* _types.h:62:17 */
   561  type X__uint16_t = uint16 /* _types.h:63:25 */
   562  type X__int32_t = int32   /* _types.h:64:15 */
   563  type X__uint32_t = uint32 /* _types.h:65:23 */
   564  // LONGLONG
   565  type X__int64_t = int64 /* _types.h:67:20 */
   566  // LONGLONG
   567  type X__uint64_t = uint64 /* _types.h:69:28 */
   568  
   569  // 7.18.1.2 Minimum-width integer types
   570  type X__int_least8_t = X__int8_t     /* _types.h:72:19 */
   571  type X__uint_least8_t = X__uint8_t   /* _types.h:73:20 */
   572  type X__int_least16_t = X__int16_t   /* _types.h:74:20 */
   573  type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */
   574  type X__int_least32_t = X__int32_t   /* _types.h:76:20 */
   575  type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */
   576  type X__int_least64_t = X__int64_t   /* _types.h:78:20 */
   577  type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */
   578  
   579  // 7.18.1.3 Fastest minimum-width integer types
   580  type X__int_fast8_t = X__int32_t    /* _types.h:82:20 */
   581  type X__uint_fast8_t = X__uint32_t  /* _types.h:83:21 */
   582  type X__int_fast16_t = X__int32_t   /* _types.h:84:20 */
   583  type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */
   584  type X__int_fast32_t = X__int32_t   /* _types.h:86:20 */
   585  type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */
   586  type X__int_fast64_t = X__int64_t   /* _types.h:88:20 */
   587  type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */
   588  
   589  // 7.18.1.4 Integer types capable of holding object pointers
   590  type X__intptr_t = int64   /* _types.h:104:16 */
   591  type X__uintptr_t = uint64 /* _types.h:105:24 */
   592  
   593  // 7.18.1.5 Greatest-width integer types
   594  type X__intmax_t = X__int64_t   /* _types.h:108:20 */
   595  type X__uintmax_t = X__uint64_t /* _types.h:109:21 */
   596  
   597  // Register size
   598  type X__register_t = int64 /* _types.h:112:16 */
   599  
   600  // VM system types
   601  type X__vaddr_t = uint64 /* _types.h:115:24 */
   602  type X__paddr_t = uint64 /* _types.h:116:24 */
   603  type X__vsize_t = uint64 /* _types.h:117:24 */
   604  type X__psize_t = uint64 /* _types.h:118:24 */
   605  
   606  // Standard system types
   607  type X__double_t = float64           /* _types.h:121:18 */
   608  type X__float_t = float32            /* _types.h:122:17 */
   609  type X__ptrdiff_t = int64            /* _types.h:123:16 */
   610  type X__size_t = uint64              /* _types.h:124:24 */
   611  type X__ssize_t = int64              /* _types.h:125:16 */
   612  type X__va_list = X__builtin_va_list /* _types.h:127:27 */
   613  
   614  // Wide character support types
   615  type X__wchar_t = int32     /* _types.h:137:15 */
   616  type X__wint_t = int32      /* _types.h:140:15 */
   617  type X__rune_t = int32      /* _types.h:141:15 */
   618  type X__wctrans_t = uintptr /* _types.h:142:14 */
   619  type X__wctype_t = uintptr  /* _types.h:143:14 */
   620  
   621  type X__blkcnt_t = X__int64_t    /* _types.h:39:19 */ // blocks allocated for file
   622  type X__blksize_t = X__int32_t   /* _types.h:40:19 */ // optimal blocksize for I/O
   623  type X__clock_t = X__int64_t     /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC
   624  type X__clockid_t = X__int32_t   /* _types.h:42:19 */ // CLOCK_* identifiers
   625  type X__cpuid_t = uint64         /* _types.h:43:23 */ // CPU id
   626  type X__dev_t = X__int32_t       /* _types.h:44:19 */ // device number
   627  type X__fixpt_t = X__uint32_t    /* _types.h:45:20 */ // fixed point number
   628  type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count
   629  type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count
   630  type X__gid_t = X__uint32_t      /* _types.h:48:20 */ // group id
   631  type X__id_t = X__uint32_t       /* _types.h:49:20 */ // may contain pid, uid or gid
   632  type X__in_addr_t = X__uint32_t  /* _types.h:50:20 */ // base type for internet address
   633  type X__in_port_t = X__uint16_t  /* _types.h:51:20 */ // IP port type
   634  type X__ino_t = X__uint64_t      /* _types.h:52:20 */ // inode number
   635  type X__key_t = int64            /* _types.h:53:15 */ // IPC key (for Sys V IPC)
   636  type X__mode_t = X__uint32_t     /* _types.h:54:20 */ // permissions
   637  type X__nlink_t = X__uint32_t    /* _types.h:55:20 */ // link count
   638  type X__off_t = X__int64_t       /* _types.h:56:19 */ // file offset or size
   639  type X__pid_t = X__int32_t       /* _types.h:57:19 */ // process id
   640  type X__rlim_t = X__uint64_t     /* _types.h:58:20 */ // resource limit
   641  type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type
   642  type X__segsz_t = X__int32_t     /* _types.h:60:19 */ // segment size
   643  type X__socklen_t = X__uint32_t  /* _types.h:61:20 */ // length type for network syscalls
   644  type X__suseconds_t = int64      /* _types.h:62:15 */ // microseconds (signed)
   645  type X__time_t = X__int64_t      /* _types.h:63:19 */ // epoch time
   646  type X__timer_t = X__int32_t     /* _types.h:64:19 */ // POSIX timer identifiers
   647  type X__uid_t = X__uint32_t      /* _types.h:65:20 */ // user id
   648  type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds
   649  
   650  // mbstate_t is an opaque object to keep conversion state, during multibyte
   651  // stream conversions. The content must not be referenced by user programs.
   652  type X__mbstate_t = struct {
   653  	F__ccgo_pad1 [0]uint64
   654  	F__mbstate8  [128]int8
   655  } /* _types.h:75:3 */
   656  
   657  type Ssize_t = X__ssize_t /* uio.h:48:19 */
   658  
   659  type Iovec = struct {
   660  	Fiov_base uintptr
   661  	Fiov_len  Size_t
   662  } /* uio.h:51:1 */
   663  
   664  // Tell sys/endian.h we have MD variants of the swap macros.
   665  
   666  // Note that these macros evaluate their arguments several times.
   667  
   668  // Public names
   669  
   670  // These are specified to be function-like macros to match the spec
   671  
   672  // POSIX names
   673  
   674  // original BSD names
   675  
   676  // these were exposed here before
   677  
   678  // ancient stuff
   679  
   680  type U_char = uint8   /* types.h:51:23 */
   681  type U_short = uint16 /* types.h:52:24 */
   682  type U_int = uint32   /* types.h:53:22 */
   683  type U_long = uint64  /* types.h:54:23 */
   684  
   685  type Unchar = uint8  /* types.h:56:23 */ // Sys V compatibility
   686  type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility
   687  type Uint = uint32   /* types.h:58:22 */ // Sys V compatibility
   688  type Ulong = uint64  /* types.h:59:23 */ // Sys V compatibility
   689  
   690  type Cpuid_t = X__cpuid_t       /* types.h:61:19 */ // CPU id
   691  type Register_t = X__register_t /* types.h:62:22 */ // register-sized type
   692  
   693  // XXX The exact-width bit types should only be exposed if __BSD_VISIBLE
   694  //     but the rest of the includes are not ready for that yet.
   695  
   696  type Int8_t = X__int8_t /* types.h:75:19 */
   697  
   698  type Uint8_t = X__uint8_t /* types.h:80:20 */
   699  
   700  type Int16_t = X__int16_t /* types.h:85:20 */
   701  
   702  type Uint16_t = X__uint16_t /* types.h:90:21 */
   703  
   704  type Int32_t = X__int32_t /* types.h:95:20 */
   705  
   706  type Uint32_t = X__uint32_t /* types.h:100:21 */
   707  
   708  type Int64_t = X__int64_t /* types.h:105:20 */
   709  
   710  type Uint64_t = X__uint64_t /* types.h:110:21 */
   711  
   712  // BSD-style unsigned bits types
   713  type U_int8_t = X__uint8_t   /* types.h:114:19 */
   714  type U_int16_t = X__uint16_t /* types.h:115:20 */
   715  type U_int32_t = X__uint32_t /* types.h:116:20 */
   716  type U_int64_t = X__uint64_t /* types.h:117:20 */
   717  
   718  // quads, deprecated in favor of 64 bit int types
   719  type Quad_t = X__int64_t    /* types.h:120:19 */
   720  type U_quad_t = X__uint64_t /* types.h:121:20 */
   721  
   722  // VM system types
   723  type Vaddr_t = X__vaddr_t /* types.h:125:19 */
   724  type Paddr_t = X__paddr_t /* types.h:126:19 */
   725  type Vsize_t = X__vsize_t /* types.h:127:19 */
   726  type Psize_t = X__psize_t /* types.h:128:19 */
   727  
   728  // Standard system types
   729  type Blkcnt_t = X__blkcnt_t       /* types.h:132:20 */ // blocks allocated for file
   730  type Blksize_t = X__blksize_t     /* types.h:133:21 */ // optimal blocksize for I/O
   731  type Caddr_t = uintptr            /* types.h:134:14 */ // core address
   732  type Daddr32_t = X__int32_t       /* types.h:135:19 */ // 32-bit disk address
   733  type Daddr_t = X__int64_t         /* types.h:136:19 */ // 64-bit disk address
   734  type Dev_t = X__dev_t             /* types.h:137:18 */ // device number
   735  type Fixpt_t = X__fixpt_t         /* types.h:138:19 */ // fixed point number
   736  type Gid_t = X__gid_t             /* types.h:139:18 */ // group id
   737  type Id_t = X__id_t               /* types.h:140:17 */ // may contain pid, uid or gid
   738  type Ino_t = X__ino_t             /* types.h:141:18 */ // inode number
   739  type Key_t = X__key_t             /* types.h:142:18 */ // IPC key (for Sys V IPC)
   740  type Mode_t = X__mode_t           /* types.h:143:18 */ // permissions
   741  type Nlink_t = X__nlink_t         /* types.h:144:19 */ // link count
   742  type Rlim_t = X__rlim_t           /* types.h:145:18 */ // resource limit
   743  type Segsz_t = X__segsz_t         /* types.h:146:19 */ // segment size
   744  type Uid_t = X__uid_t             /* types.h:147:18 */ // user id
   745  type Useconds_t = X__useconds_t   /* types.h:148:22 */ // microseconds
   746  type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed)
   747  type Fsblkcnt_t = X__fsblkcnt_t   /* types.h:150:22 */ // file system block count
   748  type Fsfilcnt_t = X__fsfilcnt_t   /* types.h:151:22 */ // file system file count
   749  
   750  // The following types may be defined in multiple header files.
   751  type Clock_t = X__clock_t /* types.h:158:19 */
   752  
   753  type Clockid_t = X__clockid_t /* types.h:163:21 */
   754  
   755  type Pid_t = X__pid_t /* types.h:168:18 */
   756  
   757  type Time_t = X__time_t /* types.h:183:18 */
   758  
   759  type Timer_t = X__timer_t /* types.h:188:19 */
   760  
   761  type Off_t = X__off_t /* types.h:193:18 */
   762  
   763  // Major, minor numbers, dev_t's.
   764  
   765  type Socklen_t = X__socklen_t /* socket.h:47:21 */ // length type for network syscalls
   766  
   767  type Sa_family_t = X__sa_family_t /* socket.h:52:23 */ // sockaddr address family type
   768  
   769  // Definitions related to sockets: types, address families, options.
   770  
   771  // Types
   772  
   773  // Socket creation flags
   774  
   775  // Option flags per-socket.
   776  
   777  // Additional options, not kept in so_options.
   778  
   779  // Structure used for manipulating linger option.
   780  type Linger = struct {
   781  	Fl_onoff  int32
   782  	Fl_linger int32
   783  } /* socket.h:122:1 */
   784  
   785  type Timeval = struct {
   786  	Ftv_sec  Time_t
   787  	Ftv_usec Suseconds_t
   788  } /* socket.h:131:1 */
   789  
   790  // Structure used for manipulating splice option.
   791  type Splice = struct {
   792  	Fsp_fd       int32
   793  	F__ccgo_pad1 [4]byte
   794  	Fsp_max      Off_t
   795  	Fsp_idle     struct {
   796  		Ftv_sec  Time_t
   797  		Ftv_usec Suseconds_t
   798  	}
   799  } /* socket.h:140:1 */
   800  
   801  // Maximum number of alternate routing tables
   802  
   803  // Level number for (get/set)sockopt() to apply to socket itself.
   804  
   805  // Address families.
   806  
   807  // Structure used by kernel to store most
   808  // addresses.
   809  type Sockaddr = struct {
   810  	Fsa_len    X__uint8_t
   811  	Fsa_family Sa_family_t
   812  	Fsa_data   [14]int8
   813  } /* socket.h:209:1 */
   814  
   815  // Sockaddr type which can hold any sockaddr type available
   816  // in the system.
   817  //
   818  // Note: __ss_{len,family} is defined in RFC2553.  During RFC2553 discussion
   819  // the field name went back and forth between ss_len and __ss_len,
   820  // and RFC2553 specifies it to be __ss_len.  openbsd picked ss_len.
   821  // For maximum portability, userland programmer would need to
   822  // (1) make the code never touch ss_len portion (cast it into sockaddr and
   823  // touch sa_len), or (2) add "-Dss_len=__ss_len" into CFLAGS to unify all
   824  // occurrences (including header file) to __ss_len.
   825  type Sockaddr_storage = struct {
   826  	Fss_len    X__uint8_t
   827  	Fss_family Sa_family_t
   828  	F__ss_pad1 [6]uint8
   829  	F__ss_pad2 X__uint64_t
   830  	F__ss_pad3 [240]uint8
   831  } /* socket.h:227:1 */
   832  
   833  // Protocol families, same as address families for now.
   834  
   835  // These are the valid values for the "how" field used by shutdown(2).
   836  
   837  // Read using getsockopt() with SOL_SOCKET, SO_PEERCRED
   838  type Sockpeercred = struct {
   839  	Fuid Uid_t
   840  	Fgid Gid_t
   841  	Fpid Pid_t
   842  } /* socket.h:300:1 */
   843  
   844  // Definitions for network related sysctl, CTL_NET.
   845  //
   846  // Second level is protocol family.
   847  // Third level is protocol number.
   848  //
   849  // Further levels are defined by the individual families below.
   850  
   851  // PF_ROUTE - Routing table
   852  //
   853  // Four additional levels are defined:
   854  //	Fourth: address family, 0 is wildcard
   855  //	Fifth: type of info, defined below
   856  //	Sixth: flag(s) to mask with for NET_RT_FLAGS
   857  //	Seventh: routing table to use (facultative, defaults to 0)
   858  //		 NET_RT_TABLE has the table id as sixth element.
   859  
   860  // PF_UNIX - unix socket tunables
   861  
   862  // PF_LINK - link layer or device tunables
   863  
   864  // PF_KEY - Key Management
   865  
   866  // PF_BPF  not really a family, but connected under CTL_NET
   867  
   868  // PF_PFLOW not really a family, but connected under CTL_NET
   869  
   870  // Maximum queue length specifiable by listen(2).
   871  
   872  // Message header for recvmsg and sendmsg calls.
   873  // Used value-result for recvmsg, value only for sendmsg.
   874  type Msghdr = struct {
   875  	Fmsg_name       uintptr
   876  	Fmsg_namelen    Socklen_t
   877  	F__ccgo_pad1    [4]byte
   878  	Fmsg_iov        uintptr
   879  	Fmsg_iovlen     uint32
   880  	F__ccgo_pad2    [4]byte
   881  	Fmsg_control    uintptr
   882  	Fmsg_controllen Socklen_t
   883  	Fmsg_flags      int32
   884  } /* socket.h:483:1 */
   885  
   886  type Mmsghdr = struct {
   887  	Fmsg_hdr struct {
   888  		Fmsg_name       uintptr
   889  		Fmsg_namelen    Socklen_t
   890  		F__ccgo_pad1    [4]byte
   891  		Fmsg_iov        uintptr
   892  		Fmsg_iovlen     uint32
   893  		F__ccgo_pad2    [4]byte
   894  		Fmsg_control    uintptr
   895  		Fmsg_controllen Socklen_t
   896  		Fmsg_flags      int32
   897  	}
   898  	Fmsg_len     uint32
   899  	F__ccgo_pad1 [4]byte
   900  } /* socket.h:493:1 */
   901  
   902  // Header for ancillary data objects in msg_control buffer.
   903  // Used for additional information with/about a datagram
   904  // not expressible by flags.  The format is a sequence
   905  // of message elements headed by cmsghdr structures.
   906  type Cmsghdr = struct {
   907  	Fcmsg_len   Socklen_t
   908  	Fcmsg_level int32
   909  	Fcmsg_type  int32
   910  } /* socket.h:520:1 */
   911  
   912  var _ int8 /* gen.c:2:13: */