blob: 8e3e33f6790587e60208a6cf5f804f8005820320 [file] [log] [blame]
Andrea Campanella764f1ed2022-03-24 11:46:38 +01001// cgo -godefs -- -fsigned-char types_freebsd.go | go run mkpost.go
kesavand2cde6582020-06-22 04:56:23 -04002// Code generated by the command above; see README.md. DO NOT EDIT.
3
Andrea Campanella764f1ed2022-03-24 11:46:38 +01004//go:build arm64 && freebsd
kesavand2cde6582020-06-22 04:56:23 -04005// +build arm64,freebsd
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 int64
32}
33
kesavandc71914f2022-03-25 11:19:03 +053034type Time_t int64
35
kesavand2cde6582020-06-22 04:56:23 -040036type Rusage struct {
37 Utime Timeval
38 Stime Timeval
39 Maxrss int64
40 Ixrss int64
41 Idrss int64
42 Isrss int64
43 Minflt int64
44 Majflt int64
45 Nswap int64
46 Inblock int64
47 Oublock int64
48 Msgsnd int64
49 Msgrcv int64
50 Nsignals int64
51 Nvcsw int64
52 Nivcsw int64
53}
54
55type Rlimit struct {
56 Cur int64
57 Max int64
58}
59
60type _Gid_t uint32
61
62const (
63 _statfsVersion = 0x20140518
64 _dirblksiz = 0x400
65)
66
67type Stat_t struct {
68 Dev uint64
69 Ino uint64
70 Nlink uint64
71 Mode uint16
72 _0 int16
73 Uid uint32
74 Gid uint32
75 _1 int32
76 Rdev uint64
77 Atim Timespec
78 Mtim Timespec
79 Ctim Timespec
80 Btim Timespec
81 Size int64
82 Blocks int64
83 Blksize int32
84 Flags uint32
85 Gen uint64
86 Spare [10]uint64
87}
88
89type stat_freebsd11_t struct {
90 Dev uint32
91 Ino uint32
92 Mode uint16
93 Nlink uint16
94 Uid uint32
95 Gid uint32
96 Rdev uint32
97 Atim Timespec
98 Mtim Timespec
99 Ctim Timespec
100 Size int64
101 Blocks int64
102 Blksize int32
103 Flags uint32
104 Gen uint32
105 Lspare int32
106 Btim Timespec
107}
108
109type Statfs_t struct {
110 Version uint32
111 Type uint32
112 Flags uint64
113 Bsize uint64
114 Iosize uint64
115 Blocks uint64
116 Bfree uint64
117 Bavail int64
118 Files uint64
119 Ffree int64
120 Syncwrites uint64
121 Asyncwrites uint64
122 Syncreads uint64
123 Asyncreads uint64
124 Spare [10]uint64
125 Namemax uint32
126 Owner uint32
127 Fsid Fsid
128 Charspare [80]int8
Andrea Campanella764f1ed2022-03-24 11:46:38 +0100129 Fstypename [16]byte
130 Mntfromname [1024]byte
131 Mntonname [1024]byte
kesavand2cde6582020-06-22 04:56:23 -0400132}
133
134type statfs_freebsd11_t struct {
135 Version uint32
136 Type uint32
137 Flags uint64
138 Bsize uint64
139 Iosize uint64
140 Blocks uint64
141 Bfree uint64
142 Bavail int64
143 Files uint64
144 Ffree int64
145 Syncwrites uint64
146 Asyncwrites uint64
147 Syncreads uint64
148 Asyncreads uint64
149 Spare [10]uint64
150 Namemax uint32
151 Owner uint32
152 Fsid Fsid
153 Charspare [80]int8
Andrea Campanella764f1ed2022-03-24 11:46:38 +0100154 Fstypename [16]byte
155 Mntfromname [88]byte
156 Mntonname [88]byte
kesavand2cde6582020-06-22 04:56:23 -0400157}
158
159type Flock_t struct {
160 Start int64
161 Len int64
162 Pid int32
163 Type int16
164 Whence int16
165 Sysid int32
166 _ [4]byte
167}
168
169type Dirent struct {
170 Fileno uint64
171 Off int64
172 Reclen uint16
173 Type uint8
174 Pad0 uint8
175 Namlen uint16
176 Pad1 uint16
177 Name [256]int8
178}
179
180type dirent_freebsd11 struct {
181 Fileno uint32
182 Reclen uint16
183 Type uint8
184 Namlen uint8
185 Name [256]int8
186}
187
188type Fsid struct {
189 Val [2]int32
190}
191
192const (
193 PathMax = 0x400
194)
195
196const (
197 FADV_NORMAL = 0x0
198 FADV_RANDOM = 0x1
199 FADV_SEQUENTIAL = 0x2
200 FADV_WILLNEED = 0x3
201 FADV_DONTNEED = 0x4
202 FADV_NOREUSE = 0x5
203)
204
205type RawSockaddrInet4 struct {
206 Len uint8
207 Family uint8
208 Port uint16
209 Addr [4]byte /* in_addr */
210 Zero [8]int8
211}
212
213type RawSockaddrInet6 struct {
214 Len uint8
215 Family uint8
216 Port uint16
217 Flowinfo uint32
218 Addr [16]byte /* in6_addr */
219 Scope_id uint32
220}
221
222type RawSockaddrUnix struct {
223 Len uint8
224 Family uint8
225 Path [104]int8
226}
227
228type RawSockaddrDatalink struct {
229 Len uint8
230 Family uint8
231 Index uint16
232 Type uint8
233 Nlen uint8
234 Alen uint8
235 Slen uint8
236 Data [46]int8
237}
238
239type RawSockaddr struct {
240 Len uint8
241 Family uint8
242 Data [14]int8
243}
244
245type RawSockaddrAny struct {
246 Addr RawSockaddr
247 Pad [92]int8
248}
249
250type _Socklen uint32
251
Andrea Campanella764f1ed2022-03-24 11:46:38 +0100252type Xucred struct {
253 Version uint32
254 Uid uint32
255 Ngroups int16
256 Groups [16]uint32
257 _ *byte
258}
259
kesavand2cde6582020-06-22 04:56:23 -0400260type Linger struct {
261 Onoff int32
262 Linger int32
263}
264
265type Iovec struct {
266 Base *byte
267 Len uint64
268}
269
270type IPMreq struct {
271 Multiaddr [4]byte /* in_addr */
272 Interface [4]byte /* in_addr */
273}
274
275type IPMreqn struct {
276 Multiaddr [4]byte /* in_addr */
277 Address [4]byte /* in_addr */
278 Ifindex int32
279}
280
281type IPv6Mreq struct {
282 Multiaddr [16]byte /* in6_addr */
283 Interface uint32
284}
285
286type Msghdr struct {
287 Name *byte
288 Namelen uint32
kesavand2cde6582020-06-22 04:56:23 -0400289 Iov *Iovec
290 Iovlen int32
kesavand2cde6582020-06-22 04:56:23 -0400291 Control *byte
292 Controllen uint32
293 Flags int32
294}
295
296type Cmsghdr struct {
297 Len uint32
298 Level int32
299 Type int32
300}
301
302type Inet6Pktinfo struct {
303 Addr [16]byte /* in6_addr */
304 Ifindex uint32
305}
306
307type IPv6MTUInfo struct {
308 Addr RawSockaddrInet6
309 Mtu uint32
310}
311
312type ICMPv6Filter struct {
313 Filt [8]uint32
314}
315
316const (
317 SizeofSockaddrInet4 = 0x10
318 SizeofSockaddrInet6 = 0x1c
319 SizeofSockaddrAny = 0x6c
320 SizeofSockaddrUnix = 0x6a
321 SizeofSockaddrDatalink = 0x36
Andrea Campanella764f1ed2022-03-24 11:46:38 +0100322 SizeofXucred = 0x58
kesavand2cde6582020-06-22 04:56:23 -0400323 SizeofLinger = 0x8
Andrea Campanella764f1ed2022-03-24 11:46:38 +0100324 SizeofIovec = 0x10
kesavand2cde6582020-06-22 04:56:23 -0400325 SizeofIPMreq = 0x8
326 SizeofIPMreqn = 0xc
327 SizeofIPv6Mreq = 0x14
328 SizeofMsghdr = 0x30
329 SizeofCmsghdr = 0xc
330 SizeofInet6Pktinfo = 0x14
331 SizeofIPv6MTUInfo = 0x20
332 SizeofICMPv6Filter = 0x20
333)
334
335const (
336 PTRACE_ATTACH = 0xa
337 PTRACE_CONT = 0x7
338 PTRACE_DETACH = 0xb
339 PTRACE_GETFPREGS = 0x23
kesavand2cde6582020-06-22 04:56:23 -0400340 PTRACE_GETLWPLIST = 0xf
341 PTRACE_GETNUMLWPS = 0xe
342 PTRACE_GETREGS = 0x21
kesavand2cde6582020-06-22 04:56:23 -0400343 PTRACE_IO = 0xc
344 PTRACE_KILL = 0x8
345 PTRACE_LWPEVENTS = 0x18
346 PTRACE_LWPINFO = 0xd
347 PTRACE_SETFPREGS = 0x24
348 PTRACE_SETREGS = 0x22
349 PTRACE_SINGLESTEP = 0x9
350 PTRACE_TRACEME = 0x0
351)
352
353const (
354 PIOD_READ_D = 0x1
355 PIOD_WRITE_D = 0x2
356 PIOD_READ_I = 0x3
357 PIOD_WRITE_I = 0x4
358)
359
360const (
361 PL_FLAG_BORN = 0x100
362 PL_FLAG_EXITED = 0x200
363 PL_FLAG_SI = 0x20
364)
365
366const (
367 TRAP_BRKPT = 0x1
368 TRAP_TRACE = 0x2
369)
370
371type PtraceLwpInfoStruct struct {
372 Lwpid int32
373 Event int32
374 Flags int32
375 Sigmask Sigset_t
376 Siglist Sigset_t
377 Siginfo __Siginfo
378 Tdname [20]int8
379 Child_pid int32
380 Syscall_code uint32
381 Syscall_narg uint32
382}
383
384type __Siginfo struct {
Andrea Campanella764f1ed2022-03-24 11:46:38 +0100385 Signo int32
386 Errno int32
387 Code int32
388 Pid int32
389 Uid uint32
390 Status int32
391 Addr *byte
392 Value [8]byte
393 _ [40]byte
kesavand2cde6582020-06-22 04:56:23 -0400394}
395
396type Sigset_t struct {
397 Val [4]uint32
398}
399
400type Reg struct {
401 X [30]uint64
402 Lr uint64
403 Sp uint64
404 Elr uint64
405 Spsr uint32
Andrea Campanella764f1ed2022-03-24 11:46:38 +0100406 _ [4]byte
kesavand2cde6582020-06-22 04:56:23 -0400407}
408
409type FpReg struct {
Andrea Campanella764f1ed2022-03-24 11:46:38 +0100410 Q [32][16]uint8
411 Sr uint32
412 Cr uint32
413 _ [8]byte
kesavand2cde6582020-06-22 04:56:23 -0400414}
415
416type PtraceIoDesc struct {
417 Op int32
418 Offs *byte
419 Addr *byte
Andrea Campanella764f1ed2022-03-24 11:46:38 +0100420 Len uint64
kesavand2cde6582020-06-22 04:56:23 -0400421}
422
423type Kevent_t struct {
424 Ident uint64
425 Filter int16
426 Flags uint16
427 Fflags uint32
428 Data int64
429 Udata *byte
430}
431
432type FdSet struct {
433 Bits [16]uint64
434}
435
436const (
437 sizeofIfMsghdr = 0xa8
438 SizeofIfMsghdr = 0xa8
439 sizeofIfData = 0x98
440 SizeofIfData = 0x98
441 SizeofIfaMsghdr = 0x14
442 SizeofIfmaMsghdr = 0x10
443 SizeofIfAnnounceMsghdr = 0x18
444 SizeofRtMsghdr = 0x98
445 SizeofRtMetrics = 0x70
446)
447
448type ifMsghdr struct {
449 Msglen uint16
450 Version uint8
451 Type uint8
452 Addrs int32
453 Flags int32
454 Index uint16
Andrea Campanella764f1ed2022-03-24 11:46:38 +0100455 _ uint16
kesavand2cde6582020-06-22 04:56:23 -0400456 Data ifData
457}
458
459type IfMsghdr struct {
460 Msglen uint16
461 Version uint8
462 Type uint8
463 Addrs int32
464 Flags int32
465 Index uint16
kesavand2cde6582020-06-22 04:56:23 -0400466 Data IfData
467}
468
469type ifData struct {
470 Type uint8
471 Physical uint8
472 Addrlen uint8
473 Hdrlen uint8
474 Link_state uint8
475 Vhid uint8
476 Datalen uint16
477 Mtu uint32
478 Metric uint32
479 Baudrate uint64
480 Ipackets uint64
481 Ierrors uint64
482 Opackets uint64
483 Oerrors uint64
484 Collisions uint64
485 Ibytes uint64
486 Obytes uint64
487 Imcasts uint64
488 Omcasts uint64
489 Iqdrops uint64
490 Oqdrops uint64
491 Noproto uint64
492 Hwassist uint64
493 _ [8]byte
494 _ [16]byte
495}
496
497type IfData struct {
498 Type uint8
499 Physical uint8
500 Addrlen uint8
501 Hdrlen uint8
502 Link_state uint8
503 Spare_char1 uint8
504 Spare_char2 uint8
505 Datalen uint8
506 Mtu uint64
507 Metric uint64
508 Baudrate uint64
509 Ipackets uint64
510 Ierrors uint64
511 Opackets uint64
512 Oerrors uint64
513 Collisions uint64
514 Ibytes uint64
515 Obytes uint64
516 Imcasts uint64
517 Omcasts uint64
518 Iqdrops uint64
519 Noproto uint64
520 Hwassist uint64
521 Epoch int64
522 Lastchange Timeval
523}
524
525type IfaMsghdr struct {
526 Msglen uint16
527 Version uint8
528 Type uint8
529 Addrs int32
530 Flags int32
531 Index uint16
Andrea Campanella764f1ed2022-03-24 11:46:38 +0100532 _ uint16
kesavand2cde6582020-06-22 04:56:23 -0400533 Metric int32
534}
535
536type IfmaMsghdr struct {
537 Msglen uint16
538 Version uint8
539 Type uint8
540 Addrs int32
541 Flags int32
542 Index uint16
Andrea Campanella764f1ed2022-03-24 11:46:38 +0100543 _ uint16
kesavand2cde6582020-06-22 04:56:23 -0400544}
545
546type IfAnnounceMsghdr struct {
547 Msglen uint16
548 Version uint8
549 Type uint8
550 Index uint16
551 Name [16]int8
552 What uint16
553}
554
555type RtMsghdr struct {
556 Msglen uint16
557 Version uint8
558 Type uint8
559 Index uint16
Andrea Campanella764f1ed2022-03-24 11:46:38 +0100560 _ uint16
kesavand2cde6582020-06-22 04:56:23 -0400561 Flags int32
562 Addrs int32
563 Pid int32
564 Seq int32
565 Errno int32
566 Fmask int32
567 Inits uint64
568 Rmx RtMetrics
569}
570
571type RtMetrics struct {
572 Locks uint64
573 Mtu uint64
574 Hopcount uint64
575 Expire uint64
576 Recvpipe uint64
577 Sendpipe uint64
578 Ssthresh uint64
579 Rtt uint64
580 Rttvar uint64
581 Pksent uint64
582 Weight uint64
583 Filler [3]uint64
584}
585
586const (
587 SizeofBpfVersion = 0x4
588 SizeofBpfStat = 0x8
589 SizeofBpfZbuf = 0x18
590 SizeofBpfProgram = 0x10
591 SizeofBpfInsn = 0x8
592 SizeofBpfHdr = 0x20
593 SizeofBpfZbufHeader = 0x20
594)
595
596type BpfVersion struct {
597 Major uint16
598 Minor uint16
599}
600
601type BpfStat struct {
602 Recv uint32
603 Drop uint32
604}
605
606type BpfZbuf struct {
607 Bufa *byte
608 Bufb *byte
609 Buflen uint64
610}
611
612type BpfProgram struct {
613 Len uint32
kesavand2cde6582020-06-22 04:56:23 -0400614 Insns *BpfInsn
615}
616
617type BpfInsn struct {
618 Code uint16
619 Jt uint8
620 Jf uint8
621 K uint32
622}
623
624type BpfHdr struct {
625 Tstamp Timeval
626 Caplen uint32
627 Datalen uint32
628 Hdrlen uint16
629 _ [6]byte
630}
631
632type BpfZbufHeader struct {
633 Kernel_gen uint32
634 Kernel_len uint32
635 User_gen uint32
636 _ [5]uint32
637}
638
639type Termios struct {
640 Iflag uint32
641 Oflag uint32
642 Cflag uint32
643 Lflag uint32
644 Cc [20]uint8
645 Ispeed uint32
646 Ospeed uint32
647}
648
649type Winsize struct {
650 Row uint16
651 Col uint16
652 Xpixel uint16
653 Ypixel uint16
654}
655
656const (
657 AT_FDCWD = -0x64
kesavandc71914f2022-03-25 11:19:03 +0530658 AT_EACCESS = 0x100
kesavand2cde6582020-06-22 04:56:23 -0400659 AT_SYMLINK_NOFOLLOW = 0x200
kesavandc71914f2022-03-25 11:19:03 +0530660 AT_SYMLINK_FOLLOW = 0x400
661 AT_REMOVEDIR = 0x800
kesavand2cde6582020-06-22 04:56:23 -0400662)
663
664type PollFd struct {
665 Fd int32
666 Events int16
667 Revents int16
668}
669
670const (
671 POLLERR = 0x8
672 POLLHUP = 0x10
673 POLLIN = 0x1
674 POLLINIGNEOF = 0x2000
675 POLLNVAL = 0x20
676 POLLOUT = 0x4
677 POLLPRI = 0x2
678 POLLRDBAND = 0x80
679 POLLRDNORM = 0x40
680 POLLWRBAND = 0x100
681 POLLWRNORM = 0x4
682)
683
684type CapRights struct {
685 Rights [2]uint64
686}
687
688type Utsname struct {
689 Sysname [256]byte
690 Nodename [256]byte
691 Release [256]byte
692 Version [256]byte
693 Machine [256]byte
694}
Andrea Campanella764f1ed2022-03-24 11:46:38 +0100695
696const SizeofClockinfo = 0x14
697
698type Clockinfo struct {
699 Hz int32
700 Tick int32
701 Spare int32
702 Stathz int32
703 Profhz int32
704}