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