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