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