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