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