blob: 29ba2f5bf74adb9e87af75745f8ec79f84786170 [file] [log] [blame]
Don Newton98fd8812019-09-23 15:15:02 -04001// cgo -godefs types_freebsd.go | go run mkpost.go
2// Code generated by the command above; see README.md. DO NOT EDIT.
3
4// +build amd64,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 {
Don Newton7577f072020-01-06 12:41:11 -050065 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
Don Newton98fd8812019-09-23 15:15:02 -040084}
85
86type stat_freebsd11_t struct {
Don Newton7577f072020-01-06 12:41:11 -050087 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
Don Newton98fd8812019-09-23 15:15:02 -0400104}
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]int8
127 Mntfromname [1024]int8
128 Mntonname [1024]int8
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]int8
152 Mntfromname [88]int8
153 Mntonname [88]int8
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 _ [4]byte
279 Iov *Iovec
280 Iovlen int32
281 _ [4]byte
282 Control *byte
283 Controllen uint32
284 Flags int32
285}
286
287type Cmsghdr struct {
288 Len uint32
289 Level int32
290 Type int32
291}
292
293type Inet6Pktinfo struct {
294 Addr [16]byte /* in6_addr */
295 Ifindex uint32
296}
297
298type IPv6MTUInfo struct {
299 Addr RawSockaddrInet6
300 Mtu uint32
301}
302
303type ICMPv6Filter struct {
304 Filt [8]uint32
305}
306
307const (
308 SizeofSockaddrInet4 = 0x10
309 SizeofSockaddrInet6 = 0x1c
310 SizeofSockaddrAny = 0x6c
311 SizeofSockaddrUnix = 0x6a
312 SizeofSockaddrDatalink = 0x36
313 SizeofLinger = 0x8
314 SizeofIPMreq = 0x8
315 SizeofIPMreqn = 0xc
316 SizeofIPv6Mreq = 0x14
317 SizeofMsghdr = 0x30
318 SizeofCmsghdr = 0xc
319 SizeofInet6Pktinfo = 0x14
320 SizeofIPv6MTUInfo = 0x20
321 SizeofICMPv6Filter = 0x20
322)
323
324const (
Don Newton7577f072020-01-06 12:41:11 -0500325 PTRACE_ATTACH = 0xa
326 PTRACE_CONT = 0x7
327 PTRACE_DETACH = 0xb
328 PTRACE_GETFPREGS = 0x23
329 PTRACE_GETFSBASE = 0x47
330 PTRACE_GETLWPLIST = 0xf
331 PTRACE_GETNUMLWPS = 0xe
332 PTRACE_GETREGS = 0x21
333 PTRACE_GETXSTATE = 0x45
334 PTRACE_IO = 0xc
335 PTRACE_KILL = 0x8
336 PTRACE_LWPEVENTS = 0x18
337 PTRACE_LWPINFO = 0xd
338 PTRACE_SETFPREGS = 0x24
339 PTRACE_SETREGS = 0x22
340 PTRACE_SINGLESTEP = 0x9
341 PTRACE_TRACEME = 0x0
Don Newton98fd8812019-09-23 15:15:02 -0400342)
343
Don Newton7577f072020-01-06 12:41:11 -0500344const (
345 PIOD_READ_D = 0x1
346 PIOD_WRITE_D = 0x2
347 PIOD_READ_I = 0x3
348 PIOD_WRITE_I = 0x4
349)
350
351const (
352 PL_FLAG_BORN = 0x100
353 PL_FLAG_EXITED = 0x200
354 PL_FLAG_SI = 0x20
355)
356
357const (
358 TRAP_BRKPT = 0x1
359 TRAP_TRACE = 0x2
360)
361
362type PtraceLwpInfoStruct struct {
363 Lwpid int32
364 Event int32
365 Flags int32
366 Sigmask Sigset_t
367 Siglist Sigset_t
368 Siginfo __Siginfo
369 Tdname [20]int8
370 Child_pid int32
371 Syscall_code uint32
372 Syscall_narg uint32
373}
374
375type __Siginfo struct {
376 Signo int32
377 Errno int32
378 Code int32
379 Pid int32
380 Uid uint32
381 Status int32
382 Addr *byte
383 Value [8]byte
384 _ [40]byte
385}
386
387type Sigset_t struct {
388 Val [4]uint32
389}
390
391type Reg struct {
392 R15 int64
393 R14 int64
394 R13 int64
395 R12 int64
396 R11 int64
397 R10 int64
398 R9 int64
399 R8 int64
400 Rdi int64
401 Rsi int64
402 Rbp int64
403 Rbx int64
404 Rdx int64
405 Rcx int64
406 Rax int64
407 Trapno uint32
408 Fs uint16
409 Gs uint16
410 Err uint32
411 Es uint16
412 Ds uint16
413 Rip int64
414 Cs int64
415 Rflags int64
416 Rsp int64
417 Ss int64
418}
419
420type FpReg struct {
421 Env [4]uint64
422 Acc [8][16]uint8
423 Xacc [16][16]uint8
424 Spare [12]uint64
425}
426
427type PtraceIoDesc struct {
428 Op int32
429 Offs *byte
430 Addr *byte
431 Len uint
432}
433
Don Newton98fd8812019-09-23 15:15:02 -0400434type Kevent_t struct {
435 Ident uint64
436 Filter int16
437 Flags uint16
438 Fflags uint32
439 Data int64
440 Udata *byte
441}
442
443type FdSet struct {
444 Bits [16]uint64
445}
446
447const (
448 sizeofIfMsghdr = 0xa8
449 SizeofIfMsghdr = 0xa8
450 sizeofIfData = 0x98
451 SizeofIfData = 0x98
452 SizeofIfaMsghdr = 0x14
453 SizeofIfmaMsghdr = 0x10
454 SizeofIfAnnounceMsghdr = 0x18
455 SizeofRtMsghdr = 0x98
456 SizeofRtMetrics = 0x70
457)
458
459type ifMsghdr struct {
460 Msglen uint16
461 Version uint8
462 Type uint8
463 Addrs int32
464 Flags int32
465 Index uint16
466 _ [2]byte
467 Data ifData
468}
469
470type IfMsghdr struct {
471 Msglen uint16
472 Version uint8
473 Type uint8
474 Addrs int32
475 Flags int32
476 Index uint16
477 _ [2]byte
478 Data IfData
479}
480
481type ifData struct {
482 Type uint8
483 Physical uint8
484 Addrlen uint8
485 Hdrlen uint8
486 Link_state uint8
487 Vhid uint8
488 Datalen uint16
489 Mtu uint32
490 Metric uint32
491 Baudrate uint64
492 Ipackets uint64
493 Ierrors uint64
494 Opackets uint64
495 Oerrors uint64
496 Collisions uint64
497 Ibytes uint64
498 Obytes uint64
499 Imcasts uint64
500 Omcasts uint64
501 Iqdrops uint64
502 Oqdrops uint64
503 Noproto uint64
504 Hwassist uint64
505 _ [8]byte
506 _ [16]byte
507}
508
509type IfData struct {
510 Type uint8
511 Physical uint8
512 Addrlen uint8
513 Hdrlen uint8
514 Link_state uint8
515 Spare_char1 uint8
516 Spare_char2 uint8
517 Datalen uint8
518 Mtu uint64
519 Metric uint64
520 Baudrate uint64
521 Ipackets uint64
522 Ierrors uint64
523 Opackets uint64
524 Oerrors uint64
525 Collisions uint64
526 Ibytes uint64
527 Obytes uint64
528 Imcasts uint64
529 Omcasts uint64
530 Iqdrops uint64
531 Noproto uint64
532 Hwassist uint64
533 Epoch int64
534 Lastchange Timeval
535}
536
537type IfaMsghdr struct {
538 Msglen uint16
539 Version uint8
540 Type uint8
541 Addrs int32
542 Flags int32
543 Index uint16
544 _ [2]byte
545 Metric int32
546}
547
548type IfmaMsghdr struct {
549 Msglen uint16
550 Version uint8
551 Type uint8
552 Addrs int32
553 Flags int32
554 Index uint16
555 _ [2]byte
556}
557
558type IfAnnounceMsghdr struct {
559 Msglen uint16
560 Version uint8
561 Type uint8
562 Index uint16
563 Name [16]int8
564 What uint16
565}
566
567type RtMsghdr struct {
568 Msglen uint16
569 Version uint8
570 Type uint8
571 Index uint16
572 _ [2]byte
573 Flags int32
574 Addrs int32
575 Pid int32
576 Seq int32
577 Errno int32
578 Fmask int32
579 Inits uint64
580 Rmx RtMetrics
581}
582
583type RtMetrics struct {
584 Locks uint64
585 Mtu uint64
586 Hopcount uint64
587 Expire uint64
588 Recvpipe uint64
589 Sendpipe uint64
590 Ssthresh uint64
591 Rtt uint64
592 Rttvar uint64
593 Pksent uint64
594 Weight uint64
595 Filler [3]uint64
596}
597
598const (
599 SizeofBpfVersion = 0x4
600 SizeofBpfStat = 0x8
601 SizeofBpfZbuf = 0x18
602 SizeofBpfProgram = 0x10
603 SizeofBpfInsn = 0x8
604 SizeofBpfHdr = 0x20
605 SizeofBpfZbufHeader = 0x20
606)
607
608type BpfVersion struct {
609 Major uint16
610 Minor uint16
611}
612
613type BpfStat struct {
614 Recv uint32
615 Drop uint32
616}
617
618type BpfZbuf struct {
619 Bufa *byte
620 Bufb *byte
621 Buflen uint64
622}
623
624type BpfProgram struct {
625 Len uint32
626 _ [4]byte
627 Insns *BpfInsn
628}
629
630type BpfInsn struct {
631 Code uint16
632 Jt uint8
633 Jf uint8
634 K uint32
635}
636
637type BpfHdr struct {
638 Tstamp Timeval
639 Caplen uint32
640 Datalen uint32
641 Hdrlen uint16
642 _ [6]byte
643}
644
645type BpfZbufHeader struct {
646 Kernel_gen uint32
647 Kernel_len uint32
648 User_gen uint32
649 _ [5]uint32
650}
651
652type Termios struct {
653 Iflag uint32
654 Oflag uint32
655 Cflag uint32
656 Lflag uint32
657 Cc [20]uint8
658 Ispeed uint32
659 Ospeed uint32
660}
661
662type Winsize struct {
663 Row uint16
664 Col uint16
665 Xpixel uint16
666 Ypixel uint16
667}
668
669const (
670 AT_FDCWD = -0x64
671 AT_REMOVEDIR = 0x800
672 AT_SYMLINK_FOLLOW = 0x400
673 AT_SYMLINK_NOFOLLOW = 0x200
674)
675
676type PollFd struct {
677 Fd int32
678 Events int16
679 Revents int16
680}
681
682const (
683 POLLERR = 0x8
684 POLLHUP = 0x10
685 POLLIN = 0x1
686 POLLINIGNEOF = 0x2000
687 POLLNVAL = 0x20
688 POLLOUT = 0x4
689 POLLPRI = 0x2
690 POLLRDBAND = 0x80
691 POLLRDNORM = 0x40
692 POLLWRBAND = 0x100
693 POLLWRNORM = 0x4
694)
695
696type CapRights struct {
697 Rights [2]uint64
698}
699
700type Utsname struct {
701 Sysname [256]byte
702 Nodename [256]byte
703 Release [256]byte
704 Version [256]byte
705 Machine [256]byte
706}