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