You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

807 line
12 KiB

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