blob: 8408af1250cbb5cc6bb611c17c16f5a2666b4bc5 [file] [log] [blame]
Ben Laurie7a4fde32017-06-29 21:26:00 +01001// cgo -godefs types_freebsd.go | go run mkpost.go
2// Code generated by the command above; see README.md. DO NOT EDIT.
3
Steven Hartland342d6a82015-09-25 09:18:27 +00004// +build amd64,freebsd
Rob Pike20acc5c2014-08-11 14:48:46 -07005
Rob Pike8442dd22014-08-11 15:58:26 -07006package unix
Rob Pike20acc5c2014-08-11 14:48:46 -07007
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 S_IFMT = 0xf000
61 S_IFIFO = 0x1000
62 S_IFCHR = 0x2000
63 S_IFDIR = 0x4000
64 S_IFBLK = 0x6000
65 S_IFREG = 0x8000
66 S_IFLNK = 0xa000
67 S_IFSOCK = 0xc000
68 S_ISUID = 0x800
69 S_ISGID = 0x400
70 S_ISVTX = 0x200
71 S_IRUSR = 0x100
72 S_IWUSR = 0x80
73 S_IXUSR = 0x40
74)
75
76type Stat_t struct {
77 Dev uint32
78 Ino uint32
79 Mode uint16
80 Nlink uint16
81 Uid uint32
82 Gid uint32
83 Rdev uint32
84 Atimespec Timespec
85 Mtimespec Timespec
86 Ctimespec Timespec
87 Size int64
88 Blocks int64
Ben Laurie7a4fde32017-06-29 21:26:00 +010089 Blksize int32
Rob Pike20acc5c2014-08-11 14:48:46 -070090 Flags uint32
91 Gen uint32
92 Lspare int32
93 Birthtimespec Timespec
94}
95
96type Statfs_t struct {
97 Version uint32
98 Type uint32
99 Flags uint64
100 Bsize uint64
101 Iosize uint64
102 Blocks uint64
103 Bfree uint64
104 Bavail int64
105 Files uint64
106 Ffree int64
107 Syncwrites uint64
108 Asyncwrites uint64
109 Syncreads uint64
110 Asyncreads uint64
111 Spare [10]uint64
112 Namemax uint32
113 Owner uint32
114 Fsid Fsid
115 Charspare [80]int8
116 Fstypename [16]int8
117 Mntfromname [88]int8
118 Mntonname [88]int8
119}
120
121type Flock_t struct {
122 Start int64
123 Len int64
124 Pid int32
125 Type int16
126 Whence int16
127 Sysid int32
128 Pad_cgo_0 [4]byte
129}
130
131type Dirent struct {
132 Fileno uint32
133 Reclen uint16
134 Type uint8
135 Namlen uint8
136 Name [256]int8
137}
138
139type Fsid struct {
140 Val [2]int32
141}
142
Steven Hartland342d6a82015-09-25 09:18:27 +0000143const (
Tobias Klauser1d2aa6d2017-12-13 12:26:59 +0100144 PathMax = 0x400
145)
146
147const (
Steven Hartland342d6a82015-09-25 09:18:27 +0000148 FADV_NORMAL = 0x0
149 FADV_RANDOM = 0x1
150 FADV_SEQUENTIAL = 0x2
151 FADV_WILLNEED = 0x3
152 FADV_DONTNEED = 0x4
153 FADV_NOREUSE = 0x5
154)
155
Rob Pike20acc5c2014-08-11 14:48:46 -0700156type RawSockaddrInet4 struct {
157 Len uint8
158 Family uint8
159 Port uint16
160 Addr [4]byte /* in_addr */
161 Zero [8]int8
162}
163
164type RawSockaddrInet6 struct {
165 Len uint8
166 Family uint8
167 Port uint16
168 Flowinfo uint32
169 Addr [16]byte /* in6_addr */
170 Scope_id uint32
171}
172
173type RawSockaddrUnix struct {
174 Len uint8
175 Family uint8
176 Path [104]int8
177}
178
179type RawSockaddrDatalink struct {
180 Len uint8
181 Family uint8
182 Index uint16
183 Type uint8
184 Nlen uint8
185 Alen uint8
186 Slen uint8
187 Data [46]int8
188}
189
190type RawSockaddr struct {
191 Len uint8
192 Family uint8
193 Data [14]int8
194}
195
196type RawSockaddrAny struct {
197 Addr RawSockaddr
198 Pad [92]int8
199}
200
201type _Socklen uint32
202
203type Linger struct {
204 Onoff int32
205 Linger int32
206}
207
208type Iovec struct {
209 Base *byte
210 Len uint64
211}
212
213type IPMreq struct {
214 Multiaddr [4]byte /* in_addr */
215 Interface [4]byte /* in_addr */
216}
217
218type IPMreqn struct {
219 Multiaddr [4]byte /* in_addr */
220 Address [4]byte /* in_addr */
221 Ifindex int32
222}
223
224type IPv6Mreq struct {
225 Multiaddr [16]byte /* in6_addr */
226 Interface uint32
227}
228
229type Msghdr struct {
230 Name *byte
231 Namelen uint32
232 Pad_cgo_0 [4]byte
233 Iov *Iovec
234 Iovlen int32
235 Pad_cgo_1 [4]byte
236 Control *byte
237 Controllen uint32
238 Flags int32
239}
240
241type Cmsghdr struct {
242 Len uint32
243 Level int32
244 Type int32
245}
246
247type Inet6Pktinfo struct {
248 Addr [16]byte /* in6_addr */
249 Ifindex uint32
250}
251
252type IPv6MTUInfo struct {
253 Addr RawSockaddrInet6
254 Mtu uint32
255}
256
257type ICMPv6Filter struct {
258 Filt [8]uint32
259}
260
261const (
262 SizeofSockaddrInet4 = 0x10
263 SizeofSockaddrInet6 = 0x1c
264 SizeofSockaddrAny = 0x6c
265 SizeofSockaddrUnix = 0x6a
266 SizeofSockaddrDatalink = 0x36
267 SizeofLinger = 0x8
268 SizeofIPMreq = 0x8
269 SizeofIPMreqn = 0xc
270 SizeofIPv6Mreq = 0x14
271 SizeofMsghdr = 0x30
272 SizeofCmsghdr = 0xc
273 SizeofInet6Pktinfo = 0x14
274 SizeofIPv6MTUInfo = 0x20
275 SizeofICMPv6Filter = 0x20
276)
277
278const (
279 PTRACE_TRACEME = 0x0
280 PTRACE_CONT = 0x7
281 PTRACE_KILL = 0x8
282)
283
284type Kevent_t struct {
285 Ident uint64
286 Filter int16
287 Flags uint16
288 Fflags uint32
289 Data int64
290 Udata *byte
291}
292
293type FdSet struct {
294 X__fds_bits [16]uint64
295}
296
297const (
298 sizeofIfMsghdr = 0xa8
299 SizeofIfMsghdr = 0xa8
300 sizeofIfData = 0x98
301 SizeofIfData = 0x98
302 SizeofIfaMsghdr = 0x14
303 SizeofIfmaMsghdr = 0x10
304 SizeofIfAnnounceMsghdr = 0x18
305 SizeofRtMsghdr = 0x98
306 SizeofRtMetrics = 0x70
307)
308
309type ifMsghdr struct {
310 Msglen uint16
311 Version uint8
312 Type uint8
313 Addrs int32
314 Flags int32
315 Index uint16
316 Pad_cgo_0 [2]byte
317 Data ifData
318}
319
320type IfMsghdr struct {
321 Msglen uint16
322 Version uint8
323 Type uint8
324 Addrs int32
325 Flags int32
326 Index uint16
327 Pad_cgo_0 [2]byte
328 Data IfData
329}
330
331type ifData struct {
Ben Laurie7a4fde32017-06-29 21:26:00 +0100332 Type uint8
333 Physical uint8
334 Addrlen uint8
335 Hdrlen uint8
336 Link_state uint8
337 Vhid uint8
338 Datalen uint16
339 Mtu uint32
340 Metric uint32
341 Baudrate uint64
342 Ipackets uint64
343 Ierrors uint64
344 Opackets uint64
345 Oerrors uint64
346 Collisions uint64
347 Ibytes uint64
348 Obytes uint64
349 Imcasts uint64
350 Omcasts uint64
351 Iqdrops uint64
352 Oqdrops uint64
353 Noproto uint64
354 Hwassist uint64
355 X__ifi_epoch [8]byte
356 X__ifi_lastchange [16]byte
Rob Pike20acc5c2014-08-11 14:48:46 -0700357}
358
359type IfData struct {
360 Type uint8
361 Physical uint8
362 Addrlen uint8
363 Hdrlen uint8
364 Link_state uint8
365 Spare_char1 uint8
366 Spare_char2 uint8
367 Datalen uint8
368 Mtu uint64
369 Metric uint64
370 Baudrate uint64
371 Ipackets uint64
372 Ierrors uint64
373 Opackets uint64
374 Oerrors uint64
375 Collisions uint64
376 Ibytes uint64
377 Obytes uint64
378 Imcasts uint64
379 Omcasts uint64
380 Iqdrops uint64
381 Noproto uint64
382 Hwassist uint64
383 Epoch int64
384 Lastchange Timeval
385}
386
387type IfaMsghdr struct {
388 Msglen uint16
389 Version uint8
390 Type uint8
391 Addrs int32
392 Flags int32
393 Index uint16
394 Pad_cgo_0 [2]byte
395 Metric int32
396}
397
398type IfmaMsghdr struct {
399 Msglen uint16
400 Version uint8
401 Type uint8
402 Addrs int32
403 Flags int32
404 Index uint16
405 Pad_cgo_0 [2]byte
406}
407
408type IfAnnounceMsghdr struct {
409 Msglen uint16
410 Version uint8
411 Type uint8
412 Index uint16
413 Name [16]int8
414 What uint16
415}
416
417type RtMsghdr struct {
418 Msglen uint16
419 Version uint8
420 Type uint8
421 Index uint16
422 Pad_cgo_0 [2]byte
423 Flags int32
424 Addrs int32
425 Pid int32
426 Seq int32
427 Errno int32
428 Fmask int32
429 Inits uint64
430 Rmx RtMetrics
431}
432
433type RtMetrics struct {
434 Locks uint64
435 Mtu uint64
436 Hopcount uint64
437 Expire uint64
438 Recvpipe uint64
439 Sendpipe uint64
440 Ssthresh uint64
441 Rtt uint64
442 Rttvar uint64
443 Pksent uint64
444 Weight uint64
445 Filler [3]uint64
446}
447
448const (
449 SizeofBpfVersion = 0x4
450 SizeofBpfStat = 0x8
451 SizeofBpfZbuf = 0x18
452 SizeofBpfProgram = 0x10
453 SizeofBpfInsn = 0x8
454 SizeofBpfHdr = 0x20
455 SizeofBpfZbufHeader = 0x20
456)
457
458type BpfVersion struct {
459 Major uint16
460 Minor uint16
461}
462
463type BpfStat struct {
464 Recv uint32
465 Drop uint32
466}
467
468type BpfZbuf struct {
469 Bufa *byte
470 Bufb *byte
471 Buflen uint64
472}
473
474type BpfProgram struct {
475 Len uint32
476 Pad_cgo_0 [4]byte
477 Insns *BpfInsn
478}
479
480type BpfInsn struct {
481 Code uint16
482 Jt uint8
483 Jf uint8
484 K uint32
485}
486
487type BpfHdr struct {
488 Tstamp Timeval
489 Caplen uint32
490 Datalen uint32
491 Hdrlen uint16
492 Pad_cgo_0 [6]byte
493}
494
495type BpfZbufHeader struct {
496 Kernel_gen uint32
497 Kernel_len uint32
498 User_gen uint32
499 X_bzh_pad [5]uint32
500}
501
502type Termios struct {
503 Iflag uint32
504 Oflag uint32
505 Cflag uint32
506 Lflag uint32
507 Cc [20]uint8
508 Ispeed uint32
509 Ospeed uint32
510}
Ben Laurie7a4fde32017-06-29 21:26:00 +0100511
Tobias Klausere3126362017-08-02 12:44:58 +0000512type Winsize struct {
513 Row uint16
514 Col uint16
515 Xpixel uint16
516 Ypixel uint16
517}
518
Tobias Klauserb8929242017-07-27 14:30:18 +0000519const (
520 AT_FDCWD = -0x64
521 AT_REMOVEDIR = 0x800
522 AT_SYMLINK_FOLLOW = 0x400
523 AT_SYMLINK_NOFOLLOW = 0x200
524)
525
Tobias Klauser92ac1122017-10-25 14:15:45 +0000526type PollFd struct {
527 Fd int32
528 Events int16
529 Revents int16
530}
531
532const (
533 POLLERR = 0x8
534 POLLHUP = 0x10
535 POLLIN = 0x1
536 POLLINIGNEOF = 0x2000
537 POLLNVAL = 0x20
538 POLLOUT = 0x4
539 POLLPRI = 0x2
540 POLLRDBAND = 0x80
541 POLLRDNORM = 0x40
542 POLLWRBAND = 0x100
543 POLLWRNORM = 0x4
544)
545
Ben Laurie7a4fde32017-06-29 21:26:00 +0100546type CapRights struct {
547 Rights [2]uint64
548}
Tobias Klauser096928d2017-11-27 08:53:11 +0000549
550type Utsname struct {
551 Sysname [256]byte
552 Nodename [256]byte
553 Release [256]byte
554 Version [256]byte
555 Machine [256]byte
556}