Matthias Andreas Benkard | 832a54e | 2019-01-29 09:27:38 +0100 | [diff] [blame^] | 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 | |
| 6 | package unix |
| 7 | |
| 8 | const ( |
| 9 | sizeofPtr = 0x4 |
| 10 | sizeofShort = 0x2 |
| 11 | sizeofInt = 0x4 |
| 12 | sizeofLong = 0x4 |
| 13 | sizeofLongLong = 0x8 |
| 14 | PathMax = 0x1000 |
| 15 | ) |
| 16 | |
| 17 | type ( |
| 18 | _C_short int16 |
| 19 | _C_int int32 |
| 20 | _C_long int32 |
| 21 | _C_long_long int64 |
| 22 | ) |
| 23 | |
| 24 | type Timespec struct { |
| 25 | Sec int32 |
| 26 | Nsec int32 |
| 27 | } |
| 28 | |
| 29 | type Timeval struct { |
| 30 | Sec int32 |
| 31 | Usec int32 |
| 32 | } |
| 33 | |
| 34 | type 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 | |
| 58 | type Time_t int32 |
| 59 | |
| 60 | type Tms struct { |
| 61 | Utime int32 |
| 62 | Stime int32 |
| 63 | Cutime int32 |
| 64 | Cstime int32 |
| 65 | } |
| 66 | |
| 67 | type Utimbuf struct { |
| 68 | Actime int32 |
| 69 | Modtime int32 |
| 70 | } |
| 71 | |
| 72 | type 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 | |
| 91 | type Rlimit struct { |
| 92 | Cur uint64 |
| 93 | Max uint64 |
| 94 | } |
| 95 | |
| 96 | type _Gid_t uint32 |
| 97 | |
| 98 | type 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 | |
| 120 | type StatxTimestamp struct { |
| 121 | Sec int64 |
| 122 | Nsec uint32 |
| 123 | _ int32 |
| 124 | } |
| 125 | |
| 126 | type 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 | |
| 150 | type Dirent struct { |
| 151 | Ino uint64 |
| 152 | Off int64 |
| 153 | Reclen uint16 |
| 154 | Type uint8 |
| 155 | Name [256]uint8 |
| 156 | _ [5]byte |
| 157 | } |
| 158 | |
| 159 | type Fsid struct { |
| 160 | Val [2]int32 |
| 161 | } |
| 162 | |
| 163 | type 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 | |
| 173 | type 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 | |
| 181 | type FscryptKey struct { |
| 182 | Mode uint32 |
| 183 | Raw [64]uint8 |
| 184 | Size uint32 |
| 185 | } |
| 186 | |
| 187 | type KeyctlDHParams struct { |
| 188 | Private int32 |
| 189 | Prime int32 |
| 190 | Base int32 |
| 191 | } |
| 192 | |
| 193 | const ( |
| 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 | |
| 202 | type RawSockaddrInet4 struct { |
| 203 | Family uint16 |
| 204 | Port uint16 |
| 205 | Addr [4]byte /* in_addr */ |
| 206 | Zero [8]uint8 |
| 207 | } |
| 208 | |
| 209 | type RawSockaddrInet6 struct { |
| 210 | Family uint16 |
| 211 | Port uint16 |
| 212 | Flowinfo uint32 |
| 213 | Addr [16]byte /* in6_addr */ |
| 214 | Scope_id uint32 |
| 215 | } |
| 216 | |
| 217 | type RawSockaddrUnix struct { |
| 218 | Family uint16 |
| 219 | Path [108]int8 |
| 220 | } |
| 221 | |
| 222 | type 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 | |
| 232 | type RawSockaddrNetlink struct { |
| 233 | Family uint16 |
| 234 | Pad uint16 |
| 235 | Pid uint32 |
| 236 | Groups uint32 |
| 237 | } |
| 238 | |
| 239 | type RawSockaddrHCI struct { |
| 240 | Family uint16 |
| 241 | Dev uint16 |
| 242 | Channel uint16 |
| 243 | } |
| 244 | |
| 245 | type RawSockaddrL2 struct { |
| 246 | Family uint16 |
| 247 | Psm uint16 |
| 248 | Bdaddr [6]uint8 |
| 249 | Cid uint16 |
| 250 | Bdaddr_type uint8 |
| 251 | _ [1]byte |
| 252 | } |
| 253 | |
| 254 | type RawSockaddrCAN struct { |
| 255 | Family uint16 |
| 256 | _ [2]byte |
| 257 | Ifindex int32 |
| 258 | Addr [8]byte |
| 259 | } |
| 260 | |
| 261 | type RawSockaddrALG struct { |
| 262 | Family uint16 |
| 263 | Type [14]uint8 |
| 264 | Feat uint32 |
| 265 | Mask uint32 |
| 266 | Name [64]uint8 |
| 267 | } |
| 268 | |
| 269 | type RawSockaddrVM struct { |
| 270 | Family uint16 |
| 271 | Reserved1 uint16 |
| 272 | Port uint32 |
| 273 | Cid uint32 |
| 274 | Zero [4]uint8 |
| 275 | } |
| 276 | |
| 277 | type RawSockaddr struct { |
| 278 | Family uint16 |
| 279 | Data [14]uint8 |
| 280 | } |
| 281 | |
| 282 | type RawSockaddrAny struct { |
| 283 | Addr RawSockaddr |
| 284 | Pad [96]uint8 |
| 285 | } |
| 286 | |
| 287 | type _Socklen uint32 |
| 288 | |
| 289 | type Linger struct { |
| 290 | Onoff int32 |
| 291 | Linger int32 |
| 292 | } |
| 293 | |
| 294 | type Iovec struct { |
| 295 | Base *byte |
| 296 | Len uint32 |
| 297 | } |
| 298 | |
| 299 | type IPMreq struct { |
| 300 | Multiaddr [4]byte /* in_addr */ |
| 301 | Interface [4]byte /* in_addr */ |
| 302 | } |
| 303 | |
| 304 | type IPMreqn struct { |
| 305 | Multiaddr [4]byte /* in_addr */ |
| 306 | Address [4]byte /* in_addr */ |
| 307 | Ifindex int32 |
| 308 | } |
| 309 | |
| 310 | type IPv6Mreq struct { |
| 311 | Multiaddr [16]byte /* in6_addr */ |
| 312 | Interface uint32 |
| 313 | } |
| 314 | |
| 315 | type PacketMreq struct { |
| 316 | Ifindex int32 |
| 317 | Type uint16 |
| 318 | Alen uint16 |
| 319 | Address [8]uint8 |
| 320 | } |
| 321 | |
| 322 | type 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 | |
| 332 | type Cmsghdr struct { |
| 333 | Len uint32 |
| 334 | Level int32 |
| 335 | Type int32 |
| 336 | } |
| 337 | |
| 338 | type Inet4Pktinfo struct { |
| 339 | Ifindex int32 |
| 340 | Spec_dst [4]byte /* in_addr */ |
| 341 | Addr [4]byte /* in_addr */ |
| 342 | } |
| 343 | |
| 344 | type Inet6Pktinfo struct { |
| 345 | Addr [16]byte /* in6_addr */ |
| 346 | Ifindex uint32 |
| 347 | } |
| 348 | |
| 349 | type IPv6MTUInfo struct { |
| 350 | Addr RawSockaddrInet6 |
| 351 | Mtu uint32 |
| 352 | } |
| 353 | |
| 354 | type ICMPv6Filter struct { |
| 355 | Data [8]uint32 |
| 356 | } |
| 357 | |
| 358 | type Ucred struct { |
| 359 | Pid int32 |
| 360 | Uid uint32 |
| 361 | Gid uint32 |
| 362 | } |
| 363 | |
| 364 | type 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 | |
| 398 | const ( |
| 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 | |
| 426 | const ( |
| 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 | |
| 546 | type NlMsghdr struct { |
| 547 | Len uint32 |
| 548 | Type uint16 |
| 549 | Flags uint16 |
| 550 | Seq uint32 |
| 551 | Pid uint32 |
| 552 | } |
| 553 | |
| 554 | type NlMsgerr struct { |
| 555 | Error int32 |
| 556 | Msg NlMsghdr |
| 557 | } |
| 558 | |
| 559 | type RtGenmsg struct { |
| 560 | Family uint8 |
| 561 | } |
| 562 | |
| 563 | type NlAttr struct { |
| 564 | Len uint16 |
| 565 | Type uint16 |
| 566 | } |
| 567 | |
| 568 | type RtAttr struct { |
| 569 | Len uint16 |
| 570 | Type uint16 |
| 571 | } |
| 572 | |
| 573 | type IfInfomsg struct { |
| 574 | Family uint8 |
| 575 | _ uint8 |
| 576 | Type uint16 |
| 577 | Index int32 |
| 578 | Flags uint32 |
| 579 | Change uint32 |
| 580 | } |
| 581 | |
| 582 | type IfAddrmsg struct { |
| 583 | Family uint8 |
| 584 | Prefixlen uint8 |
| 585 | Flags uint8 |
| 586 | Scope uint8 |
| 587 | Index uint32 |
| 588 | } |
| 589 | |
| 590 | type 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 | |
| 602 | type RtNexthop struct { |
| 603 | Len uint16 |
| 604 | Flags uint8 |
| 605 | Hops uint8 |
| 606 | Ifindex int32 |
| 607 | } |
| 608 | |
| 609 | const ( |
| 610 | SizeofSockFilter = 0x8 |
| 611 | SizeofSockFprog = 0x8 |
| 612 | ) |
| 613 | |
| 614 | type SockFilter struct { |
| 615 | Code uint16 |
| 616 | Jt uint8 |
| 617 | Jf uint8 |
| 618 | K uint32 |
| 619 | } |
| 620 | |
| 621 | type SockFprog struct { |
| 622 | Len uint16 |
| 623 | _ [2]byte |
| 624 | Filter *SockFilter |
| 625 | } |
| 626 | |
| 627 | type InotifyEvent struct { |
| 628 | Wd int32 |
| 629 | Mask uint32 |
| 630 | Cookie uint32 |
| 631 | Len uint32 |
| 632 | } |
| 633 | |
| 634 | const SizeofInotifyEvent = 0x10 |
| 635 | |
| 636 | type PtraceRegs struct { |
| 637 | Uregs [18]uint32 |
| 638 | } |
| 639 | |
| 640 | type FdSet struct { |
| 641 | Bits [32]int32 |
| 642 | } |
| 643 | |
| 644 | type 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 | |
| 661 | type 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 | |
| 670 | type Ustat_t struct { |
| 671 | Tfree int32 |
| 672 | Tinode uint32 |
| 673 | Fname [6]uint8 |
| 674 | Fpack [6]uint8 |
| 675 | } |
| 676 | |
| 677 | type EpollEvent struct { |
| 678 | Events uint32 |
| 679 | PadFd int32 |
| 680 | Fd int32 |
| 681 | Pad int32 |
| 682 | } |
| 683 | |
| 684 | const ( |
| 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 | AT_EACCESS = 0x200 |
| 698 | ) |
| 699 | |
| 700 | type PollFd struct { |
| 701 | Fd int32 |
| 702 | Events int16 |
| 703 | Revents int16 |
| 704 | } |
| 705 | |
| 706 | const ( |
| 707 | POLLIN = 0x1 |
| 708 | POLLPRI = 0x2 |
| 709 | POLLOUT = 0x4 |
| 710 | POLLRDHUP = 0x2000 |
| 711 | POLLERR = 0x8 |
| 712 | POLLHUP = 0x10 |
| 713 | POLLNVAL = 0x20 |
| 714 | ) |
| 715 | |
| 716 | type Sigset_t struct { |
| 717 | Val [32]uint32 |
| 718 | } |
| 719 | |
| 720 | const RNDGETENTCNT = 0x80045200 |
| 721 | |
| 722 | const PERF_IOC_FLAG_GROUP = 0x1 |
| 723 | |
| 724 | type Termios struct { |
| 725 | Iflag uint32 |
| 726 | Oflag uint32 |
| 727 | Cflag uint32 |
| 728 | Lflag uint32 |
| 729 | Line uint8 |
| 730 | Cc [19]uint8 |
| 731 | Ispeed uint32 |
| 732 | Ospeed uint32 |
| 733 | } |
| 734 | |
| 735 | type Winsize struct { |
| 736 | Row uint16 |
| 737 | Col uint16 |
| 738 | Xpixel uint16 |
| 739 | Ypixel uint16 |
| 740 | } |
| 741 | |
| 742 | type Taskstats struct { |
| 743 | Version uint16 |
| 744 | _ [2]byte |
| 745 | Ac_exitcode uint32 |
| 746 | Ac_flag uint8 |
| 747 | Ac_nice uint8 |
| 748 | _ [6]byte |
| 749 | Cpu_count uint64 |
| 750 | Cpu_delay_total uint64 |
| 751 | Blkio_count uint64 |
| 752 | Blkio_delay_total uint64 |
| 753 | Swapin_count uint64 |
| 754 | Swapin_delay_total uint64 |
| 755 | Cpu_run_real_total uint64 |
| 756 | Cpu_run_virtual_total uint64 |
| 757 | Ac_comm [32]uint8 |
| 758 | Ac_sched uint8 |
| 759 | Ac_pad [3]uint8 |
| 760 | _ [4]byte |
| 761 | Ac_uid uint32 |
| 762 | Ac_gid uint32 |
| 763 | Ac_pid uint32 |
| 764 | Ac_ppid uint32 |
| 765 | Ac_btime uint32 |
| 766 | _ [4]byte |
| 767 | Ac_etime uint64 |
| 768 | Ac_utime uint64 |
| 769 | Ac_stime uint64 |
| 770 | Ac_minflt uint64 |
| 771 | Ac_majflt uint64 |
| 772 | Coremem uint64 |
| 773 | Virtmem uint64 |
| 774 | Hiwater_rss uint64 |
| 775 | Hiwater_vm uint64 |
| 776 | Read_char uint64 |
| 777 | Write_char uint64 |
| 778 | Read_syscalls uint64 |
| 779 | Write_syscalls uint64 |
| 780 | Read_bytes uint64 |
| 781 | Write_bytes uint64 |
| 782 | Cancelled_write_bytes uint64 |
| 783 | Nvcsw uint64 |
| 784 | Nivcsw uint64 |
| 785 | Ac_utimescaled uint64 |
| 786 | Ac_stimescaled uint64 |
| 787 | Cpu_scaled_run_real_total uint64 |
| 788 | Freepages_count uint64 |
| 789 | Freepages_delay_total uint64 |
| 790 | } |
| 791 | |
| 792 | const ( |
| 793 | TASKSTATS_CMD_UNSPEC = 0x0 |
| 794 | TASKSTATS_CMD_GET = 0x1 |
| 795 | TASKSTATS_CMD_NEW = 0x2 |
| 796 | TASKSTATS_TYPE_UNSPEC = 0x0 |
| 797 | TASKSTATS_TYPE_PID = 0x1 |
| 798 | TASKSTATS_TYPE_TGID = 0x2 |
| 799 | TASKSTATS_TYPE_STATS = 0x3 |
| 800 | TASKSTATS_TYPE_AGGR_PID = 0x4 |
| 801 | TASKSTATS_TYPE_AGGR_TGID = 0x5 |
| 802 | TASKSTATS_TYPE_NULL = 0x6 |
| 803 | TASKSTATS_CMD_ATTR_UNSPEC = 0x0 |
| 804 | TASKSTATS_CMD_ATTR_PID = 0x1 |
| 805 | TASKSTATS_CMD_ATTR_TGID = 0x2 |
| 806 | TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 |
| 807 | TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 |
| 808 | ) |
| 809 | |
| 810 | type CGroupStats struct { |
| 811 | Sleeping uint64 |
| 812 | Running uint64 |
| 813 | Stopped uint64 |
| 814 | Uninterruptible uint64 |
| 815 | Io_wait uint64 |
| 816 | } |
| 817 | |
| 818 | const ( |
| 819 | CGROUPSTATS_CMD_UNSPEC = 0x3 |
| 820 | CGROUPSTATS_CMD_GET = 0x4 |
| 821 | CGROUPSTATS_CMD_NEW = 0x5 |
| 822 | CGROUPSTATS_TYPE_UNSPEC = 0x0 |
| 823 | CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 |
| 824 | CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 |
| 825 | CGROUPSTATS_CMD_ATTR_FD = 0x1 |
| 826 | ) |
| 827 | |
| 828 | type Genlmsghdr struct { |
| 829 | Cmd uint8 |
| 830 | Version uint8 |
| 831 | Reserved uint16 |
| 832 | } |
| 833 | |
| 834 | const ( |
| 835 | CTRL_CMD_UNSPEC = 0x0 |
| 836 | CTRL_CMD_NEWFAMILY = 0x1 |
| 837 | CTRL_CMD_DELFAMILY = 0x2 |
| 838 | CTRL_CMD_GETFAMILY = 0x3 |
| 839 | CTRL_CMD_NEWOPS = 0x4 |
| 840 | CTRL_CMD_DELOPS = 0x5 |
| 841 | CTRL_CMD_GETOPS = 0x6 |
| 842 | CTRL_CMD_NEWMCAST_GRP = 0x7 |
| 843 | CTRL_CMD_DELMCAST_GRP = 0x8 |
| 844 | CTRL_CMD_GETMCAST_GRP = 0x9 |
| 845 | CTRL_ATTR_UNSPEC = 0x0 |
| 846 | CTRL_ATTR_FAMILY_ID = 0x1 |
| 847 | CTRL_ATTR_FAMILY_NAME = 0x2 |
| 848 | CTRL_ATTR_VERSION = 0x3 |
| 849 | CTRL_ATTR_HDRSIZE = 0x4 |
| 850 | CTRL_ATTR_MAXATTR = 0x5 |
| 851 | CTRL_ATTR_OPS = 0x6 |
| 852 | CTRL_ATTR_MCAST_GROUPS = 0x7 |
| 853 | CTRL_ATTR_OP_UNSPEC = 0x0 |
| 854 | CTRL_ATTR_OP_ID = 0x1 |
| 855 | CTRL_ATTR_OP_FLAGS = 0x2 |
| 856 | CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 |
| 857 | CTRL_ATTR_MCAST_GRP_NAME = 0x1 |
| 858 | CTRL_ATTR_MCAST_GRP_ID = 0x2 |
| 859 | ) |
| 860 | |
| 861 | type cpuMask uint32 |
| 862 | |
| 863 | const ( |
| 864 | _CPU_SETSIZE = 0x400 |
| 865 | _NCPUBITS = 0x20 |
| 866 | ) |
| 867 | |
| 868 | const ( |
| 869 | BDADDR_BREDR = 0x0 |
| 870 | BDADDR_LE_PUBLIC = 0x1 |
| 871 | BDADDR_LE_RANDOM = 0x2 |
| 872 | ) |
| 873 | |
| 874 | type PerfEventAttr struct { |
| 875 | Type uint32 |
| 876 | Size uint32 |
| 877 | Config uint64 |
| 878 | Sample uint64 |
| 879 | Sample_type uint64 |
| 880 | Read_format uint64 |
| 881 | Bits uint64 |
| 882 | Wakeup uint32 |
| 883 | Bp_type uint32 |
| 884 | Ext1 uint64 |
| 885 | Ext2 uint64 |
| 886 | Branch_sample_type uint64 |
| 887 | Sample_regs_user uint64 |
| 888 | Sample_stack_user uint32 |
| 889 | Clockid int32 |
| 890 | Sample_regs_intr uint64 |
| 891 | Aux_watermark uint32 |
| 892 | _ uint32 |
| 893 | } |
| 894 | |
| 895 | type PerfEventMmapPage struct { |
| 896 | Version uint32 |
| 897 | Compat_version uint32 |
| 898 | Lock uint32 |
| 899 | Index uint32 |
| 900 | Offset int64 |
| 901 | Time_enabled uint64 |
| 902 | Time_running uint64 |
| 903 | Capabilities uint64 |
| 904 | Pmc_width uint16 |
| 905 | Time_shift uint16 |
| 906 | Time_mult uint32 |
| 907 | Time_offset uint64 |
| 908 | Time_zero uint64 |
| 909 | Size uint32 |
| 910 | _ [948]uint8 |
| 911 | Data_head uint64 |
| 912 | Data_tail uint64 |
| 913 | Data_offset uint64 |
| 914 | Data_size uint64 |
| 915 | Aux_head uint64 |
| 916 | Aux_tail uint64 |
| 917 | Aux_offset uint64 |
| 918 | Aux_size uint64 |
| 919 | } |
| 920 | |
| 921 | const ( |
| 922 | PerfBitDisabled uint64 = CBitFieldMaskBit0 |
| 923 | PerfBitInherit = CBitFieldMaskBit1 |
| 924 | PerfBitPinned = CBitFieldMaskBit2 |
| 925 | PerfBitExclusive = CBitFieldMaskBit3 |
| 926 | PerfBitExcludeUser = CBitFieldMaskBit4 |
| 927 | PerfBitExcludeKernel = CBitFieldMaskBit5 |
| 928 | PerfBitExcludeHv = CBitFieldMaskBit6 |
| 929 | PerfBitExcludeIdle = CBitFieldMaskBit7 |
| 930 | PerfBitMmap = CBitFieldMaskBit8 |
| 931 | PerfBitComm = CBitFieldMaskBit9 |
| 932 | PerfBitFreq = CBitFieldMaskBit10 |
| 933 | PerfBitInheritStat = CBitFieldMaskBit11 |
| 934 | PerfBitEnableOnExec = CBitFieldMaskBit12 |
| 935 | PerfBitTask = CBitFieldMaskBit13 |
| 936 | PerfBitWatermark = CBitFieldMaskBit14 |
| 937 | PerfBitPreciseIPBit1 = CBitFieldMaskBit15 |
| 938 | PerfBitPreciseIPBit2 = CBitFieldMaskBit16 |
| 939 | PerfBitMmapData = CBitFieldMaskBit17 |
| 940 | PerfBitSampleIDAll = CBitFieldMaskBit18 |
| 941 | PerfBitExcludeHost = CBitFieldMaskBit19 |
| 942 | PerfBitExcludeGuest = CBitFieldMaskBit20 |
| 943 | PerfBitExcludeCallchainKernel = CBitFieldMaskBit21 |
| 944 | PerfBitExcludeCallchainUser = CBitFieldMaskBit22 |
| 945 | PerfBitMmap2 = CBitFieldMaskBit23 |
| 946 | PerfBitCommExec = CBitFieldMaskBit24 |
| 947 | PerfBitUseClockID = CBitFieldMaskBit25 |
| 948 | PerfBitContextSwitch = CBitFieldMaskBit26 |
| 949 | ) |
| 950 | |
| 951 | const ( |
| 952 | PERF_TYPE_HARDWARE = 0x0 |
| 953 | PERF_TYPE_SOFTWARE = 0x1 |
| 954 | PERF_TYPE_TRACEPOINT = 0x2 |
| 955 | PERF_TYPE_HW_CACHE = 0x3 |
| 956 | PERF_TYPE_RAW = 0x4 |
| 957 | PERF_TYPE_BREAKPOINT = 0x5 |
| 958 | |
| 959 | PERF_COUNT_HW_CPU_CYCLES = 0x0 |
| 960 | PERF_COUNT_HW_INSTRUCTIONS = 0x1 |
| 961 | PERF_COUNT_HW_CACHE_REFERENCES = 0x2 |
| 962 | PERF_COUNT_HW_CACHE_MISSES = 0x3 |
| 963 | PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4 |
| 964 | PERF_COUNT_HW_BRANCH_MISSES = 0x5 |
| 965 | PERF_COUNT_HW_BUS_CYCLES = 0x6 |
| 966 | PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7 |
| 967 | PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8 |
| 968 | PERF_COUNT_HW_REF_CPU_CYCLES = 0x9 |
| 969 | |
| 970 | PERF_COUNT_HW_CACHE_L1D = 0x0 |
| 971 | PERF_COUNT_HW_CACHE_L1I = 0x1 |
| 972 | PERF_COUNT_HW_CACHE_LL = 0x2 |
| 973 | PERF_COUNT_HW_CACHE_DTLB = 0x3 |
| 974 | PERF_COUNT_HW_CACHE_ITLB = 0x4 |
| 975 | PERF_COUNT_HW_CACHE_BPU = 0x5 |
| 976 | PERF_COUNT_HW_CACHE_NODE = 0x6 |
| 977 | |
| 978 | PERF_COUNT_HW_CACHE_OP_READ = 0x0 |
| 979 | PERF_COUNT_HW_CACHE_OP_WRITE = 0x1 |
| 980 | PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2 |
| 981 | |
| 982 | PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0 |
| 983 | PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1 |
| 984 | |
| 985 | PERF_COUNT_SW_CPU_CLOCK = 0x0 |
| 986 | PERF_COUNT_SW_TASK_CLOCK = 0x1 |
| 987 | PERF_COUNT_SW_PAGE_FAULTS = 0x2 |
| 988 | PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3 |
| 989 | PERF_COUNT_SW_CPU_MIGRATIONS = 0x4 |
| 990 | PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5 |
| 991 | PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6 |
| 992 | PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7 |
| 993 | PERF_COUNT_SW_EMULATION_FAULTS = 0x8 |
| 994 | PERF_COUNT_SW_DUMMY = 0x9 |
| 995 | |
| 996 | PERF_SAMPLE_IP = 0x1 |
| 997 | PERF_SAMPLE_TID = 0x2 |
| 998 | PERF_SAMPLE_TIME = 0x4 |
| 999 | PERF_SAMPLE_ADDR = 0x8 |
| 1000 | PERF_SAMPLE_READ = 0x10 |
| 1001 | PERF_SAMPLE_CALLCHAIN = 0x20 |
| 1002 | PERF_SAMPLE_ID = 0x40 |
| 1003 | PERF_SAMPLE_CPU = 0x80 |
| 1004 | PERF_SAMPLE_PERIOD = 0x100 |
| 1005 | PERF_SAMPLE_STREAM_ID = 0x200 |
| 1006 | PERF_SAMPLE_RAW = 0x400 |
| 1007 | PERF_SAMPLE_BRANCH_STACK = 0x800 |
| 1008 | |
| 1009 | PERF_SAMPLE_BRANCH_USER = 0x1 |
| 1010 | PERF_SAMPLE_BRANCH_KERNEL = 0x2 |
| 1011 | PERF_SAMPLE_BRANCH_HV = 0x4 |
| 1012 | PERF_SAMPLE_BRANCH_ANY = 0x8 |
| 1013 | PERF_SAMPLE_BRANCH_ANY_CALL = 0x10 |
| 1014 | PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20 |
| 1015 | PERF_SAMPLE_BRANCH_IND_CALL = 0x40 |
| 1016 | |
| 1017 | PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1 |
| 1018 | PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2 |
| 1019 | PERF_FORMAT_ID = 0x4 |
| 1020 | PERF_FORMAT_GROUP = 0x8 |
| 1021 | |
| 1022 | PERF_RECORD_MMAP = 0x1 |
| 1023 | PERF_RECORD_LOST = 0x2 |
| 1024 | PERF_RECORD_COMM = 0x3 |
| 1025 | PERF_RECORD_EXIT = 0x4 |
| 1026 | PERF_RECORD_THROTTLE = 0x5 |
| 1027 | PERF_RECORD_UNTHROTTLE = 0x6 |
| 1028 | PERF_RECORD_FORK = 0x7 |
| 1029 | PERF_RECORD_READ = 0x8 |
| 1030 | PERF_RECORD_SAMPLE = 0x9 |
| 1031 | |
| 1032 | PERF_CONTEXT_HV = -0x20 |
| 1033 | PERF_CONTEXT_KERNEL = -0x80 |
| 1034 | PERF_CONTEXT_USER = -0x200 |
| 1035 | |
| 1036 | PERF_CONTEXT_GUEST = -0x800 |
| 1037 | PERF_CONTEXT_GUEST_KERNEL = -0x880 |
| 1038 | PERF_CONTEXT_GUEST_USER = -0xa00 |
| 1039 | |
| 1040 | PERF_FLAG_FD_NO_GROUP = 0x1 |
| 1041 | PERF_FLAG_FD_OUTPUT = 0x2 |
| 1042 | PERF_FLAG_PID_CGROUP = 0x4 |
| 1043 | ) |
| 1044 | |
| 1045 | const ( |
| 1046 | CBitFieldMaskBit0 = 0x1 |
| 1047 | CBitFieldMaskBit1 = 0x2 |
| 1048 | CBitFieldMaskBit2 = 0x4 |
| 1049 | CBitFieldMaskBit3 = 0x8 |
| 1050 | CBitFieldMaskBit4 = 0x10 |
| 1051 | CBitFieldMaskBit5 = 0x20 |
| 1052 | CBitFieldMaskBit6 = 0x40 |
| 1053 | CBitFieldMaskBit7 = 0x80 |
| 1054 | CBitFieldMaskBit8 = 0x100 |
| 1055 | CBitFieldMaskBit9 = 0x200 |
| 1056 | CBitFieldMaskBit10 = 0x400 |
| 1057 | CBitFieldMaskBit11 = 0x800 |
| 1058 | CBitFieldMaskBit12 = 0x1000 |
| 1059 | CBitFieldMaskBit13 = 0x2000 |
| 1060 | CBitFieldMaskBit14 = 0x4000 |
| 1061 | CBitFieldMaskBit15 = 0x8000 |
| 1062 | CBitFieldMaskBit16 = 0x10000 |
| 1063 | CBitFieldMaskBit17 = 0x20000 |
| 1064 | CBitFieldMaskBit18 = 0x40000 |
| 1065 | CBitFieldMaskBit19 = 0x80000 |
| 1066 | CBitFieldMaskBit20 = 0x100000 |
| 1067 | CBitFieldMaskBit21 = 0x200000 |
| 1068 | CBitFieldMaskBit22 = 0x400000 |
| 1069 | CBitFieldMaskBit23 = 0x800000 |
| 1070 | CBitFieldMaskBit24 = 0x1000000 |
| 1071 | CBitFieldMaskBit25 = 0x2000000 |
| 1072 | CBitFieldMaskBit26 = 0x4000000 |
| 1073 | CBitFieldMaskBit27 = 0x8000000 |
| 1074 | CBitFieldMaskBit28 = 0x10000000 |
| 1075 | CBitFieldMaskBit29 = 0x20000000 |
| 1076 | CBitFieldMaskBit30 = 0x40000000 |
| 1077 | CBitFieldMaskBit31 = 0x80000000 |
| 1078 | CBitFieldMaskBit32 = 0x100000000 |
| 1079 | CBitFieldMaskBit33 = 0x200000000 |
| 1080 | CBitFieldMaskBit34 = 0x400000000 |
| 1081 | CBitFieldMaskBit35 = 0x800000000 |
| 1082 | CBitFieldMaskBit36 = 0x1000000000 |
| 1083 | CBitFieldMaskBit37 = 0x2000000000 |
| 1084 | CBitFieldMaskBit38 = 0x4000000000 |
| 1085 | CBitFieldMaskBit39 = 0x8000000000 |
| 1086 | CBitFieldMaskBit40 = 0x10000000000 |
| 1087 | CBitFieldMaskBit41 = 0x20000000000 |
| 1088 | CBitFieldMaskBit42 = 0x40000000000 |
| 1089 | CBitFieldMaskBit43 = 0x80000000000 |
| 1090 | CBitFieldMaskBit44 = 0x100000000000 |
| 1091 | CBitFieldMaskBit45 = 0x200000000000 |
| 1092 | CBitFieldMaskBit46 = 0x400000000000 |
| 1093 | CBitFieldMaskBit47 = 0x800000000000 |
| 1094 | CBitFieldMaskBit48 = 0x1000000000000 |
| 1095 | CBitFieldMaskBit49 = 0x2000000000000 |
| 1096 | CBitFieldMaskBit50 = 0x4000000000000 |
| 1097 | CBitFieldMaskBit51 = 0x8000000000000 |
| 1098 | CBitFieldMaskBit52 = 0x10000000000000 |
| 1099 | CBitFieldMaskBit53 = 0x20000000000000 |
| 1100 | CBitFieldMaskBit54 = 0x40000000000000 |
| 1101 | CBitFieldMaskBit55 = 0x80000000000000 |
| 1102 | CBitFieldMaskBit56 = 0x100000000000000 |
| 1103 | CBitFieldMaskBit57 = 0x200000000000000 |
| 1104 | CBitFieldMaskBit58 = 0x400000000000000 |
| 1105 | CBitFieldMaskBit59 = 0x800000000000000 |
| 1106 | CBitFieldMaskBit60 = 0x1000000000000000 |
| 1107 | CBitFieldMaskBit61 = 0x2000000000000000 |
| 1108 | CBitFieldMaskBit62 = 0x4000000000000000 |
| 1109 | CBitFieldMaskBit63 = 0x8000000000000000 |
| 1110 | ) |
| 1111 | |
| 1112 | type SockaddrStorage struct { |
| 1113 | Family uint16 |
| 1114 | _ [122]uint8 |
| 1115 | _ uint32 |
| 1116 | } |
| 1117 | |
| 1118 | type TCPMD5Sig struct { |
| 1119 | Addr SockaddrStorage |
| 1120 | Flags uint8 |
| 1121 | Prefixlen uint8 |
| 1122 | Keylen uint16 |
| 1123 | _ uint32 |
| 1124 | Key [80]uint8 |
| 1125 | } |
| 1126 | |
| 1127 | type HDDriveCmdHdr struct { |
| 1128 | Command uint8 |
| 1129 | Number uint8 |
| 1130 | Feature uint8 |
| 1131 | Count uint8 |
| 1132 | } |
| 1133 | |
| 1134 | type HDGeometry struct { |
| 1135 | Heads uint8 |
| 1136 | Sectors uint8 |
| 1137 | Cylinders uint16 |
| 1138 | Start uint32 |
| 1139 | } |
| 1140 | |
| 1141 | type HDDriveID struct { |
| 1142 | Config uint16 |
| 1143 | Cyls uint16 |
| 1144 | Reserved2 uint16 |
| 1145 | Heads uint16 |
| 1146 | Track_bytes uint16 |
| 1147 | Sector_bytes uint16 |
| 1148 | Sectors uint16 |
| 1149 | Vendor0 uint16 |
| 1150 | Vendor1 uint16 |
| 1151 | Vendor2 uint16 |
| 1152 | Serial_no [20]uint8 |
| 1153 | Buf_type uint16 |
| 1154 | Buf_size uint16 |
| 1155 | Ecc_bytes uint16 |
| 1156 | Fw_rev [8]uint8 |
| 1157 | Model [40]uint8 |
| 1158 | Max_multsect uint8 |
| 1159 | Vendor3 uint8 |
| 1160 | Dword_io uint16 |
| 1161 | Vendor4 uint8 |
| 1162 | Capability uint8 |
| 1163 | Reserved50 uint16 |
| 1164 | Vendor5 uint8 |
| 1165 | TPIO uint8 |
| 1166 | Vendor6 uint8 |
| 1167 | TDMA uint8 |
| 1168 | Field_valid uint16 |
| 1169 | Cur_cyls uint16 |
| 1170 | Cur_heads uint16 |
| 1171 | Cur_sectors uint16 |
| 1172 | Cur_capacity0 uint16 |
| 1173 | Cur_capacity1 uint16 |
| 1174 | Multsect uint8 |
| 1175 | Multsect_valid uint8 |
| 1176 | Lba_capacity uint32 |
| 1177 | Dma_1word uint16 |
| 1178 | Dma_mword uint16 |
| 1179 | Eide_pio_modes uint16 |
| 1180 | Eide_dma_min uint16 |
| 1181 | Eide_dma_time uint16 |
| 1182 | Eide_pio uint16 |
| 1183 | Eide_pio_iordy uint16 |
| 1184 | Words69_70 [2]uint16 |
| 1185 | Words71_74 [4]uint16 |
| 1186 | Queue_depth uint16 |
| 1187 | Words76_79 [4]uint16 |
| 1188 | Major_rev_num uint16 |
| 1189 | Minor_rev_num uint16 |
| 1190 | Command_set_1 uint16 |
| 1191 | Command_set_2 uint16 |
| 1192 | Cfsse uint16 |
| 1193 | Cfs_enable_1 uint16 |
| 1194 | Cfs_enable_2 uint16 |
| 1195 | Csf_default uint16 |
| 1196 | Dma_ultra uint16 |
| 1197 | Trseuc uint16 |
| 1198 | TrsEuc uint16 |
| 1199 | CurAPMvalues uint16 |
| 1200 | Mprc uint16 |
| 1201 | Hw_config uint16 |
| 1202 | Acoustic uint16 |
| 1203 | Msrqs uint16 |
| 1204 | Sxfert uint16 |
| 1205 | Sal uint16 |
| 1206 | Spg uint32 |
| 1207 | Lba_capacity_2 uint64 |
| 1208 | Words104_125 [22]uint16 |
| 1209 | Last_lun uint16 |
| 1210 | Word127 uint16 |
| 1211 | Dlf uint16 |
| 1212 | Csfo uint16 |
| 1213 | Words130_155 [26]uint16 |
| 1214 | Word156 uint16 |
| 1215 | Words157_159 [3]uint16 |
| 1216 | Cfa_power uint16 |
| 1217 | Words161_175 [15]uint16 |
| 1218 | Words176_205 [30]uint16 |
| 1219 | Words206_254 [49]uint16 |
| 1220 | Integrity_word uint16 |
| 1221 | } |
| 1222 | |
| 1223 | type Statfs_t struct { |
| 1224 | Type int32 |
| 1225 | Bsize int32 |
| 1226 | Blocks uint64 |
| 1227 | Bfree uint64 |
| 1228 | Bavail uint64 |
| 1229 | Files uint64 |
| 1230 | Ffree uint64 |
| 1231 | Fsid Fsid |
| 1232 | Namelen int32 |
| 1233 | Frsize int32 |
| 1234 | Flags int32 |
| 1235 | Spare [4]int32 |
| 1236 | _ [4]byte |
| 1237 | } |
| 1238 | |
| 1239 | const ( |
| 1240 | ST_MANDLOCK = 0x40 |
| 1241 | ST_NOATIME = 0x400 |
| 1242 | ST_NODEV = 0x4 |
| 1243 | ST_NODIRATIME = 0x800 |
| 1244 | ST_NOEXEC = 0x8 |
| 1245 | ST_NOSUID = 0x2 |
| 1246 | ST_RDONLY = 0x1 |
| 1247 | ST_RELATIME = 0x1000 |
| 1248 | ST_SYNCHRONOUS = 0x10 |
| 1249 | ) |
| 1250 | |
| 1251 | type TpacketHdr struct { |
| 1252 | Status uint32 |
| 1253 | Len uint32 |
| 1254 | Snaplen uint32 |
| 1255 | Mac uint16 |
| 1256 | Net uint16 |
| 1257 | Sec uint32 |
| 1258 | Usec uint32 |
| 1259 | } |
| 1260 | |
| 1261 | type Tpacket2Hdr struct { |
| 1262 | Status uint32 |
| 1263 | Len uint32 |
| 1264 | Snaplen uint32 |
| 1265 | Mac uint16 |
| 1266 | Net uint16 |
| 1267 | Sec uint32 |
| 1268 | Nsec uint32 |
| 1269 | Vlan_tci uint16 |
| 1270 | Vlan_tpid uint16 |
| 1271 | _ [4]uint8 |
| 1272 | } |
| 1273 | |
| 1274 | type Tpacket3Hdr struct { |
| 1275 | Next_offset uint32 |
| 1276 | Sec uint32 |
| 1277 | Nsec uint32 |
| 1278 | Snaplen uint32 |
| 1279 | Len uint32 |
| 1280 | Status uint32 |
| 1281 | Mac uint16 |
| 1282 | Net uint16 |
| 1283 | Hv1 TpacketHdrVariant1 |
| 1284 | _ [8]uint8 |
| 1285 | } |
| 1286 | |
| 1287 | type TpacketHdrVariant1 struct { |
| 1288 | Rxhash uint32 |
| 1289 | Vlan_tci uint32 |
| 1290 | Vlan_tpid uint16 |
| 1291 | _ uint16 |
| 1292 | } |
| 1293 | |
| 1294 | type TpacketBlockDesc struct { |
| 1295 | Version uint32 |
| 1296 | To_priv uint32 |
| 1297 | Hdr [40]byte |
| 1298 | } |
| 1299 | |
| 1300 | type TpacketReq struct { |
| 1301 | Block_size uint32 |
| 1302 | Block_nr uint32 |
| 1303 | Frame_size uint32 |
| 1304 | Frame_nr uint32 |
| 1305 | } |
| 1306 | |
| 1307 | type TpacketReq3 struct { |
| 1308 | Block_size uint32 |
| 1309 | Block_nr uint32 |
| 1310 | Frame_size uint32 |
| 1311 | Frame_nr uint32 |
| 1312 | Retire_blk_tov uint32 |
| 1313 | Sizeof_priv uint32 |
| 1314 | Feature_req_word uint32 |
| 1315 | } |
| 1316 | |
| 1317 | type TpacketStats struct { |
| 1318 | Packets uint32 |
| 1319 | Drops uint32 |
| 1320 | } |
| 1321 | |
| 1322 | type TpacketStatsV3 struct { |
| 1323 | Packets uint32 |
| 1324 | Drops uint32 |
| 1325 | Freeze_q_cnt uint32 |
| 1326 | } |
| 1327 | |
| 1328 | type TpacketAuxdata struct { |
| 1329 | Status uint32 |
| 1330 | Len uint32 |
| 1331 | Snaplen uint32 |
| 1332 | Mac uint16 |
| 1333 | Net uint16 |
| 1334 | Vlan_tci uint16 |
| 1335 | Vlan_tpid uint16 |
| 1336 | } |
| 1337 | |
| 1338 | const ( |
| 1339 | TPACKET_V1 = 0x0 |
| 1340 | TPACKET_V2 = 0x1 |
| 1341 | TPACKET_V3 = 0x2 |
| 1342 | ) |
| 1343 | |
| 1344 | const ( |
| 1345 | SizeofTpacketHdr = 0x18 |
| 1346 | SizeofTpacket2Hdr = 0x20 |
| 1347 | SizeofTpacket3Hdr = 0x30 |
| 1348 | ) |
| 1349 | |
| 1350 | const ( |
| 1351 | NF_INET_PRE_ROUTING = 0x0 |
| 1352 | NF_INET_LOCAL_IN = 0x1 |
| 1353 | NF_INET_FORWARD = 0x2 |
| 1354 | NF_INET_LOCAL_OUT = 0x3 |
| 1355 | NF_INET_POST_ROUTING = 0x4 |
| 1356 | NF_INET_NUMHOOKS = 0x5 |
| 1357 | ) |
| 1358 | |
| 1359 | const ( |
| 1360 | NF_NETDEV_INGRESS = 0x0 |
| 1361 | NF_NETDEV_NUMHOOKS = 0x1 |
| 1362 | ) |
| 1363 | |
| 1364 | const ( |
| 1365 | NFPROTO_UNSPEC = 0x0 |
| 1366 | NFPROTO_INET = 0x1 |
| 1367 | NFPROTO_IPV4 = 0x2 |
| 1368 | NFPROTO_ARP = 0x3 |
| 1369 | NFPROTO_NETDEV = 0x5 |
| 1370 | NFPROTO_BRIDGE = 0x7 |
| 1371 | NFPROTO_IPV6 = 0xa |
| 1372 | NFPROTO_DECNET = 0xc |
| 1373 | NFPROTO_NUMPROTO = 0xd |
| 1374 | ) |
| 1375 | |
| 1376 | type Nfgenmsg struct { |
| 1377 | Nfgen_family uint8 |
| 1378 | Version uint8 |
| 1379 | Res_id uint16 |
| 1380 | } |
| 1381 | |
| 1382 | const ( |
| 1383 | NFNL_BATCH_UNSPEC = 0x0 |
| 1384 | NFNL_BATCH_GENID = 0x1 |
| 1385 | ) |
| 1386 | |
| 1387 | const ( |
| 1388 | NFT_REG_VERDICT = 0x0 |
| 1389 | NFT_REG_1 = 0x1 |
| 1390 | NFT_REG_2 = 0x2 |
| 1391 | NFT_REG_3 = 0x3 |
| 1392 | NFT_REG_4 = 0x4 |
| 1393 | NFT_REG32_00 = 0x8 |
| 1394 | NFT_REG32_01 = 0x9 |
| 1395 | NFT_REG32_02 = 0xa |
| 1396 | NFT_REG32_03 = 0xb |
| 1397 | NFT_REG32_04 = 0xc |
| 1398 | NFT_REG32_05 = 0xd |
| 1399 | NFT_REG32_06 = 0xe |
| 1400 | NFT_REG32_07 = 0xf |
| 1401 | NFT_REG32_08 = 0x10 |
| 1402 | NFT_REG32_09 = 0x11 |
| 1403 | NFT_REG32_10 = 0x12 |
| 1404 | NFT_REG32_11 = 0x13 |
| 1405 | NFT_REG32_12 = 0x14 |
| 1406 | NFT_REG32_13 = 0x15 |
| 1407 | NFT_REG32_14 = 0x16 |
| 1408 | NFT_REG32_15 = 0x17 |
| 1409 | NFT_CONTINUE = -0x1 |
| 1410 | NFT_BREAK = -0x2 |
| 1411 | NFT_JUMP = -0x3 |
| 1412 | NFT_GOTO = -0x4 |
| 1413 | NFT_RETURN = -0x5 |
| 1414 | NFT_MSG_NEWTABLE = 0x0 |
| 1415 | NFT_MSG_GETTABLE = 0x1 |
| 1416 | NFT_MSG_DELTABLE = 0x2 |
| 1417 | NFT_MSG_NEWCHAIN = 0x3 |
| 1418 | NFT_MSG_GETCHAIN = 0x4 |
| 1419 | NFT_MSG_DELCHAIN = 0x5 |
| 1420 | NFT_MSG_NEWRULE = 0x6 |
| 1421 | NFT_MSG_GETRULE = 0x7 |
| 1422 | NFT_MSG_DELRULE = 0x8 |
| 1423 | NFT_MSG_NEWSET = 0x9 |
| 1424 | NFT_MSG_GETSET = 0xa |
| 1425 | NFT_MSG_DELSET = 0xb |
| 1426 | NFT_MSG_NEWSETELEM = 0xc |
| 1427 | NFT_MSG_GETSETELEM = 0xd |
| 1428 | NFT_MSG_DELSETELEM = 0xe |
| 1429 | NFT_MSG_NEWGEN = 0xf |
| 1430 | NFT_MSG_GETGEN = 0x10 |
| 1431 | NFT_MSG_TRACE = 0x11 |
| 1432 | NFT_MSG_NEWOBJ = 0x12 |
| 1433 | NFT_MSG_GETOBJ = 0x13 |
| 1434 | NFT_MSG_DELOBJ = 0x14 |
| 1435 | NFT_MSG_GETOBJ_RESET = 0x15 |
| 1436 | NFT_MSG_MAX = 0x19 |
| 1437 | NFTA_LIST_UNPEC = 0x0 |
| 1438 | NFTA_LIST_ELEM = 0x1 |
| 1439 | NFTA_HOOK_UNSPEC = 0x0 |
| 1440 | NFTA_HOOK_HOOKNUM = 0x1 |
| 1441 | NFTA_HOOK_PRIORITY = 0x2 |
| 1442 | NFTA_HOOK_DEV = 0x3 |
| 1443 | NFT_TABLE_F_DORMANT = 0x1 |
| 1444 | NFTA_TABLE_UNSPEC = 0x0 |
| 1445 | NFTA_TABLE_NAME = 0x1 |
| 1446 | NFTA_TABLE_FLAGS = 0x2 |
| 1447 | NFTA_TABLE_USE = 0x3 |
| 1448 | NFTA_CHAIN_UNSPEC = 0x0 |
| 1449 | NFTA_CHAIN_TABLE = 0x1 |
| 1450 | NFTA_CHAIN_HANDLE = 0x2 |
| 1451 | NFTA_CHAIN_NAME = 0x3 |
| 1452 | NFTA_CHAIN_HOOK = 0x4 |
| 1453 | NFTA_CHAIN_POLICY = 0x5 |
| 1454 | NFTA_CHAIN_USE = 0x6 |
| 1455 | NFTA_CHAIN_TYPE = 0x7 |
| 1456 | NFTA_CHAIN_COUNTERS = 0x8 |
| 1457 | NFTA_CHAIN_PAD = 0x9 |
| 1458 | NFTA_RULE_UNSPEC = 0x0 |
| 1459 | NFTA_RULE_TABLE = 0x1 |
| 1460 | NFTA_RULE_CHAIN = 0x2 |
| 1461 | NFTA_RULE_HANDLE = 0x3 |
| 1462 | NFTA_RULE_EXPRESSIONS = 0x4 |
| 1463 | NFTA_RULE_COMPAT = 0x5 |
| 1464 | NFTA_RULE_POSITION = 0x6 |
| 1465 | NFTA_RULE_USERDATA = 0x7 |
| 1466 | NFTA_RULE_PAD = 0x8 |
| 1467 | NFTA_RULE_ID = 0x9 |
| 1468 | NFT_RULE_COMPAT_F_INV = 0x2 |
| 1469 | NFT_RULE_COMPAT_F_MASK = 0x2 |
| 1470 | NFTA_RULE_COMPAT_UNSPEC = 0x0 |
| 1471 | NFTA_RULE_COMPAT_PROTO = 0x1 |
| 1472 | NFTA_RULE_COMPAT_FLAGS = 0x2 |
| 1473 | NFT_SET_ANONYMOUS = 0x1 |
| 1474 | NFT_SET_CONSTANT = 0x2 |
| 1475 | NFT_SET_INTERVAL = 0x4 |
| 1476 | NFT_SET_MAP = 0x8 |
| 1477 | NFT_SET_TIMEOUT = 0x10 |
| 1478 | NFT_SET_EVAL = 0x20 |
| 1479 | NFT_SET_OBJECT = 0x40 |
| 1480 | NFT_SET_POL_PERFORMANCE = 0x0 |
| 1481 | NFT_SET_POL_MEMORY = 0x1 |
| 1482 | NFTA_SET_DESC_UNSPEC = 0x0 |
| 1483 | NFTA_SET_DESC_SIZE = 0x1 |
| 1484 | NFTA_SET_UNSPEC = 0x0 |
| 1485 | NFTA_SET_TABLE = 0x1 |
| 1486 | NFTA_SET_NAME = 0x2 |
| 1487 | NFTA_SET_FLAGS = 0x3 |
| 1488 | NFTA_SET_KEY_TYPE = 0x4 |
| 1489 | NFTA_SET_KEY_LEN = 0x5 |
| 1490 | NFTA_SET_DATA_TYPE = 0x6 |
| 1491 | NFTA_SET_DATA_LEN = 0x7 |
| 1492 | NFTA_SET_POLICY = 0x8 |
| 1493 | NFTA_SET_DESC = 0x9 |
| 1494 | NFTA_SET_ID = 0xa |
| 1495 | NFTA_SET_TIMEOUT = 0xb |
| 1496 | NFTA_SET_GC_INTERVAL = 0xc |
| 1497 | NFTA_SET_USERDATA = 0xd |
| 1498 | NFTA_SET_PAD = 0xe |
| 1499 | NFTA_SET_OBJ_TYPE = 0xf |
| 1500 | NFT_SET_ELEM_INTERVAL_END = 0x1 |
| 1501 | NFTA_SET_ELEM_UNSPEC = 0x0 |
| 1502 | NFTA_SET_ELEM_KEY = 0x1 |
| 1503 | NFTA_SET_ELEM_DATA = 0x2 |
| 1504 | NFTA_SET_ELEM_FLAGS = 0x3 |
| 1505 | NFTA_SET_ELEM_TIMEOUT = 0x4 |
| 1506 | NFTA_SET_ELEM_EXPIRATION = 0x5 |
| 1507 | NFTA_SET_ELEM_USERDATA = 0x6 |
| 1508 | NFTA_SET_ELEM_EXPR = 0x7 |
| 1509 | NFTA_SET_ELEM_PAD = 0x8 |
| 1510 | NFTA_SET_ELEM_OBJREF = 0x9 |
| 1511 | NFTA_SET_ELEM_LIST_UNSPEC = 0x0 |
| 1512 | NFTA_SET_ELEM_LIST_TABLE = 0x1 |
| 1513 | NFTA_SET_ELEM_LIST_SET = 0x2 |
| 1514 | NFTA_SET_ELEM_LIST_ELEMENTS = 0x3 |
| 1515 | NFTA_SET_ELEM_LIST_SET_ID = 0x4 |
| 1516 | NFT_DATA_VALUE = 0x0 |
| 1517 | NFT_DATA_VERDICT = 0xffffff00 |
| 1518 | NFTA_DATA_UNSPEC = 0x0 |
| 1519 | NFTA_DATA_VALUE = 0x1 |
| 1520 | NFTA_DATA_VERDICT = 0x2 |
| 1521 | NFTA_VERDICT_UNSPEC = 0x0 |
| 1522 | NFTA_VERDICT_CODE = 0x1 |
| 1523 | NFTA_VERDICT_CHAIN = 0x2 |
| 1524 | NFTA_EXPR_UNSPEC = 0x0 |
| 1525 | NFTA_EXPR_NAME = 0x1 |
| 1526 | NFTA_EXPR_DATA = 0x2 |
| 1527 | NFTA_IMMEDIATE_UNSPEC = 0x0 |
| 1528 | NFTA_IMMEDIATE_DREG = 0x1 |
| 1529 | NFTA_IMMEDIATE_DATA = 0x2 |
| 1530 | NFTA_BITWISE_UNSPEC = 0x0 |
| 1531 | NFTA_BITWISE_SREG = 0x1 |
| 1532 | NFTA_BITWISE_DREG = 0x2 |
| 1533 | NFTA_BITWISE_LEN = 0x3 |
| 1534 | NFTA_BITWISE_MASK = 0x4 |
| 1535 | NFTA_BITWISE_XOR = 0x5 |
| 1536 | NFT_BYTEORDER_NTOH = 0x0 |
| 1537 | NFT_BYTEORDER_HTON = 0x1 |
| 1538 | NFTA_BYTEORDER_UNSPEC = 0x0 |
| 1539 | NFTA_BYTEORDER_SREG = 0x1 |
| 1540 | NFTA_BYTEORDER_DREG = 0x2 |
| 1541 | NFTA_BYTEORDER_OP = 0x3 |
| 1542 | NFTA_BYTEORDER_LEN = 0x4 |
| 1543 | NFTA_BYTEORDER_SIZE = 0x5 |
| 1544 | NFT_CMP_EQ = 0x0 |
| 1545 | NFT_CMP_NEQ = 0x1 |
| 1546 | NFT_CMP_LT = 0x2 |
| 1547 | NFT_CMP_LTE = 0x3 |
| 1548 | NFT_CMP_GT = 0x4 |
| 1549 | NFT_CMP_GTE = 0x5 |
| 1550 | NFTA_CMP_UNSPEC = 0x0 |
| 1551 | NFTA_CMP_SREG = 0x1 |
| 1552 | NFTA_CMP_OP = 0x2 |
| 1553 | NFTA_CMP_DATA = 0x3 |
| 1554 | NFT_RANGE_EQ = 0x0 |
| 1555 | NFT_RANGE_NEQ = 0x1 |
| 1556 | NFTA_RANGE_UNSPEC = 0x0 |
| 1557 | NFTA_RANGE_SREG = 0x1 |
| 1558 | NFTA_RANGE_OP = 0x2 |
| 1559 | NFTA_RANGE_FROM_DATA = 0x3 |
| 1560 | NFTA_RANGE_TO_DATA = 0x4 |
| 1561 | NFT_LOOKUP_F_INV = 0x1 |
| 1562 | NFTA_LOOKUP_UNSPEC = 0x0 |
| 1563 | NFTA_LOOKUP_SET = 0x1 |
| 1564 | NFTA_LOOKUP_SREG = 0x2 |
| 1565 | NFTA_LOOKUP_DREG = 0x3 |
| 1566 | NFTA_LOOKUP_SET_ID = 0x4 |
| 1567 | NFTA_LOOKUP_FLAGS = 0x5 |
| 1568 | NFT_DYNSET_OP_ADD = 0x0 |
| 1569 | NFT_DYNSET_OP_UPDATE = 0x1 |
| 1570 | NFT_DYNSET_F_INV = 0x1 |
| 1571 | NFTA_DYNSET_UNSPEC = 0x0 |
| 1572 | NFTA_DYNSET_SET_NAME = 0x1 |
| 1573 | NFTA_DYNSET_SET_ID = 0x2 |
| 1574 | NFTA_DYNSET_OP = 0x3 |
| 1575 | NFTA_DYNSET_SREG_KEY = 0x4 |
| 1576 | NFTA_DYNSET_SREG_DATA = 0x5 |
| 1577 | NFTA_DYNSET_TIMEOUT = 0x6 |
| 1578 | NFTA_DYNSET_EXPR = 0x7 |
| 1579 | NFTA_DYNSET_PAD = 0x8 |
| 1580 | NFTA_DYNSET_FLAGS = 0x9 |
| 1581 | NFT_PAYLOAD_LL_HEADER = 0x0 |
| 1582 | NFT_PAYLOAD_NETWORK_HEADER = 0x1 |
| 1583 | NFT_PAYLOAD_TRANSPORT_HEADER = 0x2 |
| 1584 | NFT_PAYLOAD_CSUM_NONE = 0x0 |
| 1585 | NFT_PAYLOAD_CSUM_INET = 0x1 |
| 1586 | NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1 |
| 1587 | NFTA_PAYLOAD_UNSPEC = 0x0 |
| 1588 | NFTA_PAYLOAD_DREG = 0x1 |
| 1589 | NFTA_PAYLOAD_BASE = 0x2 |
| 1590 | NFTA_PAYLOAD_OFFSET = 0x3 |
| 1591 | NFTA_PAYLOAD_LEN = 0x4 |
| 1592 | NFTA_PAYLOAD_SREG = 0x5 |
| 1593 | NFTA_PAYLOAD_CSUM_TYPE = 0x6 |
| 1594 | NFTA_PAYLOAD_CSUM_OFFSET = 0x7 |
| 1595 | NFTA_PAYLOAD_CSUM_FLAGS = 0x8 |
| 1596 | NFT_EXTHDR_F_PRESENT = 0x1 |
| 1597 | NFT_EXTHDR_OP_IPV6 = 0x0 |
| 1598 | NFT_EXTHDR_OP_TCPOPT = 0x1 |
| 1599 | NFTA_EXTHDR_UNSPEC = 0x0 |
| 1600 | NFTA_EXTHDR_DREG = 0x1 |
| 1601 | NFTA_EXTHDR_TYPE = 0x2 |
| 1602 | NFTA_EXTHDR_OFFSET = 0x3 |
| 1603 | NFTA_EXTHDR_LEN = 0x4 |
| 1604 | NFTA_EXTHDR_FLAGS = 0x5 |
| 1605 | NFTA_EXTHDR_OP = 0x6 |
| 1606 | NFTA_EXTHDR_SREG = 0x7 |
| 1607 | NFT_META_LEN = 0x0 |
| 1608 | NFT_META_PROTOCOL = 0x1 |
| 1609 | NFT_META_PRIORITY = 0x2 |
| 1610 | NFT_META_MARK = 0x3 |
| 1611 | NFT_META_IIF = 0x4 |
| 1612 | NFT_META_OIF = 0x5 |
| 1613 | NFT_META_IIFNAME = 0x6 |
| 1614 | NFT_META_OIFNAME = 0x7 |
| 1615 | NFT_META_IIFTYPE = 0x8 |
| 1616 | NFT_META_OIFTYPE = 0x9 |
| 1617 | NFT_META_SKUID = 0xa |
| 1618 | NFT_META_SKGID = 0xb |
| 1619 | NFT_META_NFTRACE = 0xc |
| 1620 | NFT_META_RTCLASSID = 0xd |
| 1621 | NFT_META_SECMARK = 0xe |
| 1622 | NFT_META_NFPROTO = 0xf |
| 1623 | NFT_META_L4PROTO = 0x10 |
| 1624 | NFT_META_BRI_IIFNAME = 0x11 |
| 1625 | NFT_META_BRI_OIFNAME = 0x12 |
| 1626 | NFT_META_PKTTYPE = 0x13 |
| 1627 | NFT_META_CPU = 0x14 |
| 1628 | NFT_META_IIFGROUP = 0x15 |
| 1629 | NFT_META_OIFGROUP = 0x16 |
| 1630 | NFT_META_CGROUP = 0x17 |
| 1631 | NFT_META_PRANDOM = 0x18 |
| 1632 | NFT_RT_CLASSID = 0x0 |
| 1633 | NFT_RT_NEXTHOP4 = 0x1 |
| 1634 | NFT_RT_NEXTHOP6 = 0x2 |
| 1635 | NFT_RT_TCPMSS = 0x3 |
| 1636 | NFT_HASH_JENKINS = 0x0 |
| 1637 | NFT_HASH_SYM = 0x1 |
| 1638 | NFTA_HASH_UNSPEC = 0x0 |
| 1639 | NFTA_HASH_SREG = 0x1 |
| 1640 | NFTA_HASH_DREG = 0x2 |
| 1641 | NFTA_HASH_LEN = 0x3 |
| 1642 | NFTA_HASH_MODULUS = 0x4 |
| 1643 | NFTA_HASH_SEED = 0x5 |
| 1644 | NFTA_HASH_OFFSET = 0x6 |
| 1645 | NFTA_HASH_TYPE = 0x7 |
| 1646 | NFTA_META_UNSPEC = 0x0 |
| 1647 | NFTA_META_DREG = 0x1 |
| 1648 | NFTA_META_KEY = 0x2 |
| 1649 | NFTA_META_SREG = 0x3 |
| 1650 | NFTA_RT_UNSPEC = 0x0 |
| 1651 | NFTA_RT_DREG = 0x1 |
| 1652 | NFTA_RT_KEY = 0x2 |
| 1653 | NFT_CT_STATE = 0x0 |
| 1654 | NFT_CT_DIRECTION = 0x1 |
| 1655 | NFT_CT_STATUS = 0x2 |
| 1656 | NFT_CT_MARK = 0x3 |
| 1657 | NFT_CT_SECMARK = 0x4 |
| 1658 | NFT_CT_EXPIRATION = 0x5 |
| 1659 | NFT_CT_HELPER = 0x6 |
| 1660 | NFT_CT_L3PROTOCOL = 0x7 |
| 1661 | NFT_CT_SRC = 0x8 |
| 1662 | NFT_CT_DST = 0x9 |
| 1663 | NFT_CT_PROTOCOL = 0xa |
| 1664 | NFT_CT_PROTO_SRC = 0xb |
| 1665 | NFT_CT_PROTO_DST = 0xc |
| 1666 | NFT_CT_LABELS = 0xd |
| 1667 | NFT_CT_PKTS = 0xe |
| 1668 | NFT_CT_BYTES = 0xf |
| 1669 | NFT_CT_AVGPKT = 0x10 |
| 1670 | NFT_CT_ZONE = 0x11 |
| 1671 | NFT_CT_EVENTMASK = 0x12 |
| 1672 | NFTA_CT_UNSPEC = 0x0 |
| 1673 | NFTA_CT_DREG = 0x1 |
| 1674 | NFTA_CT_KEY = 0x2 |
| 1675 | NFTA_CT_DIRECTION = 0x3 |
| 1676 | NFTA_CT_SREG = 0x4 |
| 1677 | NFT_LIMIT_PKTS = 0x0 |
| 1678 | NFT_LIMIT_PKT_BYTES = 0x1 |
| 1679 | NFT_LIMIT_F_INV = 0x1 |
| 1680 | NFTA_LIMIT_UNSPEC = 0x0 |
| 1681 | NFTA_LIMIT_RATE = 0x1 |
| 1682 | NFTA_LIMIT_UNIT = 0x2 |
| 1683 | NFTA_LIMIT_BURST = 0x3 |
| 1684 | NFTA_LIMIT_TYPE = 0x4 |
| 1685 | NFTA_LIMIT_FLAGS = 0x5 |
| 1686 | NFTA_LIMIT_PAD = 0x6 |
| 1687 | NFTA_COUNTER_UNSPEC = 0x0 |
| 1688 | NFTA_COUNTER_BYTES = 0x1 |
| 1689 | NFTA_COUNTER_PACKETS = 0x2 |
| 1690 | NFTA_COUNTER_PAD = 0x3 |
| 1691 | NFTA_LOG_UNSPEC = 0x0 |
| 1692 | NFTA_LOG_GROUP = 0x1 |
| 1693 | NFTA_LOG_PREFIX = 0x2 |
| 1694 | NFTA_LOG_SNAPLEN = 0x3 |
| 1695 | NFTA_LOG_QTHRESHOLD = 0x4 |
| 1696 | NFTA_LOG_LEVEL = 0x5 |
| 1697 | NFTA_LOG_FLAGS = 0x6 |
| 1698 | NFTA_QUEUE_UNSPEC = 0x0 |
| 1699 | NFTA_QUEUE_NUM = 0x1 |
| 1700 | NFTA_QUEUE_TOTAL = 0x2 |
| 1701 | NFTA_QUEUE_FLAGS = 0x3 |
| 1702 | NFTA_QUEUE_SREG_QNUM = 0x4 |
| 1703 | NFT_QUOTA_F_INV = 0x1 |
| 1704 | NFT_QUOTA_F_DEPLETED = 0x2 |
| 1705 | NFTA_QUOTA_UNSPEC = 0x0 |
| 1706 | NFTA_QUOTA_BYTES = 0x1 |
| 1707 | NFTA_QUOTA_FLAGS = 0x2 |
| 1708 | NFTA_QUOTA_PAD = 0x3 |
| 1709 | NFTA_QUOTA_CONSUMED = 0x4 |
| 1710 | NFT_REJECT_ICMP_UNREACH = 0x0 |
| 1711 | NFT_REJECT_TCP_RST = 0x1 |
| 1712 | NFT_REJECT_ICMPX_UNREACH = 0x2 |
| 1713 | NFT_REJECT_ICMPX_NO_ROUTE = 0x0 |
| 1714 | NFT_REJECT_ICMPX_PORT_UNREACH = 0x1 |
| 1715 | NFT_REJECT_ICMPX_HOST_UNREACH = 0x2 |
| 1716 | NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3 |
| 1717 | NFTA_REJECT_UNSPEC = 0x0 |
| 1718 | NFTA_REJECT_TYPE = 0x1 |
| 1719 | NFTA_REJECT_ICMP_CODE = 0x2 |
| 1720 | NFT_NAT_SNAT = 0x0 |
| 1721 | NFT_NAT_DNAT = 0x1 |
| 1722 | NFTA_NAT_UNSPEC = 0x0 |
| 1723 | NFTA_NAT_TYPE = 0x1 |
| 1724 | NFTA_NAT_FAMILY = 0x2 |
| 1725 | NFTA_NAT_REG_ADDR_MIN = 0x3 |
| 1726 | NFTA_NAT_REG_ADDR_MAX = 0x4 |
| 1727 | NFTA_NAT_REG_PROTO_MIN = 0x5 |
| 1728 | NFTA_NAT_REG_PROTO_MAX = 0x6 |
| 1729 | NFTA_NAT_FLAGS = 0x7 |
| 1730 | NFTA_MASQ_UNSPEC = 0x0 |
| 1731 | NFTA_MASQ_FLAGS = 0x1 |
| 1732 | NFTA_MASQ_REG_PROTO_MIN = 0x2 |
| 1733 | NFTA_MASQ_REG_PROTO_MAX = 0x3 |
| 1734 | NFTA_REDIR_UNSPEC = 0x0 |
| 1735 | NFTA_REDIR_REG_PROTO_MIN = 0x1 |
| 1736 | NFTA_REDIR_REG_PROTO_MAX = 0x2 |
| 1737 | NFTA_REDIR_FLAGS = 0x3 |
| 1738 | NFTA_DUP_UNSPEC = 0x0 |
| 1739 | NFTA_DUP_SREG_ADDR = 0x1 |
| 1740 | NFTA_DUP_SREG_DEV = 0x2 |
| 1741 | NFTA_FWD_UNSPEC = 0x0 |
| 1742 | NFTA_FWD_SREG_DEV = 0x1 |
| 1743 | NFTA_OBJREF_UNSPEC = 0x0 |
| 1744 | NFTA_OBJREF_IMM_TYPE = 0x1 |
| 1745 | NFTA_OBJREF_IMM_NAME = 0x2 |
| 1746 | NFTA_OBJREF_SET_SREG = 0x3 |
| 1747 | NFTA_OBJREF_SET_NAME = 0x4 |
| 1748 | NFTA_OBJREF_SET_ID = 0x5 |
| 1749 | NFTA_GEN_UNSPEC = 0x0 |
| 1750 | NFTA_GEN_ID = 0x1 |
| 1751 | NFTA_GEN_PROC_PID = 0x2 |
| 1752 | NFTA_GEN_PROC_NAME = 0x3 |
| 1753 | NFTA_FIB_UNSPEC = 0x0 |
| 1754 | NFTA_FIB_DREG = 0x1 |
| 1755 | NFTA_FIB_RESULT = 0x2 |
| 1756 | NFTA_FIB_FLAGS = 0x3 |
| 1757 | NFT_FIB_RESULT_UNSPEC = 0x0 |
| 1758 | NFT_FIB_RESULT_OIF = 0x1 |
| 1759 | NFT_FIB_RESULT_OIFNAME = 0x2 |
| 1760 | NFT_FIB_RESULT_ADDRTYPE = 0x3 |
| 1761 | NFTA_FIB_F_SADDR = 0x1 |
| 1762 | NFTA_FIB_F_DADDR = 0x2 |
| 1763 | NFTA_FIB_F_MARK = 0x4 |
| 1764 | NFTA_FIB_F_IIF = 0x8 |
| 1765 | NFTA_FIB_F_OIF = 0x10 |
| 1766 | NFTA_FIB_F_PRESENT = 0x20 |
| 1767 | NFTA_CT_HELPER_UNSPEC = 0x0 |
| 1768 | NFTA_CT_HELPER_NAME = 0x1 |
| 1769 | NFTA_CT_HELPER_L3PROTO = 0x2 |
| 1770 | NFTA_CT_HELPER_L4PROTO = 0x3 |
| 1771 | NFTA_OBJ_UNSPEC = 0x0 |
| 1772 | NFTA_OBJ_TABLE = 0x1 |
| 1773 | NFTA_OBJ_NAME = 0x2 |
| 1774 | NFTA_OBJ_TYPE = 0x3 |
| 1775 | NFTA_OBJ_DATA = 0x4 |
| 1776 | NFTA_OBJ_USE = 0x5 |
| 1777 | NFTA_TRACE_UNSPEC = 0x0 |
| 1778 | NFTA_TRACE_TABLE = 0x1 |
| 1779 | NFTA_TRACE_CHAIN = 0x2 |
| 1780 | NFTA_TRACE_RULE_HANDLE = 0x3 |
| 1781 | NFTA_TRACE_TYPE = 0x4 |
| 1782 | NFTA_TRACE_VERDICT = 0x5 |
| 1783 | NFTA_TRACE_ID = 0x6 |
| 1784 | NFTA_TRACE_LL_HEADER = 0x7 |
| 1785 | NFTA_TRACE_NETWORK_HEADER = 0x8 |
| 1786 | NFTA_TRACE_TRANSPORT_HEADER = 0x9 |
| 1787 | NFTA_TRACE_IIF = 0xa |
| 1788 | NFTA_TRACE_IIFTYPE = 0xb |
| 1789 | NFTA_TRACE_OIF = 0xc |
| 1790 | NFTA_TRACE_OIFTYPE = 0xd |
| 1791 | NFTA_TRACE_MARK = 0xe |
| 1792 | NFTA_TRACE_NFPROTO = 0xf |
| 1793 | NFTA_TRACE_POLICY = 0x10 |
| 1794 | NFTA_TRACE_PAD = 0x11 |
| 1795 | NFT_TRACETYPE_UNSPEC = 0x0 |
| 1796 | NFT_TRACETYPE_POLICY = 0x1 |
| 1797 | NFT_TRACETYPE_RETURN = 0x2 |
| 1798 | NFT_TRACETYPE_RULE = 0x3 |
| 1799 | NFTA_NG_UNSPEC = 0x0 |
| 1800 | NFTA_NG_DREG = 0x1 |
| 1801 | NFTA_NG_MODULUS = 0x2 |
| 1802 | NFTA_NG_TYPE = 0x3 |
| 1803 | NFTA_NG_OFFSET = 0x4 |
| 1804 | NFT_NG_INCREMENTAL = 0x0 |
| 1805 | NFT_NG_RANDOM = 0x1 |
| 1806 | ) |
| 1807 | |
| 1808 | type RTCTime struct { |
| 1809 | Sec int32 |
| 1810 | Min int32 |
| 1811 | Hour int32 |
| 1812 | Mday int32 |
| 1813 | Mon int32 |
| 1814 | Year int32 |
| 1815 | Wday int32 |
| 1816 | Yday int32 |
| 1817 | Isdst int32 |
| 1818 | } |
| 1819 | |
| 1820 | type RTCWkAlrm struct { |
| 1821 | Enabled uint8 |
| 1822 | Pending uint8 |
| 1823 | _ [2]byte |
| 1824 | Time RTCTime |
| 1825 | } |
| 1826 | |
| 1827 | type RTCPLLInfo struct { |
| 1828 | Ctrl int32 |
| 1829 | Value int32 |
| 1830 | Max int32 |
| 1831 | Min int32 |
| 1832 | Posmult int32 |
| 1833 | Negmult int32 |
| 1834 | Clock int32 |
| 1835 | } |