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