]> git.wh0rd.org - ICEs.git/blob - 529496/ipaddress.i
more
[ICEs.git] / 529496 / ipaddress.i
1 # 1 "networking/libiproute/ipaddress.c"
2 # 1 "<built-in>"
3 # 1 "<command-line>"
4 # 1 "/usr/include/stdc-predef.h" 1 3 4
5 # 1 "<command-line>" 2
6 # 1 "./include/autoconf.h" 1
7 # 1 "<command-line>" 2
8 # 1 "networking/libiproute/ipaddress.c"
9 # 11 "networking/libiproute/ipaddress.c"
10 # 1 "/usr/include/fnmatch.h" 1 3 4
11 # 56 "/usr/include/fnmatch.h" 3 4
12 extern int fnmatch (const char *__pattern, const char *__name, int __flags);
13 # 12 "networking/libiproute/ipaddress.c" 2
14 # 1 "/usr/include/net/if.h" 1 3 4
15 # 22 "/usr/include/net/if.h" 3 4
16 # 1 "/usr/include/features.h" 1 3 4
17 # 379 "/usr/include/features.h" 3 4
18 # 1 "/usr/include/sys/cdefs.h" 1 3 4
19 # 385 "/usr/include/sys/cdefs.h" 3 4
20 # 1 "/usr/include/bits/wordsize.h" 1 3 4
21 # 386 "/usr/include/sys/cdefs.h" 2 3 4
22 # 380 "/usr/include/features.h" 2 3 4
23 # 403 "/usr/include/features.h" 3 4
24 # 1 "/usr/include/gnu/stubs.h" 1 3 4
25 # 10 "/usr/include/gnu/stubs.h" 3 4
26 # 1 "/usr/include/gnu/stubs-hard.h" 1 3 4
27 # 11 "/usr/include/gnu/stubs.h" 2 3 4
28 # 404 "/usr/include/features.h" 2 3 4
29 # 23 "/usr/include/net/if.h" 2 3 4
30
31
32 # 1 "/usr/include/sys/types.h" 1 3 4
33 # 27 "/usr/include/sys/types.h" 3 4
34
35
36 # 1 "/usr/include/bits/types.h" 1 3 4
37 # 27 "/usr/include/bits/types.h" 3 4
38 # 1 "/usr/include/bits/wordsize.h" 1 3 4
39 # 28 "/usr/include/bits/types.h" 2 3 4
40
41
42 typedef unsigned char __u_char;
43 typedef unsigned short int __u_short;
44 typedef unsigned int __u_int;
45 typedef unsigned long int __u_long;
46
47
48 typedef signed char __int8_t;
49 typedef unsigned char __uint8_t;
50 typedef signed short int __int16_t;
51 typedef unsigned short int __uint16_t;
52 typedef signed int __int32_t;
53 typedef unsigned int __uint32_t;
54
55
56
57
58 __extension__ typedef signed long long int __int64_t;
59 __extension__ typedef unsigned long long int __uint64_t;
60
61
62
63
64
65
66
67 __extension__ typedef long long int __quad_t;
68 __extension__ typedef unsigned long long int __u_quad_t;
69 # 121 "/usr/include/bits/types.h" 3 4
70 # 1 "/usr/include/bits/typesizes.h" 1 3 4
71 # 122 "/usr/include/bits/types.h" 2 3 4
72
73
74 __extension__ typedef __u_quad_t __dev_t;
75 __extension__ typedef unsigned int __uid_t;
76 __extension__ typedef unsigned int __gid_t;
77 __extension__ typedef unsigned long int __ino_t;
78 __extension__ typedef __u_quad_t __ino64_t;
79 __extension__ typedef unsigned int __mode_t;
80 __extension__ typedef unsigned int __nlink_t;
81 __extension__ typedef long int __off_t;
82 __extension__ typedef __quad_t __off64_t;
83 __extension__ typedef int __pid_t;
84 __extension__ typedef struct { int __val[2]; } __fsid_t;
85 __extension__ typedef long int __clock_t;
86 __extension__ typedef unsigned long int __rlim_t;
87 __extension__ typedef __u_quad_t __rlim64_t;
88 __extension__ typedef unsigned int __id_t;
89 __extension__ typedef long int __time_t;
90 __extension__ typedef unsigned int __useconds_t;
91 __extension__ typedef long int __suseconds_t;
92
93 __extension__ typedef int __daddr_t;
94 __extension__ typedef int __key_t;
95
96
97 __extension__ typedef int __clockid_t;
98
99
100 __extension__ typedef void * __timer_t;
101
102
103 __extension__ typedef long int __blksize_t;
104
105
106
107
108 __extension__ typedef long int __blkcnt_t;
109 __extension__ typedef __quad_t __blkcnt64_t;
110
111
112 __extension__ typedef unsigned long int __fsblkcnt_t;
113 __extension__ typedef __u_quad_t __fsblkcnt64_t;
114
115
116 __extension__ typedef unsigned long int __fsfilcnt_t;
117 __extension__ typedef __u_quad_t __fsfilcnt64_t;
118
119
120 __extension__ typedef int __fsword_t;
121
122 __extension__ typedef int __ssize_t;
123
124
125 __extension__ typedef long int __syscall_slong_t;
126
127 __extension__ typedef unsigned long int __syscall_ulong_t;
128
129
130
131 typedef __off64_t __loff_t;
132 typedef __quad_t *__qaddr_t;
133 typedef char *__caddr_t;
134
135
136 __extension__ typedef int __intptr_t;
137
138
139 __extension__ typedef unsigned int __socklen_t;
140 # 30 "/usr/include/sys/types.h" 2 3 4
141
142
143
144 typedef __u_char u_char;
145 typedef __u_short u_short;
146 typedef __u_int u_int;
147 typedef __u_long u_long;
148 typedef __quad_t quad_t;
149 typedef __u_quad_t u_quad_t;
150 typedef __fsid_t fsid_t;
151
152
153
154
155 typedef __loff_t loff_t;
156
157
158
159
160
161 typedef __ino64_t ino_t;
162
163
164
165
166 typedef __ino64_t ino64_t;
167
168
169
170
171 typedef __dev_t dev_t;
172
173
174
175
176 typedef __gid_t gid_t;
177
178
179
180
181 typedef __mode_t mode_t;
182
183
184
185
186 typedef __nlink_t nlink_t;
187
188
189
190
191 typedef __uid_t uid_t;
192
193
194
195
196
197
198
199 typedef __off64_t off_t;
200
201
202
203
204 typedef __off64_t off64_t;
205
206
207
208
209 typedef __pid_t pid_t;
210
211
212
213
214
215 typedef __id_t id_t;
216
217
218
219
220 typedef __ssize_t ssize_t;
221
222
223
224
225
226 typedef __daddr_t daddr_t;
227 typedef __caddr_t caddr_t;
228
229
230
231
232
233 typedef __key_t key_t;
234 # 132 "/usr/include/sys/types.h" 3 4
235 # 1 "/usr/include/time.h" 1 3 4
236 # 57 "/usr/include/time.h" 3 4
237
238
239 typedef __clock_t clock_t;
240
241
242
243 # 73 "/usr/include/time.h" 3 4
244
245
246 typedef __time_t time_t;
247
248
249
250 # 91 "/usr/include/time.h" 3 4
251 typedef __clockid_t clockid_t;
252 # 103 "/usr/include/time.h" 3 4
253 typedef __timer_t timer_t;
254 # 133 "/usr/include/sys/types.h" 2 3 4
255
256
257
258 typedef __useconds_t useconds_t;
259
260
261
262 typedef __suseconds_t suseconds_t;
263
264
265
266
267
268 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stddef.h" 1 3 4
269 # 212 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stddef.h" 3 4
270 typedef unsigned int size_t;
271 # 147 "/usr/include/sys/types.h" 2 3 4
272
273
274
275 typedef unsigned long int ulong;
276 typedef unsigned short int ushort;
277 typedef unsigned int uint;
278 # 194 "/usr/include/sys/types.h" 3 4
279 typedef int int8_t __attribute__ ((__mode__ (__QI__)));
280 typedef int int16_t __attribute__ ((__mode__ (__HI__)));
281 typedef int int32_t __attribute__ ((__mode__ (__SI__)));
282 typedef int int64_t __attribute__ ((__mode__ (__DI__)));
283
284
285 typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
286 typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
287 typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
288 typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
289
290 typedef int register_t __attribute__ ((__mode__ (__word__)));
291 # 216 "/usr/include/sys/types.h" 3 4
292 # 1 "/usr/include/endian.h" 1 3 4
293 # 36 "/usr/include/endian.h" 3 4
294 # 1 "/usr/include/bits/endian.h" 1 3 4
295 # 37 "/usr/include/endian.h" 2 3 4
296 # 60 "/usr/include/endian.h" 3 4
297 # 1 "/usr/include/bits/byteswap.h" 1 3 4
298 # 34 "/usr/include/bits/byteswap.h" 3 4
299 # 1 "/usr/include/bits/byteswap-16.h" 1 3 4
300 # 35 "/usr/include/bits/byteswap.h" 2 3 4
301 # 43 "/usr/include/bits/byteswap.h" 3 4
302 static __inline unsigned int
303 __bswap_32 (unsigned int __bsx)
304 {
305 return __builtin_bswap32 (__bsx);
306 }
307 # 74 "/usr/include/bits/byteswap.h" 3 4
308 static __inline __uint64_t
309 __bswap_64 (__uint64_t __bsx)
310 {
311 return __builtin_bswap64 (__bsx);
312 }
313 # 61 "/usr/include/endian.h" 2 3 4
314 # 217 "/usr/include/sys/types.h" 2 3 4
315
316
317 # 1 "/usr/include/sys/select.h" 1 3 4
318 # 30 "/usr/include/sys/select.h" 3 4
319 # 1 "/usr/include/bits/select.h" 1 3 4
320 # 31 "/usr/include/sys/select.h" 2 3 4
321
322
323 # 1 "/usr/include/bits/sigset.h" 1 3 4
324 # 22 "/usr/include/bits/sigset.h" 3 4
325 typedef int __sig_atomic_t;
326
327
328
329
330 typedef struct
331 {
332 unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
333 } __sigset_t;
334 # 34 "/usr/include/sys/select.h" 2 3 4
335
336
337
338 typedef __sigset_t sigset_t;
339
340
341
342
343
344 # 1 "/usr/include/time.h" 1 3 4
345 # 120 "/usr/include/time.h" 3 4
346 struct timespec
347 {
348 __time_t tv_sec;
349 __syscall_slong_t tv_nsec;
350 };
351 # 44 "/usr/include/sys/select.h" 2 3 4
352
353 # 1 "/usr/include/bits/time.h" 1 3 4
354 # 30 "/usr/include/bits/time.h" 3 4
355 struct timeval
356 {
357 __time_t tv_sec;
358 __suseconds_t tv_usec;
359 };
360 # 46 "/usr/include/sys/select.h" 2 3 4
361 # 54 "/usr/include/sys/select.h" 3 4
362 typedef long int __fd_mask;
363 # 64 "/usr/include/sys/select.h" 3 4
364 typedef struct
365 {
366
367
368
369 __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];
370
371
372
373
374
375 } fd_set;
376
377
378
379
380
381
382 typedef __fd_mask fd_mask;
383 # 96 "/usr/include/sys/select.h" 3 4
384
385 # 106 "/usr/include/sys/select.h" 3 4
386 extern int select (int __nfds, fd_set *__restrict __readfds,
387 fd_set *__restrict __writefds,
388 fd_set *__restrict __exceptfds,
389 struct timeval *__restrict __timeout);
390 # 118 "/usr/include/sys/select.h" 3 4
391 extern int pselect (int __nfds, fd_set *__restrict __readfds,
392 fd_set *__restrict __writefds,
393 fd_set *__restrict __exceptfds,
394 const struct timespec *__restrict __timeout,
395 const __sigset_t *__restrict __sigmask);
396
397
398
399
400
401 # 1 "/usr/include/bits/select2.h" 1 3 4
402 # 24 "/usr/include/bits/select2.h" 3 4
403 extern long int __fdelt_chk (long int __d);
404 extern long int __fdelt_warn (long int __d)
405 __attribute__((__warning__ ("bit outside of fd_set selected")));
406 # 129 "/usr/include/sys/select.h" 2 3 4
407
408
409
410 # 220 "/usr/include/sys/types.h" 2 3 4
411
412
413 # 1 "/usr/include/sys/sysmacros.h" 1 3 4
414 # 24 "/usr/include/sys/sysmacros.h" 3 4
415
416
417 __extension__
418 extern unsigned int gnu_dev_major (unsigned long long int __dev)
419 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
420 __extension__
421 extern unsigned int gnu_dev_minor (unsigned long long int __dev)
422 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
423 __extension__
424 extern unsigned long long int gnu_dev_makedev (unsigned int __major,
425 unsigned int __minor)
426 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
427
428
429 __extension__ extern __inline __attribute__ ((__gnu_inline__)) __attribute__ ((__const__)) unsigned int
430 __attribute__ ((__nothrow__ , __leaf__)) gnu_dev_major (unsigned long long int __dev)
431 {
432 return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
433 }
434
435 __extension__ extern __inline __attribute__ ((__gnu_inline__)) __attribute__ ((__const__)) unsigned int
436 __attribute__ ((__nothrow__ , __leaf__)) gnu_dev_minor (unsigned long long int __dev)
437 {
438 return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
439 }
440
441 __extension__ extern __inline __attribute__ ((__gnu_inline__)) __attribute__ ((__const__)) unsigned long long int
442 __attribute__ ((__nothrow__ , __leaf__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor)
443 {
444 return ((__minor & 0xff) | ((__major & 0xfff) << 8)
445 | (((unsigned long long int) (__minor & ~0xff)) << 12)
446 | (((unsigned long long int) (__major & ~0xfff)) << 32));
447 }
448
449
450 # 223 "/usr/include/sys/types.h" 2 3 4
451
452
453
454
455
456 typedef __blksize_t blksize_t;
457 # 248 "/usr/include/sys/types.h" 3 4
458 typedef __blkcnt64_t blkcnt_t;
459
460
461
462 typedef __fsblkcnt64_t fsblkcnt_t;
463
464
465
466 typedef __fsfilcnt64_t fsfilcnt_t;
467
468
469
470
471
472 typedef __blkcnt64_t blkcnt64_t;
473 typedef __fsblkcnt64_t fsblkcnt64_t;
474 typedef __fsfilcnt64_t fsfilcnt64_t;
475
476
477
478
479
480 # 1 "/usr/include/bits/pthreadtypes.h" 1 3 4
481 # 37 "/usr/include/bits/pthreadtypes.h" 3 4
482 typedef unsigned long int pthread_t;
483
484
485 union pthread_attr_t
486 {
487 char __size[36];
488 long int __align;
489 };
490
491 typedef union pthread_attr_t pthread_attr_t;
492
493
494
495
496 typedef struct __pthread_internal_slist
497 {
498 struct __pthread_internal_slist *__next;
499 } __pthread_slist_t;
500
501
502
503
504 typedef union
505 {
506 struct __pthread_mutex_s
507 {
508 int __lock;
509 unsigned int __count;
510 int __owner;
511
512
513 int __kind;
514 unsigned int __nusers;
515 __extension__ union
516 {
517 int __spins;
518 __pthread_slist_t __list;
519 };
520 } __data;
521 char __size[24];
522 long int __align;
523 } pthread_mutex_t;
524
525 typedef union
526 {
527 char __size[4];
528 long int __align;
529 } pthread_mutexattr_t;
530
531
532
533
534 typedef union
535 {
536 struct
537 {
538 int __lock;
539 unsigned int __futex;
540 __extension__ unsigned long long int __total_seq;
541 __extension__ unsigned long long int __wakeup_seq;
542 __extension__ unsigned long long int __woken_seq;
543 void *__mutex;
544 unsigned int __nwaiters;
545 unsigned int __broadcast_seq;
546 } __data;
547 char __size[48];
548 __extension__ long long int __align;
549 } pthread_cond_t;
550
551 typedef union
552 {
553 char __size[4];
554 long int __align;
555 } pthread_condattr_t;
556
557
558
559 typedef unsigned int pthread_key_t;
560
561
562
563 typedef int pthread_once_t;
564
565
566
567
568
569 typedef union
570 {
571 struct
572 {
573 int __lock;
574 unsigned int __nr_readers;
575 unsigned int __readers_wakeup;
576 unsigned int __writer_wakeup;
577 unsigned int __nr_readers_queued;
578 unsigned int __nr_writers_queued;
579 # 144 "/usr/include/bits/pthreadtypes.h" 3 4
580 unsigned char __flags;
581 unsigned char __shared;
582 unsigned char __pad1;
583 unsigned char __pad2;
584
585 int __writer;
586 } __data;
587 char __size[32];
588 long int __align;
589 } pthread_rwlock_t;
590
591 typedef union
592 {
593 char __size[8];
594 long int __align;
595 } pthread_rwlockattr_t;
596
597
598
599
600
601 typedef volatile int pthread_spinlock_t;
602
603
604
605
606 typedef union
607 {
608 char __size[20];
609 long int __align;
610 } pthread_barrier_t;
611
612 typedef union
613 {
614 char __size[4];
615 int __align;
616 } pthread_barrierattr_t;
617 # 271 "/usr/include/sys/types.h" 2 3 4
618
619
620
621 # 26 "/usr/include/net/if.h" 2 3 4
622 # 1 "/usr/include/sys/socket.h" 1 3 4
623 # 24 "/usr/include/sys/socket.h" 3 4
624
625
626 # 1 "/usr/include/sys/uio.h" 1 3 4
627 # 25 "/usr/include/sys/uio.h" 3 4
628
629
630
631 # 1 "/usr/include/bits/uio.h" 1 3 4
632 # 43 "/usr/include/bits/uio.h" 3 4
633 struct iovec
634 {
635 void *iov_base;
636 size_t iov_len;
637 };
638 # 56 "/usr/include/bits/uio.h" 3 4
639
640
641
642 extern ssize_t process_vm_readv (pid_t __pid, const struct iovec *__lvec,
643 unsigned long int __liovcnt,
644 const struct iovec *__rvec,
645 unsigned long int __riovcnt,
646 unsigned long int __flags)
647 __attribute__ ((__nothrow__ , __leaf__));
648
649
650 extern ssize_t process_vm_writev (pid_t __pid, const struct iovec *__lvec,
651 unsigned long int __liovcnt,
652 const struct iovec *__rvec,
653 unsigned long int __riovcnt,
654 unsigned long int __flags)
655 __attribute__ ((__nothrow__ , __leaf__));
656
657
658 # 29 "/usr/include/sys/uio.h" 2 3 4
659 # 39 "/usr/include/sys/uio.h" 3 4
660 extern ssize_t readv (int __fd, const struct iovec *__iovec, int __count)
661 __attribute__ ((__warn_unused_result__));
662 # 50 "/usr/include/sys/uio.h" 3 4
663 extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count)
664 __attribute__ ((__warn_unused_result__));
665 # 81 "/usr/include/sys/uio.h" 3 4
666 extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count, __off64_t __offset) __asm__ ("" "preadv64")
667
668 __attribute__ ((__warn_unused_result__));
669 extern ssize_t pwritev (int __fd, const struct iovec *__iovec, int __count, __off64_t __offset) __asm__ ("" "pwritev64")
670
671 __attribute__ ((__warn_unused_result__));
672 # 103 "/usr/include/sys/uio.h" 3 4
673 extern ssize_t preadv64 (int __fd, const struct iovec *__iovec, int __count,
674 __off64_t __offset) __attribute__ ((__warn_unused_result__));
675 # 115 "/usr/include/sys/uio.h" 3 4
676 extern ssize_t pwritev64 (int __fd, const struct iovec *__iovec, int __count,
677 __off64_t __offset) __attribute__ ((__warn_unused_result__));
678
679
680
681
682 # 27 "/usr/include/sys/socket.h" 2 3 4
683
684 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stddef.h" 1 3 4
685 # 29 "/usr/include/sys/socket.h" 2 3 4
686
687
688 # 1 "/usr/include/bits/sigset.h" 1 3 4
689 # 32 "/usr/include/sys/socket.h" 2 3 4
690
691
692
693
694
695
696 # 1 "/usr/include/bits/socket.h" 1 3 4
697 # 27 "/usr/include/bits/socket.h" 3 4
698 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stddef.h" 1 3 4
699 # 28 "/usr/include/bits/socket.h" 2 3 4
700
701
702
703
704
705 typedef __socklen_t socklen_t;
706
707
708
709
710 # 1 "/usr/include/bits/socket_type.h" 1 3 4
711 # 24 "/usr/include/bits/socket_type.h" 3 4
712 enum __socket_type
713 {
714 SOCK_STREAM = 1,
715
716
717 SOCK_DGRAM = 2,
718
719
720 SOCK_RAW = 3,
721
722 SOCK_RDM = 4,
723
724 SOCK_SEQPACKET = 5,
725
726
727 SOCK_DCCP = 6,
728
729 SOCK_PACKET = 10,
730
731
732
733
734
735
736
737 SOCK_CLOEXEC = 02000000,
738
739
740 SOCK_NONBLOCK = 00004000
741
742
743 };
744 # 39 "/usr/include/bits/socket.h" 2 3 4
745 # 146 "/usr/include/bits/socket.h" 3 4
746 # 1 "/usr/include/bits/sockaddr.h" 1 3 4
747 # 28 "/usr/include/bits/sockaddr.h" 3 4
748 typedef unsigned short int sa_family_t;
749 # 147 "/usr/include/bits/socket.h" 2 3 4
750
751
752 struct sockaddr
753 {
754 sa_family_t sa_family;
755 char sa_data[14];
756 };
757 # 162 "/usr/include/bits/socket.h" 3 4
758 struct sockaddr_storage
759 {
760 sa_family_t ss_family;
761 unsigned long int __ss_align;
762 char __ss_padding[(128 - (2 * sizeof (unsigned long int)))];
763 };
764
765
766
767 enum
768 {
769 MSG_OOB = 0x01,
770
771 MSG_PEEK = 0x02,
772
773 MSG_DONTROUTE = 0x04,
774
775
776
777 MSG_TRYHARD = MSG_DONTROUTE,
778
779
780 MSG_CTRUNC = 0x08,
781
782 MSG_PROXY = 0x10,
783
784 MSG_TRUNC = 0x20,
785
786 MSG_DONTWAIT = 0x40,
787
788 MSG_EOR = 0x80,
789
790 MSG_WAITALL = 0x100,
791
792 MSG_FIN = 0x200,
793
794 MSG_SYN = 0x400,
795
796 MSG_CONFIRM = 0x800,
797
798 MSG_RST = 0x1000,
799
800 MSG_ERRQUEUE = 0x2000,
801
802 MSG_NOSIGNAL = 0x4000,
803
804 MSG_MORE = 0x8000,
805
806 MSG_WAITFORONE = 0x10000,
807
808 MSG_FASTOPEN = 0x20000000,
809
810
811 MSG_CMSG_CLOEXEC = 0x40000000
812
813
814
815 };
816
817
818
819
820 struct msghdr
821 {
822 void *msg_name;
823 socklen_t msg_namelen;
824
825 struct iovec *msg_iov;
826 size_t msg_iovlen;
827
828 void *msg_control;
829 size_t msg_controllen;
830
831
832
833
834 int msg_flags;
835 };
836
837
838 struct cmsghdr
839 {
840 size_t cmsg_len;
841
842
843
844
845 int cmsg_level;
846 int cmsg_type;
847
848 __extension__ unsigned char __cmsg_data [];
849
850 };
851 # 272 "/usr/include/bits/socket.h" 3 4
852 extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
853 struct cmsghdr *__cmsg) __attribute__ ((__nothrow__ , __leaf__));
854
855
856
857
858 extern __inline __attribute__ ((__gnu_inline__)) struct cmsghdr *
859 __attribute__ ((__nothrow__ , __leaf__)) __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)
860 {
861 if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
862
863 return (struct cmsghdr *) 0;
864
865 __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
866 + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1)));
867 if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
868 + __mhdr->msg_controllen)
869 || ((unsigned char *) __cmsg + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1))
870 > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
871
872 return (struct cmsghdr *) 0;
873 return __cmsg;
874 }
875
876
877
878
879 enum
880 {
881 SCM_RIGHTS = 0x01
882
883
884 , SCM_CREDENTIALS = 0x02
885
886
887 };
888
889
890
891 struct ucred
892 {
893 pid_t pid;
894 uid_t uid;
895 gid_t gid;
896 };
897 # 345 "/usr/include/bits/socket.h" 3 4
898 # 1 "/usr/include/asm/socket.h" 1 3 4
899 # 1 "/usr/include/asm-generic/socket.h" 1 3 4
900
901
902
903 # 1 "/usr/include/asm/sockios.h" 1 3 4
904 # 1 "/usr/include/asm-generic/sockios.h" 1 3 4
905 # 1 "/usr/include/asm/sockios.h" 2 3 4
906 # 5 "/usr/include/asm-generic/socket.h" 2 3 4
907 # 1 "/usr/include/asm/socket.h" 2 3 4
908 # 346 "/usr/include/bits/socket.h" 2 3 4
909 # 379 "/usr/include/bits/socket.h" 3 4
910 struct linger
911 {
912 int l_onoff;
913 int l_linger;
914 };
915 # 39 "/usr/include/sys/socket.h" 2 3 4
916
917
918
919
920 struct osockaddr
921 {
922 unsigned short int sa_family;
923 unsigned char sa_data[14];
924 };
925
926
927
928
929 enum
930 {
931 SHUT_RD = 0,
932
933 SHUT_WR,
934
935 SHUT_RDWR
936
937 };
938 # 90 "/usr/include/sys/socket.h" 3 4
939 typedef union { struct sockaddr *__restrict __sockaddr__; struct sockaddr_at *__restrict __sockaddr_at__; struct sockaddr_ax25 *__restrict __sockaddr_ax25__; struct sockaddr_dl *__restrict __sockaddr_dl__; struct sockaddr_eon *__restrict __sockaddr_eon__; struct sockaddr_in *__restrict __sockaddr_in__; struct sockaddr_in6 *__restrict __sockaddr_in6__; struct sockaddr_inarp *__restrict __sockaddr_inarp__; struct sockaddr_ipx *__restrict __sockaddr_ipx__; struct sockaddr_iso *__restrict __sockaddr_iso__; struct sockaddr_ns *__restrict __sockaddr_ns__; struct sockaddr_un *__restrict __sockaddr_un__; struct sockaddr_x25 *__restrict __sockaddr_x25__;
940 } __SOCKADDR_ARG __attribute__ ((__transparent_union__));
941
942
943 typedef union { const struct sockaddr *__restrict __sockaddr__; const struct sockaddr_at *__restrict __sockaddr_at__; const struct sockaddr_ax25 *__restrict __sockaddr_ax25__; const struct sockaddr_dl *__restrict __sockaddr_dl__; const struct sockaddr_eon *__restrict __sockaddr_eon__; const struct sockaddr_in *__restrict __sockaddr_in__; const struct sockaddr_in6 *__restrict __sockaddr_in6__; const struct sockaddr_inarp *__restrict __sockaddr_inarp__; const struct sockaddr_ipx *__restrict __sockaddr_ipx__; const struct sockaddr_iso *__restrict __sockaddr_iso__; const struct sockaddr_ns *__restrict __sockaddr_ns__; const struct sockaddr_un *__restrict __sockaddr_un__; const struct sockaddr_x25 *__restrict __sockaddr_x25__;
944 } __CONST_SOCKADDR_ARG __attribute__ ((__transparent_union__));
945
946
947
948
949
950 struct mmsghdr
951 {
952 struct msghdr msg_hdr;
953 unsigned int msg_len;
954
955 };
956
957
958
959
960
961
962 extern int socket (int __domain, int __type, int __protocol) __attribute__ ((__nothrow__ , __leaf__));
963
964
965
966
967
968 extern int socketpair (int __domain, int __type, int __protocol,
969 int __fds[2]) __attribute__ ((__nothrow__ , __leaf__));
970
971
972 extern int bind (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len)
973 __attribute__ ((__nothrow__ , __leaf__));
974
975
976 extern int getsockname (int __fd, __SOCKADDR_ARG __addr,
977 socklen_t *__restrict __len) __attribute__ ((__nothrow__ , __leaf__));
978 # 137 "/usr/include/sys/socket.h" 3 4
979 extern int connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len);
980
981
982
983 extern int getpeername (int __fd, __SOCKADDR_ARG __addr,
984 socklen_t *__restrict __len) __attribute__ ((__nothrow__ , __leaf__));
985
986
987
988
989
990
991 extern ssize_t send (int __fd, const void *__buf, size_t __n, int __flags);
992
993
994
995
996
997
998 extern ssize_t recv (int __fd, void *__buf, size_t __n, int __flags);
999
1000
1001
1002
1003
1004
1005 extern ssize_t sendto (int __fd, const void *__buf, size_t __n,
1006 int __flags, __CONST_SOCKADDR_ARG __addr,
1007 socklen_t __addr_len);
1008 # 174 "/usr/include/sys/socket.h" 3 4
1009 extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n,
1010 int __flags, __SOCKADDR_ARG __addr,
1011 socklen_t *__restrict __addr_len);
1012
1013
1014
1015
1016
1017
1018
1019 extern ssize_t sendmsg (int __fd, const struct msghdr *__message,
1020 int __flags);
1021
1022
1023
1024
1025
1026
1027
1028 extern int sendmmsg (int __fd, struct mmsghdr *__vmessages,
1029 unsigned int __vlen, int __flags);
1030
1031
1032
1033
1034
1035
1036
1037 extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags);
1038
1039
1040
1041
1042
1043
1044
1045 extern int recvmmsg (int __fd, struct mmsghdr *__vmessages,
1046 unsigned int __vlen, int __flags,
1047 const struct timespec *__tmo);
1048
1049
1050
1051
1052
1053
1054 extern int getsockopt (int __fd, int __level, int __optname,
1055 void *__restrict __optval,
1056 socklen_t *__restrict __optlen) __attribute__ ((__nothrow__ , __leaf__));
1057
1058
1059
1060
1061 extern int setsockopt (int __fd, int __level, int __optname,
1062 const void *__optval, socklen_t __optlen) __attribute__ ((__nothrow__ , __leaf__));
1063
1064
1065
1066
1067
1068 extern int listen (int __fd, int __n) __attribute__ ((__nothrow__ , __leaf__));
1069 # 243 "/usr/include/sys/socket.h" 3 4
1070 extern int accept (int __fd, __SOCKADDR_ARG __addr,
1071 socklen_t *__restrict __addr_len);
1072
1073
1074
1075
1076
1077
1078 extern int accept4 (int __fd, __SOCKADDR_ARG __addr,
1079 socklen_t *__restrict __addr_len, int __flags);
1080 # 261 "/usr/include/sys/socket.h" 3 4
1081 extern int shutdown (int __fd, int __how) __attribute__ ((__nothrow__ , __leaf__));
1082
1083
1084
1085
1086 extern int sockatmark (int __fd) __attribute__ ((__nothrow__ , __leaf__));
1087
1088
1089
1090
1091
1092
1093
1094 extern int isfdtype (int __fd, int __fdtype) __attribute__ ((__nothrow__ , __leaf__));
1095
1096
1097
1098
1099
1100 # 1 "/usr/include/bits/socket2.h" 1 3 4
1101 # 23 "/usr/include/bits/socket2.h" 3 4
1102 extern ssize_t __recv_chk (int __fd, void *__buf, size_t __n, size_t __buflen,
1103 int __flags);
1104 extern ssize_t __recv_alias (int __fd, void *__buf, size_t __n, int __flags) __asm__ ("" "recv")
1105 ;
1106 extern ssize_t __recv_chk_warn (int __fd, void *__buf, size_t __n, size_t __buflen, int __flags) __asm__ ("" "__recv_chk")
1107
1108
1109 __attribute__((__warning__ ("recv called with bigger length than size of destination " "buffer")))
1110 ;
1111
1112 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) ssize_t
1113 recv (int __fd, void *__buf, size_t __n, int __flags)
1114 {
1115 if (__builtin_object_size (__buf, 0) != (size_t) -1)
1116 {
1117 if (!__builtin_constant_p (__n))
1118 return __recv_chk (__fd, __buf, __n, __builtin_object_size (__buf, 0), __flags);
1119
1120 if (__n > __builtin_object_size (__buf, 0))
1121 return __recv_chk_warn (__fd, __buf, __n, __builtin_object_size (__buf, 0), __flags);
1122 }
1123 return __recv_alias (__fd, __buf, __n, __flags);
1124 }
1125
1126 extern ssize_t __recvfrom_chk (int __fd, void *__restrict __buf, size_t __n,
1127 size_t __buflen, int __flags,
1128 __SOCKADDR_ARG __addr,
1129 socklen_t *__restrict __addr_len);
1130 extern ssize_t __recvfrom_alias (int __fd, void *__restrict __buf, size_t __n, int __flags, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len) __asm__ ("" "recvfrom")
1131
1132
1133 ;
1134 extern ssize_t __recvfrom_chk_warn (int __fd, void *__restrict __buf, size_t __n, size_t __buflen, int __flags, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len) __asm__ ("" "__recvfrom_chk")
1135
1136
1137
1138
1139 __attribute__((__warning__ ("recvfrom called with bigger length than size of " "destination buffer")))
1140 ;
1141
1142 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) ssize_t
1143 recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags,
1144 __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len)
1145 {
1146 if (__builtin_object_size (__buf, 0) != (size_t) -1)
1147 {
1148 if (!__builtin_constant_p (__n))
1149 return __recvfrom_chk (__fd, __buf, __n, __builtin_object_size (__buf, 0), __flags,
1150 __addr, __addr_len);
1151 if (__n > __builtin_object_size (__buf, 0))
1152 return __recvfrom_chk_warn (__fd, __buf, __n, __builtin_object_size (__buf, 0), __flags,
1153 __addr, __addr_len);
1154 }
1155 return __recvfrom_alias (__fd, __buf, __n, __flags, __addr, __addr_len);
1156 }
1157 # 281 "/usr/include/sys/socket.h" 2 3 4
1158
1159
1160
1161 # 27 "/usr/include/net/if.h" 2 3 4
1162
1163
1164
1165
1166
1167
1168 struct if_nameindex
1169 {
1170 unsigned int if_index;
1171 char *if_name;
1172 };
1173
1174
1175
1176
1177 enum
1178 {
1179 IFF_UP = 0x1,
1180
1181 IFF_BROADCAST = 0x2,
1182
1183 IFF_DEBUG = 0x4,
1184
1185 IFF_LOOPBACK = 0x8,
1186
1187 IFF_POINTOPOINT = 0x10,
1188
1189 IFF_NOTRAILERS = 0x20,
1190
1191 IFF_RUNNING = 0x40,
1192
1193 IFF_NOARP = 0x80,
1194
1195 IFF_PROMISC = 0x100,
1196
1197
1198
1199 IFF_ALLMULTI = 0x200,
1200
1201
1202 IFF_MASTER = 0x400,
1203
1204 IFF_SLAVE = 0x800,
1205
1206
1207 IFF_MULTICAST = 0x1000,
1208
1209
1210 IFF_PORTSEL = 0x2000,
1211
1212 IFF_AUTOMEDIA = 0x4000,
1213
1214 IFF_DYNAMIC = 0x8000
1215
1216 };
1217
1218
1219
1220
1221
1222
1223 struct ifaddr
1224 {
1225 struct sockaddr ifa_addr;
1226 union
1227 {
1228 struct sockaddr ifu_broadaddr;
1229 struct sockaddr ifu_dstaddr;
1230 } ifa_ifu;
1231 struct iface *ifa_ifp;
1232 struct ifaddr *ifa_next;
1233 };
1234 # 111 "/usr/include/net/if.h" 3 4
1235 struct ifmap
1236 {
1237 unsigned long int mem_start;
1238 unsigned long int mem_end;
1239 unsigned short int base_addr;
1240 unsigned char irq;
1241 unsigned char dma;
1242 unsigned char port;
1243
1244 };
1245
1246
1247
1248
1249
1250 struct ifreq
1251 {
1252
1253
1254 union
1255 {
1256 char ifrn_name[16];
1257 } ifr_ifrn;
1258
1259 union
1260 {
1261 struct sockaddr ifru_addr;
1262 struct sockaddr ifru_dstaddr;
1263 struct sockaddr ifru_broadaddr;
1264 struct sockaddr ifru_netmask;
1265 struct sockaddr ifru_hwaddr;
1266 short int ifru_flags;
1267 int ifru_ivalue;
1268 int ifru_mtu;
1269 struct ifmap ifru_map;
1270 char ifru_slave[16];
1271 char ifru_newname[16];
1272 __caddr_t ifru_data;
1273 } ifr_ifru;
1274 };
1275 # 176 "/usr/include/net/if.h" 3 4
1276 struct ifconf
1277 {
1278 int ifc_len;
1279 union
1280 {
1281 __caddr_t ifcu_buf;
1282 struct ifreq *ifcu_req;
1283 } ifc_ifcu;
1284 };
1285
1286
1287
1288
1289
1290
1291
1292
1293 extern unsigned int if_nametoindex (const char *__ifname) __attribute__ ((__nothrow__ , __leaf__));
1294 extern char *if_indextoname (unsigned int __ifindex, char *__ifname) __attribute__ ((__nothrow__ , __leaf__));
1295
1296
1297 extern struct if_nameindex *if_nameindex (void) __attribute__ ((__nothrow__ , __leaf__));
1298
1299
1300 extern void if_freenameindex (struct if_nameindex *__ptr) __attribute__ ((__nothrow__ , __leaf__));
1301
1302
1303 # 13 "networking/libiproute/ipaddress.c" 2
1304 # 1 "/usr/include/net/if_arp.h" 1 3 4
1305 # 30 "/usr/include/net/if_arp.h" 3 4
1306
1307 # 54 "/usr/include/net/if_arp.h" 3 4
1308 struct arphdr
1309 {
1310 unsigned short int ar_hrd;
1311 unsigned short int ar_pro;
1312 unsigned char ar_hln;
1313 unsigned char ar_pln;
1314 unsigned short int ar_op;
1315 # 69 "/usr/include/net/if_arp.h" 3 4
1316 };
1317 # 138 "/usr/include/net/if_arp.h" 3 4
1318 struct arpreq
1319 {
1320 struct sockaddr arp_pa;
1321 struct sockaddr arp_ha;
1322 int arp_flags;
1323 struct sockaddr arp_netmask;
1324 char arp_dev[16];
1325 };
1326
1327 struct arpreq_old
1328 {
1329 struct sockaddr arp_pa;
1330 struct sockaddr arp_ha;
1331 int arp_flags;
1332 struct sockaddr arp_netmask;
1333 };
1334 # 171 "/usr/include/net/if_arp.h" 3 4
1335 struct arpd_request
1336 {
1337 unsigned short int req;
1338 u_int32_t ip;
1339 unsigned long int dev;
1340 unsigned long int stamp;
1341 unsigned long int updated;
1342 unsigned char ha[7];
1343 };
1344
1345
1346 # 14 "networking/libiproute/ipaddress.c" 2
1347
1348 # 1 "networking/libiproute/ip_common.h" 1
1349
1350
1351
1352
1353 # 1 "include/libbb.h" 1
1354 # 13 "include/libbb.h"
1355 # 1 "include/platform.h" 1
1356 # 138 "include/platform.h"
1357 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include-fixed/limits.h" 1 3 4
1358 # 34 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include-fixed/limits.h" 3 4
1359 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include-fixed/syslimits.h" 1 3 4
1360
1361
1362
1363
1364
1365
1366 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include-fixed/limits.h" 1 3 4
1367 # 168 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include-fixed/limits.h" 3 4
1368 # 1 "/usr/include/limits.h" 1 3 4
1369 # 143 "/usr/include/limits.h" 3 4
1370 # 1 "/usr/include/bits/posix1_lim.h" 1 3 4
1371 # 160 "/usr/include/bits/posix1_lim.h" 3 4
1372 # 1 "/usr/include/bits/local_lim.h" 1 3 4
1373 # 38 "/usr/include/bits/local_lim.h" 3 4
1374 # 1 "/usr/include/linux/limits.h" 1 3 4
1375 # 39 "/usr/include/bits/local_lim.h" 2 3 4
1376 # 161 "/usr/include/bits/posix1_lim.h" 2 3 4
1377 # 144 "/usr/include/limits.h" 2 3 4
1378
1379
1380
1381 # 1 "/usr/include/bits/posix2_lim.h" 1 3 4
1382 # 148 "/usr/include/limits.h" 2 3 4
1383
1384
1385
1386 # 1 "/usr/include/bits/xopen_lim.h" 1 3 4
1387 # 33 "/usr/include/bits/xopen_lim.h" 3 4
1388 # 1 "/usr/include/bits/stdio_lim.h" 1 3 4
1389 # 34 "/usr/include/bits/xopen_lim.h" 2 3 4
1390 # 152 "/usr/include/limits.h" 2 3 4
1391 # 169 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include-fixed/limits.h" 2 3 4
1392 # 8 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include-fixed/syslimits.h" 2 3 4
1393 # 35 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include-fixed/limits.h" 2 3 4
1394 # 139 "include/platform.h" 2
1395 # 149 "include/platform.h"
1396 # 1 "/usr/include/byteswap.h" 1 3 4
1397 # 24 "/usr/include/byteswap.h" 3 4
1398 # 1 "/usr/include/bits/byteswap.h" 1 3 4
1399 # 25 "/usr/include/byteswap.h" 2 3 4
1400 # 150 "include/platform.h" 2
1401 # 206 "include/platform.h"
1402 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stdint.h" 1 3 4
1403 # 9 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stdint.h" 3 4
1404 # 1 "/usr/include/stdint.h" 1 3 4
1405 # 26 "/usr/include/stdint.h" 3 4
1406 # 1 "/usr/include/bits/wchar.h" 1 3 4
1407 # 27 "/usr/include/stdint.h" 2 3 4
1408 # 1 "/usr/include/bits/wordsize.h" 1 3 4
1409 # 28 "/usr/include/stdint.h" 2 3 4
1410 # 48 "/usr/include/stdint.h" 3 4
1411 typedef unsigned char uint8_t;
1412 typedef unsigned short int uint16_t;
1413
1414 typedef unsigned int uint32_t;
1415
1416
1417
1418
1419
1420 __extension__
1421 typedef unsigned long long int uint64_t;
1422
1423
1424
1425
1426
1427
1428 typedef signed char int_least8_t;
1429 typedef short int int_least16_t;
1430 typedef int int_least32_t;
1431
1432
1433
1434 __extension__
1435 typedef long long int int_least64_t;
1436
1437
1438
1439 typedef unsigned char uint_least8_t;
1440 typedef unsigned short int uint_least16_t;
1441 typedef unsigned int uint_least32_t;
1442
1443
1444
1445 __extension__
1446 typedef unsigned long long int uint_least64_t;
1447
1448
1449
1450
1451
1452
1453 typedef signed char int_fast8_t;
1454
1455
1456
1457
1458
1459 typedef int int_fast16_t;
1460 typedef int int_fast32_t;
1461 __extension__
1462 typedef long long int int_fast64_t;
1463
1464
1465
1466 typedef unsigned char uint_fast8_t;
1467
1468
1469
1470
1471
1472 typedef unsigned int uint_fast16_t;
1473 typedef unsigned int uint_fast32_t;
1474 __extension__
1475 typedef unsigned long long int uint_fast64_t;
1476 # 125 "/usr/include/stdint.h" 3 4
1477 typedef int intptr_t;
1478
1479
1480 typedef unsigned int uintptr_t;
1481 # 137 "/usr/include/stdint.h" 3 4
1482 __extension__
1483 typedef long long int intmax_t;
1484 __extension__
1485 typedef unsigned long long int uintmax_t;
1486 # 10 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stdint.h" 2 3 4
1487 # 207 "include/platform.h" 2
1488 typedef int bb__aliased_int __attribute__((__may_alias__));
1489 typedef long bb__aliased_long __attribute__((__may_alias__));
1490 typedef uint16_t bb__aliased_uint16_t __attribute__((__may_alias__));
1491 typedef uint32_t bb__aliased_uint32_t __attribute__((__may_alias__));
1492 # 248 "include/platform.h"
1493 typedef int smallint;
1494 typedef unsigned smalluint;
1495 # 258 "include/platform.h"
1496 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stdbool.h" 1 3 4
1497 # 259 "include/platform.h" 2
1498 # 286 "include/platform.h"
1499 # 1 "/usr/include/unistd.h" 1 3 4
1500 # 27 "/usr/include/unistd.h" 3 4
1501
1502 # 202 "/usr/include/unistd.h" 3 4
1503 # 1 "/usr/include/bits/posix_opt.h" 1 3 4
1504 # 203 "/usr/include/unistd.h" 2 3 4
1505
1506
1507
1508 # 1 "/usr/include/bits/environments.h" 1 3 4
1509 # 22 "/usr/include/bits/environments.h" 3 4
1510 # 1 "/usr/include/bits/wordsize.h" 1 3 4
1511 # 23 "/usr/include/bits/environments.h" 2 3 4
1512 # 207 "/usr/include/unistd.h" 2 3 4
1513 # 226 "/usr/include/unistd.h" 3 4
1514 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stddef.h" 1 3 4
1515 # 227 "/usr/include/unistd.h" 2 3 4
1516 # 287 "/usr/include/unistd.h" 3 4
1517 extern int access (const char *__name, int __type) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1518
1519
1520
1521
1522 extern int euidaccess (const char *__name, int __type)
1523 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1524
1525
1526 extern int eaccess (const char *__name, int __type)
1527 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1528
1529
1530
1531
1532
1533
1534 extern int faccessat (int __fd, const char *__file, int __type, int __flag)
1535 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
1536 # 337 "/usr/include/unistd.h" 3 4
1537 extern __off64_t lseek (int __fd, __off64_t __offset, int __whence) __asm__ ("" "lseek64") __attribute__ ((__nothrow__ , __leaf__))
1538
1539 ;
1540
1541
1542
1543
1544
1545 extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence)
1546 __attribute__ ((__nothrow__ , __leaf__));
1547
1548
1549
1550
1551
1552
1553 extern int close (int __fd);
1554
1555
1556
1557
1558
1559
1560 extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __attribute__ ((__warn_unused_result__));
1561
1562
1563
1564
1565
1566 extern ssize_t write (int __fd, const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__));
1567 # 388 "/usr/include/unistd.h" 3 4
1568 extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64")
1569
1570 __attribute__ ((__warn_unused_result__));
1571 extern ssize_t pwrite (int __fd, const void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pwrite64")
1572
1573 __attribute__ ((__warn_unused_result__));
1574 # 404 "/usr/include/unistd.h" 3 4
1575 extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes,
1576 __off64_t __offset) __attribute__ ((__warn_unused_result__));
1577
1578
1579 extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n,
1580 __off64_t __offset) __attribute__ ((__warn_unused_result__));
1581
1582
1583
1584
1585
1586
1587
1588 extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1589
1590
1591
1592
1593 extern int pipe2 (int __pipedes[2], int __flags) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1594 # 432 "/usr/include/unistd.h" 3 4
1595 extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__ , __leaf__));
1596 # 444 "/usr/include/unistd.h" 3 4
1597 extern unsigned int sleep (unsigned int __seconds);
1598
1599
1600
1601
1602
1603
1604
1605 extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
1606 __attribute__ ((__nothrow__ , __leaf__));
1607
1608
1609
1610
1611
1612
1613 extern int usleep (__useconds_t __useconds);
1614 # 469 "/usr/include/unistd.h" 3 4
1615 extern int pause (void);
1616
1617
1618
1619 extern int chown (const char *__file, __uid_t __owner, __gid_t __group)
1620 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1621
1622
1623
1624 extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1625
1626
1627
1628
1629 extern int lchown (const char *__file, __uid_t __owner, __gid_t __group)
1630 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1631
1632
1633
1634
1635
1636
1637 extern int fchownat (int __fd, const char *__file, __uid_t __owner,
1638 __gid_t __group, int __flag)
1639 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
1640
1641
1642
1643 extern int chdir (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1644
1645
1646
1647 extern int fchdir (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1648 # 511 "/usr/include/unistd.h" 3 4
1649 extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1650
1651
1652
1653
1654
1655 extern char *get_current_dir_name (void) __attribute__ ((__nothrow__ , __leaf__));
1656
1657
1658
1659
1660
1661
1662
1663 extern char *getwd (char *__buf)
1664 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__));
1665
1666
1667
1668
1669 extern int dup (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1670
1671
1672 extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__ , __leaf__));
1673
1674
1675
1676
1677 extern int dup3 (int __fd, int __fd2, int __flags) __attribute__ ((__nothrow__ , __leaf__));
1678
1679
1680
1681 extern char **__environ;
1682
1683 extern char **environ;
1684
1685
1686
1687
1688
1689 extern int execve (const char *__path, char *const __argv[],
1690 char *const __envp[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1691
1692
1693
1694
1695 extern int fexecve (int __fd, char *const __argv[], char *const __envp[])
1696 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1697
1698
1699
1700
1701 extern int execv (const char *__path, char *const __argv[])
1702 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1703
1704
1705
1706 extern int execle (const char *__path, const char *__arg, ...)
1707 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1708
1709
1710
1711 extern int execl (const char *__path, const char *__arg, ...)
1712 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1713
1714
1715
1716 extern int execvp (const char *__file, char *const __argv[])
1717 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1718
1719
1720
1721
1722 extern int execlp (const char *__file, const char *__arg, ...)
1723 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1724
1725
1726
1727
1728 extern int execvpe (const char *__file, char *const __argv[],
1729 char *const __envp[])
1730 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1731
1732
1733
1734
1735
1736 extern int nice (int __inc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1737
1738
1739
1740
1741 extern void _exit (int __status) __attribute__ ((__noreturn__));
1742
1743
1744
1745
1746
1747 # 1 "/usr/include/bits/confname.h" 1 3 4
1748 # 24 "/usr/include/bits/confname.h" 3 4
1749 enum
1750 {
1751 _PC_LINK_MAX,
1752
1753 _PC_MAX_CANON,
1754
1755 _PC_MAX_INPUT,
1756
1757 _PC_NAME_MAX,
1758
1759 _PC_PATH_MAX,
1760
1761 _PC_PIPE_BUF,
1762
1763 _PC_CHOWN_RESTRICTED,
1764
1765 _PC_NO_TRUNC,
1766
1767 _PC_VDISABLE,
1768
1769 _PC_SYNC_IO,
1770
1771 _PC_ASYNC_IO,
1772
1773 _PC_PRIO_IO,
1774
1775 _PC_SOCK_MAXBUF,
1776
1777 _PC_FILESIZEBITS,
1778
1779 _PC_REC_INCR_XFER_SIZE,
1780
1781 _PC_REC_MAX_XFER_SIZE,
1782
1783 _PC_REC_MIN_XFER_SIZE,
1784
1785 _PC_REC_XFER_ALIGN,
1786
1787 _PC_ALLOC_SIZE_MIN,
1788
1789 _PC_SYMLINK_MAX,
1790
1791 _PC_2_SYMLINKS
1792
1793 };
1794
1795
1796 enum
1797 {
1798 _SC_ARG_MAX,
1799
1800 _SC_CHILD_MAX,
1801
1802 _SC_CLK_TCK,
1803
1804 _SC_NGROUPS_MAX,
1805
1806 _SC_OPEN_MAX,
1807
1808 _SC_STREAM_MAX,
1809
1810 _SC_TZNAME_MAX,
1811
1812 _SC_JOB_CONTROL,
1813
1814 _SC_SAVED_IDS,
1815
1816 _SC_REALTIME_SIGNALS,
1817
1818 _SC_PRIORITY_SCHEDULING,
1819
1820 _SC_TIMERS,
1821
1822 _SC_ASYNCHRONOUS_IO,
1823
1824 _SC_PRIORITIZED_IO,
1825
1826 _SC_SYNCHRONIZED_IO,
1827
1828 _SC_FSYNC,
1829
1830 _SC_MAPPED_FILES,
1831
1832 _SC_MEMLOCK,
1833
1834 _SC_MEMLOCK_RANGE,
1835
1836 _SC_MEMORY_PROTECTION,
1837
1838 _SC_MESSAGE_PASSING,
1839
1840 _SC_SEMAPHORES,
1841
1842 _SC_SHARED_MEMORY_OBJECTS,
1843
1844 _SC_AIO_LISTIO_MAX,
1845
1846 _SC_AIO_MAX,
1847
1848 _SC_AIO_PRIO_DELTA_MAX,
1849
1850 _SC_DELAYTIMER_MAX,
1851
1852 _SC_MQ_OPEN_MAX,
1853
1854 _SC_MQ_PRIO_MAX,
1855
1856 _SC_VERSION,
1857
1858 _SC_PAGESIZE,
1859
1860
1861 _SC_RTSIG_MAX,
1862
1863 _SC_SEM_NSEMS_MAX,
1864
1865 _SC_SEM_VALUE_MAX,
1866
1867 _SC_SIGQUEUE_MAX,
1868
1869 _SC_TIMER_MAX,
1870
1871
1872
1873
1874 _SC_BC_BASE_MAX,
1875
1876 _SC_BC_DIM_MAX,
1877
1878 _SC_BC_SCALE_MAX,
1879
1880 _SC_BC_STRING_MAX,
1881
1882 _SC_COLL_WEIGHTS_MAX,
1883
1884 _SC_EQUIV_CLASS_MAX,
1885
1886 _SC_EXPR_NEST_MAX,
1887
1888 _SC_LINE_MAX,
1889
1890 _SC_RE_DUP_MAX,
1891
1892 _SC_CHARCLASS_NAME_MAX,
1893
1894
1895 _SC_2_VERSION,
1896
1897 _SC_2_C_BIND,
1898
1899 _SC_2_C_DEV,
1900
1901 _SC_2_FORT_DEV,
1902
1903 _SC_2_FORT_RUN,
1904
1905 _SC_2_SW_DEV,
1906
1907 _SC_2_LOCALEDEF,
1908
1909
1910 _SC_PII,
1911
1912 _SC_PII_XTI,
1913
1914 _SC_PII_SOCKET,
1915
1916 _SC_PII_INTERNET,
1917
1918 _SC_PII_OSI,
1919
1920 _SC_POLL,
1921
1922 _SC_SELECT,
1923
1924 _SC_UIO_MAXIOV,
1925
1926 _SC_IOV_MAX = _SC_UIO_MAXIOV,
1927
1928 _SC_PII_INTERNET_STREAM,
1929
1930 _SC_PII_INTERNET_DGRAM,
1931
1932 _SC_PII_OSI_COTS,
1933
1934 _SC_PII_OSI_CLTS,
1935
1936 _SC_PII_OSI_M,
1937
1938 _SC_T_IOV_MAX,
1939
1940
1941
1942 _SC_THREADS,
1943
1944 _SC_THREAD_SAFE_FUNCTIONS,
1945
1946 _SC_GETGR_R_SIZE_MAX,
1947
1948 _SC_GETPW_R_SIZE_MAX,
1949
1950 _SC_LOGIN_NAME_MAX,
1951
1952 _SC_TTY_NAME_MAX,
1953
1954 _SC_THREAD_DESTRUCTOR_ITERATIONS,
1955
1956 _SC_THREAD_KEYS_MAX,
1957
1958 _SC_THREAD_STACK_MIN,
1959
1960 _SC_THREAD_THREADS_MAX,
1961
1962 _SC_THREAD_ATTR_STACKADDR,
1963
1964 _SC_THREAD_ATTR_STACKSIZE,
1965
1966 _SC_THREAD_PRIORITY_SCHEDULING,
1967
1968 _SC_THREAD_PRIO_INHERIT,
1969
1970 _SC_THREAD_PRIO_PROTECT,
1971
1972 _SC_THREAD_PROCESS_SHARED,
1973
1974
1975 _SC_NPROCESSORS_CONF,
1976
1977 _SC_NPROCESSORS_ONLN,
1978
1979 _SC_PHYS_PAGES,
1980
1981 _SC_AVPHYS_PAGES,
1982
1983 _SC_ATEXIT_MAX,
1984
1985 _SC_PASS_MAX,
1986
1987
1988 _SC_XOPEN_VERSION,
1989
1990 _SC_XOPEN_XCU_VERSION,
1991
1992 _SC_XOPEN_UNIX,
1993
1994 _SC_XOPEN_CRYPT,
1995
1996 _SC_XOPEN_ENH_I18N,
1997
1998 _SC_XOPEN_SHM,
1999
2000
2001 _SC_2_CHAR_TERM,
2002
2003 _SC_2_C_VERSION,
2004
2005 _SC_2_UPE,
2006
2007
2008 _SC_XOPEN_XPG2,
2009
2010 _SC_XOPEN_XPG3,
2011
2012 _SC_XOPEN_XPG4,
2013
2014
2015 _SC_CHAR_BIT,
2016
2017 _SC_CHAR_MAX,
2018
2019 _SC_CHAR_MIN,
2020
2021 _SC_INT_MAX,
2022
2023 _SC_INT_MIN,
2024
2025 _SC_LONG_BIT,
2026
2027 _SC_WORD_BIT,
2028
2029 _SC_MB_LEN_MAX,
2030
2031 _SC_NZERO,
2032
2033 _SC_SSIZE_MAX,
2034
2035 _SC_SCHAR_MAX,
2036
2037 _SC_SCHAR_MIN,
2038
2039 _SC_SHRT_MAX,
2040
2041 _SC_SHRT_MIN,
2042
2043 _SC_UCHAR_MAX,
2044
2045 _SC_UINT_MAX,
2046
2047 _SC_ULONG_MAX,
2048
2049 _SC_USHRT_MAX,
2050
2051
2052 _SC_NL_ARGMAX,
2053
2054 _SC_NL_LANGMAX,
2055
2056 _SC_NL_MSGMAX,
2057
2058 _SC_NL_NMAX,
2059
2060 _SC_NL_SETMAX,
2061
2062 _SC_NL_TEXTMAX,
2063
2064
2065 _SC_XBS5_ILP32_OFF32,
2066
2067 _SC_XBS5_ILP32_OFFBIG,
2068
2069 _SC_XBS5_LP64_OFF64,
2070
2071 _SC_XBS5_LPBIG_OFFBIG,
2072
2073
2074 _SC_XOPEN_LEGACY,
2075
2076 _SC_XOPEN_REALTIME,
2077
2078 _SC_XOPEN_REALTIME_THREADS,
2079
2080
2081 _SC_ADVISORY_INFO,
2082
2083 _SC_BARRIERS,
2084
2085 _SC_BASE,
2086
2087 _SC_C_LANG_SUPPORT,
2088
2089 _SC_C_LANG_SUPPORT_R,
2090
2091 _SC_CLOCK_SELECTION,
2092
2093 _SC_CPUTIME,
2094
2095 _SC_THREAD_CPUTIME,
2096
2097 _SC_DEVICE_IO,
2098
2099 _SC_DEVICE_SPECIFIC,
2100
2101 _SC_DEVICE_SPECIFIC_R,
2102
2103 _SC_FD_MGMT,
2104
2105 _SC_FIFO,
2106
2107 _SC_PIPE,
2108
2109 _SC_FILE_ATTRIBUTES,
2110
2111 _SC_FILE_LOCKING,
2112
2113 _SC_FILE_SYSTEM,
2114
2115 _SC_MONOTONIC_CLOCK,
2116
2117 _SC_MULTI_PROCESS,
2118
2119 _SC_SINGLE_PROCESS,
2120
2121 _SC_NETWORKING,
2122
2123 _SC_READER_WRITER_LOCKS,
2124
2125 _SC_SPIN_LOCKS,
2126
2127 _SC_REGEXP,
2128
2129 _SC_REGEX_VERSION,
2130
2131 _SC_SHELL,
2132
2133 _SC_SIGNALS,
2134
2135 _SC_SPAWN,
2136
2137 _SC_SPORADIC_SERVER,
2138
2139 _SC_THREAD_SPORADIC_SERVER,
2140
2141 _SC_SYSTEM_DATABASE,
2142
2143 _SC_SYSTEM_DATABASE_R,
2144
2145 _SC_TIMEOUTS,
2146
2147 _SC_TYPED_MEMORY_OBJECTS,
2148
2149 _SC_USER_GROUPS,
2150
2151 _SC_USER_GROUPS_R,
2152
2153 _SC_2_PBS,
2154
2155 _SC_2_PBS_ACCOUNTING,
2156
2157 _SC_2_PBS_LOCATE,
2158
2159 _SC_2_PBS_MESSAGE,
2160
2161 _SC_2_PBS_TRACK,
2162
2163 _SC_SYMLOOP_MAX,
2164
2165 _SC_STREAMS,
2166
2167 _SC_2_PBS_CHECKPOINT,
2168
2169
2170 _SC_V6_ILP32_OFF32,
2171
2172 _SC_V6_ILP32_OFFBIG,
2173
2174 _SC_V6_LP64_OFF64,
2175
2176 _SC_V6_LPBIG_OFFBIG,
2177
2178
2179 _SC_HOST_NAME_MAX,
2180
2181 _SC_TRACE,
2182
2183 _SC_TRACE_EVENT_FILTER,
2184
2185 _SC_TRACE_INHERIT,
2186
2187 _SC_TRACE_LOG,
2188
2189
2190 _SC_LEVEL1_ICACHE_SIZE,
2191
2192 _SC_LEVEL1_ICACHE_ASSOC,
2193
2194 _SC_LEVEL1_ICACHE_LINESIZE,
2195
2196 _SC_LEVEL1_DCACHE_SIZE,
2197
2198 _SC_LEVEL1_DCACHE_ASSOC,
2199
2200 _SC_LEVEL1_DCACHE_LINESIZE,
2201
2202 _SC_LEVEL2_CACHE_SIZE,
2203
2204 _SC_LEVEL2_CACHE_ASSOC,
2205
2206 _SC_LEVEL2_CACHE_LINESIZE,
2207
2208 _SC_LEVEL3_CACHE_SIZE,
2209
2210 _SC_LEVEL3_CACHE_ASSOC,
2211
2212 _SC_LEVEL3_CACHE_LINESIZE,
2213
2214 _SC_LEVEL4_CACHE_SIZE,
2215
2216 _SC_LEVEL4_CACHE_ASSOC,
2217
2218 _SC_LEVEL4_CACHE_LINESIZE,
2219
2220
2221
2222 _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50,
2223
2224 _SC_RAW_SOCKETS,
2225
2226
2227 _SC_V7_ILP32_OFF32,
2228
2229 _SC_V7_ILP32_OFFBIG,
2230
2231 _SC_V7_LP64_OFF64,
2232
2233 _SC_V7_LPBIG_OFFBIG,
2234
2235
2236 _SC_SS_REPL_MAX,
2237
2238
2239 _SC_TRACE_EVENT_NAME_MAX,
2240
2241 _SC_TRACE_NAME_MAX,
2242
2243 _SC_TRACE_SYS_MAX,
2244
2245 _SC_TRACE_USER_EVENT_MAX,
2246
2247
2248 _SC_XOPEN_STREAMS,
2249
2250
2251 _SC_THREAD_ROBUST_PRIO_INHERIT,
2252
2253 _SC_THREAD_ROBUST_PRIO_PROTECT
2254
2255 };
2256
2257
2258 enum
2259 {
2260 _CS_PATH,
2261
2262
2263 _CS_V6_WIDTH_RESTRICTED_ENVS,
2264
2265
2266
2267 _CS_GNU_LIBC_VERSION,
2268
2269 _CS_GNU_LIBPTHREAD_VERSION,
2270
2271
2272 _CS_V5_WIDTH_RESTRICTED_ENVS,
2273
2274
2275
2276 _CS_V7_WIDTH_RESTRICTED_ENVS,
2277
2278
2279
2280 _CS_LFS_CFLAGS = 1000,
2281
2282 _CS_LFS_LDFLAGS,
2283
2284 _CS_LFS_LIBS,
2285
2286 _CS_LFS_LINTFLAGS,
2287
2288 _CS_LFS64_CFLAGS,
2289
2290 _CS_LFS64_LDFLAGS,
2291
2292 _CS_LFS64_LIBS,
2293
2294 _CS_LFS64_LINTFLAGS,
2295
2296
2297 _CS_XBS5_ILP32_OFF32_CFLAGS = 1100,
2298
2299 _CS_XBS5_ILP32_OFF32_LDFLAGS,
2300
2301 _CS_XBS5_ILP32_OFF32_LIBS,
2302
2303 _CS_XBS5_ILP32_OFF32_LINTFLAGS,
2304
2305 _CS_XBS5_ILP32_OFFBIG_CFLAGS,
2306
2307 _CS_XBS5_ILP32_OFFBIG_LDFLAGS,
2308
2309 _CS_XBS5_ILP32_OFFBIG_LIBS,
2310
2311 _CS_XBS5_ILP32_OFFBIG_LINTFLAGS,
2312
2313 _CS_XBS5_LP64_OFF64_CFLAGS,
2314
2315 _CS_XBS5_LP64_OFF64_LDFLAGS,
2316
2317 _CS_XBS5_LP64_OFF64_LIBS,
2318
2319 _CS_XBS5_LP64_OFF64_LINTFLAGS,
2320
2321 _CS_XBS5_LPBIG_OFFBIG_CFLAGS,
2322
2323 _CS_XBS5_LPBIG_OFFBIG_LDFLAGS,
2324
2325 _CS_XBS5_LPBIG_OFFBIG_LIBS,
2326
2327 _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS,
2328
2329
2330 _CS_POSIX_V6_ILP32_OFF32_CFLAGS,
2331
2332 _CS_POSIX_V6_ILP32_OFF32_LDFLAGS,
2333
2334 _CS_POSIX_V6_ILP32_OFF32_LIBS,
2335
2336 _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS,
2337
2338 _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS,
2339
2340 _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS,
2341
2342 _CS_POSIX_V6_ILP32_OFFBIG_LIBS,
2343
2344 _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS,
2345
2346 _CS_POSIX_V6_LP64_OFF64_CFLAGS,
2347
2348 _CS_POSIX_V6_LP64_OFF64_LDFLAGS,
2349
2350 _CS_POSIX_V6_LP64_OFF64_LIBS,
2351
2352 _CS_POSIX_V6_LP64_OFF64_LINTFLAGS,
2353
2354 _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS,
2355
2356 _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS,
2357
2358 _CS_POSIX_V6_LPBIG_OFFBIG_LIBS,
2359
2360 _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS,
2361
2362
2363 _CS_POSIX_V7_ILP32_OFF32_CFLAGS,
2364
2365 _CS_POSIX_V7_ILP32_OFF32_LDFLAGS,
2366
2367 _CS_POSIX_V7_ILP32_OFF32_LIBS,
2368
2369 _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS,
2370
2371 _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS,
2372
2373 _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS,
2374
2375 _CS_POSIX_V7_ILP32_OFFBIG_LIBS,
2376
2377 _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS,
2378
2379 _CS_POSIX_V7_LP64_OFF64_CFLAGS,
2380
2381 _CS_POSIX_V7_LP64_OFF64_LDFLAGS,
2382
2383 _CS_POSIX_V7_LP64_OFF64_LIBS,
2384
2385 _CS_POSIX_V7_LP64_OFF64_LINTFLAGS,
2386
2387 _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS,
2388
2389 _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS,
2390
2391 _CS_POSIX_V7_LPBIG_OFFBIG_LIBS,
2392
2393 _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS,
2394
2395
2396 _CS_V6_ENV,
2397
2398 _CS_V7_ENV
2399
2400 };
2401 # 610 "/usr/include/unistd.h" 2 3 4
2402
2403
2404 extern long int pathconf (const char *__path, int __name)
2405 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2406
2407
2408 extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__ , __leaf__));
2409
2410
2411 extern long int sysconf (int __name) __attribute__ ((__nothrow__ , __leaf__));
2412
2413
2414
2415 extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__));
2416
2417
2418
2419
2420 extern __pid_t getpid (void) __attribute__ ((__nothrow__ , __leaf__));
2421
2422
2423 extern __pid_t getppid (void) __attribute__ ((__nothrow__ , __leaf__));
2424
2425
2426 extern __pid_t getpgrp (void) __attribute__ ((__nothrow__ , __leaf__));
2427
2428
2429 extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
2430
2431 extern __pid_t getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
2432
2433
2434
2435
2436
2437
2438 extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__ , __leaf__));
2439 # 660 "/usr/include/unistd.h" 3 4
2440 extern int setpgrp (void) __attribute__ ((__nothrow__ , __leaf__));
2441
2442
2443
2444
2445
2446
2447 extern __pid_t setsid (void) __attribute__ ((__nothrow__ , __leaf__));
2448
2449
2450
2451 extern __pid_t getsid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
2452
2453
2454
2455 extern __uid_t getuid (void) __attribute__ ((__nothrow__ , __leaf__));
2456
2457
2458 extern __uid_t geteuid (void) __attribute__ ((__nothrow__ , __leaf__));
2459
2460
2461 extern __gid_t getgid (void) __attribute__ ((__nothrow__ , __leaf__));
2462
2463
2464 extern __gid_t getegid (void) __attribute__ ((__nothrow__ , __leaf__));
2465
2466
2467
2468
2469 extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2470
2471
2472
2473 extern int group_member (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__));
2474
2475
2476
2477
2478
2479
2480 extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2481
2482
2483
2484
2485 extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2486
2487
2488
2489
2490 extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2491
2492
2493
2494
2495
2496
2497 extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2498
2499
2500
2501
2502 extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2503
2504
2505
2506
2507 extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2508
2509
2510
2511
2512
2513 extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid)
2514 __attribute__ ((__nothrow__ , __leaf__));
2515
2516
2517
2518 extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid)
2519 __attribute__ ((__nothrow__ , __leaf__));
2520
2521
2522
2523 extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid)
2524 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2525
2526
2527
2528 extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid)
2529 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2530
2531
2532
2533
2534
2535
2536 extern __pid_t fork (void) __attribute__ ((__nothrow__));
2537
2538
2539
2540
2541
2542
2543
2544 extern __pid_t vfork (void) __attribute__ ((__nothrow__ , __leaf__));
2545
2546
2547
2548
2549
2550 extern char *ttyname (int __fd) __attribute__ ((__nothrow__ , __leaf__));
2551
2552
2553
2554 extern int ttyname_r (int __fd, char *__buf, size_t __buflen)
2555 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
2556
2557
2558
2559 extern int isatty (int __fd) __attribute__ ((__nothrow__ , __leaf__));
2560
2561
2562
2563
2564
2565 extern int ttyslot (void) __attribute__ ((__nothrow__ , __leaf__));
2566
2567
2568
2569
2570 extern int link (const char *__from, const char *__to)
2571 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
2572
2573
2574
2575
2576 extern int linkat (int __fromfd, const char *__from, int __tofd,
2577 const char *__to, int __flags)
2578 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__warn_unused_result__));
2579
2580
2581
2582
2583 extern int symlink (const char *__from, const char *__to)
2584 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
2585
2586
2587
2588
2589 extern ssize_t readlink (const char *__restrict __path,
2590 char *__restrict __buf, size_t __len)
2591 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
2592
2593
2594
2595
2596 extern int symlinkat (const char *__from, int __tofd,
2597 const char *__to) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__));
2598
2599
2600 extern ssize_t readlinkat (int __fd, const char *__restrict __path,
2601 char *__restrict __buf, size_t __len)
2602 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__));
2603
2604
2605
2606 extern int unlink (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2607
2608
2609
2610 extern int unlinkat (int __fd, const char *__name, int __flag)
2611 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2612
2613
2614
2615 extern int rmdir (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2616
2617
2618
2619 extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__ , __leaf__));
2620
2621
2622 extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__ , __leaf__));
2623
2624
2625
2626
2627
2628
2629 extern char *getlogin (void);
2630
2631
2632
2633
2634
2635
2636
2637 extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1)));
2638
2639
2640
2641
2642 extern int setlogin (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2643 # 871 "/usr/include/unistd.h" 3 4
2644 # 1 "/usr/include/getopt.h" 1 3 4
2645 # 57 "/usr/include/getopt.h" 3 4
2646 extern char *optarg;
2647 # 71 "/usr/include/getopt.h" 3 4
2648 extern int optind;
2649
2650
2651
2652
2653 extern int opterr;
2654
2655
2656
2657 extern int optopt;
2658 # 150 "/usr/include/getopt.h" 3 4
2659 extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
2660 __attribute__ ((__nothrow__ , __leaf__));
2661 # 872 "/usr/include/unistd.h" 2 3 4
2662
2663
2664
2665
2666
2667
2668
2669 extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2670
2671
2672
2673
2674
2675
2676 extern int sethostname (const char *__name, size_t __len)
2677 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2678
2679
2680
2681 extern int sethostid (long int __id) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2682
2683
2684
2685
2686
2687 extern int getdomainname (char *__name, size_t __len)
2688 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2689 extern int setdomainname (const char *__name, size_t __len)
2690 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2691
2692
2693
2694
2695
2696 extern int vhangup (void) __attribute__ ((__nothrow__ , __leaf__));
2697
2698
2699 extern int revoke (const char *__file) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2700
2701
2702
2703
2704
2705
2706
2707 extern int profil (unsigned short int *__sample_buffer, size_t __size,
2708 size_t __offset, unsigned int __scale)
2709 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2710
2711
2712
2713
2714
2715 extern int acct (const char *__name) __attribute__ ((__nothrow__ , __leaf__));
2716
2717
2718
2719 extern char *getusershell (void) __attribute__ ((__nothrow__ , __leaf__));
2720 extern void endusershell (void) __attribute__ ((__nothrow__ , __leaf__));
2721 extern void setusershell (void) __attribute__ ((__nothrow__ , __leaf__));
2722
2723
2724
2725
2726
2727 extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2728
2729
2730
2731
2732
2733
2734 extern int chroot (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2735
2736
2737
2738 extern char *getpass (const char *__prompt) __attribute__ ((__nonnull__ (1)));
2739
2740
2741
2742
2743
2744
2745
2746 extern int fsync (int __fd);
2747
2748
2749
2750
2751
2752 extern int syncfs (int __fd) __attribute__ ((__nothrow__ , __leaf__));
2753
2754
2755
2756
2757
2758
2759 extern long int gethostid (void);
2760
2761
2762 extern void sync (void) __attribute__ ((__nothrow__ , __leaf__));
2763
2764
2765
2766
2767
2768 extern int getpagesize (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2769
2770
2771
2772
2773 extern int getdtablesize (void) __attribute__ ((__nothrow__ , __leaf__));
2774 # 997 "/usr/include/unistd.h" 3 4
2775 extern int truncate (const char *__file, __off64_t __length) __asm__ ("" "truncate64") __attribute__ ((__nothrow__ , __leaf__))
2776
2777 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2778
2779
2780
2781
2782
2783 extern int truncate64 (const char *__file, __off64_t __length)
2784 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2785 # 1019 "/usr/include/unistd.h" 3 4
2786 extern int ftruncate (int __fd, __off64_t __length) __asm__ ("" "ftruncate64") __attribute__ ((__nothrow__ , __leaf__))
2787 __attribute__ ((__warn_unused_result__));
2788
2789
2790
2791
2792
2793 extern int ftruncate64 (int __fd, __off64_t __length) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2794 # 1037 "/usr/include/unistd.h" 3 4
2795 extern int brk (void *__addr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2796
2797
2798
2799
2800
2801 extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__ , __leaf__));
2802 # 1058 "/usr/include/unistd.h" 3 4
2803 extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__ , __leaf__));
2804 # 1084 "/usr/include/unistd.h" 3 4
2805 extern int lockf (int __fd, int __cmd, __off64_t __len) __asm__ ("" "lockf64")
2806 __attribute__ ((__warn_unused_result__));
2807
2808
2809
2810
2811
2812 extern int lockf64 (int __fd, int __cmd, __off64_t __len) __attribute__ ((__warn_unused_result__));
2813 # 1112 "/usr/include/unistd.h" 3 4
2814 extern int fdatasync (int __fildes);
2815
2816
2817
2818
2819
2820
2821
2822 extern char *crypt (const char *__key, const char *__salt)
2823 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2824
2825
2826
2827 extern void encrypt (char *__glibc_block, int __edflag)
2828 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2829
2830
2831
2832
2833
2834
2835 extern void swab (const void *__restrict __from, void *__restrict __to,
2836 ssize_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2837 # 1148 "/usr/include/unistd.h" 3 4
2838 # 1 "/usr/include/bits/unistd.h" 1 3 4
2839 # 23 "/usr/include/bits/unistd.h" 3 4
2840 extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes,
2841 size_t __buflen) __attribute__ ((__warn_unused_result__));
2842 extern ssize_t __read_alias (int __fd, void *__buf, size_t __nbytes) __asm__ ("" "read")
2843 __attribute__ ((__warn_unused_result__));
2844 extern ssize_t __read_chk_warn (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("" "__read_chk")
2845
2846
2847 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("read called with bigger length than size of " "the destination buffer")))
2848 ;
2849
2850 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
2851 read (int __fd, void *__buf, size_t __nbytes)
2852 {
2853 if (__builtin_object_size (__buf, 0) != (size_t) -1)
2854 {
2855 if (!__builtin_constant_p (__nbytes))
2856 return __read_chk (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0));
2857
2858 if (__nbytes > __builtin_object_size (__buf, 0))
2859 return __read_chk_warn (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0));
2860 }
2861 return __read_alias (__fd, __buf, __nbytes);
2862 }
2863
2864
2865 extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes,
2866 __off_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__));
2867 extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes,
2868 __off64_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__));
2869 extern ssize_t __pread_alias (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __asm__ ("" "pread")
2870
2871 __attribute__ ((__warn_unused_result__));
2872 extern ssize_t __pread64_alias (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64")
2873
2874 __attribute__ ((__warn_unused_result__));
2875 extern ssize_t __pread_chk_warn (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __asm__ ("" "__pread_chk")
2876
2877
2878 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread called with bigger length than size of " "the destination buffer")))
2879 ;
2880 extern ssize_t __pread64_chk_warn (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __asm__ ("" "__pread64_chk")
2881
2882
2883
2884 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread64 called with bigger length than size of " "the destination buffer")))
2885 ;
2886 # 86 "/usr/include/bits/unistd.h" 3 4
2887 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
2888 pread (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
2889 {
2890 if (__builtin_object_size (__buf, 0) != (size_t) -1)
2891 {
2892 if (!__builtin_constant_p (__nbytes))
2893 return __pread64_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0));
2894
2895 if ( __nbytes > __builtin_object_size (__buf, 0))
2896 return __pread64_chk_warn (__fd, __buf, __nbytes, __offset,
2897 __builtin_object_size (__buf, 0));
2898 }
2899
2900 return __pread64_alias (__fd, __buf, __nbytes, __offset);
2901 }
2902
2903
2904
2905 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
2906 pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
2907 {
2908 if (__builtin_object_size (__buf, 0) != (size_t) -1)
2909 {
2910 if (!__builtin_constant_p (__nbytes))
2911 return __pread64_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0));
2912
2913 if ( __nbytes > __builtin_object_size (__buf, 0))
2914 return __pread64_chk_warn (__fd, __buf, __nbytes, __offset,
2915 __builtin_object_size (__buf, 0));
2916 }
2917
2918 return __pread64_alias (__fd, __buf, __nbytes, __offset);
2919 }
2920
2921
2922
2923
2924 extern ssize_t __readlink_chk (const char *__restrict __path,
2925 char *__restrict __buf, size_t __len,
2926 size_t __buflen)
2927 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
2928 extern ssize_t __readlink_alias (const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlink") __attribute__ ((__nothrow__ , __leaf__))
2929
2930
2931 __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
2932 extern ssize_t __readlink_chk_warn (const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlink_chk") __attribute__ ((__nothrow__ , __leaf__))
2933
2934
2935
2936 __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlink called with bigger length " "than size of destination buffer")))
2937 ;
2938
2939 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ssize_t
2940 __attribute__ ((__nothrow__ , __leaf__)) readlink (const char *__restrict __path, char *__restrict __buf, size_t __len)
2941
2942 {
2943 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2944 {
2945 if (!__builtin_constant_p (__len))
2946 return __readlink_chk (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1));
2947
2948 if ( __len > __builtin_object_size (__buf, 2 > 1))
2949 return __readlink_chk_warn (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1));
2950 }
2951 return __readlink_alias (__path, __buf, __len);
2952 }
2953
2954
2955
2956 extern ssize_t __readlinkat_chk (int __fd, const char *__restrict __path,
2957 char *__restrict __buf, size_t __len,
2958 size_t __buflen)
2959 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__));
2960 extern ssize_t __readlinkat_alias (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlinkat") __attribute__ ((__nothrow__ , __leaf__))
2961
2962
2963
2964 __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__));
2965 extern ssize_t __readlinkat_chk_warn (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlinkat_chk") __attribute__ ((__nothrow__ , __leaf__))
2966
2967
2968
2969 __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlinkat called with bigger " "length than size of destination " "buffer")))
2970
2971 ;
2972
2973 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ssize_t
2974 __attribute__ ((__nothrow__ , __leaf__)) readlinkat (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len)
2975
2976 {
2977 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2978 {
2979 if (!__builtin_constant_p (__len))
2980 return __readlinkat_chk (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1));
2981
2982 if (__len > __builtin_object_size (__buf, 2 > 1))
2983 return __readlinkat_chk_warn (__fd, __path, __buf, __len,
2984 __builtin_object_size (__buf, 2 > 1));
2985 }
2986 return __readlinkat_alias (__fd, __path, __buf, __len);
2987 }
2988
2989
2990 extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen)
2991 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2992 extern char *__getcwd_alias (char *__buf, size_t __size) __asm__ ("" "getcwd") __attribute__ ((__nothrow__ , __leaf__))
2993 __attribute__ ((__warn_unused_result__));
2994 extern char *__getcwd_chk_warn (char *__buf, size_t __size, size_t __buflen) __asm__ ("" "__getcwd_chk") __attribute__ ((__nothrow__ , __leaf__))
2995
2996
2997 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getcwd caller with bigger length than size of " "destination buffer")))
2998 ;
2999
3000 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
3001 __attribute__ ((__nothrow__ , __leaf__)) getcwd (char *__buf, size_t __size)
3002 {
3003 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
3004 {
3005 if (!__builtin_constant_p (__size))
3006 return __getcwd_chk (__buf, __size, __builtin_object_size (__buf, 2 > 1));
3007
3008 if (__size > __builtin_object_size (__buf, 2 > 1))
3009 return __getcwd_chk_warn (__buf, __size, __builtin_object_size (__buf, 2 > 1));
3010 }
3011 return __getcwd_alias (__buf, __size);
3012 }
3013
3014
3015 extern char *__getwd_chk (char *__buf, size_t buflen)
3016 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
3017 extern char *__getwd_warn (char *__buf) __asm__ ("" "getwd") __attribute__ ((__nothrow__ , __leaf__))
3018 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use getcwd instead, as getwd " "doesn't specify buffer size")))
3019 ;
3020
3021 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char *
3022 __attribute__ ((__nothrow__ , __leaf__)) getwd (char *__buf)
3023 {
3024 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
3025 return __getwd_chk (__buf, __builtin_object_size (__buf, 2 > 1));
3026 return __getwd_warn (__buf);
3027 }
3028
3029
3030 extern size_t __confstr_chk (int __name, char *__buf, size_t __len,
3031 size_t __buflen) __attribute__ ((__nothrow__ , __leaf__));
3032 extern size_t __confstr_alias (int __name, char *__buf, size_t __len) __asm__ ("" "confstr") __attribute__ ((__nothrow__ , __leaf__))
3033 ;
3034 extern size_t __confstr_chk_warn (int __name, char *__buf, size_t __len, size_t __buflen) __asm__ ("" "__confstr_chk") __attribute__ ((__nothrow__ , __leaf__))
3035
3036
3037 __attribute__((__warning__ ("confstr called with bigger length than size of destination " "buffer")))
3038 ;
3039
3040 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t
3041 __attribute__ ((__nothrow__ , __leaf__)) confstr (int __name, char *__buf, size_t __len)
3042 {
3043 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
3044 {
3045 if (!__builtin_constant_p (__len))
3046 return __confstr_chk (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1));
3047
3048 if (__builtin_object_size (__buf, 2 > 1) < __len)
3049 return __confstr_chk_warn (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1));
3050 }
3051 return __confstr_alias (__name, __buf, __len);
3052 }
3053
3054
3055 extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen)
3056 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
3057 extern int __getgroups_alias (int __size, __gid_t __list[]) __asm__ ("" "getgroups") __attribute__ ((__nothrow__ , __leaf__))
3058 __attribute__ ((__warn_unused_result__));
3059 extern int __getgroups_chk_warn (int __size, __gid_t __list[], size_t __listlen) __asm__ ("" "__getgroups_chk") __attribute__ ((__nothrow__ , __leaf__))
3060
3061
3062 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getgroups called with bigger group count than what " "can fit into destination buffer")))
3063 ;
3064
3065 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
3066 __attribute__ ((__nothrow__ , __leaf__)) getgroups (int __size, __gid_t __list[])
3067 {
3068 if (__builtin_object_size (__list, 2 > 1) != (size_t) -1)
3069 {
3070 if (!__builtin_constant_p (__size) || __size < 0)
3071 return __getgroups_chk (__size, __list, __builtin_object_size (__list, 2 > 1));
3072
3073 if (__size * sizeof (__gid_t) > __builtin_object_size (__list, 2 > 1))
3074 return __getgroups_chk_warn (__size, __list, __builtin_object_size (__list, 2 > 1));
3075 }
3076 return __getgroups_alias (__size, __list);
3077 }
3078
3079
3080 extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen,
3081 size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
3082 extern int __ttyname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ttyname_r") __attribute__ ((__nothrow__ , __leaf__))
3083
3084 __attribute__ ((__nonnull__ (2)));
3085 extern int __ttyname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ttyname_r_chk") __attribute__ ((__nothrow__ , __leaf__))
3086
3087
3088 __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ttyname_r called with bigger buflen than " "size of destination buffer")))
3089 ;
3090
3091 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
3092 __attribute__ ((__nothrow__ , __leaf__)) ttyname_r (int __fd, char *__buf, size_t __buflen)
3093 {
3094 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
3095 {
3096 if (!__builtin_constant_p (__buflen))
3097 return __ttyname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
3098
3099 if (__buflen > __builtin_object_size (__buf, 2 > 1))
3100 return __ttyname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
3101 }
3102 return __ttyname_r_alias (__fd, __buf, __buflen);
3103 }
3104
3105
3106
3107 extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal)
3108 __attribute__ ((__nonnull__ (1)));
3109 extern int __getlogin_r_alias (char *__buf, size_t __buflen) __asm__ ("" "getlogin_r")
3110 __attribute__ ((__nonnull__ (1)));
3111 extern int __getlogin_r_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getlogin_r_chk")
3112
3113
3114 __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("getlogin_r called with bigger buflen than " "size of destination buffer")))
3115 ;
3116
3117 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
3118 getlogin_r (char *__buf, size_t __buflen)
3119 {
3120 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
3121 {
3122 if (!__builtin_constant_p (__buflen))
3123 return __getlogin_r_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
3124
3125 if (__buflen > __builtin_object_size (__buf, 2 > 1))
3126 return __getlogin_r_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
3127 }
3128 return __getlogin_r_alias (__buf, __buflen);
3129 }
3130
3131
3132
3133
3134 extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal)
3135 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3136 extern int __gethostname_alias (char *__buf, size_t __buflen) __asm__ ("" "gethostname") __attribute__ ((__nothrow__ , __leaf__))
3137 __attribute__ ((__nonnull__ (1)));
3138 extern int __gethostname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__gethostname_chk") __attribute__ ((__nothrow__ , __leaf__))
3139
3140
3141 __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("gethostname called with bigger buflen than " "size of destination buffer")))
3142 ;
3143
3144 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
3145 __attribute__ ((__nothrow__ , __leaf__)) gethostname (char *__buf, size_t __buflen)
3146 {
3147 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
3148 {
3149 if (!__builtin_constant_p (__buflen))
3150 return __gethostname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
3151
3152 if (__buflen > __builtin_object_size (__buf, 2 > 1))
3153 return __gethostname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
3154 }
3155 return __gethostname_alias (__buf, __buflen);
3156 }
3157
3158
3159
3160
3161 extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal)
3162 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
3163 extern int __getdomainname_alias (char *__buf, size_t __buflen) __asm__ ("" "getdomainname") __attribute__ ((__nothrow__ , __leaf__))
3164
3165 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
3166 extern int __getdomainname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getdomainname_chk") __attribute__ ((__nothrow__ , __leaf__))
3167
3168
3169 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getdomainname called with bigger " "buflen than size of destination " "buffer")))
3170
3171 ;
3172
3173 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
3174 __attribute__ ((__nothrow__ , __leaf__)) getdomainname (char *__buf, size_t __buflen)
3175 {
3176 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
3177 {
3178 if (!__builtin_constant_p (__buflen))
3179 return __getdomainname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
3180
3181 if (__buflen > __builtin_object_size (__buf, 2 > 1))
3182 return __getdomainname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
3183 }
3184 return __getdomainname_alias (__buf, __buflen);
3185 }
3186 # 1149 "/usr/include/unistd.h" 2 3 4
3187
3188
3189
3190 # 287 "include/platform.h" 2
3191 # 14 "include/libbb.h" 2
3192
3193 # 1 "/usr/include/ctype.h" 1 3 4
3194 # 28 "/usr/include/ctype.h" 3 4
3195
3196 # 46 "/usr/include/ctype.h" 3 4
3197 enum
3198 {
3199 _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)),
3200 _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)),
3201 _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)),
3202 _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)),
3203 _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)),
3204 _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)),
3205 _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)),
3206 _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)),
3207 _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)),
3208 _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)),
3209 _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)),
3210 _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8))
3211 };
3212 # 79 "/usr/include/ctype.h" 3 4
3213 extern const unsigned short int **__ctype_b_loc (void)
3214 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3215 extern const __int32_t **__ctype_tolower_loc (void)
3216 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3217 extern const __int32_t **__ctype_toupper_loc (void)
3218 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3219 # 104 "/usr/include/ctype.h" 3 4
3220
3221
3222
3223
3224
3225
3226 extern int isalnum (int) __attribute__ ((__nothrow__ , __leaf__));
3227 extern int isalpha (int) __attribute__ ((__nothrow__ , __leaf__));
3228 extern int iscntrl (int) __attribute__ ((__nothrow__ , __leaf__));
3229 extern int isdigit (int) __attribute__ ((__nothrow__ , __leaf__));
3230 extern int islower (int) __attribute__ ((__nothrow__ , __leaf__));
3231 extern int isgraph (int) __attribute__ ((__nothrow__ , __leaf__));
3232 extern int isprint (int) __attribute__ ((__nothrow__ , __leaf__));
3233 extern int ispunct (int) __attribute__ ((__nothrow__ , __leaf__));
3234 extern int isspace (int) __attribute__ ((__nothrow__ , __leaf__));
3235 extern int isupper (int) __attribute__ ((__nothrow__ , __leaf__));
3236 extern int isxdigit (int) __attribute__ ((__nothrow__ , __leaf__));
3237
3238
3239
3240 extern int tolower (int __c) __attribute__ ((__nothrow__ , __leaf__));
3241
3242
3243 extern int toupper (int __c) __attribute__ ((__nothrow__ , __leaf__));
3244
3245
3246
3247
3248
3249
3250
3251
3252 extern int isblank (int) __attribute__ ((__nothrow__ , __leaf__));
3253
3254
3255
3256
3257
3258
3259 extern int isctype (int __c, int __mask) __attribute__ ((__nothrow__ , __leaf__));
3260
3261
3262
3263
3264
3265
3266 extern int isascii (int __c) __attribute__ ((__nothrow__ , __leaf__));
3267
3268
3269
3270 extern int toascii (int __c) __attribute__ ((__nothrow__ , __leaf__));
3271
3272
3273
3274 extern int _toupper (int) __attribute__ ((__nothrow__ , __leaf__));
3275 extern int _tolower (int) __attribute__ ((__nothrow__ , __leaf__));
3276 # 214 "/usr/include/ctype.h" 3 4
3277 extern __inline __attribute__ ((__gnu_inline__)) int
3278 __attribute__ ((__nothrow__ , __leaf__)) tolower (int __c)
3279 {
3280 return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c;
3281 }
3282
3283 extern __inline __attribute__ ((__gnu_inline__)) int
3284 __attribute__ ((__nothrow__ , __leaf__)) toupper (int __c)
3285 {
3286 return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c;
3287 }
3288 # 257 "/usr/include/ctype.h" 3 4
3289 # 1 "/usr/include/xlocale.h" 1 3 4
3290 # 27 "/usr/include/xlocale.h" 3 4
3291 typedef struct __locale_struct
3292 {
3293
3294 struct __locale_data *__locales[13];
3295
3296
3297 const unsigned short int *__ctype_b;
3298 const int *__ctype_tolower;
3299 const int *__ctype_toupper;
3300
3301
3302 const char *__names[13];
3303 } *__locale_t;
3304
3305
3306 typedef __locale_t locale_t;
3307 # 258 "/usr/include/ctype.h" 2 3 4
3308 # 271 "/usr/include/ctype.h" 3 4
3309 extern int isalnum_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__));
3310 extern int isalpha_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__));
3311 extern int iscntrl_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__));
3312 extern int isdigit_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__));
3313 extern int islower_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__));
3314 extern int isgraph_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__));
3315 extern int isprint_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__));
3316 extern int ispunct_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__));
3317 extern int isspace_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__));
3318 extern int isupper_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__));
3319 extern int isxdigit_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__));
3320
3321 extern int isblank_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__));
3322
3323
3324
3325 extern int __tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
3326 extern int tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
3327
3328
3329 extern int __toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
3330 extern int toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
3331 # 347 "/usr/include/ctype.h" 3 4
3332
3333 # 16 "include/libbb.h" 2
3334 # 1 "/usr/include/dirent.h" 1 3 4
3335 # 27 "/usr/include/dirent.h" 3 4
3336
3337 # 61 "/usr/include/dirent.h" 3 4
3338 # 1 "/usr/include/bits/dirent.h" 1 3 4
3339 # 22 "/usr/include/bits/dirent.h" 3 4
3340 struct dirent
3341 {
3342
3343
3344
3345
3346 __ino64_t d_ino;
3347 __off64_t d_off;
3348
3349 unsigned short int d_reclen;
3350 unsigned char d_type;
3351 char d_name[256];
3352 };
3353
3354
3355 struct dirent64
3356 {
3357 __ino64_t d_ino;
3358 __off64_t d_off;
3359 unsigned short int d_reclen;
3360 unsigned char d_type;
3361 char d_name[256];
3362 };
3363 # 62 "/usr/include/dirent.h" 2 3 4
3364 # 97 "/usr/include/dirent.h" 3 4
3365 enum
3366 {
3367 DT_UNKNOWN = 0,
3368
3369 DT_FIFO = 1,
3370
3371 DT_CHR = 2,
3372
3373 DT_DIR = 4,
3374
3375 DT_BLK = 6,
3376
3377 DT_REG = 8,
3378
3379 DT_LNK = 10,
3380
3381 DT_SOCK = 12,
3382
3383 DT_WHT = 14
3384
3385 };
3386 # 127 "/usr/include/dirent.h" 3 4
3387 typedef struct __dirstream DIR;
3388
3389
3390
3391
3392
3393
3394 extern DIR *opendir (const char *__name) __attribute__ ((__nonnull__ (1)));
3395
3396
3397
3398
3399
3400
3401 extern DIR *fdopendir (int __fd);
3402
3403
3404
3405
3406
3407
3408
3409 extern int closedir (DIR *__dirp) __attribute__ ((__nonnull__ (1)));
3410 # 165 "/usr/include/dirent.h" 3 4
3411 extern struct dirent *readdir (DIR *__dirp) __asm__ ("" "readdir64")
3412 __attribute__ ((__nonnull__ (1)));
3413
3414
3415
3416
3417
3418
3419 extern struct dirent64 *readdir64 (DIR *__dirp) __attribute__ ((__nonnull__ (1)));
3420 # 189 "/usr/include/dirent.h" 3 4
3421 extern int readdir_r (DIR *__restrict __dirp, struct dirent *__restrict __entry, struct dirent **__restrict __result) __asm__ ("" "readdir64_r")
3422
3423
3424
3425 __attribute__ ((__nonnull__ (1, 2, 3)));
3426
3427
3428
3429
3430
3431
3432 extern int readdir64_r (DIR *__restrict __dirp,
3433 struct dirent64 *__restrict __entry,
3434 struct dirent64 **__restrict __result)
3435 __attribute__ ((__nonnull__ (1, 2, 3)));
3436
3437
3438
3439
3440 extern void rewinddir (DIR *__dirp) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3441
3442
3443
3444
3445
3446 extern void seekdir (DIR *__dirp, long int __pos) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3447
3448
3449 extern long int telldir (DIR *__dirp) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3450
3451
3452
3453
3454
3455 extern int dirfd (DIR *__dirp) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3456 # 244 "/usr/include/dirent.h" 3 4
3457 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stddef.h" 1 3 4
3458 # 245 "/usr/include/dirent.h" 2 3 4
3459 # 262 "/usr/include/dirent.h" 3 4
3460 extern int scandir (const char *__restrict __dir, struct dirent ***__restrict __namelist, int (*__selector) (const struct dirent *), int (*__cmp) (const struct dirent **, const struct dirent **)) __asm__ ("" "scandir64")
3461
3462
3463
3464
3465
3466 __attribute__ ((__nonnull__ (1, 2)));
3467 # 277 "/usr/include/dirent.h" 3 4
3468 extern int scandir64 (const char *__restrict __dir,
3469 struct dirent64 ***__restrict __namelist,
3470 int (*__selector) (const struct dirent64 *),
3471 int (*__cmp) (const struct dirent64 **,
3472 const struct dirent64 **))
3473 __attribute__ ((__nonnull__ (1, 2)));
3474 # 300 "/usr/include/dirent.h" 3 4
3475 extern int scandirat (int __dfd, const char *__restrict __dir, struct dirent ***__restrict __namelist, int (*__selector) (const struct dirent *), int (*__cmp) (const struct dirent **, const struct dirent **)) __asm__ ("" "scandirat64")
3476
3477
3478
3479
3480
3481 __attribute__ ((__nonnull__ (2, 3)));
3482
3483
3484
3485
3486
3487
3488
3489 extern int scandirat64 (int __dfd, const char *__restrict __dir,
3490 struct dirent64 ***__restrict __namelist,
3491 int (*__selector) (const struct dirent64 *),
3492 int (*__cmp) (const struct dirent64 **,
3493 const struct dirent64 **))
3494 __attribute__ ((__nonnull__ (2, 3)));
3495 # 329 "/usr/include/dirent.h" 3 4
3496 extern int alphasort (const struct dirent **__e1, const struct dirent **__e2) __asm__ ("" "alphasort64") __attribute__ ((__nothrow__ , __leaf__))
3497
3498
3499 __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3500
3501
3502
3503
3504
3505
3506 extern int alphasort64 (const struct dirent64 **__e1,
3507 const struct dirent64 **__e2)
3508 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3509 # 358 "/usr/include/dirent.h" 3 4
3510 extern __ssize_t getdirentries (int __fd, char *__restrict __buf, size_t __nbytes, __off64_t *__restrict __basep) __asm__ ("" "getdirentries64") __attribute__ ((__nothrow__ , __leaf__))
3511
3512
3513
3514 __attribute__ ((__nonnull__ (2, 4)));
3515
3516
3517
3518
3519
3520
3521 extern __ssize_t getdirentries64 (int __fd, char *__restrict __buf,
3522 size_t __nbytes,
3523 __off64_t *__restrict __basep)
3524 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)));
3525 # 384 "/usr/include/dirent.h" 3 4
3526 extern int versionsort (const struct dirent **__e1, const struct dirent **__e2) __asm__ ("" "versionsort64") __attribute__ ((__nothrow__ , __leaf__))
3527
3528
3529
3530 __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3531
3532
3533
3534
3535
3536
3537 extern int versionsort64 (const struct dirent64 **__e1,
3538 const struct dirent64 **__e2)
3539 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3540
3541
3542
3543
3544 # 17 "include/libbb.h" 2
3545 # 1 "/usr/include/errno.h" 1 3 4
3546 # 31 "/usr/include/errno.h" 3 4
3547
3548
3549
3550
3551 # 1 "/usr/include/bits/errno.h" 1 3 4
3552 # 24 "/usr/include/bits/errno.h" 3 4
3553 # 1 "/usr/include/linux/errno.h" 1 3 4
3554 # 1 "/usr/include/asm/errno.h" 1 3 4
3555 # 1 "/usr/include/asm-generic/errno.h" 1 3 4
3556
3557
3558
3559 # 1 "/usr/include/asm-generic/errno-base.h" 1 3 4
3560 # 5 "/usr/include/asm-generic/errno.h" 2 3 4
3561 # 1 "/usr/include/asm/errno.h" 2 3 4
3562 # 1 "/usr/include/linux/errno.h" 2 3 4
3563 # 25 "/usr/include/bits/errno.h" 2 3 4
3564 # 50 "/usr/include/bits/errno.h" 3 4
3565 extern int *__errno_location (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3566 # 36 "/usr/include/errno.h" 2 3 4
3567 # 54 "/usr/include/errno.h" 3 4
3568 extern char *program_invocation_name, *program_invocation_short_name;
3569
3570
3571
3572
3573 # 68 "/usr/include/errno.h" 3 4
3574 typedef int error_t;
3575 # 18 "include/libbb.h" 2
3576 # 1 "/usr/include/fcntl.h" 1 3 4
3577 # 28 "/usr/include/fcntl.h" 3 4
3578
3579
3580
3581
3582
3583
3584
3585 # 1 "/usr/include/bits/fcntl.h" 1 3 4
3586 # 28 "/usr/include/bits/fcntl.h" 3 4
3587 struct flock
3588 {
3589 short int l_type;
3590 short int l_whence;
3591
3592
3593
3594
3595 __off64_t l_start;
3596 __off64_t l_len;
3597
3598 __pid_t l_pid;
3599 };
3600
3601
3602 struct flock64
3603 {
3604 short int l_type;
3605 short int l_whence;
3606 __off64_t l_start;
3607 __off64_t l_len;
3608 __pid_t l_pid;
3609 };
3610
3611
3612
3613 # 1 "/usr/include/bits/fcntl-linux.h" 1 3 4
3614 # 38 "/usr/include/bits/fcntl-linux.h" 3 4
3615 # 1 "/usr/include/bits/uio.h" 1 3 4
3616 # 39 "/usr/include/bits/fcntl-linux.h" 2 3 4
3617 # 241 "/usr/include/bits/fcntl-linux.h" 3 4
3618 enum __pid_type
3619 {
3620 F_OWNER_TID = 0,
3621 F_OWNER_PID,
3622 F_OWNER_PGRP,
3623 F_OWNER_GID = F_OWNER_PGRP
3624 };
3625
3626
3627 struct f_owner_ex
3628 {
3629 enum __pid_type type;
3630 __pid_t pid;
3631 };
3632 # 311 "/usr/include/bits/fcntl-linux.h" 3 4
3633 struct file_handle
3634 {
3635 unsigned int handle_bytes;
3636 int handle_type;
3637
3638 unsigned char f_handle[0];
3639 };
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650 extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
3651 __attribute__ ((__nothrow__ , __leaf__));
3652
3653
3654
3655
3656
3657
3658 extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
3659 unsigned int __flags);
3660
3661
3662
3663
3664
3665
3666 extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
3667 size_t __count, unsigned int __flags);
3668
3669
3670
3671
3672
3673 extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
3674 __off64_t *__offout, size_t __len,
3675 unsigned int __flags);
3676
3677
3678
3679
3680
3681 extern ssize_t tee (int __fdin, int __fdout, size_t __len,
3682 unsigned int __flags);
3683 # 370 "/usr/include/bits/fcntl-linux.h" 3 4
3684 extern int fallocate (int __fd, int __mode, __off64_t __offset, __off64_t __len) __asm__ ("" "fallocate64")
3685
3686 ;
3687
3688
3689
3690
3691
3692 extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
3693 __off64_t __len);
3694
3695
3696
3697
3698 extern int name_to_handle_at (int __dfd, const char *__name,
3699 struct file_handle *__handle, int *__mnt_id,
3700 int __flags) __attribute__ ((__nothrow__ , __leaf__));
3701
3702
3703
3704
3705
3706 extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
3707 int __flags);
3708
3709
3710
3711
3712 # 54 "/usr/include/bits/fcntl.h" 2 3 4
3713 # 36 "/usr/include/fcntl.h" 2 3 4
3714 # 67 "/usr/include/fcntl.h" 3 4
3715 # 1 "/usr/include/time.h" 1 3 4
3716 # 68 "/usr/include/fcntl.h" 2 3 4
3717 # 1 "/usr/include/bits/stat.h" 1 3 4
3718 # 38 "/usr/include/bits/stat.h" 3 4
3719 struct stat
3720 {
3721 __dev_t st_dev;
3722 unsigned short int __pad1;
3723
3724
3725
3726 __ino_t __st_ino;
3727
3728 __mode_t st_mode;
3729 __nlink_t st_nlink;
3730 __uid_t st_uid;
3731 __gid_t st_gid;
3732 __dev_t st_rdev;
3733 unsigned short int __pad2;
3734
3735
3736
3737 __off64_t st_size;
3738
3739 __blksize_t st_blksize;
3740
3741
3742
3743
3744 __blkcnt64_t st_blocks;
3745 # 72 "/usr/include/bits/stat.h" 3 4
3746 struct timespec st_atim;
3747 struct timespec st_mtim;
3748 struct timespec st_ctim;
3749 # 90 "/usr/include/bits/stat.h" 3 4
3750 __ino64_t st_ino;
3751
3752 };
3753
3754
3755 struct stat64
3756 {
3757 __dev_t st_dev;
3758 unsigned int __pad1;
3759
3760 __ino_t __st_ino;
3761 __mode_t st_mode;
3762 __nlink_t st_nlink;
3763 __uid_t st_uid;
3764 __gid_t st_gid;
3765 __dev_t st_rdev;
3766 unsigned int __pad2;
3767 __off64_t st_size;
3768 __blksize_t st_blksize;
3769
3770 __blkcnt64_t st_blocks;
3771
3772
3773
3774
3775
3776
3777
3778 struct timespec st_atim;
3779 struct timespec st_mtim;
3780 struct timespec st_ctim;
3781 # 129 "/usr/include/bits/stat.h" 3 4
3782 __ino64_t st_ino;
3783 };
3784 # 69 "/usr/include/fcntl.h" 2 3 4
3785 # 160 "/usr/include/fcntl.h" 3 4
3786 extern int fcntl (int __fd, int __cmd, ...);
3787 # 172 "/usr/include/fcntl.h" 3 4
3788 extern int open (const char *__file, int __oflag, ...) __asm__ ("" "open64")
3789 __attribute__ ((__nonnull__ (1)));
3790
3791
3792
3793
3794
3795 extern int open64 (const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1)));
3796 # 197 "/usr/include/fcntl.h" 3 4
3797 extern int openat (int __fd, const char *__file, int __oflag, ...) __asm__ ("" "openat64")
3798 __attribute__ ((__nonnull__ (2)));
3799
3800
3801
3802
3803
3804 extern int openat64 (int __fd, const char *__file, int __oflag, ...)
3805 __attribute__ ((__nonnull__ (2)));
3806 # 218 "/usr/include/fcntl.h" 3 4
3807 extern int creat (const char *__file, mode_t __mode) __asm__ ("" "creat64")
3808 __attribute__ ((__nonnull__ (1)));
3809
3810
3811
3812
3813
3814 extern int creat64 (const char *__file, mode_t __mode) __attribute__ ((__nonnull__ (1)));
3815 # 265 "/usr/include/fcntl.h" 3 4
3816 extern int posix_fadvise (int __fd, __off64_t __offset, __off64_t __len, int __advise) __asm__ ("" "posix_fadvise64") __attribute__ ((__nothrow__ , __leaf__))
3817
3818 ;
3819
3820
3821
3822
3823
3824 extern int posix_fadvise64 (int __fd, off64_t __offset, off64_t __len,
3825 int __advise) __attribute__ ((__nothrow__ , __leaf__));
3826 # 286 "/usr/include/fcntl.h" 3 4
3827 extern int posix_fallocate (int __fd, __off64_t __offset, __off64_t __len) __asm__ ("" "posix_fallocate64")
3828
3829 ;
3830
3831
3832
3833
3834
3835 extern int posix_fallocate64 (int __fd, off64_t __offset, off64_t __len);
3836
3837
3838
3839
3840
3841
3842
3843 # 1 "/usr/include/bits/fcntl2.h" 1 3 4
3844 # 30 "/usr/include/bits/fcntl2.h" 3 4
3845 extern int __open_2 (const char *__path, int __oflag) __asm__ ("" "__open64_2")
3846 __attribute__ ((__nonnull__ (1)));
3847 extern int __open_alias (const char *__path, int __oflag, ...) __asm__ ("" "open64")
3848 __attribute__ ((__nonnull__ (1)));
3849
3850 extern void __open_too_many_args (void) __attribute__((__error__ ("open can be called either with 2 or 3 arguments, not more")))
3851 ;
3852 extern void __open_missing_mode (void) __attribute__((__error__ ("open with O_CREAT in second argument needs 3 arguments")))
3853 ;
3854
3855 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
3856 open (const char *__path, int __oflag, ...)
3857 {
3858 if (__builtin_va_arg_pack_len () > 1)
3859 __open_too_many_args ();
3860
3861 if (__builtin_constant_p (__oflag))
3862 {
3863 if ((__oflag & 0100) != 0 && __builtin_va_arg_pack_len () < 1)
3864 {
3865 __open_missing_mode ();
3866 return __open_2 (__path, __oflag);
3867 }
3868 return __open_alias (__path, __oflag, __builtin_va_arg_pack ());
3869 }
3870
3871 if (__builtin_va_arg_pack_len () < 1)
3872 return __open_2 (__path, __oflag);
3873
3874 return __open_alias (__path, __oflag, __builtin_va_arg_pack ());
3875 }
3876
3877
3878
3879 extern int __open64_2 (const char *__path, int __oflag) __attribute__ ((__nonnull__ (1)));
3880 extern int __open64_alias (const char *__path, int __oflag, ...) __asm__ ("" "open64")
3881 __attribute__ ((__nonnull__ (1)));
3882 extern void __open64_too_many_args (void) __attribute__((__error__ ("open64 can be called either with 2 or 3 arguments, not more")))
3883 ;
3884 extern void __open64_missing_mode (void) __attribute__((__error__ ("open64 with O_CREAT in second argument needs 3 arguments")))
3885 ;
3886
3887 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
3888 open64 (const char *__path, int __oflag, ...)
3889 {
3890 if (__builtin_va_arg_pack_len () > 1)
3891 __open64_too_many_args ();
3892
3893 if (__builtin_constant_p (__oflag))
3894 {
3895 if ((__oflag & 0100) != 0 && __builtin_va_arg_pack_len () < 1)
3896 {
3897 __open64_missing_mode ();
3898 return __open64_2 (__path, __oflag);
3899 }
3900 return __open64_alias (__path, __oflag, __builtin_va_arg_pack ());
3901 }
3902
3903 if (__builtin_va_arg_pack_len () < 1)
3904 return __open64_2 (__path, __oflag);
3905
3906 return __open64_alias (__path, __oflag, __builtin_va_arg_pack ());
3907 }
3908 # 104 "/usr/include/bits/fcntl2.h" 3 4
3909 extern int __openat_2 (int __fd, const char *__path, int __oflag) __asm__ ("" "__openat64_2")
3910
3911 __attribute__ ((__nonnull__ (2)));
3912 extern int __openat_alias (int __fd, const char *__path, int __oflag, ...) __asm__ ("" "openat64")
3913
3914 __attribute__ ((__nonnull__ (2)));
3915
3916 extern void __openat_too_many_args (void) __attribute__((__error__ ("openat can be called either with 3 or 4 arguments, not more")))
3917 ;
3918 extern void __openat_missing_mode (void) __attribute__((__error__ ("openat with O_CREAT in third argument needs 4 arguments")))
3919 ;
3920
3921 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
3922 openat (int __fd, const char *__path, int __oflag, ...)
3923 {
3924 if (__builtin_va_arg_pack_len () > 1)
3925 __openat_too_many_args ();
3926
3927 if (__builtin_constant_p (__oflag))
3928 {
3929 if ((__oflag & 0100) != 0 && __builtin_va_arg_pack_len () < 1)
3930 {
3931 __openat_missing_mode ();
3932 return __openat_2 (__fd, __path, __oflag);
3933 }
3934 return __openat_alias (__fd, __path, __oflag, __builtin_va_arg_pack ());
3935 }
3936
3937 if (__builtin_va_arg_pack_len () < 1)
3938 return __openat_2 (__fd, __path, __oflag);
3939
3940 return __openat_alias (__fd, __path, __oflag, __builtin_va_arg_pack ());
3941 }
3942
3943
3944
3945 extern int __openat64_2 (int __fd, const char *__path, int __oflag)
3946 __attribute__ ((__nonnull__ (2)));
3947 extern int __openat64_alias (int __fd, const char *__path, int __oflag, ...) __asm__ ("" "openat64")
3948
3949 __attribute__ ((__nonnull__ (2)));
3950 extern void __openat64_too_many_args (void) __attribute__((__error__ ("openat64 can be called either with 3 or 4 arguments, not more")))
3951 ;
3952 extern void __openat64_missing_mode (void) __attribute__((__error__ ("openat64 with O_CREAT in third argument needs 4 arguments")))
3953 ;
3954
3955 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
3956 openat64 (int __fd, const char *__path, int __oflag, ...)
3957 {
3958 if (__builtin_va_arg_pack_len () > 1)
3959 __openat64_too_many_args ();
3960
3961 if (__builtin_constant_p (__oflag))
3962 {
3963 if ((__oflag & 0100) != 0 && __builtin_va_arg_pack_len () < 1)
3964 {
3965 __openat64_missing_mode ();
3966 return __openat64_2 (__fd, __path, __oflag);
3967 }
3968 return __openat64_alias (__fd, __path, __oflag, __builtin_va_arg_pack ());
3969 }
3970
3971 if (__builtin_va_arg_pack_len () < 1)
3972 return __openat64_2 (__fd, __path, __oflag);
3973
3974 return __openat64_alias (__fd, __path, __oflag, __builtin_va_arg_pack ());
3975 }
3976 # 303 "/usr/include/fcntl.h" 2 3 4
3977
3978
3979
3980 # 19 "include/libbb.h" 2
3981 # 1 "/usr/include/inttypes.h" 1 3 4
3982 # 34 "/usr/include/inttypes.h" 3 4
3983 typedef unsigned int __gwchar_t;
3984 # 266 "/usr/include/inttypes.h" 3 4
3985
3986 # 280 "/usr/include/inttypes.h" 3 4
3987 typedef struct
3988 {
3989 __extension__ long long int quot;
3990 __extension__ long long int rem;
3991 } imaxdiv_t;
3992
3993
3994
3995
3996
3997 extern intmax_t imaxabs (intmax_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3998
3999
4000 extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom)
4001 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
4002
4003
4004 extern intmax_t strtoimax (const char *__restrict __nptr,
4005 char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__));
4006
4007
4008 extern uintmax_t strtoumax (const char *__restrict __nptr,
4009 char ** __restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__));
4010
4011
4012 extern intmax_t wcstoimax (const __gwchar_t *__restrict __nptr,
4013 __gwchar_t **__restrict __endptr, int __base)
4014 __attribute__ ((__nothrow__ , __leaf__));
4015
4016
4017 extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr,
4018 __gwchar_t ** __restrict __endptr, int __base)
4019 __attribute__ ((__nothrow__ , __leaf__));
4020 # 370 "/usr/include/inttypes.h" 3 4
4021 __extension__
4022 extern long long int __strtoll_internal (const char *__restrict __nptr,
4023 char **__restrict __endptr,
4024 int __base, int __group)
4025 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
4026
4027 extern __inline __attribute__ ((__gnu_inline__)) intmax_t
4028 __attribute__ ((__nothrow__ , __leaf__)) strtoimax (const char *__restrict nptr, char **__restrict endptr, int base)
4029
4030 {
4031 return __strtoll_internal (nptr, endptr, base, 0);
4032 }
4033
4034 __extension__
4035 extern unsigned long long int __strtoull_internal (const char *
4036 __restrict __nptr,
4037 char **
4038 __restrict __endptr,
4039 int __base,
4040 int __group)
4041 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
4042
4043 extern __inline __attribute__ ((__gnu_inline__)) uintmax_t
4044 __attribute__ ((__nothrow__ , __leaf__)) strtoumax (const char *__restrict nptr, char **__restrict endptr, int base)
4045
4046 {
4047 return __strtoull_internal (nptr, endptr, base, 0);
4048 }
4049
4050 __extension__
4051 extern long long int __wcstoll_internal (const __gwchar_t *__restrict __nptr,
4052 __gwchar_t **__restrict __endptr,
4053 int __base, int __group)
4054 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
4055
4056 extern __inline __attribute__ ((__gnu_inline__)) intmax_t
4057 __attribute__ ((__nothrow__ , __leaf__)) wcstoimax (const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base)
4058
4059 {
4060 return __wcstoll_internal (nptr, endptr, base, 0);
4061 }
4062
4063
4064 __extension__
4065 extern unsigned long long int __wcstoull_internal (const __gwchar_t *
4066 __restrict __nptr,
4067 __gwchar_t **
4068 __restrict __endptr,
4069 int __base,
4070 int __group)
4071 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
4072
4073 extern __inline __attribute__ ((__gnu_inline__)) uintmax_t
4074 __attribute__ ((__nothrow__ , __leaf__)) wcstoumax (const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base)
4075
4076 {
4077 return __wcstoull_internal (nptr, endptr, base, 0);
4078 }
4079
4080
4081
4082
4083
4084 # 20 "include/libbb.h" 2
4085 # 1 "/usr/include/netdb.h" 1 3 4
4086 # 27 "/usr/include/netdb.h" 3 4
4087 # 1 "/usr/include/netinet/in.h" 1 3 4
4088 # 27 "/usr/include/netinet/in.h" 3 4
4089
4090
4091
4092 typedef uint32_t in_addr_t;
4093 struct in_addr
4094 {
4095 in_addr_t s_addr;
4096 };
4097
4098
4099 # 1 "/usr/include/bits/in.h" 1 3 4
4100 # 112 "/usr/include/bits/in.h" 3 4
4101 struct ip_opts
4102 {
4103 struct in_addr ip_dst;
4104 char ip_opts[40];
4105 };
4106
4107
4108 struct ip_mreqn
4109 {
4110 struct in_addr imr_multiaddr;
4111 struct in_addr imr_address;
4112 int imr_ifindex;
4113 };
4114
4115
4116 struct in_pktinfo
4117 {
4118 int ipi_ifindex;
4119 struct in_addr ipi_spec_dst;
4120 struct in_addr ipi_addr;
4121 };
4122 # 38 "/usr/include/netinet/in.h" 2 3 4
4123
4124
4125 enum
4126 {
4127 IPPROTO_IP = 0,
4128
4129 IPPROTO_ICMP = 1,
4130
4131 IPPROTO_IGMP = 2,
4132
4133 IPPROTO_IPIP = 4,
4134
4135 IPPROTO_TCP = 6,
4136
4137 IPPROTO_EGP = 8,
4138
4139 IPPROTO_PUP = 12,
4140
4141 IPPROTO_UDP = 17,
4142
4143 IPPROTO_IDP = 22,
4144
4145 IPPROTO_TP = 29,
4146
4147 IPPROTO_DCCP = 33,
4148
4149 IPPROTO_IPV6 = 41,
4150
4151 IPPROTO_RSVP = 46,
4152
4153 IPPROTO_GRE = 47,
4154
4155 IPPROTO_ESP = 50,
4156
4157 IPPROTO_AH = 51,
4158
4159 IPPROTO_MTP = 92,
4160
4161 IPPROTO_BEETPH = 94,
4162
4163 IPPROTO_ENCAP = 98,
4164
4165 IPPROTO_PIM = 103,
4166
4167 IPPROTO_COMP = 108,
4168
4169 IPPROTO_SCTP = 132,
4170
4171 IPPROTO_UDPLITE = 136,
4172
4173 IPPROTO_RAW = 255,
4174
4175 IPPROTO_MAX
4176 };
4177
4178
4179
4180
4181
4182 enum
4183 {
4184 IPPROTO_HOPOPTS = 0,
4185
4186 IPPROTO_ROUTING = 43,
4187
4188 IPPROTO_FRAGMENT = 44,
4189
4190 IPPROTO_ICMPV6 = 58,
4191
4192 IPPROTO_NONE = 59,
4193
4194 IPPROTO_DSTOPTS = 60,
4195
4196 IPPROTO_MH = 135
4197
4198 };
4199
4200
4201
4202 typedef uint16_t in_port_t;
4203
4204
4205 enum
4206 {
4207 IPPORT_ECHO = 7,
4208 IPPORT_DISCARD = 9,
4209 IPPORT_SYSTAT = 11,
4210 IPPORT_DAYTIME = 13,
4211 IPPORT_NETSTAT = 15,
4212 IPPORT_FTP = 21,
4213 IPPORT_TELNET = 23,
4214 IPPORT_SMTP = 25,
4215 IPPORT_TIMESERVER = 37,
4216 IPPORT_NAMESERVER = 42,
4217 IPPORT_WHOIS = 43,
4218 IPPORT_MTP = 57,
4219
4220 IPPORT_TFTP = 69,
4221 IPPORT_RJE = 77,
4222 IPPORT_FINGER = 79,
4223 IPPORT_TTYLINK = 87,
4224 IPPORT_SUPDUP = 95,
4225
4226
4227 IPPORT_EXECSERVER = 512,
4228 IPPORT_LOGINSERVER = 513,
4229 IPPORT_CMDSERVER = 514,
4230 IPPORT_EFSSERVER = 520,
4231
4232
4233 IPPORT_BIFFUDP = 512,
4234 IPPORT_WHOSERVER = 513,
4235 IPPORT_ROUTESERVER = 520,
4236
4237
4238 IPPORT_RESERVED = 1024,
4239
4240
4241 IPPORT_USERRESERVED = 5000
4242 };
4243 # 209 "/usr/include/netinet/in.h" 3 4
4244 struct in6_addr
4245 {
4246 union
4247 {
4248 uint8_t __u6_addr8[16];
4249
4250 uint16_t __u6_addr16[8];
4251 uint32_t __u6_addr32[4];
4252
4253 } __in6_u;
4254
4255
4256
4257
4258
4259 };
4260
4261
4262 extern const struct in6_addr in6addr_any;
4263 extern const struct in6_addr in6addr_loopback;
4264 # 237 "/usr/include/netinet/in.h" 3 4
4265 struct sockaddr_in
4266 {
4267 sa_family_t sin_family;
4268 in_port_t sin_port;
4269 struct in_addr sin_addr;
4270
4271
4272 unsigned char sin_zero[sizeof (struct sockaddr) -
4273 (sizeof (unsigned short int)) -
4274 sizeof (in_port_t) -
4275 sizeof (struct in_addr)];
4276 };
4277
4278
4279
4280 struct sockaddr_in6
4281 {
4282 sa_family_t sin6_family;
4283 in_port_t sin6_port;
4284 uint32_t sin6_flowinfo;
4285 struct in6_addr sin6_addr;
4286 uint32_t sin6_scope_id;
4287 };
4288
4289
4290
4291
4292 struct ip_mreq
4293 {
4294
4295 struct in_addr imr_multiaddr;
4296
4297
4298 struct in_addr imr_interface;
4299 };
4300
4301 struct ip_mreq_source
4302 {
4303
4304 struct in_addr imr_multiaddr;
4305
4306
4307 struct in_addr imr_interface;
4308
4309
4310 struct in_addr imr_sourceaddr;
4311 };
4312
4313
4314
4315
4316 struct ipv6_mreq
4317 {
4318
4319 struct in6_addr ipv6mr_multiaddr;
4320
4321
4322 unsigned int ipv6mr_interface;
4323 };
4324
4325
4326
4327
4328 struct group_req
4329 {
4330
4331 uint32_t gr_interface;
4332
4333
4334 struct sockaddr_storage gr_group;
4335 };
4336
4337 struct group_source_req
4338 {
4339
4340 uint32_t gsr_interface;
4341
4342
4343 struct sockaddr_storage gsr_group;
4344
4345
4346 struct sockaddr_storage gsr_source;
4347 };
4348
4349
4350
4351 struct ip_msfilter
4352 {
4353
4354 struct in_addr imsf_multiaddr;
4355
4356
4357 struct in_addr imsf_interface;
4358
4359
4360 uint32_t imsf_fmode;
4361
4362
4363 uint32_t imsf_numsrc;
4364
4365 struct in_addr imsf_slist[1];
4366 };
4367
4368
4369
4370
4371
4372 struct group_filter
4373 {
4374
4375 uint32_t gf_interface;
4376
4377
4378 struct sockaddr_storage gf_group;
4379
4380
4381 uint32_t gf_fmode;
4382
4383
4384 uint32_t gf_numsrc;
4385
4386 struct sockaddr_storage gf_slist[1];
4387 };
4388 # 374 "/usr/include/netinet/in.h" 3 4
4389 extern uint32_t ntohl (uint32_t __netlong) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
4390 extern uint16_t ntohs (uint16_t __netshort)
4391 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
4392 extern uint32_t htonl (uint32_t __hostlong)
4393 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
4394 extern uint16_t htons (uint16_t __hostshort)
4395 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
4396
4397
4398
4399
4400 # 1 "/usr/include/bits/byteswap.h" 1 3 4
4401 # 386 "/usr/include/netinet/in.h" 2 3 4
4402 # 501 "/usr/include/netinet/in.h" 3 4
4403 extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) __attribute__ ((__nothrow__ , __leaf__));
4404
4405
4406 extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in)
4407 __attribute__ ((__nothrow__ , __leaf__));
4408 # 531 "/usr/include/netinet/in.h" 3 4
4409 struct cmsghdr;
4410
4411
4412 struct in6_pktinfo
4413 {
4414 struct in6_addr ipi6_addr;
4415 unsigned int ipi6_ifindex;
4416 };
4417
4418
4419 struct ip6_mtuinfo
4420 {
4421 struct sockaddr_in6 ip6m_addr;
4422 uint32_t ip6m_mtu;
4423 };
4424
4425
4426
4427 extern int inet6_option_space (int __nbytes)
4428 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
4429 extern int inet6_option_init (void *__bp, struct cmsghdr **__cmsgp,
4430 int __type) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
4431 extern int inet6_option_append (struct cmsghdr *__cmsg,
4432 const uint8_t *__typep, int __multx,
4433 int __plusy) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
4434 extern uint8_t *inet6_option_alloc (struct cmsghdr *__cmsg, int __datalen,
4435 int __multx, int __plusy)
4436 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
4437 extern int inet6_option_next (const struct cmsghdr *__cmsg,
4438 uint8_t **__tptrp)
4439 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
4440 extern int inet6_option_find (const struct cmsghdr *__cmsg,
4441 uint8_t **__tptrp, int __type)
4442 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
4443
4444
4445
4446 extern int inet6_opt_init (void *__extbuf, socklen_t __extlen) __attribute__ ((__nothrow__ , __leaf__));
4447 extern int inet6_opt_append (void *__extbuf, socklen_t __extlen, int __offset,
4448 uint8_t __type, socklen_t __len, uint8_t __align,
4449 void **__databufp) __attribute__ ((__nothrow__ , __leaf__));
4450 extern int inet6_opt_finish (void *__extbuf, socklen_t __extlen, int __offset)
4451 __attribute__ ((__nothrow__ , __leaf__));
4452 extern int inet6_opt_set_val (void *__databuf, int __offset, void *__val,
4453 socklen_t __vallen) __attribute__ ((__nothrow__ , __leaf__));
4454 extern int inet6_opt_next (void *__extbuf, socklen_t __extlen, int __offset,
4455 uint8_t *__typep, socklen_t *__lenp,
4456 void **__databufp) __attribute__ ((__nothrow__ , __leaf__));
4457 extern int inet6_opt_find (void *__extbuf, socklen_t __extlen, int __offset,
4458 uint8_t __type, socklen_t *__lenp,
4459 void **__databufp) __attribute__ ((__nothrow__ , __leaf__));
4460 extern int inet6_opt_get_val (void *__databuf, int __offset, void *__val,
4461 socklen_t __vallen) __attribute__ ((__nothrow__ , __leaf__));
4462
4463
4464
4465 extern socklen_t inet6_rth_space (int __type, int __segments) __attribute__ ((__nothrow__ , __leaf__));
4466 extern void *inet6_rth_init (void *__bp, socklen_t __bp_len, int __type,
4467 int __segments) __attribute__ ((__nothrow__ , __leaf__));
4468 extern int inet6_rth_add (void *__bp, const struct in6_addr *__addr) __attribute__ ((__nothrow__ , __leaf__));
4469 extern int inet6_rth_reverse (const void *__in, void *__out) __attribute__ ((__nothrow__ , __leaf__));
4470 extern int inet6_rth_segments (const void *__bp) __attribute__ ((__nothrow__ , __leaf__));
4471 extern struct in6_addr *inet6_rth_getaddr (const void *__bp, int __index)
4472 __attribute__ ((__nothrow__ , __leaf__));
4473
4474
4475
4476
4477
4478 extern int getipv4sourcefilter (int __s, struct in_addr __interface_addr,
4479 struct in_addr __group, uint32_t *__fmode,
4480 uint32_t *__numsrc, struct in_addr *__slist)
4481 __attribute__ ((__nothrow__ , __leaf__));
4482
4483
4484 extern int setipv4sourcefilter (int __s, struct in_addr __interface_addr,
4485 struct in_addr __group, uint32_t __fmode,
4486 uint32_t __numsrc,
4487 const struct in_addr *__slist)
4488 __attribute__ ((__nothrow__ , __leaf__));
4489
4490
4491
4492 extern int getsourcefilter (int __s, uint32_t __interface_addr,
4493 const struct sockaddr *__group,
4494 socklen_t __grouplen, uint32_t *__fmode,
4495 uint32_t *__numsrc,
4496 struct sockaddr_storage *__slist) __attribute__ ((__nothrow__ , __leaf__));
4497
4498
4499 extern int setsourcefilter (int __s, uint32_t __interface_addr,
4500 const struct sockaddr *__group,
4501 socklen_t __grouplen, uint32_t __fmode,
4502 uint32_t __numsrc,
4503 const struct sockaddr_storage *__slist) __attribute__ ((__nothrow__ , __leaf__));
4504
4505
4506
4507 # 28 "/usr/include/netdb.h" 2 3 4
4508
4509
4510
4511
4512 # 1 "/usr/include/rpc/netdb.h" 1 3 4
4513 # 42 "/usr/include/rpc/netdb.h" 3 4
4514 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stddef.h" 1 3 4
4515 # 43 "/usr/include/rpc/netdb.h" 2 3 4
4516
4517
4518
4519 struct rpcent
4520 {
4521 char *r_name;
4522 char **r_aliases;
4523 int r_number;
4524 };
4525
4526 extern void setrpcent (int __stayopen) __attribute__ ((__nothrow__ , __leaf__));
4527 extern void endrpcent (void) __attribute__ ((__nothrow__ , __leaf__));
4528 extern struct rpcent *getrpcbyname (const char *__name) __attribute__ ((__nothrow__ , __leaf__));
4529 extern struct rpcent *getrpcbynumber (int __number) __attribute__ ((__nothrow__ , __leaf__));
4530 extern struct rpcent *getrpcent (void) __attribute__ ((__nothrow__ , __leaf__));
4531
4532
4533 extern int getrpcbyname_r (const char *__name, struct rpcent *__result_buf,
4534 char *__buffer, size_t __buflen,
4535 struct rpcent **__result) __attribute__ ((__nothrow__ , __leaf__));
4536
4537 extern int getrpcbynumber_r (int __number, struct rpcent *__result_buf,
4538 char *__buffer, size_t __buflen,
4539 struct rpcent **__result) __attribute__ ((__nothrow__ , __leaf__));
4540
4541 extern int getrpcent_r (struct rpcent *__result_buf, char *__buffer,
4542 size_t __buflen, struct rpcent **__result) __attribute__ ((__nothrow__ , __leaf__));
4543
4544
4545
4546 # 33 "/usr/include/netdb.h" 2 3 4
4547
4548
4549
4550
4551 # 1 "/usr/include/bits/siginfo.h" 1 3 4
4552 # 24 "/usr/include/bits/siginfo.h" 3 4
4553 # 1 "/usr/include/bits/wordsize.h" 1 3 4
4554 # 25 "/usr/include/bits/siginfo.h" 2 3 4
4555
4556
4557
4558
4559
4560
4561
4562 typedef union sigval
4563 {
4564 int sival_int;
4565 void *sival_ptr;
4566 } sigval_t;
4567 # 295 "/usr/include/bits/siginfo.h" 3 4
4568 typedef struct sigevent
4569 {
4570 sigval_t sigev_value;
4571 int sigev_signo;
4572 int sigev_notify;
4573
4574 union
4575 {
4576 int _pad[((64 / sizeof (int)) - 3)];
4577
4578
4579
4580 __pid_t _tid;
4581
4582 struct
4583 {
4584 void (*_function) (sigval_t);
4585 pthread_attr_t *_attribute;
4586 } _sigev_thread;
4587 } _sigev_un;
4588 } sigevent_t;
4589
4590
4591
4592
4593
4594
4595 enum
4596 {
4597 SIGEV_SIGNAL = 0,
4598
4599 SIGEV_NONE,
4600
4601 SIGEV_THREAD,
4602
4603
4604 SIGEV_THREAD_ID = 4
4605
4606 };
4607 # 38 "/usr/include/netdb.h" 2 3 4
4608
4609 # 1 "/usr/include/time.h" 1 3 4
4610 # 40 "/usr/include/netdb.h" 2 3 4
4611
4612
4613 # 1 "/usr/include/bits/netdb.h" 1 3 4
4614 # 26 "/usr/include/bits/netdb.h" 3 4
4615 struct netent
4616 {
4617 char *n_name;
4618 char **n_aliases;
4619 int n_addrtype;
4620 uint32_t n_net;
4621 };
4622 # 43 "/usr/include/netdb.h" 2 3 4
4623 # 53 "/usr/include/netdb.h" 3 4
4624
4625
4626
4627
4628
4629
4630
4631
4632 extern int *__h_errno_location (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
4633 # 92 "/usr/include/netdb.h" 3 4
4634 extern void herror (const char *__str) __attribute__ ((__nothrow__ , __leaf__));
4635
4636
4637 extern const char *hstrerror (int __err_num) __attribute__ ((__nothrow__ , __leaf__));
4638
4639
4640
4641
4642 struct hostent
4643 {
4644 char *h_name;
4645 char **h_aliases;
4646 int h_addrtype;
4647 int h_length;
4648 char **h_addr_list;
4649
4650
4651
4652 };
4653
4654
4655
4656
4657
4658
4659 extern void sethostent (int __stay_open);
4660
4661
4662
4663
4664
4665 extern void endhostent (void);
4666
4667
4668
4669
4670
4671
4672 extern struct hostent *gethostent (void);
4673
4674
4675
4676
4677
4678
4679 extern struct hostent *gethostbyaddr (const void *__addr, __socklen_t __len,
4680 int __type);
4681
4682
4683
4684
4685
4686 extern struct hostent *gethostbyname (const char *__name);
4687 # 155 "/usr/include/netdb.h" 3 4
4688 extern struct hostent *gethostbyname2 (const char *__name, int __af);
4689 # 167 "/usr/include/netdb.h" 3 4
4690 extern int gethostent_r (struct hostent *__restrict __result_buf,
4691 char *__restrict __buf, size_t __buflen,
4692 struct hostent **__restrict __result,
4693 int *__restrict __h_errnop);
4694
4695 extern int gethostbyaddr_r (const void *__restrict __addr, __socklen_t __len,
4696 int __type,
4697 struct hostent *__restrict __result_buf,
4698 char *__restrict __buf, size_t __buflen,
4699 struct hostent **__restrict __result,
4700 int *__restrict __h_errnop);
4701
4702 extern int gethostbyname_r (const char *__restrict __name,
4703 struct hostent *__restrict __result_buf,
4704 char *__restrict __buf, size_t __buflen,
4705 struct hostent **__restrict __result,
4706 int *__restrict __h_errnop);
4707
4708 extern int gethostbyname2_r (const char *__restrict __name, int __af,
4709 struct hostent *__restrict __result_buf,
4710 char *__restrict __buf, size_t __buflen,
4711 struct hostent **__restrict __result,
4712 int *__restrict __h_errnop);
4713 # 198 "/usr/include/netdb.h" 3 4
4714 extern void setnetent (int __stay_open);
4715
4716
4717
4718
4719
4720 extern void endnetent (void);
4721
4722
4723
4724
4725
4726
4727 extern struct netent *getnetent (void);
4728
4729
4730
4731
4732
4733
4734 extern struct netent *getnetbyaddr (uint32_t __net, int __type);
4735
4736
4737
4738
4739
4740 extern struct netent *getnetbyname (const char *__name);
4741 # 237 "/usr/include/netdb.h" 3 4
4742 extern int getnetent_r (struct netent *__restrict __result_buf,
4743 char *__restrict __buf, size_t __buflen,
4744 struct netent **__restrict __result,
4745 int *__restrict __h_errnop);
4746
4747 extern int getnetbyaddr_r (uint32_t __net, int __type,
4748 struct netent *__restrict __result_buf,
4749 char *__restrict __buf, size_t __buflen,
4750 struct netent **__restrict __result,
4751 int *__restrict __h_errnop);
4752
4753 extern int getnetbyname_r (const char *__restrict __name,
4754 struct netent *__restrict __result_buf,
4755 char *__restrict __buf, size_t __buflen,
4756 struct netent **__restrict __result,
4757 int *__restrict __h_errnop);
4758
4759
4760
4761
4762 struct servent
4763 {
4764 char *s_name;
4765 char **s_aliases;
4766 int s_port;
4767 char *s_proto;
4768 };
4769
4770
4771
4772
4773
4774
4775 extern void setservent (int __stay_open);
4776
4777
4778
4779
4780
4781 extern void endservent (void);
4782
4783
4784
4785
4786
4787
4788 extern struct servent *getservent (void);
4789
4790
4791
4792
4793
4794
4795 extern struct servent *getservbyname (const char *__name, const char *__proto);
4796
4797
4798
4799
4800
4801
4802 extern struct servent *getservbyport (int __port, const char *__proto);
4803 # 308 "/usr/include/netdb.h" 3 4
4804 extern int getservent_r (struct servent *__restrict __result_buf,
4805 char *__restrict __buf, size_t __buflen,
4806 struct servent **__restrict __result);
4807
4808 extern int getservbyname_r (const char *__restrict __name,
4809 const char *__restrict __proto,
4810 struct servent *__restrict __result_buf,
4811 char *__restrict __buf, size_t __buflen,
4812 struct servent **__restrict __result);
4813
4814 extern int getservbyport_r (int __port, const char *__restrict __proto,
4815 struct servent *__restrict __result_buf,
4816 char *__restrict __buf, size_t __buflen,
4817 struct servent **__restrict __result);
4818
4819
4820
4821
4822 struct protoent
4823 {
4824 char *p_name;
4825 char **p_aliases;
4826 int p_proto;
4827 };
4828
4829
4830
4831
4832
4833
4834 extern void setprotoent (int __stay_open);
4835
4836
4837
4838
4839
4840 extern void endprotoent (void);
4841
4842
4843
4844
4845
4846
4847 extern struct protoent *getprotoent (void);
4848
4849
4850
4851
4852
4853 extern struct protoent *getprotobyname (const char *__name);
4854
4855
4856
4857
4858
4859 extern struct protoent *getprotobynumber (int __proto);
4860 # 374 "/usr/include/netdb.h" 3 4
4861 extern int getprotoent_r (struct protoent *__restrict __result_buf,
4862 char *__restrict __buf, size_t __buflen,
4863 struct protoent **__restrict __result);
4864
4865 extern int getprotobyname_r (const char *__restrict __name,
4866 struct protoent *__restrict __result_buf,
4867 char *__restrict __buf, size_t __buflen,
4868 struct protoent **__restrict __result);
4869
4870 extern int getprotobynumber_r (int __proto,
4871 struct protoent *__restrict __result_buf,
4872 char *__restrict __buf, size_t __buflen,
4873 struct protoent **__restrict __result);
4874 # 395 "/usr/include/netdb.h" 3 4
4875 extern int setnetgrent (const char *__netgroup);
4876
4877
4878
4879
4880
4881
4882
4883 extern void endnetgrent (void);
4884 # 412 "/usr/include/netdb.h" 3 4
4885 extern int getnetgrent (char **__restrict __hostp,
4886 char **__restrict __userp,
4887 char **__restrict __domainp);
4888 # 423 "/usr/include/netdb.h" 3 4
4889 extern int innetgr (const char *__netgroup, const char *__host,
4890 const char *__user, const char *__domain);
4891
4892
4893
4894
4895
4896
4897
4898 extern int getnetgrent_r (char **__restrict __hostp,
4899 char **__restrict __userp,
4900 char **__restrict __domainp,
4901 char *__restrict __buffer, size_t __buflen);
4902 # 451 "/usr/include/netdb.h" 3 4
4903 extern int rcmd (char **__restrict __ahost, unsigned short int __rport,
4904 const char *__restrict __locuser,
4905 const char *__restrict __remuser,
4906 const char *__restrict __cmd, int *__restrict __fd2p);
4907 # 463 "/usr/include/netdb.h" 3 4
4908 extern int rcmd_af (char **__restrict __ahost, unsigned short int __rport,
4909 const char *__restrict __locuser,
4910 const char *__restrict __remuser,
4911 const char *__restrict __cmd, int *__restrict __fd2p,
4912 sa_family_t __af);
4913 # 479 "/usr/include/netdb.h" 3 4
4914 extern int rexec (char **__restrict __ahost, int __rport,
4915 const char *__restrict __name,
4916 const char *__restrict __pass,
4917 const char *__restrict __cmd, int *__restrict __fd2p);
4918 # 491 "/usr/include/netdb.h" 3 4
4919 extern int rexec_af (char **__restrict __ahost, int __rport,
4920 const char *__restrict __name,
4921 const char *__restrict __pass,
4922 const char *__restrict __cmd, int *__restrict __fd2p,
4923 sa_family_t __af);
4924 # 505 "/usr/include/netdb.h" 3 4
4925 extern int ruserok (const char *__rhost, int __suser,
4926 const char *__remuser, const char *__locuser);
4927 # 515 "/usr/include/netdb.h" 3 4
4928 extern int ruserok_af (const char *__rhost, int __suser,
4929 const char *__remuser, const char *__locuser,
4930 sa_family_t __af);
4931 # 528 "/usr/include/netdb.h" 3 4
4932 extern int iruserok (uint32_t __raddr, int __suser,
4933 const char *__remuser, const char *__locuser);
4934 # 539 "/usr/include/netdb.h" 3 4
4935 extern int iruserok_af (const void *__raddr, int __suser,
4936 const char *__remuser, const char *__locuser,
4937 sa_family_t __af);
4938 # 551 "/usr/include/netdb.h" 3 4
4939 extern int rresvport (int *__alport);
4940 # 560 "/usr/include/netdb.h" 3 4
4941 extern int rresvport_af (int *__alport, sa_family_t __af);
4942
4943
4944
4945
4946
4947
4948 struct addrinfo
4949 {
4950 int ai_flags;
4951 int ai_family;
4952 int ai_socktype;
4953 int ai_protocol;
4954 socklen_t ai_addrlen;
4955 struct sockaddr *ai_addr;
4956 char *ai_canonname;
4957 struct addrinfo *ai_next;
4958 };
4959
4960
4961
4962 struct gaicb
4963 {
4964 const char *ar_name;
4965 const char *ar_service;
4966 const struct addrinfo *ar_request;
4967 struct addrinfo *ar_result;
4968
4969 int __return;
4970 int __glibc_reserved[5];
4971 };
4972 # 662 "/usr/include/netdb.h" 3 4
4973 extern int getaddrinfo (const char *__restrict __name,
4974 const char *__restrict __service,
4975 const struct addrinfo *__restrict __req,
4976 struct addrinfo **__restrict __pai);
4977
4978
4979 extern void freeaddrinfo (struct addrinfo *__ai) __attribute__ ((__nothrow__ , __leaf__));
4980
4981
4982 extern const char *gai_strerror (int __ecode) __attribute__ ((__nothrow__ , __leaf__));
4983
4984
4985
4986
4987
4988 extern int getnameinfo (const struct sockaddr *__restrict __sa,
4989 socklen_t __salen, char *__restrict __host,
4990 socklen_t __hostlen, char *__restrict __serv,
4991 socklen_t __servlen, int __flags);
4992 # 692 "/usr/include/netdb.h" 3 4
4993 extern int getaddrinfo_a (int __mode, struct gaicb *__list[__restrict],
4994 int __ent, struct sigevent *__restrict __sig);
4995 # 703 "/usr/include/netdb.h" 3 4
4996 extern int gai_suspend (const struct gaicb *const __list[], int __ent,
4997 const struct timespec *__timeout);
4998
4999
5000 extern int gai_error (struct gaicb *__req) __attribute__ ((__nothrow__ , __leaf__));
5001
5002
5003 extern int gai_cancel (struct gaicb *__gaicbp) __attribute__ ((__nothrow__ , __leaf__));
5004
5005
5006
5007 # 21 "include/libbb.h" 2
5008 # 1 "/usr/include/setjmp.h" 1 3 4
5009 # 27 "/usr/include/setjmp.h" 3 4
5010
5011
5012 # 1 "/usr/include/bits/setjmp.h" 1 3 4
5013 # 34 "/usr/include/bits/setjmp.h" 3 4
5014 typedef int __jmp_buf[64] __attribute__((__aligned__ (8)));
5015 # 30 "/usr/include/setjmp.h" 2 3 4
5016 # 1 "/usr/include/bits/sigset.h" 1 3 4
5017 # 31 "/usr/include/setjmp.h" 2 3 4
5018
5019
5020
5021 struct __jmp_buf_tag
5022 {
5023
5024
5025
5026
5027 __jmp_buf __jmpbuf;
5028 int __mask_was_saved;
5029 __sigset_t __saved_mask;
5030 };
5031
5032
5033
5034
5035 typedef struct __jmp_buf_tag jmp_buf[1];
5036
5037
5038
5039 extern int setjmp (jmp_buf __env) __attribute__ ((__nothrow__));
5040
5041
5042
5043
5044
5045
5046 extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __attribute__ ((__nothrow__));
5047
5048
5049
5050 extern int _setjmp (struct __jmp_buf_tag __env[1]) __attribute__ ((__nothrow__));
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061 extern void longjmp (struct __jmp_buf_tag __env[1], int __val)
5062 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
5063
5064
5065
5066
5067
5068
5069
5070 extern void _longjmp (struct __jmp_buf_tag __env[1], int __val)
5071 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
5072
5073
5074
5075
5076
5077
5078
5079 typedef struct __jmp_buf_tag sigjmp_buf[1];
5080 # 102 "/usr/include/setjmp.h" 3 4
5081 extern void siglongjmp (sigjmp_buf __env, int __val)
5082 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
5083
5084
5085
5086
5087
5088 # 1 "/usr/include/bits/setjmp2.h" 1 3 4
5089 # 25 "/usr/include/bits/setjmp2.h" 3 4
5090 extern void longjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__))
5091
5092 __attribute__ ((__noreturn__));
5093 extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__))
5094
5095 __attribute__ ((__noreturn__));
5096 extern void siglongjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__))
5097
5098 __attribute__ ((__noreturn__));
5099 # 110 "/usr/include/setjmp.h" 2 3 4
5100
5101
5102
5103 # 22 "include/libbb.h" 2
5104 # 1 "/usr/include/signal.h" 1 3 4
5105 # 30 "/usr/include/signal.h" 3 4
5106
5107
5108 # 1 "/usr/include/bits/sigset.h" 1 3 4
5109 # 102 "/usr/include/bits/sigset.h" 3 4
5110 extern int __sigismember (const __sigset_t *, int);
5111 extern int __sigaddset (__sigset_t *, int);
5112 extern int __sigdelset (__sigset_t *, int);
5113 # 116 "/usr/include/bits/sigset.h" 3 4
5114 extern __inline __attribute__ ((__gnu_inline__)) int __sigismember (const __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return (__set->__val[__word] & __mask) ? 1 : 0; }
5115 extern __inline __attribute__ ((__gnu_inline__)) int __sigaddset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] |= __mask), 0); }
5116 extern __inline __attribute__ ((__gnu_inline__)) int __sigdelset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] &= ~__mask), 0); }
5117 # 33 "/usr/include/signal.h" 2 3 4
5118
5119
5120
5121
5122
5123
5124
5125 typedef __sig_atomic_t sig_atomic_t;
5126
5127 # 57 "/usr/include/signal.h" 3 4
5128 # 1 "/usr/include/bits/signum.h" 1 3 4
5129 # 58 "/usr/include/signal.h" 2 3 4
5130 # 75 "/usr/include/signal.h" 3 4
5131 # 1 "/usr/include/time.h" 1 3 4
5132 # 76 "/usr/include/signal.h" 2 3 4
5133
5134
5135
5136
5137 # 1 "/usr/include/bits/siginfo.h" 1 3 4
5138 # 24 "/usr/include/bits/siginfo.h" 3 4
5139 # 1 "/usr/include/bits/wordsize.h" 1 3 4
5140 # 25 "/usr/include/bits/siginfo.h" 2 3 4
5141 # 50 "/usr/include/bits/siginfo.h" 3 4
5142 typedef struct
5143 {
5144 int si_signo;
5145 int si_errno;
5146
5147 int si_code;
5148
5149 union
5150 {
5151 int _pad[((128 / sizeof (int)) - 3)];
5152
5153
5154 struct
5155 {
5156 __pid_t si_pid;
5157 __uid_t si_uid;
5158 } _kill;
5159
5160
5161 struct
5162 {
5163 int si_tid;
5164 int si_overrun;
5165 sigval_t si_sigval;
5166 } _timer;
5167
5168
5169 struct
5170 {
5171 __pid_t si_pid;
5172 __uid_t si_uid;
5173 sigval_t si_sigval;
5174 } _rt;
5175
5176
5177 struct
5178 {
5179 __pid_t si_pid;
5180 __uid_t si_uid;
5181 int si_status;
5182 __clock_t si_utime;
5183 __clock_t si_stime;
5184 } _sigchld;
5185
5186
5187 struct
5188 {
5189 void *si_addr;
5190 short int si_addr_lsb;
5191 } _sigfault;
5192
5193
5194 struct
5195 {
5196 long int si_band;
5197 int si_fd;
5198 } _sigpoll;
5199
5200
5201 struct
5202 {
5203 void *_call_addr;
5204 int _syscall;
5205 unsigned int _arch;
5206 } _sigsys;
5207 } _sifields;
5208 } siginfo_t;
5209 # 141 "/usr/include/bits/siginfo.h" 3 4
5210 enum
5211 {
5212 SI_ASYNCNL = -60,
5213
5214 SI_TKILL = -6,
5215
5216 SI_SIGIO,
5217
5218 SI_ASYNCIO,
5219
5220 SI_MESGQ,
5221
5222 SI_TIMER,
5223
5224 SI_QUEUE,
5225
5226 SI_USER,
5227
5228 SI_KERNEL = 0x80
5229
5230 };
5231
5232
5233
5234 enum
5235 {
5236 ILL_ILLOPC = 1,
5237
5238 ILL_ILLOPN,
5239
5240 ILL_ILLADR,
5241
5242 ILL_ILLTRP,
5243
5244 ILL_PRVOPC,
5245
5246 ILL_PRVREG,
5247
5248 ILL_COPROC,
5249
5250 ILL_BADSTK
5251
5252 };
5253
5254
5255 enum
5256 {
5257 FPE_INTDIV = 1,
5258
5259 FPE_INTOVF,
5260
5261 FPE_FLTDIV,
5262
5263 FPE_FLTOVF,
5264
5265 FPE_FLTUND,
5266
5267 FPE_FLTRES,
5268
5269 FPE_FLTINV,
5270
5271 FPE_FLTSUB
5272
5273 };
5274
5275
5276 enum
5277 {
5278 SEGV_MAPERR = 1,
5279
5280 SEGV_ACCERR
5281
5282 };
5283
5284
5285 enum
5286 {
5287 BUS_ADRALN = 1,
5288
5289 BUS_ADRERR,
5290
5291 BUS_OBJERR,
5292
5293 BUS_MCEERR_AR,
5294
5295 BUS_MCEERR_AO
5296
5297 };
5298
5299
5300 enum
5301 {
5302 TRAP_BRKPT = 1,
5303
5304 TRAP_TRACE
5305
5306 };
5307
5308
5309 enum
5310 {
5311 CLD_EXITED = 1,
5312
5313 CLD_KILLED,
5314
5315 CLD_DUMPED,
5316
5317 CLD_TRAPPED,
5318
5319 CLD_STOPPED,
5320
5321 CLD_CONTINUED
5322
5323 };
5324
5325
5326 enum
5327 {
5328 POLL_IN = 1,
5329
5330 POLL_OUT,
5331
5332 POLL_MSG,
5333
5334 POLL_ERR,
5335
5336 POLL_PRI,
5337
5338 POLL_HUP
5339
5340 };
5341 # 81 "/usr/include/signal.h" 2 3 4
5342
5343
5344
5345
5346 typedef void (*__sighandler_t) (int);
5347
5348
5349
5350
5351 extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler)
5352 __attribute__ ((__nothrow__ , __leaf__));
5353
5354 extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler)
5355 __attribute__ ((__nothrow__ , __leaf__));
5356
5357
5358
5359
5360
5361
5362
5363 extern __sighandler_t signal (int __sig, __sighandler_t __handler)
5364 __attribute__ ((__nothrow__ , __leaf__));
5365 # 114 "/usr/include/signal.h" 3 4
5366
5367
5368
5369
5370
5371 extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler)
5372 __attribute__ ((__nothrow__ , __leaf__));
5373
5374
5375
5376
5377
5378
5379 extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__ , __leaf__));
5380
5381
5382
5383
5384
5385
5386 extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__ , __leaf__));
5387
5388
5389
5390
5391 extern int raise (int __sig) __attribute__ ((__nothrow__ , __leaf__));
5392
5393
5394
5395
5396 extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)
5397 __attribute__ ((__nothrow__ , __leaf__));
5398 extern int gsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__));
5399
5400
5401
5402
5403 extern void psignal (int __sig, const char *__s);
5404
5405
5406
5407
5408 extern void psiginfo (const siginfo_t *__pinfo, const char *__s);
5409 # 167 "/usr/include/signal.h" 3 4
5410 extern int __sigpause (int __sig_or_mask, int __is_sig);
5411
5412
5413
5414 extern int sigpause (int __sig) __asm__ ("__xpg_sigpause");
5415 # 189 "/usr/include/signal.h" 3 4
5416 extern int sigblock (int __mask) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
5417
5418
5419 extern int sigsetmask (int __mask) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
5420
5421
5422 extern int siggetmask (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
5423 # 204 "/usr/include/signal.h" 3 4
5424 typedef __sighandler_t sighandler_t;
5425
5426
5427
5428
5429 typedef __sighandler_t sig_t;
5430
5431
5432
5433
5434
5435 extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
5436
5437
5438 extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
5439
5440
5441 extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
5442
5443
5444 extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
5445
5446
5447 extern int sigismember (const sigset_t *__set, int __signo)
5448 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
5449
5450
5451
5452 extern int sigisemptyset (const sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
5453
5454
5455 extern int sigandset (sigset_t *__set, const sigset_t *__left,
5456 const sigset_t *__right) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3)));
5457
5458
5459 extern int sigorset (sigset_t *__set, const sigset_t *__left,
5460 const sigset_t *__right) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3)));
5461
5462
5463
5464
5465 # 1 "/usr/include/bits/sigaction.h" 1 3 4
5466 # 24 "/usr/include/bits/sigaction.h" 3 4
5467 struct sigaction
5468 {
5469
5470
5471 union
5472 {
5473
5474 __sighandler_t sa_handler;
5475
5476 void (*sa_sigaction) (int, siginfo_t *, void *);
5477 }
5478 __sigaction_handler;
5479
5480
5481
5482
5483
5484
5485
5486 __sigset_t sa_mask;
5487
5488
5489 int sa_flags;
5490
5491
5492 void (*sa_restorer) (void);
5493 };
5494 # 246 "/usr/include/signal.h" 2 3 4
5495
5496
5497 extern int sigprocmask (int __how, const sigset_t *__restrict __set,
5498 sigset_t *__restrict __oset) __attribute__ ((__nothrow__ , __leaf__));
5499
5500
5501
5502
5503
5504
5505 extern int sigsuspend (const sigset_t *__set) __attribute__ ((__nonnull__ (1)));
5506
5507
5508 extern int sigaction (int __sig, const struct sigaction *__restrict __act,
5509 struct sigaction *__restrict __oact) __attribute__ ((__nothrow__ , __leaf__));
5510
5511
5512 extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
5513
5514
5515
5516
5517
5518
5519 extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig)
5520 __attribute__ ((__nonnull__ (1, 2)));
5521
5522
5523
5524
5525
5526
5527 extern int sigwaitinfo (const sigset_t *__restrict __set,
5528 siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1)));
5529
5530
5531
5532
5533
5534
5535 extern int sigtimedwait (const sigset_t *__restrict __set,
5536 siginfo_t *__restrict __info,
5537 const struct timespec *__restrict __timeout)
5538 __attribute__ ((__nonnull__ (1)));
5539
5540
5541
5542 extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val)
5543 __attribute__ ((__nothrow__ , __leaf__));
5544 # 303 "/usr/include/signal.h" 3 4
5545 extern const char *const _sys_siglist[65];
5546 extern const char *const sys_siglist[65];
5547
5548
5549 struct sigvec
5550 {
5551 __sighandler_t sv_handler;
5552 int sv_mask;
5553
5554 int sv_flags;
5555
5556 };
5557 # 327 "/usr/include/signal.h" 3 4
5558 extern int sigvec (int __sig, const struct sigvec *__vec,
5559 struct sigvec *__ovec) __attribute__ ((__nothrow__ , __leaf__));
5560
5561
5562
5563 # 1 "/usr/include/bits/sigcontext.h" 1 3 4
5564 # 27 "/usr/include/bits/sigcontext.h" 3 4
5565 # 1 "/usr/include/asm/sigcontext.h" 1 3 4
5566 # 9 "/usr/include/asm/sigcontext.h" 3 4
5567 struct sigcontext {
5568 unsigned long trap_no;
5569 unsigned long error_code;
5570 unsigned long oldmask;
5571 unsigned long arm_r0;
5572 unsigned long arm_r1;
5573 unsigned long arm_r2;
5574 unsigned long arm_r3;
5575 unsigned long arm_r4;
5576 unsigned long arm_r5;
5577 unsigned long arm_r6;
5578 unsigned long arm_r7;
5579 unsigned long arm_r8;
5580 unsigned long arm_r9;
5581 unsigned long arm_r10;
5582 unsigned long arm_fp;
5583 unsigned long arm_ip;
5584 unsigned long arm_sp;
5585 unsigned long arm_lr;
5586 unsigned long arm_pc;
5587 unsigned long arm_cpsr;
5588 unsigned long fault_address;
5589 };
5590 # 28 "/usr/include/bits/sigcontext.h" 2 3 4
5591
5592
5593
5594 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stddef.h" 1 3 4
5595 # 32 "/usr/include/bits/sigcontext.h" 2 3 4
5596 # 333 "/usr/include/signal.h" 2 3 4
5597
5598
5599 extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__ , __leaf__));
5600
5601
5602
5603
5604
5605
5606 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stddef.h" 1 3 4
5607 # 343 "/usr/include/signal.h" 2 3 4
5608
5609
5610
5611
5612 extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__ , __leaf__));
5613
5614 # 1 "/usr/include/bits/sigstack.h" 1 3 4
5615 # 25 "/usr/include/bits/sigstack.h" 3 4
5616 struct sigstack
5617 {
5618 void *ss_sp;
5619 int ss_onstack;
5620 };
5621
5622
5623
5624 enum
5625 {
5626 SS_ONSTACK = 1,
5627
5628 SS_DISABLE
5629
5630 };
5631 # 49 "/usr/include/bits/sigstack.h" 3 4
5632 typedef struct sigaltstack
5633 {
5634 void *ss_sp;
5635 int ss_flags;
5636 size_t ss_size;
5637 } stack_t;
5638 # 350 "/usr/include/signal.h" 2 3 4
5639
5640
5641 # 1 "/usr/include/sys/ucontext.h" 1 3 4
5642 # 24 "/usr/include/sys/ucontext.h" 3 4
5643 # 1 "/usr/include/signal.h" 1 3 4
5644 # 25 "/usr/include/sys/ucontext.h" 2 3 4
5645
5646
5647
5648 # 1 "/usr/include/bits/sigcontext.h" 1 3 4
5649 # 29 "/usr/include/sys/ucontext.h" 2 3 4
5650
5651 typedef int greg_t;
5652
5653
5654
5655
5656
5657 typedef greg_t gregset_t[18];
5658
5659
5660 enum
5661 {
5662 REG_R0 = 0,
5663
5664 REG_R1 = 1,
5665
5666 REG_R2 = 2,
5667
5668 REG_R3 = 3,
5669
5670 REG_R4 = 4,
5671
5672 REG_R5 = 5,
5673
5674 REG_R6 = 6,
5675
5676 REG_R7 = 7,
5677
5678 REG_R8 = 8,
5679
5680 REG_R9 = 9,
5681
5682 REG_R10 = 10,
5683
5684 REG_R11 = 11,
5685
5686 REG_R12 = 12,
5687
5688 REG_R13 = 13,
5689
5690 REG_R14 = 14,
5691
5692 REG_R15 = 15
5693
5694 };
5695
5696 struct _libc_fpstate
5697 {
5698 struct
5699 {
5700 unsigned int sign1:1;
5701 unsigned int unused:15;
5702 unsigned int sign2:1;
5703 unsigned int exponent:14;
5704 unsigned int j:1;
5705 unsigned int mantissa1:31;
5706 unsigned int mantissa0:32;
5707 } fpregs[8];
5708 unsigned int fpsr:32;
5709 unsigned int fpcr:32;
5710 unsigned char ftype[8];
5711 unsigned int init_flag;
5712 };
5713
5714 typedef struct _libc_fpstate fpregset_t;
5715
5716
5717
5718
5719
5720 typedef struct sigcontext mcontext_t;
5721
5722
5723 typedef struct ucontext
5724 {
5725 unsigned long uc_flags;
5726 struct ucontext *uc_link;
5727 stack_t uc_stack;
5728 mcontext_t uc_mcontext;
5729 __sigset_t uc_sigmask;
5730 unsigned long uc_regspace[128] __attribute__((__aligned__(8)));
5731 } ucontext_t;
5732 # 353 "/usr/include/signal.h" 2 3 4
5733
5734
5735
5736
5737
5738 extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)
5739 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
5740
5741
5742
5743 extern int sigaltstack (const struct sigaltstack *__restrict __ss,
5744 struct sigaltstack *__restrict __oss) __attribute__ ((__nothrow__ , __leaf__));
5745
5746
5747
5748
5749
5750
5751
5752 extern int sighold (int __sig) __attribute__ ((__nothrow__ , __leaf__));
5753
5754
5755 extern int sigrelse (int __sig) __attribute__ ((__nothrow__ , __leaf__));
5756
5757
5758 extern int sigignore (int __sig) __attribute__ ((__nothrow__ , __leaf__));
5759
5760
5761 extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __attribute__ ((__nothrow__ , __leaf__));
5762
5763
5764
5765
5766
5767
5768 # 1 "/usr/include/bits/sigthread.h" 1 3 4
5769 # 30 "/usr/include/bits/sigthread.h" 3 4
5770 extern int pthread_sigmask (int __how,
5771 const __sigset_t *__restrict __newmask,
5772 __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__ , __leaf__));
5773
5774
5775 extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__ , __leaf__));
5776
5777
5778
5779 extern int pthread_sigqueue (pthread_t __threadid, int __signo,
5780 const union sigval __value) __attribute__ ((__nothrow__ , __leaf__));
5781 # 389 "/usr/include/signal.h" 2 3 4
5782
5783
5784
5785
5786
5787
5788 extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__ , __leaf__));
5789
5790 extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__ , __leaf__));
5791
5792
5793
5794
5795 # 23 "include/libbb.h" 2
5796
5797
5798
5799
5800
5801
5802
5803 # 1 "/usr/include/stdio.h" 1 3 4
5804 # 29 "/usr/include/stdio.h" 3 4
5805
5806
5807
5808
5809 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stddef.h" 1 3 4
5810 # 34 "/usr/include/stdio.h" 2 3 4
5811 # 44 "/usr/include/stdio.h" 3 4
5812 struct _IO_FILE;
5813
5814
5815
5816 typedef struct _IO_FILE FILE;
5817
5818
5819
5820
5821
5822 # 64 "/usr/include/stdio.h" 3 4
5823 typedef struct _IO_FILE __FILE;
5824 # 74 "/usr/include/stdio.h" 3 4
5825 # 1 "/usr/include/libio.h" 1 3 4
5826 # 31 "/usr/include/libio.h" 3 4
5827 # 1 "/usr/include/_G_config.h" 1 3 4
5828 # 15 "/usr/include/_G_config.h" 3 4
5829 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stddef.h" 1 3 4
5830 # 16 "/usr/include/_G_config.h" 2 3 4
5831
5832
5833
5834
5835 # 1 "/usr/include/wchar.h" 1 3 4
5836 # 82 "/usr/include/wchar.h" 3 4
5837 typedef struct
5838 {
5839 int __count;
5840 union
5841 {
5842
5843 unsigned int __wch;
5844
5845
5846
5847 char __wchb[4];
5848 } __value;
5849 } __mbstate_t;
5850 # 21 "/usr/include/_G_config.h" 2 3 4
5851 typedef struct
5852 {
5853 __off_t __pos;
5854 __mbstate_t __state;
5855 } _G_fpos_t;
5856 typedef struct
5857 {
5858 __off64_t __pos;
5859 __mbstate_t __state;
5860 } _G_fpos64_t;
5861 # 32 "/usr/include/libio.h" 2 3 4
5862 # 49 "/usr/include/libio.h" 3 4
5863 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stdarg.h" 1 3 4
5864 # 40 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stdarg.h" 3 4
5865 typedef __builtin_va_list __gnuc_va_list;
5866 # 50 "/usr/include/libio.h" 2 3 4
5867 # 144 "/usr/include/libio.h" 3 4
5868 struct _IO_jump_t; struct _IO_FILE;
5869 # 154 "/usr/include/libio.h" 3 4
5870 typedef void _IO_lock_t;
5871
5872
5873
5874
5875
5876 struct _IO_marker {
5877 struct _IO_marker *_next;
5878 struct _IO_FILE *_sbuf;
5879
5880
5881
5882 int _pos;
5883 # 177 "/usr/include/libio.h" 3 4
5884 };
5885
5886
5887 enum __codecvt_result
5888 {
5889 __codecvt_ok,
5890 __codecvt_partial,
5891 __codecvt_error,
5892 __codecvt_noconv
5893 };
5894 # 245 "/usr/include/libio.h" 3 4
5895 struct _IO_FILE {
5896 int _flags;
5897
5898
5899
5900
5901 char* _IO_read_ptr;
5902 char* _IO_read_end;
5903 char* _IO_read_base;
5904 char* _IO_write_base;
5905 char* _IO_write_ptr;
5906 char* _IO_write_end;
5907 char* _IO_buf_base;
5908 char* _IO_buf_end;
5909
5910 char *_IO_save_base;
5911 char *_IO_backup_base;
5912 char *_IO_save_end;
5913
5914 struct _IO_marker *_markers;
5915
5916 struct _IO_FILE *_chain;
5917
5918 int _fileno;
5919
5920
5921
5922 int _flags2;
5923
5924 __off_t _old_offset;
5925
5926
5927
5928 unsigned short _cur_column;
5929 signed char _vtable_offset;
5930 char _shortbuf[1];
5931
5932
5933
5934 _IO_lock_t *_lock;
5935 # 293 "/usr/include/libio.h" 3 4
5936 __off64_t _offset;
5937 # 302 "/usr/include/libio.h" 3 4
5938 void *__pad1;
5939 void *__pad2;
5940 void *__pad3;
5941 void *__pad4;
5942 size_t __pad5;
5943
5944 int _mode;
5945
5946 char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
5947
5948 };
5949
5950
5951 typedef struct _IO_FILE _IO_FILE;
5952
5953
5954 struct _IO_FILE_plus;
5955
5956 extern struct _IO_FILE_plus _IO_2_1_stdin_;
5957 extern struct _IO_FILE_plus _IO_2_1_stdout_;
5958 extern struct _IO_FILE_plus _IO_2_1_stderr_;
5959 # 338 "/usr/include/libio.h" 3 4
5960 typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
5961
5962
5963
5964
5965
5966
5967
5968 typedef __ssize_t __io_write_fn (void *__cookie, const char *__buf,
5969 size_t __n);
5970
5971
5972
5973
5974
5975
5976
5977 typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);
5978
5979
5980 typedef int __io_close_fn (void *__cookie);
5981
5982
5983
5984
5985 typedef __io_read_fn cookie_read_function_t;
5986 typedef __io_write_fn cookie_write_function_t;
5987 typedef __io_seek_fn cookie_seek_function_t;
5988 typedef __io_close_fn cookie_close_function_t;
5989
5990
5991 typedef struct
5992 {
5993 __io_read_fn *read;
5994 __io_write_fn *write;
5995 __io_seek_fn *seek;
5996 __io_close_fn *close;
5997 } _IO_cookie_io_functions_t;
5998 typedef _IO_cookie_io_functions_t cookie_io_functions_t;
5999
6000 struct _IO_cookie_file;
6001
6002
6003 extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write,
6004 void *__cookie, _IO_cookie_io_functions_t __fns);
6005
6006
6007
6008
6009
6010
6011
6012 extern int __underflow (_IO_FILE *);
6013 extern int __uflow (_IO_FILE *);
6014 extern int __overflow (_IO_FILE *, int);
6015 # 434 "/usr/include/libio.h" 3 4
6016 extern int _IO_getc (_IO_FILE *__fp);
6017 extern int _IO_putc (int __c, _IO_FILE *__fp);
6018 extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__ , __leaf__));
6019 extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__ , __leaf__));
6020
6021 extern int _IO_peekc_locked (_IO_FILE *__fp);
6022
6023
6024
6025
6026
6027 extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__));
6028 extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__));
6029 extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__));
6030 # 464 "/usr/include/libio.h" 3 4
6031 extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
6032 __gnuc_va_list, int *__restrict);
6033 extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
6034 __gnuc_va_list);
6035 extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t);
6036 extern size_t _IO_sgetn (_IO_FILE *, void *, size_t);
6037
6038 extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int);
6039 extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int);
6040
6041 extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__));
6042 # 75 "/usr/include/stdio.h" 2 3 4
6043
6044
6045
6046
6047 typedef __gnuc_va_list va_list;
6048 # 108 "/usr/include/stdio.h" 3 4
6049
6050
6051
6052
6053 typedef _G_fpos64_t fpos_t;
6054
6055
6056
6057 typedef _G_fpos64_t fpos64_t;
6058 # 164 "/usr/include/stdio.h" 3 4
6059 # 1 "/usr/include/bits/stdio_lim.h" 1 3 4
6060 # 165 "/usr/include/stdio.h" 2 3 4
6061
6062
6063
6064 extern struct _IO_FILE *stdin;
6065 extern struct _IO_FILE *stdout;
6066 extern struct _IO_FILE *stderr;
6067
6068
6069
6070
6071
6072
6073
6074 extern int remove (const char *__filename) __attribute__ ((__nothrow__ , __leaf__));
6075
6076 extern int rename (const char *__old, const char *__new) __attribute__ ((__nothrow__ , __leaf__));
6077
6078
6079
6080
6081 extern int renameat (int __oldfd, const char *__old, int __newfd,
6082 const char *__new) __attribute__ ((__nothrow__ , __leaf__));
6083
6084
6085
6086 # 198 "/usr/include/stdio.h" 3 4
6087 extern FILE *tmpfile (void) __asm__ ("" "tmpfile64") __attribute__ ((__warn_unused_result__));
6088
6089
6090
6091
6092
6093
6094 extern FILE *tmpfile64 (void) __attribute__ ((__warn_unused_result__));
6095
6096
6097
6098 extern char *tmpnam (char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
6099
6100
6101
6102
6103
6104 extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
6105 # 227 "/usr/include/stdio.h" 3 4
6106 extern char *tempnam (const char *__dir, const char *__pfx)
6107 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
6108
6109
6110
6111
6112
6113
6114
6115
6116 extern int fclose (FILE *__stream);
6117
6118
6119
6120
6121 extern int fflush (FILE *__stream);
6122
6123 # 252 "/usr/include/stdio.h" 3 4
6124 extern int fflush_unlocked (FILE *__stream);
6125 # 262 "/usr/include/stdio.h" 3 4
6126 extern int fcloseall (void);
6127
6128
6129
6130
6131 # 283 "/usr/include/stdio.h" 3 4
6132 extern FILE *fopen (const char *__restrict __filename, const char *__restrict __modes) __asm__ ("" "fopen64")
6133
6134 __attribute__ ((__warn_unused_result__));
6135 extern FILE *freopen (const char *__restrict __filename, const char *__restrict __modes, FILE *__restrict __stream) __asm__ ("" "freopen64")
6136
6137
6138 __attribute__ ((__warn_unused_result__));
6139
6140
6141
6142
6143
6144
6145
6146 extern FILE *fopen64 (const char *__restrict __filename,
6147 const char *__restrict __modes) __attribute__ ((__warn_unused_result__));
6148 extern FILE *freopen64 (const char *__restrict __filename,
6149 const char *__restrict __modes,
6150 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
6151
6152
6153
6154
6155 extern FILE *fdopen (int __fd, const char *__modes) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
6156
6157
6158
6159
6160
6161 extern FILE *fopencookie (void *__restrict __magic_cookie,
6162 const char *__restrict __modes,
6163 _IO_cookie_io_functions_t __io_funcs) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
6164
6165
6166
6167
6168 extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)
6169 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
6170
6171
6172
6173
6174 extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
6175
6176
6177
6178
6179
6180
6181 extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
6182
6183
6184
6185 extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
6186 int __modes, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
6187
6188
6189
6190
6191
6192 extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
6193 size_t __size) __attribute__ ((__nothrow__ , __leaf__));
6194
6195
6196 extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
6197
6198
6199
6200
6201
6202
6203
6204
6205 extern int fprintf (FILE *__restrict __stream,
6206 const char *__restrict __format, ...);
6207
6208
6209
6210
6211 extern int printf (const char *__restrict __format, ...);
6212
6213 extern int sprintf (char *__restrict __s,
6214 const char *__restrict __format, ...) __attribute__ ((__nothrow__));
6215
6216
6217
6218
6219
6220 extern int vfprintf (FILE *__restrict __s, const char *__restrict __format,
6221 __gnuc_va_list __arg);
6222
6223
6224
6225
6226 extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg);
6227
6228 extern int vsprintf (char *__restrict __s, const char *__restrict __format,
6229 __gnuc_va_list __arg) __attribute__ ((__nothrow__));
6230
6231
6232
6233
6234
6235 extern int snprintf (char *__restrict __s, size_t __maxlen,
6236 const char *__restrict __format, ...)
6237 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));
6238
6239 extern int vsnprintf (char *__restrict __s, size_t __maxlen,
6240 const char *__restrict __format, __gnuc_va_list __arg)
6241 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));
6242
6243
6244
6245
6246
6247
6248 extern int vasprintf (char **__restrict __ptr, const char *__restrict __f,
6249 __gnuc_va_list __arg)
6250 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__));
6251 extern int __asprintf (char **__restrict __ptr,
6252 const char *__restrict __fmt, ...)
6253 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__));
6254 extern int asprintf (char **__restrict __ptr,
6255 const char *__restrict __fmt, ...)
6256 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__));
6257
6258
6259
6260
6261 extern int vdprintf (int __fd, const char *__restrict __fmt,
6262 __gnuc_va_list __arg)
6263 __attribute__ ((__format__ (__printf__, 2, 0)));
6264 extern int dprintf (int __fd, const char *__restrict __fmt, ...)
6265 __attribute__ ((__format__ (__printf__, 2, 3)));
6266
6267
6268
6269
6270
6271
6272
6273
6274 extern int fscanf (FILE *__restrict __stream,
6275 const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__));
6276
6277
6278
6279
6280 extern int scanf (const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__));
6281
6282 extern int sscanf (const char *__restrict __s,
6283 const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__));
6284 # 463 "/usr/include/stdio.h" 3 4
6285
6286
6287
6288
6289
6290
6291
6292
6293 extern int vfscanf (FILE *__restrict __s, const char *__restrict __format,
6294 __gnuc_va_list __arg)
6295 __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__));
6296
6297
6298
6299
6300
6301 extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg)
6302 __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__));
6303
6304
6305 extern int vsscanf (const char *__restrict __s,
6306 const char *__restrict __format, __gnuc_va_list __arg)
6307 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__scanf__, 2, 0)));
6308 # 522 "/usr/include/stdio.h" 3 4
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318 extern int fgetc (FILE *__stream);
6319 extern int getc (FILE *__stream);
6320
6321
6322
6323
6324
6325 extern int getchar (void);
6326
6327 # 550 "/usr/include/stdio.h" 3 4
6328 extern int getc_unlocked (FILE *__stream);
6329 extern int getchar_unlocked (void);
6330 # 561 "/usr/include/stdio.h" 3 4
6331 extern int fgetc_unlocked (FILE *__stream);
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343 extern int fputc (int __c, FILE *__stream);
6344 extern int putc (int __c, FILE *__stream);
6345
6346
6347
6348
6349
6350 extern int putchar (int __c);
6351
6352 # 594 "/usr/include/stdio.h" 3 4
6353 extern int fputc_unlocked (int __c, FILE *__stream);
6354
6355
6356
6357
6358
6359
6360
6361 extern int putc_unlocked (int __c, FILE *__stream);
6362 extern int putchar_unlocked (int __c);
6363
6364
6365
6366
6367
6368
6369 extern int getw (FILE *__stream);
6370
6371
6372 extern int putw (int __w, FILE *__stream);
6373
6374
6375
6376
6377
6378
6379
6380
6381 extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
6382 __attribute__ ((__warn_unused_result__));
6383 # 640 "/usr/include/stdio.h" 3 4
6384
6385 # 649 "/usr/include/stdio.h" 3 4
6386 extern char *fgets_unlocked (char *__restrict __s, int __n,
6387 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
6388 # 665 "/usr/include/stdio.h" 3 4
6389 extern __ssize_t __getdelim (char **__restrict __lineptr,
6390 size_t *__restrict __n, int __delimiter,
6391 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
6392 extern __ssize_t getdelim (char **__restrict __lineptr,
6393 size_t *__restrict __n, int __delimiter,
6394 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
6395
6396
6397
6398
6399
6400
6401
6402 extern __ssize_t getline (char **__restrict __lineptr,
6403 size_t *__restrict __n,
6404 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
6405
6406
6407
6408
6409
6410
6411
6412
6413 extern int fputs (const char *__restrict __s, FILE *__restrict __stream);
6414
6415
6416
6417
6418
6419 extern int puts (const char *__s);
6420
6421
6422
6423
6424
6425
6426 extern int ungetc (int __c, FILE *__stream);
6427
6428
6429
6430
6431
6432
6433 extern size_t fread (void *__restrict __ptr, size_t __size,
6434 size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
6435
6436
6437
6438
6439 extern size_t fwrite (const void *__restrict __ptr, size_t __size,
6440 size_t __n, FILE *__restrict __s);
6441
6442 # 726 "/usr/include/stdio.h" 3 4
6443 extern int fputs_unlocked (const char *__restrict __s,
6444 FILE *__restrict __stream);
6445 # 737 "/usr/include/stdio.h" 3 4
6446 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
6447 size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
6448 extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size,
6449 size_t __n, FILE *__restrict __stream);
6450
6451
6452
6453
6454
6455
6456
6457
6458 extern int fseek (FILE *__stream, long int __off, int __whence);
6459
6460
6461
6462
6463 extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__));
6464
6465
6466
6467
6468 extern void rewind (FILE *__stream);
6469
6470 # 781 "/usr/include/stdio.h" 3 4
6471 extern int fseeko (FILE *__stream, __off64_t __off, int __whence) __asm__ ("" "fseeko64")
6472
6473 ;
6474 extern __off64_t ftello (FILE *__stream) __asm__ ("" "ftello64");
6475
6476
6477
6478
6479
6480
6481
6482
6483 # 806 "/usr/include/stdio.h" 3 4
6484 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos) __asm__ ("" "fgetpos64")
6485 ;
6486 extern int fsetpos (FILE *__stream, const fpos_t *__pos) __asm__ ("" "fsetpos64")
6487 ;
6488
6489
6490
6491
6492
6493
6494
6495
6496 extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
6497 extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__));
6498 extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
6499 extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos);
6500
6501
6502
6503
6504 extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
6505
6506 extern int feof (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
6507
6508 extern int ferror (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
6509
6510
6511
6512
6513 extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
6514 extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
6515 extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
6516
6517
6518
6519
6520
6521
6522
6523
6524 extern void perror (const char *__s);
6525
6526
6527
6528
6529
6530
6531 # 1 "/usr/include/bits/sys_errlist.h" 1 3 4
6532 # 26 "/usr/include/bits/sys_errlist.h" 3 4
6533 extern int sys_nerr;
6534 extern const char *const sys_errlist[];
6535
6536
6537 extern int _sys_nerr;
6538 extern const char *const _sys_errlist[];
6539 # 854 "/usr/include/stdio.h" 2 3 4
6540
6541
6542
6543
6544 extern int fileno (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
6545
6546
6547
6548
6549 extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
6550 # 873 "/usr/include/stdio.h" 3 4
6551 extern FILE *popen (const char *__command, const char *__modes) __attribute__ ((__warn_unused_result__));
6552
6553
6554
6555
6556
6557 extern int pclose (FILE *__stream);
6558
6559
6560
6561
6562
6563 extern char *ctermid (char *__s) __attribute__ ((__nothrow__ , __leaf__));
6564
6565
6566
6567
6568
6569 extern char *cuserid (char *__s);
6570
6571
6572
6573
6574 struct obstack;
6575
6576
6577 extern int obstack_printf (struct obstack *__restrict __obstack,
6578 const char *__restrict __format, ...)
6579 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3)));
6580 extern int obstack_vprintf (struct obstack *__restrict __obstack,
6581 const char *__restrict __format,
6582 __gnuc_va_list __args)
6583 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0)));
6584
6585
6586
6587
6588
6589
6590
6591 extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
6592
6593
6594
6595 extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
6596
6597
6598 extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
6599 # 934 "/usr/include/stdio.h" 3 4
6600 # 1 "/usr/include/bits/stdio.h" 1 3 4
6601 # 43 "/usr/include/bits/stdio.h" 3 4
6602 extern __inline __attribute__ ((__gnu_inline__)) int
6603 getchar (void)
6604 {
6605 return _IO_getc (stdin);
6606 }
6607
6608
6609
6610
6611 extern __inline __attribute__ ((__gnu_inline__)) int
6612 fgetc_unlocked (FILE *__fp)
6613 {
6614 return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
6615 }
6616
6617
6618
6619
6620
6621 extern __inline __attribute__ ((__gnu_inline__)) int
6622 getc_unlocked (FILE *__fp)
6623 {
6624 return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
6625 }
6626
6627
6628 extern __inline __attribute__ ((__gnu_inline__)) int
6629 getchar_unlocked (void)
6630 {
6631 return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++);
6632 }
6633
6634
6635
6636
6637 extern __inline __attribute__ ((__gnu_inline__)) int
6638 putchar (int __c)
6639 {
6640 return _IO_putc (__c, stdout);
6641 }
6642
6643
6644
6645
6646 extern __inline __attribute__ ((__gnu_inline__)) int
6647 fputc_unlocked (int __c, FILE *__stream)
6648 {
6649 return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
6650 }
6651
6652
6653
6654
6655
6656 extern __inline __attribute__ ((__gnu_inline__)) int
6657 putc_unlocked (int __c, FILE *__stream)
6658 {
6659 return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
6660 }
6661
6662
6663 extern __inline __attribute__ ((__gnu_inline__)) int
6664 putchar_unlocked (int __c)
6665 {
6666 return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c)));
6667 }
6668
6669
6670
6671
6672
6673 extern __inline __attribute__ ((__gnu_inline__)) __ssize_t
6674 getline (char **__lineptr, size_t *__n, FILE *__stream)
6675 {
6676 return __getdelim (__lineptr, __n, '\n', __stream);
6677 }
6678
6679
6680
6681
6682
6683 extern __inline __attribute__ ((__gnu_inline__)) int
6684 __attribute__ ((__nothrow__ , __leaf__)) feof_unlocked (FILE *__stream)
6685 {
6686 return (((__stream)->_flags & 0x10) != 0);
6687 }
6688
6689
6690 extern __inline __attribute__ ((__gnu_inline__)) int
6691 __attribute__ ((__nothrow__ , __leaf__)) ferror_unlocked (FILE *__stream)
6692 {
6693 return (((__stream)->_flags & 0x20) != 0);
6694 }
6695 # 935 "/usr/include/stdio.h" 2 3 4
6696
6697
6698 # 1 "/usr/include/bits/stdio2.h" 1 3 4
6699 # 23 "/usr/include/bits/stdio2.h" 3 4
6700 extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen,
6701 const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__));
6702 extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen,
6703 const char *__restrict __format,
6704 __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__));
6705
6706
6707 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
6708 __attribute__ ((__nothrow__ , __leaf__)) sprintf (char *__restrict __s, const char *__restrict __fmt, ...)
6709 {
6710 return __builtin___sprintf_chk (__s, 2 - 1,
6711 __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ());
6712 }
6713
6714
6715
6716
6717
6718
6719 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
6720 __attribute__ ((__nothrow__ , __leaf__)) vsprintf (char *__restrict __s, const char *__restrict __fmt, __gnuc_va_list __ap)
6721
6722 {
6723 return __builtin___vsprintf_chk (__s, 2 - 1,
6724 __builtin_object_size (__s, 2 > 1), __fmt, __ap);
6725 }
6726
6727
6728
6729 extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag,
6730 size_t __slen, const char *__restrict __format,
6731 ...) __attribute__ ((__nothrow__ , __leaf__));
6732 extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag,
6733 size_t __slen, const char *__restrict __format,
6734 __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__));
6735
6736
6737 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
6738 __attribute__ ((__nothrow__ , __leaf__)) snprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, ...)
6739
6740 {
6741 return __builtin___snprintf_chk (__s, __n, 2 - 1,
6742 __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ());
6743 }
6744
6745
6746
6747
6748
6749
6750 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
6751 __attribute__ ((__nothrow__ , __leaf__)) vsnprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, __gnuc_va_list __ap)
6752
6753 {
6754 return __builtin___vsnprintf_chk (__s, __n, 2 - 1,
6755 __builtin_object_size (__s, 2 > 1), __fmt, __ap);
6756 }
6757
6758
6759
6760
6761
6762 extern int __fprintf_chk (FILE *__restrict __stream, int __flag,
6763 const char *__restrict __format, ...);
6764 extern int __printf_chk (int __flag, const char *__restrict __format, ...);
6765 extern int __vfprintf_chk (FILE *__restrict __stream, int __flag,
6766 const char *__restrict __format, __gnuc_va_list __ap);
6767 extern int __vprintf_chk (int __flag, const char *__restrict __format,
6768 __gnuc_va_list __ap);
6769
6770
6771 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
6772 fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...)
6773 {
6774 return __fprintf_chk (__stream, 2 - 1, __fmt,
6775 __builtin_va_arg_pack ());
6776 }
6777
6778 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
6779 printf (const char *__restrict __fmt, ...)
6780 {
6781 return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ());
6782 }
6783
6784
6785
6786
6787
6788
6789
6790 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
6791 vprintf (const char *__restrict __fmt, __gnuc_va_list __ap)
6792 {
6793
6794 return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap);
6795
6796
6797
6798 }
6799
6800 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
6801 vfprintf (FILE *__restrict __stream,
6802 const char *__restrict __fmt, __gnuc_va_list __ap)
6803 {
6804 return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap);
6805 }
6806
6807
6808 extern int __dprintf_chk (int __fd, int __flag, const char *__restrict __fmt,
6809 ...) __attribute__ ((__format__ (__printf__, 3, 4)));
6810 extern int __vdprintf_chk (int __fd, int __flag,
6811 const char *__restrict __fmt, __gnuc_va_list __arg)
6812 __attribute__ ((__format__ (__printf__, 3, 0)));
6813
6814
6815 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
6816 dprintf (int __fd, const char *__restrict __fmt, ...)
6817 {
6818 return __dprintf_chk (__fd, 2 - 1, __fmt,
6819 __builtin_va_arg_pack ());
6820 }
6821
6822
6823
6824
6825
6826 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
6827 vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __ap)
6828 {
6829 return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap);
6830 }
6831
6832
6833
6834
6835 extern int __asprintf_chk (char **__restrict __ptr, int __flag,
6836 const char *__restrict __fmt, ...)
6837 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__));
6838 extern int __vasprintf_chk (char **__restrict __ptr, int __flag,
6839 const char *__restrict __fmt, __gnuc_va_list __arg)
6840 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__));
6841 extern int __obstack_printf_chk (struct obstack *__restrict __obstack,
6842 int __flag, const char *__restrict __format,
6843 ...)
6844 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 4)));
6845 extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack,
6846 int __flag,
6847 const char *__restrict __format,
6848 __gnuc_va_list __args)
6849 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 0)));
6850
6851
6852 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
6853 __attribute__ ((__nothrow__ , __leaf__)) asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...)
6854 {
6855 return __asprintf_chk (__ptr, 2 - 1, __fmt,
6856 __builtin_va_arg_pack ());
6857 }
6858
6859 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
6860 __attribute__ ((__nothrow__ , __leaf__)) __asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...)
6861
6862 {
6863 return __asprintf_chk (__ptr, 2 - 1, __fmt,
6864 __builtin_va_arg_pack ());
6865 }
6866
6867 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
6868 __attribute__ ((__nothrow__ , __leaf__)) obstack_printf (struct obstack *__restrict __obstack, const char *__restrict __fmt, ...)
6869
6870 {
6871 return __obstack_printf_chk (__obstack, 2 - 1, __fmt,
6872 __builtin_va_arg_pack ());
6873 }
6874 # 206 "/usr/include/bits/stdio2.h" 3 4
6875 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
6876 __attribute__ ((__nothrow__ , __leaf__)) vasprintf (char **__restrict __ptr, const char *__restrict __fmt, __gnuc_va_list __ap)
6877
6878 {
6879 return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap);
6880 }
6881
6882 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
6883 __attribute__ ((__nothrow__ , __leaf__)) obstack_vprintf (struct obstack *__restrict __obstack, const char *__restrict __fmt, __gnuc_va_list __ap)
6884
6885 {
6886 return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt,
6887 __ap);
6888 }
6889 # 241 "/usr/include/bits/stdio2.h" 3 4
6890 extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n,
6891 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
6892 extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets")
6893
6894 __attribute__ ((__warn_unused_result__));
6895 extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk")
6896
6897
6898 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer")))
6899 ;
6900
6901 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
6902 fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
6903 {
6904 if (__builtin_object_size (__s, 2 > 1) != (size_t) -1)
6905 {
6906 if (!__builtin_constant_p (__n) || __n <= 0)
6907 return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
6908
6909 if ((size_t) __n > __builtin_object_size (__s, 2 > 1))
6910 return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
6911 }
6912 return __fgets_alias (__s, __n, __stream);
6913 }
6914
6915 extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen,
6916 size_t __size, size_t __n,
6917 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
6918 extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread")
6919
6920
6921 __attribute__ ((__warn_unused_result__));
6922 extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk")
6923
6924
6925
6926
6927 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer")))
6928 ;
6929
6930 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t
6931 fread (void *__restrict __ptr, size_t __size, size_t __n,
6932 FILE *__restrict __stream)
6933 {
6934 if (__builtin_object_size (__ptr, 0) != (size_t) -1)
6935 {
6936 if (!__builtin_constant_p (__size)
6937 || !__builtin_constant_p (__n)
6938 || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
6939 return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream);
6940
6941 if (__size * __n > __builtin_object_size (__ptr, 0))
6942 return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream);
6943 }
6944 return __fread_alias (__ptr, __size, __n, __stream);
6945 }
6946
6947
6948 extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size,
6949 int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
6950 extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked")
6951
6952 __attribute__ ((__warn_unused_result__));
6953 extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk")
6954
6955
6956 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer")))
6957 ;
6958
6959 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
6960 fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream)
6961 {
6962 if (__builtin_object_size (__s, 2 > 1) != (size_t) -1)
6963 {
6964 if (!__builtin_constant_p (__n) || __n <= 0)
6965 return __fgets_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
6966
6967 if ((size_t) __n > __builtin_object_size (__s, 2 > 1))
6968 return __fgets_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
6969 }
6970 return __fgets_unlocked_alias (__s, __n, __stream);
6971 }
6972
6973
6974
6975
6976 extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen,
6977 size_t __size, size_t __n,
6978 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
6979 extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked")
6980
6981
6982 __attribute__ ((__warn_unused_result__));
6983 extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk")
6984
6985
6986
6987
6988 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer")))
6989 ;
6990
6991 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t
6992 fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n,
6993 FILE *__restrict __stream)
6994 {
6995 if (__builtin_object_size (__ptr, 0) != (size_t) -1)
6996 {
6997 if (!__builtin_constant_p (__size)
6998 || !__builtin_constant_p (__n)
6999 || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
7000 return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n,
7001 __stream);
7002
7003 if (__size * __n > __builtin_object_size (__ptr, 0))
7004 return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n,
7005 __stream);
7006 }
7007
7008
7009 if (__builtin_constant_p (__size)
7010 && __builtin_constant_p (__n)
7011 && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2))
7012 && __size * __n <= 8)
7013 {
7014 size_t __cnt = __size * __n;
7015 char *__cptr = (char *) __ptr;
7016 if (__cnt == 0)
7017 return 0;
7018
7019 for (; __cnt > 0; --__cnt)
7020 {
7021 int __c = (__builtin_expect (((__stream)->_IO_read_ptr >= (__stream)->_IO_read_end), 0) ? __uflow (__stream) : *(unsigned char *) (__stream)->_IO_read_ptr++);
7022 if (__c == (-1))
7023 break;
7024 *__cptr++ = __c;
7025 }
7026 return (__cptr - (char *) __ptr) / __size;
7027 }
7028
7029 return __fread_unlocked_alias (__ptr, __size, __n, __stream);
7030 }
7031 # 938 "/usr/include/stdio.h" 2 3 4
7032
7033
7034
7035
7036
7037
7038 # 31 "include/libbb.h" 2
7039 # 1 "/usr/include/stdlib.h" 1 3 4
7040 # 32 "/usr/include/stdlib.h" 3 4
7041 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stddef.h" 1 3 4
7042 # 324 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stddef.h" 3 4
7043 typedef unsigned int wchar_t;
7044 # 33 "/usr/include/stdlib.h" 2 3 4
7045
7046
7047
7048
7049
7050
7051
7052
7053 # 1 "/usr/include/bits/waitflags.h" 1 3 4
7054 # 42 "/usr/include/stdlib.h" 2 3 4
7055 # 1 "/usr/include/bits/waitstatus.h" 1 3 4
7056 # 66 "/usr/include/bits/waitstatus.h" 3 4
7057 union wait
7058 {
7059 int w_status;
7060 struct
7061 {
7062
7063 unsigned int __w_termsig:7;
7064 unsigned int __w_coredump:1;
7065 unsigned int __w_retcode:8;
7066 unsigned int:16;
7067
7068
7069
7070
7071
7072
7073
7074 } __wait_terminated;
7075 struct
7076 {
7077
7078 unsigned int __w_stopval:8;
7079 unsigned int __w_stopsig:8;
7080 unsigned int:16;
7081
7082
7083
7084
7085
7086
7087 } __wait_stopped;
7088 };
7089 # 43 "/usr/include/stdlib.h" 2 3 4
7090 # 67 "/usr/include/stdlib.h" 3 4
7091 typedef union
7092 {
7093 union wait *__uptr;
7094 int *__iptr;
7095 } __WAIT_STATUS __attribute__ ((__transparent_union__));
7096 # 95 "/usr/include/stdlib.h" 3 4
7097
7098
7099 typedef struct
7100 {
7101 int quot;
7102 int rem;
7103 } div_t;
7104
7105
7106
7107 typedef struct
7108 {
7109 long int quot;
7110 long int rem;
7111 } ldiv_t;
7112
7113
7114
7115
7116
7117
7118
7119 __extension__ typedef struct
7120 {
7121 long long int quot;
7122 long long int rem;
7123 } lldiv_t;
7124
7125
7126 # 139 "/usr/include/stdlib.h" 3 4
7127 extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
7128
7129
7130
7131
7132 extern double atof (const char *__nptr)
7133 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
7134
7135 extern int atoi (const char *__nptr)
7136 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
7137
7138 extern long int atol (const char *__nptr)
7139 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
7140
7141
7142
7143
7144
7145 __extension__ extern long long int atoll (const char *__nptr)
7146 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
7147
7148
7149
7150
7151
7152 extern double strtod (const char *__restrict __nptr,
7153 char **__restrict __endptr)
7154 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7155
7156
7157
7158
7159
7160 extern float strtof (const char *__restrict __nptr,
7161 char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7162
7163 extern long double strtold (const char *__restrict __nptr,
7164 char **__restrict __endptr)
7165 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7166
7167
7168
7169
7170
7171 extern long int strtol (const char *__restrict __nptr,
7172 char **__restrict __endptr, int __base)
7173 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7174
7175 extern unsigned long int strtoul (const char *__restrict __nptr,
7176 char **__restrict __endptr, int __base)
7177 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7178
7179
7180
7181
7182 __extension__
7183 extern long long int strtoq (const char *__restrict __nptr,
7184 char **__restrict __endptr, int __base)
7185 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7186
7187 __extension__
7188 extern unsigned long long int strtouq (const char *__restrict __nptr,
7189 char **__restrict __endptr, int __base)
7190 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7191
7192
7193
7194
7195
7196 __extension__
7197 extern long long int strtoll (const char *__restrict __nptr,
7198 char **__restrict __endptr, int __base)
7199 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7200
7201 __extension__
7202 extern unsigned long long int strtoull (const char *__restrict __nptr,
7203 char **__restrict __endptr, int __base)
7204 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7205
7206 # 239 "/usr/include/stdlib.h" 3 4
7207 extern long int strtol_l (const char *__restrict __nptr,
7208 char **__restrict __endptr, int __base,
7209 __locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4)));
7210
7211 extern unsigned long int strtoul_l (const char *__restrict __nptr,
7212 char **__restrict __endptr,
7213 int __base, __locale_t __loc)
7214 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4)));
7215
7216 __extension__
7217 extern long long int strtoll_l (const char *__restrict __nptr,
7218 char **__restrict __endptr, int __base,
7219 __locale_t __loc)
7220 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4)));
7221
7222 __extension__
7223 extern unsigned long long int strtoull_l (const char *__restrict __nptr,
7224 char **__restrict __endptr,
7225 int __base, __locale_t __loc)
7226 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4)));
7227
7228 extern double strtod_l (const char *__restrict __nptr,
7229 char **__restrict __endptr, __locale_t __loc)
7230 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
7231
7232 extern float strtof_l (const char *__restrict __nptr,
7233 char **__restrict __endptr, __locale_t __loc)
7234 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
7235
7236 extern long double strtold_l (const char *__restrict __nptr,
7237 char **__restrict __endptr,
7238 __locale_t __loc)
7239 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
7240
7241
7242
7243
7244
7245 extern __inline __attribute__ ((__gnu_inline__)) int
7246 __attribute__ ((__nothrow__ , __leaf__)) atoi (const char *__nptr)
7247 {
7248 return (int) strtol (__nptr, (char **) ((void *)0), 10);
7249 }
7250 extern __inline __attribute__ ((__gnu_inline__)) long int
7251 __attribute__ ((__nothrow__ , __leaf__)) atol (const char *__nptr)
7252 {
7253 return strtol (__nptr, (char **) ((void *)0), 10);
7254 }
7255
7256
7257
7258
7259 __extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int
7260 __attribute__ ((__nothrow__ , __leaf__)) atoll (const char *__nptr)
7261 {
7262 return strtoll (__nptr, (char **) ((void *)0), 10);
7263 }
7264
7265 # 305 "/usr/include/stdlib.h" 3 4
7266 extern char *l64a (long int __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
7267
7268
7269 extern long int a64l (const char *__s)
7270 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
7271 # 321 "/usr/include/stdlib.h" 3 4
7272 extern long int random (void) __attribute__ ((__nothrow__ , __leaf__));
7273
7274
7275 extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
7276
7277
7278
7279
7280
7281 extern char *initstate (unsigned int __seed, char *__statebuf,
7282 size_t __statelen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
7283
7284
7285
7286 extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7287
7288
7289
7290
7291
7292
7293
7294 struct random_data
7295 {
7296 int32_t *fptr;
7297 int32_t *rptr;
7298 int32_t *state;
7299 int rand_type;
7300 int rand_deg;
7301 int rand_sep;
7302 int32_t *end_ptr;
7303 };
7304
7305 extern int random_r (struct random_data *__restrict __buf,
7306 int32_t *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7307
7308 extern int srandom_r (unsigned int __seed, struct random_data *__buf)
7309 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
7310
7311 extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
7312 size_t __statelen,
7313 struct random_data *__restrict __buf)
7314 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)));
7315
7316 extern int setstate_r (char *__restrict __statebuf,
7317 struct random_data *__restrict __buf)
7318 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7319
7320
7321
7322
7323
7324
7325 extern int rand (void) __attribute__ ((__nothrow__ , __leaf__));
7326
7327 extern void srand (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
7328
7329
7330
7331
7332 extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__ , __leaf__));
7333
7334
7335
7336
7337
7338
7339
7340 extern double drand48 (void) __attribute__ ((__nothrow__ , __leaf__));
7341 extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7342
7343
7344 extern long int lrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
7345 extern long int nrand48 (unsigned short int __xsubi[3])
7346 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7347
7348
7349 extern long int mrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
7350 extern long int jrand48 (unsigned short int __xsubi[3])
7351 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7352
7353
7354 extern void srand48 (long int __seedval) __attribute__ ((__nothrow__ , __leaf__));
7355 extern unsigned short int *seed48 (unsigned short int __seed16v[3])
7356 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7357 extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7358
7359
7360
7361
7362
7363 struct drand48_data
7364 {
7365 unsigned short int __x[3];
7366 unsigned short int __old_x[3];
7367 unsigned short int __c;
7368 unsigned short int __init;
7369 __extension__ unsigned long long int __a;
7370
7371 };
7372
7373
7374 extern int drand48_r (struct drand48_data *__restrict __buffer,
7375 double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7376 extern int erand48_r (unsigned short int __xsubi[3],
7377 struct drand48_data *__restrict __buffer,
7378 double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7379
7380
7381 extern int lrand48_r (struct drand48_data *__restrict __buffer,
7382 long int *__restrict __result)
7383 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7384 extern int nrand48_r (unsigned short int __xsubi[3],
7385 struct drand48_data *__restrict __buffer,
7386 long int *__restrict __result)
7387 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7388
7389
7390 extern int mrand48_r (struct drand48_data *__restrict __buffer,
7391 long int *__restrict __result)
7392 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7393 extern int jrand48_r (unsigned short int __xsubi[3],
7394 struct drand48_data *__restrict __buffer,
7395 long int *__restrict __result)
7396 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7397
7398
7399 extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
7400 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
7401
7402 extern int seed48_r (unsigned short int __seed16v[3],
7403 struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7404
7405 extern int lcong48_r (unsigned short int __param[7],
7406 struct drand48_data *__buffer)
7407 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417 extern void *malloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
7418
7419 extern void *calloc (size_t __nmemb, size_t __size)
7420 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431 extern void *realloc (void *__ptr, size_t __size)
7432 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
7433
7434 extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));
7435
7436
7437
7438
7439 extern void cfree (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));
7440
7441
7442
7443 # 1 "/usr/include/alloca.h" 1 3 4
7444 # 24 "/usr/include/alloca.h" 3 4
7445 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stddef.h" 1 3 4
7446 # 25 "/usr/include/alloca.h" 2 3 4
7447
7448
7449
7450
7451
7452
7453
7454 extern void *alloca (size_t __size) __attribute__ ((__nothrow__ , __leaf__));
7455
7456
7457
7458
7459
7460
7461 # 493 "/usr/include/stdlib.h" 2 3 4
7462
7463
7464
7465
7466
7467 extern void *valloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
7468
7469
7470
7471
7472 extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
7473 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
7474
7475
7476
7477
7478 extern void *aligned_alloc (size_t __alignment, size_t __size)
7479 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (2))) __attribute__ ((__warn_unused_result__));
7480
7481
7482
7483
7484 extern void abort (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
7485
7486
7487
7488 extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7489
7490
7491
7492
7493
7494
7495
7496 extern int at_quick_exit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7497
7498
7499
7500
7501
7502
7503
7504 extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
7505 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7506
7507
7508
7509
7510
7511
7512 extern void exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
7513
7514
7515
7516
7517
7518 extern void quick_exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
7519
7520
7521
7522
7523
7524
7525
7526 extern void _Exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
7527
7528
7529
7530
7531
7532
7533 extern char *getenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
7534
7535
7536
7537
7538
7539 extern char *secure_getenv (const char *__name)
7540 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
7541
7542
7543
7544
7545
7546
7547 extern int putenv (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7548
7549
7550
7551
7552
7553 extern int setenv (const char *__name, const char *__value, int __replace)
7554 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
7555
7556
7557 extern int unsetenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7558
7559
7560
7561
7562
7563
7564 extern int clearenv (void) __attribute__ ((__nothrow__ , __leaf__));
7565 # 606 "/usr/include/stdlib.h" 3 4
7566 extern char *mktemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7567 # 623 "/usr/include/stdlib.h" 3 4
7568 extern int mkstemp (char *__template) __asm__ ("" "mkstemp64")
7569 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
7570
7571
7572
7573
7574
7575 extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
7576 # 645 "/usr/include/stdlib.h" 3 4
7577 extern int mkstemps (char *__template, int __suffixlen) __asm__ ("" "mkstemps64")
7578 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
7579
7580
7581
7582
7583
7584 extern int mkstemps64 (char *__template, int __suffixlen)
7585 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
7586 # 663 "/usr/include/stdlib.h" 3 4
7587 extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
7588 # 677 "/usr/include/stdlib.h" 3 4
7589 extern int mkostemp (char *__template, int __flags) __asm__ ("" "mkostemp64")
7590 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
7591
7592
7593
7594
7595
7596 extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
7597 # 698 "/usr/include/stdlib.h" 3 4
7598 extern int mkostemps (char *__template, int __suffixlen, int __flags) __asm__ ("" "mkostemps64")
7599
7600 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
7601
7602
7603
7604
7605
7606 extern int mkostemps64 (char *__template, int __suffixlen, int __flags)
7607 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617 extern int system (const char *__command) __attribute__ ((__warn_unused_result__));
7618
7619
7620
7621
7622
7623
7624 extern char *canonicalize_file_name (const char *__name)
7625 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
7626 # 734 "/usr/include/stdlib.h" 3 4
7627 extern char *realpath (const char *__restrict __name,
7628 char *__restrict __resolved) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
7629
7630
7631
7632
7633
7634
7635 typedef int (*__compar_fn_t) (const void *, const void *);
7636
7637
7638 typedef __compar_fn_t comparison_fn_t;
7639
7640
7641
7642 typedef int (*__compar_d_fn_t) (const void *, const void *, void *);
7643
7644
7645
7646
7647
7648 extern void *bsearch (const void *__key, const void *__base,
7649 size_t __nmemb, size_t __size, __compar_fn_t __compar)
7650 __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__));
7651
7652
7653 # 1 "/usr/include/bits/stdlib-bsearch.h" 1 3 4
7654 # 19 "/usr/include/bits/stdlib-bsearch.h" 3 4
7655 extern __inline __attribute__ ((__gnu_inline__)) void *
7656 bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size,
7657 __compar_fn_t __compar)
7658 {
7659 size_t __l, __u, __idx;
7660 const void *__p;
7661 int __comparison;
7662
7663 __l = 0;
7664 __u = __nmemb;
7665 while (__l < __u)
7666 {
7667 __idx = (__l + __u) / 2;
7668 __p = (void *) (((const char *) __base) + (__idx * __size));
7669 __comparison = (*__compar) (__key, __p);
7670 if (__comparison < 0)
7671 __u = __idx;
7672 else if (__comparison > 0)
7673 __l = __idx + 1;
7674 else
7675 return (void *) __p;
7676 }
7677
7678 return ((void *)0);
7679 }
7680 # 761 "/usr/include/stdlib.h" 2 3 4
7681
7682
7683
7684
7685 extern void qsort (void *__base, size_t __nmemb, size_t __size,
7686 __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
7687
7688 extern void qsort_r (void *__base, size_t __nmemb, size_t __size,
7689 __compar_d_fn_t __compar, void *__arg)
7690 __attribute__ ((__nonnull__ (1, 4)));
7691
7692
7693
7694
7695 extern int abs (int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
7696 extern long int labs (long int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
7697
7698
7699
7700 __extension__ extern long long int llabs (long long int __x)
7701 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
7702
7703
7704
7705
7706
7707
7708
7709 extern div_t div (int __numer, int __denom)
7710 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
7711 extern ldiv_t ldiv (long int __numer, long int __denom)
7712 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
7713
7714
7715
7716
7717 __extension__ extern lldiv_t lldiv (long long int __numer,
7718 long long int __denom)
7719 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
7720
7721 # 812 "/usr/include/stdlib.h" 3 4
7722 extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
7723 int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
7724
7725
7726
7727
7728 extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
7729 int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
7730
7731
7732
7733
7734 extern char *gcvt (double __value, int __ndigit, char *__buf)
7735 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__));
7736
7737
7738
7739
7740 extern char *qecvt (long double __value, int __ndigit,
7741 int *__restrict __decpt, int *__restrict __sign)
7742 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
7743 extern char *qfcvt (long double __value, int __ndigit,
7744 int *__restrict __decpt, int *__restrict __sign)
7745 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
7746 extern char *qgcvt (long double __value, int __ndigit, char *__buf)
7747 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__));
7748
7749
7750
7751
7752 extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
7753 int *__restrict __sign, char *__restrict __buf,
7754 size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
7755 extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
7756 int *__restrict __sign, char *__restrict __buf,
7757 size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
7758
7759 extern int qecvt_r (long double __value, int __ndigit,
7760 int *__restrict __decpt, int *__restrict __sign,
7761 char *__restrict __buf, size_t __len)
7762 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
7763 extern int qfcvt_r (long double __value, int __ndigit,
7764 int *__restrict __decpt, int *__restrict __sign,
7765 char *__restrict __buf, size_t __len)
7766 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
7767
7768
7769
7770
7771
7772
7773 extern int mblen (const char *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
7774
7775
7776 extern int mbtowc (wchar_t *__restrict __pwc,
7777 const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
7778
7779
7780 extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__ , __leaf__));
7781
7782
7783
7784 extern size_t mbstowcs (wchar_t *__restrict __pwcs,
7785 const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
7786
7787 extern size_t wcstombs (char *__restrict __s,
7788 const wchar_t *__restrict __pwcs, size_t __n)
7789 __attribute__ ((__nothrow__ , __leaf__));
7790
7791
7792
7793
7794
7795
7796
7797
7798 extern int rpmatch (const char *__response) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
7799 # 899 "/usr/include/stdlib.h" 3 4
7800 extern int getsubopt (char **__restrict __optionp,
7801 char *const *__restrict __tokens,
7802 char **__restrict __valuep)
7803 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__));
7804
7805
7806
7807
7808
7809 extern void setkey (const char *__key) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7810
7811
7812
7813
7814
7815
7816
7817 extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__));
7818
7819
7820
7821
7822
7823
7824
7825 extern int grantpt (int __fd) __attribute__ ((__nothrow__ , __leaf__));
7826
7827
7828
7829 extern int unlockpt (int __fd) __attribute__ ((__nothrow__ , __leaf__));
7830
7831
7832
7833
7834 extern char *ptsname (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
7835
7836
7837
7838
7839
7840
7841 extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
7842 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
7843
7844
7845 extern int getpt (void);
7846
7847
7848
7849
7850
7851
7852 extern int getloadavg (double __loadavg[], int __nelem)
7853 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7854
7855
7856 # 1 "/usr/include/bits/stdlib-float.h" 1 3 4
7857 # 24 "/usr/include/bits/stdlib-float.h" 3 4
7858
7859 extern __inline __attribute__ ((__gnu_inline__)) double
7860 __attribute__ ((__nothrow__ , __leaf__)) atof (const char *__nptr)
7861 {
7862 return strtod (__nptr, (char **) ((void *)0));
7863 }
7864
7865 # 956 "/usr/include/stdlib.h" 2 3 4
7866
7867
7868
7869 # 1 "/usr/include/bits/stdlib.h" 1 3 4
7870 # 23 "/usr/include/bits/stdlib.h" 3 4
7871 extern char *__realpath_chk (const char *__restrict __name,
7872 char *__restrict __resolved,
7873 size_t __resolvedlen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
7874 extern char *__realpath_alias (const char *__restrict __name, char *__restrict __resolved) __asm__ ("" "realpath") __attribute__ ((__nothrow__ , __leaf__))
7875
7876 __attribute__ ((__warn_unused_result__));
7877 extern char *__realpath_chk_warn (const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __asm__ ("" "__realpath_chk") __attribute__ ((__nothrow__ , __leaf__))
7878
7879
7880 __attribute__ ((__warn_unused_result__))
7881 __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer")))
7882 ;
7883
7884 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
7885 __attribute__ ((__nothrow__ , __leaf__)) realpath (const char *__restrict __name, char *__restrict __resolved)
7886 {
7887 if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1)
7888 {
7889
7890 if (__builtin_object_size (__resolved, 2 > 1) < 4096)
7891 return __realpath_chk_warn (__name, __resolved, __builtin_object_size (__resolved, 2 > 1));
7892
7893 return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1));
7894 }
7895
7896 return __realpath_alias (__name, __resolved);
7897 }
7898
7899
7900 extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen,
7901 size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
7902 extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ptsname_r") __attribute__ ((__nothrow__ , __leaf__))
7903
7904 __attribute__ ((__nonnull__ (2)));
7905 extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ptsname_r_chk") __attribute__ ((__nothrow__ , __leaf__))
7906
7907
7908 __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf")))
7909 ;
7910
7911 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
7912 __attribute__ ((__nothrow__ , __leaf__)) ptsname_r (int __fd, char *__buf, size_t __buflen)
7913 {
7914 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
7915 {
7916 if (!__builtin_constant_p (__buflen))
7917 return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
7918 if (__buflen > __builtin_object_size (__buf, 2 > 1))
7919 return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
7920 }
7921 return __ptsname_r_alias (__fd, __buf, __buflen);
7922 }
7923
7924
7925 extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen)
7926 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
7927 extern int __wctomb_alias (char *__s, wchar_t __wchar) __asm__ ("" "wctomb") __attribute__ ((__nothrow__ , __leaf__))
7928 __attribute__ ((__warn_unused_result__));
7929
7930 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) int
7931 __attribute__ ((__nothrow__ , __leaf__)) wctomb (char *__s, wchar_t __wchar)
7932 {
7933
7934
7935
7936
7937
7938
7939
7940 if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1))
7941 return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1));
7942 return __wctomb_alias (__s, __wchar);
7943 }
7944
7945
7946 extern size_t __mbstowcs_chk (wchar_t *__restrict __dst,
7947 const char *__restrict __src,
7948 size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__));
7949 extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len) __asm__ ("" "mbstowcs") __attribute__ ((__nothrow__ , __leaf__))
7950
7951
7952 ;
7953 extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__mbstowcs_chk") __attribute__ ((__nothrow__ , __leaf__))
7954
7955
7956
7957 __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)")))
7958 ;
7959
7960 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t
7961 __attribute__ ((__nothrow__ , __leaf__)) mbstowcs (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len)
7962
7963 {
7964 if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1)
7965 {
7966 if (!__builtin_constant_p (__len))
7967 return __mbstowcs_chk (__dst, __src, __len,
7968 __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t));
7969
7970 if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t))
7971 return __mbstowcs_chk_warn (__dst, __src, __len,
7972 __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t));
7973 }
7974 return __mbstowcs_alias (__dst, __src, __len);
7975 }
7976
7977
7978 extern size_t __wcstombs_chk (char *__restrict __dst,
7979 const wchar_t *__restrict __src,
7980 size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__));
7981 extern size_t __wcstombs_alias (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len) __asm__ ("" "wcstombs") __attribute__ ((__nothrow__ , __leaf__))
7982
7983
7984 ;
7985 extern size_t __wcstombs_chk_warn (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__wcstombs_chk") __attribute__ ((__nothrow__ , __leaf__))
7986
7987
7988
7989 __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len")));
7990
7991 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t
7992 __attribute__ ((__nothrow__ , __leaf__)) wcstombs (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len)
7993
7994 {
7995 if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1)
7996 {
7997 if (!__builtin_constant_p (__len))
7998 return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1));
7999 if (__len > __builtin_object_size (__dst, 2 > 1))
8000 return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1));
8001 }
8002 return __wcstombs_alias (__dst, __src, __len);
8003 }
8004 # 960 "/usr/include/stdlib.h" 2 3 4
8005 # 968 "/usr/include/stdlib.h" 3 4
8006
8007 # 32 "include/libbb.h" 2
8008 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stdarg.h" 1 3 4
8009 # 33 "include/libbb.h" 2
8010 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stddef.h" 1 3 4
8011 # 147 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stddef.h" 3 4
8012 typedef int ptrdiff_t;
8013 # 34 "include/libbb.h" 2
8014 # 1 "/usr/include/string.h" 1 3 4
8015 # 27 "/usr/include/string.h" 3 4
8016
8017
8018
8019
8020
8021 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stddef.h" 1 3 4
8022 # 33 "/usr/include/string.h" 2 3 4
8023 # 44 "/usr/include/string.h" 3 4
8024
8025
8026 extern void *memcpy (void *__restrict __dest, const void *__restrict __src,
8027 size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8028
8029
8030 extern void *memmove (void *__dest, const void *__src, size_t __n)
8031 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8032
8033
8034
8035
8036
8037
8038 extern void *memccpy (void *__restrict __dest, const void *__restrict __src,
8039 int __c, size_t __n)
8040 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8041
8042
8043
8044
8045
8046 extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8047
8048
8049 extern int memcmp (const void *__s1, const void *__s2, size_t __n)
8050 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
8051 # 96 "/usr/include/string.h" 3 4
8052 extern void *memchr (const void *__s, int __c, size_t __n)
8053 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
8054
8055
8056 # 110 "/usr/include/string.h" 3 4
8057 extern void *rawmemchr (const void *__s, int __c)
8058 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
8059 # 121 "/usr/include/string.h" 3 4
8060 extern void *memrchr (const void *__s, int __c, size_t __n)
8061 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
8062
8063
8064
8065
8066
8067
8068 extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
8069 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8070
8071 extern char *strncpy (char *__restrict __dest,
8072 const char *__restrict __src, size_t __n)
8073 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8074
8075
8076 extern char *strcat (char *__restrict __dest, const char *__restrict __src)
8077 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8078
8079 extern char *strncat (char *__restrict __dest, const char *__restrict __src,
8080 size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8081
8082
8083 extern int strcmp (const char *__s1, const char *__s2)
8084 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
8085
8086 extern int strncmp (const char *__s1, const char *__s2, size_t __n)
8087 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
8088
8089
8090 extern int strcoll (const char *__s1, const char *__s2)
8091 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
8092
8093 extern size_t strxfrm (char *__restrict __dest,
8094 const char *__restrict __src, size_t __n)
8095 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
8096
8097 # 166 "/usr/include/string.h" 3 4
8098 extern int strcoll_l (const char *__s1, const char *__s2, __locale_t __l)
8099 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
8100
8101 extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,
8102 __locale_t __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)));
8103
8104
8105
8106
8107
8108 extern char *strdup (const char *__s)
8109 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
8110
8111
8112
8113
8114
8115
8116 extern char *strndup (const char *__string, size_t __n)
8117 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
8118 # 211 "/usr/include/string.h" 3 4
8119
8120 # 236 "/usr/include/string.h" 3 4
8121 extern char *strchr (const char *__s, int __c)
8122 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
8123 # 263 "/usr/include/string.h" 3 4
8124 extern char *strrchr (const char *__s, int __c)
8125 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
8126
8127
8128 # 277 "/usr/include/string.h" 3 4
8129 extern char *strchrnul (const char *__s, int __c)
8130 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
8131
8132
8133
8134
8135
8136
8137 extern size_t strcspn (const char *__s, const char *__reject)
8138 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
8139
8140
8141 extern size_t strspn (const char *__s, const char *__accept)
8142 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
8143 # 315 "/usr/include/string.h" 3 4
8144 extern char *strpbrk (const char *__s, const char *__accept)
8145 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
8146 # 342 "/usr/include/string.h" 3 4
8147 extern char *strstr (const char *__haystack, const char *__needle)
8148 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
8149
8150
8151
8152
8153 extern char *strtok (char *__restrict __s, const char *__restrict __delim)
8154 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
8155
8156
8157
8158
8159 extern char *__strtok_r (char *__restrict __s,
8160 const char *__restrict __delim,
8161 char **__restrict __save_ptr)
8162 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
8163
8164 extern char *strtok_r (char *__restrict __s, const char *__restrict __delim,
8165 char **__restrict __save_ptr)
8166 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
8167 # 373 "/usr/include/string.h" 3 4
8168 extern char *strcasestr (const char *__haystack, const char *__needle)
8169 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
8170
8171
8172
8173
8174
8175
8176
8177 extern void *memmem (const void *__haystack, size_t __haystacklen,
8178 const void *__needle, size_t __needlelen)
8179 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3)));
8180
8181
8182
8183 extern void *__mempcpy (void *__restrict __dest,
8184 const void *__restrict __src, size_t __n)
8185 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8186 extern void *mempcpy (void *__restrict __dest,
8187 const void *__restrict __src, size_t __n)
8188 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8189
8190
8191
8192
8193
8194 extern size_t strlen (const char *__s)
8195 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
8196
8197
8198
8199
8200
8201 extern size_t strnlen (const char *__string, size_t __maxlen)
8202 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
8203
8204
8205
8206
8207
8208 extern char *strerror (int __errnum) __attribute__ ((__nothrow__ , __leaf__));
8209
8210 # 438 "/usr/include/string.h" 3 4
8211 extern char *strerror_r (int __errnum, char *__buf, size_t __buflen)
8212 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
8213
8214
8215
8216
8217
8218 extern char *strerror_l (int __errnum, __locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
8219
8220
8221
8222
8223
8224 extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8225
8226
8227
8228 extern void bcopy (const void *__src, void *__dest, size_t __n)
8229 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8230
8231
8232 extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8233
8234
8235 extern int bcmp (const void *__s1, const void *__s2, size_t __n)
8236 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
8237 # 489 "/usr/include/string.h" 3 4
8238 extern char *index (const char *__s, int __c)
8239 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
8240 # 517 "/usr/include/string.h" 3 4
8241 extern char *rindex (const char *__s, int __c)
8242 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
8243
8244
8245
8246
8247 extern int ffs (int __i) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
8248
8249
8250
8251
8252 extern int ffsl (long int __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
8253 __extension__ extern int ffsll (long long int __ll)
8254 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
8255
8256
8257
8258 extern int strcasecmp (const char *__s1, const char *__s2)
8259 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
8260
8261
8262 extern int strncasecmp (const char *__s1, const char *__s2, size_t __n)
8263 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
8264
8265
8266
8267
8268
8269 extern int strcasecmp_l (const char *__s1, const char *__s2,
8270 __locale_t __loc)
8271 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
8272
8273 extern int strncasecmp_l (const char *__s1, const char *__s2,
8274 size_t __n, __locale_t __loc)
8275 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4)));
8276
8277
8278
8279
8280
8281 extern char *strsep (char **__restrict __stringp,
8282 const char *__restrict __delim)
8283 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8284
8285
8286
8287
8288 extern char *strsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__));
8289
8290
8291 extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src)
8292 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8293 extern char *stpcpy (char *__restrict __dest, const char *__restrict __src)
8294 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8295
8296
8297
8298 extern char *__stpncpy (char *__restrict __dest,
8299 const char *__restrict __src, size_t __n)
8300 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8301 extern char *stpncpy (char *__restrict __dest,
8302 const char *__restrict __src, size_t __n)
8303 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8304
8305
8306
8307
8308 extern int strverscmp (const char *__s1, const char *__s2)
8309 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
8310
8311
8312 extern char *strfry (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8313
8314
8315 extern void *memfrob (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8316 # 604 "/usr/include/string.h" 3 4
8317 extern char *basename (const char *__filename) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8318 # 632 "/usr/include/string.h" 3 4
8319 # 1 "/usr/include/bits/string.h" 1 3 4
8320 # 633 "/usr/include/string.h" 2 3 4
8321
8322
8323 # 1 "/usr/include/bits/string2.h" 1 3 4
8324 # 79 "/usr/include/bits/string2.h" 3 4
8325 typedef struct { unsigned char __arr[2]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR2;
8326 typedef struct { unsigned char __arr[3]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR3;
8327 typedef struct { unsigned char __arr[4]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR4;
8328 typedef struct { unsigned char __arr[5]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR5;
8329 typedef struct { unsigned char __arr[6]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR6;
8330 typedef struct { unsigned char __arr[7]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR7;
8331 typedef struct { unsigned char __arr[8]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR8;
8332 # 393 "/usr/include/bits/string2.h" 3 4
8333 extern void *__rawmemchr (const void *__s, int __c);
8334 # 945 "/usr/include/bits/string2.h" 3 4
8335 extern __inline __attribute__ ((__gnu_inline__)) size_t __strcspn_c1 (const char *__s, int __reject);
8336 extern __inline __attribute__ ((__gnu_inline__)) size_t
8337 __strcspn_c1 (const char *__s, int __reject)
8338 {
8339 size_t __result = 0;
8340 while (__s[__result] != '\0' && __s[__result] != __reject)
8341 ++__result;
8342 return __result;
8343 }
8344
8345 extern __inline __attribute__ ((__gnu_inline__)) size_t __strcspn_c2 (const char *__s, int __reject1,
8346 int __reject2);
8347 extern __inline __attribute__ ((__gnu_inline__)) size_t
8348 __strcspn_c2 (const char *__s, int __reject1, int __reject2)
8349 {
8350 size_t __result = 0;
8351 while (__s[__result] != '\0' && __s[__result] != __reject1
8352 && __s[__result] != __reject2)
8353 ++__result;
8354 return __result;
8355 }
8356
8357 extern __inline __attribute__ ((__gnu_inline__)) size_t __strcspn_c3 (const char *__s, int __reject1,
8358 int __reject2, int __reject3);
8359 extern __inline __attribute__ ((__gnu_inline__)) size_t
8360 __strcspn_c3 (const char *__s, int __reject1, int __reject2,
8361 int __reject3)
8362 {
8363 size_t __result = 0;
8364 while (__s[__result] != '\0' && __s[__result] != __reject1
8365 && __s[__result] != __reject2 && __s[__result] != __reject3)
8366 ++__result;
8367 return __result;
8368 }
8369 # 1021 "/usr/include/bits/string2.h" 3 4
8370 extern __inline __attribute__ ((__gnu_inline__)) size_t __strspn_c1 (const char *__s, int __accept);
8371 extern __inline __attribute__ ((__gnu_inline__)) size_t
8372 __strspn_c1 (const char *__s, int __accept)
8373 {
8374 size_t __result = 0;
8375
8376 while (__s[__result] == __accept)
8377 ++__result;
8378 return __result;
8379 }
8380
8381 extern __inline __attribute__ ((__gnu_inline__)) size_t __strspn_c2 (const char *__s, int __accept1,
8382 int __accept2);
8383 extern __inline __attribute__ ((__gnu_inline__)) size_t
8384 __strspn_c2 (const char *__s, int __accept1, int __accept2)
8385 {
8386 size_t __result = 0;
8387
8388 while (__s[__result] == __accept1 || __s[__result] == __accept2)
8389 ++__result;
8390 return __result;
8391 }
8392
8393 extern __inline __attribute__ ((__gnu_inline__)) size_t __strspn_c3 (const char *__s, int __accept1,
8394 int __accept2, int __accept3);
8395 extern __inline __attribute__ ((__gnu_inline__)) size_t
8396 __strspn_c3 (const char *__s, int __accept1, int __accept2, int __accept3)
8397 {
8398 size_t __result = 0;
8399
8400 while (__s[__result] == __accept1 || __s[__result] == __accept2
8401 || __s[__result] == __accept3)
8402 ++__result;
8403 return __result;
8404 }
8405 # 1097 "/usr/include/bits/string2.h" 3 4
8406 extern __inline __attribute__ ((__gnu_inline__)) char *__strpbrk_c2 (const char *__s, int __accept1,
8407 int __accept2);
8408 extern __inline __attribute__ ((__gnu_inline__)) char *
8409 __strpbrk_c2 (const char *__s, int __accept1, int __accept2)
8410 {
8411
8412 while (*__s != '\0' && *__s != __accept1 && *__s != __accept2)
8413 ++__s;
8414 return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s;
8415 }
8416
8417 extern __inline __attribute__ ((__gnu_inline__)) char *__strpbrk_c3 (const char *__s, int __accept1,
8418 int __accept2, int __accept3);
8419 extern __inline __attribute__ ((__gnu_inline__)) char *
8420 __strpbrk_c3 (const char *__s, int __accept1, int __accept2, int __accept3)
8421 {
8422
8423 while (*__s != '\0' && *__s != __accept1 && *__s != __accept2
8424 && *__s != __accept3)
8425 ++__s;
8426 return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s;
8427 }
8428 # 1147 "/usr/include/bits/string2.h" 3 4
8429 extern __inline __attribute__ ((__gnu_inline__)) char *__strtok_r_1c (char *__s, char __sep, char **__nextp);
8430 extern __inline __attribute__ ((__gnu_inline__)) char *
8431 __strtok_r_1c (char *__s, char __sep, char **__nextp)
8432 {
8433 char *__result;
8434 if (__s == ((void *)0))
8435 __s = *__nextp;
8436 while (*__s == __sep)
8437 ++__s;
8438 __result = ((void *)0);
8439 if (*__s != '\0')
8440 {
8441 __result = __s++;
8442 while (*__s != '\0')
8443 if (*__s++ == __sep)
8444 {
8445 __s[-1] = '\0';
8446 break;
8447 }
8448 }
8449 *__nextp = __s;
8450 return __result;
8451 }
8452 # 1179 "/usr/include/bits/string2.h" 3 4
8453 extern char *__strsep_g (char **__stringp, const char *__delim);
8454 # 1197 "/usr/include/bits/string2.h" 3 4
8455 extern __inline __attribute__ ((__gnu_inline__)) char *__strsep_1c (char **__s, char __reject);
8456 extern __inline __attribute__ ((__gnu_inline__)) char *
8457 __strsep_1c (char **__s, char __reject)
8458 {
8459 char *__retval = *__s;
8460 if (__retval != ((void *)0) && (*__s = (__extension__ (__builtin_constant_p (__reject) && !__builtin_constant_p (__retval) && (__reject) == '\0' ? (char *) __rawmemchr (__retval, __reject) : __builtin_strchr (__retval, __reject)))) != ((void *)0))
8461 *(*__s)++ = '\0';
8462 return __retval;
8463 }
8464
8465 extern __inline __attribute__ ((__gnu_inline__)) char *__strsep_2c (char **__s, char __reject1, char __reject2);
8466 extern __inline __attribute__ ((__gnu_inline__)) char *
8467 __strsep_2c (char **__s, char __reject1, char __reject2)
8468 {
8469 char *__retval = *__s;
8470 if (__retval != ((void *)0))
8471 {
8472 char *__cp = __retval;
8473 while (1)
8474 {
8475 if (*__cp == '\0')
8476 {
8477 __cp = ((void *)0);
8478 break;
8479 }
8480 if (*__cp == __reject1 || *__cp == __reject2)
8481 {
8482 *__cp++ = '\0';
8483 break;
8484 }
8485 ++__cp;
8486 }
8487 *__s = __cp;
8488 }
8489 return __retval;
8490 }
8491
8492 extern __inline __attribute__ ((__gnu_inline__)) char *__strsep_3c (char **__s, char __reject1, char __reject2,
8493 char __reject3);
8494 extern __inline __attribute__ ((__gnu_inline__)) char *
8495 __strsep_3c (char **__s, char __reject1, char __reject2, char __reject3)
8496 {
8497 char *__retval = *__s;
8498 if (__retval != ((void *)0))
8499 {
8500 char *__cp = __retval;
8501 while (1)
8502 {
8503 if (*__cp == '\0')
8504 {
8505 __cp = ((void *)0);
8506 break;
8507 }
8508 if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3)
8509 {
8510 *__cp++ = '\0';
8511 break;
8512 }
8513 ++__cp;
8514 }
8515 *__s = __cp;
8516 }
8517 return __retval;
8518 }
8519 # 1278 "/usr/include/bits/string2.h" 3 4
8520 extern char *__strdup (const char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__));
8521 # 1297 "/usr/include/bits/string2.h" 3 4
8522 extern char *__strndup (const char *__string, size_t __n)
8523 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__));
8524 # 636 "/usr/include/string.h" 2 3 4
8525
8526
8527
8528
8529 # 1 "/usr/include/bits/string3.h" 1 3 4
8530 # 22 "/usr/include/bits/string3.h" 3 4
8531 extern void __warn_memset_zero_len (void) __attribute__((__warning__ ("memset used with constant zero length parameter; this could be due to transposed parameters")))
8532 ;
8533 # 47 "/usr/include/bits/string3.h" 3 4
8534 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
8535 __attribute__ ((__nothrow__ , __leaf__)) memcpy (void *__restrict __dest, const void *__restrict __src, size_t __len)
8536
8537 {
8538 return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
8539 }
8540
8541 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
8542 __attribute__ ((__nothrow__ , __leaf__)) memmove (void *__dest, const void *__src, size_t __len)
8543 {
8544 return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
8545 }
8546
8547
8548 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
8549 __attribute__ ((__nothrow__ , __leaf__)) mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __len)
8550
8551 {
8552 return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
8553 }
8554 # 75 "/usr/include/bits/string3.h" 3 4
8555 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
8556 __attribute__ ((__nothrow__ , __leaf__)) memset (void *__dest, int __ch, size_t __len)
8557 {
8558 if (__builtin_constant_p (__len) && __len == 0
8559 && (!__builtin_constant_p (__ch) || __ch != 0))
8560 {
8561 __warn_memset_zero_len ();
8562 return __dest;
8563 }
8564 return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0));
8565 }
8566
8567
8568 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void
8569 __attribute__ ((__nothrow__ , __leaf__)) bcopy (const void *__src, void *__dest, size_t __len)
8570 {
8571 (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
8572 }
8573
8574 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void
8575 __attribute__ ((__nothrow__ , __leaf__)) bzero (void *__dest, size_t __len)
8576 {
8577 (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0));
8578 }
8579
8580
8581 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
8582 __attribute__ ((__nothrow__ , __leaf__)) strcpy (char *__restrict __dest, const char *__restrict __src)
8583 {
8584 return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
8585 }
8586
8587
8588 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
8589 __attribute__ ((__nothrow__ , __leaf__)) stpcpy (char *__restrict __dest, const char *__restrict __src)
8590 {
8591 return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
8592 }
8593
8594
8595
8596 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
8597 __attribute__ ((__nothrow__ , __leaf__)) strncpy (char *__restrict __dest, const char *__restrict __src, size_t __len)
8598
8599 {
8600 return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1));
8601 }
8602
8603
8604 extern char *__stpncpy_chk (char *__dest, const char *__src, size_t __n,
8605 size_t __destlen) __attribute__ ((__nothrow__ , __leaf__));
8606 extern char *__stpncpy_alias (char *__dest, const char *__src, size_t __n) __asm__ ("" "stpncpy") __attribute__ ((__nothrow__ , __leaf__))
8607 ;
8608
8609 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
8610 __attribute__ ((__nothrow__ , __leaf__)) stpncpy (char *__dest, const char *__src, size_t __n)
8611 {
8612 if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1
8613 && (!__builtin_constant_p (__n) || __n <= __builtin_object_size (__dest, 2 > 1)))
8614 return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1));
8615 return __stpncpy_alias (__dest, __src, __n);
8616 }
8617
8618
8619 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
8620 __attribute__ ((__nothrow__ , __leaf__)) strcat (char *__restrict __dest, const char *__restrict __src)
8621 {
8622 return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
8623 }
8624
8625
8626 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
8627 __attribute__ ((__nothrow__ , __leaf__)) strncat (char *__restrict __dest, const char *__restrict __src, size_t __len)
8628
8629 {
8630 return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1));
8631 }
8632 # 641 "/usr/include/string.h" 2 3 4
8633
8634
8635
8636
8637 # 35 "include/libbb.h" 2
8638
8639
8640 # 1 "/usr/include/libgen.h" 1 3 4
8641 # 23 "/usr/include/libgen.h" 3 4
8642
8643
8644
8645 extern char *dirname (char *__path) __attribute__ ((__nothrow__ , __leaf__));
8646
8647
8648
8649
8650
8651
8652
8653 extern char *__xpg_basename (char *__path) __attribute__ ((__nothrow__ , __leaf__));
8654
8655
8656
8657 # 38 "include/libbb.h" 2
8658
8659
8660 # 1 "/usr/include/sys/poll.h" 1 3 4
8661 # 25 "/usr/include/sys/poll.h" 3 4
8662 # 1 "/usr/include/bits/poll.h" 1 3 4
8663 # 26 "/usr/include/sys/poll.h" 2 3 4
8664
8665
8666 # 1 "/usr/include/bits/sigset.h" 1 3 4
8667 # 29 "/usr/include/sys/poll.h" 2 3 4
8668
8669
8670 # 1 "/usr/include/time.h" 1 3 4
8671 # 32 "/usr/include/sys/poll.h" 2 3 4
8672
8673
8674
8675
8676 typedef unsigned long int nfds_t;
8677
8678
8679 struct pollfd
8680 {
8681 int fd;
8682 short int events;
8683 short int revents;
8684 };
8685
8686
8687
8688 # 57 "/usr/include/sys/poll.h" 3 4
8689 extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout);
8690 # 66 "/usr/include/sys/poll.h" 3 4
8691 extern int ppoll (struct pollfd *__fds, nfds_t __nfds,
8692 const struct timespec *__timeout,
8693 const __sigset_t *__ss);
8694
8695
8696
8697
8698
8699
8700
8701 # 1 "/usr/include/bits/poll2.h" 1 3 4
8702 # 24 "/usr/include/bits/poll2.h" 3 4
8703
8704
8705 extern int __poll_alias (struct pollfd *__fds, nfds_t __nfds, int __timeout) __asm__ ("" "poll")
8706 ;
8707 extern int __poll_chk (struct pollfd *__fds, nfds_t __nfds, int __timeout,
8708 unsigned int __fdslen);
8709 extern int __poll_chk_warn (struct pollfd *__fds, nfds_t __nfds, int __timeout, unsigned int __fdslen) __asm__ ("" "__poll_chk")
8710
8711
8712 __attribute__((__warning__ ("poll called with fds buffer too small file nfds entries")));
8713
8714 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
8715 poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)
8716 {
8717 if (__builtin_object_size (__fds, 2 > 1) != (unsigned int) -1)
8718 {
8719 if (! __builtin_constant_p (__nfds))
8720 return __poll_chk (__fds, __nfds, __timeout, __builtin_object_size (__fds, 2 > 1));
8721 else if (__builtin_object_size (__fds, 2 > 1) / sizeof (*__fds) < __nfds)
8722 return __poll_chk_warn (__fds, __nfds, __timeout, __builtin_object_size (__fds, 2 > 1));
8723 }
8724
8725 return __poll_alias (__fds, __nfds, __timeout);
8726 }
8727
8728
8729
8730 extern int __ppoll_alias (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout, const __sigset_t *__ss) __asm__ ("" "ppoll")
8731
8732 ;
8733 extern int __ppoll_chk (struct pollfd *__fds, nfds_t __nfds,
8734 const struct timespec *__timeout,
8735 const __sigset_t *__ss, unsigned int __fdslen);
8736 extern int __ppoll_chk_warn (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout, const __sigset_t *__ss, unsigned int __fdslen) __asm__ ("" "__ppoll_chk")
8737
8738
8739
8740
8741 __attribute__((__warning__ ("ppoll called with fds buffer too small file nfds entries")));
8742
8743 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
8744 ppoll (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout,
8745 const __sigset_t *__ss)
8746 {
8747 if (__builtin_object_size (__fds, 2 > 1) != (unsigned int) -1)
8748 {
8749 if (! __builtin_constant_p (__nfds))
8750 return __ppoll_chk (__fds, __nfds, __timeout, __ss, __builtin_object_size (__fds, 2 > 1));
8751 else if (__builtin_object_size (__fds, 2 > 1) / sizeof (*__fds) < __nfds)
8752 return __ppoll_chk_warn (__fds, __nfds, __timeout, __ss,
8753 __builtin_object_size (__fds, 2 > 1));
8754 }
8755
8756 return __ppoll_alias (__fds, __nfds, __timeout, __ss);
8757 }
8758
8759
8760
8761 # 77 "/usr/include/sys/poll.h" 2 3 4
8762 # 41 "include/libbb.h" 2
8763 # 1 "/usr/include/sys/ioctl.h" 1 3 4
8764 # 23 "/usr/include/sys/ioctl.h" 3 4
8765
8766
8767
8768 # 1 "/usr/include/bits/ioctls.h" 1 3 4
8769 # 23 "/usr/include/bits/ioctls.h" 3 4
8770 # 1 "/usr/include/asm/ioctls.h" 1 3 4
8771
8772
8773
8774
8775
8776 # 1 "/usr/include/asm-generic/ioctls.h" 1 3 4
8777
8778
8779
8780 # 1 "/usr/include/linux/ioctl.h" 1 3 4
8781
8782
8783
8784 # 1 "/usr/include/asm/ioctl.h" 1 3 4
8785 # 1 "/usr/include/asm-generic/ioctl.h" 1 3 4
8786 # 1 "/usr/include/asm/ioctl.h" 2 3 4
8787 # 5 "/usr/include/linux/ioctl.h" 2 3 4
8788 # 5 "/usr/include/asm-generic/ioctls.h" 2 3 4
8789 # 7 "/usr/include/asm/ioctls.h" 2 3 4
8790 # 24 "/usr/include/bits/ioctls.h" 2 3 4
8791 # 27 "/usr/include/sys/ioctl.h" 2 3 4
8792
8793
8794 # 1 "/usr/include/bits/ioctl-types.h" 1 3 4
8795 # 27 "/usr/include/bits/ioctl-types.h" 3 4
8796 struct winsize
8797 {
8798 unsigned short int ws_row;
8799 unsigned short int ws_col;
8800 unsigned short int ws_xpixel;
8801 unsigned short int ws_ypixel;
8802 };
8803
8804
8805 struct termio
8806 {
8807 unsigned short int c_iflag;
8808 unsigned short int c_oflag;
8809 unsigned short int c_cflag;
8810 unsigned short int c_lflag;
8811 unsigned char c_line;
8812 unsigned char c_cc[8];
8813 };
8814 # 30 "/usr/include/sys/ioctl.h" 2 3 4
8815
8816
8817
8818
8819
8820
8821 # 1 "/usr/include/sys/ttydefaults.h" 1 3 4
8822 # 37 "/usr/include/sys/ioctl.h" 2 3 4
8823
8824
8825
8826
8827 extern int ioctl (int __fd, unsigned long int __request, ...) __attribute__ ((__nothrow__ , __leaf__));
8828
8829
8830 # 42 "include/libbb.h" 2
8831 # 1 "/usr/include/sys/mman.h" 1 3 4
8832 # 25 "/usr/include/sys/mman.h" 3 4
8833 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stddef.h" 1 3 4
8834 # 26 "/usr/include/sys/mman.h" 2 3 4
8835 # 41 "/usr/include/sys/mman.h" 3 4
8836 # 1 "/usr/include/bits/mman.h" 1 3 4
8837 # 40 "/usr/include/bits/mman.h" 3 4
8838 # 1 "/usr/include/bits/mman-linux.h" 1 3 4
8839 # 40 "/usr/include/bits/mman.h" 2 3 4
8840 # 42 "/usr/include/sys/mman.h" 2 3 4
8841
8842
8843
8844
8845
8846 # 61 "/usr/include/sys/mman.h" 3 4
8847 extern void * mmap (void *__addr, size_t __len, int __prot, int __flags, int __fd, __off64_t __offset) __asm__ ("" "mmap64") __attribute__ ((__nothrow__ , __leaf__))
8848
8849
8850 ;
8851
8852
8853
8854
8855
8856 extern void *mmap64 (void *__addr, size_t __len, int __prot,
8857 int __flags, int __fd, __off64_t __offset) __attribute__ ((__nothrow__ , __leaf__));
8858
8859
8860
8861
8862 extern int munmap (void *__addr, size_t __len) __attribute__ ((__nothrow__ , __leaf__));
8863
8864
8865
8866
8867 extern int mprotect (void *__addr, size_t __len, int __prot) __attribute__ ((__nothrow__ , __leaf__));
8868
8869
8870
8871
8872
8873
8874
8875 extern int msync (void *__addr, size_t __len, int __flags);
8876
8877
8878
8879
8880 extern int madvise (void *__addr, size_t __len, int __advice) __attribute__ ((__nothrow__ , __leaf__));
8881
8882
8883
8884 extern int posix_madvise (void *__addr, size_t __len, int __advice) __attribute__ ((__nothrow__ , __leaf__));
8885
8886
8887
8888
8889 extern int mlock (const void *__addr, size_t __len) __attribute__ ((__nothrow__ , __leaf__));
8890
8891
8892 extern int munlock (const void *__addr, size_t __len) __attribute__ ((__nothrow__ , __leaf__));
8893
8894
8895
8896
8897 extern int mlockall (int __flags) __attribute__ ((__nothrow__ , __leaf__));
8898
8899
8900
8901 extern int munlockall (void) __attribute__ ((__nothrow__ , __leaf__));
8902
8903
8904
8905
8906
8907
8908
8909 extern int mincore (void *__start, size_t __len, unsigned char *__vec)
8910 __attribute__ ((__nothrow__ , __leaf__));
8911 # 133 "/usr/include/sys/mman.h" 3 4
8912 extern void *mremap (void *__addr, size_t __old_len, size_t __new_len,
8913 int __flags, ...) __attribute__ ((__nothrow__ , __leaf__));
8914
8915
8916
8917 extern int remap_file_pages (void *__start, size_t __size, int __prot,
8918 size_t __pgoff, int __flags) __attribute__ ((__nothrow__ , __leaf__));
8919
8920
8921
8922
8923 extern int shm_open (const char *__name, int __oflag, mode_t __mode);
8924
8925
8926 extern int shm_unlink (const char *__name);
8927
8928
8929 # 43 "include/libbb.h" 2
8930
8931 # 1 "/usr/include/sys/stat.h" 1 3 4
8932 # 37 "/usr/include/sys/stat.h" 3 4
8933 # 1 "/usr/include/time.h" 1 3 4
8934 # 38 "/usr/include/sys/stat.h" 2 3 4
8935 # 103 "/usr/include/sys/stat.h" 3 4
8936
8937
8938 # 1 "/usr/include/bits/stat.h" 1 3 4
8939 # 106 "/usr/include/sys/stat.h" 2 3 4
8940 # 217 "/usr/include/sys/stat.h" 3 4
8941 extern int stat (const char *__restrict __file, struct stat *__restrict __buf) __asm__ ("" "stat64") __attribute__ ((__nothrow__ , __leaf__))
8942
8943 __attribute__ ((__nonnull__ (1, 2)));
8944 extern int fstat (int __fd, struct stat *__buf) __asm__ ("" "fstat64") __attribute__ ((__nothrow__ , __leaf__))
8945 __attribute__ ((__nonnull__ (2)));
8946
8947
8948
8949
8950
8951
8952 extern int stat64 (const char *__restrict __file,
8953 struct stat64 *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8954 extern int fstat64 (int __fd, struct stat64 *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
8955 # 243 "/usr/include/sys/stat.h" 3 4
8956 extern int fstatat (int __fd, const char *__restrict __file, struct stat *__restrict __buf, int __flag) __asm__ ("" "fstatat64") __attribute__ ((__nothrow__ , __leaf__))
8957
8958
8959 __attribute__ ((__nonnull__ (2, 3)));
8960
8961
8962
8963
8964
8965
8966 extern int fstatat64 (int __fd, const char *__restrict __file,
8967 struct stat64 *__restrict __buf, int __flag)
8968 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
8969 # 267 "/usr/include/sys/stat.h" 3 4
8970 extern int lstat (const char *__restrict __file, struct stat *__restrict __buf) __asm__ ("" "lstat64") __attribute__ ((__nothrow__ , __leaf__))
8971
8972
8973 __attribute__ ((__nonnull__ (1, 2)));
8974
8975
8976
8977
8978
8979 extern int lstat64 (const char *__restrict __file,
8980 struct stat64 *__restrict __buf)
8981 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8982
8983
8984
8985
8986
8987 extern int chmod (const char *__file, __mode_t __mode)
8988 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8989
8990
8991
8992
8993
8994 extern int lchmod (const char *__file, __mode_t __mode)
8995 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8996
8997
8998
8999
9000 extern int fchmod (int __fd, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__));
9001
9002
9003
9004
9005
9006 extern int fchmodat (int __fd, const char *__file, __mode_t __mode,
9007 int __flag)
9008 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
9009
9010
9011
9012
9013
9014
9015 extern __mode_t umask (__mode_t __mask) __attribute__ ((__nothrow__ , __leaf__));
9016
9017
9018
9019
9020 extern __mode_t getumask (void) __attribute__ ((__nothrow__ , __leaf__));
9021
9022
9023
9024 extern int mkdir (const char *__path, __mode_t __mode)
9025 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9026
9027
9028
9029
9030
9031 extern int mkdirat (int __fd, const char *__path, __mode_t __mode)
9032 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
9033
9034
9035
9036
9037
9038
9039 extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev)
9040 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9041
9042
9043
9044
9045
9046 extern int mknodat (int __fd, const char *__path, __mode_t __mode,
9047 __dev_t __dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
9048
9049
9050
9051
9052
9053 extern int mkfifo (const char *__path, __mode_t __mode)
9054 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9055
9056
9057
9058
9059
9060 extern int mkfifoat (int __fd, const char *__path, __mode_t __mode)
9061 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
9062
9063
9064
9065
9066
9067 extern int utimensat (int __fd, const char *__path,
9068 const struct timespec __times[2],
9069 int __flags)
9070 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
9071
9072
9073
9074
9075 extern int futimens (int __fd, const struct timespec __times[2]) __attribute__ ((__nothrow__ , __leaf__));
9076 # 410 "/usr/include/sys/stat.h" 3 4
9077 extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf) __asm__ ("" "__fxstat64") __attribute__ ((__nothrow__ , __leaf__))
9078
9079 __attribute__ ((__nonnull__ (3)));
9080 extern int __xstat (int __ver, const char *__filename, struct stat *__stat_buf) __asm__ ("" "__xstat64") __attribute__ ((__nothrow__ , __leaf__))
9081
9082 __attribute__ ((__nonnull__ (2, 3)));
9083 extern int __lxstat (int __ver, const char *__filename, struct stat *__stat_buf) __asm__ ("" "__lxstat64") __attribute__ ((__nothrow__ , __leaf__))
9084
9085 __attribute__ ((__nonnull__ (2, 3)));
9086 extern int __fxstatat (int __ver, int __fildes, const char *__filename, struct stat *__stat_buf, int __flag) __asm__ ("" "__fxstatat64") __attribute__ ((__nothrow__ , __leaf__))
9087
9088
9089 __attribute__ ((__nonnull__ (3, 4)));
9090 # 432 "/usr/include/sys/stat.h" 3 4
9091 extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf)
9092 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
9093 extern int __xstat64 (int __ver, const char *__filename,
9094 struct stat64 *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
9095 extern int __lxstat64 (int __ver, const char *__filename,
9096 struct stat64 *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
9097 extern int __fxstatat64 (int __ver, int __fildes, const char *__filename,
9098 struct stat64 *__stat_buf, int __flag)
9099 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4)));
9100
9101 extern int __xmknod (int __ver, const char *__path, __mode_t __mode,
9102 __dev_t *__dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)));
9103
9104 extern int __xmknodat (int __ver, int __fd, const char *__path,
9105 __mode_t __mode, __dev_t *__dev)
9106 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 5)));
9107
9108
9109
9110
9111 extern __inline __attribute__ ((__gnu_inline__)) int
9112 __attribute__ ((__nothrow__ , __leaf__)) stat (const char *__path, struct stat *__statbuf)
9113 {
9114 return __xstat (3, __path, __statbuf);
9115 }
9116
9117
9118 extern __inline __attribute__ ((__gnu_inline__)) int
9119 __attribute__ ((__nothrow__ , __leaf__)) lstat (const char *__path, struct stat *__statbuf)
9120 {
9121 return __lxstat (3, __path, __statbuf);
9122 }
9123
9124
9125 extern __inline __attribute__ ((__gnu_inline__)) int
9126 __attribute__ ((__nothrow__ , __leaf__)) fstat (int __fd, struct stat *__statbuf)
9127 {
9128 return __fxstat (3, __fd, __statbuf);
9129 }
9130
9131
9132 extern __inline __attribute__ ((__gnu_inline__)) int
9133 __attribute__ ((__nothrow__ , __leaf__)) fstatat (int __fd, const char *__filename, struct stat *__statbuf, int __flag)
9134
9135 {
9136 return __fxstatat (3, __fd, __filename, __statbuf, __flag);
9137 }
9138
9139
9140
9141 extern __inline __attribute__ ((__gnu_inline__)) int
9142 __attribute__ ((__nothrow__ , __leaf__)) mknod (const char *__path, __mode_t __mode, __dev_t __dev)
9143 {
9144 return __xmknod (1, __path, __mode, &__dev);
9145 }
9146
9147
9148
9149 extern __inline __attribute__ ((__gnu_inline__)) int
9150 __attribute__ ((__nothrow__ , __leaf__)) mknodat (int __fd, const char *__path, __mode_t __mode, __dev_t __dev)
9151
9152 {
9153 return __xmknodat (1, __fd, __path, __mode, &__dev);
9154 }
9155
9156
9157
9158
9159
9160 extern __inline __attribute__ ((__gnu_inline__)) int
9161 __attribute__ ((__nothrow__ , __leaf__)) stat64 (const char *__path, struct stat64 *__statbuf)
9162 {
9163 return __xstat64 (3, __path, __statbuf);
9164 }
9165
9166
9167 extern __inline __attribute__ ((__gnu_inline__)) int
9168 __attribute__ ((__nothrow__ , __leaf__)) lstat64 (const char *__path, struct stat64 *__statbuf)
9169 {
9170 return __lxstat64 (3, __path, __statbuf);
9171 }
9172
9173
9174 extern __inline __attribute__ ((__gnu_inline__)) int
9175 __attribute__ ((__nothrow__ , __leaf__)) fstat64 (int __fd, struct stat64 *__statbuf)
9176 {
9177 return __fxstat64 (3, __fd, __statbuf);
9178 }
9179
9180
9181 extern __inline __attribute__ ((__gnu_inline__)) int
9182 __attribute__ ((__nothrow__ , __leaf__)) fstatat64 (int __fd, const char *__filename, struct stat64 *__statbuf, int __flag)
9183
9184 {
9185 return __fxstatat64 (3, __fd, __filename, __statbuf, __flag);
9186 }
9187
9188
9189
9190
9191
9192
9193
9194 # 45 "include/libbb.h" 2
9195 # 1 "/usr/include/sys/time.h" 1 3 4
9196 # 25 "/usr/include/sys/time.h" 3 4
9197 # 1 "/usr/include/time.h" 1 3 4
9198 # 26 "/usr/include/sys/time.h" 2 3 4
9199
9200 # 1 "/usr/include/bits/time.h" 1 3 4
9201 # 28 "/usr/include/sys/time.h" 2 3 4
9202 # 37 "/usr/include/sys/time.h" 3 4
9203
9204 # 55 "/usr/include/sys/time.h" 3 4
9205 struct timezone
9206 {
9207 int tz_minuteswest;
9208 int tz_dsttime;
9209 };
9210
9211 typedef struct timezone *__restrict __timezone_ptr_t;
9212 # 71 "/usr/include/sys/time.h" 3 4
9213 extern int gettimeofday (struct timeval *__restrict __tv,
9214 __timezone_ptr_t __tz) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9215
9216
9217
9218
9219 extern int settimeofday (const struct timeval *__tv,
9220 const struct timezone *__tz)
9221 __attribute__ ((__nothrow__ , __leaf__));
9222
9223
9224
9225
9226
9227 extern int adjtime (const struct timeval *__delta,
9228 struct timeval *__olddelta) __attribute__ ((__nothrow__ , __leaf__));
9229
9230
9231
9232
9233 enum __itimer_which
9234 {
9235
9236 ITIMER_REAL = 0,
9237
9238
9239 ITIMER_VIRTUAL = 1,
9240
9241
9242
9243 ITIMER_PROF = 2
9244
9245 };
9246
9247
9248
9249 struct itimerval
9250 {
9251
9252 struct timeval it_interval;
9253
9254 struct timeval it_value;
9255 };
9256
9257
9258
9259
9260 typedef enum __itimer_which __itimer_which_t;
9261
9262
9263
9264
9265
9266
9267 extern int getitimer (__itimer_which_t __which,
9268 struct itimerval *__value) __attribute__ ((__nothrow__ , __leaf__));
9269
9270
9271
9272
9273 extern int setitimer (__itimer_which_t __which,
9274 const struct itimerval *__restrict __new,
9275 struct itimerval *__restrict __old) __attribute__ ((__nothrow__ , __leaf__));
9276
9277
9278
9279
9280 extern int utimes (const char *__file, const struct timeval __tvp[2])
9281 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9282
9283
9284
9285 extern int lutimes (const char *__file, const struct timeval __tvp[2])
9286 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9287
9288
9289 extern int futimes (int __fd, const struct timeval __tvp[2]) __attribute__ ((__nothrow__ , __leaf__));
9290
9291
9292
9293
9294
9295
9296 extern int futimesat (int __fd, const char *__file,
9297 const struct timeval __tvp[2]) __attribute__ ((__nothrow__ , __leaf__));
9298 # 189 "/usr/include/sys/time.h" 3 4
9299
9300 # 46 "include/libbb.h" 2
9301
9302
9303
9304
9305 # 1 "/usr/include/sys/wait.h" 1 3 4
9306 # 27 "/usr/include/sys/wait.h" 3 4
9307
9308 # 99 "/usr/include/sys/wait.h" 3 4
9309 typedef enum
9310 {
9311 P_ALL,
9312 P_PID,
9313 P_PGID
9314 } idtype_t;
9315 # 113 "/usr/include/sys/wait.h" 3 4
9316 extern __pid_t wait (__WAIT_STATUS __stat_loc);
9317 # 136 "/usr/include/sys/wait.h" 3 4
9318 extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options);
9319 # 146 "/usr/include/sys/wait.h" 3 4
9320 # 1 "/usr/include/bits/siginfo.h" 1 3 4
9321 # 24 "/usr/include/bits/siginfo.h" 3 4
9322 # 1 "/usr/include/bits/wordsize.h" 1 3 4
9323 # 25 "/usr/include/bits/siginfo.h" 2 3 4
9324 # 147 "/usr/include/sys/wait.h" 2 3 4
9325 # 159 "/usr/include/sys/wait.h" 3 4
9326 extern int waitid (idtype_t __idtype, __id_t __id, siginfo_t *__infop,
9327 int __options);
9328
9329
9330
9331
9332
9333 struct rusage;
9334
9335
9336
9337
9338
9339
9340 extern __pid_t wait3 (__WAIT_STATUS __stat_loc, int __options,
9341 struct rusage * __usage) __attribute__ ((__nothrow__));
9342
9343
9344
9345
9346 extern __pid_t wait4 (__pid_t __pid, __WAIT_STATUS __stat_loc, int __options,
9347 struct rusage *__usage) __attribute__ ((__nothrow__));
9348
9349
9350
9351
9352 # 51 "include/libbb.h" 2
9353 # 1 "/usr/include/termios.h" 1 3 4
9354 # 35 "/usr/include/termios.h" 3 4
9355
9356
9357
9358
9359 # 1 "/usr/include/bits/termios.h" 1 3 4
9360 # 23 "/usr/include/bits/termios.h" 3 4
9361 typedef unsigned char cc_t;
9362 typedef unsigned int speed_t;
9363 typedef unsigned int tcflag_t;
9364
9365
9366 struct termios
9367 {
9368 tcflag_t c_iflag;
9369 tcflag_t c_oflag;
9370 tcflag_t c_cflag;
9371 tcflag_t c_lflag;
9372 cc_t c_line;
9373 cc_t c_cc[32];
9374 speed_t c_ispeed;
9375 speed_t c_ospeed;
9376
9377
9378 };
9379 # 40 "/usr/include/termios.h" 2 3 4
9380 # 48 "/usr/include/termios.h" 3 4
9381 extern speed_t cfgetospeed (const struct termios *__termios_p) __attribute__ ((__nothrow__ , __leaf__));
9382
9383
9384 extern speed_t cfgetispeed (const struct termios *__termios_p) __attribute__ ((__nothrow__ , __leaf__));
9385
9386
9387 extern int cfsetospeed (struct termios *__termios_p, speed_t __speed) __attribute__ ((__nothrow__ , __leaf__));
9388
9389
9390 extern int cfsetispeed (struct termios *__termios_p, speed_t __speed) __attribute__ ((__nothrow__ , __leaf__));
9391
9392
9393
9394 extern int cfsetspeed (struct termios *__termios_p, speed_t __speed) __attribute__ ((__nothrow__ , __leaf__));
9395
9396
9397
9398
9399 extern int tcgetattr (int __fd, struct termios *__termios_p) __attribute__ ((__nothrow__ , __leaf__));
9400
9401
9402
9403 extern int tcsetattr (int __fd, int __optional_actions,
9404 const struct termios *__termios_p) __attribute__ ((__nothrow__ , __leaf__));
9405
9406
9407
9408
9409 extern void cfmakeraw (struct termios *__termios_p) __attribute__ ((__nothrow__ , __leaf__));
9410
9411
9412
9413 extern int tcsendbreak (int __fd, int __duration) __attribute__ ((__nothrow__ , __leaf__));
9414
9415
9416
9417
9418
9419 extern int tcdrain (int __fd);
9420
9421
9422
9423 extern int tcflush (int __fd, int __queue_selector) __attribute__ ((__nothrow__ , __leaf__));
9424
9425
9426
9427 extern int tcflow (int __fd, int __action) __attribute__ ((__nothrow__ , __leaf__));
9428
9429
9430
9431
9432 extern __pid_t tcgetsid (int __fd) __attribute__ ((__nothrow__ , __leaf__));
9433
9434
9435
9436
9437 # 1 "/usr/include/sys/ttydefaults.h" 1 3 4
9438 # 105 "/usr/include/termios.h" 2 3 4
9439
9440
9441
9442 # 52 "include/libbb.h" 2
9443 # 1 "/usr/include/time.h" 1 3 4
9444 # 29 "/usr/include/time.h" 3 4
9445
9446
9447
9448
9449
9450
9451
9452
9453 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stddef.h" 1 3 4
9454 # 38 "/usr/include/time.h" 2 3 4
9455
9456
9457
9458 # 1 "/usr/include/bits/time.h" 1 3 4
9459 # 86 "/usr/include/bits/time.h" 3 4
9460 # 1 "/usr/include/bits/timex.h" 1 3 4
9461 # 25 "/usr/include/bits/timex.h" 3 4
9462 struct timex
9463 {
9464 unsigned int modes;
9465 __syscall_slong_t offset;
9466 __syscall_slong_t freq;
9467 __syscall_slong_t maxerror;
9468 __syscall_slong_t esterror;
9469 int status;
9470 __syscall_slong_t constant;
9471 __syscall_slong_t precision;
9472 __syscall_slong_t tolerance;
9473 struct timeval time;
9474 __syscall_slong_t tick;
9475 __syscall_slong_t ppsfreq;
9476 __syscall_slong_t jitter;
9477 int shift;
9478 __syscall_slong_t stabil;
9479 __syscall_slong_t jitcnt;
9480 __syscall_slong_t calcnt;
9481 __syscall_slong_t errcnt;
9482 __syscall_slong_t stbcnt;
9483
9484 int tai;
9485
9486
9487 int :32; int :32; int :32; int :32;
9488 int :32; int :32; int :32; int :32;
9489 int :32; int :32; int :32;
9490 };
9491 # 87 "/usr/include/bits/time.h" 2 3 4
9492
9493
9494
9495
9496 extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __attribute__ ((__nothrow__ , __leaf__));
9497
9498
9499 # 42 "/usr/include/time.h" 2 3 4
9500 # 131 "/usr/include/time.h" 3 4
9501
9502
9503 struct tm
9504 {
9505 int tm_sec;
9506 int tm_min;
9507 int tm_hour;
9508 int tm_mday;
9509 int tm_mon;
9510 int tm_year;
9511 int tm_wday;
9512 int tm_yday;
9513 int tm_isdst;
9514
9515
9516 long int tm_gmtoff;
9517 const char *tm_zone;
9518
9519
9520
9521
9522 };
9523
9524
9525
9526
9527
9528
9529
9530
9531 struct itimerspec
9532 {
9533 struct timespec it_interval;
9534 struct timespec it_value;
9535 };
9536
9537
9538 struct sigevent;
9539 # 186 "/usr/include/time.h" 3 4
9540
9541
9542
9543 extern clock_t clock (void) __attribute__ ((__nothrow__ , __leaf__));
9544
9545
9546 extern time_t time (time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
9547
9548
9549 extern double difftime (time_t __time1, time_t __time0)
9550 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
9551
9552
9553 extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
9554
9555
9556
9557
9558
9559 extern size_t strftime (char *__restrict __s, size_t __maxsize,
9560 const char *__restrict __format,
9561 const struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
9562
9563
9564
9565
9566
9567 extern char *strptime (const char *__restrict __s,
9568 const char *__restrict __fmt, struct tm *__tp)
9569 __attribute__ ((__nothrow__ , __leaf__));
9570
9571
9572
9573
9574
9575
9576
9577 extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
9578 const char *__restrict __format,
9579 const struct tm *__restrict __tp,
9580 __locale_t __loc) __attribute__ ((__nothrow__ , __leaf__));
9581
9582
9583
9584 extern char *strptime_l (const char *__restrict __s,
9585 const char *__restrict __fmt, struct tm *__tp,
9586 __locale_t __loc) __attribute__ ((__nothrow__ , __leaf__));
9587
9588
9589
9590
9591
9592
9593 extern struct tm *gmtime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
9594
9595
9596
9597 extern struct tm *localtime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
9598
9599
9600
9601
9602
9603 extern struct tm *gmtime_r (const time_t *__restrict __timer,
9604 struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
9605
9606
9607
9608 extern struct tm *localtime_r (const time_t *__restrict __timer,
9609 struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
9610
9611
9612
9613
9614
9615 extern char *asctime (const struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
9616
9617
9618 extern char *ctime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
9619
9620
9621
9622
9623
9624
9625
9626 extern char *asctime_r (const struct tm *__restrict __tp,
9627 char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
9628
9629
9630 extern char *ctime_r (const time_t *__restrict __timer,
9631 char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
9632
9633
9634
9635
9636 extern char *__tzname[2];
9637 extern int __daylight;
9638 extern long int __timezone;
9639
9640
9641
9642
9643 extern char *tzname[2];
9644
9645
9646
9647 extern void tzset (void) __attribute__ ((__nothrow__ , __leaf__));
9648
9649
9650
9651 extern int daylight;
9652 extern long int timezone;
9653
9654
9655
9656
9657
9658 extern int stime (const time_t *__when) __attribute__ ((__nothrow__ , __leaf__));
9659 # 319 "/usr/include/time.h" 3 4
9660 extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
9661
9662
9663 extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
9664
9665
9666 extern int dysize (int __year) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
9667 # 334 "/usr/include/time.h" 3 4
9668 extern int nanosleep (const struct timespec *__requested_time,
9669 struct timespec *__remaining);
9670
9671
9672
9673 extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__ , __leaf__));
9674
9675
9676 extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__ , __leaf__));
9677
9678
9679 extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)
9680 __attribute__ ((__nothrow__ , __leaf__));
9681
9682
9683
9684
9685
9686
9687 extern int clock_nanosleep (clockid_t __clock_id, int __flags,
9688 const struct timespec *__req,
9689 struct timespec *__rem);
9690
9691
9692 extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__ , __leaf__));
9693
9694
9695
9696
9697 extern int timer_create (clockid_t __clock_id,
9698 struct sigevent *__restrict __evp,
9699 timer_t *__restrict __timerid) __attribute__ ((__nothrow__ , __leaf__));
9700
9701
9702 extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__));
9703
9704
9705 extern int timer_settime (timer_t __timerid, int __flags,
9706 const struct itimerspec *__restrict __value,
9707 struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__ , __leaf__));
9708
9709
9710 extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
9711 __attribute__ ((__nothrow__ , __leaf__));
9712
9713
9714 extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__));
9715
9716
9717
9718
9719
9720 extern int timespec_get (struct timespec *__ts, int __base)
9721 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9722 # 403 "/usr/include/time.h" 3 4
9723 extern int getdate_err;
9724 # 412 "/usr/include/time.h" 3 4
9725 extern struct tm *getdate (const char *__string);
9726 # 426 "/usr/include/time.h" 3 4
9727 extern int getdate_r (const char *__restrict __string,
9728 struct tm *__restrict __resbufp);
9729
9730
9731
9732 # 53 "include/libbb.h" 2
9733 # 1 "/usr/include/sys/param.h" 1 3 4
9734 # 23 "/usr/include/sys/param.h" 3 4
9735 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stddef.h" 1 3 4
9736 # 24 "/usr/include/sys/param.h" 2 3 4
9737
9738
9739 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include-fixed/limits.h" 1 3 4
9740 # 27 "/usr/include/sys/param.h" 2 3 4
9741
9742
9743
9744
9745 # 1 "/usr/include/bits/param.h" 1 3 4
9746 # 28 "/usr/include/bits/param.h" 3 4
9747 # 1 "/usr/include/linux/param.h" 1 3 4
9748
9749
9750
9751 # 1 "/usr/include/asm/param.h" 1 3 4
9752 # 1 "/usr/include/asm-generic/param.h" 1 3 4
9753 # 1 "/usr/include/asm/param.h" 2 3 4
9754 # 5 "/usr/include/linux/param.h" 2 3 4
9755 # 29 "/usr/include/bits/param.h" 2 3 4
9756 # 32 "/usr/include/sys/param.h" 2 3 4
9757 # 54 "include/libbb.h" 2
9758 # 1 "/usr/include/pwd.h" 1 3 4
9759 # 27 "/usr/include/pwd.h" 3 4
9760
9761
9762
9763
9764
9765 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stddef.h" 1 3 4
9766 # 33 "/usr/include/pwd.h" 2 3 4
9767 # 49 "/usr/include/pwd.h" 3 4
9768 struct passwd
9769 {
9770 char *pw_name;
9771 char *pw_passwd;
9772 __uid_t pw_uid;
9773 __gid_t pw_gid;
9774 char *pw_gecos;
9775 char *pw_dir;
9776 char *pw_shell;
9777 };
9778 # 72 "/usr/include/pwd.h" 3 4
9779 extern void setpwent (void);
9780
9781
9782
9783
9784
9785 extern void endpwent (void);
9786
9787
9788
9789
9790
9791 extern struct passwd *getpwent (void);
9792 # 94 "/usr/include/pwd.h" 3 4
9793 extern struct passwd *fgetpwent (FILE *__stream);
9794
9795
9796
9797
9798
9799
9800
9801 extern int putpwent (const struct passwd *__restrict __p,
9802 FILE *__restrict __f);
9803
9804
9805
9806
9807
9808
9809 extern struct passwd *getpwuid (__uid_t __uid);
9810
9811
9812
9813
9814
9815 extern struct passwd *getpwnam (const char *__name);
9816 # 139 "/usr/include/pwd.h" 3 4
9817 extern int getpwent_r (struct passwd *__restrict __resultbuf,
9818 char *__restrict __buffer, size_t __buflen,
9819 struct passwd **__restrict __result);
9820
9821
9822 extern int getpwuid_r (__uid_t __uid,
9823 struct passwd *__restrict __resultbuf,
9824 char *__restrict __buffer, size_t __buflen,
9825 struct passwd **__restrict __result);
9826
9827 extern int getpwnam_r (const char *__restrict __name,
9828 struct passwd *__restrict __resultbuf,
9829 char *__restrict __buffer, size_t __buflen,
9830 struct passwd **__restrict __result);
9831 # 163 "/usr/include/pwd.h" 3 4
9832 extern int fgetpwent_r (FILE *__restrict __stream,
9833 struct passwd *__restrict __resultbuf,
9834 char *__restrict __buffer, size_t __buflen,
9835 struct passwd **__restrict __result);
9836 # 180 "/usr/include/pwd.h" 3 4
9837 extern int getpw (__uid_t __uid, char *__buffer);
9838
9839
9840
9841 # 55 "include/libbb.h" 2
9842 # 1 "/usr/include/grp.h" 1 3 4
9843 # 27 "/usr/include/grp.h" 3 4
9844
9845
9846
9847
9848
9849 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stddef.h" 1 3 4
9850 # 33 "/usr/include/grp.h" 2 3 4
9851 # 42 "/usr/include/grp.h" 3 4
9852 struct group
9853 {
9854 char *gr_name;
9855 char *gr_passwd;
9856 __gid_t gr_gid;
9857 char **gr_mem;
9858 };
9859 # 62 "/usr/include/grp.h" 3 4
9860 extern void setgrent (void);
9861 # 71 "/usr/include/grp.h" 3 4
9862 extern void endgrent (void);
9863
9864
9865
9866
9867
9868 extern struct group *getgrent (void);
9869 # 87 "/usr/include/grp.h" 3 4
9870 extern struct group *fgetgrent (FILE *__stream);
9871 # 97 "/usr/include/grp.h" 3 4
9872 extern int putgrent (const struct group *__restrict __p,
9873 FILE *__restrict __f);
9874
9875
9876
9877
9878
9879
9880 extern struct group *getgrgid (__gid_t __gid);
9881
9882
9883
9884
9885
9886 extern struct group *getgrnam (const char *__name);
9887 # 135 "/usr/include/grp.h" 3 4
9888 extern int getgrent_r (struct group *__restrict __resultbuf,
9889 char *__restrict __buffer, size_t __buflen,
9890 struct group **__restrict __result);
9891
9892
9893
9894
9895
9896
9897 extern int getgrgid_r (__gid_t __gid, struct group *__restrict __resultbuf,
9898 char *__restrict __buffer, size_t __buflen,
9899 struct group **__restrict __result);
9900
9901
9902
9903
9904
9905 extern int getgrnam_r (const char *__restrict __name,
9906 struct group *__restrict __resultbuf,
9907 char *__restrict __buffer, size_t __buflen,
9908 struct group **__restrict __result);
9909 # 165 "/usr/include/grp.h" 3 4
9910 extern int fgetgrent_r (FILE *__restrict __stream,
9911 struct group *__restrict __resultbuf,
9912 char *__restrict __buffer, size_t __buflen,
9913 struct group **__restrict __result);
9914 # 177 "/usr/include/grp.h" 3 4
9915 # 1 "/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.8.3/include/stddef.h" 1 3 4
9916 # 178 "/usr/include/grp.h" 2 3 4
9917
9918
9919 extern int setgroups (size_t __n, const __gid_t *__groups) __attribute__ ((__nothrow__ , __leaf__));
9920 # 190 "/usr/include/grp.h" 3 4
9921 extern int getgrouplist (const char *__user, __gid_t __group,
9922 __gid_t *__groups, int *__ngroups);
9923 # 201 "/usr/include/grp.h" 3 4
9924 extern int initgroups (const char *__user, __gid_t __group);
9925
9926
9927
9928
9929 # 56 "include/libbb.h" 2
9930 # 69 "include/libbb.h"
9931 # 1 "/usr/include/mntent.h" 1 3 4
9932 # 25 "/usr/include/mntent.h" 3 4
9933 # 1 "/usr/include/paths.h" 1 3 4
9934 # 26 "/usr/include/mntent.h" 2 3 4
9935 # 50 "/usr/include/mntent.h" 3 4
9936
9937
9938
9939 struct mntent
9940 {
9941 char *mnt_fsname;
9942 char *mnt_dir;
9943 char *mnt_type;
9944 char *mnt_opts;
9945 int mnt_freq;
9946 int mnt_passno;
9947 };
9948
9949
9950
9951
9952 extern FILE *setmntent (const char *__file, const char *__mode) __attribute__ ((__nothrow__ , __leaf__));
9953
9954
9955
9956
9957 extern struct mntent *getmntent (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
9958
9959
9960
9961 extern struct mntent *getmntent_r (FILE *__restrict __stream,
9962 struct mntent *__restrict __result,
9963 char *__restrict __buffer,
9964 int __bufsize) __attribute__ ((__nothrow__ , __leaf__));
9965
9966
9967
9968
9969 extern int addmntent (FILE *__restrict __stream,
9970 const struct mntent *__restrict __mnt) __attribute__ ((__nothrow__ , __leaf__));
9971
9972
9973 extern int endmntent (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
9974
9975
9976
9977 extern char *hasmntopt (const struct mntent *__mnt,
9978 const char *__opt) __attribute__ ((__nothrow__ , __leaf__));
9979
9980
9981
9982 # 70 "include/libbb.h" 2
9983
9984
9985 # 1 "/usr/include/sys/statfs.h" 1 3 4
9986 # 25 "/usr/include/sys/statfs.h" 3 4
9987 # 1 "/usr/include/bits/statfs.h" 1 3 4
9988 # 24 "/usr/include/bits/statfs.h" 3 4
9989 struct statfs
9990 {
9991 __fsword_t f_type;
9992 __fsword_t f_bsize;
9993
9994
9995
9996
9997
9998
9999
10000 __fsblkcnt64_t f_blocks;
10001 __fsblkcnt64_t f_bfree;
10002 __fsblkcnt64_t f_bavail;
10003 __fsfilcnt64_t f_files;
10004 __fsfilcnt64_t f_ffree;
10005
10006 __fsid_t f_fsid;
10007 __fsword_t f_namelen;
10008 __fsword_t f_frsize;
10009 __fsword_t f_flags;
10010 __fsword_t f_spare[4];
10011 };
10012
10013
10014 struct statfs64
10015 {
10016 __fsword_t f_type;
10017 __fsword_t f_bsize;
10018 __fsblkcnt64_t f_blocks;
10019 __fsblkcnt64_t f_bfree;
10020 __fsblkcnt64_t f_bavail;
10021 __fsfilcnt64_t f_files;
10022 __fsfilcnt64_t f_ffree;
10023 __fsid_t f_fsid;
10024 __fsword_t f_namelen;
10025 __fsword_t f_frsize;
10026 __fsword_t f_flags;
10027 __fsword_t f_spare[4];
10028 };
10029 # 26 "/usr/include/sys/statfs.h" 2 3 4
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039 extern int statfs (const char *__file, struct statfs *__buf) __asm__ ("" "statfs64") __attribute__ ((__nothrow__ , __leaf__))
10040
10041 __attribute__ ((__nonnull__ (1, 2)));
10042
10043
10044
10045
10046
10047 extern int statfs64 (const char *__file, struct statfs64 *__buf)
10048 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
10049 # 54 "/usr/include/sys/statfs.h" 3 4
10050 extern int fstatfs (int __fildes, struct statfs *__buf) __asm__ ("" "fstatfs64") __attribute__ ((__nothrow__ , __leaf__))
10051 __attribute__ ((__nonnull__ (2)));
10052
10053
10054
10055
10056
10057 extern int fstatfs64 (int __fildes, struct statfs64 *__buf)
10058 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
10059
10060
10061
10062 # 73 "include/libbb.h" 2
10063 # 87 "include/libbb.h"
10064 # 1 "/usr/include/utmp.h" 1 3 4
10065 # 26 "/usr/include/utmp.h" 3 4
10066
10067
10068
10069 # 1 "/usr/include/bits/utmp.h" 1 3 4
10070 # 26 "/usr/include/bits/utmp.h" 3 4
10071 # 1 "/usr/include/bits/wordsize.h" 1 3 4
10072 # 27 "/usr/include/bits/utmp.h" 2 3 4
10073 # 36 "/usr/include/bits/utmp.h" 3 4
10074 struct lastlog
10075 {
10076
10077
10078
10079 __time_t ll_time;
10080
10081 char ll_line[32];
10082 char ll_host[256];
10083 };
10084
10085
10086
10087
10088 struct exit_status
10089 {
10090 short int e_termination;
10091 short int e_exit;
10092 };
10093
10094
10095
10096 struct utmp
10097 {
10098 short int ut_type;
10099 pid_t ut_pid;
10100 char ut_line[32];
10101 char ut_id[4];
10102 char ut_user[32];
10103 char ut_host[256];
10104 struct exit_status ut_exit;
10105 # 79 "/usr/include/bits/utmp.h" 3 4
10106 long int ut_session;
10107 struct timeval ut_tv;
10108
10109
10110 int32_t ut_addr_v6[4];
10111 char __glibc_reserved[20];
10112 };
10113 # 30 "/usr/include/utmp.h" 2 3 4
10114 # 41 "/usr/include/utmp.h" 3 4
10115 extern int login_tty (int __fd) __attribute__ ((__nothrow__ , __leaf__));
10116
10117
10118
10119 extern void login (const struct utmp *__entry) __attribute__ ((__nothrow__ , __leaf__));
10120
10121
10122 extern int logout (const char *__ut_line) __attribute__ ((__nothrow__ , __leaf__));
10123
10124
10125 extern void logwtmp (const char *__ut_line, const char *__ut_name,
10126 const char *__ut_host) __attribute__ ((__nothrow__ , __leaf__));
10127
10128
10129 extern void updwtmp (const char *__wtmp_file, const struct utmp *__utmp)
10130 __attribute__ ((__nothrow__ , __leaf__));
10131
10132
10133 extern int utmpname (const char *__file) __attribute__ ((__nothrow__ , __leaf__));
10134
10135
10136 extern struct utmp *getutent (void) __attribute__ ((__nothrow__ , __leaf__));
10137
10138
10139 extern void setutent (void) __attribute__ ((__nothrow__ , __leaf__));
10140
10141
10142 extern void endutent (void) __attribute__ ((__nothrow__ , __leaf__));
10143
10144
10145
10146 extern struct utmp *getutid (const struct utmp *__id) __attribute__ ((__nothrow__ , __leaf__));
10147
10148
10149
10150 extern struct utmp *getutline (const struct utmp *__line) __attribute__ ((__nothrow__ , __leaf__));
10151
10152
10153 extern struct utmp *pututline (const struct utmp *__utmp_ptr) __attribute__ ((__nothrow__ , __leaf__));
10154
10155
10156
10157
10158 extern int getutent_r (struct utmp *__buffer, struct utmp **__result) __attribute__ ((__nothrow__ , __leaf__));
10159
10160 extern int getutid_r (const struct utmp *__id, struct utmp *__buffer,
10161 struct utmp **__result) __attribute__ ((__nothrow__ , __leaf__));
10162
10163 extern int getutline_r (const struct utmp *__line,
10164 struct utmp *__buffer, struct utmp **__result) __attribute__ ((__nothrow__ , __leaf__));
10165
10166
10167
10168
10169 # 88 "include/libbb.h" 2
10170 # 116 "include/libbb.h"
10171 # 1 "/usr/include/arpa/inet.h" 1 3 4
10172 # 30 "/usr/include/arpa/inet.h" 3 4
10173
10174
10175
10176
10177 extern in_addr_t inet_addr (const char *__cp) __attribute__ ((__nothrow__ , __leaf__));
10178
10179
10180 extern in_addr_t inet_lnaof (struct in_addr __in) __attribute__ ((__nothrow__ , __leaf__));
10181
10182
10183
10184 extern struct in_addr inet_makeaddr (in_addr_t __net, in_addr_t __host)
10185 __attribute__ ((__nothrow__ , __leaf__));
10186
10187
10188 extern in_addr_t inet_netof (struct in_addr __in) __attribute__ ((__nothrow__ , __leaf__));
10189
10190
10191
10192 extern in_addr_t inet_network (const char *__cp) __attribute__ ((__nothrow__ , __leaf__));
10193
10194
10195
10196 extern char *inet_ntoa (struct in_addr __in) __attribute__ ((__nothrow__ , __leaf__));
10197
10198
10199
10200
10201 extern int inet_pton (int __af, const char *__restrict __cp,
10202 void *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
10203
10204
10205
10206
10207 extern const char *inet_ntop (int __af, const void *__restrict __cp,
10208 char *__restrict __buf, socklen_t __len)
10209 __attribute__ ((__nothrow__ , __leaf__));
10210
10211
10212
10213
10214
10215
10216 extern int inet_aton (const char *__cp, struct in_addr *__inp) __attribute__ ((__nothrow__ , __leaf__));
10217
10218
10219
10220 extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__));
10221
10222
10223
10224
10225 extern char *inet_net_ntop (int __af, const void *__cp, int __bits,
10226 char *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__));
10227
10228
10229
10230
10231 extern int inet_net_pton (int __af, const char *__cp,
10232 void *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__));
10233
10234
10235
10236
10237 extern unsigned int inet_nsap_addr (const char *__cp,
10238 unsigned char *__buf, int __len) __attribute__ ((__nothrow__ , __leaf__));
10239
10240
10241
10242 extern char *inet_nsap_ntoa (int __len, const unsigned char *__cp,
10243 char *__buf) __attribute__ ((__nothrow__ , __leaf__));
10244
10245
10246
10247 # 117 "include/libbb.h" 2
10248 # 139 "include/libbb.h"
10249 extern char **environ;
10250
10251
10252
10253
10254 int klogctl(int type, char *b, int len);
10255 # 179 "include/libbb.h"
10256
10257 # 179 "include/libbb.h"
10258 #pragma GCC visibility push(hidden)
10259 # 179 "include/libbb.h"
10260
10261
10262
10263
10264 # 1 "include/pwd_.h" 1
10265 # 27 "include/pwd_.h"
10266
10267 # 27 "include/pwd_.h"
10268 #pragma GCC visibility push(hidden)
10269 # 27 "include/pwd_.h"
10270
10271 # 52 "include/pwd_.h"
10272 extern void bb_internal_setpwent(void);
10273
10274
10275 extern void bb_internal_endpwent(void);
10276 # 70 "include/pwd_.h"
10277 extern struct passwd *bb_internal_getpwuid(uid_t __uid);
10278
10279
10280 extern struct passwd *bb_internal_getpwnam(const char *__name);
10281 # 83 "include/pwd_.h"
10282 extern int bb_internal_getpwent_r(struct passwd *__restrict __resultbuf,
10283 char *__restrict __buffer, size_t __buflen,
10284 struct passwd **__restrict __result);
10285
10286 extern int bb_internal_getpwuid_r(uid_t __uid,
10287 struct passwd *__restrict __resultbuf,
10288 char *__restrict __buffer, size_t __buflen,
10289 struct passwd **__restrict __result);
10290
10291 extern int bb_internal_getpwnam_r(const char *__restrict __name,
10292 struct passwd *__restrict __resultbuf,
10293 char *__restrict __buffer, size_t __buflen,
10294 struct passwd **__restrict __result);
10295
10296
10297
10298 extern int bb_internal_fgetpwent_r(FILE *__restrict __stream,
10299 struct passwd *__restrict __resultbuf,
10300 char *__restrict __buffer, size_t __buflen,
10301 struct passwd **__restrict __result);
10302
10303
10304 # 104 "include/pwd_.h"
10305 #pragma GCC visibility pop
10306 # 104 "include/pwd_.h"
10307
10308 # 184 "include/libbb.h" 2
10309 # 1 "include/grp_.h" 1
10310 # 26 "include/grp_.h"
10311
10312 # 26 "include/grp_.h"
10313 #pragma GCC visibility push(hidden)
10314 # 26 "include/grp_.h"
10315
10316 # 53 "include/grp_.h"
10317 extern void bb_internal_setgrent(void);
10318
10319
10320 extern void bb_internal_endgrent(void);
10321 # 71 "include/grp_.h"
10322 extern struct group *bb_internal_getgrgid(gid_t __gid);
10323
10324
10325 extern struct group *bb_internal_getgrnam(const char *__name);
10326 # 84 "include/grp_.h"
10327 extern int bb_internal_getgrent_r(struct group *__restrict __resultbuf,
10328 char *__restrict __buffer, size_t __buflen,
10329 struct group **__restrict __result);
10330
10331
10332 extern int bb_internal_getgrgid_r(gid_t __gid, struct group *__restrict __resultbuf,
10333 char *__restrict __buffer, size_t __buflen,
10334 struct group **__restrict __result);
10335
10336
10337 extern int bb_internal_getgrnam_r(const char *__restrict __name,
10338 struct group *__restrict __resultbuf,
10339 char *__restrict __buffer, size_t __buflen,
10340 struct group **__restrict __result);
10341
10342
10343
10344 extern int bb_internal_fgetgrent_r(FILE *__restrict __stream,
10345 struct group *__restrict __resultbuf,
10346 char *__restrict __buffer, size_t __buflen,
10347 struct group **__restrict __result);
10348
10349
10350
10351
10352 extern int bb_internal_getgrouplist(const char *__user, gid_t __group,
10353 gid_t *__groups, int *__ngroups);
10354
10355
10356
10357
10358 extern int bb_internal_initgroups(const char *__user, gid_t __group);
10359
10360
10361 # 117 "include/grp_.h"
10362 #pragma GCC visibility pop
10363 # 117 "include/grp_.h"
10364
10365 # 185 "include/libbb.h" 2
10366
10367
10368
10369 # 1 "include/shadow_.h" 1
10370 # 25 "include/shadow_.h"
10371
10372 # 25 "include/shadow_.h"
10373 #pragma GCC visibility push(hidden)
10374 # 25 "include/shadow_.h"
10375
10376
10377
10378 struct spwd {
10379 char *sp_namp;
10380 char *sp_pwdp;
10381 long sp_lstchg;
10382 long sp_min;
10383 long sp_max;
10384 long sp_warn;
10385 long sp_inact;
10386 long sp_expire;
10387 unsigned long sp_flag;
10388 };
10389 # 85 "include/shadow_.h"
10390 extern int bb_internal_getspnam_r(const char *__name, struct spwd *__result_buf,
10391 char *__buffer, size_t __buflen,
10392 struct spwd **__result);
10393 # 104 "include/shadow_.h"
10394
10395 # 104 "include/shadow_.h"
10396 #pragma GCC visibility pop
10397 # 104 "include/shadow_.h"
10398
10399 # 189 "include/libbb.h" 2
10400 # 226 "include/libbb.h"
10401 typedef unsigned long long uoff_t;
10402 # 255 "include/libbb.h"
10403 struct BUG_off_t_size_is_misdetected {
10404 char BUG_off_t_size_is_misdetected[sizeof(off_t) == sizeof(uoff_t) ? 1 : -1];
10405 };
10406 # 296 "include/libbb.h"
10407 extern int *const bb_errno;
10408
10409
10410
10411
10412
10413
10414 uint64_t bb_bswap_64(uint64_t x) ;
10415
10416
10417 unsigned long long monotonic_ns(void) ;
10418 unsigned long long monotonic_us(void) ;
10419 unsigned long long monotonic_ms(void) ;
10420 unsigned monotonic_sec(void) ;
10421
10422 extern void chomp(char *s) ;
10423 extern void trim(char *s) ;
10424 extern char *skip_whitespace(const char *) ;
10425 extern char *skip_non_whitespace(const char *) ;
10426 extern char *skip_dev_pfx(const char *tty_name) ;
10427
10428 extern char *strrstr(const char *haystack, const char *needle) ;
10429
10430
10431 extern const char *bb_mode_string(mode_t mode) ;
10432 extern int is_directory(const char *name, int followLinks) ;
10433 enum {
10434 FILEUTILS_PRESERVE_STATUS = 1 << 0,
10435 FILEUTILS_DEREFERENCE = 1 << 1,
10436 FILEUTILS_RECUR = 1 << 2,
10437 FILEUTILS_FORCE = 1 << 3,
10438 FILEUTILS_INTERACTIVE = 1 << 4,
10439 FILEUTILS_MAKE_HARDLINK = 1 << 5,
10440 FILEUTILS_MAKE_SOFTLINK = 1 << 6,
10441 FILEUTILS_DEREF_SOFTLINK = 1 << 7,
10442 FILEUTILS_DEREFERENCE_L0 = 1 << 8,
10443
10444
10445
10446
10447 FILEUTILS_IGNORE_CHMOD_ERR = 1 << 11,
10448 };
10449
10450 extern int remove_file(const char *path, int flags) ;
10451
10452
10453
10454
10455 extern int copy_file(const char *source, const char *dest, int flags) ;
10456
10457 enum {
10458 ACTION_RECURSE = (1 << 0),
10459 ACTION_FOLLOWLINKS = (1 << 1),
10460 ACTION_FOLLOWLINKS_L0 = (1 << 2),
10461 ACTION_DEPTHFIRST = (1 << 3),
10462
10463 ACTION_QUIET = (1 << 5),
10464 ACTION_DANGLING_OK = (1 << 6),
10465 };
10466 typedef uint8_t recurse_flags_t;
10467 extern int recursive_action(const char *fileName, unsigned flags,
10468 int (*fileAction)(const char *fileName, struct stat* statbuf, void* userData, int depth),
10469 int (*dirAction)(const char *fileName, struct stat* statbuf, void* userData, int depth),
10470 void* userData, unsigned depth) ;
10471 extern int device_open(const char *device, int mode) ;
10472 enum { GETPTY_BUFSIZE = 16 };
10473 extern int xgetpty(char *line) ;
10474 extern int get_console_fd_or_die(void) ;
10475 extern void console_make_active(int fd, const int vt_num) ;
10476 extern char *find_block_device(const char *path) ;
10477
10478 extern off_t bb_copyfd_eof(int fd1, int fd2) ;
10479 extern off_t bb_copyfd_size(int fd1, int fd2, off_t size) ;
10480 extern void bb_copyfd_exact_size(int fd1, int fd2, off_t size) ;
10481
10482
10483 extern void complain_copyfd_and_die(off_t sz) __attribute__ ((__noreturn__)) ;
10484
10485 extern char bb_process_escape_sequence(const char **ptr) ;
10486 char* strcpy_and_process_escape_sequences(char *dst, const char *src) ;
10487
10488
10489
10490
10491
10492
10493 char *bb_get_last_path_component_strip(char *path) ;
10494
10495 char *bb_get_last_path_component_nostrip(const char *path) ;
10496
10497 const char *bb_basename(const char *name) ;
10498
10499 char *last_char_is(const char *s, int c) ;
10500
10501 void ndelay_on(int fd) ;
10502 void ndelay_off(int fd) ;
10503 void close_on_exec_on(int fd) ;
10504 void xdup2(int, int) ;
10505 void xmove_fd(int, int) ;
10506
10507
10508 DIR *xopendir(const char *path) ;
10509 DIR *warn_opendir(const char *path) ;
10510
10511 char *xmalloc_realpath(const char *path) __attribute__ ((malloc));
10512 char *xmalloc_readlink(const char *path) __attribute__ ((malloc));
10513 char *xmalloc_readlink_or_warn(const char *path) __attribute__ ((malloc));
10514
10515 char *xrealloc_getcwd_or_warn(char *cwd) ;
10516
10517 char *xmalloc_follow_symlinks(const char *path) __attribute__ ((malloc));
10518
10519
10520 enum {
10521 # 424 "include/libbb.h"
10522 BB_FATAL_SIGS = (int)(0
10523 + (1LL << 1)
10524 + (1LL << 2)
10525 + (1LL << 15)
10526 + (1LL << 13)
10527 + (1LL << 3)
10528 + (1LL << 6)
10529 + (1LL << 14)
10530 + (1LL << 26)
10531 + (1LL << 24)
10532 + (1LL << 25)
10533 + (1LL << 10)
10534 + (1LL << 12)
10535 + 0),
10536 };
10537 void bb_signals(int sigs, void (*f)(int)) ;
10538
10539
10540
10541 void bb_signals_recursive_norestart(int sigs, void (*f)(int)) ;
10542
10543 void signal_no_SA_RESTART_empty_mask(int sig, void (*handler)(int)) ;
10544
10545 void signal_SA_RESTART_empty_mask(int sig, void (*handler)(int)) ;
10546 void wait_for_any_sig(void) ;
10547 void kill_myself_with_sig(int sig) __attribute__ ((__noreturn__)) ;
10548 void sig_block(int sig) ;
10549 void sig_unblock(int sig) ;
10550
10551 int sigaction_set(int sig, const struct sigaction *act) ;
10552
10553 int sigprocmask_allsigs(int how) ;
10554
10555 extern smallint bb_got_signal;
10556 void record_signo(int signo);
10557
10558
10559 void xsetgid(gid_t gid) ;
10560 void xsetuid(uid_t uid) ;
10561 void xchdir(const char *path) ;
10562 void xchroot(const char *path) ;
10563 void xsetenv(const char *key, const char *value) ;
10564 void bb_unsetenv(const char *key) ;
10565 void bb_unsetenv_and_free(char *key) ;
10566 void xunlink(const char *pathname) ;
10567 void xstat(const char *pathname, struct stat *buf) ;
10568 void xfstat(int fd, struct stat *buf, const char *errmsg) ;
10569 int xopen(const char *pathname, int flags) ;
10570 int xopen_nonblocking(const char *pathname) ;
10571 int xopen3(const char *pathname, int flags, int mode) ;
10572 int open_or_warn(const char *pathname, int flags) ;
10573 int open3_or_warn(const char *pathname, int flags, int mode) ;
10574 int open_or_warn_stdin(const char *pathname) ;
10575 int xopen_stdin(const char *pathname) ;
10576 void xrename(const char *oldpath, const char *newpath) ;
10577 int rename_or_warn(const char *oldpath, const char *newpath) ;
10578 off_t xlseek(int fd, off_t offset, int whence) ;
10579 int xmkstemp(char *template) ;
10580 off_t fdlength(int fd) ;
10581
10582 uoff_t get_volume_size_in_bytes(int fd,
10583 const char *override,
10584 unsigned override_units,
10585 int extend);
10586
10587 void xpipe(int filedes[2]) ;
10588
10589 struct fd_pair { int rd; int wr; };
10590
10591
10592
10593
10594 typedef int8_t socktype_t;
10595 typedef int8_t family_t;
10596 struct BUG_too_small {
10597 char BUG_socktype_t_too_small[(0
10598 | SOCK_STREAM
10599 | SOCK_DGRAM
10600 | SOCK_RDM
10601 | SOCK_SEQPACKET
10602 | SOCK_RAW
10603 ) <= 127 ? 1 : -1];
10604 char BUG_family_t_too_small[(0
10605 | 0
10606 | 2
10607 | 10
10608 | 1
10609
10610 | 17
10611
10612
10613 | 16
10614
10615
10616
10617 ) <= 127 ? 1 : -1];
10618 };
10619
10620
10621 void parse_datestr(const char *date_str, struct tm *ptm) ;
10622 time_t validate_tm_time(const char *date_str, struct tm *ptm) ;
10623
10624
10625 int xsocket(int domain, int type, int protocol) ;
10626 void xbind(int sockfd, struct sockaddr *my_addr, socklen_t addrlen) ;
10627 void xlisten(int s, int backlog) ;
10628 void xconnect(int s, const struct sockaddr *s_addr, socklen_t addrlen) ;
10629 ssize_t xsendto(int s, const void *buf, size_t len, const struct sockaddr *to,
10630 socklen_t tolen) ;
10631
10632
10633
10634
10635
10636
10637 void setsockopt_reuseaddr(int fd) ;
10638 int setsockopt_broadcast(int fd) ;
10639 int setsockopt_bindtodevice(int fd, const char *iface) ;
10640
10641 unsigned bb_lookup_port(const char *port, const char *protocol, unsigned default_port) ;
10642 typedef struct len_and_sockaddr {
10643 socklen_t len;
10644 union {
10645 struct sockaddr sa;
10646 struct sockaddr_in sin;
10647
10648 struct sockaddr_in6 sin6;
10649
10650 } u;
10651 } len_and_sockaddr;
10652 enum {
10653 LSA_LEN_SIZE = __builtin_offsetof (len_and_sockaddr, u),
10654 LSA_SIZEOF_SA = sizeof(
10655 union {
10656 struct sockaddr sa;
10657 struct sockaddr_in sin;
10658
10659 struct sockaddr_in6 sin6;
10660
10661 }
10662 )
10663 };
10664
10665
10666
10667
10668
10669
10670 int xsocket_type(len_and_sockaddr **lsap, int af, int sock_type) ;
10671 int xsocket_stream(len_and_sockaddr **lsap) ;
10672
10673
10674
10675
10676
10677 int create_and_bind_stream_or_die(const char *bindaddr, int port) ;
10678 int create_and_bind_dgram_or_die(const char *bindaddr, int port) ;
10679
10680
10681
10682
10683 int create_and_connect_stream_or_die(const char *peer, int port) ;
10684
10685 int xconnect_stream(const len_and_sockaddr *lsa) ;
10686
10687 len_and_sockaddr *get_sock_lsa(int fd) __attribute__ ((malloc));
10688
10689 len_and_sockaddr *get_peer_lsa(int fd) __attribute__ ((malloc));
10690
10691
10692
10693
10694
10695 len_and_sockaddr* host2sockaddr(const char *host, int port) __attribute__ ((malloc));
10696
10697 len_and_sockaddr* xhost2sockaddr(const char *host, int port) __attribute__ ((malloc));
10698 len_and_sockaddr* xdotted2sockaddr(const char *host, int port) __attribute__ ((malloc));
10699
10700
10701
10702
10703
10704 len_and_sockaddr* host_and_af2sockaddr(const char *host, int port, sa_family_t af) __attribute__ ((malloc));
10705 len_and_sockaddr* xhost_and_af2sockaddr(const char *host, int port, sa_family_t af) __attribute__ ((malloc));
10706
10707
10708
10709
10710 void set_nport(struct sockaddr *sa, unsigned port) ;
10711
10712 int get_nport(const struct sockaddr *sa) ;
10713
10714 char* xmalloc_sockaddr2host(const struct sockaddr *sa) __attribute__ ((malloc));
10715
10716 char* xmalloc_sockaddr2host_noport(const struct sockaddr *sa) __attribute__ ((malloc));
10717
10718 char* xmalloc_sockaddr2hostonly_noport(const struct sockaddr *sa) __attribute__ ((malloc));
10719
10720 char* xmalloc_sockaddr2dotted(const struct sockaddr *sa) __attribute__ ((malloc));
10721 char* xmalloc_sockaddr2dotted_noport(const struct sockaddr *sa) __attribute__ ((malloc));
10722
10723
10724 struct hostent *xgethostbyname(const char *name) ;
10725
10726
10727
10728
10729 void socket_want_pktinfo(int fd) ;
10730 ssize_t send_to_from(int fd, void *buf, size_t len, int flags,
10731 const struct sockaddr *to,
10732 const struct sockaddr *from,
10733 socklen_t tolen) ;
10734 ssize_t recv_from_to(int fd, void *buf, size_t len, int flags,
10735 struct sockaddr *from,
10736 struct sockaddr *to,
10737 socklen_t sa_size) ;
10738
10739 uint16_t inet_cksum(uint16_t *addr, int len) ;
10740
10741 char *xstrdup(const char *s) __attribute__ ((malloc));
10742 char *xstrndup(const char *s, int n) __attribute__ ((malloc));
10743 void overlapping_strcpy(char *dst, const char *src) ;
10744 char *safe_strncpy(char *dst, const char *src, size_t size) ;
10745 char *strncpy_IFNAMSIZ(char *dst, const char *src) ;
10746
10747
10748 int bb_putchar(int ch) ;
10749
10750 int bb_putchar_stderr(char ch) ;
10751 char *xasprintf(const char *format, ...) __attribute__ ((format(printf, 1, 2))) __attribute__ ((malloc));
10752 # 666 "include/libbb.h"
10753 typedef struct uni_stat_t {
10754 unsigned byte_count;
10755 unsigned unicode_count;
10756 unsigned unicode_width;
10757 } uni_stat_t;
10758
10759
10760 const char* printable_string(uni_stat_t *stats, const char *str);
10761
10762
10763
10764 enum { PRINTABLE_META = 0x100 };
10765 void fputc_printable(int ch, FILE *file) ;
10766
10767
10768
10769 void *malloc_or_warn(size_t size) __attribute__ ((malloc));
10770 void *xmalloc(size_t size) __attribute__ ((malloc));
10771 void *xzalloc(size_t size) __attribute__ ((malloc));
10772 void *xrealloc(void *old, size_t size) ;
10773 # 695 "include/libbb.h"
10774 void* xrealloc_vector_helper(void *vector, unsigned sizeof_and_shift, int idx) ;
10775
10776
10777 extern ssize_t safe_read(int fd, void *buf, size_t count) ;
10778 extern ssize_t nonblock_immune_read(int fd, void *buf, size_t count, int loop_on_EINTR) ;
10779
10780
10781 extern ssize_t full_read(int fd, void *buf, size_t count) ;
10782 extern void xread(int fd, void *buf, size_t count) ;
10783 extern unsigned char xread_char(int fd) ;
10784 extern ssize_t read_close(int fd, void *buf, size_t maxsz) ;
10785 extern ssize_t open_read_close(const char *filename, void *buf, size_t maxsz) ;
10786
10787
10788
10789 extern char *xmalloc_reads(int fd, size_t *maxsz_p) ;
10790
10791 extern void *xmalloc_read(int fd, size_t *maxsz_p) __attribute__ ((malloc));
10792
10793 extern void *xmalloc_open_read_close(const char *filename, size_t *maxsz_p) __attribute__ ((malloc));
10794
10795 extern void *xmalloc_xopen_read_close(const char *filename, size_t *maxsz_p) __attribute__ ((malloc));
10796 # 727 "include/libbb.h"
10797 extern int setup_unzip_on_fd(int fd, int fail_if_not_detected) ;
10798
10799 extern int open_zipped(const char *fname) ;
10800
10801
10802
10803
10804 extern void *xmalloc_open_zipped_read_close(const char *fname, size_t *maxsz_p) __attribute__ ((malloc));
10805
10806 extern ssize_t safe_write(int fd, const void *buf, size_t count) ;
10807
10808
10809 extern ssize_t full_write(int fd, const void *buf, size_t count) ;
10810 extern void xwrite(int fd, const void *buf, size_t count) ;
10811 extern void xwrite_str(int fd, const char *str) ;
10812 extern ssize_t full_write1_str(const char *str) ;
10813 extern ssize_t full_write2_str(const char *str) ;
10814 extern void xopen_xwrite_close(const char* file, const char *str) ;
10815
10816
10817 extern void xclose(int fd) ;
10818
10819
10820 extern void xprint_and_close_file(FILE *file) ;
10821
10822
10823
10824
10825
10826
10827 extern char *bb_get_chunk_from_file(FILE *file, int *end) ;
10828
10829 extern char *xmalloc_fgets_str(FILE *file, const char *terminating_string) __attribute__ ((malloc));
10830
10831 extern char *xmalloc_fgets_str_len(FILE *file, const char *terminating_string, size_t *maxsz_p) __attribute__ ((malloc));
10832
10833 extern char *xmalloc_fgetline_str(FILE *file, const char *terminating_string) __attribute__ ((malloc));
10834
10835 extern char *xmalloc_fgets(FILE *file) __attribute__ ((malloc));
10836
10837 extern char *xmalloc_fgetline(FILE *file) __attribute__ ((malloc));
10838
10839
10840
10841 void die_if_ferror(FILE *file, const char *msg) ;
10842 void die_if_ferror_stdout(void) ;
10843 int fflush_all(void) ;
10844 void fflush_stdout_and_exit(int retval) __attribute__ ((__noreturn__)) ;
10845 int fclose_if_not_stdin(FILE *file) ;
10846 FILE* xfopen(const char *filename, const char *mode) ;
10847
10848 FILE* fopen_or_warn(const char *filename, const char *mode) ;
10849
10850 FILE* xfopen_stdin(const char *filename) ;
10851 FILE* fopen_or_warn_stdin(const char *filename) ;
10852 FILE* fopen_for_read(const char *path) ;
10853 FILE* xfopen_for_read(const char *path) ;
10854 FILE* fopen_for_write(const char *path) ;
10855 FILE* xfopen_for_write(const char *path) ;
10856 FILE* xfdopen_for_read(int fd) ;
10857 FILE* xfdopen_for_write(int fd) ;
10858
10859 int bb_pstrcmp(const void *a, const void *b) ;
10860 void qsort_string_vector(char **sv, unsigned count) ;
10861
10862
10863
10864
10865
10866 int safe_poll(struct pollfd *ufds, nfds_t nfds, int timeout_ms) ;
10867
10868 char *safe_gethostname(void) ;
10869
10870
10871 char* str_tolower(char *str) ;
10872
10873 char *utoa(unsigned n) ;
10874 char *itoa(int n) ;
10875
10876 char *utoa_to_buf(unsigned n, char *buf, unsigned buflen) ;
10877 char *itoa_to_buf(int n, char *buf, unsigned buflen) ;
10878
10879 void smart_ulltoa4(unsigned long long ul, char buf[4], const char *scale) ;
10880 void smart_ulltoa5(unsigned long long ul, char buf[5], const char *scale) ;
10881
10882
10883
10884
10885
10886
10887
10888 const char *make_human_readable_str(unsigned long long size,
10889 unsigned long block_size, unsigned long display_unit) ;
10890
10891 char *bin2hex(char *dst, const char *src, int count) ;
10892
10893 char* hex2bin(char *dst, const char *src, int count) ;
10894
10895
10896 void generate_uuid(uint8_t *buf) ;
10897
10898
10899 struct suffix_mult {
10900 char suffix[4];
10901 unsigned mult;
10902 };
10903 # 1 "include/xatonum.h" 1
10904 # 10 "include/xatonum.h"
10905
10906 # 10 "include/xatonum.h"
10907 #pragma GCC visibility push(hidden)
10908 # 10 "include/xatonum.h"
10909
10910 # 32 "include/xatonum.h"
10911 unsigned long long xstrtoull_range_sfx(const char *str, int b, unsigned long long l, unsigned long long u, const struct suffix_mult *sfx) ; unsigned long long xstrtoull_range(const char *str, int b, unsigned long long l, unsigned long long u) ; unsigned long long xstrtoull_sfx(const char *str, int b, const struct suffix_mult *sfx) ; unsigned long long xstrtoull(const char *str, int b) ; unsigned long long xatoull_range_sfx(const char *str, unsigned long long l, unsigned long long u, const struct suffix_mult *sfx) ; unsigned long long xatoull_range(const char *str, unsigned long long l, unsigned long long u) ; unsigned long long xatoull_sfx(const char *str, const struct suffix_mult *sfx) ; unsigned long long xatoull(const char *str) ; long long xstrtoll_range_sfx(const char *str, int b, long long l, long long u, const struct suffix_mult *sfx) ; long long xstrtoll_range(const char *str, int b, long long l, long long u) ; long long xstrtoll(const char *str, int b) ; long long xatoll_range_sfx(const char *str, long long l, long long u, const struct suffix_mult *sfx) ; long long xatoll_range(const char *str, long long l, long long u) ; long long xatoll_sfx(const char *str, const struct suffix_mult *sfx) ; long long xatoll(const char *str) ;
10912 # 90 "include/xatonum.h"
10913 unsigned long xstrtoul_range_sfx(const char *str, int b, unsigned long l, unsigned long u, const struct suffix_mult *sfx) ; unsigned long xstrtoul_range(const char *str, int b, unsigned long l, unsigned long u) ; unsigned long xstrtoul_sfx(const char *str, int b, const struct suffix_mult *sfx) ; unsigned long xstrtoul(const char *str, int b) ; unsigned long xatoul_range_sfx(const char *str, unsigned long l, unsigned long u, const struct suffix_mult *sfx) ; unsigned long xatoul_range(const char *str, unsigned long l, unsigned long u) ; unsigned long xatoul_sfx(const char *str, const struct suffix_mult *sfx) ; unsigned long xatoul(const char *str) ; long xstrtol_range_sfx(const char *str, int b, long l, long u, const struct suffix_mult *sfx) ; long xstrtol_range(const char *str, int b, long l, long u) ; long xstrtol(const char *str, int b) ; long xatol_range_sfx(const char *str, long l, long u, const struct suffix_mult *sfx) ; long xatol_range(const char *str, long l, long u) ; long xatol_sfx(const char *str, const struct suffix_mult *sfx) ; long xatol(const char *str) ;
10914
10915
10916
10917
10918
10919
10920 static __attribute__ ((always_inline)) __inline__ unsigned int xstrtou_range_sfx(const char *str, int b, unsigned int l, unsigned int u, const struct suffix_mult *sfx) { return xstrtoul_range_sfx(str, b, l, u, sfx); } static __attribute__ ((always_inline)) __inline__ unsigned int xstrtou_range(const char *str, int b, unsigned int l, unsigned int u) { return xstrtoul_range(str, b, l, u); } static __attribute__ ((always_inline)) __inline__ unsigned int xstrtou_sfx(const char *str, int b, const struct suffix_mult *sfx) { return xstrtoul_sfx(str, b, sfx); } static __attribute__ ((always_inline)) __inline__ unsigned int xstrtou(const char *str, int b) { return xstrtoul(str, b); } static __attribute__ ((always_inline)) __inline__ unsigned int xatou_range_sfx(const char *str, unsigned int l, unsigned int u, const struct suffix_mult *sfx) { return xatoul_range_sfx(str, l, u, sfx); } static __attribute__ ((always_inline)) __inline__ unsigned int xatou_range(const char *str, unsigned int l, unsigned int u) { return xatoul_range(str, l, u); } static __attribute__ ((always_inline)) __inline__ unsigned int xatou_sfx(const char *str, const struct suffix_mult *sfx) { return xatoul_sfx(str, sfx); } static __attribute__ ((always_inline)) __inline__ unsigned int xatou(const char *str) { return xatoul(str); } static __attribute__ ((always_inline)) __inline__ int xstrtoi_range_sfx(const char *str, int b, int l, int u, const struct suffix_mult *sfx) { return xstrtol_range_sfx(str, b, l, u, sfx); } static __attribute__ ((always_inline)) __inline__ int xstrtoi_range(const char *str, int b, int l, int u) { return xstrtol_range(str, b, l, u); } static __attribute__ ((always_inline)) __inline__ int xstrtoi(const char *str, int b) { return xstrtol(str, b); } static __attribute__ ((always_inline)) __inline__ int xatoi_range_sfx(const char *str, int l, int u, const struct suffix_mult *sfx) { return xatol_range_sfx(str, l, u, sfx); } static __attribute__ ((always_inline)) __inline__ int xatoi_range(const char *str, int l, int u) { return xatol_range(str, l, u); } static __attribute__ ((always_inline)) __inline__ int xatoi_sfx(const char *str, const struct suffix_mult *sfx) { return xatol_sfx(str, sfx); } static __attribute__ ((always_inline)) __inline__ int xatoi(const char *str) { return xatol(str); }
10921
10922
10923
10924
10925
10926
10927 uint32_t BUG_xatou32_unimplemented(void);
10928 static __attribute__ ((always_inline)) __inline__ uint32_t xatou32(const char *numstr)
10929 {
10930 if ((2147483647 * 2U + 1U) == 0xffffffff)
10931 return xatou(numstr);
10932 if ((2147483647L * 2UL + 1UL) == 0xffffffff)
10933 return xatoul(numstr);
10934 return BUG_xatou32_unimplemented();
10935 }
10936 # 127 "include/xatonum.h"
10937 unsigned long long bb_strtoull(const char *arg, char **endp, int base) ;
10938 long long bb_strtoll(const char *arg, char **endp, int base) ;
10939 # 138 "include/xatonum.h"
10940 unsigned long bb_strtoul(const char *arg, char **endp, int base) ;
10941 long bb_strtol(const char *arg, char **endp, int base) ;
10942 # 150 "include/xatonum.h"
10943 static __attribute__ ((always_inline)) __inline__
10944 unsigned bb_strtou(const char *arg, char **endp, int base)
10945 { return bb_strtoul(arg, endp, base); }
10946 static __attribute__ ((always_inline)) __inline__
10947 int bb_strtoi(const char *arg, char **endp, int base)
10948 { return bb_strtol(arg, endp, base); }
10949
10950
10951
10952
10953
10954 uint32_t BUG_bb_strtou32_unimplemented(void);
10955 static __attribute__ ((always_inline)) __inline__
10956 uint32_t bb_strtou32(const char *arg, char **endp, int base)
10957 {
10958 if (sizeof(uint32_t) == sizeof(unsigned))
10959 return bb_strtou(arg, endp, base);
10960 if (sizeof(uint32_t) == sizeof(unsigned long))
10961 return bb_strtoul(arg, endp, base);
10962 return BUG_bb_strtou32_unimplemented();
10963 }
10964 static __attribute__ ((always_inline)) __inline__
10965 int32_t bb_strtoi32(const char *arg, char **endp, int base)
10966 {
10967 if (sizeof(int32_t) == sizeof(int))
10968 return bb_strtoi(arg, endp, base);
10969 if (sizeof(int32_t) == sizeof(long))
10970 return bb_strtol(arg, endp, base);
10971 return BUG_bb_strtou32_unimplemented();
10972 }
10973
10974
10975
10976 double bb_strtod(const char *arg, char **endp) ;
10977
10978
10979 # 185 "include/xatonum.h"
10980 #pragma GCC visibility pop
10981 # 185 "include/xatonum.h"
10982
10983 # 834 "include/libbb.h" 2
10984 # 843 "include/libbb.h"
10985 int xatoi_positive(const char *numstr) ;
10986
10987
10988 uint16_t xatou16(const char *numstr) ;
10989
10990
10991
10992
10993
10994 long xuname2uid(const char *name) ;
10995 long xgroup2gid(const char *name) ;
10996
10997 unsigned long get_ug_id(const char *s, long (*xname2id)(const char *)) ;
10998
10999 struct bb_uidgid_t {
11000 uid_t uid;
11001 gid_t gid;
11002 };
11003
11004 int get_uidgid(struct bb_uidgid_t*, const char*, int numeric_ok) ;
11005
11006 void xget_uidgid(struct bb_uidgid_t*, const char*) ;
11007
11008 void parse_chown_usergroup_or_die(struct bb_uidgid_t *u, char *user_group) ;
11009 struct passwd* xgetpwnam(const char *name) ;
11010 struct group* xgetgrnam(const char *name) ;
11011 struct passwd* xgetpwuid(uid_t uid) ;
11012 struct group* xgetgrgid(gid_t gid) ;
11013 char* xuid2uname(uid_t uid) ;
11014 char* xgid2group(gid_t gid) ;
11015 char* uid2uname(uid_t uid) ;
11016 char* gid2group(gid_t gid) ;
11017 char* uid2uname_utoa(uid_t uid) ;
11018 char* gid2group_utoa(gid_t gid) ;
11019
11020 const char* get_cached_username(uid_t uid) ;
11021 const char* get_cached_groupname(gid_t gid) ;
11022 void clear_username_cache(void) ;
11023
11024 enum { USERNAME_MAX_SIZE = 32 - sizeof(uid_t) };
11025
11026 void die_if_bad_username(const char* name) ;
11027
11028
11029
11030
11031
11032 void write_new_utmp(pid_t pid, int new_type, const char *tty_name, const char *username, const char *hostname);
11033 void update_utmp(pid_t pid, int new_type, const char *tty_name, const char *username, const char *hostname);
11034
11035
11036
11037
11038
11039
11040 int execable_file(const char *name) ;
11041 char *find_execable(const char *filename, char **PATHp) ;
11042 int exists_execable(const char *filename) ;
11043
11044
11045
11046
11047
11048 int BB_EXECVP(const char *file, char *const argv[]) ;
11049 # 917 "include/libbb.h"
11050 int BB_EXECVP_or_die(char **argv) __attribute__ ((__noreturn__)) ;
11051 # 929 "include/libbb.h"
11052 pid_t xfork(void) ;
11053
11054
11055
11056 pid_t spawn(char **argv) ;
11057 pid_t xspawn(char **argv) ;
11058
11059 pid_t safe_waitpid(pid_t pid, int *wstat, int options) ;
11060 pid_t wait_any_nohang(int *wstat) ;
11061 # 946 "include/libbb.h"
11062 int wait4pid(pid_t pid) ;
11063
11064 int spawn_and_wait(char **argv) ;
11065
11066 int run_nofork_applet(int applet_no, char **argv) ;
11067 # 975 "include/libbb.h"
11068 enum {
11069 DAEMON_CHDIR_ROOT = 1,
11070 DAEMON_DEVNULL_STDIO = 2,
11071 DAEMON_CLOSE_EXTRA_FDS = 4,
11072 DAEMON_ONLY_SANITIZE = 8,
11073 DAEMON_DOUBLE_FORK = 16,
11074 };
11075
11076 enum { re_execed = 0 };
11077 # 1002 "include/libbb.h"
11078 void bb_daemonize_or_rexec(int flags) ;
11079 void bb_sanitize_stdio(void) ;
11080
11081 int sanitize_env_if_suid(void) ;
11082
11083
11084 char* single_argv(char **argv) ;
11085 extern const char *const bb_argv_dash[];
11086 extern const char *opt_complementary;
11087
11088
11089
11090
11091 extern const char *applet_long_options;
11092
11093 extern uint32_t option_mask32;
11094 extern uint32_t getopt32(char **argv, const char *applet_opts, ...) ;
11095
11096
11097
11098
11099
11100
11101 typedef struct llist_t {
11102 struct llist_t *link;
11103 char *data;
11104 } llist_t;
11105 void llist_add_to(llist_t **old_head, void *data) ;
11106 void llist_add_to_end(llist_t **list_head, void *data) ;
11107 void *llist_pop(llist_t **elm) ;
11108 void llist_unlink(llist_t **head, llist_t *elm) ;
11109 void llist_free(llist_t *elm, void (*freeit)(void *data)) ;
11110 llist_t *llist_rev(llist_t *list) ;
11111 llist_t *llist_find_str(llist_t *first, const char *str) ;
11112 # 1044 "include/libbb.h"
11113 extern smallint wrote_pidfile;
11114 void write_pidfile(const char *path) ;
11115
11116
11117
11118
11119
11120
11121
11122 enum {
11123 LOGMODE_NONE = 0,
11124 LOGMODE_STDIO = (1 << 0),
11125 LOGMODE_SYSLOG = (1 << 1) * 1,
11126 LOGMODE_BOTH = LOGMODE_SYSLOG + LOGMODE_STDIO,
11127 };
11128 extern const char *msg_eol;
11129 extern smallint logmode;
11130 extern int die_sleep;
11131 extern uint8_t xfunc_error_retval;
11132 extern jmp_buf die_jmp;
11133 extern void xfunc_die(void) __attribute__ ((__noreturn__)) ;
11134 extern void bb_show_usage(void) __attribute__ ((__noreturn__)) ;
11135 extern void bb_error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) ;
11136 extern void bb_error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) ;
11137 extern void bb_perror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) ;
11138 extern void bb_simple_perror_msg(const char *s) ;
11139 extern void bb_perror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) ;
11140 extern void bb_simple_perror_msg_and_die(const char *s) __attribute__ ((__noreturn__)) ;
11141 extern void bb_herror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) ;
11142 extern void bb_herror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) ;
11143 extern void bb_perror_nomsg_and_die(void) __attribute__ ((__noreturn__)) ;
11144 extern void bb_perror_nomsg(void) ;
11145 extern void bb_info_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) ;
11146 extern void bb_verror_msg(const char *s, va_list p, const char *strerr) ;
11147 # 1090 "include/libbb.h"
11148 int bb_cat(char** argv);
11149
11150 int echo_main(int argc, char** argv) ;
11151 int printf_main(int argc, char **argv) ;
11152 int test_main(int argc, char **argv) ;
11153 int kill_main(int argc, char **argv) ;
11154
11155 int chown_main(int argc, char **argv) ;
11156
11157 int ls_main(int argc, char **argv) ;
11158
11159 int gunzip_main(int argc, char **argv) ;
11160 int bunzip2_main(int argc, char **argv) ;
11161
11162
11163 void bb_displayroutes(int noresolve, int netstatfmt) ;
11164
11165
11166
11167
11168 int create_icmp_socket(void) ;
11169 int create_icmp6_socket(void) ;
11170
11171
11172 struct aftype {
11173 const char *name;
11174 const char *title;
11175 int af;
11176 int alen;
11177 char* (*print)(unsigned char *);
11178 const char* (*sprint)(struct sockaddr *, int numeric);
11179 int (*input)( const char *bufp, struct sockaddr *);
11180 void (*herror)(char *text);
11181 int (*rprint)(int options);
11182 int (*rinput)(int typ, int ext, char **argv);
11183
11184 int (*getmask)(char *src, struct sockaddr *mask, char *name);
11185 };
11186
11187 struct hwtype {
11188 const char *name;
11189 const char *title;
11190 int type;
11191 int alen;
11192 char* (*print)(unsigned char *);
11193 int (*input)(const char *, struct sockaddr *);
11194 int (*activate)(int fd);
11195 int suppress_null_addr;
11196 };
11197 extern smallint interface_opt_a;
11198 int display_interfaces(char *ifname) ;
11199
11200 int in_ib(const char *bufp, struct sockaddr *sap) ;
11201
11202
11203
11204 const struct aftype *get_aftype(const char *name) ;
11205 const struct hwtype *get_hwtype(const char *name) ;
11206 const struct hwtype *get_hwntype(int type) ;
11207
11208
11209
11210 extern int find_applet_by_name(const char *name) ;
11211
11212 extern void run_applet_and_exit(const char *name, char **argv) ;
11213 extern void run_applet_no_and_exit(int a, char **argv) __attribute__ ((__noreturn__)) ;
11214
11215
11216
11217 extern int match_fstype(const struct mntent *mt, const char *fstypes) ;
11218 extern struct mntent *find_mount_point(const char *name, int subdir_too) ;
11219
11220 extern void erase_mtab(const char * name) ;
11221 extern unsigned int tty_baud_to_value(speed_t speed) ;
11222 extern speed_t tty_value_to_baud(unsigned int value) ;
11223
11224 extern void bb_warn_ignoring_args(char *arg) ;
11225
11226
11227
11228
11229 extern int get_linux_version_code(void) ;
11230
11231 extern char *query_loop(const char *device) ;
11232 extern int del_loop(const char *device) ;
11233
11234
11235
11236 extern int set_loop(char **devname, const char *file, unsigned long long offset, int ro) ;
11237
11238
11239 char *bb_ask_stdin(const char * prompt) ;
11240
11241 char *bb_ask(const int fd, int timeout, const char * prompt) ;
11242 int bb_ask_confirmation(void) ;
11243
11244 int bb_parse_mode(const char* s, mode_t* theMode) ;
11245
11246
11247
11248
11249 enum {
11250 PARSE_COLLAPSE = 0x00010000,
11251 PARSE_TRIM = 0x00020000,
11252
11253 PARSE_GREEDY = 0x00040000,
11254 PARSE_MIN_DIE = 0x00100000,
11255
11256 PARSE_KEEP_COPY = 0x00200000 * 1,
11257 PARSE_EOL_COMMENTS = 0x00400000,
11258
11259
11260
11261
11262
11263
11264 PARSE_NORMAL = PARSE_COLLAPSE | PARSE_TRIM | PARSE_GREEDY | PARSE_EOL_COMMENTS,
11265 };
11266 typedef struct parser_t {
11267 FILE *fp;
11268 char *data;
11269 char *line, *nline;
11270 size_t line_alloc, nline_alloc;
11271 int lineno;
11272 } parser_t;
11273 parser_t* config_open(const char *filename) ;
11274 parser_t* config_open2(const char *filename, FILE* (*fopen_func)(const char *path)) ;
11275
11276 int config_read(parser_t *parser, char **tokens, unsigned flags, const char *delims) ;
11277
11278
11279 void config_close(parser_t *parser) ;
11280
11281
11282
11283
11284
11285 char *concat_path_file(const char *path, const char *filename) ;
11286
11287 char *concat_subpath_file(const char *path, const char *filename) ;
11288
11289
11290 int bb_make_directory(char *path, long mode, int flags) ;
11291
11292 int get_signum(const char *name) ;
11293 const char *get_signame(int number) ;
11294 void print_signames(void) ;
11295
11296 char *bb_simplify_path(const char *path) ;
11297
11298 char *bb_simplify_abs_path_inplace(char *path) ;
11299
11300
11301 extern void bb_do_delay(int seconds) ;
11302 extern void change_identity(const struct passwd *pw) ;
11303 extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) __attribute__ ((__noreturn__)) ;
11304
11305
11306
11307
11308
11309 const char *get_shell_name(void) ;
11310 # 1263 "include/libbb.h"
11311 extern void selinux_or_die(void) ;
11312
11313
11314
11315
11316 int sd_listen_fds(void);
11317 # 1290 "include/libbb.h"
11318 extern void setup_environment(const char *shell, int flags, const struct passwd *pw) ;
11319 extern int correct_password(const struct passwd *pw) ;
11320
11321
11322
11323
11324 extern char *pw_encrypt(const char *clear, const char *salt, int cleanup) ;
11325 extern int obscure(const char *old, const char *newval, const struct passwd *pwdp) ;
11326 # 1306 "include/libbb.h"
11327 extern int crypt_make_salt(char *p, int cnt ) ;
11328
11329
11330 extern char* crypt_make_pw_salt(char p[(3 + 16 + 1)], const char *algo) ;
11331
11332
11333
11334
11335
11336
11337
11338 extern int update_passwd(const char *filename,
11339 const char *username,
11340 const char *data,
11341 const char *member) ;
11342
11343 int index_in_str_array(const char *const string_array[], const char *key) ;
11344 int index_in_strings(const char *strings, const char *key) ;
11345 int index_in_substr_array(const char *const string_array[], const char *key) ;
11346 int index_in_substrings(const char *strings, const char *key) ;
11347 const char *nth_string(const char *strings, int n) ;
11348
11349 extern void print_login_issue(const char *issue_file, const char *tty) ;
11350 extern void print_login_prompt(void) ;
11351
11352 char *xmalloc_ttyname(int fd) __attribute__ ((malloc));
11353
11354 int get_terminal_width_height(int fd, unsigned *width, unsigned *height) ;
11355
11356 int tcsetattr_stdin_TCSANOW(const struct termios *tp) ;
11357
11358
11359 int ioctl_or_perror(int fd, unsigned request, void *argp, const char *fmt,...) __attribute__ ((format (printf, 4, 5))) ;
11360 int ioctl_or_perror_and_die(int fd, unsigned request, void *argp, const char *fmt,...) __attribute__ ((format (printf, 4, 5))) ;
11361
11362 int bb_ioctl_or_warn(int fd, unsigned request, void *argp, const char *ioctl_name) ;
11363 int bb_xioctl(int fd, unsigned request, void *argp, const char *ioctl_name) ;
11364 # 1352 "include/libbb.h"
11365 char *is_in_ino_dev_hashtable(const struct stat *statbuf) ;
11366 void add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name) ;
11367 void reset_ino_dev_hashtable(void) ;
11368
11369
11370 unsigned long long bb_makedev(unsigned major, unsigned minor) ;
11371 # 1367 "include/libbb.h"
11372 enum {
11373 KEYCODE_UP = -2,
11374 KEYCODE_DOWN = -3,
11375 KEYCODE_RIGHT = -4,
11376 KEYCODE_LEFT = -5,
11377 KEYCODE_HOME = -6,
11378 KEYCODE_END = -7,
11379 KEYCODE_INSERT = -8,
11380 KEYCODE_DELETE = -9,
11381 KEYCODE_PAGEUP = -10,
11382 KEYCODE_PAGEDOWN = -11,
11383 # 1402 "include/libbb.h"
11384 KEYCODE_CTRL_RIGHT = KEYCODE_RIGHT & ~0x40,
11385 KEYCODE_CTRL_LEFT = KEYCODE_LEFT & ~0x40,
11386
11387
11388 KEYCODE_ALT_RIGHT = KEYCODE_RIGHT & ~0x20,
11389 KEYCODE_ALT_LEFT = KEYCODE_LEFT & ~0x20,
11390
11391 KEYCODE_CURSOR_POS = -0x100,
11392
11393
11394
11395
11396 KEYCODE_BUFFER_SIZE = 16
11397 };
11398 # 1429 "include/libbb.h"
11399 int64_t read_key(int fd, char *buffer, int timeout) ;
11400 void read_key_ungets(char *buffer, const char *str, unsigned len) ;
11401
11402
11403
11404
11405
11406
11407 unsigned size_from_HISTFILESIZE(const char *hp);
11408
11409
11410
11411 typedef struct line_input_t {
11412 int flags;
11413 const char *path_lookup;
11414
11415 int cnt_history;
11416 int cur_history;
11417 int max_history;
11418
11419
11420
11421
11422
11423
11424
11425 unsigned cnt_history_in_file;
11426 const char *hist_file;
11427
11428 char *history[(255 + 0) + 1];
11429
11430 } line_input_t;
11431 enum {
11432 DO_HISTORY = 1 * ((255 + 0) > 0),
11433 TAB_COMPLETION = 2 * 1,
11434 USERNAME_COMPLETION = 4 * 1,
11435 VI_MODE = 8 * 1,
11436 WITH_PATH_LOOKUP = 0x10,
11437 FOR_SHELL = DO_HISTORY | TAB_COMPLETION | USERNAME_COMPLETION,
11438 };
11439 line_input_t *new_line_input_t(int flags) ;
11440 # 1478 "include/libbb.h"
11441 int read_line_input(line_input_t *st, const char *prompt, char *command, int maxsize, int timeout) ;
11442
11443 void save_history(line_input_t *st);
11444 # 1495 "include/libbb.h"
11445 enum { COMM_LEN = 16 };
11446
11447
11448
11449 struct smaprec {
11450 unsigned long mapped_rw;
11451 unsigned long mapped_ro;
11452 unsigned long shared_clean;
11453 unsigned long shared_dirty;
11454 unsigned long private_clean;
11455 unsigned long private_dirty;
11456 unsigned long stack;
11457 unsigned long smap_pss, smap_swap;
11458 unsigned long smap_size;
11459 unsigned long smap_start;
11460 char smap_mode[5];
11461 char *smap_name;
11462 };
11463
11464
11465
11466
11467
11468 int procps_read_smaps(pid_t pid, struct smaprec *total,
11469 void (*cb)(struct smaprec *, void *), void *data);
11470
11471 typedef struct procps_status_t {
11472 DIR *dir;
11473 DIR *task_dir;
11474 uint8_t shift_pages_to_bytes;
11475 uint8_t shift_pages_to_kb;
11476
11477 uint16_t argv_len;
11478 char *argv0;
11479 char *exe;
11480
11481 unsigned main_thread_pid;
11482
11483
11484 unsigned long vsz, rss;
11485 unsigned long stime, utime;
11486 unsigned long start_time;
11487 unsigned pid;
11488 unsigned ppid;
11489 unsigned pgid;
11490 unsigned sid;
11491 unsigned uid;
11492 unsigned gid;
11493
11494 unsigned ruid;
11495 unsigned rgid;
11496 int niceness;
11497
11498 unsigned tty_major,tty_minor;
11499
11500 struct smaprec smaps;
11501
11502 char state[4];
11503
11504
11505
11506 char comm[COMM_LEN];
11507
11508
11509 int last_seen_on_cpu;
11510
11511 } procps_status_t;
11512
11513 enum {
11514 PSSCAN_PID = 1 << 0,
11515 PSSCAN_PPID = 1 << 1,
11516 PSSCAN_PGID = 1 << 2,
11517 PSSCAN_SID = 1 << 3,
11518 PSSCAN_UIDGID = 1 << 4,
11519 PSSCAN_COMM = 1 << 5,
11520
11521 PSSCAN_ARGV0 = 1 << 7,
11522 PSSCAN_EXE = 1 << 8,
11523 PSSCAN_STATE = 1 << 9,
11524 PSSCAN_VSZ = 1 << 10,
11525 PSSCAN_RSS = 1 << 11,
11526 PSSCAN_STIME = 1 << 12,
11527 PSSCAN_UTIME = 1 << 13,
11528 PSSCAN_TTY = 1 << 14,
11529 PSSCAN_SMAPS = (1 << 15) * 1,
11530
11531
11532 PSSCAN_ARGVN = (1 << 16) * (1
11533 || 1 || 1
11534 || 1
11535 || 0
11536 ),
11537 PSSCAN_CONTEXT = (1 << 17) * 0,
11538 PSSCAN_START_TIME = 1 << 18,
11539 PSSCAN_CPU = (1 << 19) * 1,
11540 PSSCAN_NICE = (1 << 20) * 1,
11541 PSSCAN_RUIDGID = (1 << 21) * 1,
11542 PSSCAN_TASKS = (1 << 22) * 1,
11543 };
11544
11545 void free_procps_scan(procps_status_t* sp) ;
11546 procps_status_t* procps_scan(procps_status_t* sp, int flags) ;
11547
11548
11549 void read_cmdline(char *buf, int size, unsigned pid, const char *comm) ;
11550 pid_t *find_pid_by_name(const char* procName) ;
11551 pid_t *pidlist_reverse(pid_t *pidList) ;
11552 int starts_with_cpu(const char *str) ;
11553 unsigned get_cpu_count(void) ;
11554 # 1612 "include/libbb.h"
11555 char *percent_decode_in_place(char *str, int strict) ;
11556
11557
11558 extern const char bb_uuenc_tbl_base64[] __attribute__((aligned(1)));
11559 extern const char bb_uuenc_tbl_std[] __attribute__((aligned(1)));
11560 void bb_uuencode(char *store, const void *s, int length, const char *tbl) ;
11561 enum {
11562 BASE64_FLAG_UU_STOP = 0x100,
11563
11564 BASE64_FLAG_NO_STOP_CHAR = 0x80,
11565 };
11566 const char *decode_base64(char **pp_dst, const char *src) ;
11567 void read_base64(FILE *src_stream, FILE *dst_stream, int flags) ;
11568
11569 typedef struct md5_ctx_t {
11570 uint8_t wbuffer[64];
11571 void (*process_block)(struct md5_ctx_t*) ;
11572 uint64_t total64;
11573 uint32_t hash[8];
11574 } md5_ctx_t;
11575 typedef struct md5_ctx_t sha1_ctx_t;
11576 typedef struct md5_ctx_t sha256_ctx_t;
11577 typedef struct sha512_ctx_t {
11578 uint64_t total64[2];
11579 uint64_t hash[8];
11580 uint8_t wbuffer[128];
11581 } sha512_ctx_t;
11582 typedef struct sha3_ctx_t {
11583 uint64_t state[25];
11584 unsigned bytes_queued;
11585 } sha3_ctx_t;
11586 void md5_begin(md5_ctx_t *ctx) ;
11587 void md5_hash(md5_ctx_t *ctx, const void *buffer, size_t len) ;
11588 void md5_end(md5_ctx_t *ctx, void *resbuf) ;
11589 void sha1_begin(sha1_ctx_t *ctx) ;
11590
11591 void sha1_end(sha1_ctx_t *ctx, void *resbuf) ;
11592 void sha256_begin(sha256_ctx_t *ctx) ;
11593
11594
11595 void sha512_begin(sha512_ctx_t *ctx) ;
11596 void sha512_hash(sha512_ctx_t *ctx, const void *buffer, size_t len) ;
11597 void sha512_end(sha512_ctx_t *ctx, void *resbuf) ;
11598 void sha3_begin(sha3_ctx_t *ctx) ;
11599 void sha3_hash(sha3_ctx_t *ctx, const void *buffer, size_t len) ;
11600 void sha3_end(sha3_ctx_t *ctx, void *resbuf) ;
11601
11602 extern uint32_t *global_crc32_table;
11603 uint32_t *crc32_filltable(uint32_t *tbl256, int endian) ;
11604 uint32_t crc32_block_endian1(uint32_t val, const void *buf, unsigned len, uint32_t *crc_table) ;
11605 uint32_t crc32_block_endian0(uint32_t val, const void *buf, unsigned len, uint32_t *crc_table) ;
11606
11607 typedef struct masks_labels_t {
11608 const char *labels;
11609 const int masks[];
11610 } masks_labels_t;
11611 int print_flags_separated(const int *masks, const char *labels,
11612 int flags, const char *separator) ;
11613 int print_flags(const masks_labels_t *ml, int flags) ;
11614
11615 typedef struct bb_progress_t {
11616 unsigned last_size;
11617 unsigned last_update_sec;
11618 unsigned last_change_sec;
11619 unsigned start_sec;
11620 const char *curfile;
11621 } bb_progress_t;
11622
11623
11624
11625
11626
11627
11628 void bb_progress_init(bb_progress_t *p, const char *curfile) ;
11629 void bb_progress_update(bb_progress_t *p,
11630 uoff_t beg_range,
11631 uoff_t transferred,
11632 uoff_t totalsize) ;
11633
11634
11635 extern const char *applet_name;
11636 # 1704 "include/libbb.h"
11637 extern const char bb_banner[] __attribute__((aligned(1)));
11638 extern const char bb_msg_memory_exhausted[] __attribute__((aligned(1)));
11639 extern const char bb_msg_invalid_date[] __attribute__((aligned(1)));
11640
11641
11642 extern const char bb_msg_unknown[] __attribute__((aligned(1)));
11643 extern const char bb_msg_can_not_create_raw_socket[] __attribute__((aligned(1)));
11644 extern const char bb_msg_perm_denied_are_you_root[] __attribute__((aligned(1)));
11645 extern const char bb_msg_you_must_be_root[] __attribute__((aligned(1)));
11646 extern const char bb_msg_requires_arg[] __attribute__((aligned(1)));
11647 extern const char bb_msg_invalid_arg[] __attribute__((aligned(1)));
11648 extern const char bb_msg_standard_input[] __attribute__((aligned(1)));
11649 extern const char bb_msg_standard_output[] __attribute__((aligned(1)));
11650
11651
11652 extern const char bb_hexdigits_upcase[] __attribute__((aligned(1)));
11653
11654 extern const char bb_path_wtmp_file[] __attribute__((aligned(1)));
11655 # 1735 "include/libbb.h"
11656 extern const char bb_busybox_exec_path[] __attribute__((aligned(1)));
11657
11658
11659 extern const char bb_PATH_root_path[] __attribute__((aligned(1)));
11660
11661
11662
11663 extern const int const_int_0;
11664 extern const int const_int_1;
11665
11666
11667
11668 enum { COMMON_BUFSIZE = (8192 >= 256*sizeof(void*) ? 8192 +1 : 256*sizeof(void*)) };
11669 extern char bb_common_bufsiz1[COMMON_BUFSIZE];
11670
11671
11672 struct globals;
11673
11674
11675
11676 extern struct globals *const ptr_to_globals;
11677 # 1768 "include/libbb.h"
11678 extern const char bb_default_login_shell[] __attribute__((aligned(1)));
11679 # 1866 "include/libbb.h"
11680 static __attribute__ ((always_inline)) __inline__ int bb_ascii_isalnum(unsigned char a)
11681 {
11682 unsigned char b = a - '0';
11683 if (b <= 9)
11684 return (b <= 9);
11685 b = (a|0x20) - 'a';
11686 return b <= 'z' - 'a';
11687 }
11688
11689 static __attribute__ ((always_inline)) __inline__ int bb_ascii_isxdigit(unsigned char a)
11690 {
11691 unsigned char b = a - '0';
11692 if (b <= 9)
11693 return (b <= 9);
11694 b = (a|0x20) - 'a';
11695 return b <= 'f' - 'a';
11696 }
11697
11698 static __attribute__ ((always_inline)) __inline__ unsigned char bb_ascii_toupper(unsigned char a)
11699 {
11700 unsigned char b = a - 'a';
11701 if (b <= ('z' - 'a'))
11702 a -= 'a' - 'A';
11703 return a;
11704 }
11705
11706 static __attribute__ ((always_inline)) __inline__ unsigned char bb_ascii_tolower(unsigned char a)
11707 {
11708 unsigned char b = a - 'A';
11709 if (b <= ('Z' - 'A'))
11710 a += 'a' - 'A';
11711 return a;
11712 }
11713 # 1909 "include/libbb.h"
11714
11715 # 1909 "include/libbb.h"
11716 #pragma GCC visibility pop
11717 # 1909 "include/libbb.h"
11718
11719 # 6 "networking/libiproute/ip_common.h" 2
11720 # 1 "/usr/include/asm/types.h" 1 3 4
11721
11722
11723
11724 # 1 "/usr/include/asm-generic/int-ll64.h" 1 3 4
11725 # 11 "/usr/include/asm-generic/int-ll64.h" 3 4
11726 # 1 "/usr/include/asm/bitsperlong.h" 1 3 4
11727 # 1 "/usr/include/asm-generic/bitsperlong.h" 1 3 4
11728 # 1 "/usr/include/asm/bitsperlong.h" 2 3 4
11729 # 12 "/usr/include/asm-generic/int-ll64.h" 2 3 4
11730
11731
11732
11733
11734
11735
11736
11737 typedef __signed__ char __s8;
11738 typedef unsigned char __u8;
11739
11740 typedef __signed__ short __s16;
11741 typedef unsigned short __u16;
11742
11743 typedef __signed__ int __s32;
11744 typedef unsigned int __u32;
11745
11746
11747 __extension__ typedef __signed__ long long __s64;
11748 __extension__ typedef unsigned long long __u64;
11749 # 5 "/usr/include/asm/types.h" 2 3 4
11750 # 7 "networking/libiproute/ip_common.h" 2
11751 # 1 "/usr/include/linux/netlink.h" 1 3 4
11752
11753
11754
11755 # 1 "/usr/include/linux/kernel.h" 1 3 4
11756
11757
11758
11759 # 1 "/usr/include/linux/sysinfo.h" 1 3 4
11760
11761
11762
11763 # 1 "/usr/include/linux/types.h" 1 3 4
11764
11765
11766
11767
11768
11769
11770
11771 # 1 "/usr/include/linux/posix_types.h" 1 3 4
11772
11773
11774
11775 # 1 "/usr/include/linux/stddef.h" 1 3 4
11776 # 5 "/usr/include/linux/posix_types.h" 2 3 4
11777 # 24 "/usr/include/linux/posix_types.h" 3 4
11778 typedef struct {
11779 unsigned long fds_bits[1024 / (8 * sizeof(long))];
11780 } __kernel_fd_set;
11781
11782
11783 typedef void (*__kernel_sighandler_t)(int);
11784
11785
11786 typedef int __kernel_key_t;
11787 typedef int __kernel_mqd_t;
11788
11789 # 1 "/usr/include/asm/posix_types.h" 1 3 4
11790 # 22 "/usr/include/asm/posix_types.h" 3 4
11791 typedef unsigned short __kernel_mode_t;
11792
11793
11794 typedef unsigned short __kernel_ipc_pid_t;
11795
11796
11797 typedef unsigned short __kernel_uid_t;
11798 typedef unsigned short __kernel_gid_t;
11799
11800
11801 typedef unsigned short __kernel_old_dev_t;
11802
11803
11804 # 1 "/usr/include/asm-generic/posix_types.h" 1 3 4
11805
11806
11807
11808 # 1 "/usr/include/asm/bitsperlong.h" 1 3 4
11809 # 5 "/usr/include/asm-generic/posix_types.h" 2 3 4
11810 # 14 "/usr/include/asm-generic/posix_types.h" 3 4
11811 typedef long __kernel_long_t;
11812 typedef unsigned long __kernel_ulong_t;
11813
11814
11815
11816 typedef __kernel_ulong_t __kernel_ino_t;
11817
11818
11819
11820
11821
11822
11823
11824 typedef int __kernel_pid_t;
11825 # 40 "/usr/include/asm-generic/posix_types.h" 3 4
11826 typedef __kernel_long_t __kernel_suseconds_t;
11827
11828
11829
11830 typedef int __kernel_daddr_t;
11831
11832
11833
11834 typedef unsigned int __kernel_uid32_t;
11835 typedef unsigned int __kernel_gid32_t;
11836
11837
11838
11839 typedef __kernel_uid_t __kernel_old_uid_t;
11840 typedef __kernel_gid_t __kernel_old_gid_t;
11841 # 67 "/usr/include/asm-generic/posix_types.h" 3 4
11842 typedef unsigned int __kernel_size_t;
11843 typedef int __kernel_ssize_t;
11844 typedef int __kernel_ptrdiff_t;
11845 # 78 "/usr/include/asm-generic/posix_types.h" 3 4
11846 typedef struct {
11847 int val[2];
11848 } __kernel_fsid_t;
11849
11850
11851
11852
11853
11854 typedef __kernel_long_t __kernel_off_t;
11855 typedef long long __kernel_loff_t;
11856 typedef __kernel_long_t __kernel_time_t;
11857 typedef __kernel_long_t __kernel_clock_t;
11858 typedef int __kernel_timer_t;
11859 typedef int __kernel_clockid_t;
11860 typedef char * __kernel_caddr_t;
11861 typedef unsigned short __kernel_uid16_t;
11862 typedef unsigned short __kernel_gid16_t;
11863 # 36 "/usr/include/asm/posix_types.h" 2 3 4
11864 # 36 "/usr/include/linux/posix_types.h" 2 3 4
11865 # 9 "/usr/include/linux/types.h" 2 3 4
11866 # 27 "/usr/include/linux/types.h" 3 4
11867 typedef __u16 __le16;
11868 typedef __u16 __be16;
11869 typedef __u32 __le32;
11870 typedef __u32 __be32;
11871 typedef __u64 __le64;
11872 typedef __u64 __be64;
11873
11874 typedef __u16 __sum16;
11875 typedef __u32 __wsum;
11876 # 5 "/usr/include/linux/sysinfo.h" 2 3 4
11877
11878
11879 struct sysinfo {
11880 __kernel_long_t uptime;
11881 __kernel_ulong_t loads[3];
11882 __kernel_ulong_t totalram;
11883 __kernel_ulong_t freeram;
11884 __kernel_ulong_t sharedram;
11885 __kernel_ulong_t bufferram;
11886 __kernel_ulong_t totalswap;
11887 __kernel_ulong_t freeswap;
11888 __u16 procs;
11889 __u16 pad;
11890 __kernel_ulong_t totalhigh;
11891 __kernel_ulong_t freehigh;
11892 __u32 mem_unit;
11893 char _f[20-2*sizeof(__kernel_ulong_t)-sizeof(__u32)];
11894 };
11895 # 5 "/usr/include/linux/kernel.h" 2 3 4
11896 # 5 "/usr/include/linux/netlink.h" 2 3 4
11897 # 1 "/usr/include/linux/socket.h" 1 3 4
11898 # 11 "/usr/include/linux/socket.h" 3 4
11899 typedef unsigned short __kernel_sa_family_t;
11900
11901 struct __kernel_sockaddr_storage {
11902 __kernel_sa_family_t ss_family;
11903
11904 char __data[128 - sizeof(unsigned short)];
11905
11906
11907 } __attribute__ ((aligned((__alignof__ (struct sockaddr *)))));
11908 # 6 "/usr/include/linux/netlink.h" 2 3 4
11909 # 35 "/usr/include/linux/netlink.h" 3 4
11910 struct sockaddr_nl {
11911 __kernel_sa_family_t nl_family;
11912 unsigned short nl_pad;
11913 __u32 nl_pid;
11914 __u32 nl_groups;
11915 };
11916
11917 struct nlmsghdr {
11918 __u32 nlmsg_len;
11919 __u16 nlmsg_type;
11920 __u16 nlmsg_flags;
11921 __u32 nlmsg_seq;
11922 __u32 nlmsg_pid;
11923 };
11924 # 99 "/usr/include/linux/netlink.h" 3 4
11925 struct nlmsgerr {
11926 int error;
11927 struct nlmsghdr msg;
11928 };
11929 # 112 "/usr/include/linux/netlink.h" 3 4
11930 struct nl_pktinfo {
11931 __u32 group;
11932 };
11933
11934 struct nl_mmap_req {
11935 unsigned int nm_block_size;
11936 unsigned int nm_block_nr;
11937 unsigned int nm_frame_size;
11938 unsigned int nm_frame_nr;
11939 };
11940
11941 struct nl_mmap_hdr {
11942 unsigned int nm_status;
11943 unsigned int nm_len;
11944 __u32 nm_group;
11945
11946 __u32 nm_pid;
11947 __u32 nm_uid;
11948 __u32 nm_gid;
11949 };
11950
11951 enum nl_mmap_status {
11952 NL_MMAP_STATUS_UNUSED,
11953 NL_MMAP_STATUS_RESERVED,
11954 NL_MMAP_STATUS_VALID,
11955 NL_MMAP_STATUS_COPY,
11956 NL_MMAP_STATUS_SKIP,
11957 };
11958
11959
11960
11961
11962
11963
11964
11965 enum {
11966 NETLINK_UNCONNECTED = 0,
11967 NETLINK_CONNECTED,
11968 };
11969 # 161 "/usr/include/linux/netlink.h" 3 4
11970 struct nlattr {
11971 __u16 nla_len;
11972 __u16 nla_type;
11973 };
11974 # 8 "networking/libiproute/ip_common.h" 2
11975 # 1 "/usr/include/linux/rtnetlink.h" 1 3 4
11976
11977
11978
11979
11980
11981 # 1 "/usr/include/linux/if_link.h" 1 3 4
11982
11983
11984
11985
11986
11987
11988
11989 struct rtnl_link_stats {
11990 __u32 rx_packets;
11991 __u32 tx_packets;
11992 __u32 rx_bytes;
11993 __u32 tx_bytes;
11994 __u32 rx_errors;
11995 __u32 tx_errors;
11996 __u32 rx_dropped;
11997 __u32 tx_dropped;
11998 __u32 multicast;
11999 __u32 collisions;
12000
12001
12002 __u32 rx_length_errors;
12003 __u32 rx_over_errors;
12004 __u32 rx_crc_errors;
12005 __u32 rx_frame_errors;
12006 __u32 rx_fifo_errors;
12007 __u32 rx_missed_errors;
12008
12009
12010 __u32 tx_aborted_errors;
12011 __u32 tx_carrier_errors;
12012 __u32 tx_fifo_errors;
12013 __u32 tx_heartbeat_errors;
12014 __u32 tx_window_errors;
12015
12016
12017 __u32 rx_compressed;
12018 __u32 tx_compressed;
12019 };
12020
12021
12022 struct rtnl_link_stats64 {
12023 __u64 rx_packets;
12024 __u64 tx_packets;
12025 __u64 rx_bytes;
12026 __u64 tx_bytes;
12027 __u64 rx_errors;
12028 __u64 tx_errors;
12029 __u64 rx_dropped;
12030 __u64 tx_dropped;
12031 __u64 multicast;
12032 __u64 collisions;
12033
12034
12035 __u64 rx_length_errors;
12036 __u64 rx_over_errors;
12037 __u64 rx_crc_errors;
12038 __u64 rx_frame_errors;
12039 __u64 rx_fifo_errors;
12040 __u64 rx_missed_errors;
12041
12042
12043 __u64 tx_aborted_errors;
12044 __u64 tx_carrier_errors;
12045 __u64 tx_fifo_errors;
12046 __u64 tx_heartbeat_errors;
12047 __u64 tx_window_errors;
12048
12049
12050 __u64 rx_compressed;
12051 __u64 tx_compressed;
12052 };
12053
12054
12055 struct rtnl_link_ifmap {
12056 __u64 mem_start;
12057 __u64 mem_end;
12058 __u64 base_addr;
12059 __u16 irq;
12060 __u8 dma;
12061 __u8 port;
12062 };
12063 # 101 "/usr/include/linux/if_link.h" 3 4
12064 enum {
12065 IFLA_UNSPEC,
12066 IFLA_ADDRESS,
12067 IFLA_BROADCAST,
12068 IFLA_IFNAME,
12069 IFLA_MTU,
12070 IFLA_LINK,
12071 IFLA_QDISC,
12072 IFLA_STATS,
12073 IFLA_COST,
12074
12075 IFLA_PRIORITY,
12076
12077 IFLA_MASTER,
12078
12079 IFLA_WIRELESS,
12080
12081 IFLA_PROTINFO,
12082
12083 IFLA_TXQLEN,
12084
12085 IFLA_MAP,
12086
12087 IFLA_WEIGHT,
12088
12089 IFLA_OPERSTATE,
12090 IFLA_LINKMODE,
12091 IFLA_LINKINFO,
12092
12093 IFLA_NET_NS_PID,
12094 IFLA_IFALIAS,
12095 IFLA_NUM_VF,
12096 IFLA_VFINFO_LIST,
12097 IFLA_STATS64,
12098 IFLA_VF_PORTS,
12099 IFLA_PORT_SELF,
12100 IFLA_AF_SPEC,
12101 IFLA_GROUP,
12102 IFLA_NET_NS_FD,
12103 IFLA_EXT_MASK,
12104 IFLA_PROMISCUITY,
12105
12106 IFLA_NUM_TX_QUEUES,
12107 IFLA_NUM_RX_QUEUES,
12108 IFLA_CARRIER,
12109 IFLA_PHYS_PORT_ID,
12110 __IFLA_MAX
12111 };
12112 # 157 "/usr/include/linux/if_link.h" 3 4
12113 enum {
12114 IFLA_INET_UNSPEC,
12115 IFLA_INET_CONF,
12116 __IFLA_INET_MAX,
12117 };
12118 # 195 "/usr/include/linux/if_link.h" 3 4
12119 enum {
12120 IFLA_INET6_UNSPEC,
12121 IFLA_INET6_FLAGS,
12122 IFLA_INET6_CONF,
12123 IFLA_INET6_STATS,
12124 IFLA_INET6_MCAST,
12125 IFLA_INET6_CACHEINFO,
12126 IFLA_INET6_ICMP6STATS,
12127 IFLA_INET6_TOKEN,
12128 __IFLA_INET6_MAX
12129 };
12130
12131
12132
12133 enum {
12134 BRIDGE_MODE_UNSPEC,
12135 BRIDGE_MODE_HAIRPIN,
12136 };
12137
12138 enum {
12139 IFLA_BRPORT_UNSPEC,
12140 IFLA_BRPORT_STATE,
12141 IFLA_BRPORT_PRIORITY,
12142 IFLA_BRPORT_COST,
12143 IFLA_BRPORT_MODE,
12144 IFLA_BRPORT_GUARD,
12145 IFLA_BRPORT_PROTECT,
12146 IFLA_BRPORT_FAST_LEAVE,
12147 IFLA_BRPORT_LEARNING,
12148 IFLA_BRPORT_UNICAST_FLOOD,
12149 __IFLA_BRPORT_MAX
12150 };
12151
12152
12153 struct ifla_cacheinfo {
12154 __u32 max_reasm_len;
12155 __u32 tstamp;
12156 __u32 reachable_time;
12157 __u32 retrans_time;
12158 };
12159
12160 enum {
12161 IFLA_INFO_UNSPEC,
12162 IFLA_INFO_KIND,
12163 IFLA_INFO_DATA,
12164 IFLA_INFO_XSTATS,
12165 __IFLA_INFO_MAX,
12166 };
12167
12168
12169
12170
12171
12172 enum {
12173 IFLA_VLAN_UNSPEC,
12174 IFLA_VLAN_ID,
12175 IFLA_VLAN_FLAGS,
12176 IFLA_VLAN_EGRESS_QOS,
12177 IFLA_VLAN_INGRESS_QOS,
12178 IFLA_VLAN_PROTOCOL,
12179 __IFLA_VLAN_MAX,
12180 };
12181
12182
12183
12184 struct ifla_vlan_flags {
12185 __u32 flags;
12186 __u32 mask;
12187 };
12188
12189 enum {
12190 IFLA_VLAN_QOS_UNSPEC,
12191 IFLA_VLAN_QOS_MAPPING,
12192 __IFLA_VLAN_QOS_MAX
12193 };
12194
12195
12196
12197 struct ifla_vlan_qos_mapping {
12198 __u32 from;
12199 __u32 to;
12200 };
12201
12202
12203 enum {
12204 IFLA_MACVLAN_UNSPEC,
12205 IFLA_MACVLAN_MODE,
12206 IFLA_MACVLAN_FLAGS,
12207 __IFLA_MACVLAN_MAX,
12208 };
12209
12210
12211
12212 enum macvlan_mode {
12213 MACVLAN_MODE_PRIVATE = 1,
12214 MACVLAN_MODE_VEPA = 2,
12215 MACVLAN_MODE_BRIDGE = 4,
12216 MACVLAN_MODE_PASSTHRU = 8,
12217 };
12218
12219
12220
12221
12222 enum {
12223 IFLA_VXLAN_UNSPEC,
12224 IFLA_VXLAN_ID,
12225 IFLA_VXLAN_GROUP,
12226 IFLA_VXLAN_LINK,
12227 IFLA_VXLAN_LOCAL,
12228 IFLA_VXLAN_TTL,
12229 IFLA_VXLAN_TOS,
12230 IFLA_VXLAN_LEARNING,
12231 IFLA_VXLAN_AGEING,
12232 IFLA_VXLAN_LIMIT,
12233 IFLA_VXLAN_PORT_RANGE,
12234 IFLA_VXLAN_PROXY,
12235 IFLA_VXLAN_RSC,
12236 IFLA_VXLAN_L2MISS,
12237 IFLA_VXLAN_L3MISS,
12238 IFLA_VXLAN_PORT,
12239 IFLA_VXLAN_GROUP6,
12240 IFLA_VXLAN_LOCAL6,
12241 __IFLA_VXLAN_MAX
12242 };
12243
12244
12245 struct ifla_vxlan_port_range {
12246 __be16 low;
12247 __be16 high;
12248 };
12249
12250
12251
12252 enum {
12253 IFLA_BOND_UNSPEC,
12254 IFLA_BOND_MODE,
12255 IFLA_BOND_ACTIVE_SLAVE,
12256 __IFLA_BOND_MAX,
12257 };
12258
12259
12260
12261
12262
12263 enum {
12264 IFLA_VF_INFO_UNSPEC,
12265 IFLA_VF_INFO,
12266 __IFLA_VF_INFO_MAX,
12267 };
12268
12269
12270
12271 enum {
12272 IFLA_VF_UNSPEC,
12273 IFLA_VF_MAC,
12274 IFLA_VF_VLAN,
12275 IFLA_VF_TX_RATE,
12276 IFLA_VF_SPOOFCHK,
12277 IFLA_VF_LINK_STATE,
12278 __IFLA_VF_MAX,
12279 };
12280
12281
12282
12283 struct ifla_vf_mac {
12284 __u32 vf;
12285 __u8 mac[32];
12286 };
12287
12288 struct ifla_vf_vlan {
12289 __u32 vf;
12290 __u32 vlan;
12291 __u32 qos;
12292 };
12293
12294 struct ifla_vf_tx_rate {
12295 __u32 vf;
12296 __u32 rate;
12297 };
12298
12299 struct ifla_vf_spoofchk {
12300 __u32 vf;
12301 __u32 setting;
12302 };
12303
12304 enum {
12305 IFLA_VF_LINK_STATE_AUTO,
12306 IFLA_VF_LINK_STATE_ENABLE,
12307 IFLA_VF_LINK_STATE_DISABLE,
12308 __IFLA_VF_LINK_STATE_MAX,
12309 };
12310
12311 struct ifla_vf_link_state {
12312 __u32 vf;
12313 __u32 link_state;
12314 };
12315 # 407 "/usr/include/linux/if_link.h" 3 4
12316 enum {
12317 IFLA_VF_PORT_UNSPEC,
12318 IFLA_VF_PORT,
12319 __IFLA_VF_PORT_MAX,
12320 };
12321
12322
12323
12324 enum {
12325 IFLA_PORT_UNSPEC,
12326 IFLA_PORT_VF,
12327 IFLA_PORT_PROFILE,
12328 IFLA_PORT_VSI_TYPE,
12329 IFLA_PORT_INSTANCE_UUID,
12330 IFLA_PORT_HOST_UUID,
12331 IFLA_PORT_REQUEST,
12332 IFLA_PORT_RESPONSE,
12333 __IFLA_PORT_MAX,
12334 };
12335
12336
12337
12338
12339
12340
12341
12342 enum {
12343 PORT_REQUEST_PREASSOCIATE = 0,
12344 PORT_REQUEST_PREASSOCIATE_RR,
12345 PORT_REQUEST_ASSOCIATE,
12346 PORT_REQUEST_DISASSOCIATE,
12347 };
12348
12349 enum {
12350 PORT_VDP_RESPONSE_SUCCESS = 0,
12351 PORT_VDP_RESPONSE_INVALID_FORMAT,
12352 PORT_VDP_RESPONSE_INSUFFICIENT_RESOURCES,
12353 PORT_VDP_RESPONSE_UNUSED_VTID,
12354 PORT_VDP_RESPONSE_VTID_VIOLATION,
12355 PORT_VDP_RESPONSE_VTID_VERSION_VIOALTION,
12356 PORT_VDP_RESPONSE_OUT_OF_SYNC,
12357
12358 PORT_PROFILE_RESPONSE_SUCCESS = 0x100,
12359 PORT_PROFILE_RESPONSE_INPROGRESS,
12360 PORT_PROFILE_RESPONSE_INVALID,
12361 PORT_PROFILE_RESPONSE_BADSTATE,
12362 PORT_PROFILE_RESPONSE_INSUFFICIENT_RESOURCES,
12363 PORT_PROFILE_RESPONSE_ERROR,
12364 };
12365
12366 struct ifla_port_vsi {
12367 __u8 vsi_mgr_id;
12368 __u8 vsi_type_id[3];
12369 __u8 vsi_type_version;
12370 __u8 pad[3];
12371 };
12372
12373
12374
12375
12376 enum {
12377 IFLA_IPOIB_UNSPEC,
12378 IFLA_IPOIB_PKEY,
12379 IFLA_IPOIB_MODE,
12380 IFLA_IPOIB_UMCAST,
12381 __IFLA_IPOIB_MAX
12382 };
12383
12384 enum {
12385 IPOIB_MODE_DATAGRAM = 0,
12386 IPOIB_MODE_CONNECTED = 1,
12387 };
12388
12389
12390
12391
12392
12393
12394 enum {
12395 IFLA_HSR_UNSPEC,
12396 IFLA_HSR_SLAVE1,
12397 IFLA_HSR_SLAVE2,
12398 IFLA_HSR_MULTICAST_SPEC,
12399 IFLA_HSR_SUPERVISION_ADDR,
12400 IFLA_HSR_SEQ_NR,
12401 __IFLA_HSR_MAX,
12402 };
12403 # 7 "/usr/include/linux/rtnetlink.h" 2 3 4
12404 # 1 "/usr/include/linux/if_addr.h" 1 3 4
12405
12406
12407
12408
12409
12410
12411 struct ifaddrmsg {
12412 __u8 ifa_family;
12413 __u8 ifa_prefixlen;
12414 __u8 ifa_flags;
12415 __u8 ifa_scope;
12416 __u32 ifa_index;
12417 };
12418 # 22 "/usr/include/linux/if_addr.h" 3 4
12419 enum {
12420 IFA_UNSPEC,
12421 IFA_ADDRESS,
12422 IFA_LOCAL,
12423 IFA_LABEL,
12424 IFA_BROADCAST,
12425 IFA_ANYCAST,
12426 IFA_CACHEINFO,
12427 IFA_MULTICAST,
12428 __IFA_MAX,
12429 };
12430 # 48 "/usr/include/linux/if_addr.h" 3 4
12431 struct ifa_cacheinfo {
12432 __u32 ifa_prefered;
12433 __u32 ifa_valid;
12434 __u32 cstamp;
12435 __u32 tstamp;
12436 };
12437 # 8 "/usr/include/linux/rtnetlink.h" 2 3 4
12438 # 1 "/usr/include/linux/neighbour.h" 1 3 4
12439
12440
12441
12442
12443
12444
12445 struct ndmsg {
12446 __u8 ndm_family;
12447 __u8 ndm_pad1;
12448 __u16 ndm_pad2;
12449 __s32 ndm_ifindex;
12450 __u16 ndm_state;
12451 __u8 ndm_flags;
12452 __u8 ndm_type;
12453 };
12454
12455 enum {
12456 NDA_UNSPEC,
12457 NDA_DST,
12458 NDA_LLADDR,
12459 NDA_CACHEINFO,
12460 NDA_PROBES,
12461 NDA_VLAN,
12462 NDA_PORT,
12463 NDA_VNI,
12464 NDA_IFINDEX,
12465 __NDA_MAX
12466 };
12467 # 64 "/usr/include/linux/neighbour.h" 3 4
12468 struct nda_cacheinfo {
12469 __u32 ndm_confirmed;
12470 __u32 ndm_used;
12471 __u32 ndm_updated;
12472 __u32 ndm_refcnt;
12473 };
12474 # 96 "/usr/include/linux/neighbour.h" 3 4
12475 struct ndt_stats {
12476 __u64 ndts_allocs;
12477 __u64 ndts_destroys;
12478 __u64 ndts_hash_grows;
12479 __u64 ndts_res_failed;
12480 __u64 ndts_lookups;
12481 __u64 ndts_hits;
12482 __u64 ndts_rcv_probes_mcast;
12483 __u64 ndts_rcv_probes_ucast;
12484 __u64 ndts_periodic_gc_runs;
12485 __u64 ndts_forced_gc_runs;
12486 };
12487
12488 enum {
12489 NDTPA_UNSPEC,
12490 NDTPA_IFINDEX,
12491 NDTPA_REFCNT,
12492 NDTPA_REACHABLE_TIME,
12493 NDTPA_BASE_REACHABLE_TIME,
12494 NDTPA_RETRANS_TIME,
12495 NDTPA_GC_STALETIME,
12496 NDTPA_DELAY_PROBE_TIME,
12497 NDTPA_QUEUE_LEN,
12498 NDTPA_APP_PROBES,
12499 NDTPA_UCAST_PROBES,
12500 NDTPA_MCAST_PROBES,
12501 NDTPA_ANYCAST_DELAY,
12502 NDTPA_PROXY_DELAY,
12503 NDTPA_PROXY_QLEN,
12504 NDTPA_LOCKTIME,
12505 NDTPA_QUEUE_LENBYTES,
12506 __NDTPA_MAX
12507 };
12508
12509
12510 struct ndtmsg {
12511 __u8 ndtm_family;
12512 __u8 ndtm_pad1;
12513 __u16 ndtm_pad2;
12514 };
12515
12516 struct ndt_config {
12517 __u16 ndtc_key_len;
12518 __u16 ndtc_entry_size;
12519 __u32 ndtc_entries;
12520 __u32 ndtc_last_flush;
12521 __u32 ndtc_last_rand;
12522 __u32 ndtc_hash_rnd;
12523 __u32 ndtc_hash_mask;
12524 __u32 ndtc_hash_chain_gc;
12525 __u32 ndtc_proxy_qlen;
12526 };
12527
12528 enum {
12529 NDTA_UNSPEC,
12530 NDTA_NAME,
12531 NDTA_THRESH1,
12532 NDTA_THRESH2,
12533 NDTA_THRESH3,
12534 NDTA_CONFIG,
12535 NDTA_PARMS,
12536 NDTA_STATS,
12537 NDTA_GC_INTERVAL,
12538 __NDTA_MAX
12539 };
12540 # 9 "/usr/include/linux/rtnetlink.h" 2 3 4
12541 # 23 "/usr/include/linux/rtnetlink.h" 3 4
12542 enum {
12543 RTM_BASE = 16,
12544
12545
12546 RTM_NEWLINK = 16,
12547
12548 RTM_DELLINK,
12549
12550 RTM_GETLINK,
12551
12552 RTM_SETLINK,
12553
12554
12555 RTM_NEWADDR = 20,
12556
12557 RTM_DELADDR,
12558
12559 RTM_GETADDR,
12560
12561
12562 RTM_NEWROUTE = 24,
12563
12564 RTM_DELROUTE,
12565
12566 RTM_GETROUTE,
12567
12568
12569 RTM_NEWNEIGH = 28,
12570
12571 RTM_DELNEIGH,
12572
12573 RTM_GETNEIGH,
12574
12575
12576 RTM_NEWRULE = 32,
12577
12578 RTM_DELRULE,
12579
12580 RTM_GETRULE,
12581
12582
12583 RTM_NEWQDISC = 36,
12584
12585 RTM_DELQDISC,
12586
12587 RTM_GETQDISC,
12588
12589
12590 RTM_NEWTCLASS = 40,
12591
12592 RTM_DELTCLASS,
12593
12594 RTM_GETTCLASS,
12595
12596
12597 RTM_NEWTFILTER = 44,
12598
12599 RTM_DELTFILTER,
12600
12601 RTM_GETTFILTER,
12602
12603
12604 RTM_NEWACTION = 48,
12605
12606 RTM_DELACTION,
12607
12608 RTM_GETACTION,
12609
12610
12611 RTM_NEWPREFIX = 52,
12612
12613
12614 RTM_GETMULTICAST = 58,
12615
12616
12617 RTM_GETANYCAST = 62,
12618
12619
12620 RTM_NEWNEIGHTBL = 64,
12621
12622 RTM_GETNEIGHTBL = 66,
12623
12624 RTM_SETNEIGHTBL,
12625
12626
12627 RTM_NEWNDUSEROPT = 68,
12628
12629
12630 RTM_NEWADDRLABEL = 72,
12631
12632 RTM_DELADDRLABEL,
12633
12634 RTM_GETADDRLABEL,
12635
12636
12637 RTM_GETDCB = 78,
12638
12639 RTM_SETDCB,
12640
12641
12642 RTM_NEWNETCONF = 80,
12643
12644 RTM_GETNETCONF = 82,
12645
12646
12647 RTM_NEWMDB = 84,
12648
12649 RTM_DELMDB = 85,
12650
12651 RTM_GETMDB = 86,
12652
12653
12654 __RTM_MAX,
12655
12656 };
12657 # 149 "/usr/include/linux/rtnetlink.h" 3 4
12658 struct rtattr {
12659 unsigned short rta_len;
12660 unsigned short rta_type;
12661 };
12662 # 175 "/usr/include/linux/rtnetlink.h" 3 4
12663 struct rtmsg {
12664 unsigned char rtm_family;
12665 unsigned char rtm_dst_len;
12666 unsigned char rtm_src_len;
12667 unsigned char rtm_tos;
12668
12669 unsigned char rtm_table;
12670 unsigned char rtm_protocol;
12671 unsigned char rtm_scope;
12672 unsigned char rtm_type;
12673
12674 unsigned rtm_flags;
12675 };
12676
12677
12678
12679 enum {
12680 RTN_UNSPEC,
12681 RTN_UNICAST,
12682 RTN_LOCAL,
12683 RTN_BROADCAST,
12684
12685 RTN_ANYCAST,
12686
12687 RTN_MULTICAST,
12688 RTN_BLACKHOLE,
12689 RTN_UNREACHABLE,
12690 RTN_PROHIBIT,
12691 RTN_THROW,
12692 RTN_NAT,
12693 RTN_XRESOLVE,
12694 __RTN_MAX
12695 };
12696 # 250 "/usr/include/linux/rtnetlink.h" 3 4
12697 enum rt_scope_t {
12698 RT_SCOPE_UNIVERSE=0,
12699
12700 RT_SCOPE_SITE=200,
12701 RT_SCOPE_LINK=253,
12702 RT_SCOPE_HOST=254,
12703 RT_SCOPE_NOWHERE=255
12704 };
12705 # 268 "/usr/include/linux/rtnetlink.h" 3 4
12706 enum rt_class_t {
12707 RT_TABLE_UNSPEC=0,
12708
12709 RT_TABLE_COMPAT=252,
12710 RT_TABLE_DEFAULT=253,
12711 RT_TABLE_MAIN=254,
12712 RT_TABLE_LOCAL=255,
12713 RT_TABLE_MAX=0xFFFFFFFF
12714 };
12715
12716
12717
12718
12719 enum rtattr_type_t {
12720 RTA_UNSPEC,
12721 RTA_DST,
12722 RTA_SRC,
12723 RTA_IIF,
12724 RTA_OIF,
12725 RTA_GATEWAY,
12726 RTA_PRIORITY,
12727 RTA_PREFSRC,
12728 RTA_METRICS,
12729 RTA_MULTIPATH,
12730 RTA_PROTOINFO,
12731 RTA_FLOW,
12732 RTA_CACHEINFO,
12733 RTA_SESSION,
12734 RTA_MP_ALGO,
12735 RTA_TABLE,
12736 RTA_MARK,
12737 RTA_MFC_STATS,
12738 __RTA_MAX
12739 };
12740 # 317 "/usr/include/linux/rtnetlink.h" 3 4
12741 struct rtnexthop {
12742 unsigned short rtnh_len;
12743 unsigned char rtnh_flags;
12744 unsigned char rtnh_hops;
12745 int rtnh_ifindex;
12746 };
12747 # 343 "/usr/include/linux/rtnetlink.h" 3 4
12748 struct rta_cacheinfo {
12749 __u32 rta_clntref;
12750 __u32 rta_lastuse;
12751 __s32 rta_expires;
12752 __u32 rta_error;
12753 __u32 rta_used;
12754
12755
12756 __u32 rta_id;
12757 __u32 rta_ts;
12758 __u32 rta_tsage;
12759 };
12760
12761
12762
12763 enum {
12764 RTAX_UNSPEC,
12765
12766 RTAX_LOCK,
12767
12768 RTAX_MTU,
12769
12770 RTAX_WINDOW,
12771
12772 RTAX_RTT,
12773
12774 RTAX_RTTVAR,
12775
12776 RTAX_SSTHRESH,
12777
12778 RTAX_CWND,
12779
12780 RTAX_ADVMSS,
12781
12782 RTAX_REORDERING,
12783
12784 RTAX_HOPLIMIT,
12785
12786 RTAX_INITCWND,
12787
12788 RTAX_FEATURES,
12789
12790 RTAX_RTO_MIN,
12791
12792 RTAX_INITRWND,
12793
12794 RTAX_QUICKACK,
12795
12796 __RTAX_MAX
12797 };
12798 # 401 "/usr/include/linux/rtnetlink.h" 3 4
12799 struct rta_session {
12800 __u8 proto;
12801 __u8 pad1;
12802 __u16 pad2;
12803
12804 union {
12805 struct {
12806 __u16 sport;
12807 __u16 dport;
12808 } ports;
12809
12810 struct {
12811 __u8 type;
12812 __u8 code;
12813 __u16 ident;
12814 } icmpt;
12815
12816 __u32 spi;
12817 } u;
12818 };
12819
12820 struct rta_mfc_stats {
12821 __u64 mfcs_packets;
12822 __u64 mfcs_bytes;
12823 __u64 mfcs_wrong_if;
12824 };
12825
12826
12827
12828
12829
12830 struct rtgenmsg {
12831 unsigned char rtgen_family;
12832 };
12833 # 445 "/usr/include/linux/rtnetlink.h" 3 4
12834 struct ifinfomsg {
12835 unsigned char ifi_family;
12836 unsigned char __ifi_pad;
12837 unsigned short ifi_type;
12838 int ifi_index;
12839 unsigned ifi_flags;
12840 unsigned ifi_change;
12841 };
12842
12843
12844
12845
12846
12847 struct prefixmsg {
12848 unsigned char prefix_family;
12849 unsigned char prefix_pad1;
12850 unsigned short prefix_pad2;
12851 int prefix_ifindex;
12852 unsigned char prefix_type;
12853 unsigned char prefix_len;
12854 unsigned char prefix_flags;
12855 unsigned char prefix_pad3;
12856 };
12857
12858 enum
12859 {
12860 PREFIX_UNSPEC,
12861 PREFIX_ADDRESS,
12862 PREFIX_CACHEINFO,
12863 __PREFIX_MAX
12864 };
12865
12866
12867
12868 struct prefix_cacheinfo {
12869 __u32 preferred_time;
12870 __u32 valid_time;
12871 };
12872
12873
12874
12875
12876
12877
12878 struct tcmsg {
12879 unsigned char tcm_family;
12880 unsigned char tcm__pad1;
12881 unsigned short tcm__pad2;
12882 int tcm_ifindex;
12883 __u32 tcm_handle;
12884 __u32 tcm_parent;
12885 __u32 tcm_info;
12886 };
12887
12888 enum {
12889 TCA_UNSPEC,
12890 TCA_KIND,
12891 TCA_OPTIONS,
12892 TCA_STATS,
12893 TCA_XSTATS,
12894 TCA_RATE,
12895 TCA_FCNT,
12896 TCA_STATS2,
12897 TCA_STAB,
12898 __TCA_MAX
12899 };
12900 # 521 "/usr/include/linux/rtnetlink.h" 3 4
12901 struct nduseroptmsg {
12902 unsigned char nduseropt_family;
12903 unsigned char nduseropt_pad1;
12904 unsigned short nduseropt_opts_len;
12905 int nduseropt_ifindex;
12906 __u8 nduseropt_icmp_type;
12907 __u8 nduseropt_icmp_code;
12908 unsigned short nduseropt_pad2;
12909 unsigned int nduseropt_pad3;
12910
12911 };
12912
12913 enum {
12914 NDUSEROPT_UNSPEC,
12915 NDUSEROPT_SRCADDR,
12916 __NDUSEROPT_MAX
12917 };
12918 # 563 "/usr/include/linux/rtnetlink.h" 3 4
12919 enum rtnetlink_groups {
12920 RTNLGRP_NONE,
12921
12922 RTNLGRP_LINK,
12923
12924 RTNLGRP_NOTIFY,
12925
12926 RTNLGRP_NEIGH,
12927
12928 RTNLGRP_TC,
12929
12930 RTNLGRP_IPV4_IFADDR,
12931
12932 RTNLGRP_IPV4_MROUTE,
12933
12934 RTNLGRP_IPV4_ROUTE,
12935
12936 RTNLGRP_IPV4_RULE,
12937
12938 RTNLGRP_IPV6_IFADDR,
12939
12940 RTNLGRP_IPV6_MROUTE,
12941
12942 RTNLGRP_IPV6_ROUTE,
12943
12944 RTNLGRP_IPV6_IFINFO,
12945
12946 RTNLGRP_DECnet_IFADDR,
12947
12948 RTNLGRP_NOP2,
12949 RTNLGRP_DECnet_ROUTE,
12950
12951 RTNLGRP_DECnet_RULE,
12952
12953 RTNLGRP_NOP4,
12954 RTNLGRP_IPV6_PREFIX,
12955
12956 RTNLGRP_IPV6_RULE,
12957
12958 RTNLGRP_ND_USEROPT,
12959
12960 RTNLGRP_PHONET_IFADDR,
12961
12962 RTNLGRP_PHONET_ROUTE,
12963
12964 RTNLGRP_DCB,
12965
12966 RTNLGRP_IPV4_NETCONF,
12967
12968 RTNLGRP_IPV6_NETCONF,
12969
12970 RTNLGRP_MDB,
12971
12972 __RTNLGRP_MAX
12973 };
12974
12975
12976
12977 struct tcamsg {
12978 unsigned char tca_family;
12979 unsigned char tca__pad1;
12980 unsigned short tca__pad2;
12981 };
12982 # 9 "networking/libiproute/ip_common.h" 2
12983
12984
12985
12986
12987
12988
12989
12990
12991 # 16 "networking/libiproute/ip_common.h"
12992 #pragma GCC visibility push(hidden)
12993 # 16 "networking/libiproute/ip_common.h"
12994
12995
12996 char **ip_parse_common_args(char **argv);
12997
12998 int ipaddr_list_or_flush(char **argv, int flush);
12999
13000
13001
13002 int do_ipaddr(char **argv);
13003 int do_iproute(char **argv);
13004 int do_iprule(char **argv);
13005
13006 int do_iptunnel(char **argv);
13007 int do_iplink(char **argv);
13008
13009
13010
13011
13012
13013 # 34 "networking/libiproute/ip_common.h"
13014 #pragma GCC visibility pop
13015 # 34 "networking/libiproute/ip_common.h"
13016
13017 # 16 "networking/libiproute/ipaddress.c" 2
13018 # 1 "networking/libiproute/rt_names.h" 1
13019
13020
13021
13022
13023
13024 # 5 "networking/libiproute/rt_names.h"
13025 #pragma GCC visibility push(hidden)
13026 # 5 "networking/libiproute/rt_names.h"
13027
13028
13029
13030 extern const char* rtnl_rtprot_n2a(int id, char *buf) ;
13031 extern const char* rtnl_rtscope_n2a(int id, char *buf) ;
13032 extern const char* rtnl_rtrealm_n2a(int id, char *buf) ;
13033 extern const char* rtnl_dsfield_n2a(int id, char *buf) ;
13034 extern const char* rtnl_rttable_n2a(int id, char *buf) ;
13035 extern int rtnl_rtprot_a2n(uint32_t *id, char *arg) ;
13036 extern int rtnl_rtscope_a2n(uint32_t *id, char *arg) ;
13037 extern int rtnl_rtrealm_a2n(uint32_t *id, char *arg) ;
13038 extern int rtnl_dsfield_a2n(uint32_t *id, char *arg) ;
13039 extern int rtnl_rttable_a2n(uint32_t *id, char *arg) ;
13040
13041 extern const char* ll_type_n2a(int type, char *buf) ;
13042
13043 extern const char* ll_addr_n2a(unsigned char *addr, int alen, int type,
13044 char *buf, int blen) ;
13045 extern int ll_addr_a2n(unsigned char *lladdr, int len, char *arg) ;
13046
13047 extern const char* ll_proto_n2a(unsigned short id, char *buf, int len) ;
13048 extern int ll_proto_a2n(unsigned short *id, char *buf) ;
13049
13050
13051 # 28 "networking/libiproute/rt_names.h"
13052 #pragma GCC visibility pop
13053 # 28 "networking/libiproute/rt_names.h"
13054
13055 # 17 "networking/libiproute/ipaddress.c" 2
13056 # 1 "networking/libiproute/utils.h" 1
13057
13058
13059
13060
13061 # 1 "networking/libiproute/libnetlink.h" 1
13062 # 11 "networking/libiproute/libnetlink.h"
13063
13064 # 11 "networking/libiproute/libnetlink.h"
13065 #pragma GCC visibility push(hidden)
13066 # 11 "networking/libiproute/libnetlink.h"
13067
13068
13069 struct rtnl_handle {
13070 int fd;
13071 struct sockaddr_nl local;
13072 struct sockaddr_nl peer;
13073 uint32_t seq;
13074 uint32_t dump;
13075 };
13076
13077 extern void xrtnl_open(struct rtnl_handle *rth) ;
13078
13079 extern int xrtnl_wilddump_request(struct rtnl_handle *rth, int fam, int type) ;
13080 extern int rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, int len) ;
13081 extern int xrtnl_dump_filter(struct rtnl_handle *rth,
13082 int (*filter)(const struct sockaddr_nl*, struct nlmsghdr *n, void*) ,
13083 void *arg1) ;
13084
13085
13086
13087
13088 extern int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, struct nlmsghdr *answer)
13089
13090
13091 ;
13092
13093 extern int rtnl_send(struct rtnl_handle *rth, char *buf, int) ;
13094
13095
13096 extern int addattr32(struct nlmsghdr *n, int maxlen, int type, uint32_t data) ;
13097 extern int addattr_l(struct nlmsghdr *n, int maxlen, int type, void *data, int alen) ;
13098 extern int rta_addattr32(struct rtattr *rta, int maxlen, int type, uint32_t data) ;
13099 extern int rta_addattr_l(struct rtattr *rta, int maxlen, int type, void *data, int alen) ;
13100
13101 extern void parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len) ;
13102
13103
13104 # 47 "networking/libiproute/libnetlink.h"
13105 #pragma GCC visibility pop
13106 # 47 "networking/libiproute/libnetlink.h"
13107
13108 # 6 "networking/libiproute/utils.h" 2
13109 # 1 "networking/libiproute/ll_map.h" 1
13110
13111
13112
13113
13114
13115 # 5 "networking/libiproute/ll_map.h"
13116 #pragma GCC visibility push(hidden)
13117 # 5 "networking/libiproute/ll_map.h"
13118
13119
13120 int ll_remember_index(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) ;
13121 int ll_init_map(struct rtnl_handle *rth) ;
13122 int xll_name_to_index(const char *name) ;
13123 const char *ll_index_to_name(int idx) ;
13124 const char *ll_idx_n2a(int idx, char *buf) ;
13125
13126 unsigned ll_index_to_flags(int idx) ;
13127
13128
13129 # 15 "networking/libiproute/ll_map.h"
13130 #pragma GCC visibility pop
13131 # 15 "networking/libiproute/ll_map.h"
13132
13133 # 7 "networking/libiproute/utils.h" 2
13134 # 1 "networking/libiproute/rtm_map.h" 1
13135
13136
13137
13138
13139
13140 # 5 "networking/libiproute/rtm_map.h"
13141 #pragma GCC visibility push(hidden)
13142 # 5 "networking/libiproute/rtm_map.h"
13143
13144
13145 const char *rtnl_rtntype_n2a(int id, char *buf) ;
13146 int rtnl_rtntype_a2n(int *id, char *arg) ;
13147
13148 int get_rt_realms(uint32_t *realms, char *arg) ;
13149
13150
13151 # 12 "networking/libiproute/rtm_map.h"
13152 #pragma GCC visibility pop
13153 # 12 "networking/libiproute/rtm_map.h"
13154
13155 # 8 "networking/libiproute/utils.h" 2
13156
13157
13158 # 9 "networking/libiproute/utils.h"
13159 #pragma GCC visibility push(hidden)
13160 # 9 "networking/libiproute/utils.h"
13161
13162
13163 extern family_t preferred_family;
13164 extern smallint show_stats;
13165 extern smallint show_details;
13166 extern smallint show_raw;
13167 extern smallint resolve_hosts;
13168 extern smallint oneline;
13169 extern char _SL_;
13170 # 29 "networking/libiproute/utils.h"
13171 extern void incomplete_command(void) __attribute__ ((__noreturn__));
13172
13173
13174
13175 typedef struct {
13176 uint8_t family;
13177 uint8_t bytelen;
13178 int16_t bitlen;
13179 uint32_t data[4];
13180 } inet_prefix;
13181 # 47 "networking/libiproute/utils.h"
13182 struct dn_naddr {
13183 unsigned short a_len;
13184 unsigned char a_addr[20];
13185 };
13186
13187
13188
13189 struct ipx_addr {
13190 uint32_t ipx_net;
13191 uint8_t ipx_node[6];
13192 };
13193
13194 extern uint32_t get_addr32(char *name);
13195 extern int get_addr_1(inet_prefix *dst, char *arg, int family);
13196
13197 extern int get_addr(inet_prefix *dst, char *arg, int family);
13198 extern void get_prefix(inet_prefix *dst, char *arg, int family);
13199
13200 extern unsigned get_unsigned(char *arg, const char *errmsg);
13201 extern uint32_t get_u32(char *arg, const char *errmsg);
13202 extern uint16_t get_u16(char *arg, const char *errmsg);
13203
13204 extern const char *rt_addr_n2a(int af, void *addr, char *buf, int buflen);
13205
13206
13207
13208
13209
13210
13211
13212 void invarg(const char *, const char *) __attribute__ ((__noreturn__));
13213 void duparg(const char *, const char *) __attribute__ ((__noreturn__));
13214 void duparg2(const char *, const char *) __attribute__ ((__noreturn__));
13215 int inet_addr_match(const inet_prefix *a, const inet_prefix *b, int bits);
13216
13217 const char *dnet_ntop(int af, const void *addr, char *str, size_t len);
13218 int dnet_pton(int af, const char *src, void *addr);
13219
13220 const char *ipx_ntop(int af, const void *addr, char *str, size_t len);
13221 int ipx_pton(int af, const char *src, void *addr);
13222
13223
13224 # 88 "networking/libiproute/utils.h"
13225 #pragma GCC visibility pop
13226 # 88 "networking/libiproute/utils.h"
13227
13228 # 18 "networking/libiproute/ipaddress.c" 2
13229
13230
13231
13232
13233
13234
13235 struct filter_t {
13236 char *label;
13237 char *flushb;
13238 struct rtnl_handle *rth;
13239 int scope, scopemask;
13240 int flags, flagmask;
13241 int flushp;
13242 int flushe;
13243 int ifindex;
13244 family_t family;
13245 smallint showqueue;
13246 smallint oneline;
13247 smallint up;
13248 smallint flushed;
13249 inet_prefix pfx;
13250 } __attribute__((__may_alias__));
13251 typedef struct filter_t filter_t;
13252
13253
13254
13255
13256 static void print_link_flags(unsigned flags, unsigned mdown)
13257 {
13258 static const int flag_masks[] = {
13259 IFF_LOOPBACK, IFF_BROADCAST, IFF_POINTOPOINT,
13260 IFF_MULTICAST, IFF_NOARP, IFF_UP, 0x10000 };
13261 static const char flag_labels[] __attribute__((aligned(1))) =
13262 "LOOPBACK\0""BROADCAST\0""POINTOPOINT\0"
13263 "MULTICAST\0""NOARP\0""UP\0""LOWER_UP\0";
13264
13265 bb_putchar('<');
13266 if (flags & IFF_UP && !(flags & IFF_RUNNING))
13267 printf("NO-CARRIER,");
13268 flags &= ~IFF_RUNNING;
13269 # 69 "networking/libiproute/ipaddress.c"
13270 flags = print_flags_separated(flag_masks, flag_labels, flags, ",");
13271 if (flags)
13272 printf("%x", flags);
13273 if (mdown)
13274 printf(",M-DOWN");
13275 printf("> ");
13276 }
13277
13278 static void print_queuelen(char *name)
13279 {
13280 struct ifreq ifr;
13281 int s;
13282
13283 s = socket(2, SOCK_STREAM, 0);
13284 if (s < 0)
13285 return;
13286
13287 memset(&ifr, 0, sizeof(ifr));
13288 strncpy_IFNAMSIZ(ifr.ifr_ifrn.ifrn_name, name);
13289 if (bb_ioctl_or_warn(s,0x8942,&ifr,"SIOCGIFTXQLEN") < 0) {
13290 close(s);
13291 return;
13292 }
13293 close(s);
13294
13295 if (ifr.ifr_ifru.ifru_ivalue)
13296 printf("qlen %d", ifr.ifr_ifru.ifru_ivalue);
13297 }
13298
13299 static __attribute__((__noinline__)) int print_linkinfo(const struct nlmsghdr *n)
13300 {
13301 struct ifinfomsg *ifi = ((void*)(((char*)n) + ((0) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) )))));
13302 struct rtattr *tb[(__IFLA_MAX - 1)+1];
13303 int len = n->nlmsg_len;
13304
13305 if (n->nlmsg_type != RTM_NEWLINK && n->nlmsg_type != RTM_DELLINK)
13306 return 0;
13307
13308 len -= ((sizeof(*ifi)) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) )));
13309 if (len < 0)
13310 return -1;
13311
13312 if ((*(filter_t*)&bb_common_bufsiz1).ifindex && ifi->ifi_index != (*(filter_t*)&bb_common_bufsiz1).ifindex)
13313 return 0;
13314 if ((*(filter_t*)&bb_common_bufsiz1).up && !(ifi->ifi_flags & IFF_UP))
13315 return 0;
13316
13317 memset(tb, 0, sizeof(tb));
13318 parse_rtattr(tb, (__IFLA_MAX - 1), ((struct rtattr*)(((char*)(ifi)) + ( ((sizeof(struct ifinfomsg))+4U -1) & ~(4U -1) ))), len);
13319 if (tb[IFLA_IFNAME] == ((void *)0)) {
13320 bb_error_msg("nil ifname");
13321 return -1;
13322 }
13323 if ((*(filter_t*)&bb_common_bufsiz1).label
13324 && (!(*(filter_t*)&bb_common_bufsiz1).family || (*(filter_t*)&bb_common_bufsiz1).family == 17)
13325 && fnmatch((*(filter_t*)&bb_common_bufsiz1).label, ((void*)(((char*)(tb[IFLA_IFNAME])) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0)))), 0)
13326 ) {
13327 return 0;
13328 }
13329
13330 if (n->nlmsg_type == RTM_DELLINK)
13331 printf("Deleted ");
13332
13333 printf("%d: %s", ifi->ifi_index,
13334
13335 (char*)((void*)(((char*)(tb[IFLA_IFNAME])) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0))))
13336 );
13337
13338 {
13339 unsigned m_flag = 0;
13340 if (tb[IFLA_LINK]) {
13341 char b1[64];
13342 int iflink = *(int*)((void*)(((char*)(tb[IFLA_LINK])) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0))));
13343 if (iflink == 0)
13344 printf("@NONE: ");
13345 else {
13346 printf("@%s: ", ll_idx_n2a(iflink, b1));
13347 m_flag = ll_index_to_flags(iflink);
13348 m_flag = !(m_flag & IFF_UP);
13349 }
13350 } else {
13351 printf(": ");
13352 }
13353 print_link_flags(ifi->ifi_flags, m_flag);
13354 }
13355
13356 if (tb[IFLA_MTU])
13357 printf("mtu %u ", *(int*)((void*)(((char*)(tb[IFLA_MTU])) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0)))));
13358 if (tb[IFLA_QDISC])
13359 printf("qdisc %s ", (char*)((void*)(((char*)(tb[IFLA_QDISC])) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0)))));
13360
13361 if (tb[IFLA_MASTER]) {
13362 char b1[64];
13363 printf("master %s ", ll_idx_n2a(*(int*)((void*)(((char*)(tb[IFLA_MASTER])) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0)))), b1));
13364 }
13365 # 175 "networking/libiproute/ipaddress.c"
13366 if ((*(filter_t*)&bb_common_bufsiz1).showqueue)
13367 print_queuelen((char*)((void*)(((char*)(tb[IFLA_IFNAME])) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0)))));
13368
13369 if (!(*(filter_t*)&bb_common_bufsiz1).family || (*(filter_t*)&bb_common_bufsiz1).family == 17) {
13370 char b1[64];
13371 printf("%c link/%s ", _SL_, ll_type_n2a(ifi->ifi_type, b1));
13372
13373 if (tb[IFLA_ADDRESS]) {
13374 fputs_unlocked(ll_addr_n2a(((void*)(((char*)(tb[IFLA_ADDRESS])) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0)))), ((int)((tb[IFLA_ADDRESS])->rta_len) - (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0))), ifi->ifi_type, b1, sizeof(b1)), stdout)
13375
13376
13377 ;
13378 }
13379 if (tb[IFLA_BROADCAST]) {
13380 if (ifi->ifi_flags & IFF_POINTOPOINT)
13381 printf(" peer ");
13382 else
13383 printf(" brd ");
13384 fputs_unlocked(ll_addr_n2a(((void*)(((char*)(tb[IFLA_BROADCAST])) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0)))), ((int)((tb[IFLA_BROADCAST])->rta_len) - (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0))), ifi->ifi_type, b1, sizeof(b1)), stdout)
13385
13386
13387 ;
13388 }
13389 }
13390 bb_putchar('\n');
13391
13392 return 0;
13393 }
13394
13395 static int flush_update(void)
13396 {
13397 if (rtnl_send((*(filter_t*)&bb_common_bufsiz1).rth, (*(filter_t*)&bb_common_bufsiz1).flushb, (*(filter_t*)&bb_common_bufsiz1).flushp) < 0) {
13398 bb_perror_msg("can't send flush request");
13399 return -1;
13400 }
13401 (*(filter_t*)&bb_common_bufsiz1).flushp = 0;
13402 return 0;
13403 }
13404
13405 static int print_addrinfo(const struct sockaddr_nl *who __attribute__ ((__unused__)),
13406 struct nlmsghdr *n, void *arg __attribute__ ((__unused__)))
13407 {
13408 struct ifaddrmsg *ifa = ((void*)(((char*)n) + ((0) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) )))));
13409 int len = n->nlmsg_len;
13410 struct rtattr * rta_tb[(__IFA_MAX - 1)+1];
13411 char abuf[256];
13412 char b1[64];
13413
13414 if (n->nlmsg_type != RTM_NEWADDR && n->nlmsg_type != RTM_DELADDR)
13415 return 0;
13416 len -= ((sizeof(*ifa)) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) )));
13417 if (len < 0) {
13418 bb_error_msg("wrong nlmsg len %d", len);
13419 return -1;
13420 }
13421
13422 if ((*(filter_t*)&bb_common_bufsiz1).flushb && n->nlmsg_type != RTM_NEWADDR)
13423 return 0;
13424
13425 memset(rta_tb, 0, sizeof(rta_tb));
13426 parse_rtattr(rta_tb, (__IFA_MAX - 1), ((struct rtattr*)(((char*)(ifa)) + ( ((sizeof(struct ifaddrmsg))+4U -1) & ~(4U -1) ))), n->nlmsg_len - ((sizeof(*ifa)) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) ))));
13427
13428 if (!rta_tb[IFA_LOCAL])
13429 rta_tb[IFA_LOCAL] = rta_tb[IFA_ADDRESS];
13430 if (!rta_tb[IFA_ADDRESS])
13431 rta_tb[IFA_ADDRESS] = rta_tb[IFA_LOCAL];
13432
13433 if ((*(filter_t*)&bb_common_bufsiz1).ifindex && (*(filter_t*)&bb_common_bufsiz1).ifindex != ifa->ifa_index)
13434 return 0;
13435 if (((*(filter_t*)&bb_common_bufsiz1).scope ^ ifa->ifa_scope) & (*(filter_t*)&bb_common_bufsiz1).scopemask)
13436 return 0;
13437 if (((*(filter_t*)&bb_common_bufsiz1).flags ^ ifa->ifa_flags) & (*(filter_t*)&bb_common_bufsiz1).flagmask)
13438 return 0;
13439 if ((*(filter_t*)&bb_common_bufsiz1).label) {
13440 const char *label;
13441 if (rta_tb[IFA_LABEL])
13442 label = ((void*)(((char*)(rta_tb[IFA_LABEL])) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0))));
13443 else
13444 label = ll_idx_n2a(ifa->ifa_index, b1);
13445 if (fnmatch((*(filter_t*)&bb_common_bufsiz1).label, label, 0) != 0)
13446 return 0;
13447 }
13448 if ((*(filter_t*)&bb_common_bufsiz1).pfx.family) {
13449 if (rta_tb[IFA_LOCAL]) {
13450 inet_prefix dst;
13451 memset(&dst, 0, sizeof(dst));
13452 dst.family = ifa->ifa_family;
13453 memcpy(&dst.data, ((void*)(((char*)(rta_tb[IFA_LOCAL])) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0)))), ((int)((rta_tb[IFA_LOCAL])->rta_len) - (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0))));
13454 if (inet_addr_match(&dst, &(*(filter_t*)&bb_common_bufsiz1).pfx, (*(filter_t*)&bb_common_bufsiz1).pfx.bitlen))
13455 return 0;
13456 }
13457 }
13458
13459 if ((*(filter_t*)&bb_common_bufsiz1).flushb) {
13460 struct nlmsghdr *fn;
13461 if (( (((*(filter_t*)&bb_common_bufsiz1).flushp)+4U -1) & ~(4U -1) ) + n->nlmsg_len > (*(filter_t*)&bb_common_bufsiz1).flushe) {
13462 if (flush_update())
13463 return -1;
13464 }
13465 fn = (struct nlmsghdr*)((*(filter_t*)&bb_common_bufsiz1).flushb + ( (((*(filter_t*)&bb_common_bufsiz1).flushp)+4U -1) & ~(4U -1) ));
13466 memcpy(fn, n, n->nlmsg_len);
13467 fn->nlmsg_type = RTM_DELADDR;
13468 fn->nlmsg_flags = 1;
13469 fn->nlmsg_seq = ++(*(filter_t*)&bb_common_bufsiz1).rth->seq;
13470 (*(filter_t*)&bb_common_bufsiz1).flushp = (((char*)fn) + n->nlmsg_len) - (*(filter_t*)&bb_common_bufsiz1).flushb;
13471 (*(filter_t*)&bb_common_bufsiz1).flushed = 1;
13472 return 0;
13473 }
13474
13475 if (n->nlmsg_type == RTM_DELADDR)
13476 printf("Deleted ");
13477
13478 if ((*(filter_t*)&bb_common_bufsiz1).oneline)
13479 printf("%u: %s", ifa->ifa_index, ll_index_to_name(ifa->ifa_index));
13480 if (ifa->ifa_family == 2)
13481 printf(" inet ");
13482 else if (ifa->ifa_family == 10)
13483 printf(" inet6 ");
13484 else
13485 printf(" family %d ", ifa->ifa_family);
13486
13487 if (rta_tb[IFA_LOCAL]) {
13488 fputs_unlocked(rt_addr_n2a(ifa->ifa_family, ((void*)(((char*)(rta_tb[IFA_LOCAL])) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0)))), abuf, sizeof(abuf)), stdout)
13489
13490 ;
13491
13492 if (rta_tb[IFA_ADDRESS] == ((void *)0)
13493 || memcmp(((void*)(((char*)(rta_tb[IFA_ADDRESS])) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0)))), ((void*)(((char*)(rta_tb[IFA_LOCAL])) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0)))), 4) == 0
13494 ) {
13495 printf("/%d ", ifa->ifa_prefixlen);
13496 } else {
13497 printf(" peer %s/%d ",
13498 rt_addr_n2a(ifa->ifa_family,
13499 ((void*)(((char*)(rta_tb[IFA_ADDRESS])) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0)))),
13500 abuf, sizeof(abuf)),
13501 ifa->ifa_prefixlen);
13502 }
13503 }
13504
13505 if (rta_tb[IFA_BROADCAST]) {
13506 printf("brd %s ",
13507 rt_addr_n2a(ifa->ifa_family,
13508 ((void*)(((char*)(rta_tb[IFA_BROADCAST])) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0)))),
13509 abuf, sizeof(abuf))
13510 );
13511 }
13512 if (rta_tb[IFA_ANYCAST]) {
13513 printf("any %s ",
13514 rt_addr_n2a(ifa->ifa_family,
13515 ((void*)(((char*)(rta_tb[IFA_ANYCAST])) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0)))),
13516 abuf, sizeof(abuf))
13517 );
13518 }
13519 printf("scope %s ", rtnl_rtscope_n2a(ifa->ifa_scope, b1));
13520 if (ifa->ifa_flags & 0x01) {
13521 ifa->ifa_flags &= ~0x01;
13522 printf("secondary ");
13523 }
13524 if (ifa->ifa_flags & 0x40) {
13525 ifa->ifa_flags &= ~0x40;
13526 printf("tentative ");
13527 }
13528 if (ifa->ifa_flags & 0x20) {
13529 ifa->ifa_flags &= ~0x20;
13530 printf("deprecated ");
13531 }
13532 if (!(ifa->ifa_flags & 0x80)) {
13533 printf("dynamic ");
13534 } else
13535 ifa->ifa_flags &= ~0x80;
13536 if (ifa->ifa_flags)
13537 printf("flags %02x ", ifa->ifa_flags);
13538 if (rta_tb[IFA_LABEL])
13539 fputs_unlocked((char*)((void*)(((char*)(rta_tb[IFA_LABEL])) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0)))), stdout);
13540 if (rta_tb[IFA_CACHEINFO]) {
13541 struct ifa_cacheinfo *ci = ((void*)(((char*)(rta_tb[IFA_CACHEINFO])) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0))));
13542 char buf[128];
13543 bb_putchar(_SL_);
13544 if (ci->ifa_valid == 0xFFFFFFFFU)
13545 sprintf(buf, "valid_lft forever");
13546 else
13547 sprintf(buf, "valid_lft %dsec", ci->ifa_valid);
13548 if (ci->ifa_prefered == 0xFFFFFFFFU)
13549 sprintf(buf+strlen(buf), " preferred_lft forever");
13550 else
13551 sprintf(buf+strlen(buf), " preferred_lft %dsec", ci->ifa_prefered);
13552 printf(" %s", buf);
13553 }
13554 bb_putchar('\n');
13555
13556 return 0;
13557 }
13558
13559
13560 struct nlmsg_list {
13561 struct nlmsg_list *next;
13562 struct nlmsghdr h;
13563 };
13564
13565 static int print_selected_addrinfo(int ifindex, struct nlmsg_list *ainfo)
13566 {
13567 for (; ainfo; ainfo = ainfo->next) {
13568 struct nlmsghdr *n = &ainfo->h;
13569 struct ifaddrmsg *ifa = ((void*)(((char*)n) + ((0) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) )))));
13570
13571 if (n->nlmsg_type != RTM_NEWADDR)
13572 continue;
13573 if (n->nlmsg_len < ((sizeof(ifa)) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) ))))
13574 return -1;
13575 if (ifa->ifa_index != ifindex
13576 || ((*(filter_t*)&bb_common_bufsiz1).family && (*(filter_t*)&bb_common_bufsiz1).family != ifa->ifa_family)
13577 ) {
13578 continue;
13579 }
13580 print_addrinfo(((void *)0), n, ((void *)0));
13581 }
13582 return 0;
13583 }
13584
13585
13586 static int store_nlmsg(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
13587 {
13588 struct nlmsg_list **linfo = (struct nlmsg_list**)arg;
13589 struct nlmsg_list *h;
13590 struct nlmsg_list **lp;
13591
13592 h = xzalloc(n->nlmsg_len + sizeof(void*));
13593
13594 memcpy(&h->h, n, n->nlmsg_len);
13595
13596
13597 for (lp = linfo; *lp; lp = &(*lp)->next)
13598 continue;
13599 *lp = h;
13600
13601 ll_remember_index(who, n, ((void *)0));
13602 return 0;
13603 }
13604
13605 static void ipaddr_reset_filter(int _oneline)
13606 {
13607 memset(&(*(filter_t*)&bb_common_bufsiz1), 0, sizeof((*(filter_t*)&bb_common_bufsiz1)));
13608 (*(filter_t*)&bb_common_bufsiz1).oneline = _oneline;
13609 }
13610
13611
13612 int ipaddr_list_or_flush(char **argv, int flush)
13613 {
13614 static const char option[] __attribute__((aligned(1))) = "to\0""scope\0""up\0""label\0""dev\0";
13615
13616 struct nlmsg_list *linfo = ((void *)0);
13617 struct nlmsg_list *ainfo = ((void *)0);
13618 struct nlmsg_list *l;
13619 struct rtnl_handle rth;
13620 char *filter_dev = ((void *)0);
13621 int no_link = 0;
13622
13623 ipaddr_reset_filter(oneline);
13624 (*(filter_t*)&bb_common_bufsiz1).showqueue = 1;
13625
13626 if ((*(filter_t*)&bb_common_bufsiz1).family == 0)
13627 (*(filter_t*)&bb_common_bufsiz1).family = preferred_family;
13628
13629 if (flush) {
13630 if (!*argv) {
13631 bb_error_msg_and_die(bb_msg_requires_arg, "flush");
13632 }
13633 if ((*(filter_t*)&bb_common_bufsiz1).family == 17) {
13634 bb_error_msg_and_die("can't flush link addresses");
13635 }
13636 }
13637
13638 while (*argv) {
13639 const smalluint key = index_in_strings(option, *argv);
13640 if (key == 0) {
13641 do { if (!*++argv) incomplete_command(); } while (0);
13642 get_prefix(&(*(filter_t*)&bb_common_bufsiz1).pfx, *argv, (*(filter_t*)&bb_common_bufsiz1).family);
13643 if ((*(filter_t*)&bb_common_bufsiz1).family == 0) {
13644 (*(filter_t*)&bb_common_bufsiz1).family = (*(filter_t*)&bb_common_bufsiz1).pfx.family;
13645 }
13646 } else if (key == 1) {
13647 uint32_t scope = 0;
13648 do { if (!*++argv) incomplete_command(); } while (0);
13649 (*(filter_t*)&bb_common_bufsiz1).scopemask = -1;
13650 if (rtnl_rtscope_a2n(&scope, *argv)) {
13651 if (__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (*argv) && __builtin_constant_p ("all") && (__s1_len = strlen (*argv), __s2_len = strlen ("all"), (!((size_t)(const void *)((*argv) + 1) - (size_t)(const void *)(*argv) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("all") + 1) - (size_t)(const void *)("all") == 1) || __s2_len >= 4)) ? __builtin_strcmp (*argv, "all") : (__builtin_constant_p (*argv) && ((size_t)(const void *)((*argv) + 1) - (size_t)(const void *)(*argv) == 1) && (__s1_len = strlen (*argv), __s1_len < 4) ? (__builtin_constant_p ("all") && ((size_t)(const void *)(("all") + 1) - (size_t)(const void *)("all") == 1) ? __builtin_strcmp (*argv, "all") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("all"); int __result = (((const unsigned char *) (const char *) (*argv))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (*argv))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) (*argv))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (*argv))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("all") && ((size_t)(const void *)(("all") + 1) - (size_t)(const void *)("all") == 1) && (__s2_len = strlen ("all"), __s2_len < 4) ? (__builtin_constant_p (*argv) && ((size_t)(const void *)((*argv) + 1) - (size_t)(const void *)(*argv) == 1) ? __builtin_strcmp (*argv, "all") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (*argv); int __result = (((const unsigned char *) (const char *) ("all"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ("all"))[1] - __s2[1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("all"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("all"))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (*argv, "all")))); }) != 0) {
13652 invarg(*argv, "scope");
13653 }
13654 scope = RT_SCOPE_NOWHERE;
13655 (*(filter_t*)&bb_common_bufsiz1).scopemask = 0;
13656 }
13657 (*(filter_t*)&bb_common_bufsiz1).scope = scope;
13658 } else if (key == 2) {
13659 (*(filter_t*)&bb_common_bufsiz1).up = 1;
13660 } else if (key == 3) {
13661 do { if (!*++argv) incomplete_command(); } while (0);
13662 (*(filter_t*)&bb_common_bufsiz1).label = *argv;
13663 } else {
13664 if (key == 4)
13665 do { if (!*++argv) incomplete_command(); } while (0);
13666 if (filter_dev)
13667 duparg2("dev", *argv);
13668 filter_dev = *argv;
13669 }
13670 argv++;
13671 }
13672
13673 xrtnl_open(&rth);
13674
13675 xrtnl_wilddump_request(&rth, preferred_family, RTM_GETLINK);
13676 xrtnl_dump_filter(&rth, store_nlmsg, &linfo);
13677
13678 if (filter_dev) {
13679 (*(filter_t*)&bb_common_bufsiz1).ifindex = xll_name_to_index(filter_dev);
13680 }
13681
13682 if (flush) {
13683 char flushb[4096-512];
13684
13685 (*(filter_t*)&bb_common_bufsiz1).flushb = flushb;
13686 (*(filter_t*)&bb_common_bufsiz1).flushp = 0;
13687 (*(filter_t*)&bb_common_bufsiz1).flushe = sizeof(flushb);
13688 (*(filter_t*)&bb_common_bufsiz1).rth = &rth;
13689
13690 for (;;) {
13691 xrtnl_wilddump_request(&rth, (*(filter_t*)&bb_common_bufsiz1).family, RTM_GETADDR);
13692 (*(filter_t*)&bb_common_bufsiz1).flushed = 0;
13693 xrtnl_dump_filter(&rth, print_addrinfo, ((void *)0));
13694 if ((*(filter_t*)&bb_common_bufsiz1).flushed == 0) {
13695 return 0;
13696 }
13697 if (flush_update() < 0) {
13698 return 1;
13699 }
13700 }
13701 }
13702
13703 if ((*(filter_t*)&bb_common_bufsiz1).family != 17) {
13704 xrtnl_wilddump_request(&rth, (*(filter_t*)&bb_common_bufsiz1).family, RTM_GETADDR);
13705 xrtnl_dump_filter(&rth, store_nlmsg, &ainfo);
13706 }
13707
13708
13709 if ((*(filter_t*)&bb_common_bufsiz1).family && (*(filter_t*)&bb_common_bufsiz1).family != 17) {
13710 struct nlmsg_list **lp;
13711 lp = &linfo;
13712
13713 if ((*(filter_t*)&bb_common_bufsiz1).oneline)
13714 no_link = 1;
13715
13716 while ((l = *lp) != ((void *)0)) {
13717 int ok = 0;
13718 struct ifinfomsg *ifi = ((void*)(((char*)&l->h) + ((0) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) )))));
13719 struct nlmsg_list *a;
13720
13721 for (a = ainfo; a; a = a->next) {
13722 struct nlmsghdr *n = &a->h;
13723 struct ifaddrmsg *ifa = ((void*)(((char*)n) + ((0) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) )))));
13724
13725 if (ifa->ifa_index != ifi->ifi_index
13726 || ((*(filter_t*)&bb_common_bufsiz1).family && (*(filter_t*)&bb_common_bufsiz1).family != ifa->ifa_family)
13727 ) {
13728 continue;
13729 }
13730 if (((*(filter_t*)&bb_common_bufsiz1).scope ^ ifa->ifa_scope) & (*(filter_t*)&bb_common_bufsiz1).scopemask)
13731 continue;
13732 if (((*(filter_t*)&bb_common_bufsiz1).flags ^ ifa->ifa_flags) & (*(filter_t*)&bb_common_bufsiz1).flagmask)
13733 continue;
13734 if ((*(filter_t*)&bb_common_bufsiz1).pfx.family || (*(filter_t*)&bb_common_bufsiz1).label) {
13735 struct rtattr *tb[(__IFA_MAX - 1)+1];
13736 memset(tb, 0, sizeof(tb));
13737 parse_rtattr(tb, (__IFA_MAX - 1), ((struct rtattr*)(((char*)(ifa)) + ( ((sizeof(struct ifaddrmsg))+4U -1) & ~(4U -1) ))), ((n)->nlmsg_len - ( (((((sizeof(struct ifaddrmsg))) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) ))))+4U -1) & ~(4U -1) )));
13738 if (!tb[IFA_LOCAL])
13739 tb[IFA_LOCAL] = tb[IFA_ADDRESS];
13740
13741 if ((*(filter_t*)&bb_common_bufsiz1).pfx.family && tb[IFA_LOCAL]) {
13742 inet_prefix dst;
13743 memset(&dst, 0, sizeof(dst));
13744 dst.family = ifa->ifa_family;
13745 memcpy(&dst.data, ((void*)(((char*)(tb[IFA_LOCAL])) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0)))), ((int)((tb[IFA_LOCAL])->rta_len) - (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0))));
13746 if (inet_addr_match(&dst, &(*(filter_t*)&bb_common_bufsiz1).pfx, (*(filter_t*)&bb_common_bufsiz1).pfx.bitlen))
13747 continue;
13748 }
13749 if ((*(filter_t*)&bb_common_bufsiz1).label) {
13750 char b1[64];
13751 const char *label;
13752 if (tb[IFA_LABEL])
13753 label = ((void*)(((char*)(tb[IFA_LABEL])) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0))));
13754 else
13755 label = ll_idx_n2a(ifa->ifa_index, b1);
13756 if (fnmatch((*(filter_t*)&bb_common_bufsiz1).label, label, 0) != 0)
13757 continue;
13758 }
13759 }
13760
13761 ok = 1;
13762 break;
13763 }
13764 if (!ok)
13765 *lp = l->next;
13766 else
13767 lp = &l->next;
13768 }
13769 }
13770
13771 for (l = linfo; l; l = l->next) {
13772 if (no_link || print_linkinfo(&l->h) == 0) {
13773 struct ifinfomsg *ifi = ((void*)(((char*)&l->h) + ((0) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) )))));
13774 if ((*(filter_t*)&bb_common_bufsiz1).family != 17)
13775 print_selected_addrinfo(ifi->ifi_index, ainfo);
13776 }
13777 }
13778
13779 return 0;
13780 }
13781
13782 static int default_scope(inet_prefix *lcl)
13783 {
13784 if (lcl->family == 2) {
13785 if (lcl->bytelen >= 1 && *(uint8_t*)&lcl->data == 127)
13786 return RT_SCOPE_HOST;
13787 }
13788 return 0;
13789 }
13790
13791
13792 static int ipaddr_modify(int cmd, char **argv)
13793 {
13794 static const char option[] __attribute__((aligned(1))) =
13795 "peer\0""remote\0""broadcast\0""brd\0"
13796 "anycast\0""scope\0""dev\0""label\0""local\0";
13797 struct rtnl_handle rth;
13798 struct {
13799 struct nlmsghdr n;
13800 struct ifaddrmsg ifa;
13801 char buf[256];
13802 } req;
13803 char *d = ((void *)0);
13804 char *l = ((void *)0);
13805 inet_prefix lcl;
13806 inet_prefix peer;
13807 int local_len = 0;
13808 int peer_len = 0;
13809 int brd_len = 0;
13810 int any_len = 0;
13811 _Bool scoped = 0;
13812
13813 memset(&req, 0, sizeof(req));
13814
13815 req.n.nlmsg_len = ((sizeof(struct ifaddrmsg)) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) )));
13816 req.n.nlmsg_flags = 1;
13817 req.n.nlmsg_type = cmd;
13818 req.ifa.ifa_family = preferred_family;
13819
13820 while (*argv) {
13821 const smalluint arg = index_in_strings(option, *argv);
13822 if (arg <= 1) {
13823 do { if (!*++argv) incomplete_command(); } while (0);
13824
13825 if (peer_len) {
13826 duparg("peer", *argv);
13827 }
13828 get_prefix(&peer, *argv, req.ifa.ifa_family);
13829 peer_len = peer.bytelen;
13830 if (req.ifa.ifa_family == 0) {
13831 req.ifa.ifa_family = peer.family;
13832 }
13833 addattr_l(&req.n, sizeof(req), IFA_ADDRESS, &peer.data, peer.bytelen);
13834 req.ifa.ifa_prefixlen = peer.bitlen;
13835 } else if (arg <= 3) {
13836 inet_prefix addr;
13837 do { if (!*++argv) incomplete_command(); } while (0);
13838 if (brd_len) {
13839 duparg("broadcast", *argv);
13840 }
13841 if (((*argv)[0] == ('+') && !(*argv)[1])) {
13842 brd_len = -1;
13843 } else if (((*argv)[0] == '-' && !(*argv)[1])) {
13844 brd_len = -2;
13845 } else {
13846 get_addr(&addr, *argv, req.ifa.ifa_family);
13847 if (req.ifa.ifa_family == 0)
13848 req.ifa.ifa_family = addr.family;
13849 addattr_l(&req.n, sizeof(req), IFA_BROADCAST, &addr.data, addr.bytelen);
13850 brd_len = addr.bytelen;
13851 }
13852 } else if (arg == 4) {
13853 inet_prefix addr;
13854 do { if (!*++argv) incomplete_command(); } while (0);
13855 if (any_len) {
13856 duparg("anycast", *argv);
13857 }
13858 get_addr(&addr, *argv, req.ifa.ifa_family);
13859 if (req.ifa.ifa_family == 0) {
13860 req.ifa.ifa_family = addr.family;
13861 }
13862 addattr_l(&req.n, sizeof(req), IFA_ANYCAST, &addr.data, addr.bytelen);
13863 any_len = addr.bytelen;
13864 } else if (arg == 5) {
13865 uint32_t scope = 0;
13866 do { if (!*++argv) incomplete_command(); } while (0);
13867 if (rtnl_rtscope_a2n(&scope, *argv)) {
13868 invarg(*argv, "scope");
13869 }
13870 req.ifa.ifa_scope = scope;
13871 scoped = 1;
13872 } else if (arg == 6) {
13873 do { if (!*++argv) incomplete_command(); } while (0);
13874 d = *argv;
13875 } else if (arg == 7) {
13876 do { if (!*++argv) incomplete_command(); } while (0);
13877 l = *argv;
13878 addattr_l(&req.n, sizeof(req), IFA_LABEL, l, strlen(l) + 1);
13879 } else {
13880 if (arg == 8)
13881 do { if (!*++argv) incomplete_command(); } while (0);
13882 if (local_len) {
13883 duparg2("local", *argv);
13884 }
13885 get_prefix(&lcl, *argv, req.ifa.ifa_family);
13886 if (req.ifa.ifa_family == 0) {
13887 req.ifa.ifa_family = lcl.family;
13888 }
13889 addattr_l(&req.n, sizeof(req), IFA_LOCAL, &lcl.data, lcl.bytelen);
13890 local_len = lcl.bytelen;
13891 }
13892 argv++;
13893 }
13894
13895 if (!d) {
13896
13897 bb_error_msg_and_die("need \"dev IFACE\"");
13898 }
13899 if (l && (__extension__ (__builtin_constant_p (strlen(d)) && ((__builtin_constant_p (d) && strlen (d) < ((size_t) (strlen(d)))) || (__builtin_constant_p (l) && strlen (l) < ((size_t) (strlen(d))))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (d) && __builtin_constant_p (l) && (__s1_len = strlen (d), __s2_len = strlen (l), (!((size_t)(const void *)((d) + 1) - (size_t)(const void *)(d) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((l) + 1) - (size_t)(const void *)(l) == 1) || __s2_len >= 4)) ? __builtin_strcmp (d, l) : (__builtin_constant_p (d) && ((size_t)(const void *)((d) + 1) - (size_t)(const void *)(d) == 1) && (__s1_len = strlen (d), __s1_len < 4) ? (__builtin_constant_p (l) && ((size_t)(const void *)((l) + 1) - (size_t)(const void *)(l) == 1) ? __builtin_strcmp (d, l) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (l); int __result = (((const unsigned char *) (const char *) (d))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (d))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) (d))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (d))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (l) && ((size_t)(const void *)((l) + 1) - (size_t)(const void *)(l) == 1) && (__s2_len = strlen (l), __s2_len < 4) ? (__builtin_constant_p (d) && ((size_t)(const void *)((d) + 1) - (size_t)(const void *)(d) == 1) ? __builtin_strcmp (d, l) : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (d); int __result = (((const unsigned char *) (const char *) (l))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (l))[1] - __s2[1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) (l))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (l))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (d, l)))); }) : strncmp (d, l, strlen(d)))) != 0) {
13900 bb_error_msg_and_die("\"dev\" (%s) must match \"label\" (%s)", d, l);
13901 }
13902
13903 if (peer_len == 0 && local_len && cmd != RTM_DELADDR) {
13904 peer = lcl;
13905 addattr_l(&req.n, sizeof(req), IFA_ADDRESS, &lcl.data, lcl.bytelen);
13906 }
13907 if (req.ifa.ifa_prefixlen == 0)
13908 req.ifa.ifa_prefixlen = lcl.bitlen;
13909
13910 if (brd_len < 0 && cmd != RTM_DELADDR) {
13911 inet_prefix brd;
13912 int i;
13913 if (req.ifa.ifa_family != 2) {
13914 bb_error_msg_and_die("broadcast can be set only for IPv4 addresses");
13915 }
13916 brd = peer;
13917 if (brd.bitlen <= 30) {
13918 for (i=31; i>=brd.bitlen; i--) {
13919 if (brd_len == -1)
13920 brd.data[0] |= __bswap_32 (1<<(31-i));
13921 else
13922 brd.data[0] &= ~__bswap_32 (1<<(31-i));
13923 }
13924 addattr_l(&req.n, sizeof(req), IFA_BROADCAST, &brd.data, brd.bytelen);
13925 brd_len = brd.bytelen;
13926 }
13927 }
13928 if (!scoped && cmd != RTM_DELADDR)
13929 req.ifa.ifa_scope = default_scope(&lcl);
13930
13931 xrtnl_open(&rth);
13932
13933 ll_init_map(&rth);
13934
13935 req.ifa.ifa_index = xll_name_to_index(d);
13936
13937 if (rtnl_talk(&rth, &req.n, ((void *)0)) < 0)
13938 return 2;
13939
13940 return 0;
13941 }
13942
13943
13944 int do_ipaddr(char **argv)
13945 {
13946 static const char commands[] __attribute__((aligned(1))) =
13947 "add\0""delete\0""list\0""show\0""lst\0""flush\0";
13948 smalluint cmd = 2;
13949 if (*argv) {
13950 cmd = index_in_substrings(commands, *argv);
13951 if (cmd > 5)
13952 bb_error_msg_and_die(bb_msg_invalid_arg, *argv, applet_name);
13953 argv++;
13954 if (cmd <= 1)
13955 return ipaddr_modify((cmd == 0) ? RTM_NEWADDR : RTM_DELADDR, argv);
13956 }
13957
13958 return ipaddr_list_or_flush(argv, cmd == 5);
13959 }