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