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