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