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