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.

ztypes_darwin_amd64.go 7.5KB

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