socket_openbsd_arm64.go 41 KB

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