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