...
1
2
3
4
5
6
7 package unix
8
9 const (
10 SizeofPtr = 0x8
11 SizeofLong = 0x8
12 )
13
14 type (
15 _C_long int64
16 )
17
18 type Timespec struct {
19 Sec int64
20 Nsec int64
21 }
22
23 type Timeval struct {
24 Sec int64
25 Usec int64
26 }
27
28 type Timex struct {
29 Modes uint32
30 Offset int64
31 Freq int64
32 Maxerror int64
33 Esterror int64
34 Status int32
35 Constant int64
36 Precision int64
37 Tolerance int64
38 Time Timeval
39 Tick int64
40 Ppsfreq int64
41 Jitter int64
42 Shift int32
43 Stabil int64
44 Jitcnt int64
45 Calcnt int64
46 Errcnt int64
47 Stbcnt int64
48 Tai int32
49 _ [44]byte
50 }
51
52 type Time_t int64
53
54 type Tms struct {
55 Utime int64
56 Stime int64
57 Cutime int64
58 Cstime int64
59 }
60
61 type Utimbuf struct {
62 Actime int64
63 Modtime int64
64 }
65
66 type Rusage struct {
67 Utime Timeval
68 Stime Timeval
69 Maxrss int64
70 Ixrss int64
71 Idrss int64
72 Isrss int64
73 Minflt int64
74 Majflt int64
75 Nswap int64
76 Inblock int64
77 Oublock int64
78 Msgsnd int64
79 Msgrcv int64
80 Nsignals int64
81 Nvcsw int64
82 Nivcsw int64
83 }
84
85 type Stat_t struct {
86 Dev uint64
87 Ino uint64
88 Nlink uint64
89 Mode uint32
90 Uid uint32
91 Gid uint32
92 _ int32
93 Rdev uint64
94 Size int64
95 Blksize int64
96 Blocks int64
97 Atim Timespec
98 Mtim Timespec
99 Ctim Timespec
100 _ [3]int64
101 }
102
103 type Dirent struct {
104 Ino uint64
105 Off int64
106 Reclen uint16
107 Type uint8
108 Name [256]int8
109 _ [5]byte
110 }
111
112 type Flock_t struct {
113 Type int16
114 Whence int16
115 Start int64
116 Len int64
117 Pid int32
118 _ [4]byte
119 }
120
121 type DmNameList struct {
122 Dev uint64
123 Next uint32
124 Name [0]byte
125 _ [4]byte
126 }
127
128 const (
129 FADV_DONTNEED = 0x4
130 FADV_NOREUSE = 0x5
131 )
132
133 type RawSockaddrNFCLLCP struct {
134 Sa_family uint16
135 Dev_idx uint32
136 Target_idx uint32
137 Nfc_protocol uint32
138 Dsap uint8
139 Ssap uint8
140 Service_name [63]uint8
141 Service_name_len uint64
142 }
143
144 type RawSockaddr struct {
145 Family uint16
146 Data [14]int8
147 }
148
149 type RawSockaddrAny struct {
150 Addr RawSockaddr
151 Pad [96]int8
152 }
153
154 type Iovec struct {
155 Base *byte
156 Len uint64
157 }
158
159 type Msghdr struct {
160 Name *byte
161 Namelen uint32
162 Iov *Iovec
163 Iovlen uint64
164 Control *byte
165 Controllen uint64
166 Flags int32
167 _ [4]byte
168 }
169
170 type Cmsghdr struct {
171 Len uint64
172 Level int32
173 Type int32
174 }
175
176 type ifreq struct {
177 Ifrn [16]byte
178 Ifru [24]byte
179 }
180
181 const (
182 SizeofSockaddrNFCLLCP = 0x60
183 SizeofIovec = 0x10
184 SizeofMsghdr = 0x38
185 SizeofCmsghdr = 0x10
186 )
187
188 const (
189 SizeofSockFprog = 0x10
190 )
191
192 type PtraceRegs struct {
193 R15 uint64
194 R14 uint64
195 R13 uint64
196 R12 uint64
197 Rbp uint64
198 Rbx uint64
199 R11 uint64
200 R10 uint64
201 R9 uint64
202 R8 uint64
203 Rax uint64
204 Rcx uint64
205 Rdx uint64
206 Rsi uint64
207 Rdi uint64
208 Orig_rax uint64
209 Rip uint64
210 Cs uint64
211 Eflags uint64
212 Rsp uint64
213 Ss uint64
214 Fs_base uint64
215 Gs_base uint64
216 Ds uint64
217 Es uint64
218 Fs uint64
219 Gs uint64
220 }
221
222 type FdSet struct {
223 Bits [16]int64
224 }
225
226 type Sysinfo_t struct {
227 Uptime int64
228 Loads [3]uint64
229 Totalram uint64
230 Freeram uint64
231 Sharedram uint64
232 Bufferram uint64
233 Totalswap uint64
234 Freeswap uint64
235 Procs uint16
236 Pad uint16
237 Totalhigh uint64
238 Freehigh uint64
239 Unit uint32
240 _ [0]int8
241 _ [4]byte
242 }
243
244 type Ustat_t struct {
245 Tfree int32
246 Tinode uint64
247 Fname [6]int8
248 Fpack [6]int8
249 _ [4]byte
250 }
251
252 type EpollEvent struct {
253 Events uint32
254 Fd int32
255 Pad int32
256 }
257
258 const (
259 OPEN_TREE_CLOEXEC = 0x80000
260 )
261
262 const (
263 POLLRDHUP = 0x2000
264 )
265
266 type Sigset_t struct {
267 Val [16]uint64
268 }
269
270 const _C__NSIG = 0x41
271
272 const (
273 SIG_BLOCK = 0x0
274 SIG_UNBLOCK = 0x1
275 SIG_SETMASK = 0x2
276 )
277
278 type Siginfo struct {
279 Signo int32
280 Errno int32
281 Code int32
282 _ int32
283 _ [112]byte
284 }
285
286 type Termios struct {
287 Iflag uint32
288 Oflag uint32
289 Cflag uint32
290 Lflag uint32
291 Line uint8
292 Cc [19]uint8
293 Ispeed uint32
294 Ospeed uint32
295 }
296
297 type Taskstats struct {
298 Version uint16
299 Ac_exitcode uint32
300 Ac_flag uint8
301 Ac_nice uint8
302 Cpu_count uint64
303 Cpu_delay_total uint64
304 Blkio_count uint64
305 Blkio_delay_total uint64
306 Swapin_count uint64
307 Swapin_delay_total uint64
308 Cpu_run_real_total uint64
309 Cpu_run_virtual_total uint64
310 Ac_comm [32]int8
311 Ac_sched uint8
312 Ac_pad [3]uint8
313 _ [4]byte
314 Ac_uid uint32
315 Ac_gid uint32
316 Ac_pid uint32
317 Ac_ppid uint32
318 Ac_btime uint32
319 Ac_etime uint64
320 Ac_utime uint64
321 Ac_stime uint64
322 Ac_minflt uint64
323 Ac_majflt uint64
324 Coremem uint64
325 Virtmem uint64
326 Hiwater_rss uint64
327 Hiwater_vm uint64
328 Read_char uint64
329 Write_char uint64
330 Read_syscalls uint64
331 Write_syscalls uint64
332 Read_bytes uint64
333 Write_bytes uint64
334 Cancelled_write_bytes uint64
335 Nvcsw uint64
336 Nivcsw uint64
337 Ac_utimescaled uint64
338 Ac_stimescaled uint64
339 Cpu_scaled_run_real_total uint64
340 Freepages_count uint64
341 Freepages_delay_total uint64
342 Thrashing_count uint64
343 Thrashing_delay_total uint64
344 Ac_btime64 uint64
345 Compact_count uint64
346 Compact_delay_total uint64
347 Ac_tgid uint32
348 Ac_tgetime uint64
349 Ac_exe_dev uint64
350 Ac_exe_inode uint64
351 Wpcopy_count uint64
352 Wpcopy_delay_total uint64
353 }
354
355 type cpuMask uint64
356
357 const (
358 _NCPUBITS = 0x40
359 )
360
361 const (
362 CBitFieldMaskBit0 = 0x1
363 CBitFieldMaskBit1 = 0x2
364 CBitFieldMaskBit2 = 0x4
365 CBitFieldMaskBit3 = 0x8
366 CBitFieldMaskBit4 = 0x10
367 CBitFieldMaskBit5 = 0x20
368 CBitFieldMaskBit6 = 0x40
369 CBitFieldMaskBit7 = 0x80
370 CBitFieldMaskBit8 = 0x100
371 CBitFieldMaskBit9 = 0x200
372 CBitFieldMaskBit10 = 0x400
373 CBitFieldMaskBit11 = 0x800
374 CBitFieldMaskBit12 = 0x1000
375 CBitFieldMaskBit13 = 0x2000
376 CBitFieldMaskBit14 = 0x4000
377 CBitFieldMaskBit15 = 0x8000
378 CBitFieldMaskBit16 = 0x10000
379 CBitFieldMaskBit17 = 0x20000
380 CBitFieldMaskBit18 = 0x40000
381 CBitFieldMaskBit19 = 0x80000
382 CBitFieldMaskBit20 = 0x100000
383 CBitFieldMaskBit21 = 0x200000
384 CBitFieldMaskBit22 = 0x400000
385 CBitFieldMaskBit23 = 0x800000
386 CBitFieldMaskBit24 = 0x1000000
387 CBitFieldMaskBit25 = 0x2000000
388 CBitFieldMaskBit26 = 0x4000000
389 CBitFieldMaskBit27 = 0x8000000
390 CBitFieldMaskBit28 = 0x10000000
391 CBitFieldMaskBit29 = 0x20000000
392 CBitFieldMaskBit30 = 0x40000000
393 CBitFieldMaskBit31 = 0x80000000
394 CBitFieldMaskBit32 = 0x100000000
395 CBitFieldMaskBit33 = 0x200000000
396 CBitFieldMaskBit34 = 0x400000000
397 CBitFieldMaskBit35 = 0x800000000
398 CBitFieldMaskBit36 = 0x1000000000
399 CBitFieldMaskBit37 = 0x2000000000
400 CBitFieldMaskBit38 = 0x4000000000
401 CBitFieldMaskBit39 = 0x8000000000
402 CBitFieldMaskBit40 = 0x10000000000
403 CBitFieldMaskBit41 = 0x20000000000
404 CBitFieldMaskBit42 = 0x40000000000
405 CBitFieldMaskBit43 = 0x80000000000
406 CBitFieldMaskBit44 = 0x100000000000
407 CBitFieldMaskBit45 = 0x200000000000
408 CBitFieldMaskBit46 = 0x400000000000
409 CBitFieldMaskBit47 = 0x800000000000
410 CBitFieldMaskBit48 = 0x1000000000000
411 CBitFieldMaskBit49 = 0x2000000000000
412 CBitFieldMaskBit50 = 0x4000000000000
413 CBitFieldMaskBit51 = 0x8000000000000
414 CBitFieldMaskBit52 = 0x10000000000000
415 CBitFieldMaskBit53 = 0x20000000000000
416 CBitFieldMaskBit54 = 0x40000000000000
417 CBitFieldMaskBit55 = 0x80000000000000
418 CBitFieldMaskBit56 = 0x100000000000000
419 CBitFieldMaskBit57 = 0x200000000000000
420 CBitFieldMaskBit58 = 0x400000000000000
421 CBitFieldMaskBit59 = 0x800000000000000
422 CBitFieldMaskBit60 = 0x1000000000000000
423 CBitFieldMaskBit61 = 0x2000000000000000
424 CBitFieldMaskBit62 = 0x4000000000000000
425 CBitFieldMaskBit63 = 0x8000000000000000
426 )
427
428 type SockaddrStorage struct {
429 Family uint16
430 _ [118]int8
431 _ uint64
432 }
433
434 type HDGeometry struct {
435 Heads uint8
436 Sectors uint8
437 Cylinders uint16
438 Start uint64
439 }
440
441 type Statfs_t struct {
442 Type int64
443 Bsize int64
444 Blocks uint64
445 Bfree uint64
446 Bavail uint64
447 Files uint64
448 Ffree uint64
449 Fsid Fsid
450 Namelen int64
451 Frsize int64
452 Flags int64
453 Spare [4]int64
454 }
455
456 type TpacketHdr struct {
457 Status uint64
458 Len uint32
459 Snaplen uint32
460 Mac uint16
461 Net uint16
462 Sec uint32
463 Usec uint32
464 _ [4]byte
465 }
466
467 const (
468 SizeofTpacketHdr = 0x20
469 )
470
471 type RTCPLLInfo struct {
472 Ctrl int32
473 Value int32
474 Max int32
475 Min int32
476 Posmult int32
477 Negmult int32
478 Clock int64
479 }
480
481 type BlkpgPartition struct {
482 Start int64
483 Length int64
484 Pno int32
485 Devname [64]uint8
486 Volname [64]uint8
487 _ [4]byte
488 }
489
490 const (
491 BLKPG = 0x1269
492 )
493
494 type XDPUmemReg struct {
495 Addr uint64
496 Len uint64
497 Size uint32
498 Headroom uint32
499 Flags uint32
500 _ [4]byte
501 }
502
503 type CryptoUserAlg struct {
504 Name [64]int8
505 Driver_name [64]int8
506 Module_name [64]int8
507 Type uint32
508 Mask uint32
509 Refcnt uint32
510 Flags uint32
511 }
512
513 type CryptoStatAEAD struct {
514 Type [64]int8
515 Encrypt_cnt uint64
516 Encrypt_tlen uint64
517 Decrypt_cnt uint64
518 Decrypt_tlen uint64
519 Err_cnt uint64
520 }
521
522 type CryptoStatAKCipher struct {
523 Type [64]int8
524 Encrypt_cnt uint64
525 Encrypt_tlen uint64
526 Decrypt_cnt uint64
527 Decrypt_tlen uint64
528 Verify_cnt uint64
529 Sign_cnt uint64
530 Err_cnt uint64
531 }
532
533 type CryptoStatCipher struct {
534 Type [64]int8
535 Encrypt_cnt uint64
536 Encrypt_tlen uint64
537 Decrypt_cnt uint64
538 Decrypt_tlen uint64
539 Err_cnt uint64
540 }
541
542 type CryptoStatCompress struct {
543 Type [64]int8
544 Compress_cnt uint64
545 Compress_tlen uint64
546 Decompress_cnt uint64
547 Decompress_tlen uint64
548 Err_cnt uint64
549 }
550
551 type CryptoStatHash struct {
552 Type [64]int8
553 Hash_cnt uint64
554 Hash_tlen uint64
555 Err_cnt uint64
556 }
557
558 type CryptoStatKPP struct {
559 Type [64]int8
560 Setsecret_cnt uint64
561 Generate_public_key_cnt uint64
562 Compute_shared_secret_cnt uint64
563 Err_cnt uint64
564 }
565
566 type CryptoStatRNG struct {
567 Type [64]int8
568 Generate_cnt uint64
569 Generate_tlen uint64
570 Seed_cnt uint64
571 Err_cnt uint64
572 }
573
574 type CryptoStatLarval struct {
575 Type [64]int8
576 }
577
578 type CryptoReportLarval struct {
579 Type [64]int8
580 }
581
582 type CryptoReportHash struct {
583 Type [64]int8
584 Blocksize uint32
585 Digestsize uint32
586 }
587
588 type CryptoReportCipher struct {
589 Type [64]int8
590 Blocksize uint32
591 Min_keysize uint32
592 Max_keysize uint32
593 }
594
595 type CryptoReportBlkCipher struct {
596 Type [64]int8
597 Geniv [64]int8
598 Blocksize uint32
599 Min_keysize uint32
600 Max_keysize uint32
601 Ivsize uint32
602 }
603
604 type CryptoReportAEAD struct {
605 Type [64]int8
606 Geniv [64]int8
607 Blocksize uint32
608 Maxauthsize uint32
609 Ivsize uint32
610 }
611
612 type CryptoReportComp struct {
613 Type [64]int8
614 }
615
616 type CryptoReportRNG struct {
617 Type [64]int8
618 Seedsize uint32
619 }
620
621 type CryptoReportAKCipher struct {
622 Type [64]int8
623 }
624
625 type CryptoReportKPP struct {
626 Type [64]int8
627 }
628
629 type CryptoReportAcomp struct {
630 Type [64]int8
631 }
632
633 type LoopInfo struct {
634 Number int32
635 Device uint64
636 Inode uint64
637 Rdevice uint64
638 Offset int32
639 Encrypt_type int32
640 Encrypt_key_size int32
641 Flags int32
642 Name [64]int8
643 Encrypt_key [32]uint8
644 Init [2]uint64
645 Reserved [4]int8
646 _ [4]byte
647 }
648
649 type TIPCSubscr struct {
650 Seq TIPCServiceRange
651 Timeout uint32
652 Filter uint32
653 Handle [8]int8
654 }
655
656 type TIPCSIOCLNReq struct {
657 Peer uint32
658 Id uint32
659 Linkname [68]int8
660 }
661
662 type TIPCSIOCNodeIDReq struct {
663 Peer uint32
664 Id [16]int8
665 }
666
667 type PPSKInfo struct {
668 Assert_sequence uint32
669 Clear_sequence uint32
670 Assert_tu PPSKTime
671 Clear_tu PPSKTime
672 Current_mode int32
673 _ [4]byte
674 }
675
676 const (
677 PPS_GETPARAMS = 0x800870a1
678 PPS_SETPARAMS = 0x400870a2
679 PPS_GETCAP = 0x800870a3
680 PPS_FETCH = 0xc00870a4
681 )
682
683 const (
684 PIDFD_NONBLOCK = 0x800
685 )
686
687 type SysvIpcPerm struct {
688 Key int32
689 Uid uint32
690 Gid uint32
691 Cuid uint32
692 Cgid uint32
693 Mode uint32
694 _ [0]uint8
695 Seq uint16
696 _ uint16
697 _ uint64
698 _ uint64
699 }
700 type SysvShmDesc struct {
701 Perm SysvIpcPerm
702 Segsz uint64
703 Atime int64
704 Dtime int64
705 Ctime int64
706 Cpid int32
707 Lpid int32
708 Nattch uint64
709 _ uint64
710 _ uint64
711 }
712
View as plain text