Source file
src/syscall/ztypes_linux_amd64.go
1
2
3
4
5
6 package syscall
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 Pad_cgo_0 [4]byte
37 Offset int64
38 Freq int64
39 Maxerror int64
40 Esterror int64
41 Status int32
42 Pad_cgo_1 [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 Pad_cgo_2 [4]byte
52 Stabil int64
53 Jitcnt int64
54 Calcnt int64
55 Errcnt int64
56 Stbcnt int64
57 Tai int32
58 Pad_cgo_3 [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 X__pad0 int32
109 Rdev uint64
110 Size int64
111 Blksize int64
112 Blocks int64
113 Atim Timespec
114 Mtim Timespec
115 Ctim Timespec
116 X__unused [3]int64
117 }
118
119 type Statfs_t struct {
120 Type int64
121 Bsize int64
122 Blocks uint64
123 Bfree uint64
124 Bavail uint64
125 Files uint64
126 Ffree uint64
127 Fsid Fsid
128 Namelen int64
129 Frsize int64
130 Flags int64
131 Spare [4]int64
132 }
133
134 type Dirent struct {
135 Ino uint64
136 Off int64
137 Reclen uint16
138 Type uint8
139 Name [256]int8
140 Pad_cgo_0 [5]byte
141 }
142
143 type Fsid struct {
144 X__val [2]int32
145 }
146
147 type Flock_t struct {
148 Type int16
149 Whence int16
150 Pad_cgo_0 [4]byte
151 Start int64
152 Len int64
153 Pid int32
154 Pad_cgo_1 [4]byte
155 }
156
157 type RawSockaddrInet4 struct {
158 Family uint16
159 Port uint16
160 Addr [4]byte
161 Zero [8]uint8
162 }
163
164 type RawSockaddrInet6 struct {
165 Family uint16
166 Port uint16
167 Flowinfo uint32
168 Addr [16]byte
169 Scope_id uint32
170 }
171
172 type RawSockaddrUnix struct {
173 Family uint16
174 Path [108]int8
175 }
176
177 type RawSockaddrLinklayer struct {
178 Family uint16
179 Protocol uint16
180 Ifindex int32
181 Hatype uint16
182 Pkttype uint8
183 Halen uint8
184 Addr [8]uint8
185 }
186
187 type RawSockaddrNetlink struct {
188 Family uint16
189 Pad uint16
190 Pid uint32
191 Groups uint32
192 }
193
194 type RawSockaddr struct {
195 Family uint16
196 Data [14]int8
197 }
198
199 type RawSockaddrAny struct {
200 Addr RawSockaddr
201 Pad [96]int8
202 }
203
204 type _Socklen uint32
205
206 type Linger struct {
207 Onoff int32
208 Linger int32
209 }
210
211 type Iovec struct {
212 Base *byte
213 Len uint64
214 }
215
216 type IPMreq struct {
217 Multiaddr [4]byte
218 Interface [4]byte
219 }
220
221 type IPMreqn struct {
222 Multiaddr [4]byte
223 Address [4]byte
224 Ifindex int32
225 }
226
227 type IPv6Mreq struct {
228 Multiaddr [16]byte
229 Interface uint32
230 }
231
232 type Msghdr struct {
233 Name *byte
234 Namelen uint32
235 Pad_cgo_0 [4]byte
236 Iov *Iovec
237 Iovlen uint64
238 Control *byte
239 Controllen uint64
240 Flags int32
241 Pad_cgo_1 [4]byte
242 }
243
244 type Cmsghdr struct {
245 Len uint64
246 Level int32
247 Type int32
248 }
249
250 type Inet4Pktinfo struct {
251 Ifindex int32
252 Spec_dst [4]byte
253 Addr [4]byte
254 }
255
256 type Inet6Pktinfo struct {
257 Addr [16]byte
258 Ifindex uint32
259 }
260
261 type IPv6MTUInfo struct {
262 Addr RawSockaddrInet6
263 Mtu uint32
264 }
265
266 type ICMPv6Filter struct {
267 Data [8]uint32
268 }
269
270 type Ucred struct {
271 Pid int32
272 Uid uint32
273 Gid uint32
274 }
275
276 type TCPInfo struct {
277 State uint8
278 Ca_state uint8
279 Retransmits uint8
280 Probes uint8
281 Backoff uint8
282 Options uint8
283 Pad_cgo_0 [2]byte
284 Rto uint32
285 Ato uint32
286 Snd_mss uint32
287 Rcv_mss uint32
288 Unacked uint32
289 Sacked uint32
290 Lost uint32
291 Retrans uint32
292 Fackets uint32
293 Last_data_sent uint32
294 Last_ack_sent uint32
295 Last_data_recv uint32
296 Last_ack_recv uint32
297 Pmtu uint32
298 Rcv_ssthresh uint32
299 Rtt uint32
300 Rttvar uint32
301 Snd_ssthresh uint32
302 Snd_cwnd uint32
303 Advmss uint32
304 Reordering uint32
305 Rcv_rtt uint32
306 Rcv_space uint32
307 Total_retrans uint32
308 }
309
310 const (
311 SizeofSockaddrInet4 = 0x10
312 SizeofSockaddrInet6 = 0x1c
313 SizeofSockaddrAny = 0x70
314 SizeofSockaddrUnix = 0x6e
315 SizeofSockaddrLinklayer = 0x14
316 SizeofSockaddrNetlink = 0xc
317 SizeofLinger = 0x8
318 SizeofIPMreq = 0x8
319 SizeofIPMreqn = 0xc
320 SizeofIPv6Mreq = 0x14
321 SizeofMsghdr = 0x38
322 SizeofCmsghdr = 0x10
323 SizeofInet4Pktinfo = 0xc
324 SizeofInet6Pktinfo = 0x14
325 SizeofIPv6MTUInfo = 0x20
326 SizeofICMPv6Filter = 0x20
327 SizeofUcred = 0xc
328 SizeofTCPInfo = 0x68
329 )
330
331 const (
332 IFA_UNSPEC = 0x0
333 IFA_ADDRESS = 0x1
334 IFA_LOCAL = 0x2
335 IFA_LABEL = 0x3
336 IFA_BROADCAST = 0x4
337 IFA_ANYCAST = 0x5
338 IFA_CACHEINFO = 0x6
339 IFA_MULTICAST = 0x7
340 IFLA_UNSPEC = 0x0
341 IFLA_ADDRESS = 0x1
342 IFLA_BROADCAST = 0x2
343 IFLA_IFNAME = 0x3
344 IFLA_MTU = 0x4
345 IFLA_LINK = 0x5
346 IFLA_QDISC = 0x6
347 IFLA_STATS = 0x7
348 IFLA_COST = 0x8
349 IFLA_PRIORITY = 0x9
350 IFLA_MASTER = 0xa
351 IFLA_WIRELESS = 0xb
352 IFLA_PROTINFO = 0xc
353 IFLA_TXQLEN = 0xd
354 IFLA_MAP = 0xe
355 IFLA_WEIGHT = 0xf
356 IFLA_OPERSTATE = 0x10
357 IFLA_LINKMODE = 0x11
358 IFLA_LINKINFO = 0x12
359 IFLA_NET_NS_PID = 0x13
360 IFLA_IFALIAS = 0x14
361 IFLA_MAX = 0x1d
362 RT_SCOPE_UNIVERSE = 0x0
363 RT_SCOPE_SITE = 0xc8
364 RT_SCOPE_LINK = 0xfd
365 RT_SCOPE_HOST = 0xfe
366 RT_SCOPE_NOWHERE = 0xff
367 RT_TABLE_UNSPEC = 0x0
368 RT_TABLE_COMPAT = 0xfc
369 RT_TABLE_DEFAULT = 0xfd
370 RT_TABLE_MAIN = 0xfe
371 RT_TABLE_LOCAL = 0xff
372 RT_TABLE_MAX = 0xffffffff
373 RTA_UNSPEC = 0x0
374 RTA_DST = 0x1
375 RTA_SRC = 0x2
376 RTA_IIF = 0x3
377 RTA_OIF = 0x4
378 RTA_GATEWAY = 0x5
379 RTA_PRIORITY = 0x6
380 RTA_PREFSRC = 0x7
381 RTA_METRICS = 0x8
382 RTA_MULTIPATH = 0x9
383 RTA_FLOW = 0xb
384 RTA_CACHEINFO = 0xc
385 RTA_TABLE = 0xf
386 RTN_UNSPEC = 0x0
387 RTN_UNICAST = 0x1
388 RTN_LOCAL = 0x2
389 RTN_BROADCAST = 0x3
390 RTN_ANYCAST = 0x4
391 RTN_MULTICAST = 0x5
392 RTN_BLACKHOLE = 0x6
393 RTN_UNREACHABLE = 0x7
394 RTN_PROHIBIT = 0x8
395 RTN_THROW = 0x9
396 RTN_NAT = 0xa
397 RTN_XRESOLVE = 0xb
398 RTNLGRP_NONE = 0x0
399 RTNLGRP_LINK = 0x1
400 RTNLGRP_NOTIFY = 0x2
401 RTNLGRP_NEIGH = 0x3
402 RTNLGRP_TC = 0x4
403 RTNLGRP_IPV4_IFADDR = 0x5
404 RTNLGRP_IPV4_MROUTE = 0x6
405 RTNLGRP_IPV4_ROUTE = 0x7
406 RTNLGRP_IPV4_RULE = 0x8
407 RTNLGRP_IPV6_IFADDR = 0x9
408 RTNLGRP_IPV6_MROUTE = 0xa
409 RTNLGRP_IPV6_ROUTE = 0xb
410 RTNLGRP_IPV6_IFINFO = 0xc
411 RTNLGRP_IPV6_PREFIX = 0x12
412 RTNLGRP_IPV6_RULE = 0x13
413 RTNLGRP_ND_USEROPT = 0x14
414 SizeofNlMsghdr = 0x10
415 SizeofNlMsgerr = 0x14
416 SizeofRtGenmsg = 0x1
417 SizeofNlAttr = 0x4
418 SizeofRtAttr = 0x4
419 SizeofIfInfomsg = 0x10
420 SizeofIfAddrmsg = 0x8
421 SizeofRtMsg = 0xc
422 SizeofRtNexthop = 0x8
423 )
424
425 type NlMsghdr struct {
426 Len uint32
427 Type uint16
428 Flags uint16
429 Seq uint32
430 Pid uint32
431 }
432
433 type NlMsgerr struct {
434 Error int32
435 Msg NlMsghdr
436 }
437
438 type RtGenmsg struct {
439 Family uint8
440 }
441
442 type NlAttr struct {
443 Len uint16
444 Type uint16
445 }
446
447 type RtAttr struct {
448 Len uint16
449 Type uint16
450 }
451
452 type IfInfomsg struct {
453 Family uint8
454 X__ifi_pad uint8
455 Type uint16
456 Index int32
457 Flags uint32
458 Change uint32
459 }
460
461 type IfAddrmsg struct {
462 Family uint8
463 Prefixlen uint8
464 Flags uint8
465 Scope uint8
466 Index uint32
467 }
468
469 type RtMsg struct {
470 Family uint8
471 Dst_len uint8
472 Src_len uint8
473 Tos uint8
474 Table uint8
475 Protocol uint8
476 Scope uint8
477 Type uint8
478 Flags uint32
479 }
480
481 type RtNexthop struct {
482 Len uint16
483 Flags uint8
484 Hops uint8
485 Ifindex int32
486 }
487
488 const (
489 SizeofSockFilter = 0x8
490 SizeofSockFprog = 0x10
491 )
492
493 type SockFilter struct {
494 Code uint16
495 Jt uint8
496 Jf uint8
497 K uint32
498 }
499
500 type SockFprog struct {
501 Len uint16
502 Pad_cgo_0 [6]byte
503 Filter *SockFilter
504 }
505
506 type InotifyEvent struct {
507 Wd int32
508 Mask uint32
509 Cookie uint32
510 Len uint32
511 Name [0]uint8
512 }
513
514 const SizeofInotifyEvent = 0x10
515
516 type PtraceRegs struct {
517 R15 uint64
518 R14 uint64
519 R13 uint64
520 R12 uint64
521 Rbp uint64
522 Rbx uint64
523 R11 uint64
524 R10 uint64
525 R9 uint64
526 R8 uint64
527 Rax uint64
528 Rcx uint64
529 Rdx uint64
530 Rsi uint64
531 Rdi uint64
532 Orig_rax uint64
533 Rip uint64
534 Cs uint64
535 Eflags uint64
536 Rsp uint64
537 Ss uint64
538 Fs_base uint64
539 Gs_base uint64
540 Ds uint64
541 Es uint64
542 Fs uint64
543 Gs uint64
544 }
545
546 type FdSet struct {
547 Bits [16]int64
548 }
549
550 type Sysinfo_t struct {
551 Uptime int64
552 Loads [3]uint64
553 Totalram uint64
554 Freeram uint64
555 Sharedram uint64
556 Bufferram uint64
557 Totalswap uint64
558 Freeswap uint64
559 Procs uint16
560 Pad uint16
561 Pad_cgo_0 [4]byte
562 Totalhigh uint64
563 Freehigh uint64
564 Unit uint32
565 X_f [0]byte
566 Pad_cgo_1 [4]byte
567 }
568
569 type Utsname struct {
570 Sysname [65]int8
571 Nodename [65]int8
572 Release [65]int8
573 Version [65]int8
574 Machine [65]int8
575 Domainname [65]int8
576 }
577
578 type Ustat_t struct {
579 Tfree int32
580 Pad_cgo_0 [4]byte
581 Tinode uint64
582 Fname [6]int8
583 Fpack [6]int8
584 Pad_cgo_1 [4]byte
585 }
586
587 type EpollEvent struct {
588 Events uint32
589 Fd int32
590 Pad int32
591 }
592
593 const (
594 _AT_FDCWD = -0x64
595 _AT_REMOVEDIR = 0x200
596 _AT_SYMLINK_NOFOLLOW = 0x100
597 _AT_EACCESS = 0x200
598 )
599
600 type pollFd struct {
601 Fd int32
602 Events int16
603 Revents int16
604 }
605
606 type Termios struct {
607 Iflag uint32
608 Oflag uint32
609 Cflag uint32
610 Lflag uint32
611 Line uint8
612 Cc [32]uint8
613 Pad_cgo_0 [3]byte
614 Ispeed uint32
615 Ospeed uint32
616 }
617
618 const (
619 VINTR = 0x0
620 VQUIT = 0x1
621 VERASE = 0x2
622 VKILL = 0x3
623 VEOF = 0x4
624 VTIME = 0x5
625 VMIN = 0x6
626 VSWTC = 0x7
627 VSTART = 0x8
628 VSTOP = 0x9
629 VSUSP = 0xa
630 VEOL = 0xb
631 VREPRINT = 0xc
632 VDISCARD = 0xd
633 VWERASE = 0xe
634 VLNEXT = 0xf
635 VEOL2 = 0x10
636 IGNBRK = 0x1
637 BRKINT = 0x2
638 IGNPAR = 0x4
639 PARMRK = 0x8
640 INPCK = 0x10
641 ISTRIP = 0x20
642 INLCR = 0x40
643 IGNCR = 0x80
644 ICRNL = 0x100
645 IUCLC = 0x200
646 IXON = 0x400
647 IXANY = 0x800
648 IXOFF = 0x1000
649 IMAXBEL = 0x2000
650 IUTF8 = 0x4000
651 OPOST = 0x1
652 OLCUC = 0x2
653 ONLCR = 0x4
654 OCRNL = 0x8
655 ONOCR = 0x10
656 ONLRET = 0x20
657 OFILL = 0x40
658 OFDEL = 0x80
659 B0 = 0x0
660 B50 = 0x1
661 B75 = 0x2
662 B110 = 0x3
663 B134 = 0x4
664 B150 = 0x5
665 B200 = 0x6
666 B300 = 0x7
667 B600 = 0x8
668 B1200 = 0x9
669 B1800 = 0xa
670 B2400 = 0xb
671 B4800 = 0xc
672 B9600 = 0xd
673 B19200 = 0xe
674 B38400 = 0xf
675 CSIZE = 0x30
676 CS5 = 0x0
677 CS6 = 0x10
678 CS7 = 0x20
679 CS8 = 0x30
680 CSTOPB = 0x40
681 CREAD = 0x80
682 PARENB = 0x100
683 PARODD = 0x200
684 HUPCL = 0x400
685 CLOCAL = 0x800
686 B57600 = 0x1001
687 B115200 = 0x1002
688 B230400 = 0x1003
689 B460800 = 0x1004
690 B500000 = 0x1005
691 B576000 = 0x1006
692 B921600 = 0x1007
693 B1000000 = 0x1008
694 B1152000 = 0x1009
695 B1500000 = 0x100a
696 B2000000 = 0x100b
697 B2500000 = 0x100c
698 B3000000 = 0x100d
699 B3500000 = 0x100e
700 B4000000 = 0x100f
701 ISIG = 0x1
702 ICANON = 0x2
703 XCASE = 0x4
704 ECHO = 0x8
705 ECHOE = 0x10
706 ECHOK = 0x20
707 ECHONL = 0x40
708 NOFLSH = 0x80
709 TOSTOP = 0x100
710 ECHOCTL = 0x200
711 ECHOPRT = 0x400
712 ECHOKE = 0x800
713 FLUSHO = 0x1000
714 PENDIN = 0x4000
715 IEXTEN = 0x8000
716 TCGETS = 0x5401
717 TCSETS = 0x5402
718 )
719
View as plain text