...
Run Format

Source file src/syscall/ztypes_darwin_arm64.go

Documentation: syscall

     1  // Created by cgo -godefs - DO NOT EDIT
     2  // cgo -godefs types_darwin.go
     3  
     4  // +build arm64,darwin
     5  
     6  package syscall
     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  	Pad_cgo_0 [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  	Pad_cgo_0     [4]byte
    74  	Atimespec     Timespec
    75  	Mtimespec     Timespec
    76  	Ctimespec     Timespec
    77  	Birthtimespec 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]int8
   101  	Mntonname   [1024]int8
   102  	Mntfromname [1024]int8
   103  	Reserved    [8]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  	Pad_cgo_0 [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  	Contigbytes int64
   137  	Devoffset   int64
   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  	Pad_cgo_0 [3]byte
   152  }
   153  
   154  type RawSockaddrInet4 struct {
   155  	Len    uint8
   156  	Family uint8
   157  	Port   uint16
   158  	Addr   [4]byte /* in_addr */
   159  	Zero   [8]int8
   160  }
   161  
   162  type RawSockaddrInet6 struct {
   163  	Len      uint8
   164  	Family   uint8
   165  	Port     uint16
   166  	Flowinfo uint32
   167  	Addr     [16]byte /* in6_addr */
   168  	Scope_id uint32
   169  }
   170  
   171  type RawSockaddrUnix struct {
   172  	Len    uint8
   173  	Family uint8
   174  	Path   [104]int8
   175  }
   176  
   177  type RawSockaddrDatalink struct {
   178  	Len    uint8
   179  	Family uint8
   180  	Index  uint16
   181  	Type   uint8
   182  	Nlen   uint8
   183  	Alen   uint8
   184  	Slen   uint8
   185  	Data   [12]int8
   186  }
   187  
   188  type RawSockaddr struct {
   189  	Len    uint8
   190  	Family uint8
   191  	Data   [14]int8
   192  }
   193  
   194  type RawSockaddrAny struct {
   195  	Addr RawSockaddr
   196  	Pad  [92]int8
   197  }
   198  
   199  type _Socklen uint32
   200  
   201  type Linger struct {
   202  	Onoff  int32
   203  	Linger int32
   204  }
   205  
   206  type Iovec struct {
   207  	Base *byte
   208  	Len  uint64
   209  }
   210  
   211  type IPMreq struct {
   212  	Multiaddr [4]byte /* in_addr */
   213  	Interface [4]byte /* in_addr */
   214  }
   215  
   216  type IPv6Mreq struct {
   217  	Multiaddr [16]byte /* in6_addr */
   218  	Interface uint32
   219  }
   220  
   221  type Msghdr struct {
   222  	Name       *byte
   223  	Namelen    uint32
   224  	Pad_cgo_0  [4]byte
   225  	Iov        *Iovec
   226  	Iovlen     int32
   227  	Pad_cgo_1  [4]byte
   228  	Control    *byte
   229  	Controllen uint32
   230  	Flags      int32
   231  }
   232  
   233  type Cmsghdr struct {
   234  	Len   uint32
   235  	Level int32
   236  	Type  int32
   237  }
   238  
   239  type Inet4Pktinfo struct {
   240  	Ifindex  uint32
   241  	Spec_dst [4]byte /* in_addr */
   242  	Addr     [4]byte /* in_addr */
   243  }
   244  
   245  type Inet6Pktinfo struct {
   246  	Addr    [16]byte /* in6_addr */
   247  	Ifindex uint32
   248  }
   249  
   250  type IPv6MTUInfo struct {
   251  	Addr RawSockaddrInet6
   252  	Mtu  uint32
   253  }
   254  
   255  type ICMPv6Filter struct {
   256  	Filt [8]uint32
   257  }
   258  
   259  const (
   260  	SizeofSockaddrInet4    = 0x10
   261  	SizeofSockaddrInet6    = 0x1c
   262  	SizeofSockaddrAny      = 0x6c
   263  	SizeofSockaddrUnix     = 0x6a
   264  	SizeofSockaddrDatalink = 0x14
   265  	SizeofLinger           = 0x8
   266  	SizeofIPMreq           = 0x8
   267  	SizeofIPv6Mreq         = 0x14
   268  	SizeofMsghdr           = 0x30
   269  	SizeofCmsghdr          = 0xc
   270  	SizeofInet4Pktinfo     = 0xc
   271  	SizeofInet6Pktinfo     = 0x14
   272  	SizeofIPv6MTUInfo      = 0x20
   273  	SizeofICMPv6Filter     = 0x20
   274  )
   275  
   276  const (
   277  	PTRACE_TRACEME = 0x0
   278  	PTRACE_CONT    = 0x7
   279  	PTRACE_KILL    = 0x8
   280  )
   281  
   282  type Kevent_t struct {
   283  	Ident  uint64
   284  	Filter int16
   285  	Flags  uint16
   286  	Fflags uint32
   287  	Data   int64
   288  	Udata  *byte
   289  }
   290  
   291  type FdSet struct {
   292  	Bits [32]int32
   293  }
   294  
   295  const (
   296  	SizeofIfMsghdr    = 0x70
   297  	SizeofIfData      = 0x60
   298  	SizeofIfaMsghdr   = 0x14
   299  	SizeofIfmaMsghdr  = 0x10
   300  	SizeofIfmaMsghdr2 = 0x14
   301  	SizeofRtMsghdr    = 0x5c
   302  	SizeofRtMetrics   = 0x38
   303  )
   304  
   305  type IfMsghdr struct {
   306  	Msglen    uint16
   307  	Version   uint8
   308  	Type      uint8
   309  	Addrs     int32
   310  	Flags     int32
   311  	Index     uint16
   312  	Pad_cgo_0 [2]byte
   313  	Data      IfData
   314  }
   315  
   316  type IfData struct {
   317  	Type       uint8
   318  	Typelen    uint8
   319  	Physical   uint8
   320  	Addrlen    uint8
   321  	Hdrlen     uint8
   322  	Recvquota  uint8
   323  	Xmitquota  uint8
   324  	Unused1    uint8
   325  	Mtu        uint32
   326  	Metric     uint32
   327  	Baudrate   uint32
   328  	Ipackets   uint32
   329  	Ierrors    uint32
   330  	Opackets   uint32
   331  	Oerrors    uint32
   332  	Collisions uint32
   333  	Ibytes     uint32
   334  	Obytes     uint32
   335  	Imcasts    uint32
   336  	Omcasts    uint32
   337  	Iqdrops    uint32
   338  	Noproto    uint32
   339  	Recvtiming uint32
   340  	Xmittiming uint32
   341  	Lastchange Timeval32
   342  	Unused2    uint32
   343  	Hwassist   uint32
   344  	Reserved1  uint32
   345  	Reserved2  uint32
   346  }
   347  
   348  type IfaMsghdr struct {
   349  	Msglen    uint16
   350  	Version   uint8
   351  	Type      uint8
   352  	Addrs     int32
   353  	Flags     int32
   354  	Index     uint16
   355  	Pad_cgo_0 [2]byte
   356  	Metric    int32
   357  }
   358  
   359  type IfmaMsghdr struct {
   360  	Msglen    uint16
   361  	Version   uint8
   362  	Type      uint8
   363  	Addrs     int32
   364  	Flags     int32
   365  	Index     uint16
   366  	Pad_cgo_0 [2]byte
   367  }
   368  
   369  type IfmaMsghdr2 struct {
   370  	Msglen    uint16
   371  	Version   uint8
   372  	Type      uint8
   373  	Addrs     int32
   374  	Flags     int32
   375  	Index     uint16
   376  	Pad_cgo_0 [2]byte
   377  	Refcount  int32
   378  }
   379  
   380  type RtMsghdr struct {
   381  	Msglen    uint16
   382  	Version   uint8
   383  	Type      uint8
   384  	Index     uint16
   385  	Pad_cgo_0 [2]byte
   386  	Flags     int32
   387  	Addrs     int32
   388  	Pid       int32
   389  	Seq       int32
   390  	Errno     int32
   391  	Use       int32
   392  	Inits     uint32
   393  	Rmx       RtMetrics
   394  }
   395  
   396  type RtMetrics struct {
   397  	Locks    uint32
   398  	Mtu      uint32
   399  	Hopcount uint32
   400  	Expire   int32
   401  	Recvpipe uint32
   402  	Sendpipe uint32
   403  	Ssthresh uint32
   404  	Rtt      uint32
   405  	Rttvar   uint32
   406  	Pksent   uint32
   407  	Filler   [4]uint32
   408  }
   409  
   410  const (
   411  	SizeofBpfVersion = 0x4
   412  	SizeofBpfStat    = 0x8
   413  	SizeofBpfProgram = 0x10
   414  	SizeofBpfInsn    = 0x8
   415  	SizeofBpfHdr     = 0x14
   416  )
   417  
   418  type BpfVersion struct {
   419  	Major uint16
   420  	Minor uint16
   421  }
   422  
   423  type BpfStat struct {
   424  	Recv uint32
   425  	Drop uint32
   426  }
   427  
   428  type BpfProgram struct {
   429  	Len       uint32
   430  	Pad_cgo_0 [4]byte
   431  	Insns     *BpfInsn
   432  }
   433  
   434  type BpfInsn struct {
   435  	Code uint16
   436  	Jt   uint8
   437  	Jf   uint8
   438  	K    uint32
   439  }
   440  
   441  type BpfHdr struct {
   442  	Tstamp    Timeval32
   443  	Caplen    uint32
   444  	Datalen   uint32
   445  	Hdrlen    uint16
   446  	Pad_cgo_0 [2]byte
   447  }
   448  
   449  const (
   450  	_AT_FDCWD = -0x2
   451  )
   452  
   453  type Termios struct {
   454  	Iflag     uint64
   455  	Oflag     uint64
   456  	Cflag     uint64
   457  	Lflag     uint64
   458  	Cc        [20]uint8
   459  	Pad_cgo_0 [4]byte
   460  	Ispeed    uint64
   461  	Ospeed    uint64
   462  }
   463  

View as plain text