golang.org/x/sys@v0.20.1-0.20240517151509-673e0f94c16d/unix/ztypes_darwin_arm64.go (about) 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 Xucred struct { 310 Version uint32 311 Uid uint32 312 Ngroups int16 313 Groups [16]uint32 314 } 315 316 type Linger struct { 317 Onoff int32 318 Linger int32 319 } 320 321 type Iovec struct { 322 Base *byte 323 Len uint64 324 } 325 326 type IPMreq struct { 327 Multiaddr [4]byte /* in_addr */ 328 Interface [4]byte /* in_addr */ 329 } 330 331 type IPMreqn struct { 332 Multiaddr [4]byte /* in_addr */ 333 Address [4]byte /* in_addr */ 334 Ifindex int32 335 } 336 337 type IPv6Mreq struct { 338 Multiaddr [16]byte /* in6_addr */ 339 Interface uint32 340 } 341 342 type Msghdr struct { 343 Name *byte 344 Namelen uint32 345 Iov *Iovec 346 Iovlen int32 347 Control *byte 348 Controllen uint32 349 Flags int32 350 } 351 352 type Cmsghdr struct { 353 Len uint32 354 Level int32 355 Type int32 356 } 357 358 type Inet4Pktinfo struct { 359 Ifindex uint32 360 Spec_dst [4]byte /* in_addr */ 361 Addr [4]byte /* in_addr */ 362 } 363 364 type Inet6Pktinfo struct { 365 Addr [16]byte /* in6_addr */ 366 Ifindex uint32 367 } 368 369 type IPv6MTUInfo struct { 370 Addr RawSockaddrInet6 371 Mtu uint32 372 } 373 374 type ICMPv6Filter struct { 375 Filt [8]uint32 376 } 377 378 type TCPConnectionInfo struct { 379 State uint8 380 Snd_wscale uint8 381 Rcv_wscale uint8 382 _ uint8 383 Options uint32 384 Flags uint32 385 Rto uint32 386 Maxseg uint32 387 Snd_ssthresh uint32 388 Snd_cwnd uint32 389 Snd_wnd uint32 390 Snd_sbbytes uint32 391 Rcv_wnd uint32 392 Rttcur uint32 393 Srtt uint32 394 Rttvar uint32 395 Txpackets uint64 396 Txbytes uint64 397 Txretransmitbytes uint64 398 Rxpackets uint64 399 Rxbytes uint64 400 Rxoutoforderbytes uint64 401 Txretransmitpackets uint64 402 } 403 404 const ( 405 SizeofSockaddrInet4 = 0x10 406 SizeofSockaddrInet6 = 0x1c 407 SizeofSockaddrAny = 0x6c 408 SizeofSockaddrUnix = 0x6a 409 SizeofSockaddrDatalink = 0x14 410 SizeofSockaddrCtl = 0x20 411 SizeofSockaddrVM = 0xc 412 SizeofXvsockpcb = 0xa8 413 SizeofXSocket = 0x64 414 SizeofXSockbuf = 0x18 415 SizeofXVSockPgen = 0x20 416 SizeofXucred = 0x4c 417 SizeofLinger = 0x8 418 SizeofIovec = 0x10 419 SizeofIPMreq = 0x8 420 SizeofIPMreqn = 0xc 421 SizeofIPv6Mreq = 0x14 422 SizeofMsghdr = 0x30 423 SizeofCmsghdr = 0xc 424 SizeofInet4Pktinfo = 0xc 425 SizeofInet6Pktinfo = 0x14 426 SizeofIPv6MTUInfo = 0x20 427 SizeofICMPv6Filter = 0x20 428 SizeofTCPConnectionInfo = 0x70 429 ) 430 431 const ( 432 PTRACE_TRACEME = 0x0 433 PTRACE_CONT = 0x7 434 PTRACE_KILL = 0x8 435 ) 436 437 type Kevent_t struct { 438 Ident uint64 439 Filter int16 440 Flags uint16 441 Fflags uint32 442 Data int64 443 Udata *byte 444 } 445 446 type FdSet struct { 447 Bits [32]int32 448 } 449 450 const ( 451 SizeofIfMsghdr = 0x70 452 SizeofIfData = 0x60 453 SizeofIfaMsghdr = 0x14 454 SizeofIfmaMsghdr = 0x10 455 SizeofIfmaMsghdr2 = 0x14 456 SizeofRtMsghdr = 0x5c 457 SizeofRtMetrics = 0x38 458 ) 459 460 type IfMsghdr struct { 461 Msglen uint16 462 Version uint8 463 Type uint8 464 Addrs int32 465 Flags int32 466 Index uint16 467 Data IfData 468 } 469 470 type IfData struct { 471 Type uint8 472 Typelen uint8 473 Physical uint8 474 Addrlen uint8 475 Hdrlen uint8 476 Recvquota uint8 477 Xmitquota uint8 478 Unused1 uint8 479 Mtu uint32 480 Metric uint32 481 Baudrate uint32 482 Ipackets uint32 483 Ierrors uint32 484 Opackets uint32 485 Oerrors uint32 486 Collisions uint32 487 Ibytes uint32 488 Obytes uint32 489 Imcasts uint32 490 Omcasts uint32 491 Iqdrops uint32 492 Noproto uint32 493 Recvtiming uint32 494 Xmittiming uint32 495 Lastchange Timeval32 496 Unused2 uint32 497 Hwassist uint32 498 Reserved1 uint32 499 Reserved2 uint32 500 } 501 502 type IfaMsghdr struct { 503 Msglen uint16 504 Version uint8 505 Type uint8 506 Addrs int32 507 Flags int32 508 Index uint16 509 Metric int32 510 } 511 512 type IfmaMsghdr struct { 513 Msglen uint16 514 Version uint8 515 Type uint8 516 Addrs int32 517 Flags int32 518 Index uint16 519 _ [2]byte 520 } 521 522 type IfmaMsghdr2 struct { 523 Msglen uint16 524 Version uint8 525 Type uint8 526 Addrs int32 527 Flags int32 528 Index uint16 529 Refcount int32 530 } 531 532 type RtMsghdr struct { 533 Msglen uint16 534 Version uint8 535 Type uint8 536 Index uint16 537 Flags int32 538 Addrs int32 539 Pid int32 540 Seq int32 541 Errno int32 542 Use int32 543 Inits uint32 544 Rmx RtMetrics 545 } 546 547 type RtMetrics struct { 548 Locks uint32 549 Mtu uint32 550 Hopcount uint32 551 Expire int32 552 Recvpipe uint32 553 Sendpipe uint32 554 Ssthresh uint32 555 Rtt uint32 556 Rttvar uint32 557 Pksent uint32 558 State uint32 559 Filler [3]uint32 560 } 561 562 const ( 563 SizeofBpfVersion = 0x4 564 SizeofBpfStat = 0x8 565 SizeofBpfProgram = 0x10 566 SizeofBpfInsn = 0x8 567 SizeofBpfHdr = 0x14 568 ) 569 570 type BpfVersion struct { 571 Major uint16 572 Minor uint16 573 } 574 575 type BpfStat struct { 576 Recv uint32 577 Drop uint32 578 } 579 580 type BpfProgram struct { 581 Len uint32 582 Insns *BpfInsn 583 } 584 585 type BpfInsn struct { 586 Code uint16 587 Jt uint8 588 Jf uint8 589 K uint32 590 } 591 592 type BpfHdr struct { 593 Tstamp Timeval32 594 Caplen uint32 595 Datalen uint32 596 Hdrlen uint16 597 _ [2]byte 598 } 599 600 type Termios struct { 601 Iflag uint64 602 Oflag uint64 603 Cflag uint64 604 Lflag uint64 605 Cc [20]uint8 606 Ispeed uint64 607 Ospeed uint64 608 } 609 610 type Winsize struct { 611 Row uint16 612 Col uint16 613 Xpixel uint16 614 Ypixel uint16 615 } 616 617 const ( 618 AT_FDCWD = -0x2 619 AT_REMOVEDIR = 0x80 620 AT_SYMLINK_FOLLOW = 0x40 621 AT_SYMLINK_NOFOLLOW = 0x20 622 AT_EACCESS = 0x10 623 ) 624 625 type PollFd struct { 626 Fd int32 627 Events int16 628 Revents int16 629 } 630 631 const ( 632 POLLERR = 0x8 633 POLLHUP = 0x10 634 POLLIN = 0x1 635 POLLNVAL = 0x20 636 POLLOUT = 0x4 637 POLLPRI = 0x2 638 POLLRDBAND = 0x80 639 POLLRDNORM = 0x40 640 POLLWRBAND = 0x100 641 POLLWRNORM = 0x4 642 ) 643 644 type Utsname struct { 645 Sysname [256]byte 646 Nodename [256]byte 647 Release [256]byte 648 Version [256]byte 649 Machine [256]byte 650 } 651 652 const SizeofClockinfo = 0x14 653 654 type Clockinfo struct { 655 Hz int32 656 Tick int32 657 Tickadj int32 658 Stathz int32 659 Profhz int32 660 } 661 662 type CtlInfo struct { 663 Id uint32 664 Name [96]byte 665 } 666 667 const SizeofKinfoProc = 0x288 668 669 type Eproc struct { 670 Paddr uintptr 671 Sess uintptr 672 Pcred Pcred 673 Ucred Ucred 674 Vm Vmspace 675 Ppid int32 676 Pgid int32 677 Jobc int16 678 Tdev int32 679 Tpgid int32 680 Tsess uintptr 681 Wmesg [8]byte 682 Xsize int32 683 Xrssize int16 684 Xccount int16 685 Xswrss int16 686 Flag int32 687 Login [12]byte 688 Spare [4]int32 689 _ [4]byte 690 } 691 692 type ExternProc struct { 693 P_starttime Timeval 694 P_vmspace *Vmspace 695 P_sigacts uintptr 696 P_flag int32 697 P_stat int8 698 P_pid int32 699 P_oppid int32 700 P_dupfd int32 701 User_stack *int8 702 Exit_thread *byte 703 P_debugger int32 704 Sigwait int32 705 P_estcpu uint32 706 P_cpticks int32 707 P_pctcpu uint32 708 P_wchan *byte 709 P_wmesg *int8 710 P_swtime uint32 711 P_slptime uint32 712 P_realtimer Itimerval 713 P_rtime Timeval 714 P_uticks uint64 715 P_sticks uint64 716 P_iticks uint64 717 P_traceflag int32 718 P_tracep uintptr 719 P_siglist int32 720 P_textvp uintptr 721 P_holdcnt int32 722 P_sigmask uint32 723 P_sigignore uint32 724 P_sigcatch uint32 725 P_priority uint8 726 P_usrpri uint8 727 P_nice int8 728 P_comm [17]byte 729 P_pgrp uintptr 730 P_addr uintptr 731 P_xstat uint16 732 P_acflag uint16 733 P_ru *Rusage 734 } 735 736 type Itimerval struct { 737 Interval Timeval 738 Value Timeval 739 } 740 741 type KinfoProc struct { 742 Proc ExternProc 743 Eproc Eproc 744 } 745 746 type Vmspace struct { 747 Dummy int32 748 Dummy2 *int8 749 Dummy3 [5]int32 750 Dummy4 [3]*int8 751 } 752 753 type Pcred struct { 754 Pc_lock [72]int8 755 Pc_ucred uintptr 756 P_ruid uint32 757 P_svuid uint32 758 P_rgid uint32 759 P_svgid uint32 760 P_refcnt int32 761 _ [4]byte 762 } 763 764 type Ucred struct { 765 Ref int32 766 Uid uint32 767 Ngroups int16 768 Groups [16]uint32 769 } 770 771 type SysvIpcPerm struct { 772 Uid uint32 773 Gid uint32 774 Cuid uint32 775 Cgid uint32 776 Mode uint16 777 _ uint16 778 _ int32 779 } 780 type SysvShmDesc struct { 781 Perm SysvIpcPerm 782 Segsz uint64 783 Lpid int32 784 Cpid int32 785 Nattch uint16 786 _ [34]byte 787 } 788 789 const ( 790 IPC_CREAT = 0x200 791 IPC_EXCL = 0x400 792 IPC_NOWAIT = 0x800 793 IPC_PRIVATE = 0x0 794 ) 795 796 const ( 797 IPC_RMID = 0x0 798 IPC_SET = 0x1 799 IPC_STAT = 0x2 800 ) 801 802 const ( 803 SHM_RDONLY = 0x1000 804 SHM_RND = 0x2000 805 )