blob: 2673e6c5909c338d0ece15d00768482257afd2d4 [file] [log] [blame]
Don Newton98fd8812019-09-23 15:15:02 -04001// cgo -godefs types_darwin.go | go run mkpost.go
2// Code generated by the command above; see README.md. DO NOT EDIT.
3
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +00004//go:build amd64 && darwin
Don Newton98fd8812019-09-23 15:15:02 -04005// +build amd64,darwin
6
7package unix
8
9const (
10 SizeofPtr = 0x8
11 SizeofShort = 0x2
12 SizeofInt = 0x4
13 SizeofLong = 0x8
14 SizeofLongLong = 0x8
15)
16
17type (
18 _C_short int16
19 _C_int int32
20 _C_long int64
21 _C_long_long int64
22)
23
24type Timespec struct {
25 Sec int64
26 Nsec int64
27}
28
29type Timeval struct {
30 Sec int64
31 Usec int32
32 _ [4]byte
33}
34
35type Timeval32 struct {
36 Sec int32
37 Usec int32
38}
39
40type Rusage struct {
41 Utime Timeval
42 Stime Timeval
43 Maxrss int64
44 Ixrss int64
45 Idrss int64
46 Isrss int64
47 Minflt int64
48 Majflt int64
49 Nswap int64
50 Inblock int64
51 Oublock int64
52 Msgsnd int64
53 Msgrcv int64
54 Nsignals int64
55 Nvcsw int64
56 Nivcsw int64
57}
58
59type Rlimit struct {
60 Cur uint64
61 Max uint64
62}
63
64type _Gid_t uint32
65
66type Stat_t struct {
Don Newton7577f072020-01-06 12:41:11 -050067 Dev int32
68 Mode uint16
69 Nlink uint16
70 Ino uint64
71 Uid uint32
72 Gid uint32
73 Rdev int32
Don Newton7577f072020-01-06 12:41:11 -050074 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
Don Newton98fd8812019-09-23 15:15:02 -040085}
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
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +0000100 Fstypename [16]byte
101 Mntonname [1024]byte
102 Mntfromname [1024]byte
103 Flags_ext uint32
104 Reserved [7]uint32
Don Newton98fd8812019-09-23 15:15:02 -0400105}
106
107type Flock_t struct {
108 Start int64
109 Len int64
110 Pid int32
111 Type int16
112 Whence int16
113}
114
115type Fstore_t struct {
116 Flags uint32
117 Posmode int32
118 Offset int64
119 Length int64
120 Bytesalloc int64
121}
122
123type Radvisory_t struct {
124 Offset int64
125 Count int32
126 _ [4]byte
127}
128
129type Fbootstraptransfer_t struct {
130 Offset int64
131 Length uint64
132 Buffer *byte
133}
134
135type Log2phys_t struct {
136 Flags uint32
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +0000137 _ [16]byte
Don Newton98fd8812019-09-23 15:15:02 -0400138}
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
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +0000154const (
155 PathMax = 0x400
156)
157
Don Newton98fd8812019-09-23 15:15:02 -0400158type 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
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +0000203type RawSockaddrCtl struct {
204 Sc_len uint8
205 Sc_family uint8
206 Ss_sysaddr uint16
207 Sc_id uint32
208 Sc_unit uint32
209 Sc_reserved [5]uint32
210}
211
Don Newton98fd8812019-09-23 15:15:02 -0400212type _Socklen uint32
213
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +0000214type Xucred struct {
215 Version uint32
216 Uid uint32
217 Ngroups int16
218 Groups [16]uint32
219}
220
Don Newton98fd8812019-09-23 15:15:02 -0400221type Linger struct {
222 Onoff int32
223 Linger int32
224}
225
226type Iovec struct {
227 Base *byte
228 Len uint64
229}
230
231type IPMreq struct {
232 Multiaddr [4]byte /* in_addr */
233 Interface [4]byte /* in_addr */
234}
235
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +0000236type IPMreqn struct {
237 Multiaddr [4]byte /* in_addr */
238 Address [4]byte /* in_addr */
239 Ifindex int32
240}
241
Don Newton98fd8812019-09-23 15:15:02 -0400242type IPv6Mreq struct {
243 Multiaddr [16]byte /* in6_addr */
244 Interface uint32
245}
246
247type Msghdr struct {
248 Name *byte
249 Namelen uint32
Don Newton98fd8812019-09-23 15:15:02 -0400250 Iov *Iovec
251 Iovlen int32
Don Newton98fd8812019-09-23 15:15:02 -0400252 Control *byte
253 Controllen uint32
254 Flags int32
255}
256
257type Cmsghdr struct {
258 Len uint32
259 Level int32
260 Type int32
261}
262
263type Inet4Pktinfo struct {
264 Ifindex uint32
265 Spec_dst [4]byte /* in_addr */
266 Addr [4]byte /* in_addr */
267}
268
269type Inet6Pktinfo struct {
270 Addr [16]byte /* in6_addr */
271 Ifindex uint32
272}
273
274type IPv6MTUInfo struct {
275 Addr RawSockaddrInet6
276 Mtu uint32
277}
278
279type ICMPv6Filter struct {
280 Filt [8]uint32
281}
282
283const (
284 SizeofSockaddrInet4 = 0x10
285 SizeofSockaddrInet6 = 0x1c
286 SizeofSockaddrAny = 0x6c
287 SizeofSockaddrUnix = 0x6a
288 SizeofSockaddrDatalink = 0x14
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +0000289 SizeofSockaddrCtl = 0x20
290 SizeofXucred = 0x4c
Don Newton98fd8812019-09-23 15:15:02 -0400291 SizeofLinger = 0x8
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +0000292 SizeofIovec = 0x10
Don Newton98fd8812019-09-23 15:15:02 -0400293 SizeofIPMreq = 0x8
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +0000294 SizeofIPMreqn = 0xc
Don Newton98fd8812019-09-23 15:15:02 -0400295 SizeofIPv6Mreq = 0x14
296 SizeofMsghdr = 0x30
297 SizeofCmsghdr = 0xc
298 SizeofInet4Pktinfo = 0xc
299 SizeofInet6Pktinfo = 0x14
300 SizeofIPv6MTUInfo = 0x20
301 SizeofICMPv6Filter = 0x20
302)
303
304const (
305 PTRACE_TRACEME = 0x0
306 PTRACE_CONT = 0x7
307 PTRACE_KILL = 0x8
308)
309
310type Kevent_t struct {
311 Ident uint64
312 Filter int16
313 Flags uint16
314 Fflags uint32
315 Data int64
316 Udata *byte
317}
318
319type FdSet struct {
320 Bits [32]int32
321}
322
323const (
324 SizeofIfMsghdr = 0x70
325 SizeofIfData = 0x60
326 SizeofIfaMsghdr = 0x14
327 SizeofIfmaMsghdr = 0x10
328 SizeofIfmaMsghdr2 = 0x14
329 SizeofRtMsghdr = 0x5c
330 SizeofRtMetrics = 0x38
331)
332
333type IfMsghdr struct {
334 Msglen uint16
335 Version uint8
336 Type uint8
337 Addrs int32
338 Flags int32
339 Index uint16
Don Newton98fd8812019-09-23 15:15:02 -0400340 Data IfData
341}
342
343type IfData struct {
344 Type uint8
345 Typelen uint8
346 Physical uint8
347 Addrlen uint8
348 Hdrlen uint8
349 Recvquota uint8
350 Xmitquota uint8
351 Unused1 uint8
352 Mtu uint32
353 Metric uint32
354 Baudrate uint32
355 Ipackets uint32
356 Ierrors uint32
357 Opackets uint32
358 Oerrors uint32
359 Collisions uint32
360 Ibytes uint32
361 Obytes uint32
362 Imcasts uint32
363 Omcasts uint32
364 Iqdrops uint32
365 Noproto uint32
366 Recvtiming uint32
367 Xmittiming uint32
368 Lastchange Timeval32
369 Unused2 uint32
370 Hwassist uint32
371 Reserved1 uint32
372 Reserved2 uint32
373}
374
375type IfaMsghdr struct {
376 Msglen uint16
377 Version uint8
378 Type uint8
379 Addrs int32
380 Flags int32
381 Index uint16
Don Newton98fd8812019-09-23 15:15:02 -0400382 Metric int32
383}
384
385type IfmaMsghdr struct {
386 Msglen uint16
387 Version uint8
388 Type uint8
389 Addrs int32
390 Flags int32
391 Index uint16
392 _ [2]byte
393}
394
395type IfmaMsghdr2 struct {
396 Msglen uint16
397 Version uint8
398 Type uint8
399 Addrs int32
400 Flags int32
401 Index uint16
Don Newton98fd8812019-09-23 15:15:02 -0400402 Refcount int32
403}
404
405type RtMsghdr struct {
406 Msglen uint16
407 Version uint8
408 Type uint8
409 Index uint16
Don Newton98fd8812019-09-23 15:15:02 -0400410 Flags int32
411 Addrs int32
412 Pid int32
413 Seq int32
414 Errno int32
415 Use int32
416 Inits uint32
417 Rmx RtMetrics
418}
419
420type RtMetrics struct {
421 Locks uint32
422 Mtu uint32
423 Hopcount uint32
424 Expire int32
425 Recvpipe uint32
426 Sendpipe uint32
427 Ssthresh uint32
428 Rtt uint32
429 Rttvar uint32
430 Pksent uint32
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +0000431 State uint32
432 Filler [3]uint32
Don Newton98fd8812019-09-23 15:15:02 -0400433}
434
435const (
436 SizeofBpfVersion = 0x4
437 SizeofBpfStat = 0x8
438 SizeofBpfProgram = 0x10
439 SizeofBpfInsn = 0x8
440 SizeofBpfHdr = 0x14
441)
442
443type BpfVersion struct {
444 Major uint16
445 Minor uint16
446}
447
448type BpfStat struct {
449 Recv uint32
450 Drop uint32
451}
452
453type BpfProgram struct {
454 Len uint32
Don Newton98fd8812019-09-23 15:15:02 -0400455 Insns *BpfInsn
456}
457
458type BpfInsn struct {
459 Code uint16
460 Jt uint8
461 Jf uint8
462 K uint32
463}
464
465type BpfHdr struct {
466 Tstamp Timeval32
467 Caplen uint32
468 Datalen uint32
469 Hdrlen uint16
470 _ [2]byte
471}
472
473type Termios struct {
474 Iflag uint64
475 Oflag uint64
476 Cflag uint64
477 Lflag uint64
478 Cc [20]uint8
Don Newton98fd8812019-09-23 15:15:02 -0400479 Ispeed uint64
480 Ospeed uint64
481}
482
483type Winsize struct {
484 Row uint16
485 Col uint16
486 Xpixel uint16
487 Ypixel uint16
488}
489
490const (
491 AT_FDCWD = -0x2
492 AT_REMOVEDIR = 0x80
493 AT_SYMLINK_FOLLOW = 0x40
494 AT_SYMLINK_NOFOLLOW = 0x20
495)
496
497type PollFd struct {
498 Fd int32
499 Events int16
500 Revents int16
501}
502
503const (
504 POLLERR = 0x8
505 POLLHUP = 0x10
506 POLLIN = 0x1
507 POLLNVAL = 0x20
508 POLLOUT = 0x4
509 POLLPRI = 0x2
510 POLLRDBAND = 0x80
511 POLLRDNORM = 0x40
512 POLLWRBAND = 0x100
513 POLLWRNORM = 0x4
514)
515
516type Utsname struct {
517 Sysname [256]byte
518 Nodename [256]byte
519 Release [256]byte
520 Version [256]byte
521 Machine [256]byte
522}
Don Newton7577f072020-01-06 12:41:11 -0500523
524const SizeofClockinfo = 0x14
525
526type Clockinfo struct {
527 Hz int32
528 Tick int32
529 Tickadj int32
530 Stathz int32
531 Profhz int32
532}
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +0000533
534type CtlInfo struct {
535 Id uint32
536 Name [96]byte
537}