1// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char linux/types.go | go run mkpost.go
2// Code generated by the command above; see README.md. DO NOT EDIT.
3
4// +build arm64,linux
5
6package unix
7
8const (
9	sizeofPtr      = 0x8
10	sizeofShort    = 0x2
11	sizeofInt      = 0x4
12	sizeofLong     = 0x8
13	sizeofLongLong = 0x8
14	PathMax        = 0x1000
15)
16
17type (
18	_C_short     int16
19	_C_int       int32
20	_C_long      int64
21	_C_long_long int64
22)
23
24type Timespec struct {
25	Sec  int64
26	Nsec int64
27}
28
29type Timeval struct {
30	Sec  int64
31	Usec int64
32}
33
34type Timex struct {
35	Modes     uint32
36	_         [4]byte
37	Offset    int64
38	Freq      int64
39	Maxerror  int64
40	Esterror  int64
41	Status    int32
42	_         [4]byte
43	Constant  int64
44	Precision int64
45	Tolerance int64
46	Time      Timeval
47	Tick      int64
48	Ppsfreq   int64
49	Jitter    int64
50	Shift     int32
51	_         [4]byte
52	Stabil    int64
53	Jitcnt    int64
54	Calcnt    int64
55	Errcnt    int64
56	Stbcnt    int64
57	Tai       int32
58	_         [44]byte
59}
60
61type Time_t int64
62
63type Tms struct {
64	Utime  int64
65	Stime  int64
66	Cutime int64
67	Cstime int64
68}
69
70type Utimbuf struct {
71	Actime  int64
72	Modtime int64
73}
74
75type Rusage struct {
76	Utime    Timeval
77	Stime    Timeval
78	Maxrss   int64
79	Ixrss    int64
80	Idrss    int64
81	Isrss    int64
82	Minflt   int64
83	Majflt   int64
84	Nswap    int64
85	Inblock  int64
86	Oublock  int64
87	Msgsnd   int64
88	Msgrcv   int64
89	Nsignals int64
90	Nvcsw    int64
91	Nivcsw   int64
92}
93
94type Rlimit struct {
95	Cur uint64
96	Max uint64
97}
98
99type _Gid_t uint32
100
101type Stat_t struct {
102	Dev     uint64
103	Ino     uint64
104	Mode    uint32
105	Nlink   uint32
106	Uid     uint32
107	Gid     uint32
108	Rdev    uint64
109	_       uint64
110	Size    int64
111	Blksize int32
112	_       int32
113	Blocks  int64
114	Atim    Timespec
115	Mtim    Timespec
116	Ctim    Timespec
117	_       [2]int32
118}
119
120type StatxTimestamp struct {
121	Sec  int64
122	Nsec uint32
123	_    int32
124}
125
126type Statx_t struct {
127	Mask            uint32
128	Blksize         uint32
129	Attributes      uint64
130	Nlink           uint32
131	Uid             uint32
132	Gid             uint32
133	Mode            uint16
134	_               [1]uint16
135	Ino             uint64
136	Size            uint64
137	Blocks          uint64
138	Attributes_mask uint64
139	Atime           StatxTimestamp
140	Btime           StatxTimestamp
141	Ctime           StatxTimestamp
142	Mtime           StatxTimestamp
143	Rdev_major      uint32
144	Rdev_minor      uint32
145	Dev_major       uint32
146	Dev_minor       uint32
147	_               [14]uint64
148}
149
150type Dirent struct {
151	Ino    uint64
152	Off    int64
153	Reclen uint16
154	Type   uint8
155	Name   [256]int8
156	_      [5]byte
157}
158
159type Fsid struct {
160	Val [2]int32
161}
162
163type Flock_t struct {
164	Type   int16
165	Whence int16
166	_      [4]byte
167	Start  int64
168	Len    int64
169	Pid    int32
170	_      [4]byte
171}
172
173type FscryptPolicy struct {
174	Version                   uint8
175	Contents_encryption_mode  uint8
176	Filenames_encryption_mode uint8
177	Flags                     uint8
178	Master_key_descriptor     [8]uint8
179}
180
181type FscryptKey struct {
182	Mode uint32
183	Raw  [64]uint8
184	Size uint32
185}
186
187type KeyctlDHParams struct {
188	Private int32
189	Prime   int32
190	Base    int32
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	Family uint16
204	Port   uint16
205	Addr   [4]byte /* in_addr */
206	Zero   [8]uint8
207}
208
209type RawSockaddrInet6 struct {
210	Family   uint16
211	Port     uint16
212	Flowinfo uint32
213	Addr     [16]byte /* in6_addr */
214	Scope_id uint32
215}
216
217type RawSockaddrUnix struct {
218	Family uint16
219	Path   [108]int8
220}
221
222type RawSockaddrLinklayer struct {
223	Family   uint16
224	Protocol uint16
225	Ifindex  int32
226	Hatype   uint16
227	Pkttype  uint8
228	Halen    uint8
229	Addr     [8]uint8
230}
231
232type RawSockaddrNetlink struct {
233	Family uint16
234	Pad    uint16
235	Pid    uint32
236	Groups uint32
237}
238
239type RawSockaddrHCI struct {
240	Family  uint16
241	Dev     uint16
242	Channel uint16
243}
244
245type RawSockaddrL2 struct {
246	Family      uint16
247	Psm         uint16
248	Bdaddr      [6]uint8
249	Cid         uint16
250	Bdaddr_type uint8
251	_           [1]byte
252}
253
254type RawSockaddrCAN struct {
255	Family  uint16
256	_       [2]byte
257	Ifindex int32
258	Addr    [8]byte
259}
260
261type RawSockaddrALG struct {
262	Family uint16
263	Type   [14]uint8
264	Feat   uint32
265	Mask   uint32
266	Name   [64]uint8
267}
268
269type RawSockaddrVM struct {
270	Family    uint16
271	Reserved1 uint16
272	Port      uint32
273	Cid       uint32
274	Zero      [4]uint8
275}
276
277type RawSockaddr struct {
278	Family uint16
279	Data   [14]int8
280}
281
282type RawSockaddrAny struct {
283	Addr RawSockaddr
284	Pad  [96]int8
285}
286
287type _Socklen uint32
288
289type Linger struct {
290	Onoff  int32
291	Linger int32
292}
293
294type Iovec struct {
295	Base *byte
296	Len  uint64
297}
298
299type IPMreq struct {
300	Multiaddr [4]byte /* in_addr */
301	Interface [4]byte /* in_addr */
302}
303
304type IPMreqn struct {
305	Multiaddr [4]byte /* in_addr */
306	Address   [4]byte /* in_addr */
307	Ifindex   int32
308}
309
310type IPv6Mreq struct {
311	Multiaddr [16]byte /* in6_addr */
312	Interface uint32
313}
314
315type PacketMreq struct {
316	Ifindex int32
317	Type    uint16
318	Alen    uint16
319	Address [8]uint8
320}
321
322type Msghdr struct {
323	Name       *byte
324	Namelen    uint32
325	_          [4]byte
326	Iov        *Iovec
327	Iovlen     uint64
328	Control    *byte
329	Controllen uint64
330	Flags      int32
331	_          [4]byte
332}
333
334type Cmsghdr struct {
335	Len   uint64
336	Level int32
337	Type  int32
338}
339
340type Inet4Pktinfo struct {
341	Ifindex  int32
342	Spec_dst [4]byte /* in_addr */
343	Addr     [4]byte /* in_addr */
344}
345
346type Inet6Pktinfo struct {
347	Addr    [16]byte /* in6_addr */
348	Ifindex uint32
349}
350
351type IPv6MTUInfo struct {
352	Addr RawSockaddrInet6
353	Mtu  uint32
354}
355
356type ICMPv6Filter struct {
357	Data [8]uint32
358}
359
360type Ucred struct {
361	Pid int32
362	Uid uint32
363	Gid uint32
364}
365
366type TCPInfo struct {
367	State          uint8
368	Ca_state       uint8
369	Retransmits    uint8
370	Probes         uint8
371	Backoff        uint8
372	Options        uint8
373	_              [2]byte
374	Rto            uint32
375	Ato            uint32
376	Snd_mss        uint32
377	Rcv_mss        uint32
378	Unacked        uint32
379	Sacked         uint32
380	Lost           uint32
381	Retrans        uint32
382	Fackets        uint32
383	Last_data_sent uint32
384	Last_ack_sent  uint32
385	Last_data_recv uint32
386	Last_ack_recv  uint32
387	Pmtu           uint32
388	Rcv_ssthresh   uint32
389	Rtt            uint32
390	Rttvar         uint32
391	Snd_ssthresh   uint32
392	Snd_cwnd       uint32
393	Advmss         uint32
394	Reordering     uint32
395	Rcv_rtt        uint32
396	Rcv_space      uint32
397	Total_retrans  uint32
398}
399
400const (
401	SizeofSockaddrInet4     = 0x10
402	SizeofSockaddrInet6     = 0x1c
403	SizeofSockaddrAny       = 0x70
404	SizeofSockaddrUnix      = 0x6e
405	SizeofSockaddrLinklayer = 0x14
406	SizeofSockaddrNetlink   = 0xc
407	SizeofSockaddrHCI       = 0x6
408	SizeofSockaddrL2        = 0xe
409	SizeofSockaddrCAN       = 0x10
410	SizeofSockaddrALG       = 0x58
411	SizeofSockaddrVM        = 0x10
412	SizeofLinger            = 0x8
413	SizeofIovec             = 0x10
414	SizeofIPMreq            = 0x8
415	SizeofIPMreqn           = 0xc
416	SizeofIPv6Mreq          = 0x14
417	SizeofPacketMreq        = 0x10
418	SizeofMsghdr            = 0x38
419	SizeofCmsghdr           = 0x10
420	SizeofInet4Pktinfo      = 0xc
421	SizeofInet6Pktinfo      = 0x14
422	SizeofIPv6MTUInfo       = 0x20
423	SizeofICMPv6Filter      = 0x20
424	SizeofUcred             = 0xc
425	SizeofTCPInfo           = 0x68
426)
427
428const (
429	IFA_UNSPEC           = 0x0
430	IFA_ADDRESS          = 0x1
431	IFA_LOCAL            = 0x2
432	IFA_LABEL            = 0x3
433	IFA_BROADCAST        = 0x4
434	IFA_ANYCAST          = 0x5
435	IFA_CACHEINFO        = 0x6
436	IFA_MULTICAST        = 0x7
437	IFLA_UNSPEC          = 0x0
438	IFLA_ADDRESS         = 0x1
439	IFLA_BROADCAST       = 0x2
440	IFLA_IFNAME          = 0x3
441	IFLA_MTU             = 0x4
442	IFLA_LINK            = 0x5
443	IFLA_QDISC           = 0x6
444	IFLA_STATS           = 0x7
445	IFLA_COST            = 0x8
446	IFLA_PRIORITY        = 0x9
447	IFLA_MASTER          = 0xa
448	IFLA_WIRELESS        = 0xb
449	IFLA_PROTINFO        = 0xc
450	IFLA_TXQLEN          = 0xd
451	IFLA_MAP             = 0xe
452	IFLA_WEIGHT          = 0xf
453	IFLA_OPERSTATE       = 0x10
454	IFLA_LINKMODE        = 0x11
455	IFLA_LINKINFO        = 0x12
456	IFLA_NET_NS_PID      = 0x13
457	IFLA_IFALIAS         = 0x14
458	IFLA_NUM_VF          = 0x15
459	IFLA_VFINFO_LIST     = 0x16
460	IFLA_STATS64         = 0x17
461	IFLA_VF_PORTS        = 0x18
462	IFLA_PORT_SELF       = 0x19
463	IFLA_AF_SPEC         = 0x1a
464	IFLA_GROUP           = 0x1b
465	IFLA_NET_NS_FD       = 0x1c
466	IFLA_EXT_MASK        = 0x1d
467	IFLA_PROMISCUITY     = 0x1e
468	IFLA_NUM_TX_QUEUES   = 0x1f
469	IFLA_NUM_RX_QUEUES   = 0x20
470	IFLA_CARRIER         = 0x21
471	IFLA_PHYS_PORT_ID    = 0x22
472	IFLA_CARRIER_CHANGES = 0x23
473	IFLA_PHYS_SWITCH_ID  = 0x24
474	IFLA_LINK_NETNSID    = 0x25
475	IFLA_PHYS_PORT_NAME  = 0x26
476	IFLA_PROTO_DOWN      = 0x27
477	IFLA_GSO_MAX_SEGS    = 0x28
478	IFLA_GSO_MAX_SIZE    = 0x29
479	IFLA_PAD             = 0x2a
480	IFLA_XDP             = 0x2b
481	IFLA_EVENT           = 0x2c
482	IFLA_NEW_NETNSID     = 0x2d
483	IFLA_IF_NETNSID      = 0x2e
484	IFLA_MAX             = 0x31
485	RT_SCOPE_UNIVERSE    = 0x0
486	RT_SCOPE_SITE        = 0xc8
487	RT_SCOPE_LINK        = 0xfd
488	RT_SCOPE_HOST        = 0xfe
489	RT_SCOPE_NOWHERE     = 0xff
490	RT_TABLE_UNSPEC      = 0x0
491	RT_TABLE_COMPAT      = 0xfc
492	RT_TABLE_DEFAULT     = 0xfd
493	RT_TABLE_MAIN        = 0xfe
494	RT_TABLE_LOCAL       = 0xff
495	RT_TABLE_MAX         = 0xffffffff
496	RTA_UNSPEC           = 0x0
497	RTA_DST              = 0x1
498	RTA_SRC              = 0x2
499	RTA_IIF              = 0x3
500	RTA_OIF              = 0x4
501	RTA_GATEWAY          = 0x5
502	RTA_PRIORITY         = 0x6
503	RTA_PREFSRC          = 0x7
504	RTA_METRICS          = 0x8
505	RTA_MULTIPATH        = 0x9
506	RTA_FLOW             = 0xb
507	RTA_CACHEINFO        = 0xc
508	RTA_TABLE            = 0xf
509	RTN_UNSPEC           = 0x0
510	RTN_UNICAST          = 0x1
511	RTN_LOCAL            = 0x2
512	RTN_BROADCAST        = 0x3
513	RTN_ANYCAST          = 0x4
514	RTN_MULTICAST        = 0x5
515	RTN_BLACKHOLE        = 0x6
516	RTN_UNREACHABLE      = 0x7
517	RTN_PROHIBIT         = 0x8
518	RTN_THROW            = 0x9
519	RTN_NAT              = 0xa
520	RTN_XRESOLVE         = 0xb
521	RTNLGRP_NONE         = 0x0
522	RTNLGRP_LINK         = 0x1
523	RTNLGRP_NOTIFY       = 0x2
524	RTNLGRP_NEIGH        = 0x3
525	RTNLGRP_TC           = 0x4
526	RTNLGRP_IPV4_IFADDR  = 0x5
527	RTNLGRP_IPV4_MROUTE  = 0x6
528	RTNLGRP_IPV4_ROUTE   = 0x7
529	RTNLGRP_IPV4_RULE    = 0x8
530	RTNLGRP_IPV6_IFADDR  = 0x9
531	RTNLGRP_IPV6_MROUTE  = 0xa
532	RTNLGRP_IPV6_ROUTE   = 0xb
533	RTNLGRP_IPV6_IFINFO  = 0xc
534	RTNLGRP_IPV6_PREFIX  = 0x12
535	RTNLGRP_IPV6_RULE    = 0x13
536	RTNLGRP_ND_USEROPT   = 0x14
537	SizeofNlMsghdr       = 0x10
538	SizeofNlMsgerr       = 0x14
539	SizeofRtGenmsg       = 0x1
540	SizeofNlAttr         = 0x4
541	SizeofRtAttr         = 0x4
542	SizeofIfInfomsg      = 0x10
543	SizeofIfAddrmsg      = 0x8
544	SizeofRtMsg          = 0xc
545	SizeofRtNexthop      = 0x8
546)
547
548type NlMsghdr struct {
549	Len   uint32
550	Type  uint16
551	Flags uint16
552	Seq   uint32
553	Pid   uint32
554}
555
556type NlMsgerr struct {
557	Error int32
558	Msg   NlMsghdr
559}
560
561type RtGenmsg struct {
562	Family uint8
563}
564
565type NlAttr struct {
566	Len  uint16
567	Type uint16
568}
569
570type RtAttr struct {
571	Len  uint16
572	Type uint16
573}
574
575type IfInfomsg struct {
576	Family uint8
577	_      uint8
578	Type   uint16
579	Index  int32
580	Flags  uint32
581	Change uint32
582}
583
584type IfAddrmsg struct {
585	Family    uint8
586	Prefixlen uint8
587	Flags     uint8
588	Scope     uint8
589	Index     uint32
590}
591
592type RtMsg struct {
593	Family   uint8
594	Dst_len  uint8
595	Src_len  uint8
596	Tos      uint8
597	Table    uint8
598	Protocol uint8
599	Scope    uint8
600	Type     uint8
601	Flags    uint32
602}
603
604type RtNexthop struct {
605	Len     uint16
606	Flags   uint8
607	Hops    uint8
608	Ifindex int32
609}
610
611const (
612	SizeofSockFilter = 0x8
613	SizeofSockFprog  = 0x10
614)
615
616type SockFilter struct {
617	Code uint16
618	Jt   uint8
619	Jf   uint8
620	K    uint32
621}
622
623type SockFprog struct {
624	Len    uint16
625	_      [6]byte
626	Filter *SockFilter
627}
628
629type InotifyEvent struct {
630	Wd     int32
631	Mask   uint32
632	Cookie uint32
633	Len    uint32
634}
635
636const SizeofInotifyEvent = 0x10
637
638type PtraceRegs struct {
639	Regs   [31]uint64
640	Sp     uint64
641	Pc     uint64
642	Pstate uint64
643}
644
645type FdSet struct {
646	Bits [16]int64
647}
648
649type Sysinfo_t struct {
650	Uptime    int64
651	Loads     [3]uint64
652	Totalram  uint64
653	Freeram   uint64
654	Sharedram uint64
655	Bufferram uint64
656	Totalswap uint64
657	Freeswap  uint64
658	Procs     uint16
659	Pad       uint16
660	_         [4]byte
661	Totalhigh uint64
662	Freehigh  uint64
663	Unit      uint32
664	_         [0]int8
665	_         [4]byte
666}
667
668type Utsname struct {
669	Sysname    [65]byte
670	Nodename   [65]byte
671	Release    [65]byte
672	Version    [65]byte
673	Machine    [65]byte
674	Domainname [65]byte
675}
676
677type Ustat_t struct {
678	Tfree  int32
679	_      [4]byte
680	Tinode uint64
681	Fname  [6]int8
682	Fpack  [6]int8
683	_      [4]byte
684}
685
686type EpollEvent struct {
687	Events uint32
688	PadFd  int32
689	Fd     int32
690	Pad    int32
691}
692
693const (
694	AT_EMPTY_PATH   = 0x1000
695	AT_FDCWD        = -0x64
696	AT_NO_AUTOMOUNT = 0x800
697	AT_REMOVEDIR    = 0x200
698
699	AT_STATX_SYNC_AS_STAT = 0x0
700	AT_STATX_FORCE_SYNC   = 0x2000
701	AT_STATX_DONT_SYNC    = 0x4000
702
703	AT_SYMLINK_FOLLOW   = 0x400
704	AT_SYMLINK_NOFOLLOW = 0x100
705)
706
707type PollFd struct {
708	Fd      int32
709	Events  int16
710	Revents int16
711}
712
713const (
714	POLLIN    = 0x1
715	POLLPRI   = 0x2
716	POLLOUT   = 0x4
717	POLLRDHUP = 0x2000
718	POLLERR   = 0x8
719	POLLHUP   = 0x10
720	POLLNVAL  = 0x20
721)
722
723type Sigset_t struct {
724	Val [16]uint64
725}
726
727const RNDGETENTCNT = 0x80045200
728
729const PERF_IOC_FLAG_GROUP = 0x1
730
731type Termios struct {
732	Iflag  uint32
733	Oflag  uint32
734	Cflag  uint32
735	Lflag  uint32
736	Line   uint8
737	Cc     [19]uint8
738	Ispeed uint32
739	Ospeed uint32
740}
741
742type Winsize struct {
743	Row    uint16
744	Col    uint16
745	Xpixel uint16
746	Ypixel uint16
747}
748
749type Taskstats struct {
750	Version                   uint16
751	_                         [2]byte
752	Ac_exitcode               uint32
753	Ac_flag                   uint8
754	Ac_nice                   uint8
755	_                         [6]byte
756	Cpu_count                 uint64
757	Cpu_delay_total           uint64
758	Blkio_count               uint64
759	Blkio_delay_total         uint64
760	Swapin_count              uint64
761	Swapin_delay_total        uint64
762	Cpu_run_real_total        uint64
763	Cpu_run_virtual_total     uint64
764	Ac_comm                   [32]int8
765	Ac_sched                  uint8
766	Ac_pad                    [3]uint8
767	_                         [4]byte
768	Ac_uid                    uint32
769	Ac_gid                    uint32
770	Ac_pid                    uint32
771	Ac_ppid                   uint32
772	Ac_btime                  uint32
773	_                         [4]byte
774	Ac_etime                  uint64
775	Ac_utime                  uint64
776	Ac_stime                  uint64
777	Ac_minflt                 uint64
778	Ac_majflt                 uint64
779	Coremem                   uint64
780	Virtmem                   uint64
781	Hiwater_rss               uint64
782	Hiwater_vm                uint64
783	Read_char                 uint64
784	Write_char                uint64
785	Read_syscalls             uint64
786	Write_syscalls            uint64
787	Read_bytes                uint64
788	Write_bytes               uint64
789	Cancelled_write_bytes     uint64
790	Nvcsw                     uint64
791	Nivcsw                    uint64
792	Ac_utimescaled            uint64
793	Ac_stimescaled            uint64
794	Cpu_scaled_run_real_total uint64
795	Freepages_count           uint64
796	Freepages_delay_total     uint64
797}
798
799const (
800	TASKSTATS_CMD_UNSPEC                  = 0x0
801	TASKSTATS_CMD_GET                     = 0x1
802	TASKSTATS_CMD_NEW                     = 0x2
803	TASKSTATS_TYPE_UNSPEC                 = 0x0
804	TASKSTATS_TYPE_PID                    = 0x1
805	TASKSTATS_TYPE_TGID                   = 0x2
806	TASKSTATS_TYPE_STATS                  = 0x3
807	TASKSTATS_TYPE_AGGR_PID               = 0x4
808	TASKSTATS_TYPE_AGGR_TGID              = 0x5
809	TASKSTATS_TYPE_NULL                   = 0x6
810	TASKSTATS_CMD_ATTR_UNSPEC             = 0x0
811	TASKSTATS_CMD_ATTR_PID                = 0x1
812	TASKSTATS_CMD_ATTR_TGID               = 0x2
813	TASKSTATS_CMD_ATTR_REGISTER_CPUMASK   = 0x3
814	TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
815)
816
817type CGroupStats struct {
818	Sleeping        uint64
819	Running         uint64
820	Stopped         uint64
821	Uninterruptible uint64
822	Io_wait         uint64
823}
824
825const (
826	CGROUPSTATS_CMD_UNSPEC        = 0x3
827	CGROUPSTATS_CMD_GET           = 0x4
828	CGROUPSTATS_CMD_NEW           = 0x5
829	CGROUPSTATS_TYPE_UNSPEC       = 0x0
830	CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
831	CGROUPSTATS_CMD_ATTR_UNSPEC   = 0x0
832	CGROUPSTATS_CMD_ATTR_FD       = 0x1
833)
834
835type Genlmsghdr struct {
836	Cmd      uint8
837	Version  uint8
838	Reserved uint16
839}
840
841const (
842	CTRL_CMD_UNSPEC            = 0x0
843	CTRL_CMD_NEWFAMILY         = 0x1
844	CTRL_CMD_DELFAMILY         = 0x2
845	CTRL_CMD_GETFAMILY         = 0x3
846	CTRL_CMD_NEWOPS            = 0x4
847	CTRL_CMD_DELOPS            = 0x5
848	CTRL_CMD_GETOPS            = 0x6
849	CTRL_CMD_NEWMCAST_GRP      = 0x7
850	CTRL_CMD_DELMCAST_GRP      = 0x8
851	CTRL_CMD_GETMCAST_GRP      = 0x9
852	CTRL_ATTR_UNSPEC           = 0x0
853	CTRL_ATTR_FAMILY_ID        = 0x1
854	CTRL_ATTR_FAMILY_NAME      = 0x2
855	CTRL_ATTR_VERSION          = 0x3
856	CTRL_ATTR_HDRSIZE          = 0x4
857	CTRL_ATTR_MAXATTR          = 0x5
858	CTRL_ATTR_OPS              = 0x6
859	CTRL_ATTR_MCAST_GROUPS     = 0x7
860	CTRL_ATTR_OP_UNSPEC        = 0x0
861	CTRL_ATTR_OP_ID            = 0x1
862	CTRL_ATTR_OP_FLAGS         = 0x2
863	CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
864	CTRL_ATTR_MCAST_GRP_NAME   = 0x1
865	CTRL_ATTR_MCAST_GRP_ID     = 0x2
866)
867
868type cpuMask uint64
869
870const (
871	_CPU_SETSIZE = 0x400
872	_NCPUBITS    = 0x40
873)
874
875const (
876	BDADDR_BREDR     = 0x0
877	BDADDR_LE_PUBLIC = 0x1
878	BDADDR_LE_RANDOM = 0x2
879)
880
881type PerfEventAttr struct {
882	Type               uint32
883	Size               uint32
884	Config             uint64
885	Sample             uint64
886	Sample_type        uint64
887	Read_format        uint64
888	Bits               uint64
889	Wakeup             uint32
890	Bp_type            uint32
891	Ext1               uint64
892	Ext2               uint64
893	Branch_sample_type uint64
894	Sample_regs_user   uint64
895	Sample_stack_user  uint32
896	Clockid            int32
897	Sample_regs_intr   uint64
898	Aux_watermark      uint32
899	_                  uint32
900}
901
902type PerfEventMmapPage struct {
903	Version        uint32
904	Compat_version uint32
905	Lock           uint32
906	Index          uint32
907	Offset         int64
908	Time_enabled   uint64
909	Time_running   uint64
910	Capabilities   uint64
911	Pmc_width      uint16
912	Time_shift     uint16
913	Time_mult      uint32
914	Time_offset    uint64
915	Time_zero      uint64
916	Size           uint32
917	_              [948]uint8
918	Data_head      uint64
919	Data_tail      uint64
920	Data_offset    uint64
921	Data_size      uint64
922	Aux_head       uint64
923	Aux_tail       uint64
924	Aux_offset     uint64
925	Aux_size       uint64
926}
927
928const (
929	PerfBitDisabled               uint64 = CBitFieldMaskBit0
930	PerfBitInherit                       = CBitFieldMaskBit1
931	PerfBitPinned                        = CBitFieldMaskBit2
932	PerfBitExclusive                     = CBitFieldMaskBit3
933	PerfBitExcludeUser                   = CBitFieldMaskBit4
934	PerfBitExcludeKernel                 = CBitFieldMaskBit5
935	PerfBitExcludeHv                     = CBitFieldMaskBit6
936	PerfBitExcludeIdle                   = CBitFieldMaskBit7
937	PerfBitMmap                          = CBitFieldMaskBit8
938	PerfBitComm                          = CBitFieldMaskBit9
939	PerfBitFreq                          = CBitFieldMaskBit10
940	PerfBitInheritStat                   = CBitFieldMaskBit11
941	PerfBitEnableOnExec                  = CBitFieldMaskBit12
942	PerfBitTask                          = CBitFieldMaskBit13
943	PerfBitWatermark                     = CBitFieldMaskBit14
944	PerfBitPreciseIPBit1                 = CBitFieldMaskBit15
945	PerfBitPreciseIPBit2                 = CBitFieldMaskBit16
946	PerfBitMmapData                      = CBitFieldMaskBit17
947	PerfBitSampleIDAll                   = CBitFieldMaskBit18
948	PerfBitExcludeHost                   = CBitFieldMaskBit19
949	PerfBitExcludeGuest                  = CBitFieldMaskBit20
950	PerfBitExcludeCallchainKernel        = CBitFieldMaskBit21
951	PerfBitExcludeCallchainUser          = CBitFieldMaskBit22
952	PerfBitMmap2                         = CBitFieldMaskBit23
953	PerfBitCommExec                      = CBitFieldMaskBit24
954	PerfBitUseClockID                    = CBitFieldMaskBit25
955	PerfBitContextSwitch                 = CBitFieldMaskBit26
956)
957
958const (
959	PERF_TYPE_HARDWARE   = 0x0
960	PERF_TYPE_SOFTWARE   = 0x1
961	PERF_TYPE_TRACEPOINT = 0x2
962	PERF_TYPE_HW_CACHE   = 0x3
963	PERF_TYPE_RAW        = 0x4
964	PERF_TYPE_BREAKPOINT = 0x5
965
966	PERF_COUNT_HW_CPU_CYCLES              = 0x0
967	PERF_COUNT_HW_INSTRUCTIONS            = 0x1
968	PERF_COUNT_HW_CACHE_REFERENCES        = 0x2
969	PERF_COUNT_HW_CACHE_MISSES            = 0x3
970	PERF_COUNT_HW_BRANCH_INSTRUCTIONS     = 0x4
971	PERF_COUNT_HW_BRANCH_MISSES           = 0x5
972	PERF_COUNT_HW_BUS_CYCLES              = 0x6
973	PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
974	PERF_COUNT_HW_STALLED_CYCLES_BACKEND  = 0x8
975	PERF_COUNT_HW_REF_CPU_CYCLES          = 0x9
976
977	PERF_COUNT_HW_CACHE_L1D  = 0x0
978	PERF_COUNT_HW_CACHE_L1I  = 0x1
979	PERF_COUNT_HW_CACHE_LL   = 0x2
980	PERF_COUNT_HW_CACHE_DTLB = 0x3
981	PERF_COUNT_HW_CACHE_ITLB = 0x4
982	PERF_COUNT_HW_CACHE_BPU  = 0x5
983	PERF_COUNT_HW_CACHE_NODE = 0x6
984
985	PERF_COUNT_HW_CACHE_OP_READ     = 0x0
986	PERF_COUNT_HW_CACHE_OP_WRITE    = 0x1
987	PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
988
989	PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
990	PERF_COUNT_HW_CACHE_RESULT_MISS   = 0x1
991
992	PERF_COUNT_SW_CPU_CLOCK        = 0x0
993	PERF_COUNT_SW_TASK_CLOCK       = 0x1
994	PERF_COUNT_SW_PAGE_FAULTS      = 0x2
995	PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
996	PERF_COUNT_SW_CPU_MIGRATIONS   = 0x4
997	PERF_COUNT_SW_PAGE_FAULTS_MIN  = 0x5
998	PERF_COUNT_SW_PAGE_FAULTS_MAJ  = 0x6
999	PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
1000	PERF_COUNT_SW_EMULATION_FAULTS = 0x8
1001	PERF_COUNT_SW_DUMMY            = 0x9
1002
1003	PERF_SAMPLE_IP           = 0x1
1004	PERF_SAMPLE_TID          = 0x2
1005	PERF_SAMPLE_TIME         = 0x4
1006	PERF_SAMPLE_ADDR         = 0x8
1007	PERF_SAMPLE_READ         = 0x10
1008	PERF_SAMPLE_CALLCHAIN    = 0x20
1009	PERF_SAMPLE_ID           = 0x40
1010	PERF_SAMPLE_CPU          = 0x80
1011	PERF_SAMPLE_PERIOD       = 0x100
1012	PERF_SAMPLE_STREAM_ID    = 0x200
1013	PERF_SAMPLE_RAW          = 0x400
1014	PERF_SAMPLE_BRANCH_STACK = 0x800
1015
1016	PERF_SAMPLE_BRANCH_USER       = 0x1
1017	PERF_SAMPLE_BRANCH_KERNEL     = 0x2
1018	PERF_SAMPLE_BRANCH_HV         = 0x4
1019	PERF_SAMPLE_BRANCH_ANY        = 0x8
1020	PERF_SAMPLE_BRANCH_ANY_CALL   = 0x10
1021	PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
1022	PERF_SAMPLE_BRANCH_IND_CALL   = 0x40
1023
1024	PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
1025	PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
1026	PERF_FORMAT_ID                 = 0x4
1027	PERF_FORMAT_GROUP              = 0x8
1028
1029	PERF_RECORD_MMAP       = 0x1
1030	PERF_RECORD_LOST       = 0x2
1031	PERF_RECORD_COMM       = 0x3
1032	PERF_RECORD_EXIT       = 0x4
1033	PERF_RECORD_THROTTLE   = 0x5
1034	PERF_RECORD_UNTHROTTLE = 0x6
1035	PERF_RECORD_FORK       = 0x7
1036	PERF_RECORD_READ       = 0x8
1037	PERF_RECORD_SAMPLE     = 0x9
1038
1039	PERF_CONTEXT_HV     = -0x20
1040	PERF_CONTEXT_KERNEL = -0x80
1041	PERF_CONTEXT_USER   = -0x200
1042
1043	PERF_CONTEXT_GUEST        = -0x800
1044	PERF_CONTEXT_GUEST_KERNEL = -0x880
1045	PERF_CONTEXT_GUEST_USER   = -0xa00
1046
1047	PERF_FLAG_FD_NO_GROUP = 0x1
1048	PERF_FLAG_FD_OUTPUT   = 0x2
1049	PERF_FLAG_PID_CGROUP  = 0x4
1050)
1051
1052const (
1053	CBitFieldMaskBit0  = 0x1
1054	CBitFieldMaskBit1  = 0x2
1055	CBitFieldMaskBit2  = 0x4
1056	CBitFieldMaskBit3  = 0x8
1057	CBitFieldMaskBit4  = 0x10
1058	CBitFieldMaskBit5  = 0x20
1059	CBitFieldMaskBit6  = 0x40
1060	CBitFieldMaskBit7  = 0x80
1061	CBitFieldMaskBit8  = 0x100
1062	CBitFieldMaskBit9  = 0x200
1063	CBitFieldMaskBit10 = 0x400
1064	CBitFieldMaskBit11 = 0x800
1065	CBitFieldMaskBit12 = 0x1000
1066	CBitFieldMaskBit13 = 0x2000
1067	CBitFieldMaskBit14 = 0x4000
1068	CBitFieldMaskBit15 = 0x8000
1069	CBitFieldMaskBit16 = 0x10000
1070	CBitFieldMaskBit17 = 0x20000
1071	CBitFieldMaskBit18 = 0x40000
1072	CBitFieldMaskBit19 = 0x80000
1073	CBitFieldMaskBit20 = 0x100000
1074	CBitFieldMaskBit21 = 0x200000
1075	CBitFieldMaskBit22 = 0x400000
1076	CBitFieldMaskBit23 = 0x800000
1077	CBitFieldMaskBit24 = 0x1000000
1078	CBitFieldMaskBit25 = 0x2000000
1079	CBitFieldMaskBit26 = 0x4000000
1080	CBitFieldMaskBit27 = 0x8000000
1081	CBitFieldMaskBit28 = 0x10000000
1082	CBitFieldMaskBit29 = 0x20000000
1083	CBitFieldMaskBit30 = 0x40000000
1084	CBitFieldMaskBit31 = 0x80000000
1085	CBitFieldMaskBit32 = 0x100000000
1086	CBitFieldMaskBit33 = 0x200000000
1087	CBitFieldMaskBit34 = 0x400000000
1088	CBitFieldMaskBit35 = 0x800000000
1089	CBitFieldMaskBit36 = 0x1000000000
1090	CBitFieldMaskBit37 = 0x2000000000
1091	CBitFieldMaskBit38 = 0x4000000000
1092	CBitFieldMaskBit39 = 0x8000000000
1093	CBitFieldMaskBit40 = 0x10000000000
1094	CBitFieldMaskBit41 = 0x20000000000
1095	CBitFieldMaskBit42 = 0x40000000000
1096	CBitFieldMaskBit43 = 0x80000000000
1097	CBitFieldMaskBit44 = 0x100000000000
1098	CBitFieldMaskBit45 = 0x200000000000
1099	CBitFieldMaskBit46 = 0x400000000000
1100	CBitFieldMaskBit47 = 0x800000000000
1101	CBitFieldMaskBit48 = 0x1000000000000
1102	CBitFieldMaskBit49 = 0x2000000000000
1103	CBitFieldMaskBit50 = 0x4000000000000
1104	CBitFieldMaskBit51 = 0x8000000000000
1105	CBitFieldMaskBit52 = 0x10000000000000
1106	CBitFieldMaskBit53 = 0x20000000000000
1107	CBitFieldMaskBit54 = 0x40000000000000
1108	CBitFieldMaskBit55 = 0x80000000000000
1109	CBitFieldMaskBit56 = 0x100000000000000
1110	CBitFieldMaskBit57 = 0x200000000000000
1111	CBitFieldMaskBit58 = 0x400000000000000
1112	CBitFieldMaskBit59 = 0x800000000000000
1113	CBitFieldMaskBit60 = 0x1000000000000000
1114	CBitFieldMaskBit61 = 0x2000000000000000
1115	CBitFieldMaskBit62 = 0x4000000000000000
1116	CBitFieldMaskBit63 = 0x8000000000000000
1117)
1118
1119type SockaddrStorage struct {
1120	Family uint16
1121	_      [118]int8
1122	_      uint64
1123}
1124
1125type TCPMD5Sig struct {
1126	Addr      SockaddrStorage
1127	Flags     uint8
1128	Prefixlen uint8
1129	Keylen    uint16
1130	_         uint32
1131	Key       [80]uint8
1132}
1133
1134type HDDriveCmdHdr struct {
1135	Command uint8
1136	Number  uint8
1137	Feature uint8
1138	Count   uint8
1139}
1140
1141type HDGeometry struct {
1142	Heads     uint8
1143	Sectors   uint8
1144	Cylinders uint16
1145	_         [4]byte
1146	Start     uint64
1147}
1148
1149type HDDriveID struct {
1150	Config         uint16
1151	Cyls           uint16
1152	Reserved2      uint16
1153	Heads          uint16
1154	Track_bytes    uint16
1155	Sector_bytes   uint16
1156	Sectors        uint16
1157	Vendor0        uint16
1158	Vendor1        uint16
1159	Vendor2        uint16
1160	Serial_no      [20]uint8
1161	Buf_type       uint16
1162	Buf_size       uint16
1163	Ecc_bytes      uint16
1164	Fw_rev         [8]uint8
1165	Model          [40]uint8
1166	Max_multsect   uint8
1167	Vendor3        uint8
1168	Dword_io       uint16
1169	Vendor4        uint8
1170	Capability     uint8
1171	Reserved50     uint16
1172	Vendor5        uint8
1173	TPIO           uint8
1174	Vendor6        uint8
1175	TDMA           uint8
1176	Field_valid    uint16
1177	Cur_cyls       uint16
1178	Cur_heads      uint16
1179	Cur_sectors    uint16
1180	Cur_capacity0  uint16
1181	Cur_capacity1  uint16
1182	Multsect       uint8
1183	Multsect_valid uint8
1184	Lba_capacity   uint32
1185	Dma_1word      uint16
1186	Dma_mword      uint16
1187	Eide_pio_modes uint16
1188	Eide_dma_min   uint16
1189	Eide_dma_time  uint16
1190	Eide_pio       uint16
1191	Eide_pio_iordy uint16
1192	Words69_70     [2]uint16
1193	Words71_74     [4]uint16
1194	Queue_depth    uint16
1195	Words76_79     [4]uint16
1196	Major_rev_num  uint16
1197	Minor_rev_num  uint16
1198	Command_set_1  uint16
1199	Command_set_2  uint16
1200	Cfsse          uint16
1201	Cfs_enable_1   uint16
1202	Cfs_enable_2   uint16
1203	Csf_default    uint16
1204	Dma_ultra      uint16
1205	Trseuc         uint16
1206	TrsEuc         uint16
1207	CurAPMvalues   uint16
1208	Mprc           uint16
1209	Hw_config      uint16
1210	Acoustic       uint16
1211	Msrqs          uint16
1212	Sxfert         uint16
1213	Sal            uint16
1214	Spg            uint32
1215	Lba_capacity_2 uint64
1216	Words104_125   [22]uint16
1217	Last_lun       uint16
1218	Word127        uint16
1219	Dlf            uint16
1220	Csfo           uint16
1221	Words130_155   [26]uint16
1222	Word156        uint16
1223	Words157_159   [3]uint16
1224	Cfa_power      uint16
1225	Words161_175   [15]uint16
1226	Words176_205   [30]uint16
1227	Words206_254   [49]uint16
1228	Integrity_word uint16
1229}
1230
1231type Statfs_t struct {
1232	Type    int64
1233	Bsize   int64
1234	Blocks  uint64
1235	Bfree   uint64
1236	Bavail  uint64
1237	Files   uint64
1238	Ffree   uint64
1239	Fsid    Fsid
1240	Namelen int64
1241	Frsize  int64
1242	Flags   int64
1243	Spare   [4]int64
1244}
1245
1246const (
1247	ST_MANDLOCK    = 0x40
1248	ST_NOATIME     = 0x400
1249	ST_NODEV       = 0x4
1250	ST_NODIRATIME  = 0x800
1251	ST_NOEXEC      = 0x8
1252	ST_NOSUID      = 0x2
1253	ST_RDONLY      = 0x1
1254	ST_RELATIME    = 0x1000
1255	ST_SYNCHRONOUS = 0x10
1256)
1257
1258type TpacketHdr struct {
1259	Status  uint64
1260	Len     uint32
1261	Snaplen uint32
1262	Mac     uint16
1263	Net     uint16
1264	Sec     uint32
1265	Usec    uint32
1266	_       [4]byte
1267}
1268
1269type Tpacket2Hdr struct {
1270	Status    uint32
1271	Len       uint32
1272	Snaplen   uint32
1273	Mac       uint16
1274	Net       uint16
1275	Sec       uint32
1276	Nsec      uint32
1277	Vlan_tci  uint16
1278	Vlan_tpid uint16
1279	_         [4]uint8
1280}
1281
1282type Tpacket3Hdr struct {
1283	Next_offset uint32
1284	Sec         uint32
1285	Nsec        uint32
1286	Snaplen     uint32
1287	Len         uint32
1288	Status      uint32
1289	Mac         uint16
1290	Net         uint16
1291	Hv1         TpacketHdrVariant1
1292	_           [8]uint8
1293}
1294
1295type TpacketHdrVariant1 struct {
1296	Rxhash    uint32
1297	Vlan_tci  uint32
1298	Vlan_tpid uint16
1299	_         uint16
1300}
1301
1302type TpacketBlockDesc struct {
1303	Version uint32
1304	To_priv uint32
1305	Hdr     [40]byte
1306}
1307
1308type TpacketReq struct {
1309	Block_size uint32
1310	Block_nr   uint32
1311	Frame_size uint32
1312	Frame_nr   uint32
1313}
1314
1315type TpacketReq3 struct {
1316	Block_size       uint32
1317	Block_nr         uint32
1318	Frame_size       uint32
1319	Frame_nr         uint32
1320	Retire_blk_tov   uint32
1321	Sizeof_priv      uint32
1322	Feature_req_word uint32
1323}
1324
1325type TpacketStats struct {
1326	Packets uint32
1327	Drops   uint32
1328}
1329
1330type TpacketStatsV3 struct {
1331	Packets      uint32
1332	Drops        uint32
1333	Freeze_q_cnt uint32
1334}
1335
1336type TpacketAuxdata struct {
1337	Status    uint32
1338	Len       uint32
1339	Snaplen   uint32
1340	Mac       uint16
1341	Net       uint16
1342	Vlan_tci  uint16
1343	Vlan_tpid uint16
1344}
1345
1346const (
1347	TPACKET_V1 = 0x0
1348	TPACKET_V2 = 0x1
1349	TPACKET_V3 = 0x2
1350)
1351
1352const (
1353	SizeofTpacketHdr  = 0x20
1354	SizeofTpacket2Hdr = 0x20
1355	SizeofTpacket3Hdr = 0x30
1356)
1357