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 arm && freebsd
5// +build arm,freebsd
6
7package unix
8
9const (
10	SizeofPtr      = 0x4
11	SizeofShort    = 0x2
12	SizeofInt      = 0x4
13	SizeofLong     = 0x4
14	SizeofLongLong = 0x8
15)
16
17type (
18	_C_short     int16
19	_C_int       int32
20	_C_long      int32
21	_C_long_long int64
22)
23
24type Timespec struct {
25	Sec  int64
26	Nsec int32
27	_    [4]byte
28}
29
30type Timeval struct {
31	Sec  int64
32	Usec int32
33	_    [4]byte
34}
35
36type Rusage struct {
37	Utime    Timeval
38	Stime    Timeval
39	Maxrss   int32
40	Ixrss    int32
41	Idrss    int32
42	Isrss    int32
43	Minflt   int32
44	Majflt   int32
45	Nswap    int32
46	Inblock  int32
47	Oublock  int32
48	Msgsnd   int32
49	Msgrcv   int32
50	Nsignals int32
51	Nvcsw    int32
52	Nivcsw   int32
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
129	Fstypename  [16]byte
130	Mntfromname [1024]byte
131	Mntonname   [1024]byte
132}
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
154	Fstypename  [16]byte
155	Mntfromname [88]byte
156	Mntonname   [88]byte
157}
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
252type Xucred struct {
253	Version uint32
254	Uid     uint32
255	Ngroups int16
256	Groups  [16]uint32
257	_       *byte
258}
259
260type Linger struct {
261	Onoff  int32
262	Linger int32
263}
264
265type Iovec struct {
266	Base *byte
267	Len  uint32
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
289	Iov        *Iovec
290	Iovlen     int32
291	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
322	SizeofXucred           = 0x50
323	SizeofLinger           = 0x8
324	SizeofIovec            = 0x8
325	SizeofIPMreq           = 0x8
326	SizeofIPMreqn          = 0xc
327	SizeofIPv6Mreq         = 0x14
328	SizeofMsghdr           = 0x1c
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
340	PTRACE_GETFSBASE  = 0x47
341	PTRACE_GETLWPLIST = 0xf
342	PTRACE_GETNUMLWPS = 0xe
343	PTRACE_GETREGS    = 0x21
344	PTRACE_GETXSTATE  = 0x45
345	PTRACE_IO         = 0xc
346	PTRACE_KILL       = 0x8
347	PTRACE_LWPEVENTS  = 0x18
348	PTRACE_LWPINFO    = 0xd
349	PTRACE_SETFPREGS  = 0x24
350	PTRACE_SETREGS    = 0x22
351	PTRACE_SINGLESTEP = 0x9
352	PTRACE_TRACEME    = 0x0
353)
354
355const (
356	PIOD_READ_D  = 0x1
357	PIOD_WRITE_D = 0x2
358	PIOD_READ_I  = 0x3
359	PIOD_WRITE_I = 0x4
360)
361
362const (
363	PL_FLAG_BORN   = 0x100
364	PL_FLAG_EXITED = 0x200
365	PL_FLAG_SI     = 0x20
366)
367
368const (
369	TRAP_BRKPT = 0x1
370	TRAP_TRACE = 0x2
371)
372
373type PtraceLwpInfoStruct struct {
374	Lwpid        int32
375	Event        int32
376	Flags        int32
377	Sigmask      Sigset_t
378	Siglist      Sigset_t
379	Siginfo      __Siginfo
380	Tdname       [20]int8
381	Child_pid    int32
382	Syscall_code uint32
383	Syscall_narg uint32
384}
385
386type __Siginfo struct {
387	Signo    int32
388	Errno    int32
389	Code     int32
390	Pid      int32
391	Uid      uint32
392	Status   int32
393	Addr     *byte
394	Value    [4]byte
395	X_reason [32]byte
396}
397
398type Sigset_t struct {
399	Val [4]uint32
400}
401
402type Reg struct {
403	R      [13]uint32
404	R_sp   uint32
405	R_lr   uint32
406	R_pc   uint32
407	R_cpsr uint32
408}
409
410type FpReg struct {
411	Fpr_fpsr uint32
412	Fpr      [8][3]uint32
413}
414
415type PtraceIoDesc struct {
416	Op   int32
417	Offs *byte
418	Addr *byte
419	Len  uint32
420}
421
422type Kevent_t struct {
423	Ident  uint32
424	Filter int16
425	Flags  uint16
426	Fflags uint32
427	Data   int32
428	Udata  *byte
429}
430
431type FdSet struct {
432	Bits [32]uint32
433}
434
435const (
436	sizeofIfMsghdr         = 0xa8
437	SizeofIfMsghdr         = 0x70
438	sizeofIfData           = 0x98
439	SizeofIfData           = 0x60
440	SizeofIfaMsghdr        = 0x14
441	SizeofIfmaMsghdr       = 0x10
442	SizeofIfAnnounceMsghdr = 0x18
443	SizeofRtMsghdr         = 0x5c
444	SizeofRtMetrics        = 0x38
445)
446
447type ifMsghdr struct {
448	Msglen  uint16
449	Version uint8
450	Type    uint8
451	Addrs   int32
452	Flags   int32
453	Index   uint16
454	_       [2]byte
455	Data    ifData
456}
457
458type IfMsghdr struct {
459	Msglen  uint16
460	Version uint8
461	Type    uint8
462	Addrs   int32
463	Flags   int32
464	Index   uint16
465	_       [2]byte
466	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         uint32
507	Metric      uint32
508	Baudrate    uint32
509	Ipackets    uint32
510	Ierrors     uint32
511	Opackets    uint32
512	Oerrors     uint32
513	Collisions  uint32
514	Ibytes      uint32
515	Obytes      uint32
516	Imcasts     uint32
517	Omcasts     uint32
518	Iqdrops     uint32
519	Noproto     uint32
520	Hwassist    uint32
521	_           [4]byte
522	Epoch       int64
523	Lastchange  Timeval
524}
525
526type IfaMsghdr struct {
527	Msglen  uint16
528	Version uint8
529	Type    uint8
530	Addrs   int32
531	Flags   int32
532	Index   uint16
533	_       [2]byte
534	Metric  int32
535}
536
537type IfmaMsghdr struct {
538	Msglen  uint16
539	Version uint8
540	Type    uint8
541	Addrs   int32
542	Flags   int32
543	Index   uint16
544	_       [2]byte
545}
546
547type IfAnnounceMsghdr struct {
548	Msglen  uint16
549	Version uint8
550	Type    uint8
551	Index   uint16
552	Name    [16]int8
553	What    uint16
554}
555
556type RtMsghdr struct {
557	Msglen  uint16
558	Version uint8
559	Type    uint8
560	Index   uint16
561	_       [2]byte
562	Flags   int32
563	Addrs   int32
564	Pid     int32
565	Seq     int32
566	Errno   int32
567	Fmask   int32
568	Inits   uint32
569	Rmx     RtMetrics
570}
571
572type RtMetrics struct {
573	Locks    uint32
574	Mtu      uint32
575	Hopcount uint32
576	Expire   uint32
577	Recvpipe uint32
578	Sendpipe uint32
579	Ssthresh uint32
580	Rtt      uint32
581	Rttvar   uint32
582	Pksent   uint32
583	Weight   uint32
584	Filler   [3]uint32
585}
586
587const (
588	SizeofBpfVersion    = 0x4
589	SizeofBpfStat       = 0x8
590	SizeofBpfZbuf       = 0xc
591	SizeofBpfProgram    = 0x8
592	SizeofBpfInsn       = 0x8
593	SizeofBpfHdr        = 0x20
594	SizeofBpfZbufHeader = 0x20
595)
596
597type BpfVersion struct {
598	Major uint16
599	Minor uint16
600}
601
602type BpfStat struct {
603	Recv uint32
604	Drop uint32
605}
606
607type BpfZbuf struct {
608	Bufa   *byte
609	Bufb   *byte
610	Buflen uint32
611}
612
613type BpfProgram struct {
614	Len   uint32
615	Insns *BpfInsn
616}
617
618type BpfInsn struct {
619	Code uint16
620	Jt   uint8
621	Jf   uint8
622	K    uint32
623}
624
625type BpfHdr struct {
626	Tstamp  Timeval
627	Caplen  uint32
628	Datalen uint32
629	Hdrlen  uint16
630	_       [6]byte
631}
632
633type BpfZbufHeader struct {
634	Kernel_gen uint32
635	Kernel_len uint32
636	User_gen   uint32
637	_          [5]uint32
638}
639
640type Termios struct {
641	Iflag  uint32
642	Oflag  uint32
643	Cflag  uint32
644	Lflag  uint32
645	Cc     [20]uint8
646	Ispeed uint32
647	Ospeed uint32
648}
649
650type Winsize struct {
651	Row    uint16
652	Col    uint16
653	Xpixel uint16
654	Ypixel uint16
655}
656
657const (
658	AT_FDCWD            = -0x64
659	AT_REMOVEDIR        = 0x800
660	AT_SYMLINK_FOLLOW   = 0x400
661	AT_SYMLINK_NOFOLLOW = 0x200
662)
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}
695
696const SizeofClockinfo = 0x14
697
698type Clockinfo struct {
699	Hz     int32
700	Tick   int32
701	Spare  int32
702	Stathz int32
703	Profhz int32
704}
705