github.com/juelite/golang.org-x-sys@v0.0.0-20181121071242-7b69e1c5db33/unix/ztypes_linux_386.go (about) 1 // +build 386,linux 2 // Created by cgo -godefs - DO NOT EDIT 3 // cgo -godefs types_linux.go 4 5 package unix 6 7 const ( 8 sizeofPtr = 0x4 9 sizeofShort = 0x2 10 sizeofInt = 0x4 11 sizeofLong = 0x4 12 sizeofLongLong = 0x8 13 PathMax = 0x1000 14 ) 15 16 type ( 17 _C_short int16 18 _C_int int32 19 _C_long int32 20 _C_long_long int64 21 ) 22 23 type Timespec struct { 24 Sec int32 25 Nsec int32 26 } 27 28 type Timeval struct { 29 Sec int32 30 Usec int32 31 } 32 33 type Timex struct { 34 Modes uint32 35 Offset int32 36 Freq int32 37 Maxerror int32 38 Esterror int32 39 Status int32 40 Constant int32 41 Precision int32 42 Tolerance int32 43 Time Timeval 44 Tick int32 45 Ppsfreq int32 46 Jitter int32 47 Shift int32 48 Stabil int32 49 Jitcnt int32 50 Calcnt int32 51 Errcnt int32 52 Stbcnt int32 53 Tai int32 54 Pad_cgo_0 [44]byte 55 } 56 57 type Time_t int32 58 59 type Tms struct { 60 Utime int32 61 Stime int32 62 Cutime int32 63 Cstime int32 64 } 65 66 type Utimbuf struct { 67 Actime int32 68 Modtime int32 69 } 70 71 type Rusage struct { 72 Utime Timeval 73 Stime Timeval 74 Maxrss int32 75 Ixrss int32 76 Idrss int32 77 Isrss int32 78 Minflt int32 79 Majflt int32 80 Nswap int32 81 Inblock int32 82 Oublock int32 83 Msgsnd int32 84 Msgrcv int32 85 Nsignals int32 86 Nvcsw int32 87 Nivcsw int32 88 } 89 90 type Rlimit struct { 91 Cur uint64 92 Max uint64 93 } 94 95 type _Gid_t uint32 96 97 type Stat_t struct { 98 Dev uint64 99 X__pad1 uint16 100 Pad_cgo_0 [2]byte 101 X__st_ino uint32 102 Mode uint32 103 Nlink uint32 104 Uid uint32 105 Gid uint32 106 Rdev uint64 107 X__pad2 uint16 108 Pad_cgo_1 [2]byte 109 Size int64 110 Blksize int32 111 Blocks int64 112 Atim Timespec 113 Mtim Timespec 114 Ctim Timespec 115 Ino uint64 116 } 117 118 type Statfs_t struct { 119 Type int32 120 Bsize int32 121 Blocks uint64 122 Bfree uint64 123 Bavail uint64 124 Files uint64 125 Ffree uint64 126 Fsid Fsid 127 Namelen int32 128 Frsize int32 129 Flags int32 130 Spare [4]int32 131 } 132 133 type Dirent struct { 134 Ino uint64 135 Off int64 136 Reclen uint16 137 Type uint8 138 Name [256]int8 139 Pad_cgo_0 [1]byte 140 } 141 142 type Fsid struct { 143 X__val [2]int32 144 } 145 146 type Flock_t struct { 147 Type int16 148 Whence int16 149 Start int64 150 Len int64 151 Pid int32 152 } 153 154 const ( 155 FADV_NORMAL = 0x0 156 FADV_RANDOM = 0x1 157 FADV_SEQUENTIAL = 0x2 158 FADV_WILLNEED = 0x3 159 FADV_DONTNEED = 0x4 160 FADV_NOREUSE = 0x5 161 ) 162 163 type RawSockaddrInet4 struct { 164 Family uint16 165 Port uint16 166 Addr [4]byte /* in_addr */ 167 Zero [8]uint8 168 } 169 170 type RawSockaddrInet6 struct { 171 Family uint16 172 Port uint16 173 Flowinfo uint32 174 Addr [16]byte /* in6_addr */ 175 Scope_id uint32 176 } 177 178 type RawSockaddrUnix struct { 179 Family uint16 180 Path [108]int8 181 } 182 183 type RawSockaddrLinklayer struct { 184 Family uint16 185 Protocol uint16 186 Ifindex int32 187 Hatype uint16 188 Pkttype uint8 189 Halen uint8 190 Addr [8]uint8 191 } 192 193 type RawSockaddrNetlink struct { 194 Family uint16 195 Pad uint16 196 Pid uint32 197 Groups uint32 198 } 199 200 type RawSockaddrHCI struct { 201 Family uint16 202 Dev uint16 203 Channel uint16 204 } 205 206 type RawSockaddrCAN struct { 207 Family uint16 208 Pad_cgo_0 [2]byte 209 Ifindex int32 210 Addr [8]byte 211 } 212 213 type RawSockaddr struct { 214 Family uint16 215 Data [14]int8 216 } 217 218 type RawSockaddrAny struct { 219 Addr RawSockaddr 220 Pad [96]int8 221 } 222 223 type _Socklen uint32 224 225 type Linger struct { 226 Onoff int32 227 Linger int32 228 } 229 230 type Iovec struct { 231 Base *byte 232 Len uint32 233 } 234 235 type IPMreq struct { 236 Multiaddr [4]byte /* in_addr */ 237 Interface [4]byte /* in_addr */ 238 } 239 240 type IPMreqn struct { 241 Multiaddr [4]byte /* in_addr */ 242 Address [4]byte /* in_addr */ 243 Ifindex int32 244 } 245 246 type IPv6Mreq struct { 247 Multiaddr [16]byte /* in6_addr */ 248 Interface uint32 249 } 250 251 type Msghdr struct { 252 Name *byte 253 Namelen uint32 254 Iov *Iovec 255 Iovlen uint32 256 Control *byte 257 Controllen uint32 258 Flags int32 259 } 260 261 type Cmsghdr struct { 262 Len uint32 263 Level int32 264 Type int32 265 X__cmsg_data [0]uint8 266 } 267 268 type Inet4Pktinfo struct { 269 Ifindex int32 270 Spec_dst [4]byte /* in_addr */ 271 Addr [4]byte /* in_addr */ 272 } 273 274 type Inet6Pktinfo struct { 275 Addr [16]byte /* in6_addr */ 276 Ifindex uint32 277 } 278 279 type IPv6MTUInfo struct { 280 Addr RawSockaddrInet6 281 Mtu uint32 282 } 283 284 type ICMPv6Filter struct { 285 Data [8]uint32 286 } 287 288 type Ucred struct { 289 Pid int32 290 Uid uint32 291 Gid uint32 292 } 293 294 type TCPInfo struct { 295 State uint8 296 Ca_state uint8 297 Retransmits uint8 298 Probes uint8 299 Backoff uint8 300 Options uint8 301 Pad_cgo_0 [2]byte 302 Rto uint32 303 Ato uint32 304 Snd_mss uint32 305 Rcv_mss uint32 306 Unacked uint32 307 Sacked uint32 308 Lost uint32 309 Retrans uint32 310 Fackets uint32 311 Last_data_sent uint32 312 Last_ack_sent uint32 313 Last_data_recv uint32 314 Last_ack_recv uint32 315 Pmtu uint32 316 Rcv_ssthresh uint32 317 Rtt uint32 318 Rttvar uint32 319 Snd_ssthresh uint32 320 Snd_cwnd uint32 321 Advmss uint32 322 Reordering uint32 323 Rcv_rtt uint32 324 Rcv_space uint32 325 Total_retrans uint32 326 } 327 328 const ( 329 SizeofSockaddrInet4 = 0x10 330 SizeofSockaddrInet6 = 0x1c 331 SizeofSockaddrAny = 0x70 332 SizeofSockaddrUnix = 0x6e 333 SizeofSockaddrLinklayer = 0x14 334 SizeofSockaddrNetlink = 0xc 335 SizeofSockaddrHCI = 0x6 336 SizeofSockaddrCAN = 0x10 337 SizeofLinger = 0x8 338 SizeofIPMreq = 0x8 339 SizeofIPMreqn = 0xc 340 SizeofIPv6Mreq = 0x14 341 SizeofMsghdr = 0x1c 342 SizeofCmsghdr = 0xc 343 SizeofInet4Pktinfo = 0xc 344 SizeofInet6Pktinfo = 0x14 345 SizeofIPv6MTUInfo = 0x20 346 SizeofICMPv6Filter = 0x20 347 SizeofUcred = 0xc 348 SizeofTCPInfo = 0x68 349 ) 350 351 const ( 352 IFA_UNSPEC = 0x0 353 IFA_ADDRESS = 0x1 354 IFA_LOCAL = 0x2 355 IFA_LABEL = 0x3 356 IFA_BROADCAST = 0x4 357 IFA_ANYCAST = 0x5 358 IFA_CACHEINFO = 0x6 359 IFA_MULTICAST = 0x7 360 IFLA_UNSPEC = 0x0 361 IFLA_ADDRESS = 0x1 362 IFLA_BROADCAST = 0x2 363 IFLA_IFNAME = 0x3 364 IFLA_MTU = 0x4 365 IFLA_LINK = 0x5 366 IFLA_QDISC = 0x6 367 IFLA_STATS = 0x7 368 IFLA_COST = 0x8 369 IFLA_PRIORITY = 0x9 370 IFLA_MASTER = 0xa 371 IFLA_WIRELESS = 0xb 372 IFLA_PROTINFO = 0xc 373 IFLA_TXQLEN = 0xd 374 IFLA_MAP = 0xe 375 IFLA_WEIGHT = 0xf 376 IFLA_OPERSTATE = 0x10 377 IFLA_LINKMODE = 0x11 378 IFLA_LINKINFO = 0x12 379 IFLA_NET_NS_PID = 0x13 380 IFLA_IFALIAS = 0x14 381 IFLA_MAX = 0x1d 382 RT_SCOPE_UNIVERSE = 0x0 383 RT_SCOPE_SITE = 0xc8 384 RT_SCOPE_LINK = 0xfd 385 RT_SCOPE_HOST = 0xfe 386 RT_SCOPE_NOWHERE = 0xff 387 RT_TABLE_UNSPEC = 0x0 388 RT_TABLE_COMPAT = 0xfc 389 RT_TABLE_DEFAULT = 0xfd 390 RT_TABLE_MAIN = 0xfe 391 RT_TABLE_LOCAL = 0xff 392 RT_TABLE_MAX = 0xffffffff 393 RTA_UNSPEC = 0x0 394 RTA_DST = 0x1 395 RTA_SRC = 0x2 396 RTA_IIF = 0x3 397 RTA_OIF = 0x4 398 RTA_GATEWAY = 0x5 399 RTA_PRIORITY = 0x6 400 RTA_PREFSRC = 0x7 401 RTA_METRICS = 0x8 402 RTA_MULTIPATH = 0x9 403 RTA_FLOW = 0xb 404 RTA_CACHEINFO = 0xc 405 RTA_TABLE = 0xf 406 RTN_UNSPEC = 0x0 407 RTN_UNICAST = 0x1 408 RTN_LOCAL = 0x2 409 RTN_BROADCAST = 0x3 410 RTN_ANYCAST = 0x4 411 RTN_MULTICAST = 0x5 412 RTN_BLACKHOLE = 0x6 413 RTN_UNREACHABLE = 0x7 414 RTN_PROHIBIT = 0x8 415 RTN_THROW = 0x9 416 RTN_NAT = 0xa 417 RTN_XRESOLVE = 0xb 418 RTNLGRP_NONE = 0x0 419 RTNLGRP_LINK = 0x1 420 RTNLGRP_NOTIFY = 0x2 421 RTNLGRP_NEIGH = 0x3 422 RTNLGRP_TC = 0x4 423 RTNLGRP_IPV4_IFADDR = 0x5 424 RTNLGRP_IPV4_MROUTE = 0x6 425 RTNLGRP_IPV4_ROUTE = 0x7 426 RTNLGRP_IPV4_RULE = 0x8 427 RTNLGRP_IPV6_IFADDR = 0x9 428 RTNLGRP_IPV6_MROUTE = 0xa 429 RTNLGRP_IPV6_ROUTE = 0xb 430 RTNLGRP_IPV6_IFINFO = 0xc 431 RTNLGRP_IPV6_PREFIX = 0x12 432 RTNLGRP_IPV6_RULE = 0x13 433 RTNLGRP_ND_USEROPT = 0x14 434 SizeofNlMsghdr = 0x10 435 SizeofNlMsgerr = 0x14 436 SizeofRtGenmsg = 0x1 437 SizeofNlAttr = 0x4 438 SizeofRtAttr = 0x4 439 SizeofIfInfomsg = 0x10 440 SizeofIfAddrmsg = 0x8 441 SizeofRtMsg = 0xc 442 SizeofRtNexthop = 0x8 443 ) 444 445 type NlMsghdr struct { 446 Len uint32 447 Type uint16 448 Flags uint16 449 Seq uint32 450 Pid uint32 451 } 452 453 type NlMsgerr struct { 454 Error int32 455 Msg NlMsghdr 456 } 457 458 type RtGenmsg struct { 459 Family uint8 460 } 461 462 type NlAttr struct { 463 Len uint16 464 Type uint16 465 } 466 467 type RtAttr struct { 468 Len uint16 469 Type uint16 470 } 471 472 type IfInfomsg struct { 473 Family uint8 474 X__ifi_pad uint8 475 Type uint16 476 Index int32 477 Flags uint32 478 Change uint32 479 } 480 481 type IfAddrmsg struct { 482 Family uint8 483 Prefixlen uint8 484 Flags uint8 485 Scope uint8 486 Index uint32 487 } 488 489 type RtMsg struct { 490 Family uint8 491 Dst_len uint8 492 Src_len uint8 493 Tos uint8 494 Table uint8 495 Protocol uint8 496 Scope uint8 497 Type uint8 498 Flags uint32 499 } 500 501 type RtNexthop struct { 502 Len uint16 503 Flags uint8 504 Hops uint8 505 Ifindex int32 506 } 507 508 const ( 509 SizeofSockFilter = 0x8 510 SizeofSockFprog = 0x8 511 ) 512 513 type SockFilter struct { 514 Code uint16 515 Jt uint8 516 Jf uint8 517 K uint32 518 } 519 520 type SockFprog struct { 521 Len uint16 522 Pad_cgo_0 [2]byte 523 Filter *SockFilter 524 } 525 526 type InotifyEvent struct { 527 Wd int32 528 Mask uint32 529 Cookie uint32 530 Len uint32 531 Name [0]int8 532 } 533 534 const SizeofInotifyEvent = 0x10 535 536 type PtraceRegs struct { 537 Ebx int32 538 Ecx int32 539 Edx int32 540 Esi int32 541 Edi int32 542 Ebp int32 543 Eax int32 544 Xds int32 545 Xes int32 546 Xfs int32 547 Xgs int32 548 Orig_eax int32 549 Eip int32 550 Xcs int32 551 Eflags int32 552 Esp int32 553 Xss int32 554 } 555 556 type FdSet struct { 557 Bits [32]int32 558 } 559 560 type Sysinfo_t struct { 561 Uptime int32 562 Loads [3]uint32 563 Totalram uint32 564 Freeram uint32 565 Sharedram uint32 566 Bufferram uint32 567 Totalswap uint32 568 Freeswap uint32 569 Procs uint16 570 Pad uint16 571 Totalhigh uint32 572 Freehigh uint32 573 Unit uint32 574 X_f [8]int8 575 } 576 577 type Utsname struct { 578 Sysname [65]int8 579 Nodename [65]int8 580 Release [65]int8 581 Version [65]int8 582 Machine [65]int8 583 Domainname [65]int8 584 } 585 586 type Ustat_t struct { 587 Tfree int32 588 Tinode uint32 589 Fname [6]int8 590 Fpack [6]int8 591 } 592 593 type EpollEvent struct { 594 Events uint32 595 Fd int32 596 Pad int32 597 } 598 599 const ( 600 AT_FDCWD = -0x64 601 AT_REMOVEDIR = 0x200 602 AT_SYMLINK_FOLLOW = 0x400 603 AT_SYMLINK_NOFOLLOW = 0x100 604 ) 605 606 type PollFd struct { 607 Fd int32 608 Events int16 609 Revents int16 610 } 611 612 const ( 613 POLLIN = 0x1 614 POLLPRI = 0x2 615 POLLOUT = 0x4 616 POLLRDHUP = 0x2000 617 POLLERR = 0x8 618 POLLHUP = 0x10 619 POLLNVAL = 0x20 620 ) 621 622 type Sigset_t struct { 623 X__val [16]uint64 624 } 625 626 type Termios struct { 627 Iflag uint32 628 Oflag uint32 629 Cflag uint32 630 Lflag uint32 631 Line uint8 632 Cc [19]uint8 633 Ispeed uint32 634 Ospeed uint32 635 }