blob: a09c0f94251387d2794007835d1409037acb0a9e [file] [log] [blame]
khenaidooac637102019-01-14 15:44:34 -05001// cgo -godefs types_darwin.go | go run mkpost.go
2// Code generated by the command above; see README.md. DO NOT EDIT.
3
4// +build arm64,darwin
5
6package unix
7
8const (
9 SizeofPtr = 0x8
10 SizeofShort = 0x2
11 SizeofInt = 0x4
12 SizeofLong = 0x8
13 SizeofLongLong = 0x8
14)
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 {
29 Sec int64
30 Usec int32
31 _ [4]byte
32}
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 {
Scott Baker8461e152019-10-01 14:44:30 -070066 Dev int32
67 Mode uint16
68 Nlink uint16
69 Ino uint64
70 Uid uint32
71 Gid uint32
72 Rdev int32
73 _ [4]byte
74 Atim Timespec
75 Mtim Timespec
76 Ctim Timespec
77 Btim Timespec
78 Size int64
79 Blocks int64
80 Blksize int32
81 Flags uint32
82 Gen uint32
83 Lspare int32
84 Qspare [2]int64
khenaidooac637102019-01-14 15:44:34 -050085}
86
87type Statfs_t struct {
88 Bsize uint32
89 Iosize int32
90 Blocks uint64
91 Bfree uint64
92 Bavail uint64
93 Files uint64
94 Ffree uint64
95 Fsid Fsid
96 Owner uint32
97 Type uint32
98 Flags uint32
99 Fssubtype uint32
100 Fstypename [16]int8
101 Mntonname [1024]int8
102 Mntfromname [1024]int8
103 Reserved [8]uint32
104}
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 {
123 Offset int64
124 Count int32
125 _ [4]byte
126}
127
128type Fbootstraptransfer_t struct {
129 Offset int64
130 Length uint64
131 Buffer *byte
132}
133
134type Log2phys_t struct {
135 Flags uint32
136 _ [8]byte
137 _ [8]byte
138}
139
140type Fsid struct {
141 Val [2]int32
142}
143
144type Dirent struct {
145 Ino uint64
146 Seekoff uint64
147 Reclen uint16
148 Namlen uint16
149 Type uint8
150 Name [1024]int8
151 _ [3]byte
152}
153
Andrea Campanella3614a922021-02-25 12:40:42 +0100154const (
155 PathMax = 0x400
156)
157
khenaidooac637102019-01-14 15:44:34 -0500158type RawSockaddrInet4 struct {
159 Len uint8
160 Family uint8
161 Port uint16
162 Addr [4]byte /* in_addr */
163 Zero [8]int8
164}
165
166type RawSockaddrInet6 struct {
167 Len uint8
168 Family uint8
169 Port uint16
170 Flowinfo uint32
171 Addr [16]byte /* in6_addr */
172 Scope_id uint32
173}
174
175type RawSockaddrUnix struct {
176 Len uint8
177 Family uint8
178 Path [104]int8
179}
180
181type RawSockaddrDatalink struct {
182 Len uint8
183 Family uint8
184 Index uint16
185 Type uint8
186 Nlen uint8
187 Alen uint8
188 Slen uint8
189 Data [12]int8
190}
191
192type RawSockaddr struct {
193 Len uint8
194 Family uint8
195 Data [14]int8
196}
197
198type RawSockaddrAny struct {
199 Addr RawSockaddr
200 Pad [92]int8
201}
202
203type _Socklen uint32
204
205type Linger struct {
206 Onoff int32
207 Linger int32
208}
209
210type Iovec struct {
211 Base *byte
212 Len uint64
213}
214
215type IPMreq struct {
216 Multiaddr [4]byte /* in_addr */
217 Interface [4]byte /* in_addr */
218}
219
220type IPv6Mreq struct {
221 Multiaddr [16]byte /* in6_addr */
222 Interface uint32
223}
224
225type Msghdr struct {
226 Name *byte
227 Namelen uint32
228 _ [4]byte
229 Iov *Iovec
230 Iovlen int32
231 _ [4]byte
232 Control *byte
233 Controllen uint32
234 Flags int32
235}
236
237type Cmsghdr struct {
238 Len uint32
239 Level int32
240 Type int32
241}
242
243type Inet4Pktinfo struct {
244 Ifindex uint32
245 Spec_dst [4]byte /* in_addr */
246 Addr [4]byte /* in_addr */
247}
248
249type Inet6Pktinfo struct {
250 Addr [16]byte /* in6_addr */
251 Ifindex uint32
252}
253
254type IPv6MTUInfo struct {
255 Addr RawSockaddrInet6
256 Mtu uint32
257}
258
259type ICMPv6Filter struct {
260 Filt [8]uint32
261}
262
263const (
264 SizeofSockaddrInet4 = 0x10
265 SizeofSockaddrInet6 = 0x1c
266 SizeofSockaddrAny = 0x6c
267 SizeofSockaddrUnix = 0x6a
268 SizeofSockaddrDatalink = 0x14
269 SizeofLinger = 0x8
270 SizeofIPMreq = 0x8
271 SizeofIPv6Mreq = 0x14
272 SizeofMsghdr = 0x30
273 SizeofCmsghdr = 0xc
274 SizeofInet4Pktinfo = 0xc
275 SizeofInet6Pktinfo = 0x14
276 SizeofIPv6MTUInfo = 0x20
277 SizeofICMPv6Filter = 0x20
278)
279
280const (
281 PTRACE_TRACEME = 0x0
282 PTRACE_CONT = 0x7
283 PTRACE_KILL = 0x8
284)
285
286type Kevent_t struct {
287 Ident uint64
288 Filter int16
289 Flags uint16
290 Fflags uint32
291 Data int64
292 Udata *byte
293}
294
295type FdSet struct {
296 Bits [32]int32
297}
298
299const (
300 SizeofIfMsghdr = 0x70
301 SizeofIfData = 0x60
302 SizeofIfaMsghdr = 0x14
303 SizeofIfmaMsghdr = 0x10
304 SizeofIfmaMsghdr2 = 0x14
305 SizeofRtMsghdr = 0x5c
306 SizeofRtMetrics = 0x38
307)
308
309type IfMsghdr struct {
310 Msglen uint16
311 Version uint8
312 Type uint8
313 Addrs int32
314 Flags int32
315 Index uint16
316 _ [2]byte
317 Data IfData
318}
319
320type IfData struct {
321 Type uint8
322 Typelen uint8
323 Physical uint8
324 Addrlen uint8
325 Hdrlen uint8
326 Recvquota uint8
327 Xmitquota uint8
328 Unused1 uint8
329 Mtu uint32
330 Metric uint32
331 Baudrate uint32
332 Ipackets uint32
333 Ierrors uint32
334 Opackets uint32
335 Oerrors uint32
336 Collisions uint32
337 Ibytes uint32
338 Obytes uint32
339 Imcasts uint32
340 Omcasts uint32
341 Iqdrops uint32
342 Noproto uint32
343 Recvtiming uint32
344 Xmittiming uint32
345 Lastchange Timeval32
346 Unused2 uint32
347 Hwassist uint32
348 Reserved1 uint32
349 Reserved2 uint32
350}
351
352type IfaMsghdr struct {
353 Msglen uint16
354 Version uint8
355 Type uint8
356 Addrs int32
357 Flags int32
358 Index uint16
359 _ [2]byte
360 Metric int32
361}
362
363type IfmaMsghdr struct {
364 Msglen uint16
365 Version uint8
366 Type uint8
367 Addrs int32
368 Flags int32
369 Index uint16
370 _ [2]byte
371}
372
373type IfmaMsghdr2 struct {
374 Msglen uint16
375 Version uint8
376 Type uint8
377 Addrs int32
378 Flags int32
379 Index uint16
380 _ [2]byte
381 Refcount int32
382}
383
384type RtMsghdr struct {
385 Msglen uint16
386 Version uint8
387 Type uint8
388 Index uint16
389 _ [2]byte
390 Flags int32
391 Addrs int32
392 Pid int32
393 Seq int32
394 Errno int32
395 Use int32
396 Inits uint32
397 Rmx RtMetrics
398}
399
400type RtMetrics struct {
401 Locks uint32
402 Mtu uint32
403 Hopcount uint32
404 Expire int32
405 Recvpipe uint32
406 Sendpipe uint32
407 Ssthresh uint32
408 Rtt uint32
409 Rttvar uint32
410 Pksent uint32
411 Filler [4]uint32
412}
413
414const (
415 SizeofBpfVersion = 0x4
416 SizeofBpfStat = 0x8
417 SizeofBpfProgram = 0x10
418 SizeofBpfInsn = 0x8
419 SizeofBpfHdr = 0x14
420)
421
422type BpfVersion struct {
423 Major uint16
424 Minor uint16
425}
426
427type BpfStat struct {
428 Recv uint32
429 Drop uint32
430}
431
432type BpfProgram struct {
433 Len uint32
434 _ [4]byte
435 Insns *BpfInsn
436}
437
438type BpfInsn struct {
439 Code uint16
440 Jt uint8
441 Jf uint8
442 K uint32
443}
444
445type BpfHdr struct {
446 Tstamp Timeval32
447 Caplen uint32
448 Datalen uint32
449 Hdrlen uint16
450 _ [2]byte
451}
452
453type Termios struct {
454 Iflag uint64
455 Oflag uint64
456 Cflag uint64
457 Lflag uint64
458 Cc [20]uint8
459 _ [4]byte
460 Ispeed uint64
461 Ospeed uint64
462}
463
464type Winsize struct {
465 Row uint16
466 Col uint16
467 Xpixel uint16
468 Ypixel uint16
469}
470
471const (
472 AT_FDCWD = -0x2
473 AT_REMOVEDIR = 0x80
474 AT_SYMLINK_FOLLOW = 0x40
475 AT_SYMLINK_NOFOLLOW = 0x20
476)
477
478type PollFd struct {
479 Fd int32
480 Events int16
481 Revents int16
482}
483
484const (
485 POLLERR = 0x8
486 POLLHUP = 0x10
487 POLLIN = 0x1
488 POLLNVAL = 0x20
489 POLLOUT = 0x4
490 POLLPRI = 0x2
491 POLLRDBAND = 0x80
492 POLLRDNORM = 0x40
493 POLLWRBAND = 0x100
494 POLLWRNORM = 0x4
495)
496
497type Utsname struct {
498 Sysname [256]byte
499 Nodename [256]byte
500 Release [256]byte
501 Version [256]byte
502 Machine [256]byte
503}
Scott Baker8461e152019-10-01 14:44:30 -0700504
505const SizeofClockinfo = 0x14
506
507type Clockinfo struct {
508 Hz int32
509 Tick int32
510 Tickadj int32
511 Stathz int32
512 Profhz int32
513}