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