github.com/neonyo/sys@v0.0.0-20230720094341-b1ee14be3ce8/unix/ztypes_openbsd_386.go (about) 1 // cgo -godefs types_openbsd.go | go run mkpost.go 2 // Code generated by the command above; see README.md. DO NOT EDIT. 3 4 //go:build 386 && openbsd 5 // +build 386,openbsd 6 7 package unix 8 9 const ( 10 SizeofPtr = 0x4 11 SizeofShort = 0x2 12 SizeofInt = 0x4 13 SizeofLong = 0x4 14 SizeofLongLong = 0x8 15 ) 16 17 type ( 18 _C_short int16 19 _C_int int32 20 _C_long int32 21 _C_long_long int64 22 ) 23 24 type Timespec struct { 25 Sec int64 26 Nsec int32 27 } 28 29 type Timeval struct { 30 Sec int64 31 Usec int32 32 } 33 34 type Rusage struct { 35 Utime Timeval 36 Stime Timeval 37 Maxrss int32 38 Ixrss int32 39 Idrss int32 40 Isrss int32 41 Minflt int32 42 Majflt int32 43 Nswap int32 44 Inblock int32 45 Oublock int32 46 Msgsnd int32 47 Msgrcv int32 48 Nsignals int32 49 Nvcsw int32 50 Nivcsw int32 51 } 52 53 type Rlimit struct { 54 Cur uint64 55 Max uint64 56 } 57 58 type _Gid_t uint32 59 60 type Stat_t struct { 61 Mode uint32 62 Dev int32 63 Ino uint64 64 Nlink uint32 65 Uid uint32 66 Gid uint32 67 Rdev int32 68 Atim Timespec 69 Mtim Timespec 70 Ctim Timespec 71 Size int64 72 Blocks int64 73 Blksize int32 74 Flags uint32 75 Gen uint32 76 _ Timespec 77 } 78 79 type Statfs_t struct { 80 F_flags uint32 81 F_bsize uint32 82 F_iosize uint32 83 F_blocks uint64 84 F_bfree uint64 85 F_bavail int64 86 F_files uint64 87 F_ffree uint64 88 F_favail int64 89 F_syncwrites uint64 90 F_syncreads uint64 91 F_asyncwrites uint64 92 F_asyncreads uint64 93 F_fsid Fsid 94 F_namemax uint32 95 F_owner uint32 96 F_ctime uint64 97 F_fstypename [16]byte 98 F_mntonname [90]byte 99 F_mntfromname [90]byte 100 F_mntfromspec [90]byte 101 _ [2]byte 102 Mount_info [160]byte 103 } 104 105 type Flock_t struct { 106 Start int64 107 Len int64 108 Pid int32 109 Type int16 110 Whence int16 111 } 112 113 type Dirent struct { 114 Fileno uint64 115 Off int64 116 Reclen uint16 117 Type uint8 118 Namlen uint8 119 _ [4]uint8 120 Name [256]int8 121 } 122 123 type Fsid struct { 124 Val [2]int32 125 } 126 127 const ( 128 PathMax = 0x400 129 ) 130 131 type RawSockaddrInet4 struct { 132 Len uint8 133 Family uint8 134 Port uint16 135 Addr [4]byte /* in_addr */ 136 Zero [8]int8 137 } 138 139 type RawSockaddrInet6 struct { 140 Len uint8 141 Family uint8 142 Port uint16 143 Flowinfo uint32 144 Addr [16]byte /* in6_addr */ 145 Scope_id uint32 146 } 147 148 type RawSockaddrUnix struct { 149 Len uint8 150 Family uint8 151 Path [104]int8 152 } 153 154 type RawSockaddrDatalink struct { 155 Len uint8 156 Family uint8 157 Index uint16 158 Type uint8 159 Nlen uint8 160 Alen uint8 161 Slen uint8 162 Data [24]int8 163 } 164 165 type RawSockaddr struct { 166 Len uint8 167 Family uint8 168 Data [14]int8 169 } 170 171 type RawSockaddrAny struct { 172 Addr RawSockaddr 173 Pad [92]int8 174 } 175 176 type _Socklen uint32 177 178 type Linger struct { 179 Onoff int32 180 Linger int32 181 } 182 183 type Iovec struct { 184 Base *byte 185 Len uint32 186 } 187 188 type IPMreq struct { 189 Multiaddr [4]byte /* in_addr */ 190 Interface [4]byte /* in_addr */ 191 } 192 193 type IPv6Mreq struct { 194 Multiaddr [16]byte /* in6_addr */ 195 Interface uint32 196 } 197 198 type Msghdr struct { 199 Name *byte 200 Namelen uint32 201 Iov *Iovec 202 Iovlen uint32 203 Control *byte 204 Controllen uint32 205 Flags int32 206 } 207 208 type Cmsghdr struct { 209 Len uint32 210 Level int32 211 Type int32 212 } 213 214 type Inet6Pktinfo struct { 215 Addr [16]byte /* in6_addr */ 216 Ifindex uint32 217 } 218 219 type IPv6MTUInfo struct { 220 Addr RawSockaddrInet6 221 Mtu uint32 222 } 223 224 type ICMPv6Filter struct { 225 Filt [8]uint32 226 } 227 228 const ( 229 SizeofSockaddrInet4 = 0x10 230 SizeofSockaddrInet6 = 0x1c 231 SizeofSockaddrAny = 0x6c 232 SizeofSockaddrUnix = 0x6a 233 SizeofSockaddrDatalink = 0x20 234 SizeofLinger = 0x8 235 SizeofIovec = 0x8 236 SizeofIPMreq = 0x8 237 SizeofIPv6Mreq = 0x14 238 SizeofMsghdr = 0x1c 239 SizeofCmsghdr = 0xc 240 SizeofInet6Pktinfo = 0x14 241 SizeofIPv6MTUInfo = 0x20 242 SizeofICMPv6Filter = 0x20 243 ) 244 245 const ( 246 PTRACE_TRACEME = 0x0 247 PTRACE_CONT = 0x7 248 PTRACE_KILL = 0x8 249 ) 250 251 type Kevent_t struct { 252 Ident uint32 253 Filter int16 254 Flags uint16 255 Fflags uint32 256 Data int64 257 Udata *byte 258 } 259 260 type FdSet struct { 261 Bits [32]uint32 262 } 263 264 const ( 265 SizeofIfMsghdr = 0xa0 266 SizeofIfData = 0x88 267 SizeofIfaMsghdr = 0x18 268 SizeofIfAnnounceMsghdr = 0x1a 269 SizeofRtMsghdr = 0x60 270 SizeofRtMetrics = 0x38 271 ) 272 273 type IfMsghdr struct { 274 Msglen uint16 275 Version uint8 276 Type uint8 277 Hdrlen uint16 278 Index uint16 279 Tableid uint16 280 Pad1 uint8 281 Pad2 uint8 282 Addrs int32 283 Flags int32 284 Xflags int32 285 Data IfData 286 } 287 288 type IfData struct { 289 Type uint8 290 Addrlen uint8 291 Hdrlen uint8 292 Link_state uint8 293 Mtu uint32 294 Metric uint32 295 Rdomain uint32 296 Baudrate uint64 297 Ipackets uint64 298 Ierrors uint64 299 Opackets uint64 300 Oerrors uint64 301 Collisions uint64 302 Ibytes uint64 303 Obytes uint64 304 Imcasts uint64 305 Omcasts uint64 306 Iqdrops uint64 307 Oqdrops uint64 308 Noproto uint64 309 Capabilities uint32 310 Lastchange Timeval 311 } 312 313 type IfaMsghdr struct { 314 Msglen uint16 315 Version uint8 316 Type uint8 317 Hdrlen uint16 318 Index uint16 319 Tableid uint16 320 Pad1 uint8 321 Pad2 uint8 322 Addrs int32 323 Flags int32 324 Metric int32 325 } 326 327 type IfAnnounceMsghdr struct { 328 Msglen uint16 329 Version uint8 330 Type uint8 331 Hdrlen uint16 332 Index uint16 333 What uint16 334 Name [16]int8 335 } 336 337 type RtMsghdr struct { 338 Msglen uint16 339 Version uint8 340 Type uint8 341 Hdrlen uint16 342 Index uint16 343 Tableid uint16 344 Priority uint8 345 Mpls uint8 346 Addrs int32 347 Flags int32 348 Fmask int32 349 Pid int32 350 Seq int32 351 Errno int32 352 Inits uint32 353 Rmx RtMetrics 354 } 355 356 type RtMetrics struct { 357 Pksent uint64 358 Expire int64 359 Locks uint32 360 Mtu uint32 361 Refcnt uint32 362 Hopcount uint32 363 Recvpipe uint32 364 Sendpipe uint32 365 Ssthresh uint32 366 Rtt uint32 367 Rttvar uint32 368 Pad uint32 369 } 370 371 const ( 372 SizeofBpfVersion = 0x4 373 SizeofBpfStat = 0x8 374 SizeofBpfProgram = 0x8 375 SizeofBpfInsn = 0x8 376 SizeofBpfHdr = 0x18 377 ) 378 379 type BpfVersion struct { 380 Major uint16 381 Minor uint16 382 } 383 384 type BpfStat struct { 385 Recv uint32 386 Drop uint32 387 } 388 389 type BpfProgram struct { 390 Len uint32 391 Insns *BpfInsn 392 } 393 394 type BpfInsn struct { 395 Code uint16 396 Jt uint8 397 Jf uint8 398 K uint32 399 } 400 401 type BpfHdr struct { 402 Tstamp BpfTimeval 403 Caplen uint32 404 Datalen uint32 405 Hdrlen uint16 406 Ifidx uint16 407 Flowid uint16 408 Flags uint8 409 Drops uint8 410 } 411 412 type BpfTimeval struct { 413 Sec uint32 414 Usec uint32 415 } 416 417 type Termios struct { 418 Iflag uint32 419 Oflag uint32 420 Cflag uint32 421 Lflag uint32 422 Cc [20]uint8 423 Ispeed int32 424 Ospeed int32 425 } 426 427 type Winsize struct { 428 Row uint16 429 Col uint16 430 Xpixel uint16 431 Ypixel uint16 432 } 433 434 const ( 435 AT_FDCWD = -0x64 436 AT_EACCESS = 0x1 437 AT_SYMLINK_NOFOLLOW = 0x2 438 AT_SYMLINK_FOLLOW = 0x4 439 AT_REMOVEDIR = 0x8 440 ) 441 442 type PollFd struct { 443 Fd int32 444 Events int16 445 Revents int16 446 } 447 448 const ( 449 POLLERR = 0x8 450 POLLHUP = 0x10 451 POLLIN = 0x1 452 POLLNVAL = 0x20 453 POLLOUT = 0x4 454 POLLPRI = 0x2 455 POLLRDBAND = 0x80 456 POLLRDNORM = 0x40 457 POLLWRBAND = 0x100 458 POLLWRNORM = 0x4 459 ) 460 461 type Sigset_t uint32 462 463 type Utsname struct { 464 Sysname [256]byte 465 Nodename [256]byte 466 Release [256]byte 467 Version [256]byte 468 Machine [256]byte 469 } 470 471 const SizeofUvmexp = 0x158 472 473 type Uvmexp struct { 474 Pagesize int32 475 Pagemask int32 476 Pageshift int32 477 Npages int32 478 Free int32 479 Active int32 480 Inactive int32 481 Paging int32 482 Wired int32 483 Zeropages int32 484 Reserve_pagedaemon int32 485 Reserve_kernel int32 486 Unused01 int32 487 Vnodepages int32 488 Vtextpages int32 489 Freemin int32 490 Freetarg int32 491 Inactarg int32 492 Wiredmax int32 493 Anonmin int32 494 Vtextmin int32 495 Vnodemin int32 496 Anonminpct int32 497 Vtextminpct int32 498 Vnodeminpct int32 499 Nswapdev int32 500 Swpages int32 501 Swpginuse int32 502 Swpgonly int32 503 Nswget int32 504 Nanon int32 505 Unused05 int32 506 Unused06 int32 507 Faults int32 508 Traps int32 509 Intrs int32 510 Swtch int32 511 Softs int32 512 Syscalls int32 513 Pageins int32 514 Unused07 int32 515 Unused08 int32 516 Pgswapin int32 517 Pgswapout int32 518 Forks int32 519 Forks_ppwait int32 520 Forks_sharevm int32 521 Pga_zerohit int32 522 Pga_zeromiss int32 523 Unused09 int32 524 Fltnoram int32 525 Fltnoanon int32 526 Fltnoamap int32 527 Fltpgwait int32 528 Fltpgrele int32 529 Fltrelck int32 530 Fltrelckok int32 531 Fltanget int32 532 Fltanretry int32 533 Fltamcopy int32 534 Fltnamap int32 535 Fltnomap int32 536 Fltlget int32 537 Fltget int32 538 Flt_anon int32 539 Flt_acow int32 540 Flt_obj int32 541 Flt_prcopy int32 542 Flt_przero int32 543 Pdwoke int32 544 Pdrevs int32 545 Pdswout int32 546 Pdfreed int32 547 Pdscans int32 548 Pdanscan int32 549 Pdobscan int32 550 Pdreact int32 551 Pdbusy int32 552 Pdpageouts int32 553 Pdpending int32 554 Pddeact int32 555 Unused11 int32 556 Unused12 int32 557 Unused13 int32 558 Fpswtch int32 559 Kmapent int32 560 } 561 562 const SizeofClockinfo = 0x10 563 564 type Clockinfo struct { 565 Hz int32 566 Tick int32 567 Stathz int32 568 Profhz int32 569 }