github.com/fletavendor/sys@v0.0.0-20181107165924-66b7b1311ac8/unix/ztypes_darwin_386.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  // +build 386,darwin
     5  
     6  package unix
     7  
     8  const (
     9  	SizeofPtr      = 0x4
    10  	SizeofShort    = 0x2
    11  	SizeofInt      = 0x4
    12  	SizeofLong     = 0x4
    13  	SizeofLongLong = 0x8
    14  )
    15  
    16  type (
    17  	_C_short     int16
    18  	_C_int       int32
    19  	_C_long      int32
    20  	_C_long_long int64
    21  )
    22  
    23  type Timespec struct {
    24  	Sec  int32
    25  	Nsec int32
    26  }
    27  
    28  type Timeval struct {
    29  	Sec  int32
    30  	Usec int32
    31  }
    32  
    33  type Timeval32 struct{}
    34  
    35  type Rusage struct {
    36  	Utime    Timeval
    37  	Stime    Timeval
    38  	Maxrss   int32
    39  	Ixrss    int32
    40  	Idrss    int32
    41  	Isrss    int32
    42  	Minflt   int32
    43  	Majflt   int32
    44  	Nswap    int32
    45  	Inblock  int32
    46  	Oublock  int32
    47  	Msgsnd   int32
    48  	Msgrcv   int32
    49  	Nsignals int32
    50  	Nvcsw    int32
    51  	Nivcsw   int32
    52  }
    53  
    54  type Rlimit struct {
    55  	Cur uint64
    56  	Max uint64
    57  }
    58  
    59  type _Gid_t uint32
    60  
    61  type Stat_t struct {
    62  	Dev           int32
    63  	Mode          uint16
    64  	Nlink         uint16
    65  	Ino           uint64
    66  	Uid           uint32
    67  	Gid           uint32
    68  	Rdev          int32
    69  	Atimespec     Timespec
    70  	Mtimespec     Timespec
    71  	Ctimespec     Timespec
    72  	Birthtimespec Timespec
    73  	Size          int64
    74  	Blocks        int64
    75  	Blksize       int32
    76  	Flags         uint32
    77  	Gen           uint32
    78  	Lspare        int32
    79  	Qspare        [2]int64
    80  }
    81  
    82  type Statfs_t struct {
    83  	Bsize       uint32
    84  	Iosize      int32
    85  	Blocks      uint64
    86  	Bfree       uint64
    87  	Bavail      uint64
    88  	Files       uint64
    89  	Ffree       uint64
    90  	Fsid        Fsid
    91  	Owner       uint32
    92  	Type        uint32
    93  	Flags       uint32
    94  	Fssubtype   uint32
    95  	Fstypename  [16]int8
    96  	Mntonname   [1024]int8
    97  	Mntfromname [1024]int8
    98  	Reserved    [8]uint32
    99  }
   100  
   101  type Flock_t struct {
   102  	Start  int64
   103  	Len    int64
   104  	Pid    int32
   105  	Type   int16
   106  	Whence int16
   107  }
   108  
   109  type Fstore_t struct {
   110  	Flags      uint32
   111  	Posmode    int32
   112  	Offset     int64
   113  	Length     int64
   114  	Bytesalloc int64
   115  }
   116  
   117  type Radvisory_t struct {
   118  	Offset int64
   119  	Count  int32
   120  }
   121  
   122  type Fbootstraptransfer_t struct {
   123  	Offset int64
   124  	Length uint32
   125  	Buffer *byte
   126  }
   127  
   128  type Log2phys_t struct {
   129  	Flags       uint32
   130  	Contigbytes int64
   131  	Devoffset   int64
   132  }
   133  
   134  type Fsid struct {
   135  	Val [2]int32
   136  }
   137  
   138  type Dirent struct {
   139  	Ino     uint64
   140  	Seekoff uint64
   141  	Reclen  uint16
   142  	Namlen  uint16
   143  	Type    uint8
   144  	Name    [1024]int8
   145  	_       [3]byte
   146  }
   147  
   148  type RawSockaddrInet4 struct {
   149  	Len    uint8
   150  	Family uint8
   151  	Port   uint16
   152  	Addr   [4]byte /* in_addr */
   153  	Zero   [8]int8
   154  }
   155  
   156  type RawSockaddrInet6 struct {
   157  	Len      uint8
   158  	Family   uint8
   159  	Port     uint16
   160  	Flowinfo uint32
   161  	Addr     [16]byte /* in6_addr */
   162  	Scope_id uint32
   163  }
   164  
   165  type RawSockaddrUnix struct {
   166  	Len    uint8
   167  	Family uint8
   168  	Path   [104]int8
   169  }
   170  
   171  type RawSockaddrDatalink struct {
   172  	Len    uint8
   173  	Family uint8
   174  	Index  uint16
   175  	Type   uint8
   176  	Nlen   uint8
   177  	Alen   uint8
   178  	Slen   uint8
   179  	Data   [12]int8
   180  }
   181  
   182  type RawSockaddr struct {
   183  	Len    uint8
   184  	Family uint8
   185  	Data   [14]int8
   186  }
   187  
   188  type RawSockaddrAny struct {
   189  	Addr RawSockaddr
   190  	Pad  [92]int8
   191  }
   192  
   193  type _Socklen uint32
   194  
   195  type Linger struct {
   196  	Onoff  int32
   197  	Linger int32
   198  }
   199  
   200  type Iovec struct {
   201  	Base *byte
   202  	Len  uint32
   203  }
   204  
   205  type IPMreq struct {
   206  	Multiaddr [4]byte /* in_addr */
   207  	Interface [4]byte /* in_addr */
   208  }
   209  
   210  type IPv6Mreq struct {
   211  	Multiaddr [16]byte /* in6_addr */
   212  	Interface uint32
   213  }
   214  
   215  type Msghdr struct {
   216  	Name       *byte
   217  	Namelen    uint32
   218  	Iov        *Iovec
   219  	Iovlen     int32
   220  	Control    *byte
   221  	Controllen uint32
   222  	Flags      int32
   223  }
   224  
   225  type Cmsghdr struct {
   226  	Len   uint32
   227  	Level int32
   228  	Type  int32
   229  }
   230  
   231  type Inet4Pktinfo struct {
   232  	Ifindex  uint32
   233  	Spec_dst [4]byte /* in_addr */
   234  	Addr     [4]byte /* in_addr */
   235  }
   236  
   237  type Inet6Pktinfo struct {
   238  	Addr    [16]byte /* in6_addr */
   239  	Ifindex uint32
   240  }
   241  
   242  type IPv6MTUInfo struct {
   243  	Addr RawSockaddrInet6
   244  	Mtu  uint32
   245  }
   246  
   247  type ICMPv6Filter struct {
   248  	Filt [8]uint32
   249  }
   250  
   251  const (
   252  	SizeofSockaddrInet4    = 0x10
   253  	SizeofSockaddrInet6    = 0x1c
   254  	SizeofSockaddrAny      = 0x6c
   255  	SizeofSockaddrUnix     = 0x6a
   256  	SizeofSockaddrDatalink = 0x14
   257  	SizeofLinger           = 0x8
   258  	SizeofIPMreq           = 0x8
   259  	SizeofIPv6Mreq         = 0x14
   260  	SizeofMsghdr           = 0x1c
   261  	SizeofCmsghdr          = 0xc
   262  	SizeofInet4Pktinfo     = 0xc
   263  	SizeofInet6Pktinfo     = 0x14
   264  	SizeofIPv6MTUInfo      = 0x20
   265  	SizeofICMPv6Filter     = 0x20
   266  )
   267  
   268  const (
   269  	PTRACE_TRACEME = 0x0
   270  	PTRACE_CONT    = 0x7
   271  	PTRACE_KILL    = 0x8
   272  )
   273  
   274  type Kevent_t struct {
   275  	Ident  uint32
   276  	Filter int16
   277  	Flags  uint16
   278  	Fflags uint32
   279  	Data   int32
   280  	Udata  *byte
   281  }
   282  
   283  type FdSet struct {
   284  	Bits [32]int32
   285  }
   286  
   287  const (
   288  	SizeofIfMsghdr    = 0x70
   289  	SizeofIfData      = 0x60
   290  	SizeofIfaMsghdr   = 0x14
   291  	SizeofIfmaMsghdr  = 0x10
   292  	SizeofIfmaMsghdr2 = 0x14
   293  	SizeofRtMsghdr    = 0x5c
   294  	SizeofRtMetrics   = 0x38
   295  )
   296  
   297  type IfMsghdr struct {
   298  	Msglen  uint16
   299  	Version uint8
   300  	Type    uint8
   301  	Addrs   int32
   302  	Flags   int32
   303  	Index   uint16
   304  	_       [2]byte
   305  	Data    IfData
   306  }
   307  
   308  type IfData struct {
   309  	Type       uint8
   310  	Typelen    uint8
   311  	Physical   uint8
   312  	Addrlen    uint8
   313  	Hdrlen     uint8
   314  	Recvquota  uint8
   315  	Xmitquota  uint8
   316  	Unused1    uint8
   317  	Mtu        uint32
   318  	Metric     uint32
   319  	Baudrate   uint32
   320  	Ipackets   uint32
   321  	Ierrors    uint32
   322  	Opackets   uint32
   323  	Oerrors    uint32
   324  	Collisions uint32
   325  	Ibytes     uint32
   326  	Obytes     uint32
   327  	Imcasts    uint32
   328  	Omcasts    uint32
   329  	Iqdrops    uint32
   330  	Noproto    uint32
   331  	Recvtiming uint32
   332  	Xmittiming uint32
   333  	Lastchange Timeval
   334  	Unused2    uint32
   335  	Hwassist   uint32
   336  	Reserved1  uint32
   337  	Reserved2  uint32
   338  }
   339  
   340  type IfaMsghdr struct {
   341  	Msglen  uint16
   342  	Version uint8
   343  	Type    uint8
   344  	Addrs   int32
   345  	Flags   int32
   346  	Index   uint16
   347  	_       [2]byte
   348  	Metric  int32
   349  }
   350  
   351  type IfmaMsghdr struct {
   352  	Msglen  uint16
   353  	Version uint8
   354  	Type    uint8
   355  	Addrs   int32
   356  	Flags   int32
   357  	Index   uint16
   358  	_       [2]byte
   359  }
   360  
   361  type IfmaMsghdr2 struct {
   362  	Msglen   uint16
   363  	Version  uint8
   364  	Type     uint8
   365  	Addrs    int32
   366  	Flags    int32
   367  	Index    uint16
   368  	_        [2]byte
   369  	Refcount int32
   370  }
   371  
   372  type RtMsghdr struct {
   373  	Msglen  uint16
   374  	Version uint8
   375  	Type    uint8
   376  	Index   uint16
   377  	_       [2]byte
   378  	Flags   int32
   379  	Addrs   int32
   380  	Pid     int32
   381  	Seq     int32
   382  	Errno   int32
   383  	Use     int32
   384  	Inits   uint32
   385  	Rmx     RtMetrics
   386  }
   387  
   388  type RtMetrics struct {
   389  	Locks    uint32
   390  	Mtu      uint32
   391  	Hopcount uint32
   392  	Expire   int32
   393  	Recvpipe uint32
   394  	Sendpipe uint32
   395  	Ssthresh uint32
   396  	Rtt      uint32
   397  	Rttvar   uint32
   398  	Pksent   uint32
   399  	Filler   [4]uint32
   400  }
   401  
   402  const (
   403  	SizeofBpfVersion = 0x4
   404  	SizeofBpfStat    = 0x8
   405  	SizeofBpfProgram = 0x8
   406  	SizeofBpfInsn    = 0x8
   407  	SizeofBpfHdr     = 0x14
   408  )
   409  
   410  type BpfVersion struct {
   411  	Major uint16
   412  	Minor uint16
   413  }
   414  
   415  type BpfStat struct {
   416  	Recv uint32
   417  	Drop uint32
   418  }
   419  
   420  type BpfProgram struct {
   421  	Len   uint32
   422  	Insns *BpfInsn
   423  }
   424  
   425  type BpfInsn struct {
   426  	Code uint16
   427  	Jt   uint8
   428  	Jf   uint8
   429  	K    uint32
   430  }
   431  
   432  type BpfHdr struct {
   433  	Tstamp  Timeval
   434  	Caplen  uint32
   435  	Datalen uint32
   436  	Hdrlen  uint16
   437  	_       [2]byte
   438  }
   439  
   440  type Termios struct {
   441  	Iflag  uint32
   442  	Oflag  uint32
   443  	Cflag  uint32
   444  	Lflag  uint32
   445  	Cc     [20]uint8
   446  	Ispeed uint32
   447  	Ospeed uint32
   448  }
   449  
   450  type Winsize struct {
   451  	Row    uint16
   452  	Col    uint16
   453  	Xpixel uint16
   454  	Ypixel uint16
   455  }
   456  
   457  const (
   458  	AT_FDCWD            = -0x2
   459  	AT_REMOVEDIR        = 0x80
   460  	AT_SYMLINK_FOLLOW   = 0x40
   461  	AT_SYMLINK_NOFOLLOW = 0x20
   462  )
   463  
   464  type PollFd struct {
   465  	Fd      int32
   466  	Events  int16
   467  	Revents int16
   468  }
   469  
   470  const (
   471  	POLLERR    = 0x8
   472  	POLLHUP    = 0x10
   473  	POLLIN     = 0x1
   474  	POLLNVAL   = 0x20
   475  	POLLOUT    = 0x4
   476  	POLLPRI    = 0x2
   477  	POLLRDBAND = 0x80
   478  	POLLRDNORM = 0x40
   479  	POLLWRBAND = 0x100
   480  	POLLWRNORM = 0x4
   481  )
   482  
   483  type Utsname struct {
   484  	Sysname  [256]byte
   485  	Nodename [256]byte
   486  	Release  [256]byte
   487  	Version  [256]byte
   488  	Machine  [256]byte
   489  }