Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame] | 1 | // cgo -godefs -- -fsigned-char types_freebsd.go | go run mkpost.go |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2 | // Code generated by the command above; see README.md. DO NOT EDIT. |
3 | |||||
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame] | 4 | //go:build arm64 && freebsd |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 5 | // +build arm64,freebsd |
6 | |||||
7 | package unix | ||||
8 | |||||
9 | const ( | ||||
10 | SizeofPtr = 0x8 | ||||
11 | SizeofShort = 0x2 | ||||
12 | SizeofInt = 0x4 | ||||
13 | SizeofLong = 0x8 | ||||
14 | SizeofLongLong = 0x8 | ||||
15 | ) | ||||
16 | |||||
17 | type ( | ||||
18 | _C_short int16 | ||||
19 | _C_int int32 | ||||
20 | _C_long int64 | ||||
21 | _C_long_long int64 | ||||
22 | ) | ||||
23 | |||||
24 | type Timespec struct { | ||||
25 | Sec int64 | ||||
26 | Nsec int64 | ||||
27 | } | ||||
28 | |||||
29 | type Timeval struct { | ||||
30 | Sec int64 | ||||
31 | Usec int64 | ||||
32 | } | ||||
33 | |||||
kesavand | c71914f | 2022-03-25 11:19:03 +0530 | [diff] [blame] | 34 | type Time_t int64 |
35 | |||||
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 36 | type Rusage struct { |
37 | Utime Timeval | ||||
38 | Stime Timeval | ||||
39 | Maxrss int64 | ||||
40 | Ixrss int64 | ||||
41 | Idrss int64 | ||||
42 | Isrss int64 | ||||
43 | Minflt int64 | ||||
44 | Majflt int64 | ||||
45 | Nswap int64 | ||||
46 | Inblock int64 | ||||
47 | Oublock int64 | ||||
48 | Msgsnd int64 | ||||
49 | Msgrcv int64 | ||||
50 | Nsignals int64 | ||||
51 | Nvcsw int64 | ||||
52 | Nivcsw int64 | ||||
53 | } | ||||
54 | |||||
55 | type Rlimit struct { | ||||
56 | Cur int64 | ||||
57 | Max int64 | ||||
58 | } | ||||
59 | |||||
60 | type _Gid_t uint32 | ||||
61 | |||||
62 | const ( | ||||
63 | _statfsVersion = 0x20140518 | ||||
64 | _dirblksiz = 0x400 | ||||
65 | ) | ||||
66 | |||||
67 | type 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 | |||||
89 | type 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 | |||||
109 | type 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 | ||||
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame] | 129 | Fstypename [16]byte |
130 | Mntfromname [1024]byte | ||||
131 | Mntonname [1024]byte | ||||
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 132 | } |
133 | |||||
134 | type 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 | ||||
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame] | 154 | Fstypename [16]byte |
155 | Mntfromname [88]byte | ||||
156 | Mntonname [88]byte | ||||
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 157 | } |
158 | |||||
159 | type 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 | |||||
169 | type 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 | |||||
180 | type dirent_freebsd11 struct { | ||||
181 | Fileno uint32 | ||||
182 | Reclen uint16 | ||||
183 | Type uint8 | ||||
184 | Namlen uint8 | ||||
185 | Name [256]int8 | ||||
186 | } | ||||
187 | |||||
188 | type Fsid struct { | ||||
189 | Val [2]int32 | ||||
190 | } | ||||
191 | |||||
192 | const ( | ||||
193 | PathMax = 0x400 | ||||
194 | ) | ||||
195 | |||||
196 | const ( | ||||
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 | |||||
205 | type RawSockaddrInet4 struct { | ||||
206 | Len uint8 | ||||
207 | Family uint8 | ||||
208 | Port uint16 | ||||
209 | Addr [4]byte /* in_addr */ | ||||
210 | Zero [8]int8 | ||||
211 | } | ||||
212 | |||||
213 | type 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 | |||||
222 | type RawSockaddrUnix struct { | ||||
223 | Len uint8 | ||||
224 | Family uint8 | ||||
225 | Path [104]int8 | ||||
226 | } | ||||
227 | |||||
228 | type 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 | |||||
239 | type RawSockaddr struct { | ||||
240 | Len uint8 | ||||
241 | Family uint8 | ||||
242 | Data [14]int8 | ||||
243 | } | ||||
244 | |||||
245 | type RawSockaddrAny struct { | ||||
246 | Addr RawSockaddr | ||||
247 | Pad [92]int8 | ||||
248 | } | ||||
249 | |||||
250 | type _Socklen uint32 | ||||
251 | |||||
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame] | 252 | type Xucred struct { |
253 | Version uint32 | ||||
254 | Uid uint32 | ||||
255 | Ngroups int16 | ||||
256 | Groups [16]uint32 | ||||
257 | _ *byte | ||||
258 | } | ||||
259 | |||||
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 260 | type Linger struct { |
261 | Onoff int32 | ||||
262 | Linger int32 | ||||
263 | } | ||||
264 | |||||
265 | type Iovec struct { | ||||
266 | Base *byte | ||||
267 | Len uint64 | ||||
268 | } | ||||
269 | |||||
270 | type IPMreq struct { | ||||
271 | Multiaddr [4]byte /* in_addr */ | ||||
272 | Interface [4]byte /* in_addr */ | ||||
273 | } | ||||
274 | |||||
275 | type IPMreqn struct { | ||||
276 | Multiaddr [4]byte /* in_addr */ | ||||
277 | Address [4]byte /* in_addr */ | ||||
278 | Ifindex int32 | ||||
279 | } | ||||
280 | |||||
281 | type IPv6Mreq struct { | ||||
282 | Multiaddr [16]byte /* in6_addr */ | ||||
283 | Interface uint32 | ||||
284 | } | ||||
285 | |||||
286 | type Msghdr struct { | ||||
287 | Name *byte | ||||
288 | Namelen uint32 | ||||
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 289 | Iov *Iovec |
290 | Iovlen int32 | ||||
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 291 | Control *byte |
292 | Controllen uint32 | ||||
293 | Flags int32 | ||||
294 | } | ||||
295 | |||||
296 | type Cmsghdr struct { | ||||
297 | Len uint32 | ||||
298 | Level int32 | ||||
299 | Type int32 | ||||
300 | } | ||||
301 | |||||
302 | type Inet6Pktinfo struct { | ||||
303 | Addr [16]byte /* in6_addr */ | ||||
304 | Ifindex uint32 | ||||
305 | } | ||||
306 | |||||
307 | type IPv6MTUInfo struct { | ||||
308 | Addr RawSockaddrInet6 | ||||
309 | Mtu uint32 | ||||
310 | } | ||||
311 | |||||
312 | type ICMPv6Filter struct { | ||||
313 | Filt [8]uint32 | ||||
314 | } | ||||
315 | |||||
316 | const ( | ||||
317 | SizeofSockaddrInet4 = 0x10 | ||||
318 | SizeofSockaddrInet6 = 0x1c | ||||
319 | SizeofSockaddrAny = 0x6c | ||||
320 | SizeofSockaddrUnix = 0x6a | ||||
321 | SizeofSockaddrDatalink = 0x36 | ||||
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame] | 322 | SizeofXucred = 0x58 |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 323 | SizeofLinger = 0x8 |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame] | 324 | SizeofIovec = 0x10 |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 325 | SizeofIPMreq = 0x8 |
326 | SizeofIPMreqn = 0xc | ||||
327 | SizeofIPv6Mreq = 0x14 | ||||
328 | SizeofMsghdr = 0x30 | ||||
329 | SizeofCmsghdr = 0xc | ||||
330 | SizeofInet6Pktinfo = 0x14 | ||||
331 | SizeofIPv6MTUInfo = 0x20 | ||||
332 | SizeofICMPv6Filter = 0x20 | ||||
333 | ) | ||||
334 | |||||
335 | const ( | ||||
336 | PTRACE_ATTACH = 0xa | ||||
337 | PTRACE_CONT = 0x7 | ||||
338 | PTRACE_DETACH = 0xb | ||||
339 | PTRACE_GETFPREGS = 0x23 | ||||
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 340 | PTRACE_GETLWPLIST = 0xf |
341 | PTRACE_GETNUMLWPS = 0xe | ||||
342 | PTRACE_GETREGS = 0x21 | ||||
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 343 | PTRACE_IO = 0xc |
344 | PTRACE_KILL = 0x8 | ||||
345 | PTRACE_LWPEVENTS = 0x18 | ||||
346 | PTRACE_LWPINFO = 0xd | ||||
347 | PTRACE_SETFPREGS = 0x24 | ||||
348 | PTRACE_SETREGS = 0x22 | ||||
349 | PTRACE_SINGLESTEP = 0x9 | ||||
350 | PTRACE_TRACEME = 0x0 | ||||
351 | ) | ||||
352 | |||||
353 | const ( | ||||
354 | PIOD_READ_D = 0x1 | ||||
355 | PIOD_WRITE_D = 0x2 | ||||
356 | PIOD_READ_I = 0x3 | ||||
357 | PIOD_WRITE_I = 0x4 | ||||
358 | ) | ||||
359 | |||||
360 | const ( | ||||
361 | PL_FLAG_BORN = 0x100 | ||||
362 | PL_FLAG_EXITED = 0x200 | ||||
363 | PL_FLAG_SI = 0x20 | ||||
364 | ) | ||||
365 | |||||
366 | const ( | ||||
367 | TRAP_BRKPT = 0x1 | ||||
368 | TRAP_TRACE = 0x2 | ||||
369 | ) | ||||
370 | |||||
371 | type PtraceLwpInfoStruct struct { | ||||
372 | Lwpid int32 | ||||
373 | Event int32 | ||||
374 | Flags int32 | ||||
375 | Sigmask Sigset_t | ||||
376 | Siglist Sigset_t | ||||
377 | Siginfo __Siginfo | ||||
378 | Tdname [20]int8 | ||||
379 | Child_pid int32 | ||||
380 | Syscall_code uint32 | ||||
381 | Syscall_narg uint32 | ||||
382 | } | ||||
383 | |||||
384 | type __Siginfo struct { | ||||
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame] | 385 | Signo int32 |
386 | Errno int32 | ||||
387 | Code int32 | ||||
388 | Pid int32 | ||||
389 | Uid uint32 | ||||
390 | Status int32 | ||||
391 | Addr *byte | ||||
392 | Value [8]byte | ||||
393 | _ [40]byte | ||||
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 394 | } |
395 | |||||
396 | type Sigset_t struct { | ||||
397 | Val [4]uint32 | ||||
398 | } | ||||
399 | |||||
400 | type Reg struct { | ||||
401 | X [30]uint64 | ||||
402 | Lr uint64 | ||||
403 | Sp uint64 | ||||
404 | Elr uint64 | ||||
405 | Spsr uint32 | ||||
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame] | 406 | _ [4]byte |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 407 | } |
408 | |||||
409 | type FpReg struct { | ||||
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame] | 410 | Q [32][16]uint8 |
411 | Sr uint32 | ||||
412 | Cr uint32 | ||||
413 | _ [8]byte | ||||
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 414 | } |
415 | |||||
416 | type PtraceIoDesc struct { | ||||
417 | Op int32 | ||||
418 | Offs *byte | ||||
419 | Addr *byte | ||||
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame] | 420 | Len uint64 |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 421 | } |
422 | |||||
423 | type Kevent_t struct { | ||||
424 | Ident uint64 | ||||
425 | Filter int16 | ||||
426 | Flags uint16 | ||||
427 | Fflags uint32 | ||||
428 | Data int64 | ||||
429 | Udata *byte | ||||
430 | } | ||||
431 | |||||
432 | type FdSet struct { | ||||
433 | Bits [16]uint64 | ||||
434 | } | ||||
435 | |||||
436 | const ( | ||||
437 | sizeofIfMsghdr = 0xa8 | ||||
438 | SizeofIfMsghdr = 0xa8 | ||||
439 | sizeofIfData = 0x98 | ||||
440 | SizeofIfData = 0x98 | ||||
441 | SizeofIfaMsghdr = 0x14 | ||||
442 | SizeofIfmaMsghdr = 0x10 | ||||
443 | SizeofIfAnnounceMsghdr = 0x18 | ||||
444 | SizeofRtMsghdr = 0x98 | ||||
445 | SizeofRtMetrics = 0x70 | ||||
446 | ) | ||||
447 | |||||
448 | type ifMsghdr struct { | ||||
449 | Msglen uint16 | ||||
450 | Version uint8 | ||||
451 | Type uint8 | ||||
452 | Addrs int32 | ||||
453 | Flags int32 | ||||
454 | Index uint16 | ||||
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame] | 455 | _ uint16 |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 456 | Data ifData |
457 | } | ||||
458 | |||||
459 | type IfMsghdr struct { | ||||
460 | Msglen uint16 | ||||
461 | Version uint8 | ||||
462 | Type uint8 | ||||
463 | Addrs int32 | ||||
464 | Flags int32 | ||||
465 | Index uint16 | ||||
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 466 | Data IfData |
467 | } | ||||
468 | |||||
469 | type 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 | |||||
497 | type 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 uint64 | ||||
507 | Metric uint64 | ||||
508 | Baudrate uint64 | ||||
509 | Ipackets uint64 | ||||
510 | Ierrors uint64 | ||||
511 | Opackets uint64 | ||||
512 | Oerrors uint64 | ||||
513 | Collisions uint64 | ||||
514 | Ibytes uint64 | ||||
515 | Obytes uint64 | ||||
516 | Imcasts uint64 | ||||
517 | Omcasts uint64 | ||||
518 | Iqdrops uint64 | ||||
519 | Noproto uint64 | ||||
520 | Hwassist uint64 | ||||
521 | Epoch int64 | ||||
522 | Lastchange Timeval | ||||
523 | } | ||||
524 | |||||
525 | type IfaMsghdr struct { | ||||
526 | Msglen uint16 | ||||
527 | Version uint8 | ||||
528 | Type uint8 | ||||
529 | Addrs int32 | ||||
530 | Flags int32 | ||||
531 | Index uint16 | ||||
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame] | 532 | _ uint16 |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 533 | Metric int32 |
534 | } | ||||
535 | |||||
536 | type IfmaMsghdr struct { | ||||
537 | Msglen uint16 | ||||
538 | Version uint8 | ||||
539 | Type uint8 | ||||
540 | Addrs int32 | ||||
541 | Flags int32 | ||||
542 | Index uint16 | ||||
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame] | 543 | _ uint16 |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 544 | } |
545 | |||||
546 | type IfAnnounceMsghdr struct { | ||||
547 | Msglen uint16 | ||||
548 | Version uint8 | ||||
549 | Type uint8 | ||||
550 | Index uint16 | ||||
551 | Name [16]int8 | ||||
552 | What uint16 | ||||
553 | } | ||||
554 | |||||
555 | type RtMsghdr struct { | ||||
556 | Msglen uint16 | ||||
557 | Version uint8 | ||||
558 | Type uint8 | ||||
559 | Index uint16 | ||||
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame] | 560 | _ uint16 |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 561 | Flags int32 |
562 | Addrs int32 | ||||
563 | Pid int32 | ||||
564 | Seq int32 | ||||
565 | Errno int32 | ||||
566 | Fmask int32 | ||||
567 | Inits uint64 | ||||
568 | Rmx RtMetrics | ||||
569 | } | ||||
570 | |||||
571 | type RtMetrics struct { | ||||
572 | Locks uint64 | ||||
573 | Mtu uint64 | ||||
574 | Hopcount uint64 | ||||
575 | Expire uint64 | ||||
576 | Recvpipe uint64 | ||||
577 | Sendpipe uint64 | ||||
578 | Ssthresh uint64 | ||||
579 | Rtt uint64 | ||||
580 | Rttvar uint64 | ||||
581 | Pksent uint64 | ||||
582 | Weight uint64 | ||||
583 | Filler [3]uint64 | ||||
584 | } | ||||
585 | |||||
586 | const ( | ||||
587 | SizeofBpfVersion = 0x4 | ||||
588 | SizeofBpfStat = 0x8 | ||||
589 | SizeofBpfZbuf = 0x18 | ||||
590 | SizeofBpfProgram = 0x10 | ||||
591 | SizeofBpfInsn = 0x8 | ||||
592 | SizeofBpfHdr = 0x20 | ||||
593 | SizeofBpfZbufHeader = 0x20 | ||||
594 | ) | ||||
595 | |||||
596 | type BpfVersion struct { | ||||
597 | Major uint16 | ||||
598 | Minor uint16 | ||||
599 | } | ||||
600 | |||||
601 | type BpfStat struct { | ||||
602 | Recv uint32 | ||||
603 | Drop uint32 | ||||
604 | } | ||||
605 | |||||
606 | type BpfZbuf struct { | ||||
607 | Bufa *byte | ||||
608 | Bufb *byte | ||||
609 | Buflen uint64 | ||||
610 | } | ||||
611 | |||||
612 | type BpfProgram struct { | ||||
613 | Len uint32 | ||||
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 614 | Insns *BpfInsn |
615 | } | ||||
616 | |||||
617 | type BpfInsn struct { | ||||
618 | Code uint16 | ||||
619 | Jt uint8 | ||||
620 | Jf uint8 | ||||
621 | K uint32 | ||||
622 | } | ||||
623 | |||||
624 | type BpfHdr struct { | ||||
625 | Tstamp Timeval | ||||
626 | Caplen uint32 | ||||
627 | Datalen uint32 | ||||
628 | Hdrlen uint16 | ||||
629 | _ [6]byte | ||||
630 | } | ||||
631 | |||||
632 | type BpfZbufHeader struct { | ||||
633 | Kernel_gen uint32 | ||||
634 | Kernel_len uint32 | ||||
635 | User_gen uint32 | ||||
636 | _ [5]uint32 | ||||
637 | } | ||||
638 | |||||
639 | type Termios struct { | ||||
640 | Iflag uint32 | ||||
641 | Oflag uint32 | ||||
642 | Cflag uint32 | ||||
643 | Lflag uint32 | ||||
644 | Cc [20]uint8 | ||||
645 | Ispeed uint32 | ||||
646 | Ospeed uint32 | ||||
647 | } | ||||
648 | |||||
649 | type Winsize struct { | ||||
650 | Row uint16 | ||||
651 | Col uint16 | ||||
652 | Xpixel uint16 | ||||
653 | Ypixel uint16 | ||||
654 | } | ||||
655 | |||||
656 | const ( | ||||
657 | AT_FDCWD = -0x64 | ||||
kesavand | c71914f | 2022-03-25 11:19:03 +0530 | [diff] [blame] | 658 | AT_EACCESS = 0x100 |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 659 | AT_SYMLINK_NOFOLLOW = 0x200 |
kesavand | c71914f | 2022-03-25 11:19:03 +0530 | [diff] [blame] | 660 | AT_SYMLINK_FOLLOW = 0x400 |
661 | AT_REMOVEDIR = 0x800 | ||||
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 662 | ) |
663 | |||||
664 | type PollFd struct { | ||||
665 | Fd int32 | ||||
666 | Events int16 | ||||
667 | Revents int16 | ||||
668 | } | ||||
669 | |||||
670 | const ( | ||||
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 | |||||
684 | type CapRights struct { | ||||
685 | Rights [2]uint64 | ||||
686 | } | ||||
687 | |||||
688 | type Utsname struct { | ||||
689 | Sysname [256]byte | ||||
690 | Nodename [256]byte | ||||
691 | Release [256]byte | ||||
692 | Version [256]byte | ||||
693 | Machine [256]byte | ||||
694 | } | ||||
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame] | 695 | |
696 | const SizeofClockinfo = 0x14 | ||||
697 | |||||
698 | type Clockinfo struct { | ||||
699 | Hz int32 | ||||
700 | Tick int32 | ||||
701 | Spare int32 | ||||
702 | Stathz int32 | ||||
703 | Profhz int32 | ||||
704 | } |