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 mips64,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 uint32 103 Pad1 [3]uint32 104 Ino uint64 105 Mode uint32 106 Nlink uint32 107 Uid uint32 108 Gid uint32 109 Rdev uint32 110 Pad2 [3]uint32 111 Size int64 112 Atim Timespec 113 Mtim Timespec 114 Ctim Timespec 115 Blksize uint32 116 Pad4 uint32 117 Blocks int64 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 [32]uint64 640 Lo uint64 641 Hi uint64 642 Epc uint64 643 Badvaddr uint64 644 Status uint64 645 Cause uint64 646} 647 648type FdSet struct { 649 Bits [16]int64 650} 651 652type Sysinfo_t struct { 653 Uptime int64 654 Loads [3]uint64 655 Totalram uint64 656 Freeram uint64 657 Sharedram uint64 658 Bufferram uint64 659 Totalswap uint64 660 Freeswap uint64 661 Procs uint16 662 Pad uint16 663 _ [4]byte 664 Totalhigh uint64 665 Freehigh uint64 666 Unit uint32 667 _ [0]int8 668 _ [4]byte 669} 670 671type Utsname struct { 672 Sysname [65]byte 673 Nodename [65]byte 674 Release [65]byte 675 Version [65]byte 676 Machine [65]byte 677 Domainname [65]byte 678} 679 680type Ustat_t struct { 681 Tfree int32 682 _ [4]byte 683 Tinode uint64 684 Fname [6]int8 685 Fpack [6]int8 686 _ [4]byte 687} 688 689type EpollEvent struct { 690 Events uint32 691 Fd int32 692 Pad int32 693} 694 695const ( 696 AT_EMPTY_PATH = 0x1000 697 AT_FDCWD = -0x64 698 AT_NO_AUTOMOUNT = 0x800 699 AT_REMOVEDIR = 0x200 700 701 AT_STATX_SYNC_AS_STAT = 0x0 702 AT_STATX_FORCE_SYNC = 0x2000 703 AT_STATX_DONT_SYNC = 0x4000 704 705 AT_SYMLINK_FOLLOW = 0x400 706 AT_SYMLINK_NOFOLLOW = 0x100 707) 708 709type PollFd struct { 710 Fd int32 711 Events int16 712 Revents int16 713} 714 715const ( 716 POLLIN = 0x1 717 POLLPRI = 0x2 718 POLLOUT = 0x4 719 POLLRDHUP = 0x2000 720 POLLERR = 0x8 721 POLLHUP = 0x10 722 POLLNVAL = 0x20 723) 724 725type Sigset_t struct { 726 Val [16]uint64 727} 728 729const RNDGETENTCNT = 0x40045200 730 731const PERF_IOC_FLAG_GROUP = 0x1 732 733type Termios struct { 734 Iflag uint32 735 Oflag uint32 736 Cflag uint32 737 Lflag uint32 738 Line uint8 739 Cc [23]uint8 740 Ispeed uint32 741 Ospeed uint32 742} 743 744type Winsize struct { 745 Row uint16 746 Col uint16 747 Xpixel uint16 748 Ypixel uint16 749} 750 751type Taskstats struct { 752 Version uint16 753 _ [2]byte 754 Ac_exitcode uint32 755 Ac_flag uint8 756 Ac_nice uint8 757 _ [6]byte 758 Cpu_count uint64 759 Cpu_delay_total uint64 760 Blkio_count uint64 761 Blkio_delay_total uint64 762 Swapin_count uint64 763 Swapin_delay_total uint64 764 Cpu_run_real_total uint64 765 Cpu_run_virtual_total uint64 766 Ac_comm [32]int8 767 Ac_sched uint8 768 Ac_pad [3]uint8 769 _ [4]byte 770 Ac_uid uint32 771 Ac_gid uint32 772 Ac_pid uint32 773 Ac_ppid uint32 774 Ac_btime uint32 775 _ [4]byte 776 Ac_etime uint64 777 Ac_utime uint64 778 Ac_stime uint64 779 Ac_minflt uint64 780 Ac_majflt uint64 781 Coremem uint64 782 Virtmem uint64 783 Hiwater_rss uint64 784 Hiwater_vm uint64 785 Read_char uint64 786 Write_char uint64 787 Read_syscalls uint64 788 Write_syscalls uint64 789 Read_bytes uint64 790 Write_bytes uint64 791 Cancelled_write_bytes uint64 792 Nvcsw uint64 793 Nivcsw uint64 794 Ac_utimescaled uint64 795 Ac_stimescaled uint64 796 Cpu_scaled_run_real_total uint64 797 Freepages_count uint64 798 Freepages_delay_total uint64 799} 800 801const ( 802 TASKSTATS_CMD_UNSPEC = 0x0 803 TASKSTATS_CMD_GET = 0x1 804 TASKSTATS_CMD_NEW = 0x2 805 TASKSTATS_TYPE_UNSPEC = 0x0 806 TASKSTATS_TYPE_PID = 0x1 807 TASKSTATS_TYPE_TGID = 0x2 808 TASKSTATS_TYPE_STATS = 0x3 809 TASKSTATS_TYPE_AGGR_PID = 0x4 810 TASKSTATS_TYPE_AGGR_TGID = 0x5 811 TASKSTATS_TYPE_NULL = 0x6 812 TASKSTATS_CMD_ATTR_UNSPEC = 0x0 813 TASKSTATS_CMD_ATTR_PID = 0x1 814 TASKSTATS_CMD_ATTR_TGID = 0x2 815 TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 816 TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 817) 818 819type CGroupStats struct { 820 Sleeping uint64 821 Running uint64 822 Stopped uint64 823 Uninterruptible uint64 824 Io_wait uint64 825} 826 827const ( 828 CGROUPSTATS_CMD_UNSPEC = 0x3 829 CGROUPSTATS_CMD_GET = 0x4 830 CGROUPSTATS_CMD_NEW = 0x5 831 CGROUPSTATS_TYPE_UNSPEC = 0x0 832 CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 833 CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 834 CGROUPSTATS_CMD_ATTR_FD = 0x1 835) 836 837type Genlmsghdr struct { 838 Cmd uint8 839 Version uint8 840 Reserved uint16 841} 842 843const ( 844 CTRL_CMD_UNSPEC = 0x0 845 CTRL_CMD_NEWFAMILY = 0x1 846 CTRL_CMD_DELFAMILY = 0x2 847 CTRL_CMD_GETFAMILY = 0x3 848 CTRL_CMD_NEWOPS = 0x4 849 CTRL_CMD_DELOPS = 0x5 850 CTRL_CMD_GETOPS = 0x6 851 CTRL_CMD_NEWMCAST_GRP = 0x7 852 CTRL_CMD_DELMCAST_GRP = 0x8 853 CTRL_CMD_GETMCAST_GRP = 0x9 854 CTRL_ATTR_UNSPEC = 0x0 855 CTRL_ATTR_FAMILY_ID = 0x1 856 CTRL_ATTR_FAMILY_NAME = 0x2 857 CTRL_ATTR_VERSION = 0x3 858 CTRL_ATTR_HDRSIZE = 0x4 859 CTRL_ATTR_MAXATTR = 0x5 860 CTRL_ATTR_OPS = 0x6 861 CTRL_ATTR_MCAST_GROUPS = 0x7 862 CTRL_ATTR_OP_UNSPEC = 0x0 863 CTRL_ATTR_OP_ID = 0x1 864 CTRL_ATTR_OP_FLAGS = 0x2 865 CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 866 CTRL_ATTR_MCAST_GRP_NAME = 0x1 867 CTRL_ATTR_MCAST_GRP_ID = 0x2 868) 869 870type cpuMask uint64 871 872const ( 873 _CPU_SETSIZE = 0x400 874 _NCPUBITS = 0x40 875) 876 877const ( 878 BDADDR_BREDR = 0x0 879 BDADDR_LE_PUBLIC = 0x1 880 BDADDR_LE_RANDOM = 0x2 881) 882 883type PerfEventAttr struct { 884 Type uint32 885 Size uint32 886 Config uint64 887 Sample uint64 888 Sample_type uint64 889 Read_format uint64 890 Bits uint64 891 Wakeup uint32 892 Bp_type uint32 893 Ext1 uint64 894 Ext2 uint64 895 Branch_sample_type uint64 896 Sample_regs_user uint64 897 Sample_stack_user uint32 898 Clockid int32 899 Sample_regs_intr uint64 900 Aux_watermark uint32 901 _ uint32 902} 903 904type PerfEventMmapPage struct { 905 Version uint32 906 Compat_version uint32 907 Lock uint32 908 Index uint32 909 Offset int64 910 Time_enabled uint64 911 Time_running uint64 912 Capabilities uint64 913 Pmc_width uint16 914 Time_shift uint16 915 Time_mult uint32 916 Time_offset uint64 917 Time_zero uint64 918 Size uint32 919 _ [948]uint8 920 Data_head uint64 921 Data_tail uint64 922 Data_offset uint64 923 Data_size uint64 924 Aux_head uint64 925 Aux_tail uint64 926 Aux_offset uint64 927 Aux_size uint64 928} 929 930const ( 931 PerfBitDisabled uint64 = CBitFieldMaskBit0 932 PerfBitInherit = CBitFieldMaskBit1 933 PerfBitPinned = CBitFieldMaskBit2 934 PerfBitExclusive = CBitFieldMaskBit3 935 PerfBitExcludeUser = CBitFieldMaskBit4 936 PerfBitExcludeKernel = CBitFieldMaskBit5 937 PerfBitExcludeHv = CBitFieldMaskBit6 938 PerfBitExcludeIdle = CBitFieldMaskBit7 939 PerfBitMmap = CBitFieldMaskBit8 940 PerfBitComm = CBitFieldMaskBit9 941 PerfBitFreq = CBitFieldMaskBit10 942 PerfBitInheritStat = CBitFieldMaskBit11 943 PerfBitEnableOnExec = CBitFieldMaskBit12 944 PerfBitTask = CBitFieldMaskBit13 945 PerfBitWatermark = CBitFieldMaskBit14 946 PerfBitPreciseIPBit1 = CBitFieldMaskBit15 947 PerfBitPreciseIPBit2 = CBitFieldMaskBit16 948 PerfBitMmapData = CBitFieldMaskBit17 949 PerfBitSampleIDAll = CBitFieldMaskBit18 950 PerfBitExcludeHost = CBitFieldMaskBit19 951 PerfBitExcludeGuest = CBitFieldMaskBit20 952 PerfBitExcludeCallchainKernel = CBitFieldMaskBit21 953 PerfBitExcludeCallchainUser = CBitFieldMaskBit22 954 PerfBitMmap2 = CBitFieldMaskBit23 955 PerfBitCommExec = CBitFieldMaskBit24 956 PerfBitUseClockID = CBitFieldMaskBit25 957 PerfBitContextSwitch = CBitFieldMaskBit26 958) 959 960const ( 961 PERF_TYPE_HARDWARE = 0x0 962 PERF_TYPE_SOFTWARE = 0x1 963 PERF_TYPE_TRACEPOINT = 0x2 964 PERF_TYPE_HW_CACHE = 0x3 965 PERF_TYPE_RAW = 0x4 966 PERF_TYPE_BREAKPOINT = 0x5 967 968 PERF_COUNT_HW_CPU_CYCLES = 0x0 969 PERF_COUNT_HW_INSTRUCTIONS = 0x1 970 PERF_COUNT_HW_CACHE_REFERENCES = 0x2 971 PERF_COUNT_HW_CACHE_MISSES = 0x3 972 PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4 973 PERF_COUNT_HW_BRANCH_MISSES = 0x5 974 PERF_COUNT_HW_BUS_CYCLES = 0x6 975 PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7 976 PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8 977 PERF_COUNT_HW_REF_CPU_CYCLES = 0x9 978 979 PERF_COUNT_HW_CACHE_L1D = 0x0 980 PERF_COUNT_HW_CACHE_L1I = 0x1 981 PERF_COUNT_HW_CACHE_LL = 0x2 982 PERF_COUNT_HW_CACHE_DTLB = 0x3 983 PERF_COUNT_HW_CACHE_ITLB = 0x4 984 PERF_COUNT_HW_CACHE_BPU = 0x5 985 PERF_COUNT_HW_CACHE_NODE = 0x6 986 987 PERF_COUNT_HW_CACHE_OP_READ = 0x0 988 PERF_COUNT_HW_CACHE_OP_WRITE = 0x1 989 PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2 990 991 PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0 992 PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1 993 994 PERF_COUNT_SW_CPU_CLOCK = 0x0 995 PERF_COUNT_SW_TASK_CLOCK = 0x1 996 PERF_COUNT_SW_PAGE_FAULTS = 0x2 997 PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3 998 PERF_COUNT_SW_CPU_MIGRATIONS = 0x4 999 PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5 1000 PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6 1001 PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7 1002 PERF_COUNT_SW_EMULATION_FAULTS = 0x8 1003 PERF_COUNT_SW_DUMMY = 0x9 1004 1005 PERF_SAMPLE_IP = 0x1 1006 PERF_SAMPLE_TID = 0x2 1007 PERF_SAMPLE_TIME = 0x4 1008 PERF_SAMPLE_ADDR = 0x8 1009 PERF_SAMPLE_READ = 0x10 1010 PERF_SAMPLE_CALLCHAIN = 0x20 1011 PERF_SAMPLE_ID = 0x40 1012 PERF_SAMPLE_CPU = 0x80 1013 PERF_SAMPLE_PERIOD = 0x100 1014 PERF_SAMPLE_STREAM_ID = 0x200 1015 PERF_SAMPLE_RAW = 0x400 1016 PERF_SAMPLE_BRANCH_STACK = 0x800 1017 1018 PERF_SAMPLE_BRANCH_USER = 0x1 1019 PERF_SAMPLE_BRANCH_KERNEL = 0x2 1020 PERF_SAMPLE_BRANCH_HV = 0x4 1021 PERF_SAMPLE_BRANCH_ANY = 0x8 1022 PERF_SAMPLE_BRANCH_ANY_CALL = 0x10 1023 PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20 1024 PERF_SAMPLE_BRANCH_IND_CALL = 0x40 1025 1026 PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1 1027 PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2 1028 PERF_FORMAT_ID = 0x4 1029 PERF_FORMAT_GROUP = 0x8 1030 1031 PERF_RECORD_MMAP = 0x1 1032 PERF_RECORD_LOST = 0x2 1033 PERF_RECORD_COMM = 0x3 1034 PERF_RECORD_EXIT = 0x4 1035 PERF_RECORD_THROTTLE = 0x5 1036 PERF_RECORD_UNTHROTTLE = 0x6 1037 PERF_RECORD_FORK = 0x7 1038 PERF_RECORD_READ = 0x8 1039 PERF_RECORD_SAMPLE = 0x9 1040 1041 PERF_CONTEXT_HV = -0x20 1042 PERF_CONTEXT_KERNEL = -0x80 1043 PERF_CONTEXT_USER = -0x200 1044 1045 PERF_CONTEXT_GUEST = -0x800 1046 PERF_CONTEXT_GUEST_KERNEL = -0x880 1047 PERF_CONTEXT_GUEST_USER = -0xa00 1048 1049 PERF_FLAG_FD_NO_GROUP = 0x1 1050 PERF_FLAG_FD_OUTPUT = 0x2 1051 PERF_FLAG_PID_CGROUP = 0x4 1052) 1053 1054const ( 1055 CBitFieldMaskBit0 = 0x8000000000000000 1056 CBitFieldMaskBit1 = 0x4000000000000000 1057 CBitFieldMaskBit2 = 0x2000000000000000 1058 CBitFieldMaskBit3 = 0x1000000000000000 1059 CBitFieldMaskBit4 = 0x800000000000000 1060 CBitFieldMaskBit5 = 0x400000000000000 1061 CBitFieldMaskBit6 = 0x200000000000000 1062 CBitFieldMaskBit7 = 0x100000000000000 1063 CBitFieldMaskBit8 = 0x80000000000000 1064 CBitFieldMaskBit9 = 0x40000000000000 1065 CBitFieldMaskBit10 = 0x20000000000000 1066 CBitFieldMaskBit11 = 0x10000000000000 1067 CBitFieldMaskBit12 = 0x8000000000000 1068 CBitFieldMaskBit13 = 0x4000000000000 1069 CBitFieldMaskBit14 = 0x2000000000000 1070 CBitFieldMaskBit15 = 0x1000000000000 1071 CBitFieldMaskBit16 = 0x800000000000 1072 CBitFieldMaskBit17 = 0x400000000000 1073 CBitFieldMaskBit18 = 0x200000000000 1074 CBitFieldMaskBit19 = 0x100000000000 1075 CBitFieldMaskBit20 = 0x80000000000 1076 CBitFieldMaskBit21 = 0x40000000000 1077 CBitFieldMaskBit22 = 0x20000000000 1078 CBitFieldMaskBit23 = 0x10000000000 1079 CBitFieldMaskBit24 = 0x8000000000 1080 CBitFieldMaskBit25 = 0x4000000000 1081 CBitFieldMaskBit26 = 0x2000000000 1082 CBitFieldMaskBit27 = 0x1000000000 1083 CBitFieldMaskBit28 = 0x800000000 1084 CBitFieldMaskBit29 = 0x400000000 1085 CBitFieldMaskBit30 = 0x200000000 1086 CBitFieldMaskBit31 = 0x100000000 1087 CBitFieldMaskBit32 = 0x80000000 1088 CBitFieldMaskBit33 = 0x40000000 1089 CBitFieldMaskBit34 = 0x20000000 1090 CBitFieldMaskBit35 = 0x10000000 1091 CBitFieldMaskBit36 = 0x8000000 1092 CBitFieldMaskBit37 = 0x4000000 1093 CBitFieldMaskBit38 = 0x2000000 1094 CBitFieldMaskBit39 = 0x1000000 1095 CBitFieldMaskBit40 = 0x800000 1096 CBitFieldMaskBit41 = 0x400000 1097 CBitFieldMaskBit42 = 0x200000 1098 CBitFieldMaskBit43 = 0x100000 1099 CBitFieldMaskBit44 = 0x80000 1100 CBitFieldMaskBit45 = 0x40000 1101 CBitFieldMaskBit46 = 0x20000 1102 CBitFieldMaskBit47 = 0x10000 1103 CBitFieldMaskBit48 = 0x8000 1104 CBitFieldMaskBit49 = 0x4000 1105 CBitFieldMaskBit50 = 0x2000 1106 CBitFieldMaskBit51 = 0x1000 1107 CBitFieldMaskBit52 = 0x800 1108 CBitFieldMaskBit53 = 0x400 1109 CBitFieldMaskBit54 = 0x200 1110 CBitFieldMaskBit55 = 0x100 1111 CBitFieldMaskBit56 = 0x80 1112 CBitFieldMaskBit57 = 0x40 1113 CBitFieldMaskBit58 = 0x20 1114 CBitFieldMaskBit59 = 0x10 1115 CBitFieldMaskBit60 = 0x8 1116 CBitFieldMaskBit61 = 0x4 1117 CBitFieldMaskBit62 = 0x2 1118 CBitFieldMaskBit63 = 0x1 1119) 1120 1121type SockaddrStorage struct { 1122 Family uint16 1123 _ [118]int8 1124 _ uint64 1125} 1126 1127type TCPMD5Sig struct { 1128 Addr SockaddrStorage 1129 Flags uint8 1130 Prefixlen uint8 1131 Keylen uint16 1132 _ uint32 1133 Key [80]uint8 1134} 1135 1136type HDDriveCmdHdr struct { 1137 Command uint8 1138 Number uint8 1139 Feature uint8 1140 Count uint8 1141} 1142 1143type HDGeometry struct { 1144 Heads uint8 1145 Sectors uint8 1146 Cylinders uint16 1147 _ [4]byte 1148 Start uint64 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 int64 1235 Bsize int64 1236 Frsize int64 1237 Blocks uint64 1238 Bfree uint64 1239 Files uint64 1240 Ffree uint64 1241 Bavail uint64 1242 Fsid Fsid 1243 Namelen int64 1244 Flags int64 1245 Spare [5]int64 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 uint64 1262 Len uint32 1263 Snaplen uint32 1264 Mac uint16 1265 Net uint16 1266 Sec uint32 1267 Usec uint32 1268 _ [4]byte 1269} 1270 1271type Tpacket2Hdr struct { 1272 Status uint32 1273 Len uint32 1274 Snaplen uint32 1275 Mac uint16 1276 Net uint16 1277 Sec uint32 1278 Nsec uint32 1279 Vlan_tci uint16 1280 Vlan_tpid uint16 1281 _ [4]uint8 1282} 1283 1284type Tpacket3Hdr struct { 1285 Next_offset uint32 1286 Sec uint32 1287 Nsec uint32 1288 Snaplen uint32 1289 Len uint32 1290 Status uint32 1291 Mac uint16 1292 Net uint16 1293 Hv1 TpacketHdrVariant1 1294 _ [8]uint8 1295} 1296 1297type TpacketHdrVariant1 struct { 1298 Rxhash uint32 1299 Vlan_tci uint32 1300 Vlan_tpid uint16 1301 _ uint16 1302} 1303 1304type TpacketBlockDesc struct { 1305 Version uint32 1306 To_priv uint32 1307 Hdr [40]byte 1308} 1309 1310type TpacketReq struct { 1311 Block_size uint32 1312 Block_nr uint32 1313 Frame_size uint32 1314 Frame_nr uint32 1315} 1316 1317type TpacketReq3 struct { 1318 Block_size uint32 1319 Block_nr uint32 1320 Frame_size uint32 1321 Frame_nr uint32 1322 Retire_blk_tov uint32 1323 Sizeof_priv uint32 1324 Feature_req_word uint32 1325} 1326 1327type TpacketStats struct { 1328 Packets uint32 1329 Drops uint32 1330} 1331 1332type TpacketStatsV3 struct { 1333 Packets uint32 1334 Drops uint32 1335 Freeze_q_cnt uint32 1336} 1337 1338type TpacketAuxdata struct { 1339 Status uint32 1340 Len uint32 1341 Snaplen uint32 1342 Mac uint16 1343 Net uint16 1344 Vlan_tci uint16 1345 Vlan_tpid uint16 1346} 1347 1348const ( 1349 TPACKET_V1 = 0x0 1350 TPACKET_V2 = 0x1 1351 TPACKET_V3 = 0x2 1352) 1353 1354const ( 1355 SizeofTpacketHdr = 0x20 1356 SizeofTpacket2Hdr = 0x20 1357 SizeofTpacket3Hdr = 0x30 1358) 1359