Joe Richey | ea9bcad | 2017-03-08 10:50:27 -0800 | [diff] [blame] | 1 | // cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char linux/types.go | go run mkpost.go |
| 2 | // Code generated by the command above; see README.md. DO NOT EDIT. |
| 3 | |
Michael Munday | 33267e0 | 2016-05-11 12:29:03 -0400 | [diff] [blame] | 4 | // +build s390x,linux |
Michael Munday | 33267e0 | 2016-05-11 12:29:03 -0400 | [diff] [blame] | 5 | |
| 6 | package unix |
| 7 | |
| 8 | const ( |
| 9 | sizeofPtr = 0x8 |
| 10 | sizeofShort = 0x2 |
| 11 | sizeofInt = 0x4 |
| 12 | sizeofLong = 0x8 |
| 13 | sizeofLongLong = 0x8 |
| 14 | PathMax = 0x1000 |
| 15 | ) |
| 16 | |
| 17 | type ( |
| 18 | _C_short int16 |
| 19 | _C_int int32 |
| 20 | _C_long int64 |
| 21 | _C_long_long int64 |
| 22 | ) |
| 23 | |
| 24 | type Timespec struct { |
| 25 | Sec int64 |
| 26 | Nsec int64 |
| 27 | } |
| 28 | |
| 29 | type Timeval struct { |
| 30 | Sec int64 |
| 31 | Usec int64 |
| 32 | } |
| 33 | |
| 34 | type 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 | |
| 61 | type Time_t int64 |
| 62 | |
| 63 | type Tms struct { |
| 64 | Utime int64 |
| 65 | Stime int64 |
| 66 | Cutime int64 |
| 67 | Cstime int64 |
| 68 | } |
| 69 | |
| 70 | type Utimbuf struct { |
| 71 | Actime int64 |
| 72 | Modtime int64 |
| 73 | } |
| 74 | |
| 75 | type 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 | |
| 94 | type Rlimit struct { |
| 95 | Cur uint64 |
| 96 | Max uint64 |
| 97 | } |
| 98 | |
| 99 | type _Gid_t uint32 |
| 100 | |
| 101 | type Stat_t struct { |
| 102 | Dev uint64 |
| 103 | Ino uint64 |
| 104 | Nlink uint64 |
| 105 | Mode uint32 |
| 106 | Uid uint32 |
| 107 | Gid uint32 |
| 108 | _ int32 |
| 109 | Rdev uint64 |
| 110 | Size int64 |
| 111 | Atim Timespec |
| 112 | Mtim Timespec |
| 113 | Ctim Timespec |
| 114 | Blksize int64 |
| 115 | Blocks int64 |
| 116 | _ [3]int64 |
| 117 | } |
| 118 | |
| 119 | type Statfs_t struct { |
| 120 | Type uint32 |
| 121 | Bsize uint32 |
| 122 | Blocks uint64 |
| 123 | Bfree uint64 |
| 124 | Bavail uint64 |
| 125 | Files uint64 |
| 126 | Ffree uint64 |
| 127 | Fsid Fsid |
| 128 | Namelen uint32 |
| 129 | Frsize uint32 |
| 130 | Flags uint32 |
| 131 | Spare [4]uint32 |
| 132 | _ [4]byte |
| 133 | } |
| 134 | |
Tobias Klauser | fff93fa | 2018-01-12 10:54:32 +0100 | [diff] [blame^] | 135 | type StatxTimestamp struct { |
| 136 | Sec int64 |
| 137 | Nsec uint32 |
| 138 | _ int32 |
| 139 | } |
| 140 | |
| 141 | type Statx_t struct { |
| 142 | Mask uint32 |
| 143 | Blksize uint32 |
| 144 | Attributes uint64 |
| 145 | Nlink uint32 |
| 146 | Uid uint32 |
| 147 | Gid uint32 |
| 148 | Mode uint16 |
| 149 | _ [1]uint16 |
| 150 | Ino uint64 |
| 151 | Size uint64 |
| 152 | Blocks uint64 |
| 153 | Attributes_mask uint64 |
| 154 | Atime StatxTimestamp |
| 155 | Btime StatxTimestamp |
| 156 | Ctime StatxTimestamp |
| 157 | Mtime StatxTimestamp |
| 158 | Rdev_major uint32 |
| 159 | Rdev_minor uint32 |
| 160 | Dev_major uint32 |
| 161 | Dev_minor uint32 |
| 162 | _ [14]uint64 |
| 163 | } |
| 164 | |
Michael Munday | 33267e0 | 2016-05-11 12:29:03 -0400 | [diff] [blame] | 165 | type Dirent struct { |
| 166 | Ino uint64 |
| 167 | Off int64 |
| 168 | Reclen uint16 |
| 169 | Type uint8 |
| 170 | Name [256]int8 |
| 171 | _ [5]byte |
| 172 | } |
| 173 | |
| 174 | type Fsid struct { |
| 175 | _ [2]int32 |
| 176 | } |
| 177 | |
| 178 | type Flock_t struct { |
| 179 | Type int16 |
| 180 | Whence int16 |
| 181 | _ [4]byte |
| 182 | Start int64 |
| 183 | Len int64 |
| 184 | Pid int32 |
| 185 | _ [4]byte |
| 186 | } |
| 187 | |
joerichey@google.com | 8c0a5ea | 2017-04-04 16:46:32 +0000 | [diff] [blame] | 188 | type FscryptPolicy struct { |
| 189 | Version uint8 |
| 190 | Contents_encryption_mode uint8 |
| 191 | Filenames_encryption_mode uint8 |
| 192 | Flags uint8 |
| 193 | Master_key_descriptor [8]uint8 |
| 194 | } |
| 195 | |
| 196 | type FscryptKey struct { |
| 197 | Mode uint32 |
| 198 | Raw [64]uint8 |
| 199 | Size uint32 |
| 200 | } |
| 201 | |
Joe Richey joerichey@google.com | a2e06a1 | 2017-04-21 23:22:19 +0000 | [diff] [blame] | 202 | type KeyctlDHParams struct { |
| 203 | Private int32 |
| 204 | Prime int32 |
| 205 | Base int32 |
| 206 | } |
| 207 | |
Michael Munday | 33267e0 | 2016-05-11 12:29:03 -0400 | [diff] [blame] | 208 | const ( |
| 209 | FADV_NORMAL = 0x0 |
| 210 | FADV_RANDOM = 0x1 |
| 211 | FADV_SEQUENTIAL = 0x2 |
| 212 | FADV_WILLNEED = 0x3 |
| 213 | FADV_DONTNEED = 0x6 |
| 214 | FADV_NOREUSE = 0x7 |
| 215 | ) |
| 216 | |
| 217 | type RawSockaddrInet4 struct { |
| 218 | Family uint16 |
| 219 | Port uint16 |
| 220 | Addr [4]byte /* in_addr */ |
| 221 | Zero [8]uint8 |
| 222 | } |
| 223 | |
| 224 | type RawSockaddrInet6 struct { |
| 225 | Family uint16 |
| 226 | Port uint16 |
| 227 | Flowinfo uint32 |
| 228 | Addr [16]byte /* in6_addr */ |
| 229 | Scope_id uint32 |
| 230 | } |
| 231 | |
| 232 | type RawSockaddrUnix struct { |
| 233 | Family uint16 |
| 234 | Path [108]int8 |
| 235 | } |
| 236 | |
| 237 | type RawSockaddrLinklayer struct { |
| 238 | Family uint16 |
| 239 | Protocol uint16 |
| 240 | Ifindex int32 |
| 241 | Hatype uint16 |
| 242 | Pkttype uint8 |
| 243 | Halen uint8 |
| 244 | Addr [8]uint8 |
| 245 | } |
| 246 | |
| 247 | type RawSockaddrNetlink struct { |
| 248 | Family uint16 |
| 249 | Pad uint16 |
| 250 | Pid uint32 |
| 251 | Groups uint32 |
| 252 | } |
| 253 | |
| 254 | type RawSockaddrHCI struct { |
| 255 | Family uint16 |
| 256 | Dev uint16 |
| 257 | Channel uint16 |
| 258 | } |
| 259 | |
Elliot Morrison-Reed | 30237cf | 2016-11-19 16:29:01 +0100 | [diff] [blame] | 260 | type RawSockaddrCAN struct { |
Joe Richey | ea9bcad | 2017-03-08 10:50:27 -0800 | [diff] [blame] | 261 | Family uint16 |
| 262 | _ [2]byte |
| 263 | Ifindex int32 |
| 264 | Addr [8]byte |
Elliot Morrison-Reed | 30237cf | 2016-11-19 16:29:01 +0100 | [diff] [blame] | 265 | } |
| 266 | |
Matt Layher | e24f485 | 2017-02-10 21:03:03 -0500 | [diff] [blame] | 267 | type RawSockaddrALG struct { |
| 268 | Family uint16 |
| 269 | Type [14]uint8 |
| 270 | Feat uint32 |
| 271 | Mask uint32 |
| 272 | Name [64]uint8 |
| 273 | } |
| 274 | |
Matt Layher | d67a327 | 2017-03-07 20:18:38 -0500 | [diff] [blame] | 275 | type RawSockaddrVM struct { |
| 276 | Family uint16 |
| 277 | Reserved1 uint16 |
| 278 | Port uint32 |
| 279 | Cid uint32 |
| 280 | Zero [4]uint8 |
| 281 | } |
| 282 | |
Michael Munday | 33267e0 | 2016-05-11 12:29:03 -0400 | [diff] [blame] | 283 | type RawSockaddr struct { |
| 284 | Family uint16 |
| 285 | Data [14]int8 |
| 286 | } |
| 287 | |
| 288 | type RawSockaddrAny struct { |
| 289 | Addr RawSockaddr |
| 290 | Pad [96]int8 |
| 291 | } |
| 292 | |
| 293 | type _Socklen uint32 |
| 294 | |
| 295 | type Linger struct { |
| 296 | Onoff int32 |
| 297 | Linger int32 |
| 298 | } |
| 299 | |
| 300 | type Iovec struct { |
| 301 | Base *byte |
| 302 | Len uint64 |
| 303 | } |
| 304 | |
| 305 | type IPMreq struct { |
| 306 | Multiaddr [4]byte /* in_addr */ |
| 307 | Interface [4]byte /* in_addr */ |
| 308 | } |
| 309 | |
| 310 | type IPMreqn struct { |
| 311 | Multiaddr [4]byte /* in_addr */ |
| 312 | Address [4]byte /* in_addr */ |
| 313 | Ifindex int32 |
| 314 | } |
| 315 | |
| 316 | type IPv6Mreq struct { |
| 317 | Multiaddr [16]byte /* in6_addr */ |
| 318 | Interface uint32 |
| 319 | } |
| 320 | |
Matt Layher | 7716a56 | 2017-07-28 11:08:13 -0400 | [diff] [blame] | 321 | type PacketMreq struct { |
| 322 | Ifindex int32 |
| 323 | Type uint16 |
| 324 | Alen uint16 |
| 325 | Address [8]uint8 |
| 326 | } |
| 327 | |
Michael Munday | 33267e0 | 2016-05-11 12:29:03 -0400 | [diff] [blame] | 328 | type Msghdr struct { |
| 329 | Name *byte |
| 330 | Namelen uint32 |
| 331 | _ [4]byte |
| 332 | Iov *Iovec |
| 333 | Iovlen uint64 |
| 334 | Control *byte |
| 335 | Controllen uint64 |
| 336 | Flags int32 |
| 337 | _ [4]byte |
| 338 | } |
| 339 | |
| 340 | type Cmsghdr struct { |
| 341 | Len uint64 |
| 342 | Level int32 |
| 343 | Type int32 |
| 344 | } |
| 345 | |
| 346 | type Inet4Pktinfo struct { |
| 347 | Ifindex int32 |
| 348 | Spec_dst [4]byte /* in_addr */ |
| 349 | Addr [4]byte /* in_addr */ |
| 350 | } |
| 351 | |
| 352 | type Inet6Pktinfo struct { |
| 353 | Addr [16]byte /* in6_addr */ |
| 354 | Ifindex uint32 |
| 355 | } |
| 356 | |
| 357 | type IPv6MTUInfo struct { |
| 358 | Addr RawSockaddrInet6 |
| 359 | Mtu uint32 |
| 360 | } |
| 361 | |
| 362 | type ICMPv6Filter struct { |
| 363 | Data [8]uint32 |
| 364 | } |
| 365 | |
| 366 | type Ucred struct { |
| 367 | Pid int32 |
| 368 | Uid uint32 |
| 369 | Gid uint32 |
| 370 | } |
| 371 | |
| 372 | type TCPInfo struct { |
| 373 | State uint8 |
| 374 | Ca_state uint8 |
| 375 | Retransmits uint8 |
| 376 | Probes uint8 |
| 377 | Backoff uint8 |
| 378 | Options uint8 |
| 379 | _ [2]byte |
| 380 | Rto uint32 |
| 381 | Ato uint32 |
| 382 | Snd_mss uint32 |
| 383 | Rcv_mss uint32 |
| 384 | Unacked uint32 |
| 385 | Sacked uint32 |
| 386 | Lost uint32 |
| 387 | Retrans uint32 |
| 388 | Fackets uint32 |
| 389 | Last_data_sent uint32 |
| 390 | Last_ack_sent uint32 |
| 391 | Last_data_recv uint32 |
| 392 | Last_ack_recv uint32 |
| 393 | Pmtu uint32 |
| 394 | Rcv_ssthresh uint32 |
| 395 | Rtt uint32 |
| 396 | Rttvar uint32 |
| 397 | Snd_ssthresh uint32 |
| 398 | Snd_cwnd uint32 |
| 399 | Advmss uint32 |
| 400 | Reordering uint32 |
| 401 | Rcv_rtt uint32 |
| 402 | Rcv_space uint32 |
| 403 | Total_retrans uint32 |
| 404 | } |
| 405 | |
| 406 | const ( |
| 407 | SizeofSockaddrInet4 = 0x10 |
| 408 | SizeofSockaddrInet6 = 0x1c |
| 409 | SizeofSockaddrAny = 0x70 |
| 410 | SizeofSockaddrUnix = 0x6e |
| 411 | SizeofSockaddrLinklayer = 0x14 |
| 412 | SizeofSockaddrNetlink = 0xc |
| 413 | SizeofSockaddrHCI = 0x6 |
Elliot Morrison-Reed | 30237cf | 2016-11-19 16:29:01 +0100 | [diff] [blame] | 414 | SizeofSockaddrCAN = 0x10 |
Matt Layher | e24f485 | 2017-02-10 21:03:03 -0500 | [diff] [blame] | 415 | SizeofSockaddrALG = 0x58 |
Matt Layher | d67a327 | 2017-03-07 20:18:38 -0500 | [diff] [blame] | 416 | SizeofSockaddrVM = 0x10 |
Michael Munday | 33267e0 | 2016-05-11 12:29:03 -0400 | [diff] [blame] | 417 | SizeofLinger = 0x8 |
Tobias Klauser | 515fc15 | 2017-07-28 17:08:36 +0200 | [diff] [blame] | 418 | SizeofIovec = 0x10 |
Michael Munday | 33267e0 | 2016-05-11 12:29:03 -0400 | [diff] [blame] | 419 | SizeofIPMreq = 0x8 |
| 420 | SizeofIPMreqn = 0xc |
| 421 | SizeofIPv6Mreq = 0x14 |
Matt Layher | 7716a56 | 2017-07-28 11:08:13 -0400 | [diff] [blame] | 422 | SizeofPacketMreq = 0x10 |
Michael Munday | 33267e0 | 2016-05-11 12:29:03 -0400 | [diff] [blame] | 423 | SizeofMsghdr = 0x38 |
| 424 | SizeofCmsghdr = 0x10 |
| 425 | SizeofInet4Pktinfo = 0xc |
| 426 | SizeofInet6Pktinfo = 0x14 |
| 427 | SizeofIPv6MTUInfo = 0x20 |
| 428 | SizeofICMPv6Filter = 0x20 |
| 429 | SizeofUcred = 0xc |
| 430 | SizeofTCPInfo = 0x68 |
| 431 | ) |
| 432 | |
| 433 | const ( |
| 434 | IFA_UNSPEC = 0x0 |
| 435 | IFA_ADDRESS = 0x1 |
| 436 | IFA_LOCAL = 0x2 |
| 437 | IFA_LABEL = 0x3 |
| 438 | IFA_BROADCAST = 0x4 |
| 439 | IFA_ANYCAST = 0x5 |
| 440 | IFA_CACHEINFO = 0x6 |
| 441 | IFA_MULTICAST = 0x7 |
| 442 | IFLA_UNSPEC = 0x0 |
| 443 | IFLA_ADDRESS = 0x1 |
| 444 | IFLA_BROADCAST = 0x2 |
| 445 | IFLA_IFNAME = 0x3 |
| 446 | IFLA_MTU = 0x4 |
| 447 | IFLA_LINK = 0x5 |
| 448 | IFLA_QDISC = 0x6 |
| 449 | IFLA_STATS = 0x7 |
| 450 | IFLA_COST = 0x8 |
| 451 | IFLA_PRIORITY = 0x9 |
| 452 | IFLA_MASTER = 0xa |
| 453 | IFLA_WIRELESS = 0xb |
| 454 | IFLA_PROTINFO = 0xc |
| 455 | IFLA_TXQLEN = 0xd |
| 456 | IFLA_MAP = 0xe |
| 457 | IFLA_WEIGHT = 0xf |
| 458 | IFLA_OPERSTATE = 0x10 |
| 459 | IFLA_LINKMODE = 0x11 |
| 460 | IFLA_LINKINFO = 0x12 |
| 461 | IFLA_NET_NS_PID = 0x13 |
| 462 | IFLA_IFALIAS = 0x14 |
Joe Richey joerichey@google.com | 31e1faf | 2017-09-05 23:52:07 +0000 | [diff] [blame] | 463 | IFLA_MAX = 0x2c |
Michael Munday | 33267e0 | 2016-05-11 12:29:03 -0400 | [diff] [blame] | 464 | RT_SCOPE_UNIVERSE = 0x0 |
| 465 | RT_SCOPE_SITE = 0xc8 |
| 466 | RT_SCOPE_LINK = 0xfd |
| 467 | RT_SCOPE_HOST = 0xfe |
| 468 | RT_SCOPE_NOWHERE = 0xff |
| 469 | RT_TABLE_UNSPEC = 0x0 |
| 470 | RT_TABLE_COMPAT = 0xfc |
| 471 | RT_TABLE_DEFAULT = 0xfd |
| 472 | RT_TABLE_MAIN = 0xfe |
| 473 | RT_TABLE_LOCAL = 0xff |
| 474 | RT_TABLE_MAX = 0xffffffff |
| 475 | RTA_UNSPEC = 0x0 |
| 476 | RTA_DST = 0x1 |
| 477 | RTA_SRC = 0x2 |
| 478 | RTA_IIF = 0x3 |
| 479 | RTA_OIF = 0x4 |
| 480 | RTA_GATEWAY = 0x5 |
| 481 | RTA_PRIORITY = 0x6 |
| 482 | RTA_PREFSRC = 0x7 |
| 483 | RTA_METRICS = 0x8 |
| 484 | RTA_MULTIPATH = 0x9 |
| 485 | RTA_FLOW = 0xb |
| 486 | RTA_CACHEINFO = 0xc |
| 487 | RTA_TABLE = 0xf |
| 488 | RTN_UNSPEC = 0x0 |
| 489 | RTN_UNICAST = 0x1 |
| 490 | RTN_LOCAL = 0x2 |
| 491 | RTN_BROADCAST = 0x3 |
| 492 | RTN_ANYCAST = 0x4 |
| 493 | RTN_MULTICAST = 0x5 |
| 494 | RTN_BLACKHOLE = 0x6 |
| 495 | RTN_UNREACHABLE = 0x7 |
| 496 | RTN_PROHIBIT = 0x8 |
| 497 | RTN_THROW = 0x9 |
| 498 | RTN_NAT = 0xa |
| 499 | RTN_XRESOLVE = 0xb |
| 500 | RTNLGRP_NONE = 0x0 |
| 501 | RTNLGRP_LINK = 0x1 |
| 502 | RTNLGRP_NOTIFY = 0x2 |
| 503 | RTNLGRP_NEIGH = 0x3 |
| 504 | RTNLGRP_TC = 0x4 |
| 505 | RTNLGRP_IPV4_IFADDR = 0x5 |
| 506 | RTNLGRP_IPV4_MROUTE = 0x6 |
| 507 | RTNLGRP_IPV4_ROUTE = 0x7 |
| 508 | RTNLGRP_IPV4_RULE = 0x8 |
| 509 | RTNLGRP_IPV6_IFADDR = 0x9 |
| 510 | RTNLGRP_IPV6_MROUTE = 0xa |
| 511 | RTNLGRP_IPV6_ROUTE = 0xb |
| 512 | RTNLGRP_IPV6_IFINFO = 0xc |
| 513 | RTNLGRP_IPV6_PREFIX = 0x12 |
| 514 | RTNLGRP_IPV6_RULE = 0x13 |
| 515 | RTNLGRP_ND_USEROPT = 0x14 |
| 516 | SizeofNlMsghdr = 0x10 |
| 517 | SizeofNlMsgerr = 0x14 |
| 518 | SizeofRtGenmsg = 0x1 |
| 519 | SizeofNlAttr = 0x4 |
| 520 | SizeofRtAttr = 0x4 |
| 521 | SizeofIfInfomsg = 0x10 |
| 522 | SizeofIfAddrmsg = 0x8 |
| 523 | SizeofRtMsg = 0xc |
| 524 | SizeofRtNexthop = 0x8 |
| 525 | ) |
| 526 | |
| 527 | type NlMsghdr struct { |
| 528 | Len uint32 |
| 529 | Type uint16 |
| 530 | Flags uint16 |
| 531 | Seq uint32 |
| 532 | Pid uint32 |
| 533 | } |
| 534 | |
| 535 | type NlMsgerr struct { |
| 536 | Error int32 |
| 537 | Msg NlMsghdr |
| 538 | } |
| 539 | |
| 540 | type RtGenmsg struct { |
| 541 | Family uint8 |
| 542 | } |
| 543 | |
| 544 | type NlAttr struct { |
| 545 | Len uint16 |
| 546 | Type uint16 |
| 547 | } |
| 548 | |
| 549 | type RtAttr struct { |
| 550 | Len uint16 |
| 551 | Type uint16 |
| 552 | } |
| 553 | |
| 554 | type IfInfomsg struct { |
| 555 | Family uint8 |
| 556 | _ uint8 |
| 557 | Type uint16 |
| 558 | Index int32 |
| 559 | Flags uint32 |
| 560 | Change uint32 |
| 561 | } |
| 562 | |
| 563 | type IfAddrmsg struct { |
| 564 | Family uint8 |
| 565 | Prefixlen uint8 |
| 566 | Flags uint8 |
| 567 | Scope uint8 |
| 568 | Index uint32 |
| 569 | } |
| 570 | |
| 571 | type RtMsg struct { |
| 572 | Family uint8 |
| 573 | Dst_len uint8 |
| 574 | Src_len uint8 |
| 575 | Tos uint8 |
| 576 | Table uint8 |
| 577 | Protocol uint8 |
| 578 | Scope uint8 |
| 579 | Type uint8 |
| 580 | Flags uint32 |
| 581 | } |
| 582 | |
| 583 | type RtNexthop struct { |
| 584 | Len uint16 |
| 585 | Flags uint8 |
| 586 | Hops uint8 |
| 587 | Ifindex int32 |
| 588 | } |
| 589 | |
| 590 | const ( |
| 591 | SizeofSockFilter = 0x8 |
| 592 | SizeofSockFprog = 0x10 |
| 593 | ) |
| 594 | |
| 595 | type SockFilter struct { |
| 596 | Code uint16 |
| 597 | Jt uint8 |
| 598 | Jf uint8 |
| 599 | K uint32 |
| 600 | } |
| 601 | |
| 602 | type SockFprog struct { |
| 603 | Len uint16 |
| 604 | _ [6]byte |
| 605 | Filter *SockFilter |
| 606 | } |
| 607 | |
| 608 | type InotifyEvent struct { |
| 609 | Wd int32 |
| 610 | Mask uint32 |
| 611 | Cookie uint32 |
| 612 | Len uint32 |
| 613 | } |
| 614 | |
| 615 | const SizeofInotifyEvent = 0x10 |
| 616 | |
| 617 | type PtraceRegs struct { |
| 618 | Psw PtracePsw |
| 619 | Gprs [16]uint64 |
| 620 | Acrs [16]uint32 |
| 621 | Orig_gpr2 uint64 |
| 622 | Fp_regs PtraceFpregs |
| 623 | Per_info PtracePer |
| 624 | Ieee_instruction_pointer uint64 |
| 625 | } |
| 626 | |
| 627 | type PtracePsw struct { |
| 628 | Mask uint64 |
| 629 | Addr uint64 |
| 630 | } |
| 631 | |
| 632 | type PtraceFpregs struct { |
| 633 | Fpc uint32 |
| 634 | _ [4]byte |
| 635 | Fprs [16]float64 |
| 636 | } |
| 637 | |
| 638 | type PtracePer struct { |
| 639 | _ [0]uint64 |
| 640 | _ [24]byte |
| 641 | _ [8]byte |
| 642 | Starting_addr uint64 |
| 643 | Ending_addr uint64 |
| 644 | Perc_atmid uint16 |
| 645 | _ [6]byte |
| 646 | Address uint64 |
| 647 | Access_id uint8 |
| 648 | _ [7]byte |
| 649 | } |
| 650 | |
| 651 | type FdSet struct { |
| 652 | Bits [16]int64 |
| 653 | } |
| 654 | |
| 655 | type Sysinfo_t struct { |
| 656 | Uptime int64 |
| 657 | Loads [3]uint64 |
| 658 | Totalram uint64 |
| 659 | Freeram uint64 |
| 660 | Sharedram uint64 |
| 661 | Bufferram uint64 |
| 662 | Totalswap uint64 |
| 663 | Freeswap uint64 |
| 664 | Procs uint16 |
| 665 | Pad uint16 |
| 666 | _ [4]byte |
| 667 | Totalhigh uint64 |
| 668 | Freehigh uint64 |
| 669 | Unit uint32 |
| 670 | _ [0]int8 |
| 671 | _ [4]byte |
| 672 | } |
| 673 | |
| 674 | type Utsname struct { |
Tobias Klauser | 4da7545 | 2017-10-30 12:35:14 +0100 | [diff] [blame] | 675 | Sysname [65]byte |
| 676 | Nodename [65]byte |
| 677 | Release [65]byte |
| 678 | Version [65]byte |
| 679 | Machine [65]byte |
| 680 | Domainname [65]byte |
Michael Munday | 33267e0 | 2016-05-11 12:29:03 -0400 | [diff] [blame] | 681 | } |
| 682 | |
| 683 | type Ustat_t struct { |
| 684 | Tfree int32 |
| 685 | _ [4]byte |
| 686 | Tinode uint64 |
| 687 | Fname [6]int8 |
| 688 | Fpack [6]int8 |
| 689 | _ [4]byte |
| 690 | } |
| 691 | |
| 692 | type EpollEvent struct { |
| 693 | Events uint32 |
| 694 | _ int32 |
| 695 | Fd int32 |
| 696 | Pad int32 |
| 697 | } |
| 698 | |
| 699 | const ( |
Tobias Klauser | fff93fa | 2018-01-12 10:54:32 +0100 | [diff] [blame^] | 700 | AT_EMPTY_PATH = 0x1000 |
| 701 | AT_FDCWD = -0x64 |
| 702 | AT_NO_AUTOMOUNT = 0x800 |
| 703 | AT_REMOVEDIR = 0x200 |
| 704 | |
| 705 | AT_STAT_ = 0x0 |
| 706 | AT_STAT_ = 0x2000 |
| 707 | AT_STAT_ = 0x4000 |
| 708 | |
Michael Munday | 33267e0 | 2016-05-11 12:29:03 -0400 | [diff] [blame] | 709 | AT_SYMLINK_FOLLOW = 0x400 |
| 710 | AT_SYMLINK_NOFOLLOW = 0x100 |
| 711 | ) |
| 712 | |
kortschak | 7f918dd | 2016-06-02 17:41:10 +0930 | [diff] [blame] | 713 | type PollFd struct { |
| 714 | Fd int32 |
| 715 | Events int16 |
| 716 | Revents int16 |
| 717 | } |
| 718 | |
| 719 | const ( |
| 720 | POLLIN = 0x1 |
| 721 | POLLPRI = 0x2 |
| 722 | POLLOUT = 0x4 |
| 723 | POLLRDHUP = 0x2000 |
| 724 | POLLERR = 0x8 |
| 725 | POLLHUP = 0x10 |
| 726 | POLLNVAL = 0x20 |
| 727 | ) |
| 728 | |
kortschak | 5a8c7f2 | 2016-06-14 14:28:28 +0930 | [diff] [blame] | 729 | type Sigset_t struct { |
Joe Richey | ea9bcad | 2017-03-08 10:50:27 -0800 | [diff] [blame] | 730 | _ [16]uint64 |
kortschak | 5a8c7f2 | 2016-06-14 14:28:28 +0930 | [diff] [blame] | 731 | } |
| 732 | |
Matt Layher | a55a760 | 2017-05-23 22:50:34 -0400 | [diff] [blame] | 733 | const RNDGETENTCNT = 0x80045200 |
| 734 | |
Tobias Klauser | 7397344 | 2017-07-07 13:51:12 +0200 | [diff] [blame] | 735 | const PERF_IOC_FLAG_GROUP = 0x1 |
| 736 | |
Michael Munday | 33267e0 | 2016-05-11 12:29:03 -0400 | [diff] [blame] | 737 | type Termios struct { |
| 738 | Iflag uint32 |
| 739 | Oflag uint32 |
| 740 | Cflag uint32 |
| 741 | Lflag uint32 |
| 742 | Line uint8 |
| 743 | Cc [19]uint8 |
| 744 | Ispeed uint32 |
| 745 | Ospeed uint32 |
| 746 | } |
Tobias Klauser | cd2c276 | 2017-07-17 12:05:24 +0200 | [diff] [blame] | 747 | |
| 748 | type Winsize struct { |
| 749 | Row uint16 |
| 750 | Col uint16 |
| 751 | Xpixel uint16 |
| 752 | Ypixel uint16 |
| 753 | } |
Matt Layher | 22e23b7 | 2017-08-25 11:04:33 -0400 | [diff] [blame] | 754 | |
| 755 | type Taskstats struct { |
| 756 | Version uint16 |
| 757 | _ [2]byte |
| 758 | Ac_exitcode uint32 |
| 759 | Ac_flag uint8 |
| 760 | Ac_nice uint8 |
| 761 | _ [6]byte |
| 762 | Cpu_count uint64 |
| 763 | Cpu_delay_total uint64 |
| 764 | Blkio_count uint64 |
| 765 | Blkio_delay_total uint64 |
| 766 | Swapin_count uint64 |
| 767 | Swapin_delay_total uint64 |
| 768 | Cpu_run_real_total uint64 |
| 769 | Cpu_run_virtual_total uint64 |
| 770 | Ac_comm [32]int8 |
| 771 | Ac_sched uint8 |
| 772 | Ac_pad [3]uint8 |
| 773 | _ [4]byte |
| 774 | Ac_uid uint32 |
| 775 | Ac_gid uint32 |
| 776 | Ac_pid uint32 |
| 777 | Ac_ppid uint32 |
| 778 | Ac_btime uint32 |
| 779 | _ [4]byte |
| 780 | Ac_etime uint64 |
| 781 | Ac_utime uint64 |
| 782 | Ac_stime uint64 |
| 783 | Ac_minflt uint64 |
| 784 | Ac_majflt uint64 |
| 785 | Coremem uint64 |
| 786 | Virtmem uint64 |
| 787 | Hiwater_rss uint64 |
| 788 | Hiwater_vm uint64 |
| 789 | Read_char uint64 |
| 790 | Write_char uint64 |
| 791 | Read_syscalls uint64 |
| 792 | Write_syscalls uint64 |
| 793 | Read_bytes uint64 |
| 794 | Write_bytes uint64 |
| 795 | Cancelled_write_bytes uint64 |
| 796 | Nvcsw uint64 |
| 797 | Nivcsw uint64 |
| 798 | Ac_utimescaled uint64 |
| 799 | Ac_stimescaled uint64 |
| 800 | Cpu_scaled_run_real_total uint64 |
| 801 | Freepages_count uint64 |
| 802 | Freepages_delay_total uint64 |
| 803 | } |
Matt Layher | 2d6f6f8 | 2017-08-25 14:47:02 -0400 | [diff] [blame] | 804 | |
| 805 | const ( |
| 806 | TASKSTATS_CMD_UNSPEC = 0x0 |
| 807 | TASKSTATS_CMD_GET = 0x1 |
| 808 | TASKSTATS_CMD_NEW = 0x2 |
| 809 | TASKSTATS_TYPE_UNSPEC = 0x0 |
| 810 | TASKSTATS_TYPE_PID = 0x1 |
| 811 | TASKSTATS_TYPE_TGID = 0x2 |
| 812 | TASKSTATS_TYPE_STATS = 0x3 |
| 813 | TASKSTATS_TYPE_AGGR_PID = 0x4 |
| 814 | TASKSTATS_TYPE_AGGR_TGID = 0x5 |
| 815 | TASKSTATS_TYPE_NULL = 0x6 |
| 816 | TASKSTATS_CMD_ATTR_UNSPEC = 0x0 |
| 817 | TASKSTATS_CMD_ATTR_PID = 0x1 |
| 818 | TASKSTATS_CMD_ATTR_TGID = 0x2 |
| 819 | TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 |
| 820 | TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 |
| 821 | ) |
Matt Layher | ab9e364 | 2017-08-29 10:47:16 -0400 | [diff] [blame] | 822 | |
Matt Layher | b9cf5f9 | 2018-01-09 11:40:16 -0500 | [diff] [blame] | 823 | type CGroupStats struct { |
| 824 | Sleeping uint64 |
| 825 | Running uint64 |
| 826 | Stopped uint64 |
| 827 | Uninterruptible uint64 |
| 828 | Io_wait uint64 |
| 829 | } |
| 830 | |
| 831 | const ( |
| 832 | CGROUPSTATS_CMD_UNSPEC = 0x3 |
| 833 | CGROUPSTATS_CMD_GET = 0x4 |
| 834 | CGROUPSTATS_CMD_NEW = 0x5 |
| 835 | CGROUPSTATS_TYPE_UNSPEC = 0x0 |
| 836 | CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 |
| 837 | CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 |
| 838 | CGROUPSTATS_CMD_ATTR_FD = 0x1 |
| 839 | ) |
| 840 | |
Matt Layher | ab9e364 | 2017-08-29 10:47:16 -0400 | [diff] [blame] | 841 | type Genlmsghdr struct { |
| 842 | Cmd uint8 |
| 843 | Version uint8 |
| 844 | Reserved uint16 |
| 845 | } |
| 846 | |
| 847 | const ( |
| 848 | CTRL_CMD_UNSPEC = 0x0 |
| 849 | CTRL_CMD_NEWFAMILY = 0x1 |
| 850 | CTRL_CMD_DELFAMILY = 0x2 |
| 851 | CTRL_CMD_GETFAMILY = 0x3 |
| 852 | CTRL_CMD_NEWOPS = 0x4 |
| 853 | CTRL_CMD_DELOPS = 0x5 |
| 854 | CTRL_CMD_GETOPS = 0x6 |
| 855 | CTRL_CMD_NEWMCAST_GRP = 0x7 |
| 856 | CTRL_CMD_DELMCAST_GRP = 0x8 |
| 857 | CTRL_CMD_GETMCAST_GRP = 0x9 |
| 858 | CTRL_ATTR_UNSPEC = 0x0 |
| 859 | CTRL_ATTR_FAMILY_ID = 0x1 |
| 860 | CTRL_ATTR_FAMILY_NAME = 0x2 |
| 861 | CTRL_ATTR_VERSION = 0x3 |
| 862 | CTRL_ATTR_HDRSIZE = 0x4 |
| 863 | CTRL_ATTR_MAXATTR = 0x5 |
| 864 | CTRL_ATTR_OPS = 0x6 |
| 865 | CTRL_ATTR_MCAST_GROUPS = 0x7 |
| 866 | CTRL_ATTR_OP_UNSPEC = 0x0 |
| 867 | CTRL_ATTR_OP_ID = 0x1 |
| 868 | CTRL_ATTR_OP_FLAGS = 0x2 |
| 869 | CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 |
| 870 | CTRL_ATTR_MCAST_GRP_NAME = 0x1 |
| 871 | CTRL_ATTR_MCAST_GRP_ID = 0x2 |
| 872 | ) |
Tobias Klauser | 12d9d5b | 2018-01-02 15:27:15 +0100 | [diff] [blame] | 873 | |
| 874 | type cpuMask uint64 |
| 875 | |
| 876 | const ( |
| 877 | _CPU_SETSIZE = 0x400 |
| 878 | _NCPUBITS = 0x40 |
| 879 | ) |