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