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