blob: 885842c0eb402751bd9eff281ca71516471aa527 [file] [log] [blame]
kesavand2cde6582020-06-22 04:56:23 -04001// cgo -godefs types_darwin.go | go run mkpost.go
2// Code generated by the command above; see README.md. DO NOT EDIT.
3
Andrea Campanella764f1ed2022-03-24 11:46:38 +01004//go:build amd64 && darwin
kesavand2cde6582020-06-22 04:56:23 -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 {
67 Dev int32
68 Mode uint16
69 Nlink uint16
70 Ino uint64
71 Uid uint32
72 Gid uint32
73 Rdev int32
kesavand2cde6582020-06-22 04:56:23 -040074 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
85}
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
Andrea Campanella764f1ed2022-03-24 11:46:38 +0100100 Fstypename [16]byte
101 Mntonname [1024]byte
102 Mntfromname [1024]byte
103 Flags_ext uint32
104 Reserved [7]uint32
kesavand2cde6582020-06-22 04:56:23 -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
Andrea Campanella764f1ed2022-03-24 11:46:38 +0100137 _ [16]byte
kesavand2cde6582020-06-22 04:56:23 -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
Andrea Campanella764f1ed2022-03-24 11:46:38 +0100154const (
155 PathMax = 0x400
156)
157
kesavand2cde6582020-06-22 04:56:23 -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
Andrea Campanella764f1ed2022-03-24 11:46:38 +0100203type 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
kesavandc71914f2022-03-25 11:19:03 +0530212type RawSockaddrVM struct {
213 Len uint8
214 Family uint8
215 Reserved1 uint16
216 Port uint32
217 Cid uint32
218}
219
220type XVSockPCB struct {
221 Xv_len uint32
222 Xv_vsockpp uint64
223 Xvp_local_cid uint32
224 Xvp_local_port uint32
225 Xvp_remote_cid uint32
226 Xvp_remote_port uint32
227 Xvp_rxcnt uint32
228 Xvp_txcnt uint32
229 Xvp_peer_rxhiwat uint32
230 Xvp_peer_rxcnt uint32
231 Xvp_last_pid int32
232 Xvp_gencnt uint64
233 Xv_socket XSocket
234 _ [4]byte
235}
236
237type XSocket struct {
238 Xso_len uint32
239 Xso_so uint32
240 So_type int16
241 So_options int16
242 So_linger int16
243 So_state int16
244 So_pcb uint32
245 Xso_protocol int32
246 Xso_family int32
247 So_qlen int16
248 So_incqlen int16
249 So_qlimit int16
250 So_timeo int16
251 So_error uint16
252 So_pgid int32
253 So_oobmark uint32
254 So_rcv XSockbuf
255 So_snd XSockbuf
256 So_uid uint32
257}
258
259type XSocket64 struct {
260 Xso_len uint32
261 _ [8]byte
262 So_type int16
263 So_options int16
264 So_linger int16
265 So_state int16
266 _ [8]byte
267 Xso_protocol int32
268 Xso_family int32
269 So_qlen int16
270 So_incqlen int16
271 So_qlimit int16
272 So_timeo int16
273 So_error uint16
274 So_pgid int32
275 So_oobmark uint32
276 So_rcv XSockbuf
277 So_snd XSockbuf
278 So_uid uint32
279}
280
281type XSockbuf struct {
282 Cc uint32
283 Hiwat uint32
284 Mbcnt uint32
285 Mbmax uint32
286 Lowat int32
287 Flags int16
288 Timeo int16
289}
290
291type XVSockPgen struct {
292 Len uint32
293 Count uint64
294 Gen uint64
295 Sogen uint64
296}
297
kesavand2cde6582020-06-22 04:56:23 -0400298type _Socklen uint32
299
Andrea Campanella764f1ed2022-03-24 11:46:38 +0100300type Xucred struct {
301 Version uint32
302 Uid uint32
303 Ngroups int16
304 Groups [16]uint32
305}
306
kesavand2cde6582020-06-22 04:56:23 -0400307type Linger struct {
308 Onoff int32
309 Linger int32
310}
311
312type Iovec struct {
313 Base *byte
314 Len uint64
315}
316
317type IPMreq struct {
318 Multiaddr [4]byte /* in_addr */
319 Interface [4]byte /* in_addr */
320}
321
Andrea Campanella764f1ed2022-03-24 11:46:38 +0100322type IPMreqn struct {
323 Multiaddr [4]byte /* in_addr */
324 Address [4]byte /* in_addr */
325 Ifindex int32
326}
327
kesavand2cde6582020-06-22 04:56:23 -0400328type IPv6Mreq struct {
329 Multiaddr [16]byte /* in6_addr */
330 Interface uint32
331}
332
333type Msghdr struct {
334 Name *byte
335 Namelen uint32
kesavand2cde6582020-06-22 04:56:23 -0400336 Iov *Iovec
337 Iovlen int32
kesavand2cde6582020-06-22 04:56:23 -0400338 Control *byte
339 Controllen uint32
340 Flags int32
341}
342
343type Cmsghdr struct {
344 Len uint32
345 Level int32
346 Type int32
347}
348
349type Inet4Pktinfo struct {
350 Ifindex uint32
351 Spec_dst [4]byte /* in_addr */
352 Addr [4]byte /* in_addr */
353}
354
355type Inet6Pktinfo struct {
356 Addr [16]byte /* in6_addr */
357 Ifindex uint32
358}
359
360type IPv6MTUInfo struct {
361 Addr RawSockaddrInet6
362 Mtu uint32
363}
364
365type ICMPv6Filter struct {
366 Filt [8]uint32
367}
368
369const (
370 SizeofSockaddrInet4 = 0x10
371 SizeofSockaddrInet6 = 0x1c
372 SizeofSockaddrAny = 0x6c
373 SizeofSockaddrUnix = 0x6a
374 SizeofSockaddrDatalink = 0x14
Andrea Campanella764f1ed2022-03-24 11:46:38 +0100375 SizeofSockaddrCtl = 0x20
kesavandc71914f2022-03-25 11:19:03 +0530376 SizeofSockaddrVM = 0xc
377 SizeofXvsockpcb = 0xa8
378 SizeofXSocket = 0x64
379 SizeofXSockbuf = 0x18
380 SizeofXVSockPgen = 0x20
Andrea Campanella764f1ed2022-03-24 11:46:38 +0100381 SizeofXucred = 0x4c
kesavand2cde6582020-06-22 04:56:23 -0400382 SizeofLinger = 0x8
Andrea Campanella764f1ed2022-03-24 11:46:38 +0100383 SizeofIovec = 0x10
kesavand2cde6582020-06-22 04:56:23 -0400384 SizeofIPMreq = 0x8
Andrea Campanella764f1ed2022-03-24 11:46:38 +0100385 SizeofIPMreqn = 0xc
kesavand2cde6582020-06-22 04:56:23 -0400386 SizeofIPv6Mreq = 0x14
387 SizeofMsghdr = 0x30
388 SizeofCmsghdr = 0xc
389 SizeofInet4Pktinfo = 0xc
390 SizeofInet6Pktinfo = 0x14
391 SizeofIPv6MTUInfo = 0x20
392 SizeofICMPv6Filter = 0x20
393)
394
395const (
396 PTRACE_TRACEME = 0x0
397 PTRACE_CONT = 0x7
398 PTRACE_KILL = 0x8
399)
400
401type Kevent_t struct {
402 Ident uint64
403 Filter int16
404 Flags uint16
405 Fflags uint32
406 Data int64
407 Udata *byte
408}
409
410type FdSet struct {
411 Bits [32]int32
412}
413
414const (
415 SizeofIfMsghdr = 0x70
416 SizeofIfData = 0x60
417 SizeofIfaMsghdr = 0x14
418 SizeofIfmaMsghdr = 0x10
419 SizeofIfmaMsghdr2 = 0x14
420 SizeofRtMsghdr = 0x5c
421 SizeofRtMetrics = 0x38
422)
423
424type IfMsghdr struct {
425 Msglen uint16
426 Version uint8
427 Type uint8
428 Addrs int32
429 Flags int32
430 Index uint16
kesavand2cde6582020-06-22 04:56:23 -0400431 Data IfData
432}
433
434type IfData struct {
435 Type uint8
436 Typelen uint8
437 Physical uint8
438 Addrlen uint8
439 Hdrlen uint8
440 Recvquota uint8
441 Xmitquota uint8
442 Unused1 uint8
443 Mtu uint32
444 Metric uint32
445 Baudrate uint32
446 Ipackets uint32
447 Ierrors uint32
448 Opackets uint32
449 Oerrors uint32
450 Collisions uint32
451 Ibytes uint32
452 Obytes uint32
453 Imcasts uint32
454 Omcasts uint32
455 Iqdrops uint32
456 Noproto uint32
457 Recvtiming uint32
458 Xmittiming uint32
459 Lastchange Timeval32
460 Unused2 uint32
461 Hwassist uint32
462 Reserved1 uint32
463 Reserved2 uint32
464}
465
466type IfaMsghdr struct {
467 Msglen uint16
468 Version uint8
469 Type uint8
470 Addrs int32
471 Flags int32
472 Index uint16
kesavand2cde6582020-06-22 04:56:23 -0400473 Metric int32
474}
475
476type IfmaMsghdr struct {
477 Msglen uint16
478 Version uint8
479 Type uint8
480 Addrs int32
481 Flags int32
482 Index uint16
483 _ [2]byte
484}
485
486type IfmaMsghdr2 struct {
487 Msglen uint16
488 Version uint8
489 Type uint8
490 Addrs int32
491 Flags int32
492 Index uint16
kesavand2cde6582020-06-22 04:56:23 -0400493 Refcount int32
494}
495
496type RtMsghdr struct {
497 Msglen uint16
498 Version uint8
499 Type uint8
500 Index uint16
kesavand2cde6582020-06-22 04:56:23 -0400501 Flags int32
502 Addrs int32
503 Pid int32
504 Seq int32
505 Errno int32
506 Use int32
507 Inits uint32
508 Rmx RtMetrics
509}
510
511type RtMetrics struct {
512 Locks uint32
513 Mtu uint32
514 Hopcount uint32
515 Expire int32
516 Recvpipe uint32
517 Sendpipe uint32
518 Ssthresh uint32
519 Rtt uint32
520 Rttvar uint32
521 Pksent uint32
Andrea Campanella764f1ed2022-03-24 11:46:38 +0100522 State uint32
523 Filler [3]uint32
kesavand2cde6582020-06-22 04:56:23 -0400524}
525
526const (
527 SizeofBpfVersion = 0x4
528 SizeofBpfStat = 0x8
529 SizeofBpfProgram = 0x10
530 SizeofBpfInsn = 0x8
531 SizeofBpfHdr = 0x14
532)
533
534type BpfVersion struct {
535 Major uint16
536 Minor uint16
537}
538
539type BpfStat struct {
540 Recv uint32
541 Drop uint32
542}
543
544type BpfProgram struct {
545 Len uint32
kesavand2cde6582020-06-22 04:56:23 -0400546 Insns *BpfInsn
547}
548
549type BpfInsn struct {
550 Code uint16
551 Jt uint8
552 Jf uint8
553 K uint32
554}
555
556type BpfHdr struct {
557 Tstamp Timeval32
558 Caplen uint32
559 Datalen uint32
560 Hdrlen uint16
561 _ [2]byte
562}
563
564type Termios struct {
565 Iflag uint64
566 Oflag uint64
567 Cflag uint64
568 Lflag uint64
569 Cc [20]uint8
kesavand2cde6582020-06-22 04:56:23 -0400570 Ispeed uint64
571 Ospeed uint64
572}
573
574type Winsize struct {
575 Row uint16
576 Col uint16
577 Xpixel uint16
578 Ypixel uint16
579}
580
581const (
582 AT_FDCWD = -0x2
583 AT_REMOVEDIR = 0x80
584 AT_SYMLINK_FOLLOW = 0x40
585 AT_SYMLINK_NOFOLLOW = 0x20
586)
587
588type PollFd struct {
589 Fd int32
590 Events int16
591 Revents int16
592}
593
594const (
595 POLLERR = 0x8
596 POLLHUP = 0x10
597 POLLIN = 0x1
598 POLLNVAL = 0x20
599 POLLOUT = 0x4
600 POLLPRI = 0x2
601 POLLRDBAND = 0x80
602 POLLRDNORM = 0x40
603 POLLWRBAND = 0x100
604 POLLWRNORM = 0x4
605)
606
607type Utsname struct {
608 Sysname [256]byte
609 Nodename [256]byte
610 Release [256]byte
611 Version [256]byte
612 Machine [256]byte
613}
614
615const SizeofClockinfo = 0x14
616
617type Clockinfo struct {
618 Hz int32
619 Tick int32
620 Tickadj int32
621 Stathz int32
622 Profhz int32
623}
Andrea Campanella764f1ed2022-03-24 11:46:38 +0100624
625type CtlInfo struct {
626 Id uint32
627 Name [96]byte
628}
kesavandc71914f2022-03-25 11:19:03 +0530629
630const SizeofKinfoProc = 0x288
631
632type Eproc struct {
633 Paddr uintptr
634 Sess uintptr
635 Pcred Pcred
636 Ucred Ucred
637 Vm Vmspace
638 Ppid int32
639 Pgid int32
640 Jobc int16
641 Tdev int32
642 Tpgid int32
643 Tsess uintptr
644 Wmesg [8]byte
645 Xsize int32
646 Xrssize int16
647 Xccount int16
648 Xswrss int16
649 Flag int32
650 Login [12]byte
651 Spare [4]int32
652 _ [4]byte
653}
654
655type ExternProc struct {
656 P_starttime Timeval
657 P_vmspace *Vmspace
658 P_sigacts uintptr
659 P_flag int32
660 P_stat int8
661 P_pid int32
662 P_oppid int32
663 P_dupfd int32
664 User_stack *int8
665 Exit_thread *byte
666 P_debugger int32
667 Sigwait int32
668 P_estcpu uint32
669 P_cpticks int32
670 P_pctcpu uint32
671 P_wchan *byte
672 P_wmesg *int8
673 P_swtime uint32
674 P_slptime uint32
675 P_realtimer Itimerval
676 P_rtime Timeval
677 P_uticks uint64
678 P_sticks uint64
679 P_iticks uint64
680 P_traceflag int32
681 P_tracep uintptr
682 P_siglist int32
683 P_textvp uintptr
684 P_holdcnt int32
685 P_sigmask uint32
686 P_sigignore uint32
687 P_sigcatch uint32
688 P_priority uint8
689 P_usrpri uint8
690 P_nice int8
691 P_comm [17]byte
692 P_pgrp uintptr
693 P_addr uintptr
694 P_xstat uint16
695 P_acflag uint16
696 P_ru *Rusage
697}
698
699type Itimerval struct {
700 Interval Timeval
701 Value Timeval
702}
703
704type KinfoProc struct {
705 Proc ExternProc
706 Eproc Eproc
707}
708
709type Vmspace struct {
710 Dummy int32
711 Dummy2 *int8
712 Dummy3 [5]int32
713 Dummy4 [3]*int8
714}
715
716type Pcred struct {
717 Pc_lock [72]int8
718 Pc_ucred uintptr
719 P_ruid uint32
720 P_svuid uint32
721 P_rgid uint32
722 P_svgid uint32
723 P_refcnt int32
724 _ [4]byte
725}
726
727type Ucred struct {
728 Ref int32
729 Uid uint32
730 Ngroups int16
731 Groups [16]uint32
732}
733
734type SysvIpcPerm struct {
735 Uid uint32
736 Gid uint32
737 Cuid uint32
738 Cgid uint32
739 Mode uint16
740 _ uint16
741 _ int32
742}
743type SysvShmDesc struct {
744 Perm SysvIpcPerm
745 Segsz uint64
746 Lpid int32
747 Cpid int32
748 Nattch uint16
749 _ [34]byte
750}
751
752const (
753 IPC_CREAT = 0x200
754 IPC_EXCL = 0x400
755 IPC_NOWAIT = 0x800
756 IPC_PRIVATE = 0x0
757)
758
759const (
760 IPC_RMID = 0x0
761 IPC_SET = 0x1
762 IPC_STAT = 0x2
763)
764
765const (
766 SHM_RDONLY = 0x1000
767 SHM_RND = 0x2000
768)