ztypes_darwin_amd64.go 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537
  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 _Socklen uint32
  185. type Xucred struct {
  186. Version uint32
  187. Uid uint32
  188. Ngroups int16
  189. Groups [16]uint32
  190. }
  191. type Linger struct {
  192. Onoff int32
  193. Linger int32
  194. }
  195. type Iovec struct {
  196. Base *byte
  197. Len uint64
  198. }
  199. type IPMreq struct {
  200. Multiaddr [4]byte /* in_addr */
  201. Interface [4]byte /* in_addr */
  202. }
  203. type IPMreqn struct {
  204. Multiaddr [4]byte /* in_addr */
  205. Address [4]byte /* in_addr */
  206. Ifindex int32
  207. }
  208. type IPv6Mreq struct {
  209. Multiaddr [16]byte /* in6_addr */
  210. Interface uint32
  211. }
  212. type Msghdr struct {
  213. Name *byte
  214. Namelen uint32
  215. Iov *Iovec
  216. Iovlen int32
  217. Control *byte
  218. Controllen uint32
  219. Flags int32
  220. }
  221. type Cmsghdr struct {
  222. Len uint32
  223. Level int32
  224. Type int32
  225. }
  226. type Inet4Pktinfo struct {
  227. Ifindex uint32
  228. Spec_dst [4]byte /* in_addr */
  229. Addr [4]byte /* in_addr */
  230. }
  231. type Inet6Pktinfo struct {
  232. Addr [16]byte /* in6_addr */
  233. Ifindex uint32
  234. }
  235. type IPv6MTUInfo struct {
  236. Addr RawSockaddrInet6
  237. Mtu uint32
  238. }
  239. type ICMPv6Filter struct {
  240. Filt [8]uint32
  241. }
  242. const (
  243. SizeofSockaddrInet4 = 0x10
  244. SizeofSockaddrInet6 = 0x1c
  245. SizeofSockaddrAny = 0x6c
  246. SizeofSockaddrUnix = 0x6a
  247. SizeofSockaddrDatalink = 0x14
  248. SizeofSockaddrCtl = 0x20
  249. SizeofXucred = 0x4c
  250. SizeofLinger = 0x8
  251. SizeofIovec = 0x10
  252. SizeofIPMreq = 0x8
  253. SizeofIPMreqn = 0xc
  254. SizeofIPv6Mreq = 0x14
  255. SizeofMsghdr = 0x30
  256. SizeofCmsghdr = 0xc
  257. SizeofInet4Pktinfo = 0xc
  258. SizeofInet6Pktinfo = 0x14
  259. SizeofIPv6MTUInfo = 0x20
  260. SizeofICMPv6Filter = 0x20
  261. )
  262. const (
  263. PTRACE_TRACEME = 0x0
  264. PTRACE_CONT = 0x7
  265. PTRACE_KILL = 0x8
  266. )
  267. type Kevent_t struct {
  268. Ident uint64
  269. Filter int16
  270. Flags uint16
  271. Fflags uint32
  272. Data int64
  273. Udata *byte
  274. }
  275. type FdSet struct {
  276. Bits [32]int32
  277. }
  278. const (
  279. SizeofIfMsghdr = 0x70
  280. SizeofIfData = 0x60
  281. SizeofIfaMsghdr = 0x14
  282. SizeofIfmaMsghdr = 0x10
  283. SizeofIfmaMsghdr2 = 0x14
  284. SizeofRtMsghdr = 0x5c
  285. SizeofRtMetrics = 0x38
  286. )
  287. type IfMsghdr struct {
  288. Msglen uint16
  289. Version uint8
  290. Type uint8
  291. Addrs int32
  292. Flags int32
  293. Index uint16
  294. Data IfData
  295. }
  296. type IfData struct {
  297. Type uint8
  298. Typelen uint8
  299. Physical uint8
  300. Addrlen uint8
  301. Hdrlen uint8
  302. Recvquota uint8
  303. Xmitquota uint8
  304. Unused1 uint8
  305. Mtu uint32
  306. Metric uint32
  307. Baudrate uint32
  308. Ipackets uint32
  309. Ierrors uint32
  310. Opackets uint32
  311. Oerrors uint32
  312. Collisions uint32
  313. Ibytes uint32
  314. Obytes uint32
  315. Imcasts uint32
  316. Omcasts uint32
  317. Iqdrops uint32
  318. Noproto uint32
  319. Recvtiming uint32
  320. Xmittiming uint32
  321. Lastchange Timeval32
  322. Unused2 uint32
  323. Hwassist uint32
  324. Reserved1 uint32
  325. Reserved2 uint32
  326. }
  327. type IfaMsghdr struct {
  328. Msglen uint16
  329. Version uint8
  330. Type uint8
  331. Addrs int32
  332. Flags int32
  333. Index uint16
  334. Metric int32
  335. }
  336. type IfmaMsghdr struct {
  337. Msglen uint16
  338. Version uint8
  339. Type uint8
  340. Addrs int32
  341. Flags int32
  342. Index uint16
  343. _ [2]byte
  344. }
  345. type IfmaMsghdr2 struct {
  346. Msglen uint16
  347. Version uint8
  348. Type uint8
  349. Addrs int32
  350. Flags int32
  351. Index uint16
  352. Refcount int32
  353. }
  354. type RtMsghdr struct {
  355. Msglen uint16
  356. Version uint8
  357. Type uint8
  358. Index uint16
  359. Flags int32
  360. Addrs int32
  361. Pid int32
  362. Seq int32
  363. Errno int32
  364. Use int32
  365. Inits uint32
  366. Rmx RtMetrics
  367. }
  368. type RtMetrics struct {
  369. Locks uint32
  370. Mtu uint32
  371. Hopcount uint32
  372. Expire int32
  373. Recvpipe uint32
  374. Sendpipe uint32
  375. Ssthresh uint32
  376. Rtt uint32
  377. Rttvar uint32
  378. Pksent uint32
  379. State uint32
  380. Filler [3]uint32
  381. }
  382. const (
  383. SizeofBpfVersion = 0x4
  384. SizeofBpfStat = 0x8
  385. SizeofBpfProgram = 0x10
  386. SizeofBpfInsn = 0x8
  387. SizeofBpfHdr = 0x14
  388. )
  389. type BpfVersion struct {
  390. Major uint16
  391. Minor uint16
  392. }
  393. type BpfStat struct {
  394. Recv uint32
  395. Drop uint32
  396. }
  397. type BpfProgram struct {
  398. Len uint32
  399. Insns *BpfInsn
  400. }
  401. type BpfInsn struct {
  402. Code uint16
  403. Jt uint8
  404. Jf uint8
  405. K uint32
  406. }
  407. type BpfHdr struct {
  408. Tstamp Timeval32
  409. Caplen uint32
  410. Datalen uint32
  411. Hdrlen uint16
  412. _ [2]byte
  413. }
  414. type Termios struct {
  415. Iflag uint64
  416. Oflag uint64
  417. Cflag uint64
  418. Lflag uint64
  419. Cc [20]uint8
  420. Ispeed uint64
  421. Ospeed uint64
  422. }
  423. type Winsize struct {
  424. Row uint16
  425. Col uint16
  426. Xpixel uint16
  427. Ypixel uint16
  428. }
  429. const (
  430. AT_FDCWD = -0x2
  431. AT_REMOVEDIR = 0x80
  432. AT_SYMLINK_FOLLOW = 0x40
  433. AT_SYMLINK_NOFOLLOW = 0x20
  434. )
  435. type PollFd struct {
  436. Fd int32
  437. Events int16
  438. Revents int16
  439. }
  440. const (
  441. POLLERR = 0x8
  442. POLLHUP = 0x10
  443. POLLIN = 0x1
  444. POLLNVAL = 0x20
  445. POLLOUT = 0x4
  446. POLLPRI = 0x2
  447. POLLRDBAND = 0x80
  448. POLLRDNORM = 0x40
  449. POLLWRBAND = 0x100
  450. POLLWRNORM = 0x4
  451. )
  452. type Utsname struct {
  453. Sysname [256]byte
  454. Nodename [256]byte
  455. Release [256]byte
  456. Version [256]byte
  457. Machine [256]byte
  458. }
  459. const SizeofClockinfo = 0x14
  460. type Clockinfo struct {
  461. Hz int32
  462. Tick int32
  463. Tickadj int32
  464. Stathz int32
  465. Profhz int32
  466. }
  467. type CtlInfo struct {
  468. Id uint32
  469. Name [96]byte
  470. }