| 1 |
// cgo -godefs types_darwin.go | go run mkpost.go |
| 2 |
// Code generated by the command above; see README.md. DO NOT EDIT. |
| 3 |
|
| 4 |
//go:build arm64 && darwin |
| 5 |
|
| 6 |
package unix |
| 7 |
|
| 8 |
const ( |
| 9 |
SizeofPtr = 0x8 |
| 10 |
SizeofShort = 0x2 |
| 11 |
SizeofInt = 0x4 |
| 12 |
SizeofLong = 0x8 |
| 13 |
SizeofLongLong = 0x8 |
| 14 |
) |
| 15 |
|
| 16 |
type ( |
| 17 |
_C_short int16 |
| 18 |
_C_int int32 |
| 19 |
_C_long int64 |
| 20 |
_C_long_long int64 |
| 21 |
) |
| 22 |
|
| 23 |
type Timespec struct { |
| 24 |
Sec int64 |
| 25 |
Nsec int64 |
| 26 |
} |
| 27 |
|
| 28 |
type Timeval struct { |
| 29 |
Sec int64 |
| 30 |
Usec int32 |
| 31 |
_ [4]byte |
| 32 |
} |
| 33 |
|
| 34 |
type Timeval32 struct { |
| 35 |
Sec int32 |
| 36 |
Usec int32 |
| 37 |
} |
| 38 |
|
| 39 |
type Rusage struct { |
| 40 |
Utime Timeval |
| 41 |
Stime Timeval |
| 42 |
Maxrss int64 |
| 43 |
Ixrss int64 |
| 44 |
Idrss int64 |
| 45 |
Isrss int64 |
| 46 |
Minflt int64 |
| 47 |
Majflt int64 |
| 48 |
Nswap int64 |
| 49 |
Inblock int64 |
| 50 |
Oublock int64 |
| 51 |
Msgsnd int64 |
| 52 |
Msgrcv int64 |
| 53 |
Nsignals int64 |
| 54 |
Nvcsw int64 |
| 55 |
Nivcsw int64 |
| 56 |
} |
| 57 |
|
| 58 |
type Rlimit struct { |
| 59 |
Cur uint64 |
| 60 |
Max uint64 |
| 61 |
} |
| 62 |
|
| 63 |
type _Gid_t uint32 |
| 64 |
|
| 65 |
type Stat_t struct { |
| 66 |
Dev int32 |
| 67 |
Mode uint16 |
| 68 |
Nlink uint16 |
| 69 |
Ino uint64 |
| 70 |
Uid uint32 |
| 71 |
Gid uint32 |
| 72 |
Rdev int32 |
| 73 |
Atim Timespec |
| 74 |
Mtim Timespec |
| 75 |
Ctim Timespec |
| 76 |
Btim Timespec |
| 77 |
Size int64 |
| 78 |
Blocks int64 |
| 79 |
Blksize int32 |
| 80 |
Flags uint32 |
| 81 |
Gen uint32 |
| 82 |
Lspare int32 |
| 83 |
Qspare [2]int64 |
| 84 |
} |
| 85 |
|
| 86 |
type Statfs_t struct { |
| 87 |
Bsize uint32 |
| 88 |
Iosize int32 |
| 89 |
Blocks uint64 |
| 90 |
Bfree uint64 |
| 91 |
Bavail uint64 |
| 92 |
Files uint64 |
| 93 |
Ffree uint64 |
| 94 |
Fsid Fsid |
| 95 |
Owner uint32 |
| 96 |
Type uint32 |
| 97 |
Flags uint32 |
| 98 |
Fssubtype uint32 |
| 99 |
Fstypename [16]byte |
| 100 |
Mntonname [1024]byte |
| 101 |
Mntfromname [1024]byte |
| 102 |
Flags_ext uint32 |
| 103 |
Reserved [7]uint32 |
| 104 |
} |
| 105 |
|
| 106 |
type Flock_t struct { |
| 107 |
Start int64 |
| 108 |
Len int64 |
| 109 |
Pid int32 |
| 110 |
Type int16 |
| 111 |
Whence int16 |
| 112 |
} |
| 113 |
|
| 114 |
type Fstore_t struct { |
| 115 |
Flags uint32 |
| 116 |
Posmode int32 |
| 117 |
Offset int64 |
| 118 |
Length int64 |
| 119 |
Bytesalloc int64 |
| 120 |
} |
| 121 |
|
| 122 |
type Radvisory_t struct { |
| 123 |
Offset int64 |
| 124 |
Count int32 |
| 125 |
_ [4]byte |
| 126 |
} |
| 127 |
|
| 128 |
type Fbootstraptransfer_t struct { |
| 129 |
Offset int64 |
| 130 |
Length uint64 |
| 131 |
Buffer *byte |
| 132 |
} |
| 133 |
|
| 134 |
type Log2phys_t struct { |
| 135 |
Flags uint32 |
| 136 |
_ [16]byte |
| 137 |
} |
| 138 |
|
| 139 |
type Fsid struct { |
| 140 |
Val [2]int32 |
| 141 |
} |
| 142 |
|
| 143 |
type Dirent struct { |
| 144 |
Ino uint64 |
| 145 |
Seekoff uint64 |
| 146 |
Reclen uint16 |
| 147 |
Namlen uint16 |
| 148 |
Type uint8 |
| 149 |
Name [1024]int8 |
| 150 |
_ [3]byte |
| 151 |
} |
| 152 |
|
| 153 |
type Attrlist struct { |
| 154 |
Bitmapcount uint16 |
| 155 |
Reserved uint16 |
| 156 |
Commonattr uint32 |
| 157 |
Volattr uint32 |
| 158 |
Dirattr uint32 |
| 159 |
Fileattr uint32 |
| 160 |
Forkattr uint32 |
| 161 |
} |
| 162 |
|
| 163 |
const ( |
| 164 |
PathMax = 0x400 |
| 165 |
) |
| 166 |
|
| 167 |
type RawSockaddrInet4 struct { |
| 168 |
Len uint8 |
| 169 |
Family uint8 |
| 170 |
Port uint16 |
| 171 |
Addr [4]byte /* in_addr */ |
| 172 |
Zero [8]int8 |
| 173 |
} |
| 174 |
|
| 175 |
type RawSockaddrInet6 struct { |
| 176 |
Len uint8 |
| 177 |
Family uint8 |
| 178 |
Port uint16 |
| 179 |
Flowinfo uint32 |
| 180 |
Addr [16]byte /* in6_addr */ |
| 181 |
Scope_id uint32 |
| 182 |
} |
| 183 |
|
| 184 |
type RawSockaddrUnix struct { |
| 185 |
Len uint8 |
| 186 |
Family uint8 |
| 187 |
Path [104]int8 |
| 188 |
} |
| 189 |
|
| 190 |
type RawSockaddrDatalink struct { |
| 191 |
Len uint8 |
| 192 |
Family uint8 |
| 193 |
Index uint16 |
| 194 |
Type uint8 |
| 195 |
Nlen uint8 |
| 196 |
Alen uint8 |
| 197 |
Slen uint8 |
| 198 |
Data [12]int8 |
| 199 |
} |
| 200 |
|
| 201 |
type RawSockaddr struct { |
| 202 |
Len uint8 |
| 203 |
Family uint8 |
| 204 |
Data [14]int8 |
| 205 |
} |
| 206 |
|
| 207 |
type RawSockaddrAny struct { |
| 208 |
Addr RawSockaddr |
| 209 |
Pad [92]int8 |
| 210 |
} |
| 211 |
|
| 212 |
type RawSockaddrCtl struct { |
| 213 |
Sc_len uint8 |
| 214 |
Sc_family uint8 |
| 215 |
Ss_sysaddr uint16 |
| 216 |
Sc_id uint32 |
| 217 |
Sc_unit uint32 |
| 218 |
Sc_reserved [5]uint32 |
| 219 |
} |
| 220 |
|
| 221 |
type RawSockaddrVM struct { |
| 222 |
Len uint8 |
| 223 |
Family uint8 |
| 224 |
Reserved1 uint16 |
| 225 |
Port uint32 |
| 226 |
Cid uint32 |
| 227 |
} |
| 228 |
|
| 229 |
type XVSockPCB struct { |
| 230 |
Xv_len uint32 |
| 231 |
Xv_vsockpp uint64 |
| 232 |
Xvp_local_cid uint32 |
| 233 |
Xvp_local_port uint32 |
| 234 |
Xvp_remote_cid uint32 |
| 235 |
Xvp_remote_port uint32 |
| 236 |
Xvp_rxcnt uint32 |
| 237 |
Xvp_txcnt uint32 |
| 238 |
Xvp_peer_rxhiwat uint32 |
| 239 |
Xvp_peer_rxcnt uint32 |
| 240 |
Xvp_last_pid int32 |
| 241 |
Xvp_gencnt uint64 |
| 242 |
Xv_socket XSocket |
| 243 |
_ [4]byte |
| 244 |
} |
| 245 |
|
| 246 |
type XSocket struct { |
| 247 |
Xso_len uint32 |
| 248 |
Xso_so uint32 |
| 249 |
So_type int16 |
| 250 |
So_options int16 |
| 251 |
So_linger int16 |
| 252 |
So_state int16 |
| 253 |
So_pcb uint32 |
| 254 |
Xso_protocol int32 |
| 255 |
Xso_family int32 |
| 256 |
So_qlen int16 |
| 257 |
So_incqlen int16 |
| 258 |
So_qlimit int16 |
| 259 |
So_timeo int16 |
| 260 |
So_error uint16 |
| 261 |
So_pgid int32 |
| 262 |
So_oobmark uint32 |
| 263 |
So_rcv XSockbuf |
| 264 |
So_snd XSockbuf |
| 265 |
So_uid uint32 |
| 266 |
} |
| 267 |
|
| 268 |
type XSocket64 struct { |
| 269 |
Xso_len uint32 |
| 270 |
_ [8]byte |
| 271 |
So_type int16 |
| 272 |
So_options int16 |
| 273 |
So_linger int16 |
| 274 |
So_state int16 |
| 275 |
_ [8]byte |
| 276 |
Xso_protocol int32 |
| 277 |
Xso_family int32 |
| 278 |
So_qlen int16 |
| 279 |
So_incqlen int16 |
| 280 |
So_qlimit int16 |
| 281 |
So_timeo int16 |
| 282 |
So_error uint16 |
| 283 |
So_pgid int32 |
| 284 |
So_oobmark uint32 |
| 285 |
So_rcv XSockbuf |
| 286 |
So_snd XSockbuf |
| 287 |
So_uid uint32 |
| 288 |
} |
| 289 |
|
| 290 |
type XSockbuf struct { |
| 291 |
Cc uint32 |
| 292 |
Hiwat uint32 |
| 293 |
Mbcnt uint32 |
| 294 |
Mbmax uint32 |
| 295 |
Lowat int32 |
| 296 |
Flags int16 |
| 297 |
Timeo int16 |
| 298 |
} |
| 299 |
|
| 300 |
type XVSockPgen struct { |
| 301 |
Len uint32 |
| 302 |
Count uint64 |
| 303 |
Gen uint64 |
| 304 |
Sogen uint64 |
| 305 |
} |
| 306 |
|
| 307 |
type _Socklen uint32 |
| 308 |
|
| 309 |
type SaeAssocID uint32 |
| 310 |
|
| 311 |
type SaeConnID uint32 |
| 312 |
|
| 313 |
type SaEndpoints struct { |
| 314 |
Srcif uint32 |
| 315 |
Srcaddr *RawSockaddr |
| 316 |
Srcaddrlen uint32 |
| 317 |
Dstaddr *RawSockaddr |
| 318 |
Dstaddrlen uint32 |
| 319 |
_ [4]byte |
| 320 |
} |
| 321 |
|
| 322 |
type Xucred struct { |
| 323 |
Version uint32 |
| 324 |
Uid uint32 |
| 325 |
Ngroups int16 |
| 326 |
Groups [16]uint32 |
| 327 |
} |
| 328 |
|
| 329 |
type Linger struct { |
| 330 |
Onoff int32 |
| 331 |
Linger int32 |
| 332 |
} |
| 333 |
|
| 334 |
type Iovec struct { |
| 335 |
Base *byte |
| 336 |
Len uint64 |
| 337 |
} |
| 338 |
|
| 339 |
type IPMreq struct { |
| 340 |
Multiaddr [4]byte /* in_addr */ |
| 341 |
Interface [4]byte /* in_addr */ |
| 342 |
} |
| 343 |
|
| 344 |
type IPMreqn struct { |
| 345 |
Multiaddr [4]byte /* in_addr */ |
| 346 |
Address [4]byte /* in_addr */ |
| 347 |
Ifindex int32 |
| 348 |
} |
| 349 |
|
| 350 |
type IPv6Mreq struct { |
| 351 |
Multiaddr [16]byte /* in6_addr */ |
| 352 |
Interface uint32 |
| 353 |
} |
| 354 |
|
| 355 |
type Msghdr struct { |
| 356 |
Name *byte |
| 357 |
Namelen uint32 |
| 358 |
Iov *Iovec |
| 359 |
Iovlen int32 |
| 360 |
Control *byte |
| 361 |
Controllen uint32 |
| 362 |
Flags int32 |
| 363 |
} |
| 364 |
|
| 365 |
type Cmsghdr struct { |
| 366 |
Len uint32 |
| 367 |
Level int32 |
| 368 |
Type int32 |
| 369 |
} |
| 370 |
|
| 371 |
type Inet4Pktinfo struct { |
| 372 |
Ifindex uint32 |
| 373 |
Spec_dst [4]byte /* in_addr */ |
| 374 |
Addr [4]byte /* in_addr */ |
| 375 |
} |
| 376 |
|
| 377 |
type Inet6Pktinfo struct { |
| 378 |
Addr [16]byte /* in6_addr */ |
| 379 |
Ifindex uint32 |
| 380 |
} |
| 381 |
|
| 382 |
type IPv6MTUInfo struct { |
| 383 |
Addr RawSockaddrInet6 |
| 384 |
Mtu uint32 |
| 385 |
} |
| 386 |
|
| 387 |
type ICMPv6Filter struct { |
| 388 |
Filt [8]uint32 |
| 389 |
} |
| 390 |
|
| 391 |
type TCPConnectionInfo struct { |
| 392 |
State uint8 |
| 393 |
Snd_wscale uint8 |
| 394 |
Rcv_wscale uint8 |
| 395 |
_ uint8 |
| 396 |
Options uint32 |
| 397 |
Flags uint32 |
| 398 |
Rto uint32 |
| 399 |
Maxseg uint32 |
| 400 |
Snd_ssthresh uint32 |
| 401 |
Snd_cwnd uint32 |
| 402 |
Snd_wnd uint32 |
| 403 |
Snd_sbbytes uint32 |
| 404 |
Rcv_wnd uint32 |
| 405 |
Rttcur uint32 |
| 406 |
Srtt uint32 |
| 407 |
Rttvar uint32 |
| 408 |
Txpackets uint64 |
| 409 |
Txbytes uint64 |
| 410 |
Txretransmitbytes uint64 |
| 411 |
Rxpackets uint64 |
| 412 |
Rxbytes uint64 |
| 413 |
Rxoutoforderbytes uint64 |
| 414 |
Txretransmitpackets uint64 |
| 415 |
} |
| 416 |
|
| 417 |
const ( |
| 418 |
SizeofSockaddrInet4 = 0x10 |
| 419 |
SizeofSockaddrInet6 = 0x1c |
| 420 |
SizeofSockaddrAny = 0x6c |
| 421 |
SizeofSockaddrUnix = 0x6a |
| 422 |
SizeofSockaddrDatalink = 0x14 |
| 423 |
SizeofSockaddrCtl = 0x20 |
| 424 |
SizeofSockaddrVM = 0xc |
| 425 |
SizeofXvsockpcb = 0xa8 |
| 426 |
SizeofXSocket = 0x64 |
| 427 |
SizeofXSockbuf = 0x18 |
| 428 |
SizeofXVSockPgen = 0x20 |
| 429 |
SizeofXucred = 0x4c |
| 430 |
SizeofLinger = 0x8 |
| 431 |
SizeofIovec = 0x10 |
| 432 |
SizeofIPMreq = 0x8 |
| 433 |
SizeofIPMreqn = 0xc |
| 434 |
SizeofIPv6Mreq = 0x14 |
| 435 |
SizeofMsghdr = 0x30 |
| 436 |
SizeofCmsghdr = 0xc |
| 437 |
SizeofInet4Pktinfo = 0xc |
| 438 |
SizeofInet6Pktinfo = 0x14 |
| 439 |
SizeofIPv6MTUInfo = 0x20 |
| 440 |
SizeofICMPv6Filter = 0x20 |
| 441 |
SizeofTCPConnectionInfo = 0x70 |
| 442 |
) |
| 443 |
|
| 444 |
const ( |
| 445 |
PTRACE_TRACEME = 0x0 |
| 446 |
PTRACE_CONT = 0x7 |
| 447 |
PTRACE_KILL = 0x8 |
| 448 |
) |
| 449 |
|
| 450 |
type Kevent_t struct { |
| 451 |
Ident uint64 |
| 452 |
Filter int16 |
| 453 |
Flags uint16 |
| 454 |
Fflags uint32 |
| 455 |
Data int64 |
| 456 |
Udata *byte |
| 457 |
} |
| 458 |
|
| 459 |
type FdSet struct { |
| 460 |
Bits [32]int32 |
| 461 |
} |
| 462 |
|
| 463 |
const ( |
| 464 |
SizeofIfMsghdr = 0x70 |
| 465 |
SizeofIfMsghdr2 = 0xa0 |
| 466 |
SizeofIfData = 0x60 |
| 467 |
SizeofIfData64 = 0x80 |
| 468 |
SizeofIfaMsghdr = 0x14 |
| 469 |
SizeofIfmaMsghdr = 0x10 |
| 470 |
SizeofIfmaMsghdr2 = 0x14 |
| 471 |
SizeofRtMsghdr = 0x5c |
| 472 |
SizeofRtMsghdr2 = 0x5c |
| 473 |
SizeofRtMetrics = 0x38 |
| 474 |
) |
| 475 |
|
| 476 |
type IfMsghdr struct { |
| 477 |
Msglen uint16 |
| 478 |
Version uint8 |
| 479 |
Type uint8 |
| 480 |
Addrs int32 |
| 481 |
Flags int32 |
| 482 |
Index uint16 |
| 483 |
Data IfData |
| 484 |
} |
| 485 |
|
| 486 |
type IfMsghdr2 struct { |
| 487 |
Msglen uint16 |
| 488 |
Version uint8 |
| 489 |
Type uint8 |
| 490 |
Addrs int32 |
| 491 |
Flags int32 |
| 492 |
Index uint16 |
| 493 |
Snd_len int32 |
| 494 |
Snd_maxlen int32 |
| 495 |
Snd_drops int32 |
| 496 |
Timer int32 |
| 497 |
Data IfData64 |
| 498 |
} |
| 499 |
|
| 500 |
type IfData struct { |
| 501 |
Type uint8 |
| 502 |
Typelen uint8 |
| 503 |
Physical uint8 |
| 504 |
Addrlen uint8 |
| 505 |
Hdrlen uint8 |
| 506 |
Recvquota uint8 |
| 507 |
Xmitquota uint8 |
| 508 |
Unused1 uint8 |
| 509 |
Mtu uint32 |
| 510 |
Metric uint32 |
| 511 |
Baudrate uint32 |
| 512 |
Ipackets uint32 |
| 513 |
Ierrors uint32 |
| 514 |
Opackets uint32 |
| 515 |
Oerrors uint32 |
| 516 |
Collisions uint32 |
| 517 |
Ibytes uint32 |
| 518 |
Obytes uint32 |
| 519 |
Imcasts uint32 |
| 520 |
Omcasts uint32 |
| 521 |
Iqdrops uint32 |
| 522 |
Noproto uint32 |
| 523 |
Recvtiming uint32 |
| 524 |
Xmittiming uint32 |
| 525 |
Lastchange Timeval32 |
| 526 |
Unused2 uint32 |
| 527 |
Hwassist uint32 |
| 528 |
Reserved1 uint32 |
| 529 |
Reserved2 uint32 |
| 530 |
} |
| 531 |
|
| 532 |
type IfData64 struct { |
| 533 |
Type uint8 |
| 534 |
Typelen uint8 |
| 535 |
Physical uint8 |
| 536 |
Addrlen uint8 |
| 537 |
Hdrlen uint8 |
| 538 |
Recvquota uint8 |
| 539 |
Xmitquota uint8 |
| 540 |
Unused1 uint8 |
| 541 |
Mtu uint32 |
| 542 |
Metric uint32 |
| 543 |
Baudrate uint64 |
| 544 |
Ipackets uint64 |
| 545 |
Ierrors uint64 |
| 546 |
Opackets uint64 |
| 547 |
Oerrors uint64 |
| 548 |
Collisions uint64 |
| 549 |
Ibytes uint64 |
| 550 |
Obytes uint64 |
| 551 |
Imcasts uint64 |
| 552 |
Omcasts uint64 |
| 553 |
Iqdrops uint64 |
| 554 |
Noproto uint64 |
| 555 |
Recvtiming uint32 |
| 556 |
Xmittiming uint32 |
| 557 |
Lastchange Timeval32 |
| 558 |
} |
| 559 |
|
| 560 |
type IfaMsghdr struct { |
| 561 |
Msglen uint16 |
| 562 |
Version uint8 |
| 563 |
Type uint8 |
| 564 |
Addrs int32 |
| 565 |
Flags int32 |
| 566 |
Index uint16 |
| 567 |
Metric int32 |
| 568 |
} |
| 569 |
|
| 570 |
type IfmaMsghdr struct { |
| 571 |
Msglen uint16 |
| 572 |
Version uint8 |
| 573 |
Type uint8 |
| 574 |
Addrs int32 |
| 575 |
Flags int32 |
| 576 |
Index uint16 |
| 577 |
_ [2]byte |
| 578 |
} |
| 579 |
|
| 580 |
type IfmaMsghdr2 struct { |
| 581 |
Msglen uint16 |
| 582 |
Version uint8 |
| 583 |
Type uint8 |
| 584 |
Addrs int32 |
| 585 |
Flags int32 |
| 586 |
Index uint16 |
| 587 |
Refcount int32 |
| 588 |
} |
| 589 |
|
| 590 |
type RtMsghdr struct { |
| 591 |
Msglen uint16 |
| 592 |
Version uint8 |
| 593 |
Type uint8 |
| 594 |
Index uint16 |
| 595 |
Flags int32 |
| 596 |
Addrs int32 |
| 597 |
Pid int32 |
| 598 |
Seq int32 |
| 599 |
Errno int32 |
| 600 |
Use int32 |
| 601 |
Inits uint32 |
| 602 |
Rmx RtMetrics |
| 603 |
} |
| 604 |
|
| 605 |
type RtMsghdr2 struct { |
| 606 |
Msglen uint16 |
| 607 |
Version uint8 |
| 608 |
Type uint8 |
| 609 |
Index uint16 |
| 610 |
Flags int32 |
| 611 |
Addrs int32 |
| 612 |
Refcnt int32 |
| 613 |
Parentflags int32 |
| 614 |
Reserved int32 |
| 615 |
Use int32 |
| 616 |
Inits uint32 |
| 617 |
Rmx RtMetrics |
| 618 |
} |
| 619 |
|
| 620 |
type RtMetrics struct { |
| 621 |
Locks uint32 |
| 622 |
Mtu uint32 |
| 623 |
Hopcount uint32 |
| 624 |
Expire int32 |
| 625 |
Recvpipe uint32 |
| 626 |
Sendpipe uint32 |
| 627 |
Ssthresh uint32 |
| 628 |
Rtt uint32 |
| 629 |
Rttvar uint32 |
| 630 |
Pksent uint32 |
| 631 |
State uint32 |
| 632 |
Filler [3]uint32 |
| 633 |
} |
| 634 |
|
| 635 |
const ( |
| 636 |
SizeofBpfVersion = 0x4 |
| 637 |
SizeofBpfStat = 0x8 |
| 638 |
SizeofBpfProgram = 0x10 |
| 639 |
SizeofBpfInsn = 0x8 |
| 640 |
SizeofBpfHdr = 0x14 |
| 641 |
) |
| 642 |
|
| 643 |
type BpfVersion struct { |
| 644 |
Major uint16 |
| 645 |
Minor uint16 |
| 646 |
} |
| 647 |
|
| 648 |
type BpfStat struct { |
| 649 |
Recv uint32 |
| 650 |
Drop uint32 |
| 651 |
} |
| 652 |
|
| 653 |
type BpfProgram struct { |
| 654 |
Len uint32 |
| 655 |
Insns *BpfInsn |
| 656 |
} |
| 657 |
|
| 658 |
type BpfInsn struct { |
| 659 |
Code uint16 |
| 660 |
Jt uint8 |
| 661 |
Jf uint8 |
| 662 |
K uint32 |
| 663 |
} |
| 664 |
|
| 665 |
type BpfHdr struct { |
| 666 |
Tstamp Timeval32 |
| 667 |
Caplen uint32 |
| 668 |
Datalen uint32 |
| 669 |
Hdrlen uint16 |
| 670 |
_ [2]byte |
| 671 |
} |
| 672 |
|
| 673 |
type Termios struct { |
| 674 |
Iflag uint64 |
| 675 |
Oflag uint64 |
| 676 |
Cflag uint64 |
| 677 |
Lflag uint64 |
| 678 |
Cc [20]uint8 |
| 679 |
Ispeed uint64 |
| 680 |
Ospeed uint64 |
| 681 |
} |
| 682 |
|
| 683 |
type Winsize struct { |
| 684 |
Row uint16 |
| 685 |
Col uint16 |
| 686 |
Xpixel uint16 |
| 687 |
Ypixel uint16 |
| 688 |
} |
| 689 |
|
| 690 |
const ( |
| 691 |
AT_FDCWD = -0x2 |
| 692 |
AT_REMOVEDIR = 0x80 |
| 693 |
AT_SYMLINK_FOLLOW = 0x40 |
| 694 |
AT_SYMLINK_NOFOLLOW = 0x20 |
| 695 |
AT_EACCESS = 0x10 |
| 696 |
) |
| 697 |
|
| 698 |
type PollFd struct { |
| 699 |
Fd int32 |
| 700 |
Events int16 |
| 701 |
Revents int16 |
| 702 |
} |
| 703 |
|
| 704 |
const ( |
| 705 |
POLLERR = 0x8 |
| 706 |
POLLHUP = 0x10 |
| 707 |
POLLIN = 0x1 |
| 708 |
POLLNVAL = 0x20 |
| 709 |
POLLOUT = 0x4 |
| 710 |
POLLPRI = 0x2 |
| 711 |
POLLRDBAND = 0x80 |
| 712 |
POLLRDNORM = 0x40 |
| 713 |
POLLWRBAND = 0x100 |
| 714 |
POLLWRNORM = 0x4 |
| 715 |
) |
| 716 |
|
| 717 |
type Utsname struct { |
| 718 |
Sysname [256]byte |
| 719 |
Nodename [256]byte |
| 720 |
Release [256]byte |
| 721 |
Version [256]byte |
| 722 |
Machine [256]byte |
| 723 |
} |
| 724 |
|
| 725 |
const SizeofClockinfo = 0x14 |
| 726 |
|
| 727 |
type Clockinfo struct { |
| 728 |
Hz int32 |
| 729 |
Tick int32 |
| 730 |
Tickadj int32 |
| 731 |
Stathz int32 |
| 732 |
Profhz int32 |
| 733 |
} |
| 734 |
|
| 735 |
type CtlInfo struct { |
| 736 |
Id uint32 |
| 737 |
Name [96]byte |
| 738 |
} |
| 739 |
|
| 740 |
const SizeofKinfoProc = 0x288 |
| 741 |
|
| 742 |
type Eproc struct { |
| 743 |
Paddr uintptr |
| 744 |
Sess uintptr |
| 745 |
Pcred Pcred |
| 746 |
Ucred Ucred |
| 747 |
Vm Vmspace |
| 748 |
Ppid int32 |
| 749 |
Pgid int32 |
| 750 |
Jobc int16 |
| 751 |
Tdev int32 |
| 752 |
Tpgid int32 |
| 753 |
Tsess uintptr |
| 754 |
Wmesg [8]byte |
| 755 |
Xsize int32 |
| 756 |
Xrssize int16 |
| 757 |
Xccount int16 |
| 758 |
Xswrss int16 |
| 759 |
Flag int32 |
| 760 |
Login [12]byte |
| 761 |
Spare [4]int32 |
| 762 |
_ [4]byte |
| 763 |
} |
| 764 |
|
| 765 |
type ExternProc struct { |
| 766 |
P_starttime Timeval |
| 767 |
P_vmspace *Vmspace |
| 768 |
P_sigacts uintptr |
| 769 |
P_flag int32 |
| 770 |
P_stat int8 |
| 771 |
P_pid int32 |
| 772 |
P_oppid int32 |
| 773 |
P_dupfd int32 |
| 774 |
User_stack *int8 |
| 775 |
Exit_thread *byte |
| 776 |
P_debugger int32 |
| 777 |
Sigwait int32 |
| 778 |
P_estcpu uint32 |
| 779 |
P_cpticks int32 |
| 780 |
P_pctcpu uint32 |
| 781 |
P_wchan *byte |
| 782 |
P_wmesg *int8 |
| 783 |
P_swtime uint32 |
| 784 |
P_slptime uint32 |
| 785 |
P_realtimer Itimerval |
| 786 |
P_rtime Timeval |
| 787 |
P_uticks uint64 |
| 788 |
P_sticks uint64 |
| 789 |
P_iticks uint64 |
| 790 |
P_traceflag int32 |
| 791 |
P_tracep uintptr |
| 792 |
P_siglist int32 |
| 793 |
P_textvp uintptr |
| 794 |
P_holdcnt int32 |
| 795 |
P_sigmask uint32 |
| 796 |
P_sigignore uint32 |
| 797 |
P_sigcatch uint32 |
| 798 |
P_priority uint8 |
| 799 |
P_usrpri uint8 |
| 800 |
P_nice int8 |
| 801 |
P_comm [17]byte |
| 802 |
P_pgrp uintptr |
| 803 |
P_addr uintptr |
| 804 |
P_xstat uint16 |
| 805 |
P_acflag uint16 |
| 806 |
P_ru *Rusage |
| 807 |
} |
| 808 |
|
| 809 |
type Itimerval struct { |
| 810 |
Interval Timeval |
| 811 |
Value Timeval |
| 812 |
} |
| 813 |
|
| 814 |
type KinfoProc struct { |
| 815 |
Proc ExternProc |
| 816 |
Eproc Eproc |
| 817 |
} |
| 818 |
|
| 819 |
type Vmspace struct { |
| 820 |
Dummy int32 |
| 821 |
Dummy2 *int8 |
| 822 |
Dummy3 [5]int32 |
| 823 |
Dummy4 [3]*int8 |
| 824 |
} |
| 825 |
|
| 826 |
type Pcred struct { |
| 827 |
Pc_lock [72]int8 |
| 828 |
Pc_ucred uintptr |
| 829 |
P_ruid uint32 |
| 830 |
P_svuid uint32 |
| 831 |
P_rgid uint32 |
| 832 |
P_svgid uint32 |
| 833 |
P_refcnt int32 |
| 834 |
_ [4]byte |
| 835 |
} |
| 836 |
|
| 837 |
type Ucred struct { |
| 838 |
Ref int32 |
| 839 |
Uid uint32 |
| 840 |
Ngroups int16 |
| 841 |
Groups [16]uint32 |
| 842 |
} |
| 843 |
|
| 844 |
type SysvIpcPerm struct { |
| 845 |
Uid uint32 |
| 846 |
Gid uint32 |
| 847 |
Cuid uint32 |
| 848 |
Cgid uint32 |
| 849 |
Mode uint16 |
| 850 |
_ uint16 |
| 851 |
_ int32 |
| 852 |
} |
| 853 |
type SysvShmDesc struct { |
| 854 |
Perm SysvIpcPerm |
| 855 |
Segsz uint64 |
| 856 |
Lpid int32 |
| 857 |
Cpid int32 |
| 858 |
Nattch uint16 |
| 859 |
_ [34]byte |
| 860 |
} |
| 861 |
|
| 862 |
const ( |
| 863 |
IPC_CREAT = 0x200 |
| 864 |
IPC_EXCL = 0x400 |
| 865 |
IPC_NOWAIT = 0x800 |
| 866 |
IPC_PRIVATE = 0x0 |
| 867 |
) |
| 868 |
|
| 869 |
const ( |
| 870 |
IPC_RMID = 0x0 |
| 871 |
IPC_SET = 0x1 |
| 872 |
IPC_STAT = 0x2 |
| 873 |
) |
| 874 |
|
| 875 |
const ( |
| 876 |
SHM_RDONLY = 0x1000 |
| 877 |
SHM_RND = 0x2000 |
| 878 |
) |