blob: c9492428bfa3fb833f34ee4d5f6422e0a506d31b [file] [log] [blame]
Tobias Klauserf0d39a42017-10-25 14:20:02 +02001// cgo -godefs types_darwin.go | go run mkpost.go
2// Code generated by the command above; see README.md. DO NOT EDIT.
3
Aaron Jacobsec18ccf2015-08-31 15:07:06 +10004// +build arm64,darwin
Shenghou Ma58e10962015-05-17 00:37:28 -04005
Shenghou Ma58e10962015-05-17 00:37:28 -04006package unix
7
8const (
Tobias Klauser8469e312018-10-04 13:51:19 +02009 SizeofPtr = 0x8
10 SizeofShort = 0x2
11 SizeofInt = 0x4
12 SizeofLong = 0x8
13 SizeofLongLong = 0x8
Shenghou Ma58e10962015-05-17 00:37:28 -040014)
15
16type (
17 _C_short int16
18 _C_int int32
19 _C_long int64
20 _C_long_long int64
21)
22
23type Timespec struct {
24 Sec int64
25 Nsec int64
26}
27
28type Timeval struct {
Tobias Klauser1e3c7772018-03-22 11:20:37 +010029 Sec int64
30 Usec int32
31 _ [4]byte
Shenghou Ma58e10962015-05-17 00:37:28 -040032}
33
34type Timeval32 struct {
35 Sec int32
36 Usec int32
37}
38
39type Rusage struct {
40 Utime Timeval
41 Stime Timeval
42 Maxrss int64
43 Ixrss int64
44 Idrss int64
45 Isrss int64
46 Minflt int64
47 Majflt int64
48 Nswap int64
49 Inblock int64
50 Oublock int64
51 Msgsnd int64
52 Msgrcv int64
53 Nsignals int64
54 Nvcsw int64
55 Nivcsw int64
56}
57
58type Rlimit struct {
59 Cur uint64
60 Max uint64
61}
62
63type _Gid_t uint32
64
65type Stat_t struct {
Yuval Pavel Zholkover87c87272019-05-15 09:04:31 +030066 Dev int32
67 Mode uint16
68 Nlink uint16
69 Ino uint64
70 Uid uint32
71 Gid uint32
72 Rdev int32
Yuval Pavel Zholkover87c87272019-05-15 09:04:31 +030073 Atim Timespec
74 Mtim Timespec
75 Ctim Timespec
76 Btim Timespec
77 Size int64
78 Blocks int64
79 Blksize int32
80 Flags uint32
81 Gen uint32
82 Lspare int32
83 Qspare [2]int64
Shenghou Ma58e10962015-05-17 00:37:28 -040084}
85
86type 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
Ian Lance Taylorcec02592020-10-06 15:56:09 -070099 Fstypename [16]byte
100 Mntonname [1024]byte
101 Mntfromname [1024]byte
102 Flags_ext uint32
103 Reserved [7]uint32
Shenghou Ma58e10962015-05-17 00:37:28 -0400104}
105
106type Flock_t struct {
107 Start int64
108 Len int64
109 Pid int32
110 Type int16
111 Whence int16
112}
113
114type Fstore_t struct {
115 Flags uint32
116 Posmode int32
117 Offset int64
118 Length int64
119 Bytesalloc int64
120}
121
122type Radvisory_t struct {
Tobias Klauser1e3c7772018-03-22 11:20:37 +0100123 Offset int64
124 Count int32
125 _ [4]byte
Shenghou Ma58e10962015-05-17 00:37:28 -0400126}
127
128type Fbootstraptransfer_t struct {
129 Offset int64
130 Length uint64
131 Buffer *byte
132}
133
134type Log2phys_t struct {
Tobias Klauser1e3c7772018-03-22 11:20:37 +0100135 Flags uint32
Ian Lance Taylorcec02592020-10-06 15:56:09 -0700136 _ [16]byte
Shenghou Ma58e10962015-05-17 00:37:28 -0400137}
138
139type Fsid struct {
140 Val [2]int32
141}
142
143type Dirent struct {
Tobias Klauser1e3c7772018-03-22 11:20:37 +0100144 Ino uint64
145 Seekoff uint64
146 Reclen uint16
147 Namlen uint16
148 Type uint8
149 Name [1024]int8
150 _ [3]byte
Shenghou Ma58e10962015-05-17 00:37:28 -0400151}
152
Tobias Klauser9d91bd62020-09-25 14:46:26 +0200153const (
154 PathMax = 0x400
155)
156
Shenghou Ma58e10962015-05-17 00:37:28 -0400157type RawSockaddrInet4 struct {
158 Len uint8
159 Family uint8
160 Port uint16
161 Addr [4]byte /* in_addr */
162 Zero [8]int8
163}
164
165type RawSockaddrInet6 struct {
166 Len uint8
167 Family uint8
168 Port uint16
169 Flowinfo uint32
170 Addr [16]byte /* in6_addr */
171 Scope_id uint32
172}
173
174type RawSockaddrUnix struct {
175 Len uint8
176 Family uint8
177 Path [104]int8
178}
179
180type RawSockaddrDatalink struct {
181 Len uint8
182 Family uint8
183 Index uint16
184 Type uint8
185 Nlen uint8
186 Alen uint8
187 Slen uint8
188 Data [12]int8
189}
190
191type RawSockaddr struct {
192 Len uint8
193 Family uint8
194 Data [14]int8
195}
196
197type RawSockaddrAny struct {
198 Addr RawSockaddr
199 Pad [92]int8
200}
201
Tobias Klausere1471142020-10-24 20:27:56 +0200202type RawSockaddrCtl struct {
203 Sc_len uint8
204 Sc_family uint8
205 Ss_sysaddr uint16
206 Sc_id uint32
207 Sc_unit uint32
208 Sc_reserved [5]uint32
209}
210
Shenghou Ma58e10962015-05-17 00:37:28 -0400211type _Socklen uint32
212
213type Linger struct {
214 Onoff int32
215 Linger int32
216}
217
218type Iovec struct {
219 Base *byte
220 Len uint64
221}
222
223type IPMreq struct {
224 Multiaddr [4]byte /* in_addr */
225 Interface [4]byte /* in_addr */
226}
227
228type IPv6Mreq struct {
229 Multiaddr [16]byte /* in6_addr */
230 Interface uint32
231}
232
233type Msghdr struct {
234 Name *byte
235 Namelen uint32
Shenghou Ma58e10962015-05-17 00:37:28 -0400236 Iov *Iovec
237 Iovlen int32
Shenghou Ma58e10962015-05-17 00:37:28 -0400238 Control *byte
239 Controllen uint32
240 Flags int32
241}
242
243type Cmsghdr struct {
244 Len uint32
245 Level int32
246 Type int32
247}
248
249type Inet4Pktinfo struct {
250 Ifindex uint32
251 Spec_dst [4]byte /* in_addr */
252 Addr [4]byte /* in_addr */
253}
254
255type Inet6Pktinfo struct {
256 Addr [16]byte /* in6_addr */
257 Ifindex uint32
258}
259
260type IPv6MTUInfo struct {
261 Addr RawSockaddrInet6
262 Mtu uint32
263}
264
265type ICMPv6Filter struct {
266 Filt [8]uint32
267}
268
269const (
270 SizeofSockaddrInet4 = 0x10
271 SizeofSockaddrInet6 = 0x1c
272 SizeofSockaddrAny = 0x6c
273 SizeofSockaddrUnix = 0x6a
274 SizeofSockaddrDatalink = 0x14
Tobias Klausere1471142020-10-24 20:27:56 +0200275 SizeofSockaddrCtl = 0x20
Shenghou Ma58e10962015-05-17 00:37:28 -0400276 SizeofLinger = 0x8
Tobias Klauseref89a242020-12-01 10:13:52 +0100277 SizeofIovec = 0x10
Shenghou Ma58e10962015-05-17 00:37:28 -0400278 SizeofIPMreq = 0x8
279 SizeofIPv6Mreq = 0x14
280 SizeofMsghdr = 0x30
281 SizeofCmsghdr = 0xc
282 SizeofInet4Pktinfo = 0xc
283 SizeofInet6Pktinfo = 0x14
284 SizeofIPv6MTUInfo = 0x20
285 SizeofICMPv6Filter = 0x20
286)
287
288const (
289 PTRACE_TRACEME = 0x0
290 PTRACE_CONT = 0x7
291 PTRACE_KILL = 0x8
292)
293
294type Kevent_t struct {
295 Ident uint64
296 Filter int16
297 Flags uint16
298 Fflags uint32
299 Data int64
300 Udata *byte
301}
302
303type FdSet struct {
304 Bits [32]int32
305}
306
307const (
308 SizeofIfMsghdr = 0x70
309 SizeofIfData = 0x60
310 SizeofIfaMsghdr = 0x14
311 SizeofIfmaMsghdr = 0x10
312 SizeofIfmaMsghdr2 = 0x14
313 SizeofRtMsghdr = 0x5c
314 SizeofRtMetrics = 0x38
315)
316
317type IfMsghdr struct {
Tobias Klauser1e3c7772018-03-22 11:20:37 +0100318 Msglen uint16
319 Version uint8
320 Type uint8
321 Addrs int32
322 Flags int32
323 Index uint16
Tobias Klauser1e3c7772018-03-22 11:20:37 +0100324 Data IfData
Shenghou Ma58e10962015-05-17 00:37:28 -0400325}
326
327type IfData struct {
328 Type uint8
329 Typelen uint8
330 Physical uint8
331 Addrlen uint8
332 Hdrlen uint8
333 Recvquota uint8
334 Xmitquota uint8
335 Unused1 uint8
336 Mtu uint32
337 Metric uint32
338 Baudrate uint32
339 Ipackets uint32
340 Ierrors uint32
341 Opackets uint32
342 Oerrors uint32
343 Collisions uint32
344 Ibytes uint32
345 Obytes uint32
346 Imcasts uint32
347 Omcasts uint32
348 Iqdrops uint32
349 Noproto uint32
350 Recvtiming uint32
351 Xmittiming uint32
352 Lastchange Timeval32
353 Unused2 uint32
354 Hwassist uint32
355 Reserved1 uint32
356 Reserved2 uint32
357}
358
359type IfaMsghdr struct {
Tobias Klauser1e3c7772018-03-22 11:20:37 +0100360 Msglen uint16
361 Version uint8
362 Type uint8
363 Addrs int32
364 Flags int32
365 Index uint16
Tobias Klauser1e3c7772018-03-22 11:20:37 +0100366 Metric int32
Shenghou Ma58e10962015-05-17 00:37:28 -0400367}
368
369type IfmaMsghdr struct {
Tobias Klauser1e3c7772018-03-22 11:20:37 +0100370 Msglen uint16
371 Version uint8
372 Type uint8
373 Addrs int32
374 Flags int32
375 Index uint16
376 _ [2]byte
Shenghou Ma58e10962015-05-17 00:37:28 -0400377}
378
379type IfmaMsghdr2 struct {
Tobias Klauser1e3c7772018-03-22 11:20:37 +0100380 Msglen uint16
381 Version uint8
382 Type uint8
383 Addrs int32
384 Flags int32
385 Index uint16
Tobias Klauser1e3c7772018-03-22 11:20:37 +0100386 Refcount int32
Shenghou Ma58e10962015-05-17 00:37:28 -0400387}
388
389type RtMsghdr struct {
Tobias Klauser1e3c7772018-03-22 11:20:37 +0100390 Msglen uint16
391 Version uint8
392 Type uint8
393 Index uint16
Tobias Klauser1e3c7772018-03-22 11:20:37 +0100394 Flags int32
395 Addrs int32
396 Pid int32
397 Seq int32
398 Errno int32
399 Use int32
400 Inits uint32
401 Rmx RtMetrics
Shenghou Ma58e10962015-05-17 00:37:28 -0400402}
403
404type RtMetrics struct {
405 Locks uint32
406 Mtu uint32
407 Hopcount uint32
408 Expire int32
409 Recvpipe uint32
410 Sendpipe uint32
411 Ssthresh uint32
412 Rtt uint32
413 Rttvar uint32
414 Pksent uint32
Ian Lance Taylorcec02592020-10-06 15:56:09 -0700415 State uint32
416 Filler [3]uint32
Shenghou Ma58e10962015-05-17 00:37:28 -0400417}
418
419const (
420 SizeofBpfVersion = 0x4
421 SizeofBpfStat = 0x8
422 SizeofBpfProgram = 0x10
423 SizeofBpfInsn = 0x8
424 SizeofBpfHdr = 0x14
425)
426
427type BpfVersion struct {
428 Major uint16
429 Minor uint16
430}
431
432type BpfStat struct {
433 Recv uint32
434 Drop uint32
435}
436
437type BpfProgram struct {
Tobias Klauser1e3c7772018-03-22 11:20:37 +0100438 Len uint32
Tobias Klauser1e3c7772018-03-22 11:20:37 +0100439 Insns *BpfInsn
Shenghou Ma58e10962015-05-17 00:37:28 -0400440}
441
442type BpfInsn struct {
443 Code uint16
444 Jt uint8
445 Jf uint8
446 K uint32
447}
448
449type BpfHdr struct {
Tobias Klauser1e3c7772018-03-22 11:20:37 +0100450 Tstamp Timeval32
451 Caplen uint32
452 Datalen uint32
453 Hdrlen uint16
454 _ [2]byte
Shenghou Ma58e10962015-05-17 00:37:28 -0400455}
456
457type Termios struct {
Tobias Klauser1e3c7772018-03-22 11:20:37 +0100458 Iflag uint64
459 Oflag uint64
460 Cflag uint64
461 Lflag uint64
462 Cc [20]uint8
Tobias Klauser1e3c7772018-03-22 11:20:37 +0100463 Ispeed uint64
464 Ospeed uint64
Shenghou Ma58e10962015-05-17 00:37:28 -0400465}
Tobias Klauser396c9fc2017-08-01 10:50:40 +0200466
467type Winsize struct {
468 Row uint16
469 Col uint16
470 Xpixel uint16
471 Ypixel uint16
472}
Tobias Klauser89d40682017-08-09 12:15:03 +0200473
474const (
475 AT_FDCWD = -0x2
476 AT_REMOVEDIR = 0x80
477 AT_SYMLINK_FOLLOW = 0x40
478 AT_SYMLINK_NOFOLLOW = 0x20
479)
Tobias Klauserf0d39a42017-10-25 14:20:02 +0200480
481type PollFd struct {
482 Fd int32
483 Events int16
484 Revents int16
485}
486
487const (
488 POLLERR = 0x8
489 POLLHUP = 0x10
490 POLLIN = 0x1
491 POLLNVAL = 0x20
492 POLLOUT = 0x4
493 POLLPRI = 0x2
494 POLLRDBAND = 0x80
495 POLLRDNORM = 0x40
496 POLLWRBAND = 0x100
497 POLLWRNORM = 0x4
498)
Tobias Klauser665f6522017-11-13 13:29:10 +0100499
500type Utsname struct {
501 Sysname [256]byte
502 Nodename [256]byte
503 Release [256]byte
504 Version [256]byte
505 Machine [256]byte
506}
Tobias Klausere4093982019-04-01 09:06:21 +0200507
508const SizeofClockinfo = 0x14
509
510type Clockinfo struct {
511 Hz int32
512 Tick int32
513 Tickadj int32
514 Stathz int32
515 Profhz int32
516}
Tobias Klausereeed37f2020-10-16 12:55:47 +0200517
518type CtlInfo struct {
519 Id uint32
520 Name [96]byte
521}