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.
 
 

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