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