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