github.com/akaros/go-akaros@v0.0.0-20181004170632-85005d477eab/src/syscall/typestubs_akaros_amd64.go (about)

     1  // This file is a direct copy of ztypes_linux_amd64.go with some the types and
     2  // constants removed that we have already properly ported over to Akaros.  We
     3  // started with clone of linux and are slowly migrating things out of this file
     4  // and into the Akaros mainline as we get things working.
     5  
     6  package syscall
     7  
     8  type Timex struct {
     9  	Modes     uint32
    10  	Pad_cgo_0 [4]byte
    11  	Offset    int64
    12  	Freq      int64
    13  	Maxerror  int64
    14  	Esterror  int64
    15  	Status    int32
    16  	Pad_cgo_1 [4]byte
    17  	Constant  int64
    18  	Precision int64
    19  	Tolerance int64
    20  	Time      Timeval
    21  	Tick      int64
    22  	Ppsfreq   int64
    23  	Jitter    int64
    24  	Shift     int32
    25  	Pad_cgo_2 [4]byte
    26  	Stabil    int64
    27  	Jitcnt    int64
    28  	Calcnt    int64
    29  	Errcnt    int64
    30  	Stbcnt    int64
    31  	Tai       int32
    32  	Pad_cgo_3 [44]byte
    33  }
    34  
    35  type RawSockaddrLinklayer struct {
    36  	Family   uint16
    37  	Protocol uint16
    38  	Ifindex  int32
    39  	Hatype   uint16
    40  	Pkttype  uint8
    41  	Halen    uint8
    42  	Addr     [8]uint8
    43  }
    44  
    45  type RawSockaddrNetlink struct {
    46  	Family uint16
    47  	Pad    uint16
    48  	Pid    uint32
    49  	Groups uint32
    50  }
    51  
    52  type IPMreqn struct {
    53  	Multiaddr [4]byte /* in_addr */
    54  	Address   [4]byte /* in_addr */
    55  	Ifindex   int32
    56  }
    57  
    58  type Inet4Pktinfo struct {
    59  	Ifindex  int32
    60  	Spec_dst [4]byte /* in_addr */
    61  	Addr     [4]byte /* in_addr */
    62  }
    63  
    64  type TCPInfo struct {
    65  	State          uint8
    66  	Ca_state       uint8
    67  	Retransmits    uint8
    68  	Probes         uint8
    69  	Backoff        uint8
    70  	Options        uint8
    71  	Pad_cgo_0      [2]byte
    72  	Rto            uint32
    73  	Ato            uint32
    74  	Snd_mss        uint32
    75  	Rcv_mss        uint32
    76  	Unacked        uint32
    77  	Sacked         uint32
    78  	Lost           uint32
    79  	Retrans        uint32
    80  	Fackets        uint32
    81  	Last_data_sent uint32
    82  	Last_ack_sent  uint32
    83  	Last_data_recv uint32
    84  	Last_ack_recv  uint32
    85  	Pmtu           uint32
    86  	Rcv_ssthresh   uint32
    87  	Rtt            uint32
    88  	Rttvar         uint32
    89  	Snd_ssthresh   uint32
    90  	Snd_cwnd       uint32
    91  	Advmss         uint32
    92  	Reordering     uint32
    93  	Rcv_rtt        uint32
    94  	Rcv_space      uint32
    95  	Total_retrans  uint32
    96  }
    97  
    98  const (
    99  	SizeofSockaddrLinklayer = 0x14
   100  	SizeofSockaddrNetlink   = 0xc
   101  	SizeofIPMreqn           = 0xc
   102  	SizeofInet4Pktinfo      = 0xc
   103  	SizeofTCPInfo           = 0x68
   104  )
   105  
   106  const (
   107  	IFA_UNSPEC          = 0x0
   108  	IFA_ADDRESS         = 0x1
   109  	IFA_LOCAL           = 0x2
   110  	IFA_LABEL           = 0x3
   111  	IFA_BROADCAST       = 0x4
   112  	IFA_ANYCAST         = 0x5
   113  	IFA_CACHEINFO       = 0x6
   114  	IFA_MULTICAST       = 0x7
   115  	IFLA_UNSPEC         = 0x0
   116  	IFLA_ADDRESS        = 0x1
   117  	IFLA_BROADCAST      = 0x2
   118  	IFLA_IFNAME         = 0x3
   119  	IFLA_MTU            = 0x4
   120  	IFLA_LINK           = 0x5
   121  	IFLA_QDISC          = 0x6
   122  	IFLA_STATS          = 0x7
   123  	IFLA_COST           = 0x8
   124  	IFLA_PRIORITY       = 0x9
   125  	IFLA_MASTER         = 0xa
   126  	IFLA_WIRELESS       = 0xb
   127  	IFLA_PROTINFO       = 0xc
   128  	IFLA_TXQLEN         = 0xd
   129  	IFLA_MAP            = 0xe
   130  	IFLA_WEIGHT         = 0xf
   131  	IFLA_OPERSTATE      = 0x10
   132  	IFLA_LINKMODE       = 0x11
   133  	IFLA_LINKINFO       = 0x12
   134  	IFLA_NET_NS_PID     = 0x13
   135  	IFLA_IFALIAS        = 0x14
   136  	IFLA_MAX            = 0x1d
   137  	RT_SCOPE_UNIVERSE   = 0x0
   138  	RT_SCOPE_SITE       = 0xc8
   139  	RT_SCOPE_LINK       = 0xfd
   140  	RT_SCOPE_HOST       = 0xfe
   141  	RT_SCOPE_NOWHERE    = 0xff
   142  	RT_TABLE_UNSPEC     = 0x0
   143  	RT_TABLE_COMPAT     = 0xfc
   144  	RT_TABLE_DEFAULT    = 0xfd
   145  	RT_TABLE_MAIN       = 0xfe
   146  	RT_TABLE_LOCAL      = 0xff
   147  	RT_TABLE_MAX        = 0xffffffff
   148  	RTA_UNSPEC          = 0x0
   149  	RTA_DST             = 0x1
   150  	RTA_SRC             = 0x2
   151  	RTA_IIF             = 0x3
   152  	RTA_OIF             = 0x4
   153  	RTA_GATEWAY         = 0x5
   154  	RTA_PRIORITY        = 0x6
   155  	RTA_PREFSRC         = 0x7
   156  	RTA_METRICS         = 0x8
   157  	RTA_MULTIPATH       = 0x9
   158  	RTA_FLOW            = 0xb
   159  	RTA_CACHEINFO       = 0xc
   160  	RTA_TABLE           = 0xf
   161  	RTN_UNSPEC          = 0x0
   162  	RTN_UNICAST         = 0x1
   163  	RTN_LOCAL           = 0x2
   164  	RTN_BROADCAST       = 0x3
   165  	RTN_ANYCAST         = 0x4
   166  	RTN_MULTICAST       = 0x5
   167  	RTN_BLACKHOLE       = 0x6
   168  	RTN_UNREACHABLE     = 0x7
   169  	RTN_PROHIBIT        = 0x8
   170  	RTN_THROW           = 0x9
   171  	RTN_NAT             = 0xa
   172  	RTN_XRESOLVE        = 0xb
   173  	RTNLGRP_NONE        = 0x0
   174  	RTNLGRP_LINK        = 0x1
   175  	RTNLGRP_NOTIFY      = 0x2
   176  	RTNLGRP_NEIGH       = 0x3
   177  	RTNLGRP_TC          = 0x4
   178  	RTNLGRP_IPV4_IFADDR = 0x5
   179  	RTNLGRP_IPV4_MROUTE = 0x6
   180  	RTNLGRP_IPV4_ROUTE  = 0x7
   181  	RTNLGRP_IPV4_RULE   = 0x8
   182  	RTNLGRP_IPV6_IFADDR = 0x9
   183  	RTNLGRP_IPV6_MROUTE = 0xa
   184  	RTNLGRP_IPV6_ROUTE  = 0xb
   185  	RTNLGRP_IPV6_IFINFO = 0xc
   186  	RTNLGRP_IPV6_PREFIX = 0x12
   187  	RTNLGRP_IPV6_RULE   = 0x13
   188  	RTNLGRP_ND_USEROPT  = 0x14
   189  	SizeofNlMsghdr      = 0x10
   190  	SizeofNlMsgerr      = 0x14
   191  	SizeofRtGenmsg      = 0x1
   192  	SizeofNlAttr        = 0x4
   193  	SizeofRtAttr        = 0x4
   194  	SizeofIfInfomsg     = 0x10
   195  	SizeofIfAddrmsg     = 0x8
   196  	SizeofRtMsg         = 0xc
   197  	SizeofRtNexthop     = 0x8
   198  )
   199  
   200  type NlMsghdr struct {
   201  	Len   uint32
   202  	Type  uint16
   203  	Flags uint16
   204  	Seq   uint32
   205  	Pid   uint32
   206  }
   207  
   208  type NlMsgerr struct {
   209  	Error int32
   210  	Msg   NlMsghdr
   211  }
   212  
   213  type RtGenmsg struct {
   214  	Family uint8
   215  }
   216  
   217  type NlAttr struct {
   218  	Len  uint16
   219  	Type uint16
   220  }
   221  
   222  type RtAttr struct {
   223  	Len  uint16
   224  	Type uint16
   225  }
   226  
   227  type IfInfomsg struct {
   228  	Family     uint8
   229  	X__ifi_pad uint8
   230  	Type       uint16
   231  	Index      int32
   232  	Flags      uint32
   233  	Change     uint32
   234  }
   235  
   236  type IfAddrmsg struct {
   237  	Family    uint8
   238  	Prefixlen uint8
   239  	Flags     uint8
   240  	Scope     uint8
   241  	Index     uint32
   242  }
   243  
   244  type RtMsg struct {
   245  	Family   uint8
   246  	Dst_len  uint8
   247  	Src_len  uint8
   248  	Tos      uint8
   249  	Table    uint8
   250  	Protocol uint8
   251  	Scope    uint8
   252  	Type     uint8
   253  	Flags    uint32
   254  }
   255  
   256  type RtNexthop struct {
   257  	Len     uint16
   258  	Flags   uint8
   259  	Hops    uint8
   260  	Ifindex int32
   261  }
   262  
   263  const (
   264  	SizeofSockFilter = 0x8
   265  	SizeofSockFprog  = 0x10
   266  )
   267  
   268  type SockFilter struct {
   269  	Code uint16
   270  	Jt   uint8
   271  	Jf   uint8
   272  	K    uint32
   273  }
   274  
   275  type SockFprog struct {
   276  	Len       uint16
   277  	Pad_cgo_0 [6]byte
   278  	Filter    *SockFilter
   279  }
   280  
   281  type InotifyEvent struct {
   282  	Wd     int32
   283  	Mask   uint32
   284  	Cookie uint32
   285  	Len    uint32
   286  	Name   [0]uint8
   287  }
   288  
   289  const SizeofInotifyEvent = 0x10
   290  
   291  type PtraceRegs struct {
   292  	R15      uint64
   293  	R14      uint64
   294  	R13      uint64
   295  	R12      uint64
   296  	Rbp      uint64
   297  	Rbx      uint64
   298  	R11      uint64
   299  	R10      uint64
   300  	R9       uint64
   301  	R8       uint64
   302  	Rax      uint64
   303  	Rcx      uint64
   304  	Rdx      uint64
   305  	Rsi      uint64
   306  	Rdi      uint64
   307  	Orig_rax uint64
   308  	Rip      uint64
   309  	Cs       uint64
   310  	Eflags   uint64
   311  	Rsp      uint64
   312  	Ss       uint64
   313  	Fs_base  uint64
   314  	Gs_base  uint64
   315  	Ds       uint64
   316  	Es       uint64
   317  	Fs       uint64
   318  	Gs       uint64
   319  }
   320  
   321  type EpollEvent struct {
   322  	Events uint32
   323  	Fd     int32
   324  	Pad    int32
   325  }