1 # 1 "net/ipv4/ip_output.c"
2 # 1 "/usr/local/src/blackfin/svn/linux-kernel/trunk//"
5 # 1 "./include/linux/autoconf.h" 1
7 # 1 "net/ipv4/ip_output.c"
8 # 47 "net/ipv4/ip_output.c"
9 # 1 "include/asm/uaccess.h" 1
10 # 12 "include/asm/uaccess.h"
11 # 1 "include/linux/sched.h" 1
15 # 1 "include/linux/auxvec.h" 1
19 # 1 "include/asm/auxvec.h" 1
20 # 5 "include/linux/auxvec.h" 2
21 # 5 "include/linux/sched.h" 2
22 # 40 "include/linux/sched.h"
27 # 1 "include/asm/param.h" 1
28 # 45 "include/linux/sched.h" 2
30 # 1 "include/linux/capability.h" 1
31 # 16 "include/linux/capability.h"
32 # 1 "include/linux/types.h" 1
33 # 14 "include/linux/types.h"
34 # 1 "include/linux/posix_types.h" 1
38 # 1 "include/linux/stddef.h" 1
42 # 1 "include/linux/compiler.h" 1
43 # 42 "include/linux/compiler.h"
44 # 1 "include/linux/compiler-gcc4.h" 1
48 # 1 "include/linux/compiler-gcc.h" 1
49 # 5 "include/linux/compiler-gcc4.h" 2
50 # 43 "include/linux/compiler.h" 2
51 # 5 "include/linux/stddef.h" 2
52 # 15 "include/linux/stddef.h"
57 # 5 "include/linux/posix_types.h" 2
58 # 36 "include/linux/posix_types.h"
60 unsigned long fds_bits [(1024/(8 * sizeof(unsigned long)))];
64 typedef void (*__kernel_sighandler_t)(int);
67 typedef int __kernel_key_t;
68 typedef int __kernel_mqd_t;
70 # 1 "include/asm/posix_types.h" 1
71 # 10 "include/asm/posix_types.h"
72 typedef unsigned long __kernel_ino_t;
73 typedef unsigned short __kernel_mode_t;
74 typedef unsigned short __kernel_nlink_t;
75 typedef long __kernel_off_t;
76 typedef int __kernel_pid_t;
77 typedef unsigned int __kernel_ipc_pid_t;
78 typedef unsigned int __kernel_uid_t;
79 typedef unsigned int __kernel_gid_t;
80 typedef unsigned long __kernel_size_t;
81 typedef long __kernel_ssize_t;
82 typedef int __kernel_ptrdiff_t;
83 typedef long __kernel_time_t;
84 typedef long __kernel_suseconds_t;
85 typedef long __kernel_clock_t;
86 typedef int __kernel_timer_t;
87 typedef int __kernel_clockid_t;
88 typedef int __kernel_daddr_t;
89 typedef char *__kernel_caddr_t;
90 typedef unsigned short __kernel_uid16_t;
91 typedef unsigned short __kernel_gid16_t;
92 typedef unsigned int __kernel_uid32_t;
93 typedef unsigned int __kernel_gid32_t;
95 typedef unsigned short __kernel_old_uid_t;
96 typedef unsigned short __kernel_old_gid_t;
97 typedef unsigned short __kernel_old_dev_t;
100 typedef long long __kernel_loff_t;
110 # 48 "include/linux/posix_types.h" 2
111 # 15 "include/linux/types.h" 2
112 # 1 "include/asm/types.h" 1
113 # 13 "include/asm/types.h"
114 typedef unsigned short umode_t;
121 typedef __signed__ char __s8;
122 typedef unsigned char __u8;
124 typedef __signed__ short __s16;
125 typedef unsigned short __u16;
127 typedef __signed__ int __s32;
128 typedef unsigned int __u32;
132 typedef __signed__ long long __s64;
133 typedef unsigned long long __u64;
134 # 45 "include/asm/types.h"
135 typedef signed char s8;
136 typedef unsigned char u8;
138 typedef signed short s16;
139 typedef unsigned short u16;
141 typedef signed int s32;
142 typedef unsigned int u32;
144 typedef signed long long s64;
145 typedef unsigned long long u64;
149 typedef u32 dma_addr_t;
150 typedef u64 dma64_addr_t;
151 # 16 "include/linux/types.h" 2
155 typedef __u32 __kernel_dev_t;
157 typedef __kernel_fd_set fd_set;
158 typedef __kernel_dev_t dev_t;
159 typedef __kernel_ino_t ino_t;
160 typedef __kernel_mode_t mode_t;
161 typedef __kernel_nlink_t nlink_t;
162 typedef __kernel_off_t off_t;
163 typedef __kernel_pid_t pid_t;
164 typedef __kernel_daddr_t daddr_t;
165 typedef __kernel_key_t key_t;
166 typedef __kernel_suseconds_t suseconds_t;
167 typedef __kernel_timer_t timer_t;
168 typedef __kernel_clockid_t clockid_t;
169 typedef __kernel_mqd_t mqd_t;
174 typedef __kernel_uid32_t uid_t;
175 typedef __kernel_gid32_t gid_t;
176 typedef __kernel_uid16_t uid16_t;
177 typedef __kernel_gid16_t gid16_t;
181 typedef __kernel_old_uid_t old_uid_t;
182 typedef __kernel_old_gid_t old_gid_t;
183 # 58 "include/linux/types.h"
184 typedef __kernel_loff_t loff_t;
185 # 67 "include/linux/types.h"
186 typedef __kernel_size_t size_t;
191 typedef __kernel_ssize_t ssize_t;
196 typedef __kernel_ptrdiff_t ptrdiff_t;
201 typedef __kernel_time_t time_t;
206 typedef __kernel_clock_t clock_t;
211 typedef __kernel_caddr_t caddr_t;
215 typedef unsigned char u_char;
216 typedef unsigned short u_short;
217 typedef unsigned int u_int;
218 typedef unsigned long u_long;
221 typedef unsigned char unchar;
222 typedef unsigned short ushort;
223 typedef unsigned int uint;
224 typedef unsigned long ulong;
229 typedef __u8 u_int8_t;
231 typedef __u16 u_int16_t;
232 typedef __s16 int16_t;
233 typedef __u32 u_int32_t;
234 typedef __s32 int32_t;
238 typedef __u8 uint8_t;
239 typedef __u16 uint16_t;
240 typedef __u32 uint32_t;
243 typedef __u64 uint64_t;
244 typedef __u64 u_int64_t;
245 typedef __s64 int64_t;
246 # 142 "include/linux/types.h"
247 typedef unsigned long sector_t;
251 typedef unsigned long blkcnt_t;
252 # 175 "include/linux/types.h"
253 typedef __u16 __le16;
254 typedef __u16 __be16;
255 typedef __u32 __le32;
256 typedef __u32 __be32;
258 typedef __u64 __le64;
259 typedef __u64 __be64;
263 typedef unsigned gfp_t;
268 typedef u32 resource_size_t;
274 __kernel_daddr_t f_tfree;
275 __kernel_ino_t f_tinode;
279 # 17 "include/linux/capability.h" 2
280 # 32 "include/linux/capability.h"
281 typedef struct __user_cap_header_struct {
284 } *cap_user_header_t;
286 typedef struct __user_cap_data_struct {
294 # 1 "include/linux/spinlock.h" 1
295 # 49 "include/linux/spinlock.h"
296 # 1 "include/linux/preempt.h" 1
297 # 9 "include/linux/preempt.h"
298 # 1 "include/linux/thread_info.h" 1
299 # 13 "include/linux/thread_info.h"
300 struct restart_block {
301 long (*fn)(struct restart_block *);
302 unsigned long arg0, arg1, arg2, arg3;
305 extern long do_no_restart_syscall(struct restart_block *parm);
307 # 1 "include/linux/bitops.h" 1
308 # 9 "include/linux/bitops.h"
309 # 1 "include/asm/bitops.h" 1
310 # 9 "include/asm/bitops.h"
311 # 1 "include/asm/byteorder.h" 1
312 # 9 "include/asm/byteorder.h"
313 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u32 ___arch__swahb32(__u32 xx)
316 __asm__("%1 = %0 >> 8 (V);\n\t"
317 "%0 = %0 << 8 (V);\n\t"
319 : "+d"(xx), "=&d"(tmp));
323 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u32 ___arch__swahw32(__u32 xx)
326 __asm__("%0 = PACK(%1.L, %1.H);\n\t": "=d"(rv): "d"(xx));
334 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u16 ___arch__swab16(__u16 xx)
337 __asm__("%0 <<= 8;\n %0.L = %0.L + %0.H (NS);\n": "+d"(xw));
340 # 46 "include/asm/byteorder.h"
341 # 1 "include/linux/byteorder/little_endian.h" 1
342 # 12 "include/linux/byteorder/little_endian.h"
343 # 1 "include/linux/byteorder/swab.h" 1
344 # 133 "include/linux/byteorder/swab.h"
345 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u16 __fswab16(__u16 x)
347 return ___arch__swab16(x);
349 static __inline__ __attribute__((always_inline)) __u16 __swab16p(const __u16 *x)
351 return ___arch__swab16(*(x));
353 static __inline__ __attribute__((always_inline)) void __swab16s(__u16 *addr)
355 do { *(addr) = ___arch__swab16(*((addr))); } while (0);
358 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u32 __fswab32(__u32 x)
360 return ___arch__swahb32(___arch__swahw32(x));
362 static __inline__ __attribute__((always_inline)) __u32 __swab32p(const __u32 *x)
364 return ___arch__swahb32(___arch__swahw32(*(x)));
366 static __inline__ __attribute__((always_inline)) void __swab32s(__u32 *addr)
368 do { *(addr) = ___arch__swahb32(___arch__swahw32(*((addr)))); } while (0);
372 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u64 __fswab64(__u64 x)
376 __u32 l = x & ((1ULL<<32)-1);
377 return (((__u64)__fswab32(l)) << 32) | ((__u64)(__fswab32(h)));
382 static __inline__ __attribute__((always_inline)) __u64 __swab64p(const __u64 *x)
384 return ({ __u64 __tmp = (*(x)) ; ({ __u64 __x = (__tmp); ((__u64)( (__u64)(((__u64)(__x) & (__u64)0x00000000000000ffULL) << 56) | (__u64)(((__u64)(__x) & (__u64)0x000000000000ff00ULL) << 40) | (__u64)(((__u64)(__x) & (__u64)0x0000000000ff0000ULL) << 24) | (__u64)(((__u64)(__x) & (__u64)0x00000000ff000000ULL) << 8) | (__u64)(((__u64)(__x) & (__u64)0x000000ff00000000ULL) >> 8) | (__u64)(((__u64)(__x) & (__u64)0x0000ff0000000000ULL) >> 24) | (__u64)(((__u64)(__x) & (__u64)0x00ff000000000000ULL) >> 40) | (__u64)(((__u64)(__x) & (__u64)0xff00000000000000ULL) >> 56) )); }); });
386 static __inline__ __attribute__((always_inline)) void __swab64s(__u64 *addr)
388 do { *(addr) = ({ __u64 __tmp = (*((addr))) ; ({ __u64 __x = (__tmp); ((__u64)( (__u64)(((__u64)(__x) & (__u64)0x00000000000000ffULL) << 56) | (__u64)(((__u64)(__x) & (__u64)0x000000000000ff00ULL) << 40) | (__u64)(((__u64)(__x) & (__u64)0x0000000000ff0000ULL) << 24) | (__u64)(((__u64)(__x) & (__u64)0x00000000ff000000ULL) << 8) | (__u64)(((__u64)(__x) & (__u64)0x000000ff00000000ULL) >> 8) | (__u64)(((__u64)(__x) & (__u64)0x0000ff0000000000ULL) >> 24) | (__u64)(((__u64)(__x) & (__u64)0x00ff000000000000ULL) >> 40) | (__u64)(((__u64)(__x) & (__u64)0xff00000000000000ULL) >> 56) )); }); }); } while (0);
390 # 13 "include/linux/byteorder/little_endian.h" 2
391 # 43 "include/linux/byteorder/little_endian.h"
392 static inline __attribute__((always_inline)) __le64 __cpu_to_le64p(const __u64 *p)
396 static inline __attribute__((always_inline)) __u64 __le64_to_cpup(const __le64 *p)
400 static inline __attribute__((always_inline)) __le32 __cpu_to_le32p(const __u32 *p)
404 static inline __attribute__((always_inline)) __u32 __le32_to_cpup(const __le32 *p)
408 static inline __attribute__((always_inline)) __le16 __cpu_to_le16p(const __u16 *p)
412 static inline __attribute__((always_inline)) __u16 __le16_to_cpup(const __le16 *p)
416 static inline __attribute__((always_inline)) __be64 __cpu_to_be64p(const __u64 *p)
418 return ( __be64)__swab64p(p);
420 static inline __attribute__((always_inline)) __u64 __be64_to_cpup(const __be64 *p)
422 return __swab64p((__u64 *)p);
424 static inline __attribute__((always_inline)) __be32 __cpu_to_be32p(const __u32 *p)
426 return ( __be32)__swab32p(p);
428 static inline __attribute__((always_inline)) __u32 __be32_to_cpup(const __be32 *p)
430 return __swab32p((__u32 *)p);
432 static inline __attribute__((always_inline)) __be16 __cpu_to_be16p(const __u16 *p)
434 return ( __be16)__swab16p(p);
436 static inline __attribute__((always_inline)) __u16 __be16_to_cpup(const __be16 *p)
438 return __swab16p((__u16 *)p);
440 # 104 "include/linux/byteorder/little_endian.h"
441 # 1 "include/linux/byteorder/generic.h" 1
442 # 154 "include/linux/byteorder/generic.h"
443 extern __u32 ntohl(__be32);
444 extern __be32 htonl(__u32);
445 extern __u16 ntohs(__be16);
446 extern __be16 htons(__u16);
447 # 105 "include/linux/byteorder/little_endian.h" 2
448 # 47 "include/asm/byteorder.h" 2
449 # 10 "include/asm/bitops.h" 2
450 # 1 "include/asm/system.h" 1
451 # 40 "include/asm/system.h"
452 # 1 "include/linux/linkage.h" 1
456 # 1 "include/asm/linkage.h" 1
457 # 5 "include/linux/linkage.h" 2
458 # 41 "include/asm/system.h" 2
465 extern unsigned long irq_flags;
466 # 146 "include/asm/system.h"
467 struct __xchg_dummy {
468 unsigned long a[100];
472 static inline __attribute__((always_inline)) unsigned long __xchg(unsigned long x, volatile void *ptr,
475 unsigned long tmp = 0;
476 unsigned long flags = 0;
478 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
485 : "=&d" (tmp) : "d" (x), "m" (*((volatile struct __xchg_dummy *)(ptr))) : "memory");
491 : "=&d" (tmp) : "d" (x), "m" (*((volatile struct __xchg_dummy *)(ptr))) : "memory");
497 : "=&d" (tmp) : "d" (x), "m" (*((volatile struct __xchg_dummy *)(ptr))) : "memory");
500 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
509 static inline __attribute__((always_inline)) unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
510 unsigned long new, int size)
512 unsigned long tmp = 0;
513 unsigned long flags = 0;
515 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
522 "IF !CC JUMP 1f;\n\t"
525 : "=&d" (tmp) : "d" (old), "d" (new), "m" (*((volatile struct __xchg_dummy *)(ptr))) : "memory");
531 "IF !CC JUMP 1f;\n\t"
534 : "=&d" (tmp) : "d" (old), "d" (new), "m" (*((volatile struct __xchg_dummy *)(ptr))) : "memory");
540 "IF !CC JUMP 1f;\n\t"
543 : "=&d" (tmp) : "d" (old), "d" (new), "m" (*((volatile struct __xchg_dummy *)(ptr))) : "memory");
546 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
549 # 240 "include/asm/system.h"
550 # 1 "include/asm/blackfin.h" 1
551 # 9 "include/asm/blackfin.h"
552 # 1 "include/asm/macros.h" 1
553 # 10 "include/asm/blackfin.h" 2
554 # 1 "include/asm/mach/blackfin.h" 1
555 # 37 "include/asm/mach/blackfin.h"
556 # 1 "include/asm/mach/bf537.h" 1
557 # 35 "include/asm/mach/bf537.h"
558 # 1 "include/linux/config.h" 1
564 # 1 "include/linux/autoconf.h" 1
565 # 7 "include/linux/config.h" 2
566 # 36 "include/asm/mach/bf537.h" 2
567 # 38 "include/asm/mach/blackfin.h" 2
568 # 1 "include/asm/mach/mem_map.h" 1
569 # 39 "include/asm/mach/blackfin.h" 2
570 # 1 "include/asm/mach/defBF534.h" 1
571 # 36 "include/asm/mach/defBF534.h"
572 # 1 "include/asm/mach-common/def_LPBlackfin.h" 1
573 # 37 "include/asm/mach-common/def_LPBlackfin.h"
574 # 1 "include/asm/mach/anomaly.h" 1
575 # 38 "include/asm/mach-common/def_LPBlackfin.h" 2
576 # 37 "include/asm/mach/defBF534.h" 2
577 # 40 "include/asm/mach/blackfin.h" 2
578 # 1 "include/asm/mach/anomaly.h" 1
579 # 41 "include/asm/mach/blackfin.h" 2
582 # 1 "include/asm/mach/defBF537.h" 1
583 # 36 "include/asm/mach/defBF537.h"
584 # 1 "include/asm/mach/defBF537.h" 1
585 # 37 "include/asm/mach/defBF537.h" 2
588 # 1 "include/asm/mach-common/cdef_LPBlackfin.h" 1
589 # 40 "include/asm/mach/defBF537.h" 2
590 # 44 "include/asm/mach/blackfin.h" 2
594 # 1 "include/asm/mach/cdefBF534.h" 1
595 # 41 "include/asm/mach/cdefBF534.h"
596 # 1 "include/asm/system.h" 1
597 # 42 "include/asm/mach/cdefBF534.h" 2
598 # 50 "include/asm/mach/cdefBF534.h"
599 static __inline__ __attribute__((always_inline)) void bfin_write_VR_CTL(unsigned int val)
601 unsigned long flags, iwr;
603 ({ __asm__ __volatile__ ( "w[%0] = %1;\n\t" : : "a"(0xFFC00008) , "d"(val) : "memory");});
604 __builtin_bfin_ssync();
606 iwr = ({ unsigned __v; __asm__ __volatile__ ( "%0 = [%1];\n\t" : "=d"(__v) : "a"(0xFFC00124)); __v; });
608 ({ __asm__ __volatile__ ( "[%0] = %1;\n\t" : : "a"(0xFFC00124) , "d"((1 << ((0)&0x1F))) : "memory");});
609 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
611 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
612 ({ __asm__ __volatile__ ( "[%0] = %1;\n\t" : : "a"(0xFFC00124) , "d"(iwr) : "memory");});
614 # 48 "include/asm/mach/blackfin.h" 2
615 # 74 "include/asm/mach/blackfin.h"
616 # 1 "include/asm/mach/cdefBF537.h" 1
617 # 75 "include/asm/mach/blackfin.h" 2
618 # 11 "include/asm/blackfin.h" 2
619 # 1 "include/asm/bfin-global.h" 1
620 # 36 "include/asm/bfin-global.h"
621 # 1 "include/asm-generic/sections.h" 1
627 extern char _text[], _stext[], _etext[];
628 extern char _data[], _sdata[], _edata[];
629 extern char __bss_start[], __bss_stop[];
630 extern char __init_begin[], __init_end[];
631 extern char _sinittext[], _einittext[];
632 extern char _sextratext[] __attribute__((weak));
633 extern char _eextratext[] __attribute__((weak));
635 extern char __per_cpu_start[], __per_cpu_end[];
636 extern char __kprobes_text_start[], __kprobes_text_end[];
637 extern char __initdata_begin[], __initdata_end[];
638 extern char __start_rodata[], __end_rodata[];
639 # 37 "include/asm/bfin-global.h" 2
640 # 1 "include/asm/ptrace.h" 1
641 # 24 "include/asm/ptrace.h"
699 # 99 "include/asm/ptrace.h"
700 extern void show_regs(struct pt_regs *);
701 # 38 "include/asm/bfin-global.h" 2
702 # 1 "include/asm/user.h" 1
703 # 10 "include/asm/user.h"
704 # 1 "include/asm/page.h" 1
705 # 12 "include/asm/page.h"
706 # 1 "include/asm/setup.h" 1
707 # 13 "include/asm/page.h" 2
708 # 28 "include/asm/page.h"
713 unsigned long pmd[16];
719 unsigned long pgprot;
721 # 54 "include/asm/page.h"
722 extern unsigned long memory_start;
723 extern unsigned long memory_end;
727 # 1 "include/asm/page_offset.h" 1
728 # 60 "include/asm/page.h" 2
729 # 1 "include/asm/io.h" 1
730 # 97 "include/asm/io.h"
731 extern void outsb(void *port, const void *addr, unsigned long count);
732 extern void outsw(void *port, const void *addr, unsigned long count);
733 extern void outsl(void *port, const void *addr, unsigned long count);
735 extern void insb(const void *port, void *addr, unsigned long count);
736 extern void insw(const void *port, void *addr, unsigned long count);
737 extern void insl(const void *port, void *addr, unsigned long count);
739 extern void *__ioremap(unsigned long physaddr, unsigned long size,
741 extern void iounmap(void *addr);
743 static inline __attribute__((always_inline)) void *ioremap(unsigned long physaddr, unsigned long size)
745 return __ioremap(physaddr, size, 1);
747 static inline __attribute__((always_inline)) void *ioremap_nocache(unsigned long physaddr,
750 return __ioremap(physaddr, size, 1);
753 extern void blkfin_inv_cache_all(void);
754 # 61 "include/asm/page.h" 2
755 # 84 "include/asm/page.h"
756 # 1 "include/asm-generic/page.h" 1
757 # 10 "include/asm-generic/page.h"
758 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) int get_order(unsigned long size)
762 size = (size - 1) >> (12 - 1);
770 # 85 "include/asm/page.h" 2
771 # 11 "include/asm/user.h" 2
772 # 38 "include/asm/user.h"
773 struct user_bfinfp_struct {
779 struct user_regs_struct {
780 long r0, r1, r2, r3, r4, r5, r6, r7;
781 long p0, p1, p2, p3, p4, p5, usp, fp;
791 unsigned long orig_p0;
802 struct user_regs_struct regs;
805 unsigned long int u_tsize;
806 unsigned long int u_dsize;
807 unsigned long int u_ssize;
808 unsigned long start_code;
809 unsigned long start_stack;
815 struct user_regs_struct *u_ar0;
821 # 39 "include/asm/bfin-global.h" 2
822 # 49 "include/asm/bfin-global.h"
823 extern unsigned long get_cclk(void);
824 extern unsigned long get_sclk(void);
826 extern void dump_thread(struct pt_regs *regs, struct user *dump);
827 extern void dump_bfin_regs(struct pt_regs *fp, void *retaddr);
828 extern void dump_bfin_trace_buffer(void);
830 extern int init_arch_irq(void);
831 extern void bfin_reset(void);
832 extern void _cplb_hdr(void);
834 extern void bfin_icache_init(void);
835 extern void bfin_dcache_init(void);
836 extern int read_iloc(void);
837 extern int bfin_console_init(void);
838 extern void lower_to_irq14(void);
839 extern void init_dma(void);
840 extern void program_IAR(void);
841 extern void evt14_softirq(void);
842 extern void asm_do_IRQ(unsigned int irq, struct pt_regs *regs);
843 extern void bfin_gpio_interrupt_setup(int irq, int irq_pfx, int type);
845 extern void *l1_data_A_sram_alloc(size_t);
846 extern void *l1_data_B_sram_alloc(size_t);
847 extern void *l1_inst_sram_alloc(size_t);
848 extern void *l1_data_sram_zalloc(size_t);
849 extern int l1_data_A_sram_free(const void*);
850 extern int l1_data_B_sram_free(const void*);
851 extern int l1_inst_sram_free(const void*);
852 extern int l1_data_sram_free(const void*);
853 extern int sram_free(const void*);
859 extern void *sram_alloc_with_lsl(size_t, unsigned long);
860 extern int sram_free_with_lsl(const void*);
862 extern void led_on(int);
863 extern void led_off(int);
864 extern void led_toggle(int);
865 extern void led_disp_num(int);
866 extern void led_toggle_num(int);
868 extern char *bfin_board_name __attribute__ ((weak));
869 extern unsigned long wall_jiffies;
870 extern unsigned long memory_end;
871 extern unsigned long memory_mtd_end;
872 extern unsigned long memory_mtd_start;
873 extern unsigned long mtd_size;
874 extern unsigned long ipdt_table[];
875 extern unsigned long dpdt_table[];
876 extern unsigned long icplb_table[];
877 extern unsigned long dcplb_table[];
879 extern unsigned long ipdt_swapcount_table[];
880 extern unsigned long dpdt_swapcount_table[];
882 extern unsigned long table_start, table_end;
884 extern struct file_operations dpmc_fops;
886 extern unsigned long _ramstart, _ramend, _rambase;
887 extern unsigned long memory_start, memory_end;
888 extern unsigned long memory_mtd_end;
889 extern char _stext_l1[], _etext_l1[], _sdata_l1[], _edata_l1[], _sbss_l1[],
890 _ebss_l1[], _l1_lma_start[];
891 # 12 "include/asm/blackfin.h" 2
892 # 241 "include/asm/system.h" 2
894 struct task_struct *resume(struct task_struct *prev, struct task_struct *next);
895 # 11 "include/asm/bitops.h" 2
899 # 1 "include/asm-generic/bitops/ffs.h" 1
900 # 12 "include/asm-generic/bitops/ffs.h"
901 static inline __attribute__((always_inline)) int ffs(int x)
929 # 15 "include/asm/bitops.h" 2
930 # 1 "include/asm-generic/bitops/__ffs.h" 1
931 # 12 "include/asm-generic/bitops/__ffs.h"
932 static inline __attribute__((always_inline)) unsigned long __ffs(unsigned long word)
942 if ((word & 0xffff) == 0) {
946 if ((word & 0xff) == 0) {
950 if ((word & 0xf) == 0) {
954 if ((word & 0x3) == 0) {
958 if ((word & 0x1) == 0)
962 # 16 "include/asm/bitops.h" 2
963 # 1 "include/asm-generic/bitops/sched.h" 1
964 # 13 "include/asm-generic/bitops/sched.h"
965 static inline __attribute__((always_inline)) int sched_find_first_bit(const unsigned long *b)
974 if (__builtin_expect(!!(b[0]), 0))
976 if (__builtin_expect(!!(b[1]), 0))
977 return __ffs(b[1]) + 32;
978 if (__builtin_expect(!!(b[2]), 0))
979 return __ffs(b[2]) + 64;
981 return __ffs(b[3]) + 96;
982 return __ffs(b[4]) + 128;
987 # 17 "include/asm/bitops.h" 2
988 # 1 "include/asm-generic/bitops/ffz.h" 1
989 # 18 "include/asm/bitops.h" 2
991 static __inline__ __attribute__((always_inline)) void set_bit(int nr, volatile unsigned long *addr)
993 int *a = (int *)addr;
998 mask = 1 << (nr & 0x1f);
999 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1001 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1004 static __inline__ __attribute__((always_inline)) void __set_bit(int nr, volatile unsigned long *addr)
1006 int *a = (int *)addr;
1010 mask = 1 << (nr & 0x1f);
1020 static __inline__ __attribute__((always_inline)) void clear_bit(int nr, volatile unsigned long *addr)
1022 int *a = (int *)addr;
1024 unsigned long flags;
1026 mask = 1 << (nr & 0x1f);
1027 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1029 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1032 static __inline__ __attribute__((always_inline)) void __clear_bit(int nr, volatile unsigned long *addr)
1034 int *a = (int *)addr;
1038 mask = 1 << (nr & 0x1f);
1042 static __inline__ __attribute__((always_inline)) void change_bit(int nr, volatile unsigned long *addr)
1045 unsigned long *ADDR = (unsigned long *)addr;
1048 mask = 1 << (nr & 31);
1049 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1051 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1054 static __inline__ __attribute__((always_inline)) void __change_bit(int nr, volatile unsigned long *addr)
1057 unsigned long *ADDR = (unsigned long *)addr;
1060 mask = 1 << (nr & 31);
1064 static __inline__ __attribute__((always_inline)) int test_and_set_bit(int nr, void *addr)
1067 volatile unsigned int *a = (volatile unsigned int *)addr;
1068 unsigned long flags;
1071 mask = 1 << (nr & 0x1f);
1072 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1073 retval = (mask & *a) != 0;
1075 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1080 static __inline__ __attribute__((always_inline)) int __test_and_set_bit(int nr, volatile unsigned long *addr)
1083 volatile unsigned int *a = (volatile unsigned int *)addr;
1086 mask = 1 << (nr & 0x1f);
1087 retval = (mask & *a) != 0;
1092 static __inline__ __attribute__((always_inline)) int test_and_clear_bit(int nr, volatile unsigned long *addr)
1095 volatile unsigned int *a = (volatile unsigned int *)addr;
1096 unsigned long flags;
1099 mask = 1 << (nr & 0x1f);
1100 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1101 retval = (mask & *a) != 0;
1103 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1108 static __inline__ __attribute__((always_inline)) int __test_and_clear_bit(int nr, volatile unsigned long *addr)
1111 volatile unsigned int *a = (volatile unsigned int *)addr;
1114 mask = 1 << (nr & 0x1f);
1115 retval = (mask & *a) != 0;
1120 static __inline__ __attribute__((always_inline)) int test_and_change_bit(int nr, volatile unsigned long *addr)
1123 volatile unsigned int *a = (volatile unsigned int *)addr;
1124 unsigned long flags;
1127 mask = 1 << (nr & 0x1f);
1128 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1129 retval = (mask & *a) != 0;
1131 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1135 static __inline__ __attribute__((always_inline)) int __test_and_change_bit(int nr,
1136 volatile unsigned long *addr)
1139 volatile unsigned int *a = (volatile unsigned int *)addr;
1142 mask = 1 << (nr & 0x1f);
1143 retval = (mask & *a) != 0;
1151 static __inline__ __attribute__((always_inline)) int __constant_test_bit(int nr, const void *addr)
1153 return ((1UL << (nr & 31)) &
1154 (((const volatile unsigned int *)addr)[nr >> 5])) != 0;
1157 static __inline__ __attribute__((always_inline)) int __test_bit(int nr, const void *addr)
1159 int *a = (int *)addr;
1163 mask = 1 << (nr & 0x1f);
1164 return ((mask & *a) != 0);
1172 # 1 "include/asm-generic/bitops/find.h" 1
1176 extern unsigned long find_next_bit(const unsigned long *addr, unsigned long
1177 size, unsigned long offset);
1179 extern unsigned long find_next_zero_bit(const unsigned long *addr, unsigned
1180 long size, unsigned long offset);
1181 # 201 "include/asm/bitops.h" 2
1182 # 1 "include/asm-generic/bitops/hweight.h" 1
1188 extern unsigned int hweight32(unsigned int w);
1189 extern unsigned int hweight16(unsigned int w);
1190 extern unsigned int hweight8(unsigned int w);
1191 extern unsigned long hweight64(__u64 w);
1192 # 202 "include/asm/bitops.h" 2
1194 # 1 "include/asm-generic/bitops/ext2-atomic.h" 1
1195 # 204 "include/asm/bitops.h" 2
1196 # 1 "include/asm-generic/bitops/ext2-non-atomic.h" 1
1200 # 1 "include/asm-generic/bitops/le.h" 1
1201 # 5 "include/asm-generic/bitops/ext2-non-atomic.h" 2
1202 # 205 "include/asm/bitops.h" 2
1204 # 1 "include/asm-generic/bitops/minix.h" 1
1205 # 207 "include/asm/bitops.h" 2
1209 # 1 "include/asm-generic/bitops/fls.h" 1
1210 # 12 "include/asm-generic/bitops/fls.h"
1211 static inline __attribute__((always_inline)) int fls(int x)
1217 if (!(x & 0xffff0000u)) {
1221 if (!(x & 0xff000000u)) {
1225 if (!(x & 0xf0000000u)) {
1229 if (!(x & 0xc0000000u)) {
1233 if (!(x & 0x80000000u)) {
1239 # 211 "include/asm/bitops.h" 2
1240 # 1 "include/asm-generic/bitops/fls64.h" 1
1246 static inline __attribute__((always_inline)) int fls64(__u64 x)
1253 # 212 "include/asm/bitops.h" 2
1254 # 10 "include/linux/bitops.h" 2
1256 static __inline__ __attribute__((always_inline)) int get_bitmask_order(unsigned int count)
1264 static __inline__ __attribute__((always_inline)) int get_count_order(unsigned int count)
1268 order = fls(count) - 1;
1269 if (count & (count - 1))
1274 static inline __attribute__((always_inline)) unsigned long hweight_long(unsigned long w)
1276 return sizeof(w) == 4 ? hweight32(w) : hweight64(w);
1285 static inline __attribute__((always_inline)) __u32 rol32(__u32 word, unsigned int shift)
1287 return (word << shift) | (word >> (32 - shift));
1296 static inline __attribute__((always_inline)) __u32 ror32(__u32 word, unsigned int shift)
1298 return (word >> shift) | (word << (32 - shift));
1301 static inline __attribute__((always_inline)) unsigned fls_long(unsigned long l)
1307 # 21 "include/linux/thread_info.h" 2
1308 # 1 "include/asm/thread_info.h" 1
1309 # 32 "include/asm/thread_info.h"
1310 # 1 "include/asm/entry.h" 1
1311 # 33 "include/asm/thread_info.h" 2
1312 # 1 "include/asm/l1layout.h" 1
1313 # 16 "include/asm/l1layout.h"
1314 struct l1_scratch_task_info
1323 # 34 "include/asm/thread_info.h" 2
1324 # 45 "include/asm/thread_info.h"
1325 typedef unsigned long mm_segment_t;
1332 struct thread_info {
1333 struct task_struct *task;
1334 struct exec_domain *exec_domain;
1335 unsigned long flags;
1338 mm_segment_t addr_limit;
1339 struct restart_block restart_block;
1340 struct l1_scratch_task_info l1_task_info;
1342 # 87 "include/asm/thread_info.h"
1343 static inline __attribute__((always_inline)) struct thread_info *current_thread_info(void)
1344 __attribute__ ((__const__));
1349 static inline __attribute__((always_inline)) struct thread_info *current_thread_info(void)
1351 struct thread_info *ti;
1352 __asm__("%0 = sp;": "=&d"(ti):
1354 return (struct thread_info *)((long)ti & ~8191UL);
1356 # 22 "include/linux/thread_info.h" 2
1357 # 30 "include/linux/thread_info.h"
1358 static inline __attribute__((always_inline)) void set_ti_thread_flag(struct thread_info *ti, int flag)
1360 set_bit(flag,&ti->flags);
1363 static inline __attribute__((always_inline)) void clear_ti_thread_flag(struct thread_info *ti, int flag)
1365 clear_bit(flag,&ti->flags);
1368 static inline __attribute__((always_inline)) int test_and_set_ti_thread_flag(struct thread_info *ti, int flag)
1370 return test_and_set_bit(flag,&ti->flags);
1373 static inline __attribute__((always_inline)) int test_and_clear_ti_thread_flag(struct thread_info *ti, int flag)
1375 return test_and_clear_bit(flag,&ti->flags);
1378 static inline __attribute__((always_inline)) int test_ti_thread_flag(struct thread_info *ti, int flag)
1380 return (__builtin_constant_p(flag) ? __constant_test_bit((flag),(&ti->flags)) : __test_bit((flag),(&ti->flags)));
1382 # 10 "include/linux/preempt.h" 2
1383 # 50 "include/linux/spinlock.h" 2
1387 # 1 "include/linux/kernel.h" 1
1388 # 10 "include/linux/kernel.h"
1389 # 1 "/usr/local/src/blackfin/toolchains/20070115/out-uclinux/lib/gcc/bfin-uclinux/4.1.1/include/stdarg.h" 1 3 4
1390 # 43 "/usr/local/src/blackfin/toolchains/20070115/out-uclinux/lib/gcc/bfin-uclinux/4.1.1/include/stdarg.h" 3 4
1391 typedef __builtin_va_list __gnuc_va_list;
1392 # 105 "/usr/local/src/blackfin/toolchains/20070115/out-uclinux/lib/gcc/bfin-uclinux/4.1.1/include/stdarg.h" 3 4
1393 typedef __gnuc_va_list va_list;
1394 # 11 "include/linux/kernel.h" 2
1401 # 1 "include/asm/bug.h" 1
1402 # 14 "include/asm/bug.h"
1403 # 1 "include/asm-generic/bug.h" 1
1404 # 15 "include/asm/bug.h" 2
1405 # 18 "include/linux/kernel.h" 2
1407 extern const char linux_banner[];
1408 # 50 "include/linux/kernel.h"
1409 extern int console_printk[];
1419 # 98 "include/linux/kernel.h"
1420 extern struct atomic_notifier_head panic_notifier_list;
1421 extern long (*panic_blink)(long time);
1422 void panic(const char * fmt, ...)
1423 __attribute__ ((noreturn, format (printf, 1, 2)));
1424 extern void oops_enter(void);
1425 extern void oops_exit(void);
1426 extern int oops_may_print(void);
1427 void do_exit(long error_code)
1428 __attribute__((noreturn));
1429 void complete_and_exit(struct completion *, long)
1430 __attribute__((noreturn));
1431 extern unsigned long simple_strtoul(const char *,char **,unsigned int);
1432 extern long simple_strtol(const char *,char **,unsigned int);
1433 extern unsigned long long simple_strtoull(const char *,char **,unsigned int);
1434 extern long long simple_strtoll(const char *,char **,unsigned int);
1435 extern int sprintf(char * buf, const char * fmt, ...)
1436 __attribute__ ((format (printf, 2, 3)));
1437 extern int vsprintf(char *buf, const char *, va_list)
1438 __attribute__ ((format (printf, 2, 0)));
1439 extern int snprintf(char * buf, size_t size, const char * fmt, ...)
1440 __attribute__ ((format (printf, 3, 4)));
1441 extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
1442 __attribute__ ((format (printf, 3, 0)));
1443 extern int scnprintf(char * buf, size_t size, const char * fmt, ...)
1444 __attribute__ ((format (printf, 3, 4)));
1445 extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args)
1446 __attribute__ ((format (printf, 3, 0)));
1447 extern char *kasprintf(gfp_t gfp, const char *fmt, ...)
1448 __attribute__ ((format (printf, 2, 3)));
1450 extern int sscanf(const char *, const char *, ...)
1451 __attribute__ ((format (scanf, 2, 3)));
1452 extern int vsscanf(const char *, const char *, va_list)
1453 __attribute__ ((format (scanf, 2, 0)));
1455 extern int get_option(char **str, int *pint);
1456 extern char *get_options(const char *str, int nints, int *ints);
1457 extern unsigned long long memparse(char *ptr, char **retptr);
1459 extern int core_kernel_text(unsigned long addr);
1460 extern int __kernel_text_address(unsigned long addr);
1461 extern int kernel_text_address(unsigned long addr);
1462 extern int session_of_pgrp(int pgrp);
1464 extern void dump_thread(struct pt_regs *regs, struct user *dump);
1467 int vprintk(const char *fmt, va_list args)
1468 __attribute__ ((format (printf, 1, 0)));
1469 int printk(const char * fmt, ...)
1470 __attribute__ ((format (printf, 1, 2)));
1471 # 158 "include/linux/kernel.h"
1472 unsigned long int_sqrt(unsigned long);
1474 static inline __attribute__((always_inline)) int __attribute__((pure)) long_log2(unsigned long x)
1477 for (x >>= 1; x > 0; x >>= 1)
1482 static inline __attribute__((always_inline)) unsigned long
1483 __attribute__((__const__)) roundup_pow_of_two(unsigned long x)
1485 return 1UL << fls_long(x - 1);
1488 extern int printk_ratelimit(void);
1489 extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst);
1490 extern bool printk_timed_ratelimit(unsigned long *caller_jiffies,
1491 unsigned int interval_msec);
1493 static inline __attribute__((always_inline)) void console_silent(void)
1495 (console_printk[0]) = 0;
1498 static inline __attribute__((always_inline)) void console_verbose(void)
1500 if ((console_printk[0]))
1501 (console_printk[0]) = 15;
1504 extern void bust_spinlocks(int yes);
1505 extern int oops_in_progress;
1506 extern int panic_timeout;
1507 extern int panic_on_oops;
1508 extern int panic_on_unrecovered_nmi;
1510 extern const char *print_tainted(void);
1511 extern void add_taint(unsigned);
1514 extern enum system_states {
1520 SYSTEM_SUSPEND_DISK,
1522 # 216 "include/linux/kernel.h"
1523 extern void dump_stack(void);
1530 static inline __attribute__((always_inline)) int __attribute__ ((format (printf, 1, 2))) pr_debug(const char * fmt, ...)
1534 # 330 "include/linux/kernel.h"
1537 unsigned long loads[3];
1538 unsigned long totalram;
1539 unsigned long freeram;
1540 unsigned long sharedram;
1541 unsigned long bufferram;
1542 unsigned long totalswap;
1543 unsigned long freeswap;
1544 unsigned short procs;
1546 unsigned long totalhigh;
1547 unsigned long freehigh;
1548 unsigned int mem_unit;
1549 char _f[20-2*sizeof(long)-sizeof(int)];
1551 # 54 "include/linux/spinlock.h" 2
1552 # 1 "include/linux/stringify.h" 1
1553 # 55 "include/linux/spinlock.h" 2
1554 # 1 "include/linux/bottom_half.h" 1
1555 extern void local_bh_disable(void);
1556 extern void __local_bh_enable(void);
1557 extern void _local_bh_enable(void);
1558 extern void local_bh_enable(void);
1559 extern void local_bh_enable_ip(unsigned long ip);
1560 # 56 "include/linux/spinlock.h" 2
1561 # 79 "include/linux/spinlock.h"
1562 # 1 "include/linux/spinlock_types.h" 1
1563 # 12 "include/linux/spinlock_types.h"
1564 # 1 "include/linux/lockdep.h" 1
1565 # 248 "include/linux/lockdep.h"
1566 static inline __attribute__((always_inline)) void lockdep_off(void)
1570 static inline __attribute__((always_inline)) void lockdep_on(void)
1574 static inline __attribute__((always_inline)) int lockdep_internal(void)
1578 # 279 "include/linux/lockdep.h"
1579 struct lock_class_key { };
1580 # 13 "include/linux/spinlock_types.h" 2
1585 # 1 "include/linux/spinlock_types_up.h" 1
1586 # 29 "include/linux/spinlock_types_up.h"
1587 typedef struct { } raw_spinlock_t;
1599 # 18 "include/linux/spinlock_types.h" 2
1603 raw_spinlock_t raw_lock;
1604 # 32 "include/linux/spinlock_types.h"
1610 raw_rwlock_t raw_lock;
1611 # 48 "include/linux/spinlock_types.h"
1613 # 80 "include/linux/spinlock.h" 2
1615 extern int __attribute__((section(".spinlock.text"))) generic__raw_read_trylock(raw_rwlock_t *lock);
1623 # 1 "include/linux/spinlock_up.h" 1
1624 # 90 "include/linux/spinlock.h" 2
1625 # 135 "include/linux/spinlock.h"
1626 # 1 "include/linux/spinlock_api_up.h" 1
1627 # 136 "include/linux/spinlock.h" 2
1628 # 274 "include/linux/spinlock.h"
1629 # 1 "include/asm/atomic.h" 1
1630 # 16 "include/asm/atomic.h"
1639 static __inline__ __attribute__((always_inline)) void atomic_add(int i, atomic_t * v)
1643 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1645 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1648 static __inline__ __attribute__((always_inline)) void atomic_sub(int i, atomic_t * v)
1652 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1654 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1658 static inline __attribute__((always_inline)) int atomic_add_return(int i, atomic_t * v)
1663 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1665 __temp = v->counter;
1666 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1673 static inline __attribute__((always_inline)) int atomic_sub_return(int i, atomic_t * v)
1678 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1680 __temp = v->counter;
1681 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1686 static __inline__ __attribute__((always_inline)) void atomic_inc(volatile atomic_t * v)
1690 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1692 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1694 # 93 "include/asm/atomic.h"
1695 static __inline__ __attribute__((always_inline)) void atomic_dec(volatile atomic_t * v)
1699 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1701 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1704 static __inline__ __attribute__((always_inline)) void atomic_clear_mask(unsigned int mask, atomic_t * v)
1708 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1709 v->counter &= ~mask;
1710 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1713 static __inline__ __attribute__((always_inline)) void atomic_set_mask(unsigned int mask, atomic_t * v)
1717 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1719 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1721 # 142 "include/asm/atomic.h"
1722 # 1 "include/asm-generic/atomic.h" 1
1723 # 71 "include/asm-generic/atomic.h"
1724 typedef atomic_t atomic_long_t;
1727 static inline __attribute__((always_inline)) long atomic_long_read(atomic_long_t *l)
1729 atomic_t *v = (atomic_t *)l;
1731 return (long)((v)->counter);
1734 static inline __attribute__((always_inline)) void atomic_long_set(atomic_long_t *l, long i)
1736 atomic_t *v = (atomic_t *)l;
1738 (((v)->counter) = i);
1741 static inline __attribute__((always_inline)) void atomic_long_inc(atomic_long_t *l)
1743 atomic_t *v = (atomic_t *)l;
1748 static inline __attribute__((always_inline)) void atomic_long_dec(atomic_long_t *l)
1750 atomic_t *v = (atomic_t *)l;
1755 static inline __attribute__((always_inline)) void atomic_long_add(long i, atomic_long_t *l)
1757 atomic_t *v = (atomic_t *)l;
1762 static inline __attribute__((always_inline)) void atomic_long_sub(long i, atomic_long_t *l)
1764 atomic_t *v = (atomic_t *)l;
1768 # 143 "include/asm/atomic.h" 2
1769 # 275 "include/linux/spinlock.h" 2
1775 extern int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock);
1776 # 46 "include/linux/capability.h" 2
1777 # 1 "include/asm/current.h" 1
1778 # 13 "include/asm/current.h"
1781 static inline __attribute__((always_inline)) struct task_struct *get_current(void) __attribute__ ((__const__));
1782 static inline __attribute__((always_inline)) struct task_struct *get_current(void)
1784 return (current_thread_info()->task);
1786 # 47 "include/linux/capability.h" 2
1787 # 58 "include/linux/capability.h"
1788 typedef __u32 kernel_cap_t;
1789 # 295 "include/linux/capability.h"
1790 extern kernel_cap_t cap_bset;
1791 # 323 "include/linux/capability.h"
1792 static inline __attribute__((always_inline)) kernel_cap_t cap_combine(kernel_cap_t a, kernel_cap_t b)
1799 static inline __attribute__((always_inline)) kernel_cap_t cap_intersect(kernel_cap_t a, kernel_cap_t b)
1806 static inline __attribute__((always_inline)) kernel_cap_t cap_drop(kernel_cap_t a, kernel_cap_t drop)
1809 (dest) = (a) & ~(drop);
1813 static inline __attribute__((always_inline)) kernel_cap_t cap_invert(kernel_cap_t c)
1819 # 360 "include/linux/capability.h"
1820 int capable(int cap);
1821 int __capable(struct task_struct *t, int cap);
1822 # 47 "include/linux/sched.h" 2
1823 # 1 "include/linux/threads.h" 1
1824 # 48 "include/linux/sched.h" 2
1827 # 1 "include/linux/timex.h" 1
1828 # 57 "include/linux/timex.h"
1829 # 1 "include/linux/time.h" 1
1836 # 1 "include/linux/seqlock.h" 1
1837 # 32 "include/linux/seqlock.h"
1842 # 57 "include/linux/seqlock.h"
1843 static inline __attribute__((always_inline)) void write_seqlock(seqlock_t *sl)
1845 do { do { } while (0); (void)0; (void)(&sl->lock); } while (0);
1847 __asm__ __volatile__("": : :"memory");
1850 static inline __attribute__((always_inline)) void write_sequnlock(seqlock_t *sl)
1852 __asm__ __volatile__("": : :"memory");
1854 do { do { } while (0); (void)0; (void)(&sl->lock); } while (0);
1857 static inline __attribute__((always_inline)) int write_tryseqlock(seqlock_t *sl)
1859 int ret = (({ do { do { } while (0); (void)0; (void)(&sl->lock); } while (0); 1; }));
1863 __asm__ __volatile__("": : :"memory");
1869 static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned read_seqbegin(const seqlock_t *sl)
1871 unsigned ret = sl->sequence;
1872 __asm__ __volatile__("": : :"memory");
1875 # 98 "include/linux/seqlock.h"
1876 static inline __attribute__((always_inline)) __attribute__((always_inline)) int read_seqretry(const seqlock_t *sl, unsigned iv)
1878 __asm__ __volatile__("": : :"memory");
1879 return (iv & 1) | (sl->sequence ^ iv);
1881 # 112 "include/linux/seqlock.h"
1882 typedef struct seqcount {
1890 static inline __attribute__((always_inline)) unsigned read_seqcount_begin(const seqcount_t *s)
1892 unsigned ret = s->sequence;
1893 __asm__ __volatile__("": : :"memory");
1902 static inline __attribute__((always_inline)) int read_seqcount_retry(const seqcount_t *s, unsigned iv)
1904 __asm__ __volatile__("": : :"memory");
1905 return (iv & 1) | (s->sequence ^ iv);
1913 static inline __attribute__((always_inline)) void write_seqcount_begin(seqcount_t *s)
1916 __asm__ __volatile__("": : :"memory");
1919 static inline __attribute__((always_inline)) void write_seqcount_end(seqcount_t *s)
1921 __asm__ __volatile__("": : :"memory");
1924 # 8 "include/linux/time.h" 2
1937 suseconds_t tv_usec;
1944 # 39 "include/linux/time.h"
1945 static inline __attribute__((always_inline)) int timespec_equal(struct timespec *a, struct timespec *b)
1947 return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec);
1955 static inline __attribute__((always_inline)) int timespec_compare(struct timespec *lhs, struct timespec *rhs)
1957 if (lhs->tv_sec < rhs->tv_sec)
1959 if (lhs->tv_sec > rhs->tv_sec)
1961 return lhs->tv_nsec - rhs->tv_nsec;
1964 static inline __attribute__((always_inline)) int timeval_compare(struct timeval *lhs, struct timeval *rhs)
1966 if (lhs->tv_sec < rhs->tv_sec)
1968 if (lhs->tv_sec > rhs->tv_sec)
1970 return lhs->tv_usec - rhs->tv_usec;
1973 extern unsigned long mktime(const unsigned int year, const unsigned int mon,
1974 const unsigned int day, const unsigned int hour,
1975 const unsigned int min, const unsigned int sec);
1977 extern void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec);
1982 static inline __attribute__((always_inline)) struct timespec timespec_sub(struct timespec lhs,
1983 struct timespec rhs)
1985 struct timespec ts_delta;
1986 set_normalized_timespec(&ts_delta, lhs.tv_sec - rhs.tv_sec,
1987 lhs.tv_nsec - rhs.tv_nsec);
1997 extern struct timespec xtime;
1998 extern struct timespec wall_to_monotonic;
1999 extern seqlock_t xtime_lock;
2001 void timekeeping_init(void);
2003 static inline __attribute__((always_inline)) unsigned long get_seconds(void)
2005 return xtime.tv_sec;
2008 struct timespec current_kernel_time(void);
2013 extern void do_gettimeofday(struct timeval *tv);
2014 extern int do_settimeofday(struct timespec *tv);
2015 extern int do_sys_settimeofday(struct timespec *tv, struct timezone *tz);
2017 extern long do_utimes(int dfd, char *filename, struct timeval *times);
2019 extern int do_setitimer(int which, struct itimerval *value,
2020 struct itimerval *ovalue);
2021 extern unsigned int alarm_setitimer(unsigned int seconds);
2022 extern int do_getitimer(int which, struct itimerval *value);
2023 extern void getnstimeofday(struct timespec *tv);
2025 extern struct timespec timespec_trunc(struct timespec t, unsigned gran);
2026 extern int timekeeping_is_continuous(void);
2027 # 129 "include/linux/time.h"
2028 static inline __attribute__((always_inline)) s64 timespec_to_ns(const struct timespec *ts)
2030 return ((s64) ts->tv_sec * 1000000000L) + ts->tv_nsec;
2032 # 141 "include/linux/time.h"
2033 static inline __attribute__((always_inline)) s64 timeval_to_ns(const struct timeval *tv)
2035 return ((s64) tv->tv_sec * 1000000000L) +
2036 tv->tv_usec * 1000L;
2045 extern struct timespec ns_to_timespec(const s64 nsec);
2053 extern struct timeval ns_to_timeval(const s64 nsec);
2060 static inline __attribute__((always_inline)) void timespec_add_ns(struct timespec *a, u64 ns)
2063 while(__builtin_expect(!!(ns >= 1000000000L), 0)) {
2069 # 195 "include/linux/time.h"
2071 struct timespec it_interval;
2072 struct timespec it_value;
2076 struct timeval it_interval;
2077 struct timeval it_value;
2079 # 58 "include/linux/timex.h" 2
2080 # 100 "include/linux/timex.h"
2093 struct timeval time;
2105 int :32; int :32; int :32; int :32;
2106 int :32; int :32; int :32; int :32;
2107 int :32; int :32; int :32; int :32;
2109 # 187 "include/linux/timex.h"
2110 # 1 "include/asm/timex.h" 1
2111 # 11 "include/asm/timex.h"
2112 typedef unsigned long cycles_t;
2114 static inline __attribute__((always_inline)) cycles_t get_cycles(void)
2118 # 188 "include/linux/timex.h" 2
2125 extern unsigned long tick_usec;
2126 extern unsigned long tick_nsec;
2132 extern int time_status;
2133 extern long time_maxerror;
2134 extern long time_esterror;
2136 extern long time_freq;
2138 extern long time_adjust;
2140 extern void ntp_clear(void);
2146 static inline __attribute__((always_inline)) int ntp_synced(void)
2148 return !(time_status & 0x0040);
2150 # 277 "include/linux/timex.h"
2151 static inline __attribute__((always_inline)) void time_interpolator_reset(void)
2155 static inline __attribute__((always_inline)) void time_interpolator_update(long delta_nsec)
2164 extern u64 current_tick_length(void);
2166 extern void second_overflow(void);
2167 extern void update_ntp_one_tick(void);
2168 extern int do_adjtimex(struct timex *);
2169 # 51 "include/linux/sched.h" 2
2170 # 1 "include/linux/jiffies.h" 1
2174 # 1 "include/linux/calc64.h" 1
2179 # 1 "include/asm/div64.h" 1
2180 # 1 "include/asm-generic/div64.h" 1
2181 # 35 "include/asm-generic/div64.h"
2182 extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
2183 # 1 "include/asm/div64.h" 2
2184 # 6 "include/linux/calc64.h" 2
2185 # 20 "include/linux/calc64.h"
2186 static inline __attribute__((always_inline)) unsigned long do_div_llr(const long long dividend,
2187 const long divisor, long *remainder)
2189 u64 result = dividend;
2191 *(remainder) = ({ uint32_t __base = (divisor); uint32_t __rem; (void)(((typeof((result)) *)0) == ((uint64_t *)0)); if (__builtin_expect(!!(((result) >> 32) == 0), 1)) { __rem = (uint32_t)(result) % __base; (result) = (uint32_t)(result) / __base; } else __rem = __div64_32(&(result), __base); __rem; });
2192 return (unsigned long) result;
2201 static inline __attribute__((always_inline)) long div_long_long_rem_signed(const long long dividend,
2202 const long divisor, long *remainder)
2206 if (__builtin_expect(!!(dividend < 0), 0)) {
2207 res = -do_div_llr((-dividend), divisor, remainder);
2208 *remainder = -(*remainder);
2210 res = do_div_llr((dividend), divisor, remainder);
2214 # 5 "include/linux/jiffies.h" 2
2215 # 81 "include/linux/jiffies.h"
2216 extern u64 __attribute__((section(".data"))) jiffies_64;
2217 extern unsigned long volatile __attribute__((section(".data"))) jiffies;
2220 u64 get_jiffies_64(void);
2221 # 267 "include/linux/jiffies.h"
2222 static inline __attribute__((always_inline)) unsigned int jiffies_to_msecs(const unsigned long j)
2225 return (1000L / 250) * j;
2233 static inline __attribute__((always_inline)) unsigned int jiffies_to_usecs(const unsigned long j)
2236 return (1000000L / 250) * j;
2244 static inline __attribute__((always_inline)) unsigned long msecs_to_jiffies(const unsigned int m)
2246 if (m > jiffies_to_msecs(((~0UL >> 1)-1)))
2247 return ((~0UL >> 1)-1);
2249 return (m + (1000L / 250) - 1) / (1000L / 250);
2257 static inline __attribute__((always_inline)) unsigned long usecs_to_jiffies(const unsigned int u)
2259 if (u > jiffies_to_usecs(((~0UL >> 1)-1)))
2260 return ((~0UL >> 1)-1);
2262 return (u + (1000000L / 250) - 1) / (1000000L / 250);
2269 # 326 "include/linux/jiffies.h"
2270 static __inline__ __attribute__((always_inline)) unsigned long
2271 timespec_to_jiffies(const struct timespec *value)
2273 unsigned long sec = value->tv_sec;
2274 long nsec = value->tv_nsec + (( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))))) - 1;
2276 if (sec >= (long)((u64)((u64)((~0UL >> 1)-1) * (( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))))) / 1000000000L)){
2277 sec = (long)((u64)((u64)((~0UL >> 1)-1) * (( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))))) / 1000000000L);
2280 return (((u64)sec * ((unsigned long)((((u64)1000000000L << (32 - 8)) + (( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))))) -1) / (u64)(( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))))))) +
2281 (((u64)nsec * ((unsigned long)((((u64)1 << ((32 - 8) + 29)) + (( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))))) -1) / (u64)(( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))))))) >>
2282 (((32 - 8) + 29) - (32 - 8)))) >> (32 - 8);
2286 static __inline__ __attribute__((always_inline)) void
2287 jiffies_to_timespec(const unsigned long jiffies, struct timespec *value)
2293 u64 nsec = (u64)jiffies * (( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))));
2294 value->tv_sec = do_div_llr((nsec), 1000000000L, &value->tv_nsec);
2296 # 365 "include/linux/jiffies.h"
2297 static __inline__ __attribute__((always_inline)) unsigned long
2298 timeval_to_jiffies(const struct timeval *value)
2300 unsigned long sec = value->tv_sec;
2301 long usec = value->tv_usec;
2303 if (sec >= (long)((u64)((u64)((~0UL >> 1)-1) * (( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))))) / 1000000000L)){
2304 sec = (long)((u64)((u64)((~0UL >> 1)-1) * (( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))))) / 1000000000L);
2307 return (((u64)sec * ((unsigned long)((((u64)1000000000L << (32 - 8)) + (( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))))) -1) / (u64)(( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))))))) +
2308 (((u64)usec * ((unsigned long)((((u64)1000L << ((32 - 8) + 19)) + (( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))))) -1) / (u64)(( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))))))) + (u64)(((u64)1 << ((32 - 8) + 19)) - 1)) >>
2309 (((32 - 8) + 19) - (32 - 8)))) >> (32 - 8);
2312 static __inline__ __attribute__((always_inline)) void
2313 jiffies_to_timeval(const unsigned long jiffies, struct timeval *value)
2319 u64 nsec = (u64)jiffies * (( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))));
2322 value->tv_sec = do_div_llr((nsec), 1000000000L, &tv_usec);
2324 value->tv_usec = tv_usec;
2330 static inline __attribute__((always_inline)) clock_t jiffies_to_clock_t(long x)
2335 u64 tmp = (u64)x * (( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))));
2336 ({ uint32_t __base = ((1000000000L / 100)); uint32_t __rem; (void)(((typeof((tmp)) *)0) == ((uint64_t *)0)); if (__builtin_expect(!!(((tmp) >> 32) == 0), 1)) { __rem = (uint32_t)(tmp) % __base; (tmp) = (uint32_t)(tmp) / __base; } else __rem = __div64_32(&(tmp), __base); __rem; });
2341 static inline __attribute__((always_inline)) unsigned long clock_t_to_jiffies(unsigned long x)
2351 if (x >= ~0UL / 250 * 100)
2355 jif = x * (u64) 250;
2356 ({ uint32_t __base = (100); uint32_t __rem; (void)(((typeof((jif)) *)0) == ((uint64_t *)0)); if (__builtin_expect(!!(((jif) >> 32) == 0), 1)) { __rem = (uint32_t)(jif) % __base; (jif) = (uint32_t)(jif) / __base; } else __rem = __div64_32(&(jif), __base); __rem; });
2361 static inline __attribute__((always_inline)) u64 jiffies_64_to_clock_t(u64 x)
2363 # 439 "include/linux/jiffies.h"
2364 x *= (( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))));
2365 ({ uint32_t __base = ((1000000000L / 100)); uint32_t __rem; (void)(((typeof((x)) *)0) == ((uint64_t *)0)); if (__builtin_expect(!!(((x) >> 32) == 0), 1)) { __rem = (uint32_t)(x) % __base; (x) = (uint32_t)(x) / __base; } else __rem = __div64_32(&(x), __base); __rem; });
2370 static inline __attribute__((always_inline)) u64 nsec_to_clock_t(u64 x)
2373 ({ uint32_t __base = ((1000000000L / 100)); uint32_t __rem; (void)(((typeof((x)) *)0) == ((uint64_t *)0)); if (__builtin_expect(!!(((x) >> 32) == 0), 1)) { __rem = (uint32_t)(x) % __base; (x) = (uint32_t)(x) / __base; } else __rem = __div64_32(&(x), __base); __rem; });
2374 # 462 "include/linux/jiffies.h"
2377 # 52 "include/linux/sched.h" 2
2378 # 1 "include/linux/rbtree.h" 1
2379 # 100 "include/linux/rbtree.h"
2382 unsigned long rb_parent_color;
2385 struct rb_node *rb_right;
2386 struct rb_node *rb_left;
2387 } __attribute__((aligned(sizeof(long))));
2392 struct rb_node *rb_node;
2394 # 123 "include/linux/rbtree.h"
2395 static inline __attribute__((always_inline)) void rb_set_parent(struct rb_node *rb, struct rb_node *p)
2397 rb->rb_parent_color = (rb->rb_parent_color & 3) | (unsigned long)p;
2399 static inline __attribute__((always_inline)) void rb_set_color(struct rb_node *rb, int color)
2401 rb->rb_parent_color = (rb->rb_parent_color & ~1) | color;
2403 # 139 "include/linux/rbtree.h"
2404 extern void rb_insert_color(struct rb_node *, struct rb_root *);
2405 extern void rb_erase(struct rb_node *, struct rb_root *);
2408 extern struct rb_node *rb_next(struct rb_node *);
2409 extern struct rb_node *rb_prev(struct rb_node *);
2410 extern struct rb_node *rb_first(struct rb_root *);
2411 extern struct rb_node *rb_last(struct rb_root *);
2414 extern void rb_replace_node(struct rb_node *victim, struct rb_node *new,
2415 struct rb_root *root);
2417 static inline __attribute__((always_inline)) void rb_link_node(struct rb_node * node, struct rb_node * parent,
2418 struct rb_node ** rb_link)
2420 node->rb_parent_color = (unsigned long )parent;
2421 node->rb_left = node->rb_right = ((void *)0);
2425 # 53 "include/linux/sched.h" 2
2427 # 1 "include/linux/cpumask.h" 1
2428 # 86 "include/linux/cpumask.h"
2429 # 1 "include/linux/bitmap.h" 1
2437 # 1 "include/linux/string.h" 1
2438 # 16 "include/linux/string.h"
2439 extern char *strndup_user(const char *, long);
2444 # 1 "include/asm/string.h" 1
2451 extern inline __attribute__((always_inline)) char *strcpy(char *dest, const char *src)
2456 __asm__ __volatile__
2457 ("1:\t%2 = B [%1++] (Z);\n\t"
2458 "B [%0++] = %2;\n\t"
2460 "if cc jump 1b (bp);\n"
2461 : "+&a" (dest), "+&a" (src), "=&d" (temp)
2467 extern inline __attribute__((always_inline)) char *strncpy(char *dest, const char *src, size_t n)
2475 __asm__ __volatile__
2476 ("1:\t%3 = B [%1++] (Z);\n\t"
2477 "B [%0++] = %3;\n\t"
2479 "if ! cc jump 2f;\n\t"
2482 "if ! cc jump 1b (bp);\n"
2484 : "+&a" (dest), "+&a" (src), "+&da" (n), "=&d" (temp)
2490 extern inline __attribute__((always_inline)) int strcmp(const char *cs, const char *ct)
2492 char __res1, __res2;
2495 ("1:\t%2 = B[%0++] (Z);\n\t"
2496 "%3 = B[%1++] (Z);\n\t"
2497 "CC = %2 == %3;\n\t"
2498 "if ! cc jump 2f;\n\t"
2500 "if cc jump 1b (bp);\n\t"
2502 "2:\t%2 = %2 - %3;\n"
2504 : "+&a" (cs), "+&a" (ct), "=&d" (__res1), "=&d" (__res2)
2511 extern inline __attribute__((always_inline)) int strncmp(const char *cs, const char *ct, size_t count)
2513 char __res1, __res2;
2518 ("1:\t%3 = B[%0++] (Z);\n\t"
2519 "%4 = B[%1++] (Z);\n\t"
2520 "CC = %3 == %4;\n\t"
2521 "if ! cc jump 3f;\n\t"
2523 "if ! cc jump 4f;\n\t"
2526 "if ! cc jump 1b;\n"
2529 "3:\t%3 = %3 - %4;\n"
2531 : "+&a" (cs), "+&a" (ct), "+&da" (count), "=&d" (__res1), "=&d" (__res2)
2537 extern void *memset(void *s, int c, size_t count);
2539 extern void *memcpy(void *d, const void *s, size_t count);
2541 extern int memcmp(const void *, const void *, __kernel_size_t);
2543 extern void *memchr(const void *s, int c, size_t n);
2545 extern void *memmove(void *dest, const void *src, size_t count);
2546 # 22 "include/linux/string.h" 2
2547 # 30 "include/linux/string.h"
2548 size_t strlcpy(char *, const char *, size_t);
2551 extern char * strcat(char *, const char *);
2554 extern char * strncat(char *, const char *, __kernel_size_t);
2557 extern size_t strlcat(char *, const char *, __kernel_size_t);
2558 # 48 "include/linux/string.h"
2559 extern int strnicmp(const char *, const char *, __kernel_size_t);
2562 extern char * strchr(const char *,int);
2565 extern char * strnchr(const char *, size_t, int);
2568 extern char * strrchr(const char *,int);
2570 extern char * strstrip(char *);
2572 extern char * strstr(const char *,const char *);
2575 extern __kernel_size_t strlen(const char *);
2578 extern __kernel_size_t strnlen(const char *,__kernel_size_t);
2581 extern char * strpbrk(const char *,const char *);
2584 extern char * strsep(char **,const char *);
2587 extern __kernel_size_t strspn(const char *,const char *);
2590 extern __kernel_size_t strcspn(const char *,const char *);
2591 # 92 "include/linux/string.h"
2592 extern void * memscan(void *,int,__kernel_size_t);
2593 # 101 "include/linux/string.h"
2594 extern char *kstrdup(const char *s, gfp_t gfp);
2595 extern void *kmemdup(const void *src, size_t len, gfp_t gfp);
2596 # 9 "include/linux/bitmap.h" 2
2597 # 84 "include/linux/bitmap.h"
2598 extern int __bitmap_empty(const unsigned long *bitmap, int bits);
2599 extern int __bitmap_full(const unsigned long *bitmap, int bits);
2600 extern int __bitmap_equal(const unsigned long *bitmap1,
2601 const unsigned long *bitmap2, int bits);
2602 extern void __bitmap_complement(unsigned long *dst, const unsigned long *src,
2604 extern void __bitmap_shift_right(unsigned long *dst,
2605 const unsigned long *src, int shift, int bits);
2606 extern void __bitmap_shift_left(unsigned long *dst,
2607 const unsigned long *src, int shift, int bits);
2608 extern void __bitmap_and(unsigned long *dst, const unsigned long *bitmap1,
2609 const unsigned long *bitmap2, int bits);
2610 extern void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1,
2611 const unsigned long *bitmap2, int bits);
2612 extern void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1,
2613 const unsigned long *bitmap2, int bits);
2614 extern void __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1,
2615 const unsigned long *bitmap2, int bits);
2616 extern int __bitmap_intersects(const unsigned long *bitmap1,
2617 const unsigned long *bitmap2, int bits);
2618 extern int __bitmap_subset(const unsigned long *bitmap1,
2619 const unsigned long *bitmap2, int bits);
2620 extern int __bitmap_weight(const unsigned long *bitmap, int bits);
2622 extern int bitmap_scnprintf(char *buf, unsigned int len,
2623 const unsigned long *src, int nbits);
2624 extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user,
2625 unsigned long *dst, int nbits);
2626 extern int bitmap_parse_user(const char *ubuf, unsigned int ulen,
2627 unsigned long *dst, int nbits);
2628 extern int bitmap_scnlistprintf(char *buf, unsigned int len,
2629 const unsigned long *src, int nbits);
2630 extern int bitmap_parselist(const char *buf, unsigned long *maskp,
2632 extern void bitmap_remap(unsigned long *dst, const unsigned long *src,
2633 const unsigned long *old, const unsigned long *new, int bits);
2634 extern int bitmap_bitremap(int oldbit,
2635 const unsigned long *old, const unsigned long *new, int bits);
2636 extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order);
2637 extern void bitmap_release_region(unsigned long *bitmap, int pos, int order);
2638 extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order);
2646 static inline __attribute__((always_inline)) void bitmap_zero(unsigned long *dst, int nbits)
2651 int len = (((nbits)+32 -1)/32) * sizeof(unsigned long);
2652 memset(dst, 0, len);
2656 static inline __attribute__((always_inline)) void bitmap_fill(unsigned long *dst, int nbits)
2658 size_t nlongs = (((nbits)+32 -1)/32);
2660 int len = (nlongs - 1) * sizeof(unsigned long);
2661 memset(dst, 0xff, len);
2663 dst[nlongs - 1] = ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL );
2666 static inline __attribute__((always_inline)) void bitmap_copy(unsigned long *dst, const unsigned long *src,
2672 int len = (((nbits)+32 -1)/32) * sizeof(unsigned long);
2673 memcpy(dst, src, len);
2677 static inline __attribute__((always_inline)) void bitmap_and(unsigned long *dst, const unsigned long *src1,
2678 const unsigned long *src2, int nbits)
2681 *dst = *src1 & *src2;
2683 __bitmap_and(dst, src1, src2, nbits);
2686 static inline __attribute__((always_inline)) void bitmap_or(unsigned long *dst, const unsigned long *src1,
2687 const unsigned long *src2, int nbits)
2690 *dst = *src1 | *src2;
2692 __bitmap_or(dst, src1, src2, nbits);
2695 static inline __attribute__((always_inline)) void bitmap_xor(unsigned long *dst, const unsigned long *src1,
2696 const unsigned long *src2, int nbits)
2699 *dst = *src1 ^ *src2;
2701 __bitmap_xor(dst, src1, src2, nbits);
2704 static inline __attribute__((always_inline)) void bitmap_andnot(unsigned long *dst, const unsigned long *src1,
2705 const unsigned long *src2, int nbits)
2708 *dst = *src1 & ~(*src2);
2710 __bitmap_andnot(dst, src1, src2, nbits);
2713 static inline __attribute__((always_inline)) void bitmap_complement(unsigned long *dst, const unsigned long *src,
2717 *dst = ~(*src) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL );
2719 __bitmap_complement(dst, src, nbits);
2722 static inline __attribute__((always_inline)) int bitmap_equal(const unsigned long *src1,
2723 const unsigned long *src2, int nbits)
2726 return ! ((*src1 ^ *src2) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
2728 return __bitmap_equal(src1, src2, nbits);
2731 static inline __attribute__((always_inline)) int bitmap_intersects(const unsigned long *src1,
2732 const unsigned long *src2, int nbits)
2735 return ((*src1 & *src2) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL )) != 0;
2737 return __bitmap_intersects(src1, src2, nbits);
2740 static inline __attribute__((always_inline)) int bitmap_subset(const unsigned long *src1,
2741 const unsigned long *src2, int nbits)
2744 return ! ((*src1 & ~(*src2)) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
2746 return __bitmap_subset(src1, src2, nbits);
2749 static inline __attribute__((always_inline)) int bitmap_empty(const unsigned long *src, int nbits)
2752 return ! (*src & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
2754 return __bitmap_empty(src, nbits);
2757 static inline __attribute__((always_inline)) int bitmap_full(const unsigned long *src, int nbits)
2760 return ! (~(*src) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
2762 return __bitmap_full(src, nbits);
2765 static inline __attribute__((always_inline)) int bitmap_weight(const unsigned long *src, int nbits)
2768 return hweight_long(*src & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
2769 return __bitmap_weight(src, nbits);
2772 static inline __attribute__((always_inline)) void bitmap_shift_right(unsigned long *dst,
2773 const unsigned long *src, int n, int nbits)
2778 __bitmap_shift_right(dst, src, n, nbits);
2781 static inline __attribute__((always_inline)) void bitmap_shift_left(unsigned long *dst,
2782 const unsigned long *src, int n, int nbits)
2785 *dst = (*src << n) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL );
2787 __bitmap_shift_left(dst, src, n, nbits);
2790 static inline __attribute__((always_inline)) int bitmap_parse(const char *buf, unsigned int buflen,
2791 unsigned long *maskp, int nmaskbits)
2793 return __bitmap_parse(buf, buflen, 0, maskp, nmaskbits);
2795 # 87 "include/linux/cpumask.h" 2
2797 typedef struct { unsigned long bits[(((1)+32 -1)/32)]; } cpumask_t;
2798 extern cpumask_t _unused_cpumask_arg_;
2801 static inline __attribute__((always_inline)) void __cpu_set(int cpu, volatile cpumask_t *dstp)
2803 set_bit(cpu, dstp->bits);
2807 static inline __attribute__((always_inline)) void __cpu_clear(int cpu, volatile cpumask_t *dstp)
2809 clear_bit(cpu, dstp->bits);
2813 static inline __attribute__((always_inline)) void __cpus_setall(cpumask_t *dstp, int nbits)
2815 bitmap_fill(dstp->bits, nbits);
2819 static inline __attribute__((always_inline)) void __cpus_clear(cpumask_t *dstp, int nbits)
2821 bitmap_zero(dstp->bits, nbits);
2828 static inline __attribute__((always_inline)) int __cpu_test_and_set(int cpu, cpumask_t *addr)
2830 return test_and_set_bit(cpu, addr->bits);
2834 static inline __attribute__((always_inline)) void __cpus_and(cpumask_t *dstp, const cpumask_t *src1p,
2835 const cpumask_t *src2p, int nbits)
2837 bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits);
2841 static inline __attribute__((always_inline)) void __cpus_or(cpumask_t *dstp, const cpumask_t *src1p,
2842 const cpumask_t *src2p, int nbits)
2844 bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits);
2848 static inline __attribute__((always_inline)) void __cpus_xor(cpumask_t *dstp, const cpumask_t *src1p,
2849 const cpumask_t *src2p, int nbits)
2851 bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits);
2856 static inline __attribute__((always_inline)) void __cpus_andnot(cpumask_t *dstp, const cpumask_t *src1p,
2857 const cpumask_t *src2p, int nbits)
2859 bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits);
2863 static inline __attribute__((always_inline)) void __cpus_complement(cpumask_t *dstp,
2864 const cpumask_t *srcp, int nbits)
2866 bitmap_complement(dstp->bits, srcp->bits, nbits);
2870 static inline __attribute__((always_inline)) int __cpus_equal(const cpumask_t *src1p,
2871 const cpumask_t *src2p, int nbits)
2873 return bitmap_equal(src1p->bits, src2p->bits, nbits);
2877 static inline __attribute__((always_inline)) int __cpus_intersects(const cpumask_t *src1p,
2878 const cpumask_t *src2p, int nbits)
2880 return bitmap_intersects(src1p->bits, src2p->bits, nbits);
2884 static inline __attribute__((always_inline)) int __cpus_subset(const cpumask_t *src1p,
2885 const cpumask_t *src2p, int nbits)
2887 return bitmap_subset(src1p->bits, src2p->bits, nbits);
2891 static inline __attribute__((always_inline)) int __cpus_empty(const cpumask_t *srcp, int nbits)
2893 return bitmap_empty(srcp->bits, nbits);
2897 static inline __attribute__((always_inline)) int __cpus_full(const cpumask_t *srcp, int nbits)
2899 return bitmap_full(srcp->bits, nbits);
2903 static inline __attribute__((always_inline)) int __cpus_weight(const cpumask_t *srcp, int nbits)
2905 return bitmap_weight(srcp->bits, nbits);
2910 static inline __attribute__((always_inline)) void __cpus_shift_right(cpumask_t *dstp,
2911 const cpumask_t *srcp, int n, int nbits)
2913 bitmap_shift_right(dstp->bits, srcp->bits, n, nbits);
2918 static inline __attribute__((always_inline)) void __cpus_shift_left(cpumask_t *dstp,
2919 const cpumask_t *srcp, int n, int nbits)
2921 bitmap_shift_left(dstp->bits, srcp->bits, n, nbits);
2923 # 270 "include/linux/cpumask.h"
2924 static inline __attribute__((always_inline)) int __cpumask_scnprintf(char *buf, int len,
2925 const cpumask_t *srcp, int nbits)
2927 return bitmap_scnprintf(buf, len, srcp->bits, nbits);
2932 static inline __attribute__((always_inline)) int __cpumask_parse_user(const char *buf, int len,
2933 cpumask_t *dstp, int nbits)
2935 return bitmap_parse_user(buf, len, dstp->bits, nbits);
2940 static inline __attribute__((always_inline)) int __cpulist_scnprintf(char *buf, int len,
2941 const cpumask_t *srcp, int nbits)
2943 return bitmap_scnlistprintf(buf, len, srcp->bits, nbits);
2947 static inline __attribute__((always_inline)) int __cpulist_parse(const char *buf, cpumask_t *dstp, int nbits)
2949 return bitmap_parselist(buf, dstp->bits, nbits);
2954 static inline __attribute__((always_inline)) int __cpu_remap(int oldbit,
2955 const cpumask_t *oldp, const cpumask_t *newp, int nbits)
2957 return bitmap_bitremap(oldbit, oldp->bits, newp->bits, nbits);
2962 static inline __attribute__((always_inline)) void __cpus_remap(cpumask_t *dstp, const cpumask_t *srcp,
2963 const cpumask_t *oldp, const cpumask_t *newp, int nbits)
2965 bitmap_remap(dstp->bits, srcp->bits, oldp->bits, newp->bits, nbits);
2967 # 380 "include/linux/cpumask.h"
2968 extern cpumask_t cpu_possible_map;
2969 extern cpumask_t cpu_online_map;
2970 extern cpumask_t cpu_present_map;
2971 # 55 "include/linux/sched.h" 2
2972 # 1 "include/linux/errno.h" 1
2976 # 1 "include/asm/errno.h" 1
2980 # 1 "include/asm-generic/errno.h" 1
2984 # 1 "include/asm-generic/errno-base.h" 1
2985 # 5 "include/asm-generic/errno.h" 2
2986 # 5 "include/asm/errno.h" 2
2987 # 5 "include/linux/errno.h" 2
2988 # 56 "include/linux/sched.h" 2
2989 # 1 "include/linux/nodemask.h" 1
2990 # 86 "include/linux/nodemask.h"
2991 # 1 "include/linux/numa.h" 1
2992 # 87 "include/linux/nodemask.h" 2
2994 typedef struct { unsigned long bits[((((1 << 0))+32 -1)/32)]; } nodemask_t;
2995 extern nodemask_t _unused_nodemask_arg_;
2998 static inline __attribute__((always_inline)) void __node_set(int node, volatile nodemask_t *dstp)
3000 set_bit(node, dstp->bits);
3004 static inline __attribute__((always_inline)) void __node_clear(int node, volatile nodemask_t *dstp)
3006 clear_bit(node, dstp->bits);
3010 static inline __attribute__((always_inline)) void __nodes_setall(nodemask_t *dstp, int nbits)
3012 bitmap_fill(dstp->bits, nbits);
3016 static inline __attribute__((always_inline)) void __nodes_clear(nodemask_t *dstp, int nbits)
3018 bitmap_zero(dstp->bits, nbits);
3026 static inline __attribute__((always_inline)) int __node_test_and_set(int node, nodemask_t *addr)
3028 return test_and_set_bit(node, addr->bits);
3033 static inline __attribute__((always_inline)) void __nodes_and(nodemask_t *dstp, const nodemask_t *src1p,
3034 const nodemask_t *src2p, int nbits)
3036 bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits);
3041 static inline __attribute__((always_inline)) void __nodes_or(nodemask_t *dstp, const nodemask_t *src1p,
3042 const nodemask_t *src2p, int nbits)
3044 bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits);
3049 static inline __attribute__((always_inline)) void __nodes_xor(nodemask_t *dstp, const nodemask_t *src1p,
3050 const nodemask_t *src2p, int nbits)
3052 bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits);
3057 static inline __attribute__((always_inline)) void __nodes_andnot(nodemask_t *dstp, const nodemask_t *src1p,
3058 const nodemask_t *src2p, int nbits)
3060 bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits);
3065 static inline __attribute__((always_inline)) void __nodes_complement(nodemask_t *dstp,
3066 const nodemask_t *srcp, int nbits)
3068 bitmap_complement(dstp->bits, srcp->bits, nbits);
3073 static inline __attribute__((always_inline)) int __nodes_equal(const nodemask_t *src1p,
3074 const nodemask_t *src2p, int nbits)
3076 return bitmap_equal(src1p->bits, src2p->bits, nbits);
3081 static inline __attribute__((always_inline)) int __nodes_intersects(const nodemask_t *src1p,
3082 const nodemask_t *src2p, int nbits)
3084 return bitmap_intersects(src1p->bits, src2p->bits, nbits);
3089 static inline __attribute__((always_inline)) int __nodes_subset(const nodemask_t *src1p,
3090 const nodemask_t *src2p, int nbits)
3092 return bitmap_subset(src1p->bits, src2p->bits, nbits);
3096 static inline __attribute__((always_inline)) int __nodes_empty(const nodemask_t *srcp, int nbits)
3098 return bitmap_empty(srcp->bits, nbits);
3102 static inline __attribute__((always_inline)) int __nodes_full(const nodemask_t *srcp, int nbits)
3104 return bitmap_full(srcp->bits, nbits);
3108 static inline __attribute__((always_inline)) int __nodes_weight(const nodemask_t *srcp, int nbits)
3110 return bitmap_weight(srcp->bits, nbits);
3115 static inline __attribute__((always_inline)) void __nodes_shift_right(nodemask_t *dstp,
3116 const nodemask_t *srcp, int n, int nbits)
3118 bitmap_shift_right(dstp->bits, srcp->bits, n, nbits);
3123 static inline __attribute__((always_inline)) void __nodes_shift_left(nodemask_t *dstp,
3124 const nodemask_t *srcp, int n, int nbits)
3126 bitmap_shift_left(dstp->bits, srcp->bits, n, nbits);
3133 static inline __attribute__((always_inline)) int __first_node(const nodemask_t *srcp)
3135 return ({ int __x = ((1 << 0)); int __y = (find_next_bit((srcp->bits), ((1 << 0)), 0)); __x < __y ? __x: __y; });
3139 static inline __attribute__((always_inline)) int __next_node(int n, const nodemask_t *srcp)
3141 return ({ int __x = ((1 << 0)); int __y = (find_next_bit(srcp->bits, (1 << 0), n+1)); __x < __y ? __x: __y; });
3143 # 251 "include/linux/nodemask.h"
3144 static inline __attribute__((always_inline)) int __first_unset_node(const nodemask_t *maskp)
3146 return ({ int __x = ((1 << 0)); int __y = (find_next_zero_bit((maskp->bits), ((1 << 0)), 0)); __x < __y ? __x: __y; });
3149 # 285 "include/linux/nodemask.h"
3150 static inline __attribute__((always_inline)) int __nodemask_scnprintf(char *buf, int len,
3151 const nodemask_t *srcp, int nbits)
3153 return bitmap_scnprintf(buf, len, srcp->bits, nbits);
3158 static inline __attribute__((always_inline)) int __nodemask_parse_user(const char *buf, int len,
3159 nodemask_t *dstp, int nbits)
3161 return bitmap_parse_user(buf, len, dstp->bits, nbits);
3166 static inline __attribute__((always_inline)) int __nodelist_scnprintf(char *buf, int len,
3167 const nodemask_t *srcp, int nbits)
3169 return bitmap_scnlistprintf(buf, len, srcp->bits, nbits);
3173 static inline __attribute__((always_inline)) int __nodelist_parse(const char *buf, nodemask_t *dstp, int nbits)
3175 return bitmap_parselist(buf, dstp->bits, nbits);
3180 static inline __attribute__((always_inline)) int __node_remap(int oldbit,
3181 const nodemask_t *oldp, const nodemask_t *newp, int nbits)
3183 return bitmap_bitremap(oldbit, oldp->bits, newp->bits, nbits);
3188 static inline __attribute__((always_inline)) void __nodes_remap(nodemask_t *dstp, const nodemask_t *srcp,
3189 const nodemask_t *oldp, const nodemask_t *newp, int nbits)
3191 bitmap_remap(dstp->bits, srcp->bits, oldp->bits, newp->bits, nbits);
3193 # 345 "include/linux/nodemask.h"
3194 extern nodemask_t node_online_map;
3195 extern nodemask_t node_possible_map;
3196 # 57 "include/linux/sched.h" 2
3199 # 1 "include/asm/semaphore.h" 1
3206 # 1 "include/linux/wait.h" 1
3207 # 22 "include/linux/wait.h"
3208 # 1 "include/linux/list.h" 1
3215 # 1 "include/linux/poison.h" 1
3216 # 8 "include/linux/list.h" 2
3217 # 1 "include/linux/prefetch.h" 1
3218 # 14 "include/linux/prefetch.h"
3219 # 1 "include/asm/processor.h" 1
3220 # 10 "include/asm/processor.h"
3221 # 1 "include/asm/segment.h" 1
3222 # 11 "include/asm/processor.h" 2
3225 static inline __attribute__((always_inline)) unsigned long rdusp(void)
3229 __asm__ __volatile__("%0 = usp;\n\t":"=da"(usp));
3233 static inline __attribute__((always_inline)) void wrusp(unsigned long usp)
3235 __asm__ __volatile__("usp = %0;\n\t"::"da"(usp));
3241 extern unsigned long memory_end;
3246 struct thread_struct {
3249 unsigned short seqstat;
3252 void * debuggerinfo;
3254 # 69 "include/asm/processor.h"
3258 static inline __attribute__((always_inline)) void release_thread(struct task_struct *dead_task)
3264 extern int kernel_thread(int (*fn) (void *), void *arg, unsigned long flags);
3269 static inline __attribute__((always_inline)) void exit_thread(void)
3278 unsigned long get_wchan(struct task_struct *p);
3279 # 15 "include/linux/prefetch.h" 2
3280 # 1 "include/asm/cache.h" 1
3281 # 16 "include/linux/prefetch.h" 2
3282 # 43 "include/linux/prefetch.h"
3283 static inline __attribute__((always_inline)) void prefetch(const void *x) {;}
3287 static inline __attribute__((always_inline)) void prefetchw(const void *x) {;}
3288 # 58 "include/linux/prefetch.h"
3289 static inline __attribute__((always_inline)) void prefetch_range(void *addr, size_t len)
3299 # 9 "include/linux/list.h" 2
3300 # 21 "include/linux/list.h"
3302 struct list_head *next, *prev;
3310 static inline __attribute__((always_inline)) void INIT_LIST_HEAD(struct list_head *list)
3315 # 43 "include/linux/list.h"
3316 static inline __attribute__((always_inline)) void __list_add(struct list_head *new,
3317 struct list_head *prev,
3318 struct list_head *next)
3325 # 67 "include/linux/list.h"
3326 static inline __attribute__((always_inline)) void list_add(struct list_head *new, struct list_head *head)
3328 __list_add(new, head, head->next);
3330 # 84 "include/linux/list.h"
3331 static inline __attribute__((always_inline)) void list_add_tail(struct list_head *new, struct list_head *head)
3333 __list_add(new, head->prev, head);
3342 static inline __attribute__((always_inline)) void __list_add_rcu(struct list_head * new,
3343 struct list_head * prev, struct list_head * next)
3347 __asm__ __volatile__("": : :"memory");
3351 # 121 "include/linux/list.h"
3352 static inline __attribute__((always_inline)) void list_add_rcu(struct list_head *new, struct list_head *head)
3354 __list_add_rcu(new, head, head->next);
3356 # 142 "include/linux/list.h"
3357 static inline __attribute__((always_inline)) void list_add_tail_rcu(struct list_head *new,
3358 struct list_head *head)
3360 __list_add_rcu(new, head->prev, head);
3362 # 155 "include/linux/list.h"
3363 static inline __attribute__((always_inline)) void __list_del(struct list_head * prev, struct list_head * next)
3368 # 168 "include/linux/list.h"
3369 static inline __attribute__((always_inline)) void list_del(struct list_head *entry)
3371 __list_del(entry->prev, entry->next);
3372 entry->next = ((void *) 0x00100100);
3373 entry->prev = ((void *) 0x00200200);
3375 # 202 "include/linux/list.h"
3376 static inline __attribute__((always_inline)) void list_del_rcu(struct list_head *entry)
3378 __list_del(entry->prev, entry->next);
3379 entry->prev = ((void *) 0x00200200);
3388 static inline __attribute__((always_inline)) void list_replace(struct list_head *old,
3389 struct list_head *new)
3391 new->next = old->next;
3392 new->next->prev = new;
3393 new->prev = old->prev;
3394 new->prev->next = new;
3397 static inline __attribute__((always_inline)) void list_replace_init(struct list_head *old,
3398 struct list_head *new)
3400 list_replace(old, new);
3401 INIT_LIST_HEAD(old);
3403 # 238 "include/linux/list.h"
3404 static inline __attribute__((always_inline)) void list_replace_rcu(struct list_head *old,
3405 struct list_head *new)
3407 new->next = old->next;
3408 new->prev = old->prev;
3409 __asm__ __volatile__("": : :"memory");
3410 new->next->prev = new;
3411 new->prev->next = new;
3412 old->prev = ((void *) 0x00200200);
3419 static inline __attribute__((always_inline)) void list_del_init(struct list_head *entry)
3421 __list_del(entry->prev, entry->next);
3422 INIT_LIST_HEAD(entry);
3430 static inline __attribute__((always_inline)) void list_move(struct list_head *list, struct list_head *head)
3432 __list_del(list->prev, list->next);
3433 list_add(list, head);
3441 static inline __attribute__((always_inline)) void list_move_tail(struct list_head *list,
3442 struct list_head *head)
3444 __list_del(list->prev, list->next);
3445 list_add_tail(list, head);
3453 static inline __attribute__((always_inline)) int list_is_last(const struct list_head *list,
3454 const struct list_head *head)
3456 return list->next == head;
3463 static inline __attribute__((always_inline)) int list_empty(const struct list_head *head)
3465 return head->next == head;
3467 # 315 "include/linux/list.h"
3468 static inline __attribute__((always_inline)) int list_empty_careful(const struct list_head *head)
3470 struct list_head *next = head->next;
3471 return (next == head) && (next == head->prev);
3474 static inline __attribute__((always_inline)) void __list_splice(struct list_head *list,
3475 struct list_head *head)
3477 struct list_head *first = list->next;
3478 struct list_head *last = list->prev;
3479 struct list_head *at = head->next;
3493 static inline __attribute__((always_inline)) void list_splice(struct list_head *list, struct list_head *head)
3495 if (!list_empty(list))
3496 __list_splice(list, head);
3498 # 353 "include/linux/list.h"
3499 static inline __attribute__((always_inline)) void list_splice_init(struct list_head *list,
3500 struct list_head *head)
3502 if (!list_empty(list)) {
3503 __list_splice(list, head);
3504 INIT_LIST_HEAD(list);
3507 # 607 "include/linux/list.h"
3509 struct hlist_node *first;
3513 struct hlist_node *next, **pprev;
3519 static inline __attribute__((always_inline)) void INIT_HLIST_NODE(struct hlist_node *h)
3521 h->next = ((void *)0);
3522 h->pprev = ((void *)0);
3525 static inline __attribute__((always_inline)) int hlist_unhashed(const struct hlist_node *h)
3530 static inline __attribute__((always_inline)) int hlist_empty(const struct hlist_head *h)
3535 static inline __attribute__((always_inline)) void __hlist_del(struct hlist_node *n)
3537 struct hlist_node *next = n->next;
3538 struct hlist_node **pprev = n->pprev;
3541 next->pprev = pprev;
3544 static inline __attribute__((always_inline)) void hlist_del(struct hlist_node *n)
3547 n->next = ((void *) 0x00100100);
3548 n->pprev = ((void *) 0x00200200);
3550 # 669 "include/linux/list.h"
3551 static inline __attribute__((always_inline)) void hlist_del_rcu(struct hlist_node *n)
3554 n->pprev = ((void *) 0x00200200);
3557 static inline __attribute__((always_inline)) void hlist_del_init(struct hlist_node *n)
3559 if (!hlist_unhashed(n)) {
3564 # 690 "include/linux/list.h"
3565 static inline __attribute__((always_inline)) void hlist_replace_rcu(struct hlist_node *old,
3566 struct hlist_node *new)
3568 struct hlist_node *next = old->next;
3571 new->pprev = old->pprev;
3572 __asm__ __volatile__("": : :"memory");
3574 new->next->pprev = &new->next;
3576 old->pprev = ((void *) 0x00200200);
3579 static inline __attribute__((always_inline)) void hlist_add_head(struct hlist_node *n, struct hlist_head *h)
3581 struct hlist_node *first = h->first;
3584 first->pprev = &n->next;
3586 n->pprev = &h->first;
3588 # 734 "include/linux/list.h"
3589 static inline __attribute__((always_inline)) void hlist_add_head_rcu(struct hlist_node *n,
3590 struct hlist_head *h)
3592 struct hlist_node *first = h->first;
3594 n->pprev = &h->first;
3595 __asm__ __volatile__("": : :"memory");
3597 first->pprev = &n->next;
3602 static inline __attribute__((always_inline)) void hlist_add_before(struct hlist_node *n,
3603 struct hlist_node *next)
3605 n->pprev = next->pprev;
3607 next->pprev = &n->next;
3611 static inline __attribute__((always_inline)) void hlist_add_after(struct hlist_node *n,
3612 struct hlist_node *next)
3614 next->next = n->next;
3616 next->pprev = &n->next;
3619 next->next->pprev = &next->next;
3621 # 785 "include/linux/list.h"
3622 static inline __attribute__((always_inline)) void hlist_add_before_rcu(struct hlist_node *n,
3623 struct hlist_node *next)
3625 n->pprev = next->pprev;
3627 __asm__ __volatile__("": : :"memory");
3628 next->pprev = &n->next;
3631 # 813 "include/linux/list.h"
3632 static inline __attribute__((always_inline)) void hlist_add_after_rcu(struct hlist_node *prev,
3633 struct hlist_node *n)
3635 n->next = prev->next;
3636 n->pprev = &prev->next;
3637 __asm__ __volatile__("": : :"memory");
3640 n->next->pprev = &n->next;
3642 # 23 "include/linux/wait.h" 2
3648 typedef struct __wait_queue wait_queue_t;
3649 typedef int (*wait_queue_func_t)(wait_queue_t *wait, unsigned mode, int sync, void *key);
3650 int default_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
3652 struct __wait_queue {
3656 wait_queue_func_t func;
3657 struct list_head task_list;
3660 struct wait_bit_key {
3665 struct wait_bit_queue {
3666 struct wait_bit_key key;
3670 struct __wait_queue_head {
3672 struct list_head task_list;
3674 typedef struct __wait_queue_head wait_queue_head_t;
3677 # 80 "include/linux/wait.h"
3678 extern void init_waitqueue_head(wait_queue_head_t *q);
3679 # 91 "include/linux/wait.h"
3680 static inline __attribute__((always_inline)) void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p)
3684 q->func = default_wake_function;
3687 static inline __attribute__((always_inline)) void init_waitqueue_func_entry(wait_queue_t *q,
3688 wait_queue_func_t func)
3691 q->private = ((void *)0);
3695 static inline __attribute__((always_inline)) int waitqueue_active(wait_queue_head_t *q)
3697 return !list_empty(&q->task_list);
3699 # 120 "include/linux/wait.h"
3700 extern void add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait);
3701 extern void add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t * wait);
3702 extern void remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait);
3704 static inline __attribute__((always_inline)) void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new)
3706 list_add(&new->task_list, &head->task_list);
3712 static inline __attribute__((always_inline)) void __add_wait_queue_tail(wait_queue_head_t *head,
3715 list_add_tail(&new->task_list, &head->task_list);
3718 static inline __attribute__((always_inline)) void __remove_wait_queue(wait_queue_head_t *head,
3721 list_del(&old->task_list);
3724 void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key);
3725 extern void __wake_up_locked(wait_queue_head_t *q, unsigned int mode);
3726 extern void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr);
3727 void __wake_up_bit(wait_queue_head_t *, void *, int);
3728 int __wait_on_bit(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned);
3729 int __wait_on_bit_lock(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned);
3730 void wake_up_bit(void *, int);
3731 int out_of_line_wait_on_bit(void *, int, int (*)(void *), unsigned);
3732 int out_of_line_wait_on_bit_lock(void *, int, int (*)(void *), unsigned);
3733 wait_queue_head_t *bit_waitqueue(void *, int);
3734 # 351 "include/linux/wait.h"
3735 static inline __attribute__((always_inline)) void add_wait_queue_exclusive_locked(wait_queue_head_t *q,
3736 wait_queue_t * wait)
3738 wait->flags |= 0x01;
3739 __add_wait_queue_tail(q, wait);
3745 static inline __attribute__((always_inline)) void remove_wait_queue_locked(wait_queue_head_t *q,
3746 wait_queue_t * wait)
3748 __remove_wait_queue(q, wait);
3756 extern void sleep_on(wait_queue_head_t *q);
3757 extern long sleep_on_timeout(wait_queue_head_t *q, signed long timeout);
3759 extern void interruptible_sleep_on(wait_queue_head_t *q);
3760 extern long interruptible_sleep_on_timeout(wait_queue_head_t *q, signed long timeout);
3766 void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state);
3768 void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state);
3770 void finish_wait(wait_queue_head_t *q, wait_queue_t *wait);
3771 int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
3772 int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
3773 # 429 "include/linux/wait.h"
3774 static inline __attribute__((always_inline)) int wait_on_bit(void *word, int bit,
3775 int (*action)(void *), unsigned mode)
3777 if (!(__builtin_constant_p(bit) ? __constant_test_bit((bit),(word)) : __test_bit((bit),(word))))
3779 return out_of_line_wait_on_bit(word, bit, action, mode);
3781 # 453 "include/linux/wait.h"
3782 static inline __attribute__((always_inline)) int wait_on_bit_lock(void *word, int bit,
3783 int (*action)(void *), unsigned mode)
3785 if (!test_and_set_bit(bit, word))
3787 return out_of_line_wait_on_bit_lock(word, bit, action, mode);
3789 # 8 "include/asm/semaphore.h" 2
3791 # 1 "include/linux/rwsem.h" 1
3792 # 19 "include/linux/rwsem.h"
3793 struct rw_semaphore;
3796 # 1 "include/linux/rwsem-spinlock.h" 1
3797 # 22 "include/linux/rwsem-spinlock.h"
3798 struct rwsem_waiter;
3799 # 31 "include/linux/rwsem-spinlock.h"
3800 struct rw_semaphore {
3802 spinlock_t wait_lock;
3803 struct list_head wait_list;
3808 # 52 "include/linux/rwsem-spinlock.h"
3809 extern void __init_rwsem(struct rw_semaphore *sem, const char *name,
3810 struct lock_class_key *key);
3811 # 62 "include/linux/rwsem-spinlock.h"
3812 extern void __down_read(struct rw_semaphore *sem);
3813 extern int __down_read_trylock(struct rw_semaphore *sem);
3814 extern void __down_write(struct rw_semaphore *sem);
3815 extern void __down_write_nested(struct rw_semaphore *sem, int subclass);
3816 extern int __down_write_trylock(struct rw_semaphore *sem);
3817 extern void __up_read(struct rw_semaphore *sem);
3818 extern void __up_write(struct rw_semaphore *sem);
3819 extern void __downgrade_write(struct rw_semaphore *sem);
3821 static inline __attribute__((always_inline)) int rwsem_is_locked(struct rw_semaphore *sem)
3823 return (sem->activity != 0);
3825 # 23 "include/linux/rwsem.h" 2
3833 extern void down_read(struct rw_semaphore *sem);
3838 extern int down_read_trylock(struct rw_semaphore *sem);
3843 extern void down_write(struct rw_semaphore *sem);
3848 extern int down_write_trylock(struct rw_semaphore *sem);
3853 extern void up_read(struct rw_semaphore *sem);
3858 extern void up_write(struct rw_semaphore *sem);
3863 extern void downgrade_write(struct rw_semaphore *sem);
3864 # 10 "include/asm/semaphore.h" 2
3865 # 21 "include/asm/semaphore.h"
3869 wait_queue_head_t wait;
3871 # 40 "include/asm/semaphore.h"
3872 static inline __attribute__((always_inline)) void sema_init(struct semaphore *sem, int val)
3874 *sem = (struct semaphore){ .count = { (val) }, .sleepers = 0, .wait = { .lock = (spinlock_t) { .raw_lock = { }, }, .task_list = { &((*sem).wait).task_list, &((*sem).wait).task_list } } };
3877 static inline __attribute__((always_inline)) void init_MUTEX(struct semaphore *sem)
3882 static inline __attribute__((always_inline)) void init_MUTEX_LOCKED(struct semaphore *sem)
3887 void __down(struct semaphore *sem);
3888 int __down_interruptible(struct semaphore *sem);
3889 int __down_trylock(struct semaphore *sem);
3890 void __up(struct semaphore *sem);
3892 extern spinlock_t semaphore_wake_lock;
3899 static inline __attribute__((always_inline)) void down(struct semaphore *sem)
3901 do { do { } while (0); } while (0);
3902 if (atomic_sub_return(1,(&sem->count)) < 0)
3906 static inline __attribute__((always_inline)) int down_interruptible(struct semaphore *sem)
3910 do { do { } while (0); } while (0);
3911 if (atomic_sub_return(1,(&sem->count)) < 0)
3912 ret = __down_interruptible(sem);
3916 static inline __attribute__((always_inline)) int down_trylock(struct semaphore *sem)
3920 if (atomic_sub_return(1,(&sem->count)) < 0)
3921 ret = __down_trylock(sem);
3931 static inline __attribute__((always_inline)) void up(struct semaphore *sem)
3933 if (atomic_add_return(1,(&sem->count)) <= 0)
3936 # 60 "include/linux/sched.h" 2
3939 # 1 "include/asm/mmu.h" 1
3945 struct sram_list_struct {
3946 struct sram_list_struct *next;
3952 struct vm_list_struct *vmlist;
3953 unsigned long end_brk;
3954 unsigned long stack_start;
3958 void *l1_stack_save;
3960 struct sram_list_struct *sram_list;
3963 unsigned long exec_fdpic_loadmap;
3964 unsigned long interp_fdpic_loadmap;
3968 # 63 "include/linux/sched.h" 2
3969 # 1 "include/asm/cputime.h" 1
3973 # 1 "include/asm-generic/cputime.h" 1
3980 typedef unsigned long cputime_t;
3981 # 23 "include/asm-generic/cputime.h"
3982 typedef u64 cputime64_t;
3983 # 5 "include/asm/cputime.h" 2
3984 # 64 "include/linux/sched.h" 2
3986 # 1 "include/linux/smp.h" 1
3987 # 10 "include/linux/smp.h"
3988 extern void cpu_idle(void);
3989 # 87 "include/linux/smp.h"
3990 static inline __attribute__((always_inline)) int up_smp_call_function(void)
3994 # 99 "include/linux/smp.h"
3995 static inline __attribute__((always_inline)) void smp_send_reschedule(int cpu) { }
3996 # 131 "include/linux/smp.h"
3997 void smp_setup_processor_id(void);
3998 # 66 "include/linux/sched.h" 2
3999 # 1 "include/linux/sem.h" 1
4003 # 1 "include/linux/ipc.h" 1
4004 # 9 "include/linux/ipc.h"
4010 __kernel_uid_t cuid;
4011 __kernel_gid_t cgid;
4012 __kernel_mode_t mode;
4017 # 1 "include/asm/ipcbuf.h" 1
4018 # 16 "include/asm/ipcbuf.h"
4021 __kernel_uid32_t uid;
4022 __kernel_gid32_t gid;
4023 __kernel_uid32_t cuid;
4024 __kernel_gid32_t cgid;
4025 __kernel_mode_t mode;
4026 unsigned short __pad1;
4028 unsigned short __pad2;
4029 unsigned long __unused1;
4030 unsigned long __unused2;
4032 # 22 "include/linux/ipc.h" 2
4033 # 54 "include/linux/ipc.h"
4034 # 1 "include/linux/kref.h" 1
4035 # 23 "include/linux/kref.h"
4040 void kref_init(struct kref *kref);
4041 void kref_get(struct kref *kref);
4042 int kref_put(struct kref *kref, void (*release) (struct kref *kref));
4043 # 55 "include/linux/ipc.h" 2
4048 struct kern_ipc_perm
4063 struct ipc_namespace {
4065 struct ipc_ids *ids[3];
4080 extern struct ipc_namespace init_ipc_ns;
4081 # 104 "include/linux/ipc.h"
4082 static inline __attribute__((always_inline)) int copy_ipcs(unsigned long flags, struct task_struct *tsk)
4088 static inline __attribute__((always_inline)) struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns)
4097 static inline __attribute__((always_inline)) void put_ipc_ns(struct ipc_namespace *ns)
4103 # 5 "include/linux/sem.h" 2
4104 # 23 "include/linux/sem.h"
4106 struct ipc_perm sem_perm;
4107 __kernel_time_t sem_otime;
4108 __kernel_time_t sem_ctime;
4109 struct sem *sem_base;
4110 struct sem_queue *sem_pending;
4111 struct sem_queue **sem_pending_last;
4112 struct sem_undo *undo;
4113 unsigned short sem_nsems;
4117 # 1 "include/asm/sembuf.h" 1
4118 # 14 "include/asm/sembuf.h"
4120 struct ipc64_perm sem_perm;
4121 __kernel_time_t sem_otime;
4122 unsigned long __unused1;
4123 __kernel_time_t sem_ctime;
4124 unsigned long __unused2;
4125 unsigned long sem_nsems;
4126 unsigned long __unused3;
4127 unsigned long __unused4;
4129 # 36 "include/linux/sem.h" 2
4133 unsigned short sem_num;
4141 struct semid_ds *buf;
4142 unsigned short *array;
4143 struct seminfo *__buf;
4159 # 82 "include/linux/sem.h"
4170 struct kern_ipc_perm sem_perm;
4174 struct sem *sem_base;
4175 struct sem_queue *sem_pending;
4176 struct sem_queue **sem_pending_last;
4177 struct sem_undo *undo;
4178 unsigned long sem_nsems;
4183 struct sem_queue * next;
4184 struct sem_queue ** prev;
4185 struct task_struct* sleeper;
4186 struct sem_undo * undo;
4189 struct sem_array * sma;
4191 struct sembuf * sops;
4200 struct sem_undo * proc_next;
4201 struct sem_undo * id_next;
4209 struct sem_undo_list {
4212 struct sem_undo *proc_list;
4216 struct sem_undo_list *undo_list;
4225 static inline __attribute__((always_inline)) int copy_semundo(unsigned long clone_flags, struct task_struct *tsk)
4230 static inline __attribute__((always_inline)) void exit_sem(struct task_struct *tsk)
4234 # 67 "include/linux/sched.h" 2
4235 # 1 "include/linux/signal.h" 1
4239 # 1 "include/asm/signal.h" 1
4247 # 17 "include/asm/signal.h"
4248 typedef unsigned long old_sigset_t;
4251 unsigned long sig[(64 / 32)];
4253 # 107 "include/asm/signal.h"
4254 # 1 "include/asm-generic/signal.h" 1
4255 # 17 "include/asm-generic/signal.h"
4256 typedef void __signalfn_t(int);
4257 typedef __signalfn_t *__sighandler_t;
4259 typedef void __restorefn_t(void);
4260 typedef __restorefn_t *__sigrestore_t;
4261 # 108 "include/asm/signal.h" 2
4264 struct old_sigaction {
4265 __sighandler_t sa_handler;
4266 old_sigset_t sa_mask;
4267 unsigned long sa_flags;
4268 void (*sa_restorer) (void);
4272 __sighandler_t sa_handler;
4273 unsigned long sa_flags;
4274 void (*sa_restorer) (void);
4278 struct k_sigaction {
4279 struct sigaction sa;
4281 # 145 "include/asm/signal.h"
4282 typedef struct sigaltstack {
4290 # 1 "include/asm/sigcontext.h" 1
4296 unsigned long sc_mask;
4297 unsigned long sc_usp;
4298 unsigned long sc_r0;
4299 unsigned long sc_r1;
4300 unsigned long sc_r2;
4301 unsigned long sc_r3;
4302 unsigned long sc_r4;
4303 unsigned long sc_p0;
4304 unsigned long sc_p1;
4305 unsigned long sc_p2;
4306 unsigned long sc_p3;
4307 unsigned long sc_i0;
4308 unsigned long sc_i1;
4309 unsigned long sc_i2;
4310 unsigned long sc_i3;
4311 unsigned long sc_m0;
4312 unsigned long sc_m1;
4313 unsigned long sc_m2;
4314 unsigned long sc_m3;
4315 unsigned long sc_l0;
4316 unsigned long sc_l1;
4317 unsigned long sc_l2;
4318 unsigned long sc_l3;
4319 unsigned long sc_b0;
4320 unsigned long sc_b1;
4321 unsigned long sc_b2;
4322 unsigned long sc_b3;
4323 unsigned long sc_a0x;
4324 unsigned long sc_a0w;
4325 unsigned long sc_a1x;
4326 unsigned long sc_a1w;
4327 unsigned long sc_astat;
4328 unsigned long sc_rets;
4329 unsigned long sc_lc0;
4330 unsigned long sc_lc1;
4331 unsigned long sc_lt0;
4332 unsigned long sc_lt1;
4333 unsigned long sc_lb0;
4334 unsigned long sc_lb1;
4335 unsigned long sc_seqstat;
4336 unsigned long sc_pc;
4337 unsigned long sc_retx;
4339 # 154 "include/asm/signal.h" 2
4340 # 5 "include/linux/signal.h" 2
4341 # 1 "include/asm/siginfo.h" 1
4346 # 1 "include/asm-generic/siginfo.h" 1
4353 typedef union sigval {
4357 # 40 "include/asm-generic/siginfo.h"
4358 typedef struct siginfo {
4364 int _pad[((128 - (3 * sizeof(int))) / sizeof(int))];
4376 char _pad[sizeof( uid_t) - sizeof(int)];
4412 # 251 "include/asm-generic/siginfo.h"
4413 typedef struct sigevent {
4414 sigval_t sigev_value;
4418 int _pad[((64 - (sizeof(int) * 2 + sizeof(sigval_t))) / sizeof(int))];
4422 void (*_function)(sigval_t);
4435 void do_schedule_next_timer(struct siginfo *info);
4441 static inline __attribute__((always_inline)) void copy_siginfo(struct siginfo *to, struct siginfo *from)
4443 if (from->si_code < 0)
4444 memcpy(to, from, sizeof(*to));
4447 memcpy(to, from, (3 * sizeof(int)) + sizeof(from->_sifields._sigchld));
4452 extern int copy_siginfo_to_user(struct siginfo *to, struct siginfo *from);
4453 # 6 "include/asm/siginfo.h" 2
4454 # 6 "include/linux/signal.h" 2
4455 # 15 "include/linux/signal.h"
4457 struct list_head list;
4460 struct user_struct *user;
4467 struct list_head list;
4470 # 39 "include/linux/signal.h"
4471 static inline __attribute__((always_inline)) void sigaddset(sigset_t *set, int _sig)
4473 unsigned long sig = _sig - 1;
4475 set->sig[0] |= 1UL << sig;
4477 set->sig[sig / 32] |= 1UL << (sig % 32);
4480 static inline __attribute__((always_inline)) void sigdelset(sigset_t *set, int _sig)
4482 unsigned long sig = _sig - 1;
4484 set->sig[0] &= ~(1UL << sig);
4486 set->sig[sig / 32] &= ~(1UL << (sig % 32));
4489 static inline __attribute__((always_inline)) int sigismember(sigset_t *set, int _sig)
4491 unsigned long sig = _sig - 1;
4493 return 1 & (set->sig[0] >> sig);
4495 return 1 & (set->sig[sig / 32] >> (sig % 32));
4498 static inline __attribute__((always_inline)) int sigfindinword(unsigned long word)
4500 return __ffs(~(~word));
4505 static inline __attribute__((always_inline)) int sigisemptyset(sigset_t *set)
4507 extern void _NSIG_WORDS_is_unsupported_size(void);
4508 switch ((64 / 32)) {
4510 return (set->sig[3] | set->sig[2] |
4511 set->sig[1] | set->sig[0]) == 0;
4513 return (set->sig[1] | set->sig[0]) == 0;
4515 return set->sig[0] == 0;
4517 _NSIG_WORDS_is_unsupported_size();
4521 # 120 "include/linux/signal.h"
4522 static inline __attribute__((always_inline)) void sigorsets(sigset_t *r, const sigset_t *a, const sigset_t *b) { extern void _NSIG_WORDS_is_unsupported_size(void); unsigned long a0, a1, a2, a3, b0, b1, b2, b3; switch ((64 / 32)) { case 4: a3 = a->sig[3]; a2 = a->sig[2]; b3 = b->sig[3]; b2 = b->sig[2]; r->sig[3] = ((a3) | (b3)); r->sig[2] = ((a2) | (b2)); case 2: a1 = a->sig[1]; b1 = b->sig[1]; r->sig[1] = ((a1) | (b1)); case 1: a0 = a->sig[0]; b0 = b->sig[0]; r->sig[0] = ((a0) | (b0)); break; default: _NSIG_WORDS_is_unsupported_size(); } }
4525 static inline __attribute__((always_inline)) void sigandsets(sigset_t *r, const sigset_t *a, const sigset_t *b) { extern void _NSIG_WORDS_is_unsupported_size(void); unsigned long a0, a1, a2, a3, b0, b1, b2, b3; switch ((64 / 32)) { case 4: a3 = a->sig[3]; a2 = a->sig[2]; b3 = b->sig[3]; b2 = b->sig[2]; r->sig[3] = ((a3) & (b3)); r->sig[2] = ((a2) & (b2)); case 2: a1 = a->sig[1]; b1 = b->sig[1]; r->sig[1] = ((a1) & (b1)); case 1: a0 = a->sig[0]; b0 = b->sig[0]; r->sig[0] = ((a0) & (b0)); break; default: _NSIG_WORDS_is_unsupported_size(); } }
4528 static inline __attribute__((always_inline)) void signandsets(sigset_t *r, const sigset_t *a, const sigset_t *b) { extern void _NSIG_WORDS_is_unsupported_size(void); unsigned long a0, a1, a2, a3, b0, b1, b2, b3; switch ((64 / 32)) { case 4: a3 = a->sig[3]; a2 = a->sig[2]; b3 = b->sig[3]; b2 = b->sig[2]; r->sig[3] = ((a3) & ~(b3)); r->sig[2] = ((a2) & ~(b2)); case 2: a1 = a->sig[1]; b1 = b->sig[1]; r->sig[1] = ((a1) & ~(b1)); case 1: a0 = a->sig[0]; b0 = b->sig[0]; r->sig[0] = ((a0) & ~(b0)); break; default: _NSIG_WORDS_is_unsupported_size(); } }
4529 # 150 "include/linux/signal.h"
4530 static inline __attribute__((always_inline)) void signotset(sigset_t *set) { extern void _NSIG_WORDS_is_unsupported_size(void); switch ((64 / 32)) { case 4: set->sig[3] = (~(set->sig[3])); set->sig[2] = (~(set->sig[2])); case 2: set->sig[1] = (~(set->sig[1])); case 1: set->sig[0] = (~(set->sig[0])); break; default: _NSIG_WORDS_is_unsupported_size(); } }
4535 static inline __attribute__((always_inline)) void sigemptyset(sigset_t *set)
4537 switch ((64 / 32)) {
4539 memset(set, 0, sizeof(sigset_t));
4541 case 2: set->sig[1] = 0;
4542 case 1: set->sig[0] = 0;
4547 static inline __attribute__((always_inline)) void sigfillset(sigset_t *set)
4549 switch ((64 / 32)) {
4551 memset(set, -1, sizeof(sigset_t));
4553 case 2: set->sig[1] = -1;
4554 case 1: set->sig[0] = -1;
4561 static inline __attribute__((always_inline)) void sigaddsetmask(sigset_t *set, unsigned long mask)
4563 set->sig[0] |= mask;
4566 static inline __attribute__((always_inline)) void sigdelsetmask(sigset_t *set, unsigned long mask)
4568 set->sig[0] &= ~mask;
4571 static inline __attribute__((always_inline)) int sigtestsetmask(sigset_t *set, unsigned long mask)
4573 return (set->sig[0] & mask) != 0;
4576 static inline __attribute__((always_inline)) void siginitset(sigset_t *set, unsigned long mask)
4579 switch ((64 / 32)) {
4581 memset(&set->sig[1], 0, sizeof(long)*((64 / 32)-1));
4583 case 2: set->sig[1] = 0;
4588 static inline __attribute__((always_inline)) void siginitsetinv(sigset_t *set, unsigned long mask)
4590 set->sig[0] = ~mask;
4591 switch ((64 / 32)) {
4593 memset(&set->sig[1], -1, sizeof(long)*((64 / 32)-1));
4595 case 2: set->sig[1] = -1;
4602 static inline __attribute__((always_inline)) void init_sigpending(struct sigpending *sig)
4604 sigemptyset(&sig->signal);
4605 INIT_LIST_HEAD(&sig->list);
4608 extern void flush_sigqueue(struct sigpending *queue);
4611 static inline __attribute__((always_inline)) int valid_signal(unsigned long sig)
4613 return sig <= 64 ? 1 : 0;
4616 extern int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p);
4617 extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *);
4618 extern long do_sigpending(void *, unsigned long);
4619 extern int sigprocmask(int, sigset_t *, sigset_t *);
4622 extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie);
4623 # 68 "include/linux/sched.h" 2
4624 # 1 "include/linux/securebits.h" 1
4630 extern unsigned securebits;
4631 # 69 "include/linux/sched.h" 2
4632 # 1 "include/linux/fs_struct.h" 1
4643 struct dentry * root, * pwd, * altroot;
4644 struct vfsmount * rootmnt, * pwdmnt, * altrootmnt;
4653 extern void exit_fs(struct task_struct *);
4654 extern void set_fs_altroot(void);
4655 extern void set_fs_root(struct fs_struct *, struct vfsmount *, struct dentry *);
4656 extern void set_fs_pwd(struct fs_struct *, struct vfsmount *, struct dentry *);
4657 extern struct fs_struct *copy_fs_struct(struct fs_struct *);
4658 extern void put_fs_struct(struct fs_struct *);
4659 # 70 "include/linux/sched.h" 2
4661 # 1 "include/linux/completion.h" 1
4662 # 13 "include/linux/completion.h"
4665 wait_queue_head_t wait;
4667 # 39 "include/linux/completion.h"
4668 static inline __attribute__((always_inline)) void init_completion(struct completion *x)
4671 init_waitqueue_head(&x->wait);
4674 extern void wait_for_completion(struct completion *);
4675 extern int wait_for_completion_interruptible(struct completion *x);
4676 extern unsigned long wait_for_completion_timeout(struct completion *x, unsigned long timeout);
4678 extern unsigned long wait_for_completion_interruptible_timeout( struct completion *x, unsigned long timeout);
4681 extern void complete(struct completion *);
4682 extern void complete_all(struct completion *);
4683 # 72 "include/linux/sched.h" 2
4684 # 1 "include/linux/pid.h" 1
4688 # 1 "include/linux/rcupdate.h" 1
4689 # 38 "include/linux/rcupdate.h"
4690 # 1 "include/linux/cache.h" 1
4691 # 39 "include/linux/rcupdate.h" 2
4694 # 1 "include/linux/percpu.h" 1
4699 # 1 "include/linux/slab.h" 1
4700 # 12 "include/linux/slab.h"
4701 typedef struct kmem_cache kmem_cache_t;
4703 # 1 "include/linux/gfp.h" 1
4707 # 1 "include/linux/mmzone.h" 1
4708 # 13 "include/linux/mmzone.h"
4709 # 1 "include/linux/init.h" 1
4710 # 63 "include/linux/init.h"
4711 typedef int (*initcall_t)(void);
4712 typedef void (*exitcall_t)(void);
4714 extern initcall_t __con_initcall_start[], __con_initcall_end[];
4715 extern initcall_t __security_initcall_start[], __security_initcall_end[];
4718 extern char saved_command_line[];
4719 extern unsigned int reset_devices;
4722 extern void setup_arch(char **);
4723 # 132 "include/linux/init.h"
4724 struct obs_kernel_param {
4726 int (*setup_func)(char *);
4729 # 167 "include/linux/init.h"
4730 void __attribute__ ((__section__ (".init.text"))) parse_early_param(void);
4731 # 14 "include/linux/mmzone.h" 2
4732 # 27 "include/linux/mmzone.h"
4734 struct list_head free_list;
4735 unsigned long nr_free;
4739 # 49 "include/linux/mmzone.h"
4740 enum zone_stat_item {
4745 NR_SLAB_RECLAIMABLE,
4746 NR_SLAB_UNRECLAIMABLE,
4753 # 70 "include/linux/mmzone.h"
4754 NR_VM_ZONE_STAT_ITEMS };
4756 struct per_cpu_pages {
4760 struct list_head list;
4763 struct per_cpu_pageset {
4764 struct per_cpu_pages pcp[2];
4778 # 113 "include/linux/mmzone.h"
4780 # 127 "include/linux/mmzone.h"
4782 # 139 "include/linux/mmzone.h"
4785 # 156 "include/linux/mmzone.h"
4788 unsigned long free_pages;
4789 unsigned long pages_min, pages_low, pages_high;
4790 # 168 "include/linux/mmzone.h"
4791 unsigned long lowmem_reserve[MAX_NR_ZONES];
4792 # 179 "include/linux/mmzone.h"
4793 struct per_cpu_pageset pageset[1];
4803 struct free_area free_area[14];
4811 spinlock_t lru_lock;
4812 struct list_head active_list;
4813 struct list_head inactive_list;
4814 unsigned long nr_scan_active;
4815 unsigned long nr_scan_inactive;
4816 unsigned long nr_active;
4817 unsigned long nr_inactive;
4818 unsigned long pages_scanned;
4819 int all_unreclaimable;
4822 atomic_t reclaim_in_progress;
4825 atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS];
4826 # 226 "include/linux/mmzone.h"
4831 # 256 "include/linux/mmzone.h"
4832 wait_queue_head_t * wait_table;
4833 unsigned long wait_table_hash_nr_entries;
4834 unsigned long wait_table_bits;
4839 struct pglist_data *zone_pgdat;
4841 unsigned long zone_start_pfn;
4842 # 277 "include/linux/mmzone.h"
4843 unsigned long spanned_pages;
4844 unsigned long present_pages;
4851 # 304 "include/linux/mmzone.h"
4853 struct zone *zones[(1 << 0) * MAX_NR_ZONES + 1];
4855 # 318 "include/linux/mmzone.h"
4856 extern struct page *mem_map;
4857 # 332 "include/linux/mmzone.h"
4858 struct bootmem_data;
4859 typedef struct pglist_data {
4860 struct zone node_zones[MAX_NR_ZONES];
4861 struct zonelist node_zonelists[MAX_NR_ZONES];
4864 struct page *node_mem_map;
4866 struct bootmem_data *bdata;
4867 # 351 "include/linux/mmzone.h"
4868 unsigned long node_start_pfn;
4869 unsigned long node_present_pages;
4870 unsigned long node_spanned_pages;
4873 wait_queue_head_t kswapd_wait;
4874 struct task_struct *kswapd;
4875 int kswapd_max_order;
4877 # 370 "include/linux/mmzone.h"
4878 # 1 "include/linux/memory_hotplug.h" 1
4882 # 1 "include/linux/mmzone.h" 1
4883 # 5 "include/linux/memory_hotplug.h" 2
4886 # 1 "include/linux/notifier.h" 1
4887 # 13 "include/linux/notifier.h"
4888 # 1 "include/linux/mutex.h" 1
4889 # 47 "include/linux/mutex.h"
4893 spinlock_t wait_lock;
4894 struct list_head wait_list;
4895 # 60 "include/linux/mutex.h"
4902 struct mutex_waiter {
4903 struct list_head list;
4904 struct task_struct *task;
4910 # 105 "include/linux/mutex.h"
4911 extern void __mutex_init(struct mutex *lock, const char *name,
4912 struct lock_class_key *key);
4920 static inline __attribute__((always_inline)) int mutex_is_locked(struct mutex *lock)
4922 return ((&lock->count)->counter) != 1;
4929 extern void mutex_lock(struct mutex *lock);
4930 extern int mutex_lock_interruptible(struct mutex *lock);
4931 # 136 "include/linux/mutex.h"
4932 extern int mutex_trylock(struct mutex *lock);
4933 extern void mutex_unlock(struct mutex *lock);
4934 # 14 "include/linux/notifier.h" 2
4936 # 1 "include/linux/srcu.h" 1
4937 # 30 "include/linux/srcu.h"
4938 struct srcu_struct_array {
4942 struct srcu_struct {
4944 struct srcu_struct_array *per_cpu_ref;
4954 int init_srcu_struct(struct srcu_struct *sp);
4955 void cleanup_srcu_struct(struct srcu_struct *sp);
4956 int srcu_read_lock(struct srcu_struct *sp) ;
4957 void srcu_read_unlock(struct srcu_struct *sp, int idx) ;
4958 void synchronize_srcu(struct srcu_struct *sp);
4959 long srcu_batches_completed(struct srcu_struct *sp);
4960 # 16 "include/linux/notifier.h" 2
4961 # 50 "include/linux/notifier.h"
4962 struct notifier_block {
4963 int (*notifier_call)(struct notifier_block *, unsigned long, void *);
4964 struct notifier_block *next;
4968 struct atomic_notifier_head {
4970 struct notifier_block *head;
4973 struct blocking_notifier_head {
4974 struct rw_semaphore rwsem;
4975 struct notifier_block *head;
4978 struct raw_notifier_head {
4979 struct notifier_block *head;
4982 struct srcu_notifier_head {
4984 struct srcu_struct srcu;
4985 struct notifier_block *head;
4987 # 89 "include/linux/notifier.h"
4988 extern void srcu_init_notifier_head(struct srcu_notifier_head *nh);
4989 # 115 "include/linux/notifier.h"
4990 extern int atomic_notifier_chain_register(struct atomic_notifier_head *,
4991 struct notifier_block *);
4992 extern int blocking_notifier_chain_register(struct blocking_notifier_head *,
4993 struct notifier_block *);
4994 extern int raw_notifier_chain_register(struct raw_notifier_head *,
4995 struct notifier_block *);
4996 extern int srcu_notifier_chain_register(struct srcu_notifier_head *,
4997 struct notifier_block *);
4999 extern int atomic_notifier_chain_unregister(struct atomic_notifier_head *,
5000 struct notifier_block *);
5001 extern int blocking_notifier_chain_unregister(struct blocking_notifier_head *,
5002 struct notifier_block *);
5003 extern int raw_notifier_chain_unregister(struct raw_notifier_head *,
5004 struct notifier_block *);
5005 extern int srcu_notifier_chain_unregister(struct srcu_notifier_head *,
5006 struct notifier_block *);
5008 extern int atomic_notifier_call_chain(struct atomic_notifier_head *,
5009 unsigned long val, void *v);
5010 extern int blocking_notifier_call_chain(struct blocking_notifier_head *,
5011 unsigned long val, void *v);
5012 extern int raw_notifier_call_chain(struct raw_notifier_head *,
5013 unsigned long val, void *v);
5014 extern int srcu_notifier_call_chain(struct srcu_notifier_head *,
5015 unsigned long val, void *v);
5016 # 8 "include/linux/memory_hotplug.h" 2
5021 # 140 "include/linux/memory_hotplug.h"
5022 static inline __attribute__((always_inline)) void pgdat_resize_lock(struct pglist_data *p, unsigned long *f) {}
5023 static inline __attribute__((always_inline)) void pgdat_resize_unlock(struct pglist_data *p, unsigned long *f) {}
5024 static inline __attribute__((always_inline)) void pgdat_resize_init(struct pglist_data *pgdat) {}
5026 static inline __attribute__((always_inline)) unsigned zone_span_seqbegin(struct zone *zone)
5030 static inline __attribute__((always_inline)) int zone_span_seqretry(struct zone *zone, unsigned iv)
5034 static inline __attribute__((always_inline)) void zone_span_writelock(struct zone *zone) {}
5035 static inline __attribute__((always_inline)) void zone_span_writeunlock(struct zone *zone) {}
5036 static inline __attribute__((always_inline)) void zone_seqlock_init(struct zone *zone) {}
5038 static inline __attribute__((always_inline)) int mhp_notimplemented(const char *func)
5040 printk("<4>" "%s() called, with CONFIG_MEMORY_HOTPLUG disabled\n", func);
5046 static inline __attribute__((always_inline)) int __remove_pages(struct zone *zone, unsigned long start_pfn,
5047 unsigned long nr_pages)
5049 printk("<4>" "%s() called, not yet supported\n", (__func__));
5054 extern int add_memory(int nid, u64 start, u64 size);
5055 extern int arch_add_memory(int nid, u64 start, u64 size);
5056 extern int remove_memory(u64 start, u64 size);
5057 extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn,
5059 # 371 "include/linux/mmzone.h" 2
5061 void __get_zone_counts(unsigned long *active, unsigned long *inactive,
5062 unsigned long *free, struct pglist_data *pgdat);
5063 void get_zone_counts(unsigned long *active, unsigned long *inactive,
5064 unsigned long *free);
5065 void build_all_zonelists(void);
5066 void wakeup_kswapd(struct zone *zone, int order);
5067 int zone_watermark_ok(struct zone *z, int order, unsigned long mark,
5068 int classzone_idx, int alloc_flags);
5070 extern int init_currently_empty_zone(struct zone *zone, unsigned long start_pfn,
5071 unsigned long size);
5076 static inline __attribute__((always_inline)) void memory_present(int nid, unsigned long start, unsigned long end) {}
5077 # 399 "include/linux/mmzone.h"
5078 static inline __attribute__((always_inline)) int populated_zone(struct zone *zone)
5080 return (!!zone->present_pages);
5083 static inline __attribute__((always_inline)) int is_highmem_idx(enum zone_type idx)
5092 static inline __attribute__((always_inline)) int is_normal_idx(enum zone_type idx)
5094 return (idx == ZONE_NORMAL);
5103 static inline __attribute__((always_inline)) int is_highmem(struct zone *zone)
5112 static inline __attribute__((always_inline)) int is_normal(struct zone *zone)
5114 return zone == zone->zone_pgdat->node_zones + ZONE_NORMAL;
5117 static inline __attribute__((always_inline)) int is_dma32(struct zone *zone)
5126 static inline __attribute__((always_inline)) int is_dma(struct zone *zone)
5128 return zone == zone->zone_pgdat->node_zones + ZONE_DMA;
5134 int min_free_kbytes_sysctl_handler(struct ctl_table *, int, struct file *,
5135 void *, size_t *, loff_t *);
5136 extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1];
5137 int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, struct file *,
5138 void *, size_t *, loff_t *);
5139 int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int, struct file *,
5140 void *, size_t *, loff_t *);
5141 int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int,
5142 struct file *, void *, size_t *, loff_t *);
5143 int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int,
5144 struct file *, void *, size_t *, loff_t *);
5146 # 1 "include/linux/topology.h" 1
5147 # 34 "include/linux/topology.h"
5148 # 1 "include/asm/topology.h" 1
5152 # 1 "include/asm-generic/topology.h" 1
5153 # 5 "include/asm/topology.h" 2
5154 # 35 "include/linux/topology.h" 2
5155 # 468 "include/linux/mmzone.h" 2
5163 extern struct pglist_data contig_page_data;
5164 # 486 "include/linux/mmzone.h"
5165 extern struct pglist_data *first_online_pgdat(void);
5166 extern struct pglist_data *next_online_pgdat(struct pglist_data *pgdat);
5167 extern struct zone *next_zone(struct zone *zone);
5168 # 685 "include/linux/mmzone.h"
5169 void memory_present(int nid, unsigned long start, unsigned long end);
5170 unsigned long __attribute__ ((__section__ (".init.text"))) node_memmap_size_bytes(int, unsigned long, unsigned long);
5171 # 5 "include/linux/gfp.h" 2
5175 struct vm_area_struct;
5176 # 86 "include/linux/gfp.h"
5177 static inline __attribute__((always_inline)) enum zone_type gfp_zone(gfp_t flags)
5179 if (flags & (( gfp_t)0x01u))
5181 # 98 "include/linux/gfp.h"
5184 # 117 "include/linux/gfp.h"
5185 static inline __attribute__((always_inline)) void arch_free_page(struct page *page, int order) { }
5188 extern struct page *
5189 __alloc_pages(gfp_t, unsigned int, struct zonelist *);
5191 static inline __attribute__((always_inline)) struct page *alloc_pages_node(int nid, gfp_t gfp_mask,
5194 if (__builtin_expect(!!(order >= 14), 0))
5201 return __alloc_pages(gfp_mask, order,
5202 (&contig_page_data)->node_zonelists + gfp_zone(gfp_mask));
5204 # 157 "include/linux/gfp.h"
5205 extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order);
5206 extern unsigned long get_zeroed_page(gfp_t gfp_mask);
5214 extern void __free_pages(struct page *page, unsigned int order);
5215 extern void free_pages(unsigned long addr, unsigned int order);
5216 extern void free_hot_page(struct page *page);
5217 extern void free_cold_page(struct page *page);
5222 void page_alloc_init(void);
5226 static inline __attribute__((always_inline)) void drain_node_pages(int node) { };
5227 # 15 "include/linux/slab.h" 2
5228 # 58 "include/linux/slab.h"
5229 extern void __attribute__ ((__section__ (".init.text"))) kmem_cache_init(void);
5231 extern kmem_cache_t *kmem_cache_create(const char *, size_t, size_t, unsigned long,
5232 void (*)(void *, kmem_cache_t *, unsigned long),
5233 void (*)(void *, kmem_cache_t *, unsigned long));
5234 extern void kmem_cache_destroy(kmem_cache_t *);
5235 extern int kmem_cache_shrink(kmem_cache_t *);
5236 extern void *kmem_cache_alloc(kmem_cache_t *, gfp_t);
5237 extern void *kmem_cache_zalloc(struct kmem_cache *, gfp_t);
5238 extern void kmem_cache_free(kmem_cache_t *, void *);
5239 extern unsigned int kmem_cache_size(kmem_cache_t *);
5240 extern const char *kmem_cache_name(kmem_cache_t *);
5243 struct cache_sizes {
5245 kmem_cache_t *cs_cachep;
5246 kmem_cache_t *cs_dmacachep;
5248 extern struct cache_sizes malloc_sizes[];
5250 extern void *__kmalloc(size_t, gfp_t);
5251 # 126 "include/linux/slab.h"
5252 static inline __attribute__((always_inline)) void *kmalloc(size_t size, gfp_t flags)
5254 if (__builtin_constant_p(size)) {
5261 # 1 "include/linux/kmalloc_sizes.h" 1
5263 if (size <= 32) goto found; else i++;
5265 if (size <= 64) goto found; else i++;
5267 if (size <= 96) goto found; else i++;
5269 if (size <= 128) goto found; else i++;
5271 if (size <= 192) goto found; else i++;
5273 if (size <= 256) goto found; else i++;
5274 if (size <= 512) goto found; else i++;
5275 if (size <= 1024) goto found; else i++;
5276 if (size <= 2048) goto found; else i++;
5277 if (size <= 4096) goto found; else i++;
5278 if (size <= 8192) goto found; else i++;
5279 if (size <= 16384) goto found; else i++;
5280 if (size <= 32768) goto found; else i++;
5281 if (size <= 65536) goto found; else i++;
5282 if (size <= 131072) goto found; else i++;
5284 if (size <= 262144) goto found; else i++;
5287 if (size <= 524288) goto found; else i++;
5288 if (size <= 1048576) goto found; else i++;
5290 if (size <= 2097152) goto found; else i++;
5291 if (size <= 4194304) goto found; else i++;
5292 if (size <= 8388608) goto found; else i++;
5293 if (size <= 16777216) goto found; else i++;
5294 if (size <= 33554432) goto found; else i++;
5295 # 136 "include/linux/slab.h" 2
5298 extern void __you_cannot_kmalloc_that_much(void);
5299 __you_cannot_kmalloc_that_much();
5302 return kmem_cache_alloc((flags & (( gfp_t)0x01u)) ?
5303 malloc_sizes[i].cs_dmacachep :
5304 malloc_sizes[i].cs_cachep, flags);
5306 return __kmalloc(size, flags);
5308 # 166 "include/linux/slab.h"
5309 extern void *__kzalloc(size_t, gfp_t);
5316 static inline __attribute__((always_inline)) void *kzalloc(size_t size, gfp_t flags)
5318 if (__builtin_constant_p(size)) {
5325 # 1 "include/linux/kmalloc_sizes.h" 1
5327 if (size <= 32) goto found; else i++;
5329 if (size <= 64) goto found; else i++;
5331 if (size <= 96) goto found; else i++;
5333 if (size <= 128) goto found; else i++;
5335 if (size <= 192) goto found; else i++;
5337 if (size <= 256) goto found; else i++;
5338 if (size <= 512) goto found; else i++;
5339 if (size <= 1024) goto found; else i++;
5340 if (size <= 2048) goto found; else i++;
5341 if (size <= 4096) goto found; else i++;
5342 if (size <= 8192) goto found; else i++;
5343 if (size <= 16384) goto found; else i++;
5344 if (size <= 32768) goto found; else i++;
5345 if (size <= 65536) goto found; else i++;
5346 if (size <= 131072) goto found; else i++;
5348 if (size <= 262144) goto found; else i++;
5351 if (size <= 524288) goto found; else i++;
5352 if (size <= 1048576) goto found; else i++;
5354 if (size <= 2097152) goto found; else i++;
5355 if (size <= 4194304) goto found; else i++;
5356 if (size <= 8388608) goto found; else i++;
5357 if (size <= 16777216) goto found; else i++;
5358 if (size <= 33554432) goto found; else i++;
5359 # 183 "include/linux/slab.h" 2
5362 extern void __you_cannot_kzalloc_that_much(void);
5363 __you_cannot_kzalloc_that_much();
5366 return kmem_cache_zalloc((flags & (( gfp_t)0x01u)) ?
5367 malloc_sizes[i].cs_dmacachep :
5368 malloc_sizes[i].cs_cachep, flags);
5370 return __kzalloc(size, flags);
5379 static inline __attribute__((always_inline)) void *kcalloc(size_t n, size_t size, gfp_t flags)
5381 if (n != 0 && size > (~0UL) / n)
5383 return kzalloc(n * size, flags);
5386 extern void kfree(const void *);
5387 extern unsigned int ksize(const void *);
5388 extern int slab_is_available(void);
5389 # 240 "include/linux/slab.h"
5390 static inline __attribute__((always_inline)) void *kmem_cache_alloc_node(kmem_cache_t *cachep, gfp_t flags, int node)
5392 return kmem_cache_alloc(cachep, flags);
5394 static inline __attribute__((always_inline)) void *kmalloc_node(size_t size, gfp_t flags, int node)
5396 return kmalloc(size, flags);
5400 extern int kmem_cache_reap(int);
5401 extern int kmem_ptr_validate(kmem_cache_t *cachep, void *ptr);
5402 # 289 "include/linux/slab.h"
5403 extern kmem_cache_t *vm_area_cachep;
5404 extern kmem_cache_t *names_cachep;
5405 extern kmem_cache_t *files_cachep;
5406 extern kmem_cache_t *filp_cachep;
5407 extern kmem_cache_t *fs_cachep;
5408 extern kmem_cache_t *sighand_cachep;
5409 extern kmem_cache_t *bio_cachep;
5410 # 6 "include/linux/percpu.h" 2
5415 # 1 "include/asm/percpu.h" 1
5419 # 1 "include/asm-generic/percpu.h" 1
5420 # 5 "include/asm/percpu.h" 2
5421 # 11 "include/linux/percpu.h" 2
5422 # 57 "include/linux/percpu.h"
5423 static inline __attribute__((always_inline)) void percpu_depopulate(void *__pdata, int cpu)
5427 static inline __attribute__((always_inline)) void __percpu_depopulate_mask(void *__pdata, cpumask_t *mask)
5431 static inline __attribute__((always_inline)) void *percpu_populate(void *__pdata, size_t size, gfp_t gfp,
5434 return ({ (void)(cpu); (__pdata); });
5437 static inline __attribute__((always_inline)) int __percpu_populate_mask(void *__pdata, size_t size, gfp_t gfp,
5443 static inline __attribute__((always_inline)) __attribute__((always_inline)) void *__percpu_alloc_mask(size_t size, gfp_t gfp, cpumask_t *mask)
5445 return kzalloc(size, gfp);
5448 static inline __attribute__((always_inline)) void percpu_free(void *__pdata)
5452 # 42 "include/linux/rcupdate.h" 2
5453 # 50 "include/linux/rcupdate.h"
5455 struct rcu_head *next;
5456 void (*func)(struct rcu_head *head);
5458 # 64 "include/linux/rcupdate.h"
5459 struct rcu_ctrlblk {
5472 static inline __attribute__((always_inline)) int rcu_batch_before(long a, long b)
5478 static inline __attribute__((always_inline)) int rcu_batch_after(long a, long b)
5496 struct rcu_head *nxtlist;
5497 struct rcu_head **nxttail;
5499 struct rcu_head *curlist;
5500 struct rcu_head **curtail;
5501 struct rcu_head *donelist;
5502 struct rcu_head **donetail;
5505 struct rcu_head barrier;
5508 extern __typeof__(struct rcu_data) per_cpu__rcu_data;
5509 extern __typeof__(struct rcu_data) per_cpu__rcu_bh_data;
5517 static inline __attribute__((always_inline)) void rcu_qsctr_inc(int cpu)
5519 struct rcu_data *rdp = &(*((void)(cpu), &per_cpu__rcu_data));
5520 rdp->passed_quiesc = 1;
5522 static inline __attribute__((always_inline)) void rcu_bh_qsctr_inc(int cpu)
5524 struct rcu_data *rdp = &(*((void)(cpu), &per_cpu__rcu_bh_data));
5525 rdp->passed_quiesc = 1;
5528 extern int rcu_pending(int cpu);
5529 extern int rcu_needs_cpu(int cpu);
5530 # 272 "include/linux/rcupdate.h"
5531 extern void rcu_init(void);
5532 extern void rcu_check_callbacks(int cpu, int user);
5533 extern void rcu_restart_cpu(int cpu);
5534 extern long rcu_batches_completed(void);
5535 extern long rcu_batches_completed_bh(void);
5538 extern void call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *head));
5540 extern void call_rcu_bh(struct rcu_head *head, void (*func)(struct rcu_head *head));
5542 extern void synchronize_rcu(void);
5543 void synchronize_idle(void);
5544 extern void rcu_barrier(void);
5545 # 5 "include/linux/pid.h" 2
5554 # 42 "include/linux/pid.h"
5560 struct hlist_node pid_chain;
5562 struct hlist_head tasks[PIDTYPE_MAX];
5563 struct rcu_head rcu;
5568 struct hlist_node node;
5572 static inline __attribute__((always_inline)) struct pid *get_pid(struct pid *pid)
5575 atomic_inc(&pid->count);
5579 extern void put_pid(struct pid *pid);
5580 extern struct task_struct *pid_task(struct pid *pid, enum pid_type);
5581 extern struct task_struct *get_pid_task(struct pid *pid, enum pid_type);
5584 extern struct pid *get_task_pid(struct task_struct *task, enum pid_type type);
5590 extern int attach_pid(struct task_struct *task, enum pid_type type, int nr);
5593 extern void detach_pid(struct task_struct *task, enum pid_type);
5594 extern void transfer_pid(struct task_struct *old, struct task_struct *new, enum pid_type);
5601 extern struct pid *find_pid(int nr);
5606 extern struct pid *find_get_pid(int nr);
5607 extern struct pid *find_ge_pid(int nr);
5609 extern struct pid *alloc_pid(void);
5610 extern void free_pid(struct pid *pid);
5612 static inline __attribute__((always_inline)) pid_t pid_nr(struct pid *pid)
5619 # 73 "include/linux/sched.h" 2
5622 # 1 "include/linux/seccomp.h" 1
5623 # 28 "include/linux/seccomp.h"
5624 typedef struct { } seccomp_t;
5628 static inline __attribute__((always_inline)) int has_secure_computing(struct thread_info *ti)
5632 # 76 "include/linux/sched.h" 2
5634 # 1 "include/linux/futex.h" 1
5638 # 1 "include/linux/sched.h" 1
5639 # 5 "include/linux/futex.h" 2
5640 # 33 "include/linux/futex.h"
5641 struct robust_list {
5642 struct robust_list *next;
5644 # 45 "include/linux/futex.h"
5645 struct robust_list_head {
5649 struct robust_list list;
5658 # 69 "include/linux/futex.h"
5659 struct robust_list *list_op_pending;
5661 # 96 "include/linux/futex.h"
5662 long do_futex(u32 *uaddr, int op, u32 val, unsigned long timeout,
5663 u32 *uaddr2, u32 val2, u32 val3);
5666 handle_futex_death(u32 *uaddr, struct task_struct *curr, int pi);
5669 extern void exit_robust_list(struct task_struct *curr);
5670 extern void exit_pi_state_list(struct task_struct *curr);
5671 # 78 "include/linux/sched.h" 2
5672 # 1 "include/linux/rtmutex.h" 1
5673 # 16 "include/linux/rtmutex.h"
5674 # 1 "include/linux/plist.h" 1
5675 # 80 "include/linux/plist.h"
5677 struct list_head prio_list;
5678 struct list_head node_list;
5686 struct plist_head plist;
5688 # 128 "include/linux/plist.h"
5689 static inline __attribute__((always_inline)) void
5690 plist_head_init(struct plist_head *head, spinlock_t *lock)
5692 INIT_LIST_HEAD(&head->prio_list);
5693 INIT_LIST_HEAD(&head->node_list);
5705 static inline __attribute__((always_inline)) void plist_node_init(struct plist_node *node, int prio)
5708 plist_head_init(&node->plist, ((void *)0));
5711 extern void plist_add(struct plist_node *node, struct plist_head *head);
5712 extern void plist_del(struct plist_node *node, struct plist_head *head);
5713 # 200 "include/linux/plist.h"
5714 static inline __attribute__((always_inline)) int plist_head_empty(const struct plist_head *head)
5716 return list_empty(&head->node_list);
5724 static inline __attribute__((always_inline)) int plist_node_empty(const struct plist_node *node)
5726 return plist_head_empty(&node->plist);
5728 # 242 "include/linux/plist.h"
5729 static inline __attribute__((always_inline)) struct plist_node* plist_first(const struct plist_head *head)
5731 return ({ const typeof( ((struct plist_node *)0)->plist.node_list ) *__mptr = (head->node_list.next); (struct plist_node *)( (char *)__mptr - __builtin_offsetof(struct plist_node,plist.node_list) );});
5734 # 17 "include/linux/rtmutex.h" 2
5735 # 26 "include/linux/rtmutex.h"
5737 spinlock_t wait_lock;
5738 struct plist_head wait_list;
5739 struct task_struct *owner;
5748 struct rt_mutex_waiter;
5749 struct hrtimer_sleeper;
5756 static inline __attribute__((always_inline)) int rt_mutex_debug_check_no_locks_freed(const void *from,
5761 # 80 "include/linux/rtmutex.h"
5762 static inline __attribute__((always_inline)) int rt_mutex_is_locked(struct rt_mutex *lock)
5764 return lock->owner != ((void *)0);
5767 extern void __rt_mutex_init(struct rt_mutex *lock, const char *name);
5768 extern void rt_mutex_destroy(struct rt_mutex *lock);
5770 extern void rt_mutex_lock(struct rt_mutex *lock);
5771 extern int rt_mutex_lock_interruptible(struct rt_mutex *lock,
5772 int detect_deadlock);
5773 extern int rt_mutex_timed_lock(struct rt_mutex *lock,
5774 struct hrtimer_sleeper *timeout,
5775 int detect_deadlock);
5777 extern int rt_mutex_trylock(struct rt_mutex *lock);
5779 extern void rt_mutex_unlock(struct rt_mutex *lock);
5780 # 79 "include/linux/sched.h" 2
5783 # 1 "include/linux/param.h" 1
5784 # 82 "include/linux/sched.h" 2
5785 # 1 "include/linux/resource.h" 1
5792 # 23 "include/linux/resource.h"
5794 struct timeval ru_utime;
5795 struct timeval ru_stime;
5813 unsigned long rlim_cur;
5814 unsigned long rlim_max;
5816 # 70 "include/linux/resource.h"
5817 # 1 "include/asm/resource.h" 1
5821 # 1 "include/asm-generic/resource.h" 1
5822 # 5 "include/asm/resource.h" 2
5823 # 71 "include/linux/resource.h" 2
5825 int getrusage(struct task_struct *p, int who, struct rusage *ru);
5826 # 83 "include/linux/sched.h" 2
5827 # 1 "include/linux/timer.h" 1
5835 struct tvec_t_base_s;
5838 struct list_head entry;
5839 unsigned long expires;
5841 void (*function)(unsigned long);
5844 struct tvec_t_base_s *base;
5847 extern struct tvec_t_base_s boot_tvec_bases;
5848 # 33 "include/linux/timer.h"
5849 void init_timer(struct timer_list * timer);
5851 static inline __attribute__((always_inline)) void setup_timer(struct timer_list * timer,
5852 void (*function)(unsigned long),
5855 timer->function = function;
5859 # 54 "include/linux/timer.h"
5860 static inline __attribute__((always_inline)) int timer_pending(const struct timer_list * timer)
5862 return timer->entry.next != ((void *)0);
5865 extern void add_timer_on(struct timer_list *timer, int cpu);
5866 extern int del_timer(struct timer_list * timer);
5867 extern int __mod_timer(struct timer_list *timer, unsigned long expires);
5868 extern int mod_timer(struct timer_list *timer, unsigned long expires);
5870 extern unsigned long next_timer_interrupt(void);
5871 # 80 "include/linux/timer.h"
5872 static inline __attribute__((always_inline)) void add_timer(struct timer_list *timer)
5874 do { if (__builtin_expect(!!((timer_pending(timer))!=0), 0)) do { dump_stack(); printk("<4>" "\nkernel BUG at %s:%d!\n", "include/linux/timer.h", 82); panic("BUG!"); } while (0); } while(0);
5875 __mod_timer(timer, timer->expires);
5877 # 96 "include/linux/timer.h"
5878 extern void init_timers(void);
5879 extern void run_local_timers(void);
5881 extern int it_real_fn(struct hrtimer *);
5882 # 84 "include/linux/sched.h" 2
5883 # 1 "include/linux/hrtimer.h" 1
5884 # 19 "include/linux/hrtimer.h"
5885 # 1 "include/linux/ktime.h" 1
5886 # 46 "include/linux/ktime.h"
5899 # 138 "include/linux/ktime.h"
5900 static inline __attribute__((always_inline)) ktime_t ktime_set(const long secs, const unsigned long nsecs)
5902 return (ktime_t) { .tv = { .sec = secs, .nsec = nsecs } };
5904 # 150 "include/linux/ktime.h"
5905 static inline __attribute__((always_inline)) ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs)
5909 res.tv64 = lhs.tv64 - rhs.tv64;
5910 if (res.tv.nsec < 0)
5911 res.tv.nsec += 1000000000L;
5915 # 168 "include/linux/ktime.h"
5916 static inline __attribute__((always_inline)) ktime_t ktime_add(const ktime_t add1, const ktime_t add2)
5920 res.tv64 = add1.tv64 + add2.tv64;
5921 # 181 "include/linux/ktime.h"
5922 if (res.tv.nsec >= 1000000000L)
5923 res.tv64 += (u32)-1000000000L;
5927 # 194 "include/linux/ktime.h"
5928 extern ktime_t ktime_add_ns(const ktime_t kt, u64 nsec);
5936 static inline __attribute__((always_inline)) ktime_t timespec_to_ktime(const struct timespec ts)
5938 return (ktime_t) { .tv = { .sec = (s32)ts.tv_sec,
5939 .nsec = (s32)ts.tv_nsec } };
5948 static inline __attribute__((always_inline)) ktime_t timeval_to_ktime(const struct timeval tv)
5950 return (ktime_t) { .tv = { .sec = (s32)tv.tv_sec,
5951 .nsec = (s32)tv.tv_usec * 1000 } };
5960 static inline __attribute__((always_inline)) struct timespec ktime_to_timespec(const ktime_t kt)
5962 return (struct timespec) { .tv_sec = (time_t) kt.tv.sec,
5963 .tv_nsec = (long) kt.tv.nsec };
5972 static inline __attribute__((always_inline)) struct timeval ktime_to_timeval(const ktime_t kt)
5974 return (struct timeval) {
5975 .tv_sec = (time_t) kt.tv.sec,
5976 .tv_usec = (suseconds_t) (kt.tv.nsec / 1000L) };
5985 static inline __attribute__((always_inline)) u64 ktime_to_ns(const ktime_t kt)
5987 return (u64) kt.tv.sec * 1000000000L + kt.tv.nsec;
5989 # 268 "include/linux/ktime.h"
5990 extern void ktime_get_ts(struct timespec *ts);
5991 # 20 "include/linux/hrtimer.h" 2
6004 enum hrtimer_restart {
6011 struct hrtimer_base;
6012 # 52 "include/linux/hrtimer.h"
6014 struct rb_node node;
6016 int (*function)(struct hrtimer *);
6017 struct hrtimer_base *base;
6019 # 66 "include/linux/hrtimer.h"
6020 struct hrtimer_sleeper {
6021 struct hrtimer timer;
6022 struct task_struct *task;
6024 # 85 "include/linux/hrtimer.h"
6025 struct hrtimer_base {
6028 struct rb_root active;
6029 struct rb_node *first;
6031 ktime_t (*get_time)(void);
6032 ktime_t (*get_softirq_time)(void);
6033 struct hrtimer *curr_timer;
6034 ktime_t softirq_time;
6035 struct lock_class_key lock_key;
6037 # 108 "include/linux/hrtimer.h"
6038 extern void hrtimer_init(struct hrtimer *timer, clockid_t which_clock,
6039 enum hrtimer_mode mode);
6042 extern int hrtimer_start(struct hrtimer *timer, ktime_t tim,
6043 const enum hrtimer_mode mode);
6044 extern int hrtimer_cancel(struct hrtimer *timer);
6045 extern int hrtimer_try_to_cancel(struct hrtimer *timer);
6050 extern ktime_t hrtimer_get_remaining(const struct hrtimer *timer);
6051 extern int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp);
6057 static inline __attribute__((always_inline)) int hrtimer_active(const struct hrtimer *timer)
6059 return ((struct rb_node *)((&timer->node)->rb_parent_color & ~3)) != &timer->node;
6063 extern unsigned long
6064 hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval);
6067 extern long hrtimer_nanosleep(struct timespec *rqtp,
6068 struct timespec *rmtp,
6069 const enum hrtimer_mode mode,
6070 const clockid_t clockid);
6071 extern long hrtimer_nanosleep_restart(struct restart_block *restart_block);
6073 extern void hrtimer_init_sleeper(struct hrtimer_sleeper *sl,
6074 struct task_struct *tsk);
6077 extern void hrtimer_run_queues(void);
6080 extern void __attribute__ ((__section__ (".init.text"))) hrtimers_init(void);
6081 # 85 "include/linux/sched.h" 2
6086 struct futex_pi_state;
6087 # 107 "include/linux/sched.h"
6088 extern unsigned long avenrun[];
6089 # 121 "include/linux/sched.h"
6090 extern unsigned long total_forks;
6091 extern int nr_threads;
6092 extern __typeof__(unsigned long) per_cpu__process_counts;
6093 extern int nr_processes(void);
6094 extern unsigned long nr_running(void);
6095 extern unsigned long nr_uninterruptible(void);
6096 extern unsigned long nr_active(void);
6097 extern unsigned long nr_iowait(void);
6098 extern unsigned long weighted_cpuload(const int cpu);
6099 # 186 "include/linux/sched.h"
6100 extern rwlock_t tasklist_lock;
6101 extern spinlock_t mmlist_lock;
6105 extern void sched_init(void);
6106 extern void sched_init_smp(void);
6107 extern void init_idle(struct task_struct *idle, int cpu);
6109 extern cpumask_t nohz_cpu_mask;
6111 extern void show_state(void);
6112 extern void show_regs(struct pt_regs *);
6119 extern void show_stack(struct task_struct *task, unsigned long *sp);
6121 void io_schedule(void);
6122 long io_schedule_timeout(long timeout);
6124 extern void cpu_init (void);
6125 extern void trap_init(void);
6126 extern void update_process_times(int user);
6127 extern void scheduler_tick(void);
6130 extern void softlockup_tick(void);
6131 extern void spawn_softlockup_task(void);
6132 extern void touch_softlockup_watchdog(void);
6133 # 235 "include/linux/sched.h"
6134 extern int in_sched_functions(unsigned long addr);
6137 extern signed long schedule_timeout(signed long timeout);
6138 extern signed long schedule_timeout_interruptible(signed long timeout);
6139 extern signed long schedule_timeout_uninterruptible(signed long timeout);
6140 void schedule(void);
6147 extern int sysctl_max_map_count;
6149 # 1 "include/linux/aio.h" 1
6154 # 1 "include/linux/workqueue.h" 1
6155 # 12 "include/linux/workqueue.h"
6156 struct workqueue_struct;
6158 struct work_struct {
6159 unsigned long pending;
6160 struct list_head entry;
6161 void (*func)(void *);
6164 struct timer_list timer;
6167 struct execute_work {
6168 struct work_struct work;
6170 # 57 "include/linux/workqueue.h"
6171 extern struct workqueue_struct *__create_workqueue(const char *name,
6176 extern void destroy_workqueue(struct workqueue_struct *wq);
6178 extern int queue_work(struct workqueue_struct *wq, struct work_struct *work);
6179 extern int queue_delayed_work(struct workqueue_struct *wq, struct work_struct *work, unsigned long delay);
6180 extern int queue_delayed_work_on(int cpu, struct workqueue_struct *wq,
6181 struct work_struct *work, unsigned long delay);
6182 extern void flush_workqueue(struct workqueue_struct *wq);
6184 extern int schedule_work(struct work_struct *work);
6185 extern int schedule_delayed_work(struct work_struct *work, unsigned long delay);
6187 extern int schedule_delayed_work_on(int cpu, struct work_struct *work, unsigned long delay);
6188 extern int schedule_on_each_cpu(void (*func)(void *info), void *info);
6189 extern void flush_scheduled_work(void);
6190 extern int current_is_keventd(void);
6191 extern int keventd_up(void);
6193 extern void init_workqueues(void);
6194 void cancel_rearming_delayed_work(struct work_struct *work);
6195 void cancel_rearming_delayed_workqueue(struct workqueue_struct *,
6196 struct work_struct *);
6197 int execute_in_process_context(void (*fn)(void *), void *,
6198 struct execute_work *);
6205 static inline __attribute__((always_inline)) int cancel_delayed_work(struct work_struct *work)
6209 ret = del_timer(&work->timer);
6211 clear_bit(0, &work->pending);
6214 # 6 "include/linux/aio.h" 2
6215 # 1 "include/linux/aio_abi.h" 1
6216 # 32 "include/linux/aio_abi.h"
6217 typedef unsigned long aio_context_t;
6221 IOCB_CMD_PWRITE = 1,
6223 IOCB_CMD_FDSYNC = 3,
6229 IOCB_CMD_PREADV = 7,
6230 IOCB_CMD_PWRITEV = 8,
6240 # 70 "include/linux/aio_abi.h"
6244 __u32 aio_key, aio_reserved1;
6248 __u16 aio_lio_opcode;
6257 __u64 aio_reserved2;
6258 __u64 aio_reserved3;
6260 # 7 "include/linux/aio.h" 2
6261 # 1 "include/linux/uio.h" 1
6262 # 20 "include/linux/uio.h"
6266 __kernel_size_t iov_len;
6275 # 54 "include/linux/uio.h"
6276 static inline __attribute__((always_inline)) size_t iov_length(const struct iovec *iov, unsigned long nr_segs)
6281 for (seg = 0; seg < nr_segs; seg++)
6282 ret += iov[seg].iov_len;
6286 unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to);
6287 # 8 "include/linux/aio.h" 2
6296 # 87 "include/linux/aio.h"
6298 struct list_head ki_run_list;
6303 struct file *ki_filp;
6304 struct kioctx *ki_ctx;
6305 int (*ki_cancel)(struct kiocb *, struct io_event *);
6306 ssize_t (*ki_retry)(struct kiocb *);
6307 void (*ki_dtor)(struct kiocb *);
6311 struct task_struct *tsk;
6315 wait_queue_t ki_wait;
6320 unsigned short ki_opcode;
6325 struct iovec ki_inline_vec;
6326 struct iovec *ki_iovec;
6327 unsigned long ki_nr_segs;
6328 unsigned long ki_cur_seg;
6330 struct list_head ki_list;
6333 # 144 "include/linux/aio.h"
6341 unsigned compat_features;
6342 unsigned incompat_features;
6343 unsigned header_length;
6346 struct io_event io_events[0];
6352 struct aio_ring_info {
6353 unsigned long mmap_base;
6354 unsigned long mmap_size;
6356 struct page **ring_pages;
6357 spinlock_t ring_lock;
6362 struct page *internal_pages[8];
6368 struct mm_struct *mm;
6371 unsigned long user_id;
6372 struct kioctx *next;
6374 wait_queue_head_t wait;
6376 spinlock_t ctx_lock;
6379 struct list_head active_reqs;
6380 struct list_head run_list;
6385 struct aio_ring_info ring_info;
6387 struct work_struct wq;
6391 extern unsigned aio_max_size;
6393 extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb);
6394 extern int aio_put_req(struct kiocb *iocb);
6395 extern void kick_iocb(struct kiocb *iocb);
6396 extern int aio_complete(struct kiocb *iocb, long res, long res2);
6397 extern void __put_ioctx(struct kioctx *ctx);
6399 extern void exit_aio(struct mm_struct *mm);
6400 extern struct kioctx *lookup_ioctx(unsigned long ctx_id);
6401 extern int io_submit_one(struct kioctx *ctx, struct iocb *user_iocb, struct iocb *iocb);
6405 struct kioctx *lookup_ioctx(unsigned long ctx_id);
6406 int io_submit_one(struct kioctx *ctx, struct iocb *user_iocb, struct iocb *iocb);
6407 # 245 "include/linux/aio.h"
6408 static inline __attribute__((always_inline)) struct kiocb *list_kiocb(struct list_head *h)
6410 return ({ const typeof( ((struct kiocb *)0)->ki_list ) *__mptr = (h); (struct kiocb *)( (char *)__mptr - __builtin_offsetof(struct kiocb,ki_list) );});
6414 extern unsigned long aio_nr;
6415 extern unsigned long aio_max_nr;
6416 # 251 "include/linux/sched.h" 2
6418 extern unsigned long
6419 arch_get_unmapped_area(struct file *, unsigned long, unsigned long,
6420 unsigned long, unsigned long);
6421 extern unsigned long
6422 arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr,
6423 unsigned long len, unsigned long pgoff,
6424 unsigned long flags);
6425 extern void arch_unmap_area(struct mm_struct *, unsigned long);
6426 extern void arch_unmap_area_topdown(struct mm_struct *, unsigned long);
6427 # 284 "include/linux/sched.h"
6428 typedef unsigned long mm_counter_t;
6429 # 300 "include/linux/sched.h"
6431 struct vm_area_struct * mmap;
6432 struct rb_root mm_rb;
6433 struct vm_area_struct * mmap_cache;
6434 unsigned long (*get_unmapped_area) (struct file *filp,
6435 unsigned long addr, unsigned long len,
6436 unsigned long pgoff, unsigned long flags);
6437 void (*unmap_area) (struct mm_struct *mm, unsigned long addr);
6438 unsigned long mmap_base;
6439 unsigned long task_size;
6440 unsigned long cached_hole_size;
6441 unsigned long free_area_cache;
6446 struct rw_semaphore mmap_sem;
6447 spinlock_t page_table_lock;
6449 struct list_head mmlist;
6457 mm_counter_t _file_rss;
6458 mm_counter_t _anon_rss;
6460 unsigned long hiwater_rss;
6461 unsigned long hiwater_vm;
6463 unsigned long total_vm, locked_vm, shared_vm, exec_vm;
6464 unsigned long stack_vm, reserved_vm, def_flags, nr_ptes;
6465 unsigned long start_code, end_code, start_data, end_data;
6466 unsigned long start_brk, brk, start_stack;
6467 unsigned long arg_start, arg_end, env_start, env_end;
6469 unsigned long saved_auxv[44];
6471 unsigned dumpable:2;
6472 cpumask_t cpu_vm_mask;
6475 mm_context_t context;
6478 unsigned long swap_token_time;
6483 struct completion *core_startup_done, core_done;
6486 rwlock_t ioctx_list_lock;
6487 struct kioctx *ioctx_list;
6490 struct sighand_struct {
6492 struct k_sigaction action[64];
6496 struct pacct_struct {
6499 unsigned long ac_mem;
6500 cputime_t ac_utime, ac_stime;
6501 unsigned long ac_minflt, ac_majflt;
6503 # 381 "include/linux/sched.h"
6504 struct signal_struct {
6508 wait_queue_head_t wait_chldexit;
6511 struct task_struct *curr_target;
6514 struct sigpending shared_pending;
6517 int group_exit_code;
6523 struct task_struct *group_exit_task;
6527 int group_stop_count;
6531 struct list_head posix_timers;
6534 struct hrtimer real_timer;
6535 struct task_struct *tsk;
6536 ktime_t it_real_incr;
6539 cputime_t it_prof_expires, it_virt_expires;
6540 cputime_t it_prof_incr, it_virt_incr;
6549 struct tty_struct *tty;
6557 cputime_t utime, stime, cutime, cstime;
6558 unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw;
6559 unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt;
6567 unsigned long long sched_time;
6568 # 455 "include/linux/sched.h"
6569 struct rlimit rlim[15];
6571 struct list_head cpu_timers[3];
6572 # 471 "include/linux/sched.h"
6574 # 514 "include/linux/sched.h"
6575 struct user_struct {
6579 atomic_t sigpending;
6585 unsigned long mq_bytes;
6586 unsigned long locked_shm;
6594 struct list_head uidhash_list;
6598 extern struct user_struct *find_user(uid_t);
6600 extern struct user_struct root_user;
6603 struct backing_dev_info;
6604 struct reclaim_state;
6605 # 592 "include/linux/sched.h"
6606 static inline __attribute__((always_inline)) int sched_info_on(void)
6625 # 721 "include/linux/sched.h"
6634 gid_t small_block[32];
6638 # 749 "include/linux/sched.h"
6639 extern struct group_info *groups_alloc(int gidsetsize);
6640 extern void groups_free(struct group_info *group_info);
6641 extern int set_current_groups(struct group_info *group_info);
6642 extern int groups_search(struct group_info *group_info, gid_t grp);
6650 static inline __attribute__((always_inline)) void prefetch_stack(struct task_struct *t) { }
6653 struct audit_context;
6655 struct pipe_inode_info;
6656 struct uts_namespace;
6660 SLEEP_NONINTERACTIVE,
6667 struct task_struct {
6668 volatile long state;
6669 struct thread_info *thread_info;
6671 unsigned long flags;
6672 unsigned long ptrace;
6682 int prio, static_prio, normal_prio;
6683 struct list_head run_list;
6684 struct prio_array *array;
6686 unsigned short ioprio;
6690 unsigned long sleep_avg;
6691 unsigned long long timestamp, last_ran;
6692 unsigned long long sched_time;
6693 enum sleep_type sleep_type;
6695 unsigned long policy;
6696 cpumask_t cpus_allowed;
6697 unsigned int time_slice, first_time_slice;
6703 struct list_head tasks;
6708 struct list_head ptrace_children;
6709 struct list_head ptrace_list;
6711 struct mm_struct *mm, *active_mm;
6714 struct linux_binfmt *binfmt;
6716 int exit_code, exit_signal;
6719 unsigned long personality;
6720 unsigned did_exec:1;
6723 # 843 "include/linux/sched.h"
6724 struct task_struct *real_parent;
6725 struct task_struct *parent;
6730 struct list_head children;
6731 struct list_head sibling;
6732 struct task_struct *group_leader;
6735 struct pid_link pids[PIDTYPE_MAX];
6736 struct list_head thread_group;
6738 struct completion *vfork_done;
6740 int *clear_child_tid;
6742 unsigned long rt_priority;
6743 cputime_t utime, stime;
6744 unsigned long nvcsw, nivcsw;
6745 struct timespec start_time;
6747 unsigned long min_flt, maj_flt;
6749 cputime_t it_prof_expires, it_virt_expires;
6750 unsigned long long it_sched_expires;
6751 struct list_head cpu_timers[3];
6754 uid_t uid,euid,suid,fsuid;
6755 gid_t gid,egid,sgid,fsgid;
6756 struct group_info *group_info;
6757 kernel_cap_t cap_effective, cap_inheritable, cap_permitted;
6758 unsigned keep_capabilities:1;
6759 struct user_struct *user;
6760 # 892 "include/linux/sched.h"
6761 unsigned char fpu_counter;
6768 int link_count, total_link_count;
6774 struct thread_struct thread;
6776 struct fs_struct *fs;
6778 struct files_struct *files;
6780 struct nsproxy *nsproxy;
6782 struct signal_struct *signal;
6783 struct sighand_struct *sighand;
6785 sigset_t blocked, real_blocked;
6786 sigset_t saved_sigmask;
6787 struct sigpending pending;
6789 unsigned long sas_ss_sp;
6791 int (*notifier)(void *priv);
6792 void *notifier_data;
6793 sigset_t *notifier_mask;
6796 struct audit_context *audit_context;
6803 spinlock_t alloc_lock;
6810 struct plist_head pi_waiters;
6812 struct rt_mutex_waiter *pi_blocked_on;
6813 # 974 "include/linux/sched.h"
6817 struct reclaim_state *reclaim_state;
6819 struct backing_dev_info *backing_dev_info;
6821 struct io_context *io_context;
6823 unsigned long ptrace_message;
6824 siginfo_t *last_siginfo;
6831 wait_queue_t *io_wait;
6833 u64 rchar, wchar, syscr, syscw;
6834 # 1009 "include/linux/sched.h"
6835 struct robust_list_head *robust_list;
6839 struct list_head pi_state_list;
6840 struct futex_pi_state *pi_state_cache;
6843 struct rcu_head rcu;
6848 struct pipe_inode_info *splice_pipe;
6854 static inline __attribute__((always_inline)) pid_t process_group(struct task_struct *tsk)
6856 return tsk->signal->pgrp;
6859 static inline __attribute__((always_inline)) struct pid *task_pid(struct task_struct *task)
6861 return task->pids[PIDTYPE_PID].pid;
6864 static inline __attribute__((always_inline)) struct pid *task_tgid(struct task_struct *task)
6866 return task->group_leader->pids[PIDTYPE_PID].pid;
6869 static inline __attribute__((always_inline)) struct pid *task_pgrp(struct task_struct *task)
6871 return task->group_leader->pids[PIDTYPE_PGID].pid;
6874 static inline __attribute__((always_inline)) struct pid *task_session(struct task_struct *task)
6876 return task->group_leader->pids[PIDTYPE_SID].pid;
6878 # 1061 "include/linux/sched.h"
6879 static inline __attribute__((always_inline)) int pid_alive(struct task_struct *p)
6881 return p->pids[PIDTYPE_PID].pid != ((void *)0);
6890 static inline __attribute__((always_inline)) int is_init(struct task_struct *tsk)
6892 return tsk->pid == 1;
6895 extern struct pid *cad_pid;
6897 extern void free_task(struct task_struct *tsk);
6900 extern void __put_task_struct(struct task_struct *t);
6902 static inline __attribute__((always_inline)) void put_task_struct(struct task_struct *t)
6904 if ((atomic_sub_return(1, (&t->usage)) == 0))
6905 __put_task_struct(t);
6907 # 1147 "include/linux/sched.h"
6908 static inline __attribute__((always_inline)) int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask)
6910 if (!(__builtin_constant_p((0)) ? __constant_test_bit(((0)),((new_mask).bits)) : __test_bit(((0)),((new_mask).bits))))
6916 extern unsigned long long sched_clock(void);
6917 extern unsigned long long
6918 current_sched_time(const struct task_struct *current_task);
6919 # 1169 "include/linux/sched.h"
6920 static inline __attribute__((always_inline)) void idle_task_exit(void) {}
6923 extern void sched_idle_next(void);
6926 extern int rt_mutex_getprio(struct task_struct *p);
6927 extern void rt_mutex_setprio(struct task_struct *p, int prio);
6928 extern void rt_mutex_adjust_pi(struct task_struct *p);
6929 # 1186 "include/linux/sched.h"
6930 extern void set_user_nice(struct task_struct *p, long nice);
6931 extern int task_prio(const struct task_struct *p);
6932 extern int task_nice(const struct task_struct *p);
6933 extern int can_nice(const struct task_struct *p, const int nice);
6934 extern int task_curr(const struct task_struct *p);
6935 extern int idle_cpu(int cpu);
6936 extern int sched_setscheduler(struct task_struct *, int, struct sched_param *);
6937 extern struct task_struct *idle_task(int cpu);
6938 extern struct task_struct *curr_task(int cpu);
6939 extern void set_curr_task(int cpu, struct task_struct *p);
6946 extern struct exec_domain default_exec_domain;
6948 union thread_union {
6949 struct thread_info thread_info;
6950 unsigned long stack[8192/sizeof(long)];
6954 static inline __attribute__((always_inline)) int kstack_end(void *addr)
6959 return !(((unsigned long)addr+sizeof(void*)-1) & (8192 -sizeof(void*)));
6963 extern union thread_union init_thread_union;
6964 extern struct task_struct init_task;
6966 extern struct mm_struct init_mm;
6969 extern struct task_struct *find_task_by_pid_type(int type, int pid);
6970 extern void set_special_pids(pid_t session, pid_t pgrp);
6971 extern void __set_special_pids(pid_t session, pid_t pgrp);
6974 extern struct user_struct * alloc_uid(uid_t);
6975 static inline __attribute__((always_inline)) struct user_struct *get_uid(struct user_struct *u)
6977 atomic_inc(&u->__count);
6980 extern void free_uid(struct user_struct *);
6981 extern void switch_uid(struct user_struct *);
6985 extern void do_timer(unsigned long ticks);
6987 extern int wake_up_state(struct task_struct * tsk, unsigned int state);
6988 extern int wake_up_process(struct task_struct * tsk);
6989 extern void wake_up_new_task(struct task_struct * tsk, unsigned long clone_flags);
6994 static inline __attribute__((always_inline)) void kick_process(struct task_struct *tsk) { }
6996 extern void sched_fork(struct task_struct * p, int clone_flags);
6997 extern void sched_exit(struct task_struct * p);
6999 extern int in_group_p(gid_t);
7000 extern int in_egroup_p(gid_t);
7002 extern void proc_caches_init(void);
7003 extern void flush_signals(struct task_struct *);
7004 extern void flush_signal_handlers(struct task_struct *, int force_default);
7005 extern int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info);
7007 static inline __attribute__((always_inline)) int dequeue_signal_lock(struct task_struct *tsk, sigset_t *mask, siginfo_t *info)
7009 unsigned long flags;
7012 do { do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0); do { do { } while (0); (void)0; (void)(&tsk->sighand->siglock); } while (0); } while (0);
7013 ret = dequeue_signal(tsk, mask, info);
7014 do { do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0); do { do { } while (0); (void)0; (void)(&tsk->sighand->siglock); } while (0); } while (0);
7019 extern void block_all_signals(int (*notifier)(void *priv), void *priv,
7021 extern void unblock_all_signals(void);
7022 extern void release_task(struct task_struct * p);
7023 extern int send_sig_info(int, struct siginfo *, struct task_struct *);
7024 extern int send_group_sig_info(int, struct siginfo *, struct task_struct *);
7025 extern int force_sigsegv(int, struct task_struct *);
7026 extern int force_sig_info(int, struct siginfo *, struct task_struct *);
7027 extern int __kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp);
7028 extern int kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp);
7029 extern int kill_pid_info(int sig, struct siginfo *info, struct pid *pid);
7030 extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_t, u32);
7031 extern int kill_pgrp(struct pid *pid, int sig, int priv);
7032 extern int kill_pid(struct pid *pid, int sig, int priv);
7033 extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp);
7034 extern int kill_pg_info(int, struct siginfo *, pid_t);
7035 extern int kill_proc_info(int, struct siginfo *, pid_t);
7036 extern void do_notify_parent(struct task_struct *, int);
7037 extern void force_sig(int, struct task_struct *);
7038 extern void force_sig_specific(int, struct task_struct *);
7039 extern int send_sig(int, struct task_struct *, int);
7040 extern void zap_other_threads(struct task_struct *p);
7041 extern int kill_pg(pid_t, int, int);
7042 extern int kill_proc(pid_t, int, int);
7043 extern struct sigqueue *sigqueue_alloc(void);
7044 extern void sigqueue_free(struct sigqueue *);
7045 extern int send_sigqueue(int, struct sigqueue *, struct task_struct *);
7046 extern int send_group_sigqueue(int, struct sigqueue *, struct task_struct *);
7047 extern int do_sigaction(int, struct k_sigaction *, struct k_sigaction *);
7048 extern int do_sigaltstack(const stack_t *, stack_t *, unsigned long);
7050 static inline __attribute__((always_inline)) int kill_cad_pid(int sig, int priv)
7052 return kill_pid(cad_pid, sig, priv);
7060 static inline __attribute__((always_inline)) int is_si_special(const struct siginfo *info)
7062 return info <= ((struct siginfo *) 2);
7067 static inline __attribute__((always_inline)) int on_sig_stack(unsigned long sp)
7069 return (sp - (get_current())->sas_ss_sp < (get_current())->sas_ss_size);
7072 static inline __attribute__((always_inline)) int sas_ss_flags(unsigned long sp)
7074 return ((get_current())->sas_ss_size == 0 ? 2
7075 : on_sig_stack(sp) ? 1 : 0);
7081 extern struct mm_struct * mm_alloc(void);
7084 extern void __mmdrop(struct mm_struct *);
7085 static inline __attribute__((always_inline)) void mmdrop(struct mm_struct * mm)
7087 if ((atomic_sub_return(1, (&mm->mm_count)) == 0))
7092 extern void mmput(struct mm_struct *);
7094 extern struct mm_struct *get_task_mm(struct task_struct *task);
7096 extern void mm_release(struct task_struct *, struct mm_struct *);
7098 extern int copy_thread(int, unsigned long, unsigned long, unsigned long, struct task_struct *, struct pt_regs *);
7099 extern void flush_thread(void);
7100 extern void exit_thread(void);
7102 extern void exit_files(struct task_struct *);
7103 extern void __cleanup_signal(struct signal_struct *);
7104 extern void __cleanup_sighand(struct sighand_struct *);
7105 extern void exit_itimers(struct signal_struct *);
7107 extern void do_group_exit(int);
7109 extern void daemonize(const char *, ...);
7110 extern int allow_signal(int);
7111 extern int disallow_signal(int);
7112 extern struct task_struct *child_reaper;
7114 extern int do_execve(char *, char * *, char * *, struct pt_regs *);
7115 extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int *, int *);
7116 struct task_struct *fork_idle(int);
7118 extern void set_task_comm(struct task_struct *tsk, char *from);
7119 extern void get_task_comm(char *to, struct task_struct *tsk);
7120 # 1410 "include/linux/sched.h"
7121 static inline __attribute__((always_inline)) int has_group_leader_pid(struct task_struct *p)
7123 return p->pid == p->tgid;
7126 static inline __attribute__((always_inline)) struct task_struct *next_thread(const struct task_struct *p)
7128 return ({ const typeof( ((struct task_struct *)0)->thread_group ) *__mptr = (({ typeof(p->thread_group.next) _________p1 = p->thread_group.next; do { } while(0); (_________p1); })); (struct task_struct *)( (char *)__mptr - __builtin_offsetof(struct task_struct,thread_group) );});
7132 static inline __attribute__((always_inline)) int thread_group_empty(struct task_struct *p)
7134 return list_empty(&p->thread_group);
7136 # 1438 "include/linux/sched.h"
7137 static inline __attribute__((always_inline)) void task_lock(struct task_struct *p)
7139 do { do { } while (0); (void)0; (void)(&p->alloc_lock); } while (0);
7142 static inline __attribute__((always_inline)) void task_unlock(struct task_struct *p)
7144 do { do { } while (0); (void)0; (void)(&p->alloc_lock); } while (0);
7147 extern struct sighand_struct *lock_task_sighand(struct task_struct *tsk,
7148 unsigned long *flags);
7150 static inline __attribute__((always_inline)) void unlock_task_sighand(struct task_struct *tsk,
7151 unsigned long *flags)
7153 do { do { if (((*flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0); do { do { } while (0); (void)0; (void)(&tsk->sighand->siglock); } while (0); } while (0);
7161 static inline __attribute__((always_inline)) void setup_thread_stack(struct task_struct *p, struct task_struct *org)
7163 *(p)->thread_info = *(org)->thread_info;
7164 (p)->thread_info->task = p;
7167 static inline __attribute__((always_inline)) unsigned long *end_of_stack(struct task_struct *p)
7169 return (unsigned long *)(p->thread_info + 1);
7177 static inline __attribute__((always_inline)) void set_tsk_thread_flag(struct task_struct *tsk, int flag)
7179 set_ti_thread_flag((tsk)->thread_info, flag);
7182 static inline __attribute__((always_inline)) void clear_tsk_thread_flag(struct task_struct *tsk, int flag)
7184 clear_ti_thread_flag((tsk)->thread_info, flag);
7187 static inline __attribute__((always_inline)) int test_and_set_tsk_thread_flag(struct task_struct *tsk, int flag)
7189 return test_and_set_ti_thread_flag((tsk)->thread_info, flag);
7192 static inline __attribute__((always_inline)) int test_and_clear_tsk_thread_flag(struct task_struct *tsk, int flag)
7194 return test_and_clear_ti_thread_flag((tsk)->thread_info, flag);
7197 static inline __attribute__((always_inline)) int test_tsk_thread_flag(struct task_struct *tsk, int flag)
7199 return test_ti_thread_flag((tsk)->thread_info, flag);
7202 static inline __attribute__((always_inline)) void set_tsk_need_resched(struct task_struct *tsk)
7204 set_tsk_thread_flag(tsk,3);
7207 static inline __attribute__((always_inline)) void clear_tsk_need_resched(struct task_struct *tsk)
7209 clear_tsk_thread_flag(tsk,3);
7212 static inline __attribute__((always_inline)) int signal_pending(struct task_struct *p)
7214 return __builtin_expect(!!(test_tsk_thread_flag(p,2)), 0);
7217 static inline __attribute__((always_inline)) int need_resched(void)
7219 return __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 0);
7221 # 1530 "include/linux/sched.h"
7222 extern int cond_resched(void);
7223 extern int cond_resched_lock(spinlock_t * lock);
7224 extern int cond_resched_softirq(void);
7225 # 1548 "include/linux/sched.h"
7226 static inline __attribute__((always_inline)) int lock_need_resched(spinlock_t *lock)
7228 if (0 || need_resched())
7237 extern void recalc_sigpending_tsk(struct task_struct *t);
7238 extern void recalc_sigpending(void);
7240 extern void signal_wake_up(struct task_struct *t, int resume_stopped);
7241 # 1581 "include/linux/sched.h"
7242 static inline __attribute__((always_inline)) unsigned int task_cpu(const struct task_struct *p)
7247 static inline __attribute__((always_inline)) void set_task_cpu(struct task_struct *p, unsigned int cpu)
7256 static inline __attribute__((always_inline)) void arch_pick_mmap_layout(struct mm_struct *mm)
7259 mm->get_unmapped_area = arch_get_unmapped_area;
7260 mm->unmap_area = arch_unmap_area;
7264 extern long sched_setaffinity(pid_t pid, cpumask_t new_mask);
7265 extern long sched_getaffinity(pid_t pid, cpumask_t *mask);
7267 # 1 "include/linux/sysdev.h" 1
7268 # 24 "include/linux/sysdev.h"
7269 # 1 "include/linux/kobject.h" 1
7270 # 22 "include/linux/kobject.h"
7271 # 1 "include/linux/sysfs.h" 1
7272 # 16 "include/linux/sysfs.h"
7278 struct module * owner;
7282 struct attribute_group {
7284 struct attribute ** attrs;
7286 # 52 "include/linux/sysfs.h"
7287 struct vm_area_struct;
7289 struct bin_attribute {
7290 struct attribute attr;
7293 ssize_t (*read)(struct kobject *, char *, loff_t, size_t);
7294 ssize_t (*write)(struct kobject *, char *, loff_t, size_t);
7295 int (*mmap)(struct kobject *, struct bin_attribute *attr,
7296 struct vm_area_struct *vma);
7300 ssize_t (*show)(struct kobject *, struct attribute *,char *);
7301 ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t);
7304 struct sysfs_dirent {
7306 struct list_head s_sibling;
7307 struct list_head s_children;
7311 struct dentry * s_dentry;
7312 struct iattr * s_iattr;
7315 # 90 "include/linux/sysfs.h"
7316 extern int __attribute__((warn_unused_result))
7317 sysfs_create_dir(struct kobject *);
7320 sysfs_remove_dir(struct kobject *);
7322 extern int __attribute__((warn_unused_result))
7323 sysfs_rename_dir(struct kobject *, const char *new_name);
7325 extern int __attribute__((warn_unused_result))
7326 sysfs_create_file(struct kobject *, const struct attribute *);
7328 extern int __attribute__((warn_unused_result))
7329 sysfs_update_file(struct kobject *, const struct attribute *);
7331 extern int __attribute__((warn_unused_result))
7332 sysfs_chmod_file(struct kobject *kobj, struct attribute *attr, mode_t mode);
7335 sysfs_remove_file(struct kobject *, const struct attribute *);
7337 extern int __attribute__((warn_unused_result))
7338 sysfs_create_link(struct kobject * kobj, struct kobject * target, const char * name);
7341 sysfs_remove_link(struct kobject *, const char * name);
7343 int __attribute__((warn_unused_result)) sysfs_create_bin_file(struct kobject *kobj,
7344 struct bin_attribute *attr);
7345 void sysfs_remove_bin_file(struct kobject *kobj, struct bin_attribute *attr);
7347 int __attribute__((warn_unused_result)) sysfs_create_group(struct kobject *,
7348 const struct attribute_group *);
7349 void sysfs_remove_group(struct kobject *, const struct attribute_group *);
7350 void sysfs_notify(struct kobject * k, char *dir, char *attr);
7352 extern int __attribute__((warn_unused_result)) sysfs_init(void);
7353 # 23 "include/linux/kobject.h" 2
7354 # 35 "include/linux/kobject.h"
7355 extern char uevent_helper[];
7358 extern u64 uevent_seqnum;
7361 typedef int kobject_action_t;
7362 enum kobject_action {
7363 KOBJ_ADD = ( kobject_action_t) 0x01,
7364 KOBJ_REMOVE = ( kobject_action_t) 0x02,
7365 KOBJ_CHANGE = ( kobject_action_t) 0x03,
7366 KOBJ_MOUNT = ( kobject_action_t) 0x04,
7367 KOBJ_UMOUNT = ( kobject_action_t) 0x05,
7368 KOBJ_OFFLINE = ( kobject_action_t) 0x06,
7369 KOBJ_ONLINE = ( kobject_action_t) 0x07,
7373 const char * k_name;
7376 struct list_head entry;
7377 struct kobject * parent;
7379 struct kobj_type * ktype;
7380 struct dentry * dentry;
7381 wait_queue_head_t poll;
7384 extern int kobject_set_name(struct kobject *, const char *, ...)
7385 __attribute__((format(printf,2,3)));
7387 static inline __attribute__((always_inline)) const char * kobject_name(const struct kobject * kobj)
7389 return kobj->k_name;
7392 extern void kobject_init(struct kobject *);
7393 extern void kobject_cleanup(struct kobject *);
7395 extern int __attribute__((warn_unused_result)) kobject_add(struct kobject *);
7396 extern void kobject_del(struct kobject *);
7398 extern int __attribute__((warn_unused_result)) kobject_rename(struct kobject *, const char *new_name);
7400 extern int __attribute__((warn_unused_result)) kobject_register(struct kobject *);
7401 extern void kobject_unregister(struct kobject *);
7403 extern struct kobject * kobject_get(struct kobject *);
7404 extern void kobject_put(struct kobject *);
7406 extern struct kobject *kobject_add_dir(struct kobject *, const char *);
7408 extern char * kobject_get_path(struct kobject *, gfp_t);
7411 void (*release)(struct kobject *);
7412 struct sysfs_ops * sysfs_ops;
7413 struct attribute ** default_attrs;
7415 # 114 "include/linux/kobject.h"
7416 struct kset_uevent_ops {
7417 int (*filter)(struct kset *kset, struct kobject *kobj);
7418 const char *(*name)(struct kset *kset, struct kobject *kobj);
7419 int (*uevent)(struct kset *kset, struct kobject *kobj, char **envp,
7420 int num_envp, char *buffer, int buffer_size);
7424 struct subsystem * subsys;
7425 struct kobj_type * ktype;
7426 struct list_head list;
7427 spinlock_t list_lock;
7428 struct kobject kobj;
7429 struct kset_uevent_ops * uevent_ops;
7433 extern void kset_init(struct kset * k);
7434 extern int __attribute__((warn_unused_result)) kset_add(struct kset * k);
7435 extern int __attribute__((warn_unused_result)) kset_register(struct kset * k);
7436 extern void kset_unregister(struct kset * k);
7438 static inline __attribute__((always_inline)) struct kset * to_kset(struct kobject * kobj)
7440 return kobj ? ({ const typeof( ((struct kset *)0)->kobj ) *__mptr = (kobj); (struct kset *)( (char *)__mptr - __builtin_offsetof(struct kset,kobj) );}) : ((void *)0);
7443 static inline __attribute__((always_inline)) struct kset * kset_get(struct kset * k)
7445 return k ? to_kset(kobject_get(&k->kobj)) : ((void *)0);
7448 static inline __attribute__((always_inline)) void kset_put(struct kset * k)
7450 kobject_put(&k->kobj);
7453 static inline __attribute__((always_inline)) struct kobj_type * get_ktype(struct kobject * k)
7455 if (k->kset && k->kset->ktype)
7456 return k->kset->ktype;
7461 extern struct kobject * kset_find_obj(struct kset *, const char *);
7462 # 170 "include/linux/kobject.h"
7465 struct rw_semaphore rwsem;
7467 # 193 "include/linux/kobject.h"
7468 extern struct subsystem kernel_subsys;
7470 extern struct subsystem hypervisor_subsys;
7471 # 242 "include/linux/kobject.h"
7472 extern void subsystem_init(struct subsystem *);
7473 extern int __attribute__((warn_unused_result)) subsystem_register(struct subsystem *);
7474 extern void subsystem_unregister(struct subsystem *);
7476 static inline __attribute__((always_inline)) struct subsystem * subsys_get(struct subsystem * s)
7478 return s ? ({ const typeof( ((struct subsystem *)0)->kset ) *__mptr = (kset_get(&s->kset)); (struct subsystem *)( (char *)__mptr - __builtin_offsetof(struct subsystem,kset) );}) : ((void *)0);
7481 static inline __attribute__((always_inline)) void subsys_put(struct subsystem * s)
7486 struct subsys_attribute {
7487 struct attribute attr;
7488 ssize_t (*show)(struct subsystem *, char *);
7489 ssize_t (*store)(struct subsystem *, const char *, size_t);
7492 extern int __attribute__((warn_unused_result)) subsys_create_file(struct subsystem * ,
7493 struct subsys_attribute *);
7494 # 273 "include/linux/kobject.h"
7495 static inline __attribute__((always_inline)) void kobject_uevent(struct kobject *kobj, enum kobject_action action) { }
7497 static inline __attribute__((always_inline)) int add_uevent_var(char **envp, int num_envp, int *cur_index,
7498 char *buffer, int buffer_size, int *cur_len,
7499 const char *format, ...)
7501 # 25 "include/linux/sysdev.h" 2
7502 # 1 "include/linux/pm.h" 1
7503 # 34 "include/linux/pm.h"
7504 typedef int pm_request_t;
7505 # 43 "include/linux/pm.h"
7506 typedef int pm_dev_t;
7507 # 56 "include/linux/pm.h"
7510 PM_SYS_UNKNOWN = 0x00000000,
7511 PM_SYS_KBC = 0x41d00303,
7512 PM_SYS_COM = 0x41d00500,
7513 PM_SYS_IRDA = 0x41d00510,
7514 PM_SYS_FDC = 0x41d00700,
7515 PM_SYS_VGA = 0x41d00900,
7516 PM_SYS_PCMCIA = 0x41d00e00,
7518 # 75 "include/linux/pm.h"
7521 typedef int (*pm_callback)(struct pm_dev *dev, pm_request_t rqst, void *data);
7530 pm_callback callback;
7533 unsigned long flags;
7534 unsigned long state;
7535 unsigned long prev_state;
7537 struct list_head entry;
7546 extern void (*pm_idle)(void);
7547 extern void (*pm_power_off)(void);
7549 typedef int suspend_state_t;
7557 typedef int suspend_disk_method_t;
7558 # 123 "include/linux/pm.h"
7560 suspend_disk_method_t pm_disk_mode;
7561 int (*valid)(suspend_state_t state);
7562 int (*prepare)(suspend_state_t state);
7563 int (*enter)(suspend_state_t state);
7564 int (*finish)(suspend_state_t state);
7567 extern void pm_set_ops(struct pm_ops *);
7568 extern struct pm_ops *pm_ops;
7569 extern int pm_suspend(suspend_state_t state);
7578 typedef struct pm_message {
7581 # 205 "include/linux/pm.h"
7582 struct dev_pm_info {
7583 pm_message_t power_state;
7584 unsigned can_wakeup:1;
7594 extern void device_pm_set_parent(struct device * dev, struct device * parent);
7596 extern int device_power_down(pm_message_t state);
7597 extern void device_power_up(void);
7598 extern void device_resume(void);
7599 # 245 "include/linux/pm.h"
7600 static inline __attribute__((always_inline)) int device_suspend(pm_message_t state)
7608 static inline __attribute__((always_inline)) int dpm_runtime_suspend(struct device * dev, pm_message_t state)
7613 static inline __attribute__((always_inline)) void dpm_runtime_resume(struct device * dev)
7616 # 26 "include/linux/sysdev.h" 2
7621 struct sysdev_class {
7622 struct list_head drivers;
7625 int (*shutdown)(struct sys_device *);
7626 int (*suspend)(struct sys_device *, pm_message_t state);
7627 int (*resume)(struct sys_device *);
7631 struct sysdev_class_attribute {
7632 struct attribute attr;
7633 ssize_t (*show)(struct sysdev_class *, char *);
7634 ssize_t (*store)(struct sysdev_class *, const char *, size_t);
7636 # 54 "include/linux/sysdev.h"
7637 extern int sysdev_class_register(struct sysdev_class *);
7638 extern void sysdev_class_unregister(struct sysdev_class *);
7640 extern int sysdev_class_create_file(struct sysdev_class *,
7641 struct sysdev_class_attribute *);
7642 extern void sysdev_class_remove_file(struct sysdev_class *,
7643 struct sysdev_class_attribute *);
7648 struct sysdev_driver {
7649 struct list_head entry;
7650 int (*add)(struct sys_device *);
7651 int (*remove)(struct sys_device *);
7652 int (*shutdown)(struct sys_device *);
7653 int (*suspend)(struct sys_device *, pm_message_t state);
7654 int (*resume)(struct sys_device *);
7658 extern int sysdev_driver_register(struct sysdev_class *, struct sysdev_driver *);
7659 extern void sysdev_driver_unregister(struct sysdev_class *, struct sysdev_driver *);
7669 struct sysdev_class * cls;
7670 struct kobject kobj;
7673 extern int sysdev_register(struct sys_device *);
7674 extern void sysdev_unregister(struct sys_device *);
7677 struct sysdev_attribute {
7678 struct attribute attr;
7679 ssize_t (*show)(struct sys_device *, char *);
7680 ssize_t (*store)(struct sys_device *, const char *, size_t);
7682 # 108 "include/linux/sysdev.h"
7683 extern int sysdev_create_file(struct sys_device *, struct sysdev_attribute *);
7684 extern void sysdev_remove_file(struct sys_device *, struct sysdev_attribute *);
7685 # 1607 "include/linux/sched.h" 2
7686 extern int sched_mc_power_savings, sched_smt_power_savings;
7687 extern struct sysdev_attribute attr_sched_mc_power_savings, attr_sched_smt_power_savings;
7688 extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls);
7690 extern void normalize_rt_tasks(void);
7691 # 1681 "include/linux/sched.h"
7692 static inline __attribute__((always_inline)) int frozen(struct task_struct *p) { return 0; }
7693 static inline __attribute__((always_inline)) int freezing(struct task_struct *p) { return 0; }
7694 static inline __attribute__((always_inline)) void freeze(struct task_struct *p) { do { dump_stack(); printk("<4>" "\nkernel BUG at %s:%d!\n", "include/linux/sched.h", 1683); panic("BUG!"); } while (0); }
7695 static inline __attribute__((always_inline)) int thaw_process(struct task_struct *p) { return 1; }
7696 static inline __attribute__((always_inline)) void frozen_process(struct task_struct *p) { do { dump_stack(); printk("<4>" "\nkernel BUG at %s:%d!\n", "include/linux/sched.h", 1685); panic("BUG!"); } while (0); }
7698 static inline __attribute__((always_inline)) void refrigerator(void) {}
7699 static inline __attribute__((always_inline)) int freeze_processes(void) { do { dump_stack(); printk("<4>" "\nkernel BUG at %s:%d!\n", "include/linux/sched.h", 1688); panic("BUG!"); } while (0); return 0; }
7700 static inline __attribute__((always_inline)) void thaw_processes(void) {}
7702 static inline __attribute__((always_inline)) int try_to_freeze(void) { return 0; }
7703 # 13 "include/asm/uaccess.h" 2
7704 # 1 "include/linux/mm.h" 1
7705 # 14 "include/linux/mm.h"
7706 # 1 "include/linux/prio_tree.h" 1
7707 # 14 "include/linux/prio_tree.h"
7708 struct raw_prio_tree_node {
7709 struct prio_tree_node *left;
7710 struct prio_tree_node *right;
7711 struct prio_tree_node *parent;
7714 struct prio_tree_node {
7715 struct prio_tree_node *left;
7716 struct prio_tree_node *right;
7717 struct prio_tree_node *parent;
7718 unsigned long start;
7722 struct prio_tree_root {
7723 struct prio_tree_node *prio_tree_node;
7724 unsigned short index_bits;
7732 struct prio_tree_iter {
7733 struct prio_tree_node *cur;
7735 unsigned long value;
7738 struct prio_tree_root *root;
7739 unsigned long r_index;
7740 unsigned long h_index;
7743 static inline __attribute__((always_inline)) void prio_tree_iter_init(struct prio_tree_iter *iter,
7744 struct prio_tree_root *root, unsigned long r_index, unsigned long h_index)
7747 iter->r_index = r_index;
7748 iter->h_index = h_index;
7749 iter->cur = ((void *)0);
7751 # 84 "include/linux/prio_tree.h"
7752 static inline __attribute__((always_inline)) int prio_tree_empty(const struct prio_tree_root *root)
7754 return root->prio_tree_node == ((void *)0);
7757 static inline __attribute__((always_inline)) int prio_tree_root(const struct prio_tree_node *node)
7759 return node->parent == node;
7762 static inline __attribute__((always_inline)) int prio_tree_left_empty(const struct prio_tree_node *node)
7764 return node->left == node;
7767 static inline __attribute__((always_inline)) int prio_tree_right_empty(const struct prio_tree_node *node)
7769 return node->right == node;
7773 struct prio_tree_node *prio_tree_replace(struct prio_tree_root *root,
7774 struct prio_tree_node *old, struct prio_tree_node *node);
7775 struct prio_tree_node *prio_tree_insert(struct prio_tree_root *root,
7776 struct prio_tree_node *node);
7777 void prio_tree_remove(struct prio_tree_root *root, struct prio_tree_node *node);
7778 struct prio_tree_node *prio_tree_next(struct prio_tree_iter *iter);
7779 # 15 "include/linux/mm.h" 2
7780 # 1 "include/linux/fs.h" 1
7781 # 9 "include/linux/fs.h"
7782 # 1 "include/linux/limits.h" 1
7783 # 10 "include/linux/fs.h" 2
7784 # 1 "include/linux/ioctl.h" 1
7788 # 1 "include/asm/ioctl.h" 1
7789 # 1 "include/asm-generic/ioctl.h" 1
7790 # 51 "include/asm-generic/ioctl.h"
7791 extern unsigned int __invalid_size_argument_for_IOC;
7792 # 1 "include/asm/ioctl.h" 2
7793 # 5 "include/linux/ioctl.h" 2
7794 # 11 "include/linux/fs.h" 2
7795 # 35 "include/linux/fs.h"
7796 struct files_stat_struct {
7801 extern struct files_stat_struct files_stat;
7802 extern int get_max_files(void);
7804 struct inodes_stat_t {
7809 extern struct inodes_stat_t inodes_stat;
7811 extern int leases_enable, lease_break_time;
7812 # 270 "include/linux/fs.h"
7813 # 1 "include/linux/kdev_t.h" 1
7814 # 21 "include/linux/kdev_t.h"
7815 static inline __attribute__((always_inline)) int old_valid_dev(dev_t dev)
7817 return ((unsigned int) ((dev) >> 20)) < 256 && ((unsigned int) ((dev) & ((1U << 20) - 1))) < 256;
7820 static inline __attribute__((always_inline)) u16 old_encode_dev(dev_t dev)
7822 return (((unsigned int) ((dev) >> 20)) << 8) | ((unsigned int) ((dev) & ((1U << 20) - 1)));
7825 static inline __attribute__((always_inline)) dev_t old_decode_dev(u16 val)
7827 return ((((val >> 8) & 255) << 20) | (val & 255));
7830 static inline __attribute__((always_inline)) int new_valid_dev(dev_t dev)
7835 static inline __attribute__((always_inline)) u32 new_encode_dev(dev_t dev)
7837 unsigned major = ((unsigned int) ((dev) >> 20));
7838 unsigned minor = ((unsigned int) ((dev) & ((1U << 20) - 1)));
7839 return (minor & 0xff) | (major << 8) | ((minor & ~0xff) << 12);
7842 static inline __attribute__((always_inline)) dev_t new_decode_dev(u32 dev)
7844 unsigned major = (dev & 0xfff00) >> 8;
7845 unsigned minor = (dev & 0xff) | ((dev >> 12) & 0xfff00);
7846 return (((major) << 20) | (minor));
7849 static inline __attribute__((always_inline)) int huge_valid_dev(dev_t dev)
7854 static inline __attribute__((always_inline)) u64 huge_encode_dev(dev_t dev)
7856 return new_encode_dev(dev);
7859 static inline __attribute__((always_inline)) dev_t huge_decode_dev(u64 dev)
7861 return new_decode_dev(dev);
7864 static inline __attribute__((always_inline)) int sysv_valid_dev(dev_t dev)
7866 return ((unsigned int) ((dev) >> 20)) < (1<<14) && ((unsigned int) ((dev) & ((1U << 20) - 1))) < (1<<18);
7869 static inline __attribute__((always_inline)) u32 sysv_encode_dev(dev_t dev)
7871 return ((unsigned int) ((dev) & ((1U << 20) - 1))) | (((unsigned int) ((dev) >> 20)) << 18);
7874 static inline __attribute__((always_inline)) unsigned sysv_major(u32 dev)
7876 return (dev >> 18) & 0x3fff;
7879 static inline __attribute__((always_inline)) unsigned sysv_minor(u32 dev)
7881 return dev & 0x3ffff;
7883 # 271 "include/linux/fs.h" 2
7884 # 1 "include/linux/dcache.h" 1
7885 # 12 "include/linux/dcache.h"
7888 # 33 "include/linux/dcache.h"
7892 const unsigned char *name;
7895 struct dentry_stat_t {
7902 extern struct dentry_stat_t dentry_stat;
7909 static inline __attribute__((always_inline)) unsigned long
7910 partial_name_hash(unsigned long c, unsigned long prevhash)
7912 return (prevhash + (c << 4) + (c >> 4)) * 11;
7919 static inline __attribute__((always_inline)) unsigned long end_name_hash(unsigned long hash)
7921 return (unsigned int) hash;
7925 static inline __attribute__((always_inline)) unsigned int
7926 full_name_hash(const unsigned char *name, unsigned int len)
7928 unsigned long hash = 0;
7930 hash = partial_name_hash(*name++, hash);
7931 return end_name_hash(hash);
7934 struct dcookie_struct;
7940 unsigned int d_flags;
7942 struct inode *d_inode;
7948 struct hlist_node d_hash;
7949 struct dentry *d_parent;
7952 struct list_head d_lru;
7957 struct list_head d_child;
7958 struct rcu_head d_rcu;
7960 struct list_head d_subdirs;
7961 struct list_head d_alias;
7962 unsigned long d_time;
7963 struct dentry_operations *d_op;
7964 struct super_block *d_sb;
7970 unsigned char d_iname[36];
7979 enum dentry_d_lock_class
7981 DENTRY_D_LOCK_NORMAL,
7982 DENTRY_D_LOCK_NESTED
7985 struct dentry_operations {
7986 int (*d_revalidate)(struct dentry *, struct nameidata *);
7987 int (*d_hash) (struct dentry *, struct qstr *);
7988 int (*d_compare) (struct dentry *, struct qstr *, struct qstr *);
7989 int (*d_delete)(struct dentry *);
7990 void (*d_release)(struct dentry *);
7991 void (*d_iput)(struct dentry *, struct inode *);
7993 # 179 "include/linux/dcache.h"
7994 extern spinlock_t dcache_lock;
7995 # 197 "include/linux/dcache.h"
7996 static inline __attribute__((always_inline)) void __d_drop(struct dentry *dentry)
7998 if (!(dentry->d_flags & 0x0010)) {
7999 dentry->d_flags |= 0x0010;
8000 hlist_del_rcu(&dentry->d_hash);
8004 static inline __attribute__((always_inline)) void d_drop(struct dentry *dentry)
8006 do { do { } while (0); (void)0; (void)(&dcache_lock); } while (0);
8007 do { do { } while (0); (void)0; (void)(&dentry->d_lock); } while (0);
8009 do { do { } while (0); (void)0; (void)(&dentry->d_lock); } while (0);
8010 do { do { } while (0); (void)0; (void)(&dcache_lock); } while (0);
8013 static inline __attribute__((always_inline)) int dname_external(struct dentry *dentry)
8015 return dentry->d_name.name != dentry->d_iname;
8021 extern void d_instantiate(struct dentry *, struct inode *);
8022 extern struct dentry * d_instantiate_unique(struct dentry *, struct inode *);
8023 extern struct dentry * d_materialise_unique(struct dentry *, struct inode *);
8024 extern void d_delete(struct dentry *);
8027 extern struct dentry * d_alloc(struct dentry *, const struct qstr *);
8028 extern struct dentry * d_alloc_anon(struct inode *);
8029 extern struct dentry * d_splice_alias(struct inode *, struct dentry *);
8030 extern void shrink_dcache_sb(struct super_block *);
8031 extern void shrink_dcache_parent(struct dentry *);
8032 extern void shrink_dcache_for_umount(struct super_block *);
8033 extern int d_invalidate(struct dentry *);
8036 extern struct dentry * d_alloc_root(struct inode *);
8039 extern void d_genocide(struct dentry *);
8041 extern struct dentry *d_find_alias(struct inode *);
8042 extern void d_prune_aliases(struct inode *);
8045 extern int have_submounts(struct dentry *);
8050 extern void d_rehash(struct dentry *);
8051 # 262 "include/linux/dcache.h"
8052 static inline __attribute__((always_inline)) void d_add(struct dentry *entry, struct inode *inode)
8054 d_instantiate(entry, inode);
8057 # 276 "include/linux/dcache.h"
8058 static inline __attribute__((always_inline)) struct dentry *d_add_unique(struct dentry *entry, struct inode *inode)
8062 res = d_instantiate_unique(entry, inode);
8063 d_rehash(res != ((void *)0) ? res : entry);
8068 extern void d_move(struct dentry *, struct dentry *);
8071 extern struct dentry * d_lookup(struct dentry *, struct qstr *);
8072 extern struct dentry * __d_lookup(struct dentry *, struct qstr *);
8073 extern struct dentry * d_hash_and_lookup(struct dentry *, struct qstr *);
8076 extern int d_validate(struct dentry *, struct dentry *);
8078 extern char * d_path(struct dentry *, struct vfsmount *, char *, int);
8079 # 313 "include/linux/dcache.h"
8080 static inline __attribute__((always_inline)) struct dentry *dget(struct dentry *dentry)
8083 do { if (__builtin_expect(!!((!((&dentry->d_count)->counter))!=0), 0)) do { dump_stack(); printk("<4>" "\nkernel BUG at %s:%d!\n", "include/linux/dcache.h", 316); panic("BUG!"); } while (0); } while(0);
8084 atomic_inc(&dentry->d_count);
8089 extern struct dentry * dget_locked(struct dentry *);
8090 # 331 "include/linux/dcache.h"
8091 static inline __attribute__((always_inline)) int d_unhashed(struct dentry *dentry)
8093 return (dentry->d_flags & 0x0010);
8096 static inline __attribute__((always_inline)) struct dentry *dget_parent(struct dentry *dentry)
8100 do { do { } while (0); (void)0; (void)(&dentry->d_lock); } while (0);
8101 ret = dget(dentry->d_parent);
8102 do { do { } while (0); (void)0; (void)(&dentry->d_lock); } while (0);
8106 extern void dput(struct dentry *);
8108 static inline __attribute__((always_inline)) int d_mountpoint(struct dentry *dentry)
8110 return dentry->d_mounted;
8113 extern struct vfsmount *lookup_mnt(struct vfsmount *, struct dentry *);
8114 extern struct vfsmount *__lookup_mnt(struct vfsmount *, struct dentry *, int);
8115 extern struct dentry *lookup_create(struct nameidata *nd, int is_dir);
8117 extern int sysctl_vfs_cache_pressure;
8118 # 272 "include/linux/fs.h" 2
8119 # 1 "include/linux/stat.h" 1
8125 # 1 "include/asm/stat.h" 1
8130 unsigned short st_dev;
8131 unsigned short __pad1;
8132 unsigned long st_ino;
8133 unsigned short st_mode;
8134 unsigned short st_nlink;
8135 unsigned short st_uid;
8136 unsigned short st_gid;
8137 unsigned short st_rdev;
8138 unsigned short __pad2;
8139 unsigned long st_size;
8140 unsigned long st_blksize;
8141 unsigned long st_blocks;
8142 unsigned long st_atime;
8143 unsigned long __unused1;
8144 unsigned long st_mtime;
8145 unsigned long __unused2;
8146 unsigned long st_ctime;
8147 unsigned long __unused3;
8148 unsigned long __unused4;
8149 unsigned long __unused5;
8156 unsigned long long st_dev;
8157 unsigned char __pad1[4];
8160 unsigned long __st_ino;
8162 unsigned int st_mode;
8163 unsigned int st_nlink;
8165 unsigned long st_uid;
8166 unsigned long st_gid;
8168 unsigned long long st_rdev;
8169 unsigned char __pad2[4];
8172 unsigned long st_blksize;
8174 long long st_blocks;
8176 unsigned long st_atime;
8177 unsigned long st_atime_nsec;
8179 unsigned long st_mtime;
8180 unsigned long st_mtime_nsec;
8182 unsigned long st_ctime;
8183 unsigned long st_ctime_nsec;
8185 unsigned long long st_ino;
8187 # 7 "include/linux/stat.h" 2
8188 # 59 "include/linux/stat.h"
8198 struct timespec atime;
8199 struct timespec mtime;
8200 struct timespec ctime;
8201 unsigned long blksize;
8202 unsigned long long blocks;
8204 # 273 "include/linux/fs.h" 2
8208 # 1 "include/linux/radix-tree.h" 1
8209 # 29 "include/linux/radix-tree.h"
8210 struct radix_tree_root {
8211 unsigned int height;
8213 struct radix_tree_node *rnode;
8215 # 51 "include/linux/radix-tree.h"
8216 int radix_tree_insert(struct radix_tree_root *, unsigned long, void *);
8217 void *radix_tree_lookup(struct radix_tree_root *, unsigned long);
8218 void **radix_tree_lookup_slot(struct radix_tree_root *, unsigned long);
8219 void *radix_tree_delete(struct radix_tree_root *, unsigned long);
8221 radix_tree_gang_lookup(struct radix_tree_root *root, void **results,
8222 unsigned long first_index, unsigned int max_items);
8223 int radix_tree_preload(gfp_t gfp_mask);
8224 void radix_tree_init(void);
8225 void *radix_tree_tag_set(struct radix_tree_root *root,
8226 unsigned long index, unsigned int tag);
8227 void *radix_tree_tag_clear(struct radix_tree_root *root,
8228 unsigned long index, unsigned int tag);
8229 int radix_tree_tag_get(struct radix_tree_root *root,
8230 unsigned long index, unsigned int tag);
8232 radix_tree_gang_lookup_tag(struct radix_tree_root *root, void **results,
8233 unsigned long first_index, unsigned int max_items,
8235 int radix_tree_tagged(struct radix_tree_root *root, unsigned int tag);
8237 static inline __attribute__((always_inline)) void radix_tree_preload_end(void)
8241 # 277 "include/linux/fs.h" 2
8242 # 286 "include/linux/fs.h"
8247 struct pipe_inode_info;
8248 struct poll_table_struct;
8250 struct vm_area_struct;
8253 extern void __attribute__ ((__section__ (".init.text"))) inode_init(unsigned long);
8254 extern void __attribute__ ((__section__ (".init.text"))) inode_init_early(void);
8255 extern void __attribute__ ((__section__ (".init.text"))) mnt_init(unsigned long);
8256 extern void __attribute__ ((__section__ (".init.text"))) files_init(unsigned long);
8259 typedef int (get_block_t)(struct inode *inode, sector_t iblock,
8260 struct buffer_head *bh_result, int create);
8261 typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset,
8262 ssize_t bytes, void *private);
8263 # 335 "include/linux/fs.h"
8265 unsigned int ia_valid;
8270 struct timespec ia_atime;
8271 struct timespec ia_mtime;
8272 struct timespec ia_ctime;
8279 struct file *ia_file;
8285 # 1 "include/linux/quota.h" 1
8286 # 44 "include/linux/quota.h"
8287 typedef __kernel_uid32_t qid_t;
8288 typedef __u64 qsize_t;
8290 extern spinlock_t dq_data_lock;
8291 # 105 "include/linux/quota.h"
8293 __u64 dqb_bhardlimit;
8294 __u64 dqb_bsoftlimit;
8296 __u64 dqb_ihardlimit;
8297 __u64 dqb_isoftlimit;
8298 __u64 dqb_curinodes;
8303 # 126 "include/linux/quota.h"
8315 # 1 "include/linux/dqblk_xfs.h" 1
8316 # 50 "include/linux/dqblk_xfs.h"
8317 typedef struct fs_disk_quota {
8322 __u64 d_blk_hardlimit;
8323 __u64 d_blk_softlimit;
8324 __u64 d_ino_hardlimit;
8325 __u64 d_ino_softlimit;
8334 __u64 d_rtb_hardlimit;
8335 __u64 d_rtb_softlimit;
8342 # 137 "include/linux/dqblk_xfs.h"
8343 typedef struct fs_qfilestat {
8349 typedef struct fs_quota_stat {
8353 fs_qfilestat_t qs_uquota;
8354 fs_qfilestat_t qs_gquota;
8356 __s32 qs_btimelimit;
8357 __s32 qs_itimelimit;
8358 __s32 qs_rtbtimelimit;
8359 __u16 qs_bwarnlimit;
8360 __u16 qs_iwarnlimit;
8362 # 138 "include/linux/quota.h" 2
8363 # 1 "include/linux/dqblk_v1.h" 1
8364 # 21 "include/linux/dqblk_v1.h"
8365 struct v1_mem_dqinfo {
8367 # 139 "include/linux/quota.h" 2
8368 # 1 "include/linux/dqblk_v2.h" 1
8369 # 20 "include/linux/dqblk_v2.h"
8370 struct v2_mem_dqinfo {
8371 unsigned int dqi_blocks;
8372 unsigned int dqi_free_blk;
8373 unsigned int dqi_free_entry;
8375 # 140 "include/linux/quota.h" 2
8376 # 151 "include/linux/quota.h"
8378 __u32 dqb_bhardlimit;
8379 __u32 dqb_bsoftlimit;
8380 qsize_t dqb_curspace;
8381 __u32 dqb_ihardlimit;
8382 __u32 dqb_isoftlimit;
8383 __u32 dqb_curinodes;
8391 struct quota_format_type;
8394 struct quota_format_type *dqi_format;
8395 struct list_head dqi_dirty_list;
8396 unsigned long dqi_flags;
8397 unsigned int dqi_bgrace;
8398 unsigned int dqi_igrace;
8400 struct v1_mem_dqinfo v1_i;
8401 struct v2_mem_dqinfo v2_i;
8411 extern void mark_info_dirty(struct super_block *sb, int type);
8425 int allocated_dquots;
8430 extern struct dqstats dqstats;
8431 # 213 "include/linux/quota.h"
8433 struct hlist_node dq_hash;
8434 struct list_head dq_inuse;
8435 struct list_head dq_free;
8436 struct list_head dq_dirty;
8437 struct mutex dq_lock;
8439 wait_queue_head_t dq_wait_unused;
8440 struct super_block *dq_sb;
8443 unsigned long dq_flags;
8445 struct mem_dqblk dq_dqb;
8454 struct quota_format_ops {
8455 int (*check_quota_file)(struct super_block *sb, int type);
8456 int (*read_file_info)(struct super_block *sb, int type);
8457 int (*write_file_info)(struct super_block *sb, int type);
8458 int (*free_file_info)(struct super_block *sb, int type);
8459 int (*read_dqblk)(struct dquot *dquot);
8460 int (*commit_dqblk)(struct dquot *dquot);
8461 int (*release_dqblk)(struct dquot *dquot);
8465 struct dquot_operations {
8466 int (*initialize) (struct inode *, int);
8467 int (*drop) (struct inode *);
8468 int (*alloc_space) (struct inode *, qsize_t, int);
8469 int (*alloc_inode) (const struct inode *, unsigned long);
8470 int (*free_space) (struct inode *, qsize_t);
8471 int (*free_inode) (const struct inode *, unsigned long);
8472 int (*transfer) (struct inode *, struct iattr *);
8473 int (*write_dquot) (struct dquot *);
8474 int (*acquire_dquot) (struct dquot *);
8475 int (*release_dquot) (struct dquot *);
8476 int (*mark_dirty) (struct dquot *);
8477 int (*write_info) (struct super_block *, int);
8481 struct quotactl_ops {
8482 int (*quota_on)(struct super_block *, int, int, char *);
8483 int (*quota_off)(struct super_block *, int);
8484 int (*quota_sync)(struct super_block *, int);
8485 int (*get_info)(struct super_block *, int, struct if_dqinfo *);
8486 int (*set_info)(struct super_block *, int, struct if_dqinfo *);
8487 int (*get_dqblk)(struct super_block *, int, qid_t, struct if_dqblk *);
8488 int (*set_dqblk)(struct super_block *, int, qid_t, struct if_dqblk *);
8489 int (*get_xstate)(struct super_block *, struct fs_quota_stat *);
8490 int (*set_xstate)(struct super_block *, unsigned int, int);
8491 int (*get_xquota)(struct super_block *, int, qid_t, struct fs_disk_quota *);
8492 int (*set_xquota)(struct super_block *, int, qid_t, struct fs_disk_quota *);
8495 struct quota_format_type {
8497 struct quota_format_ops *qf_ops;
8498 struct module *qf_owner;
8499 struct quota_format_type *qf_next;
8507 struct mutex dqio_mutex;
8508 struct mutex dqonoff_mutex;
8509 struct rw_semaphore dqptr_sem;
8510 struct inode *files[2];
8511 struct mem_dqinfo info[2];
8512 struct quota_format_ops *ops[2];
8516 int mark_dquot_dirty(struct dquot *dquot);
8517 # 307 "include/linux/quota.h"
8518 int register_quota_format(struct quota_format_type *fmt);
8519 void unregister_quota_format(struct quota_format_type *fmt);
8521 struct quota_module_name {
8525 # 357 "include/linux/fs.h" 2
8526 # 384 "include/linux/fs.h"
8527 enum positive_aop_returns {
8528 AOP_WRITEPAGE_ACTIVATE = 0x80000,
8529 AOP_TRUNCATED_PAGE = 0x80001,
8536 struct address_space;
8537 struct writeback_control;
8539 struct address_space_operations {
8540 int (*writepage)(struct page *page, struct writeback_control *wbc);
8541 int (*readpage)(struct file *, struct page *);
8542 void (*sync_page)(struct page *);
8545 int (*writepages)(struct address_space *, struct writeback_control *);
8548 int (*set_page_dirty)(struct page *page);
8550 int (*readpages)(struct file *filp, struct address_space *mapping,
8551 struct list_head *pages, unsigned nr_pages);
8557 int (*prepare_write)(struct file *, struct page *, unsigned, unsigned);
8558 int (*commit_write)(struct file *, struct page *, unsigned, unsigned);
8560 sector_t (*bmap)(struct address_space *, sector_t);
8561 void (*invalidatepage) (struct page *, unsigned long);
8562 int (*releasepage) (struct page *, gfp_t);
8563 ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
8564 loff_t offset, unsigned long nr_segs);
8565 struct page* (*get_xip_page)(struct address_space *, sector_t,
8568 int (*migratepage) (struct address_space *,
8569 struct page *, struct page *);
8572 struct backing_dev_info;
8573 struct address_space {
8575 struct radix_tree_root page_tree;
8577 unsigned int i_mmap_writable;
8578 struct prio_tree_root i_mmap;
8579 struct list_head i_mmap_nonlinear;
8580 spinlock_t i_mmap_lock;
8581 unsigned int truncate_count;
8582 unsigned long nrpages;
8583 unsigned long writeback_index;
8584 const struct address_space_operations *a_ops;
8585 unsigned long flags;
8586 struct backing_dev_info *backing_dev_info;
8587 spinlock_t private_lock;
8588 struct list_head private_list;
8589 struct address_space *assoc_mapping;
8594 } __attribute__((aligned(sizeof(long))));
8601 struct block_device {
8603 struct inode * bd_inode;
8605 struct mutex bd_mutex;
8606 struct mutex bd_mount_mutex;
8607 struct list_head bd_inodes;
8611 struct list_head bd_holder_list;
8613 struct block_device * bd_contains;
8614 unsigned bd_block_size;
8615 struct hd_struct * bd_part;
8617 unsigned bd_part_count;
8619 struct gendisk * bd_disk;
8620 struct list_head bd_list;
8621 struct backing_dev_info *bd_inode_backing_dev_info;
8628 unsigned long bd_private;
8630 # 495 "include/linux/fs.h"
8631 enum bdev_bd_mutex_lock_class
8637 # 510 "include/linux/fs.h"
8638 int mapping_tagged(struct address_space *mapping, int tag);
8643 static inline __attribute__((always_inline)) int mapping_mapped(struct address_space *mapping)
8645 return !prio_tree_empty(&mapping->i_mmap) ||
8646 !list_empty(&mapping->i_mmap_nonlinear);
8655 static inline __attribute__((always_inline)) int mapping_writably_mapped(struct address_space *mapping)
8657 return mapping->i_mmap_writable != 0;
8659 # 543 "include/linux/fs.h"
8661 struct hlist_node i_hash;
8662 struct list_head i_list;
8663 struct list_head i_sb_list;
8664 struct list_head i_dentry;
8665 unsigned long i_ino;
8668 unsigned int i_nlink;
8673 struct timespec i_atime;
8674 struct timespec i_mtime;
8675 struct timespec i_ctime;
8676 unsigned int i_blkbits;
8677 unsigned long i_version;
8679 unsigned short i_bytes;
8681 struct mutex i_mutex;
8682 struct rw_semaphore i_alloc_sem;
8683 struct inode_operations *i_op;
8684 const struct file_operations *i_fop;
8685 struct super_block *i_sb;
8686 struct file_lock *i_flock;
8687 struct address_space *i_mapping;
8688 struct address_space i_data;
8692 struct list_head i_devices;
8694 struct pipe_inode_info *i_pipe;
8695 struct block_device *i_bdev;
8696 struct cdev *i_cdev;
8701 # 595 "include/linux/fs.h"
8702 unsigned long i_state;
8703 unsigned long dirtied_when;
8705 unsigned int i_flags;
8707 atomic_t i_writecount;
8716 # 621 "include/linux/fs.h"
8717 enum inode_i_mutex_lock_class
8726 extern void inode_double_lock(struct inode *inode1, struct inode *inode2);
8727 extern void inode_double_unlock(struct inode *inode1, struct inode *inode2);
8728 # 643 "include/linux/fs.h"
8729 static inline __attribute__((always_inline)) loff_t i_size_read(struct inode *inode)
8731 # 662 "include/linux/fs.h"
8732 return inode->i_size;
8741 static inline __attribute__((always_inline)) void i_size_write(struct inode *inode, loff_t i_size)
8743 # 682 "include/linux/fs.h"
8744 inode->i_size = i_size;
8748 static inline __attribute__((always_inline)) unsigned iminor(struct inode *inode)
8750 return ((unsigned int) ((inode->i_rdev) & ((1U << 20) - 1)));
8753 static inline __attribute__((always_inline)) unsigned imajor(struct inode *inode)
8755 return ((unsigned int) ((inode->i_rdev) >> 20));
8758 extern struct block_device *I_BDEV(struct inode *inode);
8760 struct fown_struct {
8763 enum pid_type pid_type;
8771 struct file_ra_state {
8772 unsigned long start;
8774 unsigned long flags;
8775 unsigned long cache_hit;
8776 unsigned long prev_page;
8777 unsigned long ahead_start;
8778 unsigned long ahead_size;
8779 unsigned long ra_pages;
8780 unsigned long mmap_hit;
8781 unsigned long mmap_miss;
8792 struct list_head fu_list;
8793 struct rcu_head fu_rcuhead;
8795 struct dentry *f_dentry;
8796 struct vfsmount *f_vfsmnt;
8797 const struct file_operations *f_op;
8799 unsigned int f_flags;
8802 struct fown_struct f_owner;
8803 unsigned int f_uid, f_gid;
8804 struct file_ra_state f_ra;
8806 unsigned long f_version;
8815 struct list_head f_ep_links;
8816 spinlock_t f_ep_lock;
8818 struct address_space *f_mapping;
8820 extern spinlock_t files_lock;
8821 # 790 "include/linux/fs.h"
8822 typedef struct files_struct *fl_owner_t;
8824 struct file_lock_operations {
8825 void (*fl_insert)(struct file_lock *);
8826 void (*fl_remove)(struct file_lock *);
8827 void (*fl_copy_lock)(struct file_lock *, struct file_lock *);
8828 void (*fl_release_private)(struct file_lock *);
8831 struct lock_manager_operations {
8832 int (*fl_compare_owner)(struct file_lock *, struct file_lock *);
8833 void (*fl_notify)(struct file_lock *);
8834 void (*fl_copy_lock)(struct file_lock *, struct file_lock *);
8835 void (*fl_release_private)(struct file_lock *);
8836 void (*fl_break)(struct file_lock *);
8837 int (*fl_mylease)(struct file_lock *, struct file_lock *);
8838 int (*fl_change)(struct file_lock **, int);
8842 # 1 "include/linux/nfs_fs_i.h" 1
8848 # 1 "include/linux/nfs.h" 1
8849 # 39 "include/linux/nfs.h"
8868 NFSERR_OPNOTSUPP = 45,
8869 NFSERR_NAMETOOLONG = 63,
8870 NFSERR_NOTEMPTY = 66,
8875 NFSERR_BADHANDLE = 10001,
8876 NFSERR_NOT_SYNC = 10002,
8877 NFSERR_BAD_COOKIE = 10003,
8878 NFSERR_NOTSUPP = 10004,
8879 NFSERR_TOOSMALL = 10005,
8880 NFSERR_SERVERFAULT = 10006,
8881 NFSERR_BADTYPE = 10007,
8882 NFSERR_JUKEBOX = 10008,
8883 NFSERR_SAME = 10009,
8884 NFSERR_DENIED = 10010,
8885 NFSERR_EXPIRED = 10011,
8886 NFSERR_LOCKED = 10012,
8887 NFSERR_GRACE = 10013,
8888 NFSERR_FHEXPIRED = 10014,
8889 NFSERR_SHARE_DENIED = 10015,
8890 NFSERR_WRONGSEC = 10016,
8891 NFSERR_CLID_INUSE = 10017,
8892 NFSERR_RESOURCE = 10018,
8893 NFSERR_MOVED = 10019,
8894 NFSERR_NOFILEHANDLE = 10020,
8895 NFSERR_MINOR_VERS_MISMATCH = 10021,
8896 NFSERR_STALE_CLIENTID = 10022,
8897 NFSERR_STALE_STATEID = 10023,
8898 NFSERR_OLD_STATEID = 10024,
8899 NFSERR_BAD_STATEID = 10025,
8900 NFSERR_BAD_SEQID = 10026,
8901 NFSERR_NOT_SAME = 10027,
8902 NFSERR_LOCK_RANGE = 10028,
8903 NFSERR_SYMLINK = 10029,
8904 NFSERR_RESTOREFH = 10030,
8905 NFSERR_LEASE_MOVED = 10031,
8906 NFSERR_ATTRNOTSUPP = 10032,
8907 NFSERR_NO_GRACE = 10033,
8908 NFSERR_RECLAIM_BAD = 10034,
8909 NFSERR_RECLAIM_CONFLICT = 10035,
8910 NFSERR_BAD_XDR = 10036,
8911 NFSERR_LOCKS_HELD = 10037,
8912 NFSERR_OPENMODE = 10038,
8913 NFSERR_BADOWNER = 10039,
8914 NFSERR_BADCHAR = 10040,
8915 NFSERR_BADNAME = 10041,
8916 NFSERR_BAD_RANGE = 10042,
8917 NFSERR_LOCK_NOTSUPP = 10043,
8918 NFSERR_OP_ILLEGAL = 10044,
8919 NFSERR_DEADLOCK = 10045,
8920 NFSERR_FILE_OPEN = 10046,
8921 NFSERR_ADMIN_REVOKED = 10047,
8922 NFSERR_CB_PATH_DOWN = 10048,
8923 NFSERR_REPLAY_ME = 10049
8941 # 1 "include/linux/sunrpc/msg_prot.h" 1
8942 # 18 "include/linux/sunrpc/msg_prot.h"
8943 typedef u32 rpc_authflavor_t;
8945 enum rpc_auth_flavors {
8952 RPC_AUTH_MAXFLAVOR = 8,
8954 RPC_AUTH_GSS_KRB5 = 390003,
8955 RPC_AUTH_GSS_KRB5I = 390004,
8956 RPC_AUTH_GSS_KRB5P = 390005,
8957 RPC_AUTH_GSS_LKEY = 390006,
8958 RPC_AUTH_GSS_LKEYI = 390007,
8959 RPC_AUTH_GSS_LKEYP = 390008,
8960 RPC_AUTH_GSS_SPKM = 390009,
8961 RPC_AUTH_GSS_SPKMI = 390010,
8962 RPC_AUTH_GSS_SPKMP = 390011,
8973 enum rpc_reply_stat {
8974 RPC_MSG_ACCEPTED = 0,
8978 enum rpc_accept_stat {
8980 RPC_PROG_UNAVAIL = 1,
8981 RPC_PROG_MISMATCH = 2,
8982 RPC_PROC_UNAVAIL = 3,
8983 RPC_GARBAGE_ARGS = 4,
8986 RPC_DROP_REPLY = 60000,
8989 enum rpc_reject_stat {
8994 enum rpc_auth_stat {
8996 RPC_AUTH_BADCRED = 1,
8997 RPC_AUTH_REJECTEDCRED = 2,
8998 RPC_AUTH_BADVERF = 3,
8999 RPC_AUTH_REJECTEDVERF = 4,
9000 RPC_AUTH_TOOWEAK = 5,
9002 RPCSEC_GSS_CREDPROBLEM = 13,
9003 RPCSEC_GSS_CTXPROBLEM = 14
9005 # 106 "include/linux/sunrpc/msg_prot.h"
9006 typedef __be32 rpc_fraghdr;
9007 # 131 "include/linux/nfs.h" 2
9015 unsigned short size;
9016 unsigned char data[128];
9023 static inline __attribute__((always_inline)) int nfs_compare_fh(const struct nfs_fh *a, const struct nfs_fh *b)
9025 return a->size != b->size || memcmp(a->data, b->data, a->size) != 0;
9028 static inline __attribute__((always_inline)) void nfs_copy_fh(struct nfs_fh *target, const struct nfs_fh *source)
9030 target->size = source->size;
9031 memcpy(target->data, source->data, source->size);
9033 # 165 "include/linux/nfs.h"
9034 enum nfs3_stable_how {
9039 # 7 "include/linux/nfs_fs_i.h" 2
9041 struct nlm_lockowner;
9046 struct nfs_lock_info {
9048 struct nlm_lockowner *owner;
9049 struct list_head list;
9052 struct nfs4_lock_state;
9053 struct nfs4_lock_info {
9054 struct nfs4_lock_state *owner;
9056 # 811 "include/linux/fs.h" 2
9059 struct file_lock *fl_next;
9060 struct list_head fl_link;
9061 struct list_head fl_block;
9062 fl_owner_t fl_owner;
9063 unsigned int fl_pid;
9064 wait_queue_head_t fl_wait;
9065 struct file *fl_file;
9066 unsigned char fl_flags;
9067 unsigned char fl_type;
9071 struct fasync_struct * fl_fasync;
9072 unsigned long fl_break_time;
9074 struct file_lock_operations *fl_ops;
9075 struct lock_manager_operations *fl_lmops;
9077 struct nfs_lock_info nfs_fl;
9078 struct nfs4_lock_info nfs4_fl;
9081 # 843 "include/linux/fs.h"
9082 # 1 "include/linux/fcntl.h" 1
9086 # 1 "include/asm/fcntl.h" 1
9087 # 11 "include/asm/fcntl.h"
9088 # 1 "include/asm-generic/fcntl.h" 1
9089 # 114 "include/asm-generic/fcntl.h"
9098 # 137 "include/asm-generic/fcntl.h"
9107 # 12 "include/asm/fcntl.h" 2
9108 # 5 "include/linux/fcntl.h" 2
9109 # 844 "include/linux/fs.h" 2
9111 extern int fcntl_getlk(struct file *, struct flock *);
9112 extern int fcntl_setlk(unsigned int, struct file *, unsigned int,
9116 extern int fcntl_getlk64(struct file *, struct flock64 *);
9117 extern int fcntl_setlk64(unsigned int, struct file *, unsigned int,
9121 extern void send_sigio(struct fown_struct *fown, int fd, int band);
9122 extern int fcntl_setlease(unsigned int fd, struct file *filp, long arg);
9123 extern int fcntl_getlease(struct file *filp);
9126 extern int do_sync_file_range(struct file *file, loff_t offset, loff_t endbyte,
9127 unsigned int flags);
9130 extern void locks_init_lock(struct file_lock *);
9131 extern void locks_copy_lock(struct file_lock *, struct file_lock *);
9132 extern void locks_remove_posix(struct file *, fl_owner_t);
9133 extern void locks_remove_flock(struct file *);
9134 extern int posix_test_lock(struct file *, struct file_lock *, struct file_lock *);
9135 extern int posix_lock_file_conf(struct file *, struct file_lock *, struct file_lock *);
9136 extern int posix_lock_file(struct file *, struct file_lock *);
9137 extern int posix_lock_file_wait(struct file *, struct file_lock *);
9138 extern int posix_unblock_lock(struct file *, struct file_lock *);
9139 extern int flock_lock_file_wait(struct file *filp, struct file_lock *fl);
9140 extern int __break_lease(struct inode *inode, unsigned int flags);
9141 extern void lease_get_mtime(struct inode *, struct timespec *time);
9142 extern int setlease(struct file *, long, struct file_lock **);
9143 extern int lease_modify(struct file_lock **, int);
9144 extern int lock_may_read(struct inode *, loff_t start, unsigned long count);
9145 extern int lock_may_write(struct inode *, loff_t start, unsigned long count);
9147 struct fasync_struct {
9150 struct fasync_struct *fa_next;
9151 struct file *fa_file;
9157 extern int fasync_helper(int, struct file *, int, struct fasync_struct **);
9159 extern void kill_fasync(struct fasync_struct **, int, int);
9161 extern void __kill_fasync(struct fasync_struct *, int, int);
9163 extern int __f_setown(struct file *filp, struct pid *, enum pid_type, int force);
9164 extern int f_setown(struct file *filp, unsigned long arg, int force);
9165 extern void f_delown(struct file *filp);
9166 extern pid_t f_getown(struct file *filp);
9167 extern int send_sigurg(struct fown_struct *fown);
9168 # 911 "include/linux/fs.h"
9169 extern struct list_head super_blocks;
9170 extern spinlock_t sb_lock;
9174 struct super_block {
9175 struct list_head s_list;
9177 unsigned long s_blocksize;
9178 unsigned char s_blocksize_bits;
9179 unsigned char s_dirt;
9180 unsigned long long s_maxbytes;
9181 struct file_system_type *s_type;
9182 struct super_operations *s_op;
9183 struct dquot_operations *dq_op;
9184 struct quotactl_ops *s_qcop;
9185 struct export_operations *s_export_op;
9186 unsigned long s_flags;
9187 unsigned long s_magic;
9188 struct dentry *s_root;
9189 struct rw_semaphore s_umount;
9190 struct mutex s_lock;
9198 struct xattr_handler **s_xattr;
9200 struct list_head s_inodes;
9201 struct list_head s_dirty;
9202 struct list_head s_io;
9203 struct hlist_head s_anon;
9204 struct list_head s_files;
9206 struct block_device *s_bdev;
9207 struct list_head s_instances;
9208 struct quota_info s_dquot;
9211 wait_queue_head_t s_wait_unfrozen;
9221 struct mutex s_vfs_rename_mutex;
9228 extern struct timespec current_fs_time(struct super_block *sb);
9235 SB_FREEZE_WRITE = 1,
9236 SB_FREEZE_TRANS = 2,
9242 static inline __attribute__((always_inline)) void get_fs_excl(void)
9244 atomic_inc(&(get_current())->fs_excl);
9247 static inline __attribute__((always_inline)) void put_fs_excl(void)
9249 atomic_dec(&(get_current())->fs_excl);
9252 static inline __attribute__((always_inline)) int has_fs_excl(void)
9254 return ((&(get_current())->fs_excl)->counter);
9261 static inline __attribute__((always_inline)) void lock_super(struct super_block * sb)
9264 mutex_lock(&sb->s_lock);
9267 static inline __attribute__((always_inline)) void unlock_super(struct super_block * sb)
9270 mutex_unlock(&sb->s_lock);
9276 extern int vfs_permission(struct nameidata *, int);
9277 extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *);
9278 extern int vfs_mkdir(struct inode *, struct dentry *, int);
9279 extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t);
9280 extern int vfs_symlink(struct inode *, struct dentry *, const char *, int);
9281 extern int vfs_link(struct dentry *, struct inode *, struct dentry *);
9282 extern int vfs_rmdir(struct inode *, struct dentry *);
9283 extern int vfs_unlink(struct inode *, struct dentry *);
9284 extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *);
9289 extern void dentry_unhash(struct dentry *dentry);
9294 extern int file_permission(struct file *, int);
9295 # 1057 "include/linux/fs.h"
9296 int generic_osync_inode(struct inode *, struct address_space *, int);
9304 typedef int (*filldir_t)(void *, const char *, int, loff_t, u64, unsigned);
9306 struct block_device_operations {
9307 int (*open) (struct inode *, struct file *);
9308 int (*release) (struct inode *, struct file *);
9309 int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long);
9310 long (*unlocked_ioctl) (struct file *, unsigned, unsigned long);
9311 long (*compat_ioctl) (struct file *, unsigned, unsigned long);
9312 int (*direct_access) (struct block_device *, sector_t, unsigned long *);
9313 int (*media_changed) (struct gendisk *);
9314 int (*revalidate_disk) (struct gendisk *);
9315 int (*getgeo)(struct block_device *, struct hd_geometry *);
9316 struct module *owner;
9318 # 1089 "include/linux/fs.h"
9327 } read_descriptor_t;
9329 typedef int (*read_actor_t)(read_descriptor_t *, struct page *, unsigned long, unsigned long);
9330 # 1112 "include/linux/fs.h"
9331 struct file_operations {
9332 struct module *owner;
9333 loff_t (*llseek) (struct file *, loff_t, int);
9334 ssize_t (*read) (struct file *, char *, size_t, loff_t *);
9335 ssize_t (*write) (struct file *, const char *, size_t, loff_t *);
9336 ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
9337 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
9338 int (*readdir) (struct file *, void *, filldir_t);
9339 unsigned int (*poll) (struct file *, struct poll_table_struct *);
9340 int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long);
9341 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
9342 long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
9343 int (*mmap) (struct file *, struct vm_area_struct *);
9344 int (*open) (struct inode *, struct file *);
9345 int (*flush) (struct file *, fl_owner_t id);
9346 int (*release) (struct inode *, struct file *);
9347 int (*fsync) (struct file *, struct dentry *, int datasync);
9348 int (*aio_fsync) (struct kiocb *, int datasync);
9349 int (*fasync) (int, struct file *, int);
9350 int (*lock) (struct file *, int, struct file_lock *);
9351 ssize_t (*sendfile) (struct file *, loff_t *, size_t, read_actor_t, void *);
9352 ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int);
9353 unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
9354 int (*check_flags)(int);
9355 int (*dir_notify)(struct file *filp, unsigned long arg);
9356 int (*flock) (struct file *, int, struct file_lock *);
9357 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
9358 ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
9361 struct inode_operations {
9362 int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
9363 struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *);
9364 int (*link) (struct dentry *,struct inode *,struct dentry *);
9365 int (*unlink) (struct inode *,struct dentry *);
9366 int (*symlink) (struct inode *,struct dentry *,const char *);
9367 int (*mkdir) (struct inode *,struct dentry *,int);
9368 int (*rmdir) (struct inode *,struct dentry *);
9369 int (*mknod) (struct inode *,struct dentry *,int,dev_t);
9370 int (*rename) (struct inode *, struct dentry *,
9371 struct inode *, struct dentry *);
9372 int (*readlink) (struct dentry *, char *,int);
9373 void * (*follow_link) (struct dentry *, struct nameidata *);
9374 void (*put_link) (struct dentry *, struct nameidata *, void *);
9375 void (*truncate) (struct inode *);
9376 int (*permission) (struct inode *, int, struct nameidata *);
9377 int (*setattr) (struct dentry *, struct iattr *);
9378 int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
9379 int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
9380 ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
9381 ssize_t (*listxattr) (struct dentry *, char *, size_t);
9382 int (*removexattr) (struct dentry *, const char *);
9383 void (*truncate_range)(struct inode *, loff_t, loff_t);
9388 ssize_t rw_copy_check_uvector(int type, const struct iovec * uvector,
9389 unsigned long nr_segs, unsigned long fast_segs,
9390 struct iovec *fast_pointer,
9391 struct iovec **ret_pointer);
9393 extern ssize_t vfs_read(struct file *, char *, size_t, loff_t *);
9394 extern ssize_t vfs_write(struct file *, const char *, size_t, loff_t *);
9395 extern ssize_t vfs_readv(struct file *, const struct iovec *,
9396 unsigned long, loff_t *);
9397 extern ssize_t vfs_writev(struct file *, const struct iovec *,
9398 unsigned long, loff_t *);
9404 struct super_operations {
9405 struct inode *(*alloc_inode)(struct super_block *sb);
9406 void (*destroy_inode)(struct inode *);
9408 void (*read_inode) (struct inode *);
9410 void (*dirty_inode) (struct inode *);
9411 int (*write_inode) (struct inode *, int);
9412 void (*put_inode) (struct inode *);
9413 void (*drop_inode) (struct inode *);
9414 void (*delete_inode) (struct inode *);
9415 void (*put_super) (struct super_block *);
9416 void (*write_super) (struct super_block *);
9417 int (*sync_fs)(struct super_block *sb, int wait);
9418 void (*write_super_lockfs) (struct super_block *);
9419 void (*unlockfs) (struct super_block *);
9420 int (*statfs) (struct dentry *, struct kstatfs *);
9421 int (*remount_fs) (struct super_block *, int *, char *);
9422 void (*clear_inode) (struct inode *);
9423 void (*umount_begin) (struct vfsmount *, int);
9425 int (*show_options)(struct seq_file *, struct vfsmount *);
9426 int (*show_stats)(struct seq_file *, struct vfsmount *);
9432 # 1227 "include/linux/fs.h"
9433 extern void __mark_inode_dirty(struct inode *, int);
9434 static inline __attribute__((always_inline)) void mark_inode_dirty(struct inode *inode)
9436 __mark_inode_dirty(inode, (1 | 2 | 4));
9439 static inline __attribute__((always_inline)) void mark_inode_dirty_sync(struct inode *inode)
9441 __mark_inode_dirty(inode, 1);
9444 static inline __attribute__((always_inline)) void inc_nlink(struct inode *inode)
9449 static inline __attribute__((always_inline)) void inode_inc_link_count(struct inode *inode)
9452 mark_inode_dirty(inode);
9455 static inline __attribute__((always_inline)) void drop_nlink(struct inode *inode)
9460 static inline __attribute__((always_inline)) void clear_nlink(struct inode *inode)
9465 static inline __attribute__((always_inline)) void inode_dec_link_count(struct inode *inode)
9468 mark_inode_dirty(inode);
9471 extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry);
9472 static inline __attribute__((always_inline)) void file_accessed(struct file *file)
9474 if (!(file->f_flags & 01000000))
9475 touch_atime(file->f_vfsmnt, file->f_dentry);
9478 int sync_inode(struct inode *inode, struct writeback_control *wbc);
9479 # 1360 "include/linux/fs.h"
9480 struct export_operations {
9481 struct dentry *(*decode_fh)(struct super_block *sb, __u32 *fh, int fh_len, int fh_type,
9482 int (*acceptable)(void *context, struct dentry *de),
9484 int (*encode_fh)(struct dentry *de, __u32 *fh, int *max_len,
9488 int (*get_name)(struct dentry *parent, char *name,
9489 struct dentry *child);
9490 struct dentry * (*get_parent)(struct dentry *child);
9491 struct dentry * (*get_dentry)(struct super_block *sb, void *inump);
9494 struct dentry * (*find_exported_dentry)(
9495 struct super_block *sb, void *obj, void *parent,
9496 int (*acceptable)(void *context, struct dentry *de),
9502 extern struct dentry *
9503 find_exported_dentry(struct super_block *sb, void *obj, void *parent,
9504 int (*acceptable)(void *context, struct dentry *de),
9507 struct file_system_type {
9510 int (*get_sb) (struct file_system_type *, int,
9511 const char *, void *, struct vfsmount *);
9512 void (*kill_sb) (struct super_block *);
9513 struct module *owner;
9514 struct file_system_type * next;
9515 struct list_head fs_supers;
9516 struct lock_class_key s_lock_key;
9517 struct lock_class_key s_umount_key;
9520 extern int get_sb_bdev(struct file_system_type *fs_type,
9521 int flags, const char *dev_name, void *data,
9522 int (*fill_super)(struct super_block *, void *, int),
9523 struct vfsmount *mnt);
9524 extern int get_sb_single(struct file_system_type *fs_type,
9525 int flags, void *data,
9526 int (*fill_super)(struct super_block *, void *, int),
9527 struct vfsmount *mnt);
9528 extern int get_sb_nodev(struct file_system_type *fs_type,
9529 int flags, void *data,
9530 int (*fill_super)(struct super_block *, void *, int),
9531 struct vfsmount *mnt);
9532 void generic_shutdown_super(struct super_block *sb);
9533 void kill_block_super(struct super_block *sb);
9534 void kill_anon_super(struct super_block *sb);
9535 void kill_litter_super(struct super_block *sb);
9536 void deactivate_super(struct super_block *sb);
9537 int set_anon_super(struct super_block *s, void *data);
9538 struct super_block *sget(struct file_system_type *type,
9539 int (*test)(struct super_block *,void *),
9540 int (*set)(struct super_block *,void *),
9542 extern int get_sb_pseudo(struct file_system_type *, char *,
9543 struct super_operations *ops, unsigned long,
9544 struct vfsmount *mnt);
9545 extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb);
9546 int __put_super(struct super_block *sb);
9547 int __put_super_and_need_restart(struct super_block *sb);
9548 void unnamed_dev_init(void);
9556 extern int register_filesystem(struct file_system_type *);
9557 extern int unregister_filesystem(struct file_system_type *);
9558 extern struct vfsmount *kern_mount(struct file_system_type *);
9559 extern int may_umount_tree(struct vfsmount *);
9560 extern int may_umount(struct vfsmount *);
9561 extern void umount_tree(struct vfsmount *, int, struct list_head *);
9562 extern void release_mounts(struct list_head *);
9563 extern long do_mount(char *, char *, char *, unsigned long, void *);
9564 extern struct vfsmount *copy_tree(struct vfsmount *, struct dentry *, int);
9565 extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *,
9568 extern int vfs_statfs(struct dentry *, struct kstatfs *);
9571 extern struct subsystem fs_subsys;
9576 extern int locks_mandatory_locked(struct inode *);
9577 extern int locks_mandatory_area(int, struct inode *, struct file *, loff_t, size_t);
9578 # 1466 "include/linux/fs.h"
9579 static inline __attribute__((always_inline)) int locks_verify_locked(struct inode *inode)
9581 if ((((inode)->i_sb->s_flags & (64)) && ((inode)->i_mode & (0002000 | 00010)) == 0002000))
9582 return locks_mandatory_locked(inode);
9586 extern int rw_verify_area(int, struct file *, loff_t *, size_t);
9588 static inline __attribute__((always_inline)) int locks_verify_truncate(struct inode *inode,
9592 if (inode->i_flock && (((inode)->i_sb->s_flags & (64)) && ((inode)->i_mode & (0002000 | 00010)) == 0002000))
9593 return locks_mandatory_area(
9595 size < inode->i_size ? size : inode->i_size,
9596 (size < inode->i_size ? inode->i_size - size
9597 : size - inode->i_size)
9602 static inline __attribute__((always_inline)) int break_lease(struct inode *inode, unsigned int mode)
9605 return __break_lease(inode, mode);
9611 extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs,
9613 extern long do_sys_open(int fdf, const char *filename, int flags,
9615 extern struct file *filp_open(const char *, int, int);
9616 extern struct file * dentry_open(struct dentry *, struct vfsmount *, int);
9617 extern int filp_close(struct file *, fl_owner_t id);
9618 extern char * getname(const char *);
9621 extern void __attribute__ ((__section__ (".init.text"))) vfs_caches_init_early(void);
9622 extern void __attribute__ ((__section__ (".init.text"))) vfs_caches_init(unsigned long);
9623 # 1520 "include/linux/fs.h"
9624 extern int register_blkdev(unsigned int, const char *);
9625 extern int unregister_blkdev(unsigned int, const char *);
9626 extern struct block_device *bdget(dev_t);
9627 extern void bd_set_size(struct block_device *, loff_t size);
9628 extern void bd_forget(struct inode *inode);
9629 extern void bdput(struct block_device *);
9630 extern struct block_device *open_by_devnum(dev_t, unsigned);
9631 extern struct block_device *open_partition_by_devnum(dev_t, unsigned);
9632 extern const struct address_space_operations def_blk_aops;
9636 extern const struct file_operations def_blk_fops;
9637 extern const struct file_operations def_chr_fops;
9638 extern const struct file_operations bad_sock_fops;
9639 extern const struct file_operations def_fifo_fops;
9641 extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long);
9642 extern int blkdev_ioctl(struct inode *, struct file *, unsigned, unsigned long);
9643 extern int blkdev_driver_ioctl(struct inode *inode, struct file *file,
9644 struct gendisk *disk, unsigned cmd,
9646 extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long);
9647 extern int blkdev_get(struct block_device *, mode_t, unsigned);
9648 extern int blkdev_put(struct block_device *);
9649 extern int blkdev_put_partition(struct block_device *);
9650 extern int bd_claim(struct block_device *, void *);
9651 extern void bd_release(struct block_device *);
9653 extern int bd_claim_by_disk(struct block_device *, void *, struct gendisk *);
9654 extern void bd_release_from_disk(struct block_device *, struct gendisk *);
9655 # 1559 "include/linux/fs.h"
9656 extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *);
9657 extern int register_chrdev_region(dev_t, unsigned, const char *);
9658 extern int register_chrdev(unsigned int, const char *,
9659 const struct file_operations *);
9660 extern int unregister_chrdev(unsigned int, const char *);
9661 extern void unregister_chrdev_region(dev_t, unsigned);
9662 extern int chrdev_open(struct inode *, struct file *);
9663 extern void chrdev_show(struct seq_file *,off_t);
9670 extern const char *__bdevname(dev_t, char *buffer);
9671 extern const char *bdevname(struct block_device *bdev, char *buffer);
9672 extern struct block_device *lookup_bdev(const char *);
9673 extern struct block_device *open_bdev_excl(const char *, int, void *);
9674 extern void close_bdev_excl(struct block_device *);
9675 extern void blkdev_show(struct seq_file *,off_t);
9680 extern void init_special_inode(struct inode *, umode_t, dev_t);
9683 extern void make_bad_inode(struct inode *);
9684 extern int is_bad_inode(struct inode *);
9686 extern const struct file_operations read_fifo_fops;
9687 extern const struct file_operations write_fifo_fops;
9688 extern const struct file_operations rdwr_fifo_fops;
9690 extern int fs_may_remount_ro(struct super_block *);
9691 # 1606 "include/linux/fs.h"
9692 extern int check_disk_change(struct block_device *);
9693 extern int __invalidate_device(struct block_device *);
9694 extern int invalidate_partition(struct gendisk *, int);
9696 extern int invalidate_inodes(struct super_block *);
9697 unsigned long invalidate_mapping_pages(struct address_space *mapping,
9698 unsigned long start, unsigned long end);
9699 unsigned long invalidate_inode_pages(struct address_space *mapping);
9700 static inline __attribute__((always_inline)) void invalidate_remote_inode(struct inode *inode)
9702 if ((((inode->i_mode) & 00170000) == 0100000) || (((inode->i_mode) & 00170000) == 0040000) ||
9703 (((inode->i_mode) & 00170000) == 0120000))
9704 invalidate_inode_pages(inode->i_mapping);
9706 extern int invalidate_inode_pages2(struct address_space *mapping);
9707 extern int invalidate_inode_pages2_range(struct address_space *mapping,
9708 unsigned long start, unsigned long end);
9709 extern int write_inode_now(struct inode *, int);
9710 extern int filemap_fdatawrite(struct address_space *);
9711 extern int filemap_flush(struct address_space *);
9712 extern int filemap_fdatawait(struct address_space *);
9713 extern int filemap_write_and_wait(struct address_space *mapping);
9714 extern int filemap_write_and_wait_range(struct address_space *mapping,
9715 loff_t lstart, loff_t lend);
9716 extern int wait_on_page_writeback_range(struct address_space *mapping,
9717 unsigned long start, unsigned long end);
9718 extern int __filemap_fdatawrite_range(struct address_space *mapping,
9719 loff_t start, loff_t end, int sync_mode);
9721 extern long do_fsync(struct file *file, int datasync);
9722 extern void sync_supers(void);
9723 extern void sync_filesystems(int wait);
9724 extern void __fsync_super(struct super_block *sb);
9725 extern void emergency_sync(void);
9726 extern void emergency_remount(void);
9727 extern int do_remount_sb(struct super_block *sb, int flags,
9728 void *data, int force);
9730 extern sector_t bmap(struct inode *, sector_t);
9732 extern int notify_change(struct dentry *, struct iattr *);
9733 extern int permission(struct inode *, int, struct nameidata *);
9734 extern int generic_permission(struct inode *, int,
9735 int (*check_acl)(struct inode *, int));
9737 extern int get_write_access(struct inode *);
9738 extern int deny_write_access(struct file *);
9739 static inline __attribute__((always_inline)) void put_write_access(struct inode * inode)
9741 atomic_dec(&inode->i_writecount);
9743 static inline __attribute__((always_inline)) void allow_write_access(struct file *file)
9746 atomic_inc(&file->f_dentry->d_inode->i_writecount);
9748 extern int do_pipe(int *);
9749 extern struct file *create_read_pipe(struct file *f);
9750 extern struct file *create_write_pipe(void);
9751 extern void free_write_pipe(struct file *);
9753 extern int open_namei(int dfd, const char *, int, int, struct nameidata *);
9754 extern int may_open(struct nameidata *, int, int);
9756 extern int kernel_read(struct file *, unsigned long, char *, unsigned long);
9757 extern struct file * open_exec(const char *);
9760 extern int is_subdir(struct dentry *, struct dentry *);
9761 extern ino_t find_inode_number(struct dentry *, struct qstr *);
9763 # 1 "include/linux/err.h" 1
9764 # 22 "include/linux/err.h"
9765 static inline __attribute__((always_inline)) void *ERR_PTR(long error)
9767 return (void *) error;
9770 static inline __attribute__((always_inline)) long PTR_ERR(const void *ptr)
9775 static inline __attribute__((always_inline)) long IS_ERR(const void *ptr)
9777 return __builtin_expect(!!(((unsigned long)ptr) >= (unsigned long)-4095), 0);
9779 # 1678 "include/linux/fs.h" 2
9782 extern loff_t default_llseek(struct file *file, loff_t offset, int origin);
9784 extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin);
9786 extern void inode_init_once(struct inode *);
9787 extern void iput(struct inode *);
9788 extern struct inode * igrab(struct inode *);
9789 extern ino_t iunique(struct super_block *, ino_t);
9790 extern int inode_needs_sync(struct inode *inode);
9791 extern void generic_delete_inode(struct inode *inode);
9792 extern void generic_drop_inode(struct inode *inode);
9794 extern struct inode *ilookup5_nowait(struct super_block *sb,
9795 unsigned long hashval, int (*test)(struct inode *, void *),
9797 extern struct inode *ilookup5(struct super_block *sb, unsigned long hashval,
9798 int (*test)(struct inode *, void *), void *data);
9799 extern struct inode *ilookup(struct super_block *sb, unsigned long ino);
9801 extern struct inode * iget5_locked(struct super_block *, unsigned long, int (*test)(struct inode *, void *), int (*set)(struct inode *, void *), void *);
9802 extern struct inode * iget_locked(struct super_block *, unsigned long);
9803 extern void unlock_new_inode(struct inode *);
9805 static inline __attribute__((always_inline)) struct inode *iget(struct super_block *sb, unsigned long ino)
9807 struct inode *inode = iget_locked(sb, ino);
9809 if (inode && (inode->i_state & 64)) {
9810 sb->s_op->read_inode(inode);
9811 unlock_new_inode(inode);
9817 extern void __iget(struct inode * inode);
9818 extern void clear_inode(struct inode *);
9819 extern void destroy_inode(struct inode *);
9820 extern struct inode *new_inode(struct super_block *);
9821 extern int __remove_suid(struct dentry *, int);
9822 extern int should_remove_suid(struct dentry *);
9823 extern int remove_suid(struct dentry *);
9824 extern void remove_dquot_ref(struct super_block *, int, struct list_head *);
9826 extern void __insert_inode_hash(struct inode *, unsigned long hashval);
9827 extern void remove_inode_hash(struct inode *);
9828 static inline __attribute__((always_inline)) void insert_inode_hash(struct inode *inode) {
9829 __insert_inode_hash(inode, inode->i_ino);
9832 extern struct file * get_empty_filp(void);
9833 extern void file_move(struct file *f, struct list_head *list);
9834 extern void file_kill(struct file *f);
9837 extern void submit_bio(int, struct bio *);
9838 extern int bdev_read_only(struct block_device *);
9840 extern int set_blocksize(struct block_device *, int);
9841 extern int sb_set_blocksize(struct super_block *, int);
9842 extern int sb_min_blocksize(struct super_block *, int);
9844 extern int generic_file_mmap(struct file *, struct vm_area_struct *);
9845 extern int generic_file_readonly_mmap(struct file *, struct vm_area_struct *);
9846 extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
9847 extern int file_send_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
9848 int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk);
9849 extern ssize_t generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t);
9850 extern ssize_t generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, loff_t);
9851 extern ssize_t generic_file_aio_write_nolock(struct kiocb *, const struct iovec *,
9852 unsigned long, loff_t);
9853 extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *,
9854 unsigned long *, loff_t, loff_t *, size_t, size_t);
9855 extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *,
9856 unsigned long, loff_t, loff_t *, size_t, ssize_t);
9857 extern ssize_t do_sync_read(struct file *filp, char *buf, size_t len, loff_t *ppos);
9858 extern ssize_t do_sync_write(struct file *filp, const char *buf, size_t len, loff_t *ppos);
9859 extern ssize_t generic_file_sendfile(struct file *, loff_t *, size_t, read_actor_t, void *);
9860 extern void do_generic_mapping_read(struct address_space *mapping,
9861 struct file_ra_state *, struct file *,
9862 loff_t *, read_descriptor_t *, read_actor_t);
9865 extern ssize_t generic_file_splice_read(struct file *, loff_t *,
9866 struct pipe_inode_info *, size_t, unsigned int);
9867 extern ssize_t generic_file_splice_write(struct pipe_inode_info *,
9868 struct file *, loff_t *, size_t, unsigned int);
9869 extern ssize_t generic_file_splice_write_nolock(struct pipe_inode_info *,
9870 struct file *, loff_t *, size_t, unsigned int);
9871 extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe,
9872 struct file *out, loff_t *, size_t len, unsigned int flags);
9873 extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out,
9874 size_t len, unsigned int flags);
9877 file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping);
9878 extern loff_t no_llseek(struct file *file, loff_t offset, int origin);
9879 extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin);
9880 extern loff_t remote_llseek(struct file *file, loff_t offset, int origin);
9881 extern int generic_file_open(struct inode * inode, struct file * filp);
9882 extern int nonseekable_open(struct inode * inode, struct file * filp);
9883 # 1793 "include/linux/fs.h"
9884 static inline __attribute__((always_inline)) int xip_truncate_page(struct address_space *mapping, loff_t from)
9890 static inline __attribute__((always_inline)) void do_generic_file_read(struct file * filp, loff_t *ppos,
9891 read_descriptor_t * desc,
9894 do_generic_mapping_read(filp->f_mapping,
9903 ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
9904 struct block_device *bdev, const struct iovec *iov, loff_t offset,
9905 unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io,
9914 static inline __attribute__((always_inline)) ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb,
9915 struct inode *inode, struct block_device *bdev, const struct iovec *iov,
9916 loff_t offset, unsigned long nr_segs, get_block_t get_block,
9917 dio_iodone_t end_io)
9919 return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset,
9920 nr_segs, get_block, end_io, DIO_LOCKING);
9923 static inline __attribute__((always_inline)) ssize_t blockdev_direct_IO_no_locking(int rw, struct kiocb *iocb,
9924 struct inode *inode, struct block_device *bdev, const struct iovec *iov,
9925 loff_t offset, unsigned long nr_segs, get_block_t get_block,
9926 dio_iodone_t end_io)
9928 return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset,
9929 nr_segs, get_block, end_io, DIO_NO_LOCKING);
9932 static inline __attribute__((always_inline)) ssize_t blockdev_direct_IO_own_locking(int rw, struct kiocb *iocb,
9933 struct inode *inode, struct block_device *bdev, const struct iovec *iov,
9934 loff_t offset, unsigned long nr_segs, get_block_t get_block,
9935 dio_iodone_t end_io)
9937 return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset,
9938 nr_segs, get_block, end_io, DIO_OWN_LOCKING);
9942 extern const struct file_operations generic_ro_fops;
9946 extern int vfs_readlink(struct dentry *, char *, int, const char *);
9947 extern int vfs_follow_link(struct nameidata *, const char *);
9948 extern int page_readlink(struct dentry *, char *, int);
9949 extern void *page_follow_link_light(struct dentry *, struct nameidata *);
9950 extern void page_put_link(struct dentry *, struct nameidata *, void *);
9951 extern int __page_symlink(struct inode *inode, const char *symname, int len,
9953 extern int page_symlink(struct inode *inode, const char *symname, int len);
9954 extern struct inode_operations page_symlink_inode_operations;
9955 extern int generic_readlink(struct dentry *, char *, int);
9956 extern void generic_fillattr(struct inode *, struct kstat *);
9957 extern int vfs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
9958 void inode_add_bytes(struct inode *inode, loff_t bytes);
9959 void inode_sub_bytes(struct inode *inode, loff_t bytes);
9960 loff_t inode_get_bytes(struct inode *inode);
9961 void inode_set_bytes(struct inode *inode, loff_t bytes);
9963 extern int vfs_readdir(struct file *, filldir_t, void *);
9965 extern int vfs_stat(char *, struct kstat *);
9966 extern int vfs_lstat(char *, struct kstat *);
9967 extern int vfs_stat_fd(int dfd, char *, struct kstat *);
9968 extern int vfs_lstat_fd(int dfd, char *, struct kstat *);
9969 extern int vfs_fstat(unsigned int, struct kstat *);
9971 extern int vfs_ioctl(struct file *, unsigned int, unsigned int, unsigned long);
9973 extern struct file_system_type *get_fs_type(const char *name);
9974 extern struct super_block *get_super(struct block_device *);
9975 extern struct super_block *user_get_super(dev_t);
9976 extern void drop_super(struct super_block *sb);
9978 extern int dcache_dir_open(struct inode *, struct file *);
9979 extern int dcache_dir_close(struct inode *, struct file *);
9980 extern loff_t dcache_dir_lseek(struct file *, loff_t, int);
9981 extern int dcache_readdir(struct file *, void *, filldir_t);
9982 extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *);
9983 extern int simple_statfs(struct dentry *, struct kstatfs *);
9984 extern int simple_link(struct dentry *, struct inode *, struct dentry *);
9985 extern int simple_unlink(struct inode *, struct dentry *);
9986 extern int simple_rmdir(struct inode *, struct dentry *);
9987 extern int simple_rename(struct inode *, struct dentry *, struct inode *, struct dentry *);
9988 extern int simple_sync_file(struct file *, struct dentry *, int);
9989 extern int simple_empty(struct dentry *);
9990 extern int simple_readpage(struct file *file, struct page *page);
9991 extern int simple_prepare_write(struct file *file, struct page *page,
9992 unsigned offset, unsigned to);
9993 extern int simple_commit_write(struct file *file, struct page *page,
9994 unsigned offset, unsigned to);
9996 extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *);
9997 extern ssize_t generic_read_dir(struct file *, char *, size_t, loff_t *);
9998 extern const struct file_operations simple_dir_operations;
9999 extern struct inode_operations simple_dir_inode_operations;
10000 struct tree_descr { char *name; const struct file_operations *ops; int mode; };
10001 struct dentry *d_alloc_name(struct dentry *, const char *);
10002 extern int simple_fill_super(struct super_block *, int, struct tree_descr *);
10003 extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count);
10004 extern void simple_release_fs(struct vfsmount **mount, int *count);
10006 extern ssize_t simple_read_from_buffer(void *, size_t, loff_t *, const void *, size_t);
10007 # 1924 "include/linux/fs.h"
10008 extern int inode_change_ok(struct inode *, struct iattr *);
10009 extern int __attribute__((warn_unused_result)) inode_setattr(struct inode *, struct iattr *);
10011 extern void file_update_time(struct file *file);
10013 static inline __attribute__((always_inline)) ino_t parent_ino(struct dentry *dentry)
10017 do { do { } while (0); (void)0; (void)(&dentry->d_lock); } while (0);
10018 res = dentry->d_parent->d_inode->i_ino;
10019 do { do { } while (0); (void)0; (void)(&dentry->d_lock); } while (0);
10024 extern int unshare_files(void);
10032 struct simple_transaction_argresp {
10039 char *simple_transaction_get(struct file *file, const char *buf,
10041 ssize_t simple_transaction_read(struct file *file, char *buf,
10042 size_t size, loff_t *pos);
10043 int simple_transaction_release(struct inode *inode, struct file *file);
10045 static inline __attribute__((always_inline)) void simple_transaction_set(struct file *file, size_t n)
10047 struct simple_transaction_argresp *ar = file->private_data;
10049 do { if (__builtin_expect(!!((n > ((1UL << 12) - sizeof(struct simple_transaction_argresp)))!=0), 0)) do { dump_stack(); printk("<4>" "\nkernel BUG at %s:%d!\n", "include/linux/fs.h", 1965); panic("BUG!"); } while (0); } while(0);
10055 __asm__ __volatile__("": : :"memory");
10058 # 2005 "include/linux/fs.h"
10059 static inline __attribute__((always_inline)) void __attribute__((format(printf, 1, 2)))
10060 __simple_attr_check_format(const char *fmt, ...)
10065 int simple_attr_open(struct inode *inode, struct file *file,
10066 u64 (*get)(void *), void (*set)(void *, u64),
10068 int simple_attr_close(struct inode *inode, struct file *file);
10069 ssize_t simple_attr_read(struct file *file, char *buf,
10070 size_t len, loff_t *ppos);
10071 ssize_t simple_attr_write(struct file *file, const char *buf,
10072 size_t len, loff_t *ppos);
10073 # 2032 "include/linux/fs.h"
10074 static inline __attribute__((always_inline)) char *alloc_secdata(void)
10079 static inline __attribute__((always_inline)) void free_secdata(void *secdata)
10081 # 16 "include/linux/mm.h" 2
10083 # 1 "include/linux/debug_locks.h" 1
10087 struct task_struct;
10089 extern int debug_locks;
10090 extern int debug_locks_silent;
10095 extern int debug_locks_off(void);
10096 # 46 "include/linux/debug_locks.h"
10097 struct task_struct;
10105 static inline __attribute__((always_inline)) void debug_show_all_locks(void)
10109 static inline __attribute__((always_inline)) void debug_show_held_locks(struct task_struct *task)
10113 static inline __attribute__((always_inline)) void
10114 debug_check_no_locks_freed(const void *from, unsigned long len)
10118 static inline __attribute__((always_inline)) void
10119 debug_check_no_locks_held(struct task_struct *task)
10122 # 18 "include/linux/mm.h" 2
10123 # 1 "include/linux/backing-dev.h" 1
10124 # 13 "include/linux/backing-dev.h"
10132 BDI_write_congested,
10133 BDI_read_congested,
10137 typedef int (congested_fn)(void *, int);
10139 struct backing_dev_info {
10140 unsigned long ra_pages;
10141 unsigned long state;
10142 unsigned int capabilities;
10143 congested_fn *congested_fn;
10144 void *congested_data;
10145 void (*unplug_io_fn)(struct backing_dev_info *, struct page *);
10146 void *unplug_io_data;
10148 # 63 "include/linux/backing-dev.h"
10149 extern struct backing_dev_info default_backing_dev_info;
10150 void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page);
10152 int writeback_acquire(struct backing_dev_info *bdi);
10153 int writeback_in_progress(struct backing_dev_info *bdi);
10154 void writeback_release(struct backing_dev_info *bdi);
10156 static inline __attribute__((always_inline)) int bdi_congested(struct backing_dev_info *bdi, int bdi_bits)
10158 if (bdi->congested_fn)
10159 return bdi->congested_fn(bdi->congested_data, bdi_bits);
10160 return (bdi->state & bdi_bits);
10163 static inline __attribute__((always_inline)) int bdi_read_congested(struct backing_dev_info *bdi)
10165 return bdi_congested(bdi, 1 << BDI_read_congested);
10168 static inline __attribute__((always_inline)) int bdi_write_congested(struct backing_dev_info *bdi)
10170 return bdi_congested(bdi, 1 << BDI_write_congested);
10173 static inline __attribute__((always_inline)) int bdi_rw_congested(struct backing_dev_info *bdi)
10175 return bdi_congested(bdi, (1 << BDI_read_congested)|
10176 (1 << BDI_write_congested));
10179 void clear_bdi_congested(struct backing_dev_info *bdi, int rw);
10180 void set_bdi_congested(struct backing_dev_info *bdi, int rw);
10181 long congestion_wait(int rw, long timeout);
10182 void congestion_end(int rw);
10183 # 19 "include/linux/mm.h" 2
10184 # 1 "include/linux/mm_types.h" 1
10185 # 9 "include/linux/mm_types.h"
10186 struct address_space;
10187 # 18 "include/linux/mm_types.h"
10189 unsigned long flags;
10192 atomic_t _mapcount;
10198 unsigned long private;
10205 struct address_space *mapping;
10217 unsigned long index;
10218 struct list_head lru;
10219 # 73 "include/linux/mm_types.h"
10221 # 20 "include/linux/mm.h" 2
10227 extern unsigned long max_mapnr;
10230 extern unsigned long num_physpages;
10231 extern void * high_memory;
10232 extern unsigned long vmalloc_earlyreserve;
10233 extern int page_cluster;
10236 extern int sysctl_legacy_va_layout;
10242 # 1 "include/asm/pgtable.h" 1
10246 # 1 "include/asm-generic/4level-fixup.h" 1
10247 # 5 "include/asm/pgtable.h" 2
10251 typedef pte_t *pte_addr_t;
10252 # 27 "include/asm/pgtable.h"
10253 extern void paging_init(void);
10261 static inline __attribute__((always_inline)) int pte_file(pte_t pte)
10272 extern unsigned int kobjsize(const void *objp);
10273 # 41 "include/linux/mm.h" 2
10274 # 60 "include/linux/mm.h"
10275 struct vm_area_struct {
10276 struct mm_struct * vm_mm;
10277 unsigned long vm_start;
10278 unsigned long vm_end;
10282 struct vm_area_struct *vm_next;
10284 pgprot_t vm_page_prot;
10285 unsigned long vm_flags;
10287 struct rb_node vm_rb;
10297 struct list_head list;
10299 struct vm_area_struct *head;
10302 struct raw_prio_tree_node prio_tree_node;
10311 struct list_head anon_vma_node;
10312 struct anon_vma *anon_vma;
10315 struct vm_operations_struct * vm_ops;
10318 unsigned long vm_pgoff;
10320 struct file * vm_file;
10321 void * vm_private_data;
10322 unsigned long vm_truncate_count;
10337 struct vm_list_struct {
10338 struct vm_list_struct *next;
10339 struct vm_area_struct *vma;
10343 extern struct rb_root nommu_vma_tree;
10344 extern struct rw_semaphore nommu_vma_sem;
10346 extern unsigned int kobjsize(const void *objp);
10347 # 190 "include/linux/mm.h"
10348 extern pgprot_t protection_map[16];
10356 struct vm_operations_struct {
10357 void (*open)(struct vm_area_struct * area);
10358 void (*close)(struct vm_area_struct * area);
10359 struct page * (*nopage)(struct vm_area_struct * area, unsigned long address, int *type);
10360 unsigned long (*nopfn)(struct vm_area_struct * area, unsigned long address);
10361 int (*populate)(struct vm_area_struct * area, unsigned long address, unsigned long len, pgprot_t prot, unsigned long pgoff, int nonblock);
10365 int (*page_mkwrite)(struct vm_area_struct *vma, struct page *page);
10377 # 227 "include/linux/mm.h"
10378 # 1 "include/linux/page-flags.h" 1
10379 # 254 "include/linux/page-flags.h"
10382 int test_clear_page_dirty(struct page *page);
10383 int test_clear_page_writeback(struct page *page);
10384 int test_set_page_writeback(struct page *page);
10386 static inline __attribute__((always_inline)) void clear_page_dirty(struct page *page)
10388 test_clear_page_dirty(page);
10391 static inline __attribute__((always_inline)) void set_page_writeback(struct page *page)
10393 test_set_page_writeback(page);
10395 # 228 "include/linux/mm.h" 2
10396 # 251 "include/linux/mm.h"
10397 static inline __attribute__((always_inline)) int put_page_testzero(struct page *page)
10400 return (atomic_sub_return(1, (&page->_count)) == 0);
10407 static inline __attribute__((always_inline)) int get_page_unless_zero(struct page *page)
10410 return ({ int c, old; c = (((&page->_count))->counter); while (c != (0) && (old = ((int)((__typeof__(*(&((((&page->_count)))->counter))))__cmpxchg((&((((&page->_count)))->counter)),(unsigned long)((c)), (unsigned long)((c + (1))),sizeof(*(&((((&page->_count)))->counter))))))) != c) c = old; c != (0); });
10413 static inline __attribute__((always_inline)) int page_count(struct page *page)
10415 if (__builtin_expect(!!((__builtin_constant_p(14) ? __constant_test_bit((14),(&(page)->flags)) : __test_bit((14),(&(page)->flags)))), 0))
10416 page = (struct page *)((page)->private);
10417 return ((&page->_count)->counter);
10420 static inline __attribute__((always_inline)) void get_page(struct page *page)
10422 if (__builtin_expect(!!((__builtin_constant_p(14) ? __constant_test_bit((14),(&(page)->flags)) : __test_bit((14),(&(page)->flags)))), 0))
10423 page = (struct page *)((page)->private);
10425 atomic_inc(&page->_count);
10432 static inline __attribute__((always_inline)) void init_page_count(struct page *page)
10434 (((&page->_count)->counter) = 1);
10437 void put_page(struct page *page);
10438 void put_pages_list(struct list_head *pages);
10440 void split_page(struct page *page, unsigned int order);
10441 # 431 "include/linux/mm.h"
10442 static inline __attribute__((always_inline)) enum zone_type page_zonenum(struct page *page)
10444 return (page->flags >> (((((sizeof(unsigned long)*8) - 0) - 0) - 1) * (1 != 0))) & ((1UL << 1) - 1);
10448 extern struct zone *zone_table[];
10450 static inline __attribute__((always_inline)) int page_zone_id(struct page *page)
10452 return (page->flags >> (((((sizeof(unsigned long)*8) - 0) - 0) - 1) * (1 != 0))) & ((1UL << (0 + 1)) - 1);
10454 static inline __attribute__((always_inline)) struct zone *page_zone(struct page *page)
10456 return zone_table[page_zone_id(page)];
10459 static inline __attribute__((always_inline)) unsigned long zone_to_nid(struct zone *zone)
10468 static inline __attribute__((always_inline)) unsigned long page_to_nid(struct page *page)
10470 if ((0 > 0 || 0 == 0))
10471 return (page->flags >> ((((sizeof(unsigned long)*8) - 0) - 0) * (0 != 0))) & ((1UL << 0) - 1);
10473 return zone_to_nid(page_zone(page));
10475 static inline __attribute__((always_inline)) unsigned long page_to_section(struct page *page)
10477 return (page->flags >> (((sizeof(unsigned long)*8) - 0) * (0 != 0))) & ((1UL << 0) - 1);
10480 static inline __attribute__((always_inline)) void set_page_zone(struct page *page, enum zone_type zone)
10482 page->flags &= ~(((1UL << 1) - 1) << (((((sizeof(unsigned long)*8) - 0) - 0) - 1) * (1 != 0)));
10483 page->flags |= (zone & ((1UL << 1) - 1)) << (((((sizeof(unsigned long)*8) - 0) - 0) - 1) * (1 != 0));
10486 static inline __attribute__((always_inline)) void set_page_node(struct page *page, unsigned long node)
10488 page->flags &= ~(((1UL << 0) - 1) << ((((sizeof(unsigned long)*8) - 0) - 0) * (0 != 0)));
10489 page->flags |= (node & ((1UL << 0) - 1)) << ((((sizeof(unsigned long)*8) - 0) - 0) * (0 != 0));
10491 static inline __attribute__((always_inline)) void set_page_section(struct page *page, unsigned long section)
10493 page->flags &= ~(((1UL << 0) - 1) << (((sizeof(unsigned long)*8) - 0) * (0 != 0)));
10494 page->flags |= (section & ((1UL << 0) - 1)) << (((sizeof(unsigned long)*8) - 0) * (0 != 0));
10497 static inline __attribute__((always_inline)) void set_page_links(struct page *page, enum zone_type zone,
10498 unsigned long node, unsigned long pfn)
10500 set_page_zone(page, zone);
10501 set_page_node(page, node);
10502 set_page_section(page, ((pfn) >> 0));
10508 # 1 "include/linux/vmstat.h" 1
10509 # 34 "include/linux/vmstat.h"
10510 enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
10511 PGALLOC_DMA, PGALLOC_NORMAL ,
10512 PGFREE, PGACTIVATE, PGDEACTIVATE,
10513 PGFAULT, PGMAJFAULT,
10514 PGREFILL_DMA, PGREFILL_NORMAL ,
10515 PGSTEAL_DMA, PGSTEAL_NORMAL ,
10516 PGSCAN_KSWAPD_DMA, PGSCAN_KSWAPD_NORMAL ,
10517 PGSCAN_DIRECT_DMA, PGSCAN_DIRECT_NORMAL ,
10518 PGINODESTEAL, SLABS_SCANNED, KSWAPD_STEAL, KSWAPD_INODESTEAL,
10519 PAGEOUTRUN, ALLOCSTALL, PGROTATED,
10523 struct vm_event_state {
10524 unsigned long event[NR_VM_EVENT_ITEMS];
10527 extern __typeof__(struct vm_event_state) per_cpu__vm_event_states;
10529 static inline __attribute__((always_inline)) void __count_vm_event(enum vm_event_item item)
10531 per_cpu__vm_event_states.event[item]++;
10534 static inline __attribute__((always_inline)) void count_vm_event(enum vm_event_item item)
10536 (*({ extern int simple_identifier_vm_event_states(void); do { } while (0); &per_cpu__vm_event_states; })).event[item]++;
10540 static inline __attribute__((always_inline)) void __count_vm_events(enum vm_event_item item, long delta)
10542 per_cpu__vm_event_states.event[item] += delta;
10545 static inline __attribute__((always_inline)) void count_vm_events(enum vm_event_item item, long delta)
10547 (*({ extern int simple_identifier_vm_event_states(void); do { } while (0); &per_cpu__vm_event_states; })).event[item] += delta;
10551 extern void all_vm_events(unsigned long *);
10552 extern void vm_events_fold_cpu(int cpu);
10553 # 96 "include/linux/vmstat.h"
10554 extern atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS];
10556 static inline __attribute__((always_inline)) void zone_page_state_add(long x, struct zone *zone,
10557 enum zone_stat_item item)
10559 atomic_long_add(x, &zone->vm_stat[item]);
10560 atomic_long_add(x, &vm_stat[item]);
10563 static inline __attribute__((always_inline)) unsigned long global_page_state(enum zone_stat_item item)
10565 long x = atomic_long_read(&vm_stat[item]);
10573 static inline __attribute__((always_inline)) unsigned long zone_page_state(struct zone *zone,
10574 enum zone_stat_item item)
10576 long x = atomic_long_read(&zone->vm_stat[item]);
10583 # 165 "include/linux/vmstat.h"
10584 static inline __attribute__((always_inline)) void zap_zone_vm_stats(struct zone *zone)
10586 memset(zone->vm_stat, 0, sizeof(zone->vm_stat));
10589 extern void inc_zone_state(struct zone *, enum zone_stat_item);
10590 # 192 "include/linux/vmstat.h"
10591 static inline __attribute__((always_inline)) void __mod_zone_page_state(struct zone *zone,
10592 enum zone_stat_item item, int delta)
10594 zone_page_state_add(delta, zone, item);
10597 static inline __attribute__((always_inline)) void __inc_zone_state(struct zone *zone, enum zone_stat_item item)
10599 atomic_long_inc(&zone->vm_stat[item]);
10600 atomic_long_inc(&vm_stat[item]);
10603 static inline __attribute__((always_inline)) void __inc_zone_page_state(struct page *page,
10604 enum zone_stat_item item)
10606 __inc_zone_state(page_zone(page), item);
10609 static inline __attribute__((always_inline)) void __dec_zone_page_state(struct page *page,
10610 enum zone_stat_item item)
10612 atomic_long_dec(&page_zone(page)->vm_stat[item]);
10613 atomic_long_dec(&vm_stat[item]);
10615 # 225 "include/linux/vmstat.h"
10616 static inline __attribute__((always_inline)) void refresh_cpu_vm_stats(int cpu) { }
10617 static inline __attribute__((always_inline)) void refresh_vm_stats(void) { }
10618 # 498 "include/linux/mm.h" 2
10620 static inline __attribute__((always_inline)) __attribute__((always_inline)) void *lowmem_page_address(struct page *page)
10622 return ((void *) ((unsigned long)((((unsigned long) ((void *)(((((page) - mem_map) << 12) + (0x00000000))))) >> 12) << 12)));
10624 # 540 "include/linux/mm.h"
10625 extern struct address_space swapper_space;
10626 static inline __attribute__((always_inline)) struct address_space *page_mapping(struct page *page)
10628 struct address_space *mapping = page->mapping;
10630 if (__builtin_expect(!!(0), 0))
10631 mapping = &swapper_space;
10632 else if (__builtin_expect(!!((unsigned long)mapping & 1), 0))
10633 mapping = ((void *)0);
10637 static inline __attribute__((always_inline)) int PageAnon(struct page *page)
10639 return ((unsigned long)page->mapping & 1) != 0;
10646 static inline __attribute__((always_inline)) unsigned long page_index(struct page *page)
10648 if (__builtin_expect(!!(0), 0))
10649 return ((page)->private);
10650 return page->index;
10658 static inline __attribute__((always_inline)) void reset_page_mapcount(struct page *page)
10660 (((&(page)->_mapcount)->counter) = -1);
10663 static inline __attribute__((always_inline)) int page_mapcount(struct page *page)
10665 return ((&(page)->_mapcount)->counter) + 1;
10671 static inline __attribute__((always_inline)) int page_mapped(struct page *page)
10673 return ((&(page)->_mapcount)->counter) >= 0;
10675 # 622 "include/linux/mm.h"
10676 extern void show_free_areas(void);
10677 # 634 "include/linux/mm.h"
10678 static inline __attribute__((always_inline)) int shmem_lock(struct file *file, int lock,
10679 struct user_struct *user)
10684 static inline __attribute__((always_inline)) int shmem_set_policy(struct vm_area_struct *vma,
10685 struct mempolicy *new)
10690 static inline __attribute__((always_inline)) struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
10691 unsigned long addr)
10693 return ((void *)0);
10696 struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags);
10697 extern int shmem_mmap(struct file *file, struct vm_area_struct *vma);
10699 int shmem_zero_setup(struct vm_area_struct *);
10702 extern unsigned long shmem_get_unmapped_area(struct file *file,
10703 unsigned long addr,
10705 unsigned long pgoff,
10706 unsigned long flags);
10709 static inline __attribute__((always_inline)) int can_do_mlock(void)
10713 if ((get_current())->signal->rlim[8].rlim_cur != 0)
10717 extern int user_shm_lock(size_t, struct user_struct *);
10718 extern void user_shm_unlock(size_t, struct user_struct *);
10723 struct zap_details {
10724 struct vm_area_struct *nonlinear_vma;
10725 struct address_space *check_mapping;
10726 unsigned long first_index;
10727 unsigned long last_index;
10728 spinlock_t *i_mmap_lock;
10729 unsigned long truncate_count;
10732 struct page *vm_normal_page(struct vm_area_struct *, unsigned long, pte_t);
10733 unsigned long zap_page_range(struct vm_area_struct *vma, unsigned long address,
10734 unsigned long size, struct zap_details *);
10735 unsigned long unmap_vmas(struct mmu_gather **tlb,
10736 struct vm_area_struct *start_vma, unsigned long start_addr,
10737 unsigned long end_addr, unsigned long *nr_accounted,
10738 struct zap_details *);
10739 void free_pgd_range(struct mmu_gather **tlb, unsigned long addr,
10740 unsigned long end, unsigned long floor, unsigned long ceiling);
10741 void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *start_vma,
10742 unsigned long floor, unsigned long ceiling);
10743 int copy_page_range(struct mm_struct *dst, struct mm_struct *src,
10744 struct vm_area_struct *vma);
10745 int zeromap_page_range(struct vm_area_struct *vma, unsigned long from,
10746 unsigned long size, pgprot_t prot);
10747 void unmap_mapping_range(struct address_space *mapping,
10748 loff_t const holebegin, loff_t const holelen, int even_cows);
10750 static inline __attribute__((always_inline)) void unmap_shared_mapping_range(struct address_space *mapping,
10751 loff_t const holebegin, loff_t const holelen)
10753 unmap_mapping_range(mapping, holebegin, holelen, 0);
10756 extern int vmtruncate(struct inode * inode, loff_t offset);
10757 extern int vmtruncate_range(struct inode * inode, loff_t offset, loff_t end);
10758 extern int install_page(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, struct page *page, pgprot_t prot);
10759 extern int install_file_pte(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, unsigned long pgoff, pgprot_t prot);
10760 # 729 "include/linux/mm.h"
10761 static inline __attribute__((always_inline)) int handle_mm_fault(struct mm_struct *mm,
10762 struct vm_area_struct *vma, unsigned long address,
10766 do { dump_stack(); printk("<4>" "\nkernel BUG at %s:%d!\n", "include/linux/mm.h", 734); panic("BUG!"); } while (0);
10771 extern int make_pages_present(unsigned long addr, unsigned long end);
10772 extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write);
10773 void install_arg_page(struct vm_area_struct *, struct page *, unsigned long);
10775 int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, unsigned long start,
10776 int len, int write, int force, struct page **pages, struct vm_area_struct **vmas);
10777 void print_bad_pte(struct vm_area_struct *, pte_t, unsigned long);
10779 extern int try_to_release_page(struct page * page, gfp_t gfp_mask);
10780 extern void do_invalidatepage(struct page *page, unsigned long offset);
10782 int __set_page_dirty_nobuffers(struct page *page);
10783 int redirty_page_for_writepage(struct writeback_control *wbc,
10784 struct page *page);
10785 int set_page_dirty(struct page *page);
10786 int set_page_dirty_lock(struct page *page);
10787 int clear_page_dirty_for_io(struct page *page);
10789 extern unsigned long do_mremap(unsigned long addr,
10790 unsigned long old_len, unsigned long new_len,
10791 unsigned long flags, unsigned long new_addr);
10792 # 772 "include/linux/mm.h"
10793 typedef int (*shrinker_t)(int nr_to_scan, gfp_t gfp_mask);
10802 extern struct shrinker *set_shrinker(int, shrinker_t);
10803 extern void remove_shrinker(struct shrinker *shrinker);
10811 static inline __attribute__((always_inline)) int vma_wants_writenotify(struct vm_area_struct *vma)
10813 unsigned int vm_flags = vma->vm_flags;
10816 if ((vm_flags & (0x00000002|0x00000008)) != ((0x00000002|0x00000008)))
10820 if (vma->vm_ops && vma->vm_ops->page_mkwrite)
10824 if (((vma->vm_page_prot).pgprot) !=
10825 ((protection_map[vm_flags & (0x00000001|0x00000002|0x00000004|0x00000008)]).pgprot))
10830 if (vm_flags & (0x00000400|0x02000000))
10834 return vma->vm_file && vma->vm_file->f_mapping &&
10835 (!(((vma->vm_file->f_mapping)->backing_dev_info)->capabilities & 0x00000001));
10838 extern pte_t *get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl);
10840 int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address);
10841 int __pmd_alloc(struct mm_struct *mm, pgd_t *pud, unsigned long address);
10842 int __pte_alloc(struct mm_struct *mm, pmd_t *pmd, unsigned long address);
10843 int __pte_alloc_kernel(pmd_t *pmd, unsigned long address);
10844 # 890 "include/linux/mm.h"
10845 extern void free_area_init(unsigned long * zones_size);
10846 extern void free_area_init_node(int nid, pg_data_t *pgdat,
10847 unsigned long * zones_size, unsigned long zone_start_pfn,
10848 unsigned long *zholes_size);
10849 # 943 "include/linux/mm.h"
10850 extern void set_dma_reserve(unsigned long new_dma_reserve);
10851 extern void memmap_init_zone(unsigned long, int, unsigned long, unsigned long);
10852 extern void setup_per_zone_pages_min(void);
10853 extern void mem_init(void);
10854 extern void show_mem(void);
10855 extern void si_meminfo(struct sysinfo * val);
10856 extern void si_meminfo_node(struct sysinfo *val, int nid);
10857 extern void zonetable_add(struct zone *zone, int nid, enum zone_type zid,
10858 unsigned long pfn, unsigned long size);
10863 static inline __attribute__((always_inline)) void setup_per_cpu_pageset(void) {}
10867 void vma_prio_tree_add(struct vm_area_struct *, struct vm_area_struct *old);
10868 void vma_prio_tree_insert(struct vm_area_struct *, struct prio_tree_root *);
10869 void vma_prio_tree_remove(struct vm_area_struct *, struct prio_tree_root *);
10870 struct vm_area_struct *vma_prio_tree_next(struct vm_area_struct *vma,
10871 struct prio_tree_iter *iter);
10877 static inline __attribute__((always_inline)) void vma_nonlinear_insert(struct vm_area_struct *vma,
10878 struct list_head *list)
10880 vma->shared.vm_set.parent = ((void *)0);
10881 list_add_tail(&vma->shared.vm_set.list, list);
10885 extern int __vm_enough_memory(long pages, int cap_sys_admin);
10886 extern void vma_adjust(struct vm_area_struct *vma, unsigned long start,
10887 unsigned long end, unsigned long pgoff, struct vm_area_struct *insert);
10888 extern struct vm_area_struct *vma_merge(struct mm_struct *,
10889 struct vm_area_struct *prev, unsigned long addr, unsigned long end,
10890 unsigned long vm_flags, struct anon_vma *, struct file *, unsigned long,
10891 struct mempolicy *);
10892 extern struct anon_vma *find_mergeable_anon_vma(struct vm_area_struct *);
10893 extern int split_vma(struct mm_struct *,
10894 struct vm_area_struct *, unsigned long addr, int new_below);
10895 extern int insert_vm_struct(struct mm_struct *, struct vm_area_struct *);
10896 extern void __vma_link_rb(struct mm_struct *, struct vm_area_struct *,
10897 struct rb_node **, struct rb_node *);
10898 extern void unlink_file_vma(struct vm_area_struct *);
10899 extern struct vm_area_struct *copy_vma(struct vm_area_struct **,
10900 unsigned long addr, unsigned long len, unsigned long pgoff);
10901 extern void exit_mmap(struct mm_struct *);
10902 extern int may_expand_vm(struct mm_struct *mm, unsigned long npages);
10904 extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
10906 extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
10907 unsigned long len, unsigned long prot,
10908 unsigned long flag, unsigned long pgoff);
10910 static inline __attribute__((always_inline)) unsigned long do_mmap(struct file *file, unsigned long addr,
10911 unsigned long len, unsigned long prot,
10912 unsigned long flag, unsigned long offset)
10914 unsigned long ret = -22;
10915 if ((offset + (((len)+(1UL << 12)-1)&(~((1UL << 12)-1)))) < offset)
10917 if (!(offset & ~(~((1UL << 12)-1))))
10918 ret = do_mmap_pgoff(file, addr, len, prot, flag, offset >> 12);
10923 extern int do_munmap(struct mm_struct *, unsigned long, size_t);
10925 extern unsigned long do_brk(unsigned long, unsigned long);
10928 extern unsigned long page_unuse(struct page *);
10929 extern void truncate_inode_pages(struct address_space *, loff_t);
10930 extern void truncate_inode_pages_range(struct address_space *,
10931 loff_t lstart, loff_t lend);
10934 extern struct page *filemap_nopage(struct vm_area_struct *, unsigned long, int *);
10935 extern int filemap_populate(struct vm_area_struct *, unsigned long,
10936 unsigned long, pgprot_t, unsigned long, int);
10939 int write_one_page(struct page *page, int wait);
10953 pageout_t pageout(struct page *page, struct address_space *mapping);
10961 int do_page_cache_readahead(struct address_space *mapping, struct file *filp,
10962 unsigned long offset, unsigned long nr_to_read);
10963 int force_page_cache_readahead(struct address_space *mapping, struct file *filp,
10964 unsigned long offset, unsigned long nr_to_read);
10965 unsigned long page_cache_readahead(struct address_space *mapping,
10966 struct file_ra_state *ra,
10968 unsigned long offset,
10969 unsigned long size);
10970 void handle_ra_miss(struct address_space *mapping,
10971 struct file_ra_state *ra, unsigned long offset);
10972 unsigned long max_sane_readahead(unsigned long nr);
10975 extern int expand_stack(struct vm_area_struct *vma, unsigned long address);
10981 extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long addr);
10982 extern struct vm_area_struct * find_vma_prev(struct mm_struct * mm, unsigned long addr,
10983 struct vm_area_struct **pprev);
10987 static inline __attribute__((always_inline)) struct vm_area_struct * find_vma_intersection(struct mm_struct * mm, unsigned long start_addr, unsigned long end_addr)
10989 struct vm_area_struct * vma = find_vma(mm,start_addr);
10991 if (vma && end_addr <= vma->vm_start)
10996 static inline __attribute__((always_inline)) unsigned long vma_pages(struct vm_area_struct *vma)
10998 return (vma->vm_end - vma->vm_start) >> 12;
11001 pgprot_t vm_get_page_prot(unsigned long vm_flags);
11002 struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr);
11003 struct page *vmalloc_to_page(void *addr);
11004 unsigned long vmalloc_to_pfn(void *addr);
11005 int remap_pfn_range(struct vm_area_struct *, unsigned long addr,
11006 unsigned long pfn, unsigned long size, pgprot_t);
11007 int vm_insert_page(struct vm_area_struct *, unsigned long addr, struct page *);
11009 struct page *follow_page(struct vm_area_struct *, unsigned long address,
11010 unsigned int foll_flags);
11017 void vm_stat_account(struct mm_struct *, unsigned long, struct file *, long);
11018 # 1119 "include/linux/mm.h"
11019 static inline __attribute__((always_inline)) void
11020 kernel_map_pages(struct page *page, int numpages, int enable) {}
11023 extern struct vm_area_struct *get_gate_vma(struct task_struct *tsk);
11028 int in_gate_area_no_task(unsigned long addr);
11032 int drop_caches_sysctl_handler(struct ctl_table *, int, struct file *,
11033 void *, size_t *, loff_t *);
11034 unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask,
11035 unsigned long lru_pages);
11036 void drop_pagecache(void);
11037 void drop_slab(void);
11045 __attribute__((weak)) const char *arch_vma_name(struct vm_area_struct *vma);
11046 # 14 "include/asm/uaccess.h" 2
11054 static inline __attribute__((always_inline)) void set_fs(mm_segment_t fs)
11056 current_thread_info()->addr_limit = fs;
11058 # 33 "include/asm/uaccess.h"
11059 extern int is_in_rom(unsigned long);
11067 static inline __attribute__((always_inline)) int _access_ok(unsigned long addr, unsigned long size)
11072 extern unsigned long memory_end, physical_mem_end;
11073 if (addr > (addr + size))
11075 if ((((current_thread_info()->addr_limit)) == ((0x5))))
11077 if (addr >= memory_start && (addr + size) <= memory_end)
11079 if (addr >= memory_mtd_end && (addr + size) <= physical_mem_end)
11081 if (addr >= (unsigned long)__init_begin &&
11082 addr + size <= (unsigned long)__init_end)
11084 if (addr >= 0xFFB00000
11085 && addr + size <= 0xFFB00000 + 0x1000)
11088 if (addr >= 0xFFA00000 + (_etext_l1 - _stext_l1)
11089 && addr + size <= 0xFFA00000 + 0xC000)
11093 if (addr >= 0xFF800000 + (_ebss_l1 - _sdata_l1)
11094 && addr + size <= 0xFF800000 + (0x8000 - 0x4000))
11098 if (addr >= 0xFF900000
11099 && addr + size <= 0xFF900000 + (0x8000 - 0x4000))
11105 # 93 "include/asm/uaccess.h"
11106 struct exception_table_entry {
11107 unsigned long insn, fixup;
11111 extern unsigned long search_exception_table(unsigned long);
11112 # 140 "include/asm/uaccess.h"
11113 static inline __attribute__((always_inline)) int bad_user_access_length(void)
11115 panic("bad_user_access_length");
11118 # 223 "include/asm/uaccess.h"
11119 static inline __attribute__((always_inline)) long copy_from_user(void *to,
11120 const void * from, unsigned long n)
11122 if (_access_ok((unsigned long)(from),(n)))
11123 memcpy(to, from, n);
11129 static inline __attribute__((always_inline)) long copy_to_user(void *to,
11130 const void * from, unsigned long n)
11132 if (_access_ok((unsigned long)(to),(n)))
11133 memcpy(to, from, n);
11143 static inline __attribute__((always_inline)) long strncpy_from_user(char *dst,
11144 const char *src, long count)
11147 if (!_access_ok((unsigned long)(src),(1)))
11149 strncpy(dst, src, count);
11150 for (tmp = dst; *tmp && count > 0; tmp++, count--) ;
11151 return (tmp - dst);
11159 static inline __attribute__((always_inline)) long strnlen_user(const char *src, long n)
11161 return (strlen(src) + 1);
11170 static inline __attribute__((always_inline)) unsigned long clear_user(void *to, unsigned long n)
11175 # 48 "net/ipv4/ip_output.c" 2
11177 # 1 "include/linux/module.h" 1
11178 # 15 "include/linux/module.h"
11179 # 1 "include/linux/kmod.h" 1
11180 # 31 "include/linux/kmod.h"
11181 extern int request_module(const char * name, ...) __attribute__ ((format (printf, 1, 2)));
11189 extern int call_usermodehelper_keys(char *path, char *argv[], char *envp[],
11190 struct key *session_keyring, int wait);
11192 static inline __attribute__((always_inline)) int
11193 call_usermodehelper(char *path, char **argv, char **envp, int wait)
11195 return call_usermodehelper_keys(path, argv, envp, ((void *)0), wait);
11198 extern void usermodehelper_init(void);
11201 extern int call_usermodehelper_pipe(char *path, char *argv[], char *envp[],
11202 struct file **filp);
11203 # 16 "include/linux/module.h" 2
11204 # 1 "include/linux/elf.h" 1
11210 # 1 "include/linux/elf-em.h" 1
11211 # 7 "include/linux/elf.h" 2
11212 # 1 "include/asm/elf.h" 1
11213 # 19 "include/asm/elf.h"
11214 typedef unsigned long elf_greg_t;
11217 typedef elf_greg_t elf_gregset_t[(sizeof(struct user_regs_struct) / sizeof(elf_greg_t))];
11219 typedef struct user_bfinfp_struct elf_fpregset_t;
11220 # 8 "include/linux/elf.h" 2
11221 # 17 "include/linux/elf.h"
11222 typedef __u32 Elf32_Addr;
11223 typedef __u16 Elf32_Half;
11224 typedef __u32 Elf32_Off;
11225 typedef __s32 Elf32_Sword;
11226 typedef __u32 Elf32_Word;
11229 typedef __u64 Elf64_Addr;
11230 typedef __u16 Elf64_Half;
11231 typedef __s16 Elf64_SHalf;
11232 typedef __u64 Elf64_Off;
11233 typedef __s32 Elf64_Sword;
11234 typedef __u32 Elf64_Word;
11235 typedef __u64 Elf64_Xword;
11236 typedef __s64 Elf64_Sxword;
11237 # 107 "include/linux/elf.h"
11238 typedef struct dynamic{
11247 Elf64_Sxword d_tag;
11253 # 130 "include/linux/elf.h"
11254 typedef struct elf32_rel {
11255 Elf32_Addr r_offset;
11259 typedef struct elf64_rel {
11260 Elf64_Addr r_offset;
11261 Elf64_Xword r_info;
11264 typedef struct elf32_rela{
11265 Elf32_Addr r_offset;
11267 Elf32_Sword r_addend;
11270 typedef struct elf64_rela {
11271 Elf64_Addr r_offset;
11272 Elf64_Xword r_info;
11273 Elf64_Sxword r_addend;
11276 typedef struct elf32_sym{
11277 Elf32_Word st_name;
11278 Elf32_Addr st_value;
11279 Elf32_Word st_size;
11280 unsigned char st_info;
11281 unsigned char st_other;
11282 Elf32_Half st_shndx;
11285 typedef struct elf64_sym {
11286 Elf64_Word st_name;
11287 unsigned char st_info;
11288 unsigned char st_other;
11289 Elf64_Half st_shndx;
11290 Elf64_Addr st_value;
11291 Elf64_Xword st_size;
11297 typedef struct elf32_hdr{
11298 unsigned char e_ident[16];
11300 Elf32_Half e_machine;
11301 Elf32_Word e_version;
11302 Elf32_Addr e_entry;
11305 Elf32_Word e_flags;
11306 Elf32_Half e_ehsize;
11307 Elf32_Half e_phentsize;
11308 Elf32_Half e_phnum;
11309 Elf32_Half e_shentsize;
11310 Elf32_Half e_shnum;
11311 Elf32_Half e_shstrndx;
11314 typedef struct elf64_hdr {
11315 unsigned char e_ident[16];
11317 Elf64_Half e_machine;
11318 Elf64_Word e_version;
11319 Elf64_Addr e_entry;
11322 Elf64_Word e_flags;
11323 Elf64_Half e_ehsize;
11324 Elf64_Half e_phentsize;
11325 Elf64_Half e_phnum;
11326 Elf64_Half e_shentsize;
11327 Elf64_Half e_shnum;
11328 Elf64_Half e_shstrndx;
11337 typedef struct elf32_phdr{
11339 Elf32_Off p_offset;
11340 Elf32_Addr p_vaddr;
11341 Elf32_Addr p_paddr;
11342 Elf32_Word p_filesz;
11343 Elf32_Word p_memsz;
11344 Elf32_Word p_flags;
11345 Elf32_Word p_align;
11348 typedef struct elf64_phdr {
11350 Elf64_Word p_flags;
11351 Elf64_Off p_offset;
11352 Elf64_Addr p_vaddr;
11353 Elf64_Addr p_paddr;
11354 Elf64_Xword p_filesz;
11355 Elf64_Xword p_memsz;
11356 Elf64_Xword p_align;
11358 # 269 "include/linux/elf.h"
11360 Elf32_Word sh_name;
11361 Elf32_Word sh_type;
11362 Elf32_Word sh_flags;
11363 Elf32_Addr sh_addr;
11364 Elf32_Off sh_offset;
11365 Elf32_Word sh_size;
11366 Elf32_Word sh_link;
11367 Elf32_Word sh_info;
11368 Elf32_Word sh_addralign;
11369 Elf32_Word sh_entsize;
11372 typedef struct elf64_shdr {
11373 Elf64_Word sh_name;
11374 Elf64_Word sh_type;
11375 Elf64_Xword sh_flags;
11376 Elf64_Addr sh_addr;
11377 Elf64_Off sh_offset;
11378 Elf64_Xword sh_size;
11379 Elf64_Word sh_link;
11380 Elf64_Word sh_info;
11381 Elf64_Xword sh_addralign;
11382 Elf64_Xword sh_entsize;
11384 # 342 "include/linux/elf.h"
11385 typedef struct elf32_note {
11386 Elf32_Word n_namesz;
11387 Elf32_Word n_descsz;
11392 typedef struct elf64_note {
11393 Elf64_Word n_namesz;
11394 Elf64_Word n_descsz;
11400 extern Elf32_Dyn _DYNAMIC [];
11401 # 17 "include/linux/module.h" 2
11404 # 1 "include/linux/moduleparam.h" 1
11405 # 29 "include/linux/moduleparam.h"
11406 struct kernel_param;
11409 typedef int (*param_set_fn)(const char *val, struct kernel_param *kp);
11411 typedef int (*param_get_fn)(char *buffer, struct kernel_param *kp);
11413 struct kernel_param {
11422 struct kparam_string {
11423 unsigned int maxlen;
11428 struct kparam_array
11434 unsigned int elemsize;
11437 # 95 "include/linux/moduleparam.h"
11438 extern int parse_args(const char *name,
11440 struct kernel_param *params,
11442 int (*unknown)(char *param, char *val));
11450 extern int param_set_byte(const char *val, struct kernel_param *kp);
11451 extern int param_get_byte(char *buffer, struct kernel_param *kp);
11454 extern int param_set_short(const char *val, struct kernel_param *kp);
11455 extern int param_get_short(char *buffer, struct kernel_param *kp);
11458 extern int param_set_ushort(const char *val, struct kernel_param *kp);
11459 extern int param_get_ushort(char *buffer, struct kernel_param *kp);
11462 extern int param_set_int(const char *val, struct kernel_param *kp);
11463 extern int param_get_int(char *buffer, struct kernel_param *kp);
11466 extern int param_set_uint(const char *val, struct kernel_param *kp);
11467 extern int param_get_uint(char *buffer, struct kernel_param *kp);
11470 extern int param_set_long(const char *val, struct kernel_param *kp);
11471 extern int param_get_long(char *buffer, struct kernel_param *kp);
11474 extern int param_set_ulong(const char *val, struct kernel_param *kp);
11475 extern int param_get_ulong(char *buffer, struct kernel_param *kp);
11478 extern int param_set_charp(const char *val, struct kernel_param *kp);
11479 extern int param_get_charp(char *buffer, struct kernel_param *kp);
11482 extern int param_set_bool(const char *val, struct kernel_param *kp);
11483 extern int param_get_bool(char *buffer, struct kernel_param *kp);
11486 extern int param_set_invbool(const char *val, struct kernel_param *kp);
11487 extern int param_get_invbool(char *buffer, struct kernel_param *kp);
11488 # 159 "include/linux/moduleparam.h"
11489 extern int param_array_set(const char *val, struct kernel_param *kp);
11490 extern int param_array_get(char *buffer, struct kernel_param *kp);
11492 extern int param_set_copystring(const char *val, struct kernel_param *kp);
11493 extern int param_get_string(char *buffer, struct kernel_param *kp);
11499 extern int module_param_sysfs_setup(struct module *mod,
11500 struct kernel_param *kparam,
11501 unsigned int num_params);
11503 extern void module_param_sysfs_remove(struct module *mod);
11504 # 20 "include/linux/module.h" 2
11505 # 1 "include/asm/local.h" 1
11509 # 1 "include/asm-generic/local.h" 1
11514 # 1 "include/linux/hardirq.h" 1
11519 # 1 "include/linux/smp_lock.h" 1
11520 # 6 "include/linux/hardirq.h" 2
11522 # 1 "include/asm/hardirq.h" 1
11528 # 1 "include/asm/irq.h" 1
11529 # 20 "include/asm/irq.h"
11530 # 1 "include/asm/mach/irq.h" 1
11531 # 21 "include/asm/irq.h" 2
11532 # 56 "include/asm/irq.h"
11533 extern void sys_free_irq(unsigned int irq, void *dev_id);
11535 extern void ack_bad_irq(unsigned int irq);
11537 static __inline__ __attribute__((always_inline)) int irq_canonicalize(int irq)
11541 # 7 "include/asm/hardirq.h" 2
11544 unsigned int __softirq_pending;
11545 unsigned int __syscall_count;
11546 struct task_struct *__ksoftirqd_task;
11549 # 1 "include/linux/irq_cpustat.h" 1
11550 # 20 "include/linux/irq_cpustat.h"
11551 extern irq_cpustat_t irq_stat[];
11552 # 15 "include/asm/hardirq.h" 2
11553 # 8 "include/linux/hardirq.h" 2
11554 # 95 "include/linux/hardirq.h"
11555 struct task_struct;
11558 static inline __attribute__((always_inline)) void account_system_vtime(struct task_struct *tsk)
11561 # 129 "include/linux/hardirq.h"
11562 extern void irq_exit(void);
11563 # 6 "include/asm-generic/local.h" 2
11564 # 22 "include/asm-generic/local.h"
11569 # 5 "include/asm/local.h" 2
11570 # 21 "include/linux/module.h" 2
11572 # 1 "include/asm/module.h" 1
11573 # 12 "include/asm/module.h"
11574 struct mod_arch_specific {
11575 Elf32_Shdr *text_l1;
11576 Elf32_Shdr *data_a_l1;
11577 Elf32_Shdr *bss_a_l1;
11578 Elf32_Shdr *data_b_l1;
11579 Elf32_Shdr *bss_b_l1;
11581 # 23 "include/linux/module.h" 2
11582 # 34 "include/linux/module.h"
11583 struct kernel_symbol
11585 unsigned long value;
11589 struct modversion_info
11592 char name[(64 - sizeof(unsigned long))];
11597 struct module_attribute {
11598 struct attribute attr;
11599 ssize_t (*show)(struct module_attribute *, struct module *, char *);
11600 ssize_t (*store)(struct module_attribute *, struct module *,
11601 const char *, size_t count);
11602 void (*setup)(struct module *, const char *);
11603 int (*test)(struct module *);
11604 void (*free)(struct module *);
11607 struct module_kobject
11609 struct kobject kobj;
11610 struct module *mod;
11614 extern int init_module(void);
11615 extern void cleanup_module(void);
11618 struct exception_table_entry;
11620 const struct exception_table_entry *
11621 search_extable(const struct exception_table_entry *first,
11622 const struct exception_table_entry *last,
11623 unsigned long value);
11624 void sort_extable(struct exception_table_entry *start,
11625 struct exception_table_entry *finish);
11626 void sort_main_extable(void);
11628 extern struct subsystem module_subsys;
11629 # 165 "include/linux/module.h"
11630 const struct exception_table_entry *search_exception_tables(unsigned long add);
11632 struct notifier_block;
11637 void *__symbol_get(const char *symbol);
11638 void *__symbol_get_gpl(const char *symbol);
11639 # 222 "include/linux/module.h"
11648 MODULE_STATE_COMING,
11649 MODULE_STATE_GOING,
11653 struct module_sect_attr
11655 struct module_attribute mattr;
11657 unsigned long address;
11660 struct module_sect_attrs
11662 struct attribute_group grp;
11664 struct module_sect_attr attrs[0];
11667 struct module_param_attrs;
11671 enum module_state state;
11674 struct list_head list;
11677 char name[(64 - sizeof(unsigned long))];
11680 struct module_kobject mkobj;
11681 struct module_param_attrs *param_attrs;
11682 struct module_attribute *modinfo_attrs;
11683 const char *version;
11684 const char *srcversion;
11687 const struct kernel_symbol *syms;
11688 unsigned int num_syms;
11689 const unsigned long *crcs;
11692 const struct kernel_symbol *gpl_syms;
11693 unsigned int num_gpl_syms;
11694 const unsigned long *gpl_crcs;
11697 const struct kernel_symbol *unused_syms;
11698 unsigned int num_unused_syms;
11699 const unsigned long *unused_crcs;
11701 const struct kernel_symbol *unused_gpl_syms;
11702 unsigned int num_unused_gpl_syms;
11703 const unsigned long *unused_gpl_crcs;
11706 const struct kernel_symbol *gpl_future_syms;
11707 unsigned int num_gpl_future_syms;
11708 const unsigned long *gpl_future_crcs;
11711 unsigned int num_exentries;
11712 const struct exception_table_entry *extable;
11724 unsigned long init_size, core_size;
11727 unsigned long init_text_size, core_text_size;
11733 struct mod_arch_specific arch;
11738 unsigned int taints;
11742 struct module_ref ref[1];
11745 struct list_head modules_which_use_me;
11748 struct task_struct *waiter;
11751 void (*exit)(void);
11757 unsigned long num_symtab;
11761 struct module_sect_attrs *sect_attrs;
11775 static inline __attribute__((always_inline)) int module_is_live(struct module *mod)
11777 return mod->state != MODULE_STATE_GOING;
11781 struct module *module_text_address(unsigned long addr);
11782 struct module *__module_text_address(unsigned long addr);
11783 int is_module_address(unsigned long addr);
11787 struct module *module_get_kallsym(unsigned int symnum, unsigned long *value,
11788 char *type, char *name, size_t namelen);
11791 unsigned long module_kallsyms_lookup_name(const char *name);
11793 int is_exported(const char *name, const struct module *mod);
11795 extern void __module_put_and_exit(struct module *mod, long code)
11796 __attribute__((noreturn));
11800 unsigned int module_refcount(struct module *mod);
11801 void __symbol_put(const char *symbol);
11803 void symbol_put_addr(void *addr);
11807 static inline __attribute__((always_inline)) void __module_get(struct module *module)
11810 do { if (__builtin_expect(!!((module_refcount(module) == 0)!=0), 0)) do { dump_stack(); printk("<4>" "\nkernel BUG at %s:%d!\n", "include/linux/module.h", 392); panic("BUG!"); } while (0); } while(0);
11811 atomic_long_inc(&(&module->ref[({ do { } while (0); 0; })].count)->a);
11816 static inline __attribute__((always_inline)) int try_module_get(struct module *module)
11821 unsigned int cpu = ({ do { } while (0); 0; });
11822 if (__builtin_expect(!!(module_is_live(module)), 1))
11823 atomic_long_inc(&(&module->ref[cpu].count)->a);
11831 static inline __attribute__((always_inline)) void module_put(struct module *module)
11834 unsigned int cpu = ({ do { } while (0); 0; });
11835 atomic_long_dec(&(&module->ref[cpu].count)->a);
11837 if (__builtin_expect(!!(!module_is_live(module)), 0))
11838 wake_up_process(module->waiter);
11842 # 459 "include/linux/module.h"
11843 const char *module_address_lookup(unsigned long addr,
11844 unsigned long *symbolsize,
11845 unsigned long *offset,
11849 const struct exception_table_entry *search_module_extables(unsigned long addr);
11851 int register_module_notifier(struct notifier_block * nb);
11852 int unregister_module_notifier(struct notifier_block * nb);
11854 extern void print_modules(void);
11856 struct device_driver;
11857 void module_add_driver(struct module *, struct device_driver *);
11858 void module_remove_driver(struct device_driver *);
11859 # 50 "net/ipv4/ip_output.c" 2
11867 # 1 "include/linux/socket.h" 1
11868 # 11 "include/linux/socket.h"
11869 struct __kernel_sockaddr_storage {
11870 unsigned short ss_family;
11872 char __data[128 - sizeof(unsigned short)];
11875 } __attribute__ ((aligned((__alignof__ (struct sockaddr *)))));
11879 # 1 "include/asm/socket.h" 1
11883 # 1 "include/asm/sockios.h" 1
11884 # 5 "include/asm/socket.h" 2
11885 # 22 "include/linux/socket.h" 2
11886 # 1 "include/linux/sockios.h" 1
11887 # 23 "include/linux/socket.h" 2
11892 extern int sysctl_somaxconn;
11895 extern void socket_seq_show(struct seq_file *seq);
11898 typedef unsigned short sa_family_t;
11905 sa_family_t sa_family;
11913 # 57 "include/linux/socket.h"
11917 struct iovec * msg_iov;
11918 __kernel_size_t msg_iovlen;
11919 void * msg_control;
11920 __kernel_size_t msg_controllen;
11921 unsigned msg_flags;
11931 __kernel_size_t cmsg_len;
11935 # 130 "include/linux/socket.h"
11936 static inline __attribute__((always_inline)) struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size,
11937 struct cmsghdr *__cmsg)
11939 struct cmsghdr * __ptr;
11941 __ptr = (struct cmsghdr*)(((unsigned char *) __cmsg) + ( ((__cmsg->cmsg_len)+sizeof(long)-1) & ~(sizeof(long)-1) ));
11942 if ((unsigned long)((char*)(__ptr+1) - (char *) __ctl) > __size)
11943 return (struct cmsghdr *)0;
11948 static inline __attribute__((always_inline)) struct cmsghdr * cmsg_nxthdr (struct msghdr *__msg, struct cmsghdr *__cmsg)
11950 return __cmsg_nxthdr(__msg->msg_control, __msg->msg_controllen, __cmsg);
11964 # 289 "include/linux/socket.h"
11965 extern int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len);
11966 extern int memcpy_fromiovecend(unsigned char *kdata, struct iovec *iov,
11967 int offset, int len);
11968 extern int csum_partial_copy_fromiovecend(unsigned char *kdata,
11971 unsigned int len, int *csump);
11973 extern int verify_iovec(struct msghdr *m, struct iovec *iov, char *address, int mode);
11974 extern int memcpy_toiovec(struct iovec *v, unsigned char *kdata, int len);
11975 extern int move_addr_to_user(void *kaddr, int klen, void *uaddr, int *ulen);
11976 extern int move_addr_to_kernel(void *uaddr, int ulen, void *kaddr);
11977 extern int put_cmsg(struct msghdr*, int level, int type, int len, void *data);
11978 # 58 "net/ipv4/ip_output.c" 2
11980 # 1 "include/linux/in.h" 1
11981 # 25 "include/linux/in.h"
12000 IPPROTO_BEETPH = 94,
12003 IPPROTO_COMP = 108,
12004 IPPROTO_SCTP = 132,
12015 # 113 "include/linux/in.h"
12018 struct in_addr imr_multiaddr;
12019 struct in_addr imr_interface;
12024 struct in_addr imr_multiaddr;
12025 struct in_addr imr_address;
12029 struct ip_mreq_source {
12030 __be32 imr_multiaddr;
12031 __be32 imr_interface;
12032 __be32 imr_sourceaddr;
12035 struct ip_msfilter {
12036 __be32 imsf_multiaddr;
12037 __be32 imsf_interface;
12040 __be32 imsf_slist[1];
12049 __u32 gr_interface;
12050 struct __kernel_sockaddr_storage gr_group;
12053 struct group_source_req
12055 __u32 gsr_interface;
12056 struct __kernel_sockaddr_storage gsr_group;
12057 struct __kernel_sockaddr_storage gsr_source;
12060 struct group_filter
12062 __u32 gf_interface;
12063 struct __kernel_sockaddr_storage gf_group;
12066 struct __kernel_sockaddr_storage gf_slist[1];
12076 struct in_addr ipi_spec_dst;
12077 struct in_addr ipi_addr;
12082 struct sockaddr_in {
12083 sa_family_t sin_family;
12085 struct in_addr sin_addr;
12088 unsigned char __pad[16 - sizeof(short int) -
12089 sizeof(unsigned short int) - sizeof(struct in_addr)];
12091 # 60 "net/ipv4/ip_output.c" 2
12092 # 1 "include/linux/inet.h" 1
12093 # 48 "include/linux/inet.h"
12094 extern __be32 in_aton(const char *str);
12095 extern int in4_pton(const char *src, int srclen, u8 *dst, char delim, const char **end);
12096 extern int in6_pton(const char *src, int srclen, u8 *dst, char delim, const char **end);
12097 # 61 "net/ipv4/ip_output.c" 2
12098 # 1 "include/linux/netdevice.h" 1
12099 # 28 "include/linux/netdevice.h"
12100 # 1 "include/linux/if.h" 1
12101 # 27 "include/linux/if.h"
12102 # 1 "include/linux/hdlc/ioctl.h" 1
12103 # 37 "include/linux/hdlc/ioctl.h"
12105 unsigned int clock_rate;
12106 unsigned int clock_type;
12107 unsigned short loopback;
12108 } sync_serial_settings;
12111 unsigned int clock_rate;
12112 unsigned int clock_type;
12113 unsigned short loopback;
12114 unsigned int slot_map;
12118 unsigned short encoding;
12119 unsigned short parity;
12128 unsigned short lmi;
12129 unsigned short dce;
12139 }fr_proto_pvc_info;
12142 unsigned int interval;
12143 unsigned int timeout;
12145 # 28 "include/linux/if.h" 2
12146 # 93 "include/linux/if.h"
12149 IF_OPER_NOTPRESENT,
12151 IF_OPER_LOWERLAYERDOWN,
12159 IF_LINK_MODE_DEFAULT,
12160 IF_LINK_MODE_DORMANT,
12162 # 119 "include/linux/if.h"
12165 unsigned long mem_start;
12166 unsigned long mem_end;
12167 unsigned short base_addr;
12170 unsigned char port;
12180 raw_hdlc_proto *raw_hdlc;
12181 cisco_proto *cisco;
12183 fr_proto_pvc *fr_pvc;
12184 fr_proto_pvc_info *fr_pvc_info;
12187 sync_serial_settings *sync;
12191 # 155 "include/linux/if.h"
12197 char ifrn_name[16];
12201 struct sockaddr ifru_addr;
12202 struct sockaddr ifru_dstaddr;
12203 struct sockaddr ifru_broadaddr;
12204 struct sockaddr ifru_netmask;
12205 struct sockaddr ifru_hwaddr;
12209 struct ifmap ifru_map;
12210 char ifru_slave[16];
12211 char ifru_newname[16];
12213 struct if_settings ifru_settings;
12216 # 205 "include/linux/if.h"
12223 struct ifreq *ifcu_req;
12226 # 29 "include/linux/netdevice.h" 2
12227 # 1 "include/linux/if_ether.h" 1
12228 # 104 "include/linux/if_ether.h"
12230 unsigned char h_dest[6];
12231 unsigned char h_source[6];
12233 } __attribute__((packed));
12236 # 1 "include/linux/skbuff.h" 1
12237 # 26 "include/linux/skbuff.h"
12238 # 1 "include/linux/highmem.h" 1
12245 # 1 "include/asm/cacheflush.h" 1
12246 # 34 "include/asm/cacheflush.h"
12247 # 1 "include/asm/cplb.h" 1
12248 # 35 "include/asm/cacheflush.h" 2
12250 extern void blackfin_icache_dcache_flush_range(unsigned int, unsigned int);
12251 extern void blackfin_icache_flush_range(unsigned int, unsigned int);
12252 extern void blackfin_dcache_flush_range(unsigned int, unsigned int);
12253 extern void blackfin_dcache_invalidate_range(unsigned int, unsigned int);
12254 extern void blackfin_dflush_page(void *);
12255 # 50 "include/asm/cacheflush.h"
12256 static inline __attribute__((always_inline)) void flush_icache_range(unsigned start, unsigned end)
12261 blackfin_icache_flush_range((start), (end));
12262 # 70 "include/asm/cacheflush.h"
12264 # 8 "include/linux/highmem.h" 2
12267 static inline __attribute__((always_inline)) void flush_anon_page(struct page *page, unsigned long vmaddr)
12273 static inline __attribute__((always_inline)) void flush_kernel_dcache_page(struct page *page)
12276 # 31 "include/linux/highmem.h"
12277 static inline __attribute__((always_inline)) unsigned int nr_free_highpages(void) { return 0; }
12282 static inline __attribute__((always_inline)) void *kmap(struct page *page)
12284 do { do { } while (0); } while (0);
12285 return lowmem_page_address(page);
12287 # 53 "include/linux/highmem.h"
12288 static inline __attribute__((always_inline)) void clear_user_highpage(struct page *page, unsigned long vaddr)
12290 void *addr = lowmem_page_address(page);
12291 memset((addr), 0, (1UL << 12));
12294 __asm__ __volatile__("": : :"memory");
12298 static inline __attribute__((always_inline)) struct page *
12299 alloc_zeroed_user_highpage(struct vm_area_struct *vma, unsigned long vaddr)
12301 struct page *page = alloc_pages_node(((0)), ((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u) | (( gfp_t)0x20000u) | (( gfp_t)0x02u)), 0);
12304 clear_user_highpage(page, vaddr);
12310 static inline __attribute__((always_inline)) void clear_highpage(struct page *page)
12312 void *kaddr = lowmem_page_address(page);
12313 memset((kaddr), 0, (1UL << 12));
12320 static inline __attribute__((always_inline)) void memclear_highpage_flush(struct page *page, unsigned int offset, unsigned int size)
12324 do { if (__builtin_expect(!!((offset + size > (1UL << 12))!=0), 0)) do { dump_stack(); printk("<4>" "\nkernel BUG at %s:%d!\n", "include/linux/highmem.h", 89); panic("BUG!"); } while (0); } while(0);
12326 kaddr = lowmem_page_address(page);
12327 memset((char *)kaddr + offset, 0, size);
12332 static inline __attribute__((always_inline)) void copy_user_highpage(struct page *to, struct page *from, unsigned long vaddr)
12336 vfrom = lowmem_page_address(from);
12337 vto = lowmem_page_address(to);
12338 memcpy((vto), (vfrom), (1UL << 12));
12342 __asm__ __volatile__("": : :"memory");
12345 static inline __attribute__((always_inline)) void copy_highpage(struct page *to, struct page *from)
12349 vfrom = lowmem_page_address(from);
12350 vto = lowmem_page_address(to);
12351 memcpy((vto), (vfrom), (1UL << 12));
12355 # 27 "include/linux/skbuff.h" 2
12356 # 1 "include/linux/poll.h" 1
12360 # 1 "include/asm/poll.h" 1
12361 # 18 "include/asm/poll.h"
12367 # 5 "include/linux/poll.h" 2
12368 # 23 "include/linux/poll.h"
12369 struct poll_table_struct;
12374 typedef void (*poll_queue_proc)(struct file *, wait_queue_head_t *, struct poll_table_struct *);
12376 typedef struct poll_table_struct {
12377 poll_queue_proc qproc;
12380 static inline __attribute__((always_inline)) void poll_wait(struct file * filp, wait_queue_head_t * wait_address, poll_table *p)
12382 if (p && wait_address)
12383 p->qproc(filp, wait_address, p);
12386 static inline __attribute__((always_inline)) void init_poll_funcptr(poll_table *pt, poll_queue_proc qproc)
12391 struct poll_table_entry {
12392 struct file * filp;
12394 wait_queue_head_t * wait_address;
12400 struct poll_wqueues {
12402 struct poll_table_page * table;
12405 struct poll_table_entry inline_entries[((832 - 256) / sizeof(struct poll_table_entry))];
12408 extern void poll_initwait(struct poll_wqueues *pwq);
12409 extern void poll_freewait(struct poll_wqueues *pwq);
12416 unsigned long *in, *out, *ex;
12417 unsigned long *res_in, *res_out, *res_ex;
12419 # 87 "include/linux/poll.h"
12420 static inline __attribute__((always_inline))
12421 int get_fd_set(unsigned long nr, void *ufdset, unsigned long *fdset)
12423 nr = ((((nr)+(8*sizeof(long))-1)/(8*sizeof(long)))*sizeof(long));
12425 return copy_from_user(fdset, ufdset, nr) ? -14 : 0;
12427 memset(fdset, 0, nr);
12431 static inline __attribute__((always_inline)) unsigned long __attribute__((warn_unused_result))
12432 set_fd_set(unsigned long nr, void *ufdset, unsigned long *fdset)
12435 return copy_to_user(ufdset, fdset, ((((nr)+(8*sizeof(long))-1)/(8*sizeof(long)))*sizeof(long)));
12439 static inline __attribute__((always_inline))
12440 void zero_fd_set(unsigned long nr, unsigned long *fdset)
12442 memset(fdset, 0, ((((nr)+(8*sizeof(long))-1)/(8*sizeof(long)))*sizeof(long)));
12447 extern int do_select(int n, fd_set_bits *fds, s64 *timeout);
12448 extern int do_sys_poll(struct pollfd * ufds, unsigned int nfds,
12450 # 28 "include/linux/skbuff.h" 2
12451 # 1 "include/linux/net.h" 1
12452 # 24 "include/linux/net.h"
12453 struct poll_table_struct;
12455 # 47 "include/linux/net.h"
12468 # 1 "include/linux/random.h" 1
12469 # 35 "include/linux/random.h"
12470 struct rand_pool_info {
12480 extern void rand_initialize_irq(int irq);
12482 extern void add_input_randomness(unsigned int type, unsigned int code,
12483 unsigned int value);
12484 extern void add_interrupt_randomness(int irq);
12486 extern void get_random_bytes(void *buf, int nbytes);
12487 void generate_random_uuid(unsigned char uuid_out[16]);
12489 extern __u32 secure_ip_id(__u32 daddr);
12490 extern u32 secure_ipv4_port_ephemeral(__u32 saddr, __u32 daddr, __u16 dport);
12491 extern u32 secure_ipv6_port_ephemeral(const __u32 *saddr, const __u32 *daddr,
12493 extern __u32 secure_tcp_sequence_number(__u32 saddr, __u32 daddr,
12494 __u16 sport, __u16 dport);
12495 extern __u32 secure_tcpv6_sequence_number(__u32 *saddr, __u32 *daddr,
12496 __u16 sport, __u16 dport);
12497 extern u64 secure_dccp_sequence_number(__u32 saddr, __u32 daddr,
12498 __u16 sport, __u16 dport);
12501 extern struct file_operations random_fops, urandom_fops;
12504 unsigned int get_random_int(void);
12505 unsigned long randomize_range(unsigned long start, unsigned long end, unsigned long len);
12507 u32 random32(void);
12508 void srandom32(u32 seed);
12509 # 60 "include/linux/net.h" 2
12510 # 83 "include/linux/net.h"
12516 SOCK_SEQPACKET = 5,
12520 # 108 "include/linux/net.h"
12522 socket_state state;
12523 unsigned long flags;
12524 const struct proto_ops *ops;
12525 struct fasync_struct *fasync_list;
12528 wait_queue_head_t wait;
12532 struct vm_area_struct;
12541 struct module *owner;
12542 int (*release) (struct socket *sock);
12543 int (*bind) (struct socket *sock,
12544 struct sockaddr *myaddr,
12546 int (*connect) (struct socket *sock,
12547 struct sockaddr *vaddr,
12548 int sockaddr_len, int flags);
12549 int (*socketpair)(struct socket *sock1,
12550 struct socket *sock2);
12551 int (*accept) (struct socket *sock,
12552 struct socket *newsock, int flags);
12553 int (*getname) (struct socket *sock,
12554 struct sockaddr *addr,
12555 int *sockaddr_len, int peer);
12556 unsigned int (*poll) (struct file *file, struct socket *sock,
12557 struct poll_table_struct *wait);
12558 int (*ioctl) (struct socket *sock, unsigned int cmd,
12559 unsigned long arg);
12560 int (*compat_ioctl) (struct socket *sock, unsigned int cmd,
12561 unsigned long arg);
12562 int (*listen) (struct socket *sock, int len);
12563 int (*shutdown) (struct socket *sock, int flags);
12564 int (*setsockopt)(struct socket *sock, int level,
12565 int optname, char *optval, int optlen);
12566 int (*getsockopt)(struct socket *sock, int level,
12567 int optname, char *optval, int *optlen);
12568 int (*compat_setsockopt)(struct socket *sock, int level,
12569 int optname, char *optval, int optlen);
12570 int (*compat_getsockopt)(struct socket *sock, int level,
12571 int optname, char *optval, int *optlen);
12572 int (*sendmsg) (struct kiocb *iocb, struct socket *sock,
12573 struct msghdr *m, size_t total_len);
12574 int (*recvmsg) (struct kiocb *iocb, struct socket *sock,
12575 struct msghdr *m, size_t total_len,
12577 int (*mmap) (struct file *file, struct socket *sock,
12578 struct vm_area_struct * vma);
12579 ssize_t (*sendpage) (struct socket *sock, struct page *page,
12580 int offset, size_t size, int flags);
12583 struct net_proto_family {
12585 int (*create)(struct socket *sock, int protocol);
12586 struct module *owner;
12592 extern int sock_wake_async(struct socket *sk, int how, int band);
12593 extern int sock_register(const struct net_proto_family *fam);
12594 extern void sock_unregister(int family);
12595 extern int sock_create(int family, int type, int proto,
12596 struct socket **res);
12597 extern int sock_create_kern(int family, int type, int proto,
12598 struct socket **res);
12599 extern int sock_create_lite(int family, int type, int proto,
12600 struct socket **res);
12601 extern void sock_release(struct socket *sock);
12602 extern int sock_sendmsg(struct socket *sock, struct msghdr *msg,
12604 extern int sock_recvmsg(struct socket *sock, struct msghdr *msg,
12605 size_t size, int flags);
12606 extern int sock_map_fd(struct socket *sock);
12607 extern struct socket *sockfd_lookup(int fd, int *err);
12609 extern int net_ratelimit(void);
12614 extern int kernel_sendmsg(struct socket *sock, struct msghdr *msg,
12615 struct kvec *vec, size_t num, size_t len);
12616 extern int kernel_recvmsg(struct socket *sock, struct msghdr *msg,
12617 struct kvec *vec, size_t num,
12618 size_t len, int flags);
12620 extern int kernel_bind(struct socket *sock, struct sockaddr *addr,
12622 extern int kernel_listen(struct socket *sock, int backlog);
12623 extern int kernel_accept(struct socket *sock, struct socket **newsock,
12625 extern int kernel_connect(struct socket *sock, struct sockaddr *addr,
12626 int addrlen, int flags);
12627 extern int kernel_getsockname(struct socket *sock, struct sockaddr *addr,
12629 extern int kernel_getpeername(struct socket *sock, struct sockaddr *addr,
12631 extern int kernel_getsockopt(struct socket *sock, int level, int optname,
12632 char *optval, int *optlen);
12633 extern int kernel_setsockopt(struct socket *sock, int level, int optname,
12634 char *optval, int optlen);
12635 extern int kernel_sendpage(struct socket *sock, struct page *page, int offset,
12636 size_t size, int flags);
12637 extern int kernel_sock_ioctl(struct socket *sock, int cmd, unsigned long arg);
12638 # 316 "include/linux/net.h"
12639 # 1 "include/linux/sysctl.h" 1
12640 # 32 "include/linux/sysctl.h"
12649 struct __sysctl_args {
12656 unsigned long __unused[4];
12658 # 61 "include/linux/sysctl.h"
12682 INOTIFY_MAX_USER_INSTANCES=1,
12683 INOTIFY_MAX_USER_WATCHES=2,
12684 INOTIFY_MAX_QUEUED_EVENTS=3
12701 KERN_REALROOTDEV=16,
12703 KERN_SPARC_REBOOT=21,
12707 KERN_PPC_HTABRECLAIM=25,
12708 KERN_PPC_ZEROPAGED=26,
12709 KERN_PPC_POWERSAVE_NAP=27,
12711 KERN_SG_BIG_BUFF=29,
12723 KERN_MAX_THREADS=39,
12728 KERN_SPARC_STOP_A=44,
12730 KERN_OVERFLOWUID=46,
12731 KERN_OVERFLOWGID=47,
12734 KERN_IEEE_EMULATION_WARNINGS=50,
12735 KERN_S390_USER_DEBUG_LOGGING=51,
12736 KERN_CORE_USES_PID=52,
12740 KERN_CORE_PATTERN=56,
12741 KERN_PANIC_ON_OOPS=57,
12742 KERN_HPPA_PWRSW=58,
12743 KERN_HPPA_UNALIGNED=59,
12744 KERN_PRINTK_RATELIMIT=60,
12745 KERN_PRINTK_RATELIMIT_BURST=61,
12747 KERN_NGROUPS_MAX=63,
12748 KERN_SPARC_SCONS_PWROFF=64,
12750 KERN_UNKNOWN_NMI_PANIC=66,
12751 KERN_BOOTLOADER_TYPE=67,
12753 KERN_SETUID_DUMPABLE=69,
12754 KERN_SPIN_RETRY=70,
12755 KERN_ACPI_VIDEO_FLAGS=71,
12756 KERN_IA64_UNALIGNED=72,
12757 KERN_COMPAT_LOG=73,
12758 KERN_MAX_LOCK_DEPTH=74,
12759 KERN_NMI_WATCHDOG=75,
12760 KERN_PANIC_ON_NMI=76,
12772 VM_OVERCOMMIT_MEMORY=5,
12777 VM_PAGE_CLUSTER=10,
12778 VM_DIRTY_BACKGROUND=11,
12781 VM_DIRTY_EXPIRE_CS=14,
12782 VM_NR_PDFLUSH_THREADS=15,
12783 VM_OVERCOMMIT_RATIO=16,
12785 VM_HUGETLB_PAGES=18,
12787 VM_LOWMEM_RESERVE_RATIO=20,
12788 VM_MIN_FREE_KBYTES=21,
12789 VM_MAX_MAP_COUNT=22,
12792 VM_HUGETLB_GROUP=25,
12793 VM_VFS_CACHE_PRESSURE=26,
12794 VM_LEGACY_VA_LAYOUT=27,
12795 VM_SWAP_TOKEN_TIMEOUT=28,
12796 VM_DROP_PAGECACHE=29,
12797 VM_PERCPU_PAGELIST_FRACTION=30,
12798 VM_ZONE_RECLAIM_MODE=31,
12799 VM_MIN_UNMAPPED=32,
12800 VM_PANIC_ON_OOM=33,
12801 VM_VDSO_ENABLED=34,
12835 RANDOM_ENTROPY_COUNT=2,
12836 RANDOM_READ_THRESH=3,
12837 RANDOM_WRITE_THRESH=4,
12852 BUS_ISA_MEM_BASE=1,
12853 BUS_ISA_PORT_BASE=2,
12854 BUS_ISA_PORT_SHIFT=3
12860 NET_CORE_WMEM_MAX=1,
12861 NET_CORE_RMEM_MAX=2,
12862 NET_CORE_WMEM_DEFAULT=3,
12863 NET_CORE_RMEM_DEFAULT=4,
12865 NET_CORE_MAX_BACKLOG=6,
12866 NET_CORE_FASTROUTE=7,
12867 NET_CORE_MSG_COST=8,
12868 NET_CORE_MSG_BURST=9,
12869 NET_CORE_OPTMEM_MAX=10,
12870 NET_CORE_HOT_LIST_LENGTH=11,
12871 NET_CORE_DIVERT_VERSION=12,
12872 NET_CORE_NO_CONG_THRESH=13,
12873 NET_CORE_NO_CONG=14,
12874 NET_CORE_LO_CONG=15,
12875 NET_CORE_MOD_CONG=16,
12876 NET_CORE_DEV_WEIGHT=17,
12877 NET_CORE_SOMAXCONN=18,
12878 NET_CORE_BUDGET=19,
12879 NET_CORE_AEVENT_ETIME=20,
12880 NET_CORE_AEVENT_RSEQTH=21,
12891 NET_UNIX_DESTROY_DELAY=1,
12892 NET_UNIX_DELETE_DELAY=2,
12893 NET_UNIX_MAX_DGRAM_QLEN=3,
12899 NET_NF_CONNTRACK_MAX=1,
12900 NET_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT=2,
12901 NET_NF_CONNTRACK_TCP_TIMEOUT_SYN_RECV=3,
12902 NET_NF_CONNTRACK_TCP_TIMEOUT_ESTABLISHED=4,
12903 NET_NF_CONNTRACK_TCP_TIMEOUT_FIN_WAIT=5,
12904 NET_NF_CONNTRACK_TCP_TIMEOUT_CLOSE_WAIT=6,
12905 NET_NF_CONNTRACK_TCP_TIMEOUT_LAST_ACK=7,
12906 NET_NF_CONNTRACK_TCP_TIMEOUT_TIME_WAIT=8,
12907 NET_NF_CONNTRACK_TCP_TIMEOUT_CLOSE=9,
12908 NET_NF_CONNTRACK_UDP_TIMEOUT=10,
12909 NET_NF_CONNTRACK_UDP_TIMEOUT_STREAM=11,
12910 NET_NF_CONNTRACK_ICMP_TIMEOUT=12,
12911 NET_NF_CONNTRACK_GENERIC_TIMEOUT=13,
12912 NET_NF_CONNTRACK_BUCKETS=14,
12913 NET_NF_CONNTRACK_LOG_INVALID=15,
12914 NET_NF_CONNTRACK_TCP_TIMEOUT_MAX_RETRANS=16,
12915 NET_NF_CONNTRACK_TCP_LOOSE=17,
12916 NET_NF_CONNTRACK_TCP_BE_LIBERAL=18,
12917 NET_NF_CONNTRACK_TCP_MAX_RETRANS=19,
12918 NET_NF_CONNTRACK_SCTP_TIMEOUT_CLOSED=20,
12919 NET_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_WAIT=21,
12920 NET_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_ECHOED=22,
12921 NET_NF_CONNTRACK_SCTP_TIMEOUT_ESTABLISHED=23,
12922 NET_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_SENT=24,
12923 NET_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_RECD=25,
12924 NET_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_ACK_SENT=26,
12925 NET_NF_CONNTRACK_COUNT=27,
12926 NET_NF_CONNTRACK_ICMPV6_TIMEOUT=28,
12927 NET_NF_CONNTRACK_FRAG6_TIMEOUT=29,
12928 NET_NF_CONNTRACK_FRAG6_LOW_THRESH=30,
12929 NET_NF_CONNTRACK_FRAG6_HIGH_THRESH=31,
12930 NET_NF_CONNTRACK_CHECKSUM=32,
12937 NET_IPV4_FORWARD=8,
12938 NET_IPV4_DYNADDR=9,
12943 NET_IPV4_FIB_HASH=19,
12944 NET_IPV4_NETFILTER=20,
12946 NET_IPV4_TCP_TIMESTAMPS=33,
12947 NET_IPV4_TCP_WINDOW_SCALING=34,
12948 NET_IPV4_TCP_SACK=35,
12949 NET_IPV4_TCP_RETRANS_COLLAPSE=36,
12950 NET_IPV4_DEFAULT_TTL=37,
12951 NET_IPV4_AUTOCONFIG=38,
12952 NET_IPV4_NO_PMTU_DISC=39,
12953 NET_IPV4_TCP_SYN_RETRIES=40,
12954 NET_IPV4_IPFRAG_HIGH_THRESH=41,
12955 NET_IPV4_IPFRAG_LOW_THRESH=42,
12956 NET_IPV4_IPFRAG_TIME=43,
12957 NET_IPV4_TCP_MAX_KA_PROBES=44,
12958 NET_IPV4_TCP_KEEPALIVE_TIME=45,
12959 NET_IPV4_TCP_KEEPALIVE_PROBES=46,
12960 NET_IPV4_TCP_RETRIES1=47,
12961 NET_IPV4_TCP_RETRIES2=48,
12962 NET_IPV4_TCP_FIN_TIMEOUT=49,
12963 NET_IPV4_IP_MASQ_DEBUG=50,
12964 NET_TCP_SYNCOOKIES=51,
12966 NET_TCP_RFC1337=53,
12967 NET_TCP_SYN_TAILDROP=54,
12968 NET_TCP_MAX_SYN_BACKLOG=55,
12969 NET_IPV4_LOCAL_PORT_RANGE=56,
12970 NET_IPV4_ICMP_ECHO_IGNORE_ALL=57,
12971 NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS=58,
12972 NET_IPV4_ICMP_SOURCEQUENCH_RATE=59,
12973 NET_IPV4_ICMP_DESTUNREACH_RATE=60,
12974 NET_IPV4_ICMP_TIMEEXCEED_RATE=61,
12975 NET_IPV4_ICMP_PARAMPROB_RATE=62,
12976 NET_IPV4_ICMP_ECHOREPLY_RATE=63,
12977 NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES=64,
12978 NET_IPV4_IGMP_MAX_MEMBERSHIPS=65,
12979 NET_TCP_TW_RECYCLE=66,
12980 NET_IPV4_ALWAYS_DEFRAG=67,
12981 NET_IPV4_TCP_KEEPALIVE_INTVL=68,
12982 NET_IPV4_INET_PEER_THRESHOLD=69,
12983 NET_IPV4_INET_PEER_MINTTL=70,
12984 NET_IPV4_INET_PEER_MAXTTL=71,
12985 NET_IPV4_INET_PEER_GC_MINTIME=72,
12986 NET_IPV4_INET_PEER_GC_MAXTIME=73,
12987 NET_TCP_ORPHAN_RETRIES=74,
12988 NET_TCP_ABORT_ON_OVERFLOW=75,
12989 NET_TCP_SYNACK_RETRIES=76,
12990 NET_TCP_MAX_ORPHANS=77,
12991 NET_TCP_MAX_TW_BUCKETS=78,
12993 NET_TCP_REORDERING=80,
12999 NET_TCP_APP_WIN=86,
13000 NET_TCP_ADV_WIN_SCALE=87,
13001 NET_IPV4_NONLOCAL_BIND=88,
13002 NET_IPV4_ICMP_RATELIMIT=89,
13003 NET_IPV4_ICMP_RATEMASK=90,
13004 NET_TCP_TW_REUSE=91,
13006 NET_TCP_LOW_LATENCY=93,
13007 NET_IPV4_IPFRAG_SECRET_INTERVAL=94,
13008 NET_IPV4_IGMP_MAX_MSF=96,
13009 NET_TCP_NO_METRICS_SAVE=97,
13010 NET_TCP_DEFAULT_WIN_SCALE=105,
13011 NET_TCP_MODERATE_RCVBUF=106,
13012 NET_TCP_TSO_WIN_DIVISOR=107,
13013 NET_TCP_BIC_BETA=108,
13014 NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR=109,
13015 NET_TCP_CONG_CONTROL=110,
13017 NET_IPV4_IPFRAG_MAX_DIST=112,
13018 NET_TCP_MTU_PROBING=113,
13019 NET_TCP_BASE_MSS=114,
13020 NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS=115,
13021 NET_TCP_DMA_COPYBREAK=116,
13022 NET_TCP_SLOW_START_AFTER_IDLE=117,
13023 NET_CIPSOV4_CACHE_ENABLE=118,
13024 NET_CIPSOV4_CACHE_BUCKET_SIZE=119,
13025 NET_CIPSOV4_RBM_OPTFMT=120,
13026 NET_CIPSOV4_RBM_STRICTVALID=121,
13030 NET_IPV4_ROUTE_FLUSH=1,
13031 NET_IPV4_ROUTE_MIN_DELAY=2,
13032 NET_IPV4_ROUTE_MAX_DELAY=3,
13033 NET_IPV4_ROUTE_GC_THRESH=4,
13034 NET_IPV4_ROUTE_MAX_SIZE=5,
13035 NET_IPV4_ROUTE_GC_MIN_INTERVAL=6,
13036 NET_IPV4_ROUTE_GC_TIMEOUT=7,
13037 NET_IPV4_ROUTE_GC_INTERVAL=8,
13038 NET_IPV4_ROUTE_REDIRECT_LOAD=9,
13039 NET_IPV4_ROUTE_REDIRECT_NUMBER=10,
13040 NET_IPV4_ROUTE_REDIRECT_SILENCE=11,
13041 NET_IPV4_ROUTE_ERROR_COST=12,
13042 NET_IPV4_ROUTE_ERROR_BURST=13,
13043 NET_IPV4_ROUTE_GC_ELASTICITY=14,
13044 NET_IPV4_ROUTE_MTU_EXPIRES=15,
13045 NET_IPV4_ROUTE_MIN_PMTU=16,
13046 NET_IPV4_ROUTE_MIN_ADVMSS=17,
13047 NET_IPV4_ROUTE_SECRET_INTERVAL=18,
13048 NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS=19,
13053 NET_PROTO_CONF_ALL=-2,
13054 NET_PROTO_CONF_DEFAULT=-3
13061 NET_IPV4_CONF_FORWARDING=1,
13062 NET_IPV4_CONF_MC_FORWARDING=2,
13063 NET_IPV4_CONF_PROXY_ARP=3,
13064 NET_IPV4_CONF_ACCEPT_REDIRECTS=4,
13065 NET_IPV4_CONF_SECURE_REDIRECTS=5,
13066 NET_IPV4_CONF_SEND_REDIRECTS=6,
13067 NET_IPV4_CONF_SHARED_MEDIA=7,
13068 NET_IPV4_CONF_RP_FILTER=8,
13069 NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE=9,
13070 NET_IPV4_CONF_BOOTP_RELAY=10,
13071 NET_IPV4_CONF_LOG_MARTIANS=11,
13072 NET_IPV4_CONF_TAG=12,
13073 NET_IPV4_CONF_ARPFILTER=13,
13074 NET_IPV4_CONF_MEDIUM_ID=14,
13075 NET_IPV4_CONF_NOXFRM=15,
13076 NET_IPV4_CONF_NOPOLICY=16,
13077 NET_IPV4_CONF_FORCE_IGMP_VERSION=17,
13078 NET_IPV4_CONF_ARP_ANNOUNCE=18,
13079 NET_IPV4_CONF_ARP_IGNORE=19,
13080 NET_IPV4_CONF_PROMOTE_SECONDARIES=20,
13081 NET_IPV4_CONF_ARP_ACCEPT=21,
13082 __NET_IPV4_CONF_MAX
13088 NET_IPV4_NF_CONNTRACK_MAX=1,
13089 NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT=2,
13090 NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_SYN_RECV=3,
13091 NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_ESTABLISHED=4,
13092 NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_FIN_WAIT=5,
13093 NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_CLOSE_WAIT=6,
13094 NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_LAST_ACK=7,
13095 NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_TIME_WAIT=8,
13096 NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_CLOSE=9,
13097 NET_IPV4_NF_CONNTRACK_UDP_TIMEOUT=10,
13098 NET_IPV4_NF_CONNTRACK_UDP_TIMEOUT_STREAM=11,
13099 NET_IPV4_NF_CONNTRACK_ICMP_TIMEOUT=12,
13100 NET_IPV4_NF_CONNTRACK_GENERIC_TIMEOUT=13,
13101 NET_IPV4_NF_CONNTRACK_BUCKETS=14,
13102 NET_IPV4_NF_CONNTRACK_LOG_INVALID=15,
13103 NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_MAX_RETRANS=16,
13104 NET_IPV4_NF_CONNTRACK_TCP_LOOSE=17,
13105 NET_IPV4_NF_CONNTRACK_TCP_BE_LIBERAL=18,
13106 NET_IPV4_NF_CONNTRACK_TCP_MAX_RETRANS=19,
13107 NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_CLOSED=20,
13108 NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_WAIT=21,
13109 NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_ECHOED=22,
13110 NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_ESTABLISHED=23,
13111 NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_SENT=24,
13112 NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_RECD=25,
13113 NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_ACK_SENT=26,
13114 NET_IPV4_NF_CONNTRACK_COUNT=27,
13115 NET_IPV4_NF_CONNTRACK_CHECKSUM=28,
13124 NET_IPV6_BINDV6ONLY=20,
13125 NET_IPV6_IP6FRAG_HIGH_THRESH=21,
13126 NET_IPV6_IP6FRAG_LOW_THRESH=22,
13127 NET_IPV6_IP6FRAG_TIME=23,
13128 NET_IPV6_IP6FRAG_SECRET_INTERVAL=24,
13129 NET_IPV6_MLD_MAX_MSF=25,
13133 NET_IPV6_ROUTE_FLUSH=1,
13134 NET_IPV6_ROUTE_GC_THRESH=2,
13135 NET_IPV6_ROUTE_MAX_SIZE=3,
13136 NET_IPV6_ROUTE_GC_MIN_INTERVAL=4,
13137 NET_IPV6_ROUTE_GC_TIMEOUT=5,
13138 NET_IPV6_ROUTE_GC_INTERVAL=6,
13139 NET_IPV6_ROUTE_GC_ELASTICITY=7,
13140 NET_IPV6_ROUTE_MTU_EXPIRES=8,
13141 NET_IPV6_ROUTE_MIN_ADVMSS=9,
13142 NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS=10
13146 NET_IPV6_FORWARDING=1,
13147 NET_IPV6_HOP_LIMIT=2,
13149 NET_IPV6_ACCEPT_RA=4,
13150 NET_IPV6_ACCEPT_REDIRECTS=5,
13151 NET_IPV6_AUTOCONF=6,
13152 NET_IPV6_DAD_TRANSMITS=7,
13153 NET_IPV6_RTR_SOLICITS=8,
13154 NET_IPV6_RTR_SOLICIT_INTERVAL=9,
13155 NET_IPV6_RTR_SOLICIT_DELAY=10,
13156 NET_IPV6_USE_TEMPADDR=11,
13157 NET_IPV6_TEMP_VALID_LFT=12,
13158 NET_IPV6_TEMP_PREFERED_LFT=13,
13159 NET_IPV6_REGEN_MAX_RETRY=14,
13160 NET_IPV6_MAX_DESYNC_FACTOR=15,
13161 NET_IPV6_MAX_ADDRESSES=16,
13162 NET_IPV6_FORCE_MLD_VERSION=17,
13163 NET_IPV6_ACCEPT_RA_DEFRTR=18,
13164 NET_IPV6_ACCEPT_RA_PINFO=19,
13165 NET_IPV6_ACCEPT_RA_RTR_PREF=20,
13166 NET_IPV6_RTR_PROBE_INTERVAL=21,
13167 NET_IPV6_ACCEPT_RA_RT_INFO_MAX_PLEN=22,
13168 NET_IPV6_PROXY_NDP=23,
13174 NET_IPV6_ICMP_RATELIMIT=1
13179 NET_NEIGH_MCAST_SOLICIT=1,
13180 NET_NEIGH_UCAST_SOLICIT=2,
13181 NET_NEIGH_APP_SOLICIT=3,
13182 NET_NEIGH_RETRANS_TIME=4,
13183 NET_NEIGH_REACHABLE_TIME=5,
13184 NET_NEIGH_DELAY_PROBE_TIME=6,
13185 NET_NEIGH_GC_STALE_TIME=7,
13186 NET_NEIGH_UNRES_QLEN=8,
13187 NET_NEIGH_PROXY_QLEN=9,
13188 NET_NEIGH_ANYCAST_DELAY=10,
13189 NET_NEIGH_PROXY_DELAY=11,
13190 NET_NEIGH_LOCKTIME=12,
13191 NET_NEIGH_GC_INTERVAL=13,
13192 NET_NEIGH_GC_THRESH1=14,
13193 NET_NEIGH_GC_THRESH2=15,
13194 NET_NEIGH_GC_THRESH3=16,
13195 NET_NEIGH_RETRANS_TIME_MS=17,
13196 NET_NEIGH_REACHABLE_TIME_MS=18,
13202 NET_DCCP_DEFAULT=1,
13207 NET_DCCP_DEFAULT_SEQ_WINDOW = 1,
13208 NET_DCCP_DEFAULT_RX_CCID = 2,
13209 NET_DCCP_DEFAULT_TX_CCID = 3,
13210 NET_DCCP_DEFAULT_ACK_RATIO = 4,
13211 NET_DCCP_DEFAULT_SEND_ACKVEC = 5,
13212 NET_DCCP_DEFAULT_SEND_NDP = 6,
13217 NET_IPX_PPROP_BROADCASTING=1,
13218 NET_IPX_FORWARDING=2
13229 NET_LLC2_TIMEOUT=1,
13234 NET_LLC_STATION_ACK_TIMEOUT=1,
13239 NET_LLC2_ACK_TIMEOUT=1,
13240 NET_LLC2_P_TIMEOUT=2,
13241 NET_LLC2_REJ_TIMEOUT=3,
13242 NET_LLC2_BUSY_TIMEOUT=4,
13247 NET_ATALK_AARP_EXPIRY_TIME=1,
13248 NET_ATALK_AARP_TICK_TIME=2,
13249 NET_ATALK_AARP_RETRANSMIT_LIMIT=3,
13250 NET_ATALK_AARP_RESOLVE_TIME=4
13256 NET_NETROM_DEFAULT_PATH_QUALITY=1,
13257 NET_NETROM_OBSOLESCENCE_COUNT_INITIALISER=2,
13258 NET_NETROM_NETWORK_TTL_INITIALISER=3,
13259 NET_NETROM_TRANSPORT_TIMEOUT=4,
13260 NET_NETROM_TRANSPORT_MAXIMUM_TRIES=5,
13261 NET_NETROM_TRANSPORT_ACKNOWLEDGE_DELAY=6,
13262 NET_NETROM_TRANSPORT_BUSY_DELAY=7,
13263 NET_NETROM_TRANSPORT_REQUESTED_WINDOW_SIZE=8,
13264 NET_NETROM_TRANSPORT_NO_ACTIVITY_TIMEOUT=9,
13265 NET_NETROM_ROUTING_CONTROL=10,
13266 NET_NETROM_LINK_FAILS_COUNT=11,
13267 NET_NETROM_RESET=12
13272 NET_AX25_IP_DEFAULT_MODE=1,
13273 NET_AX25_DEFAULT_MODE=2,
13274 NET_AX25_BACKOFF_TYPE=3,
13275 NET_AX25_CONNECT_MODE=4,
13276 NET_AX25_STANDARD_WINDOW=5,
13277 NET_AX25_EXTENDED_WINDOW=6,
13278 NET_AX25_T1_TIMEOUT=7,
13279 NET_AX25_T2_TIMEOUT=8,
13280 NET_AX25_T3_TIMEOUT=9,
13281 NET_AX25_IDLE_TIMEOUT=10,
13283 NET_AX25_PACLEN=12,
13284 NET_AX25_PROTOCOL=13,
13285 NET_AX25_DAMA_SLAVE_TIMEOUT=14
13290 NET_ROSE_RESTART_REQUEST_TIMEOUT=1,
13291 NET_ROSE_CALL_REQUEST_TIMEOUT=2,
13292 NET_ROSE_RESET_REQUEST_TIMEOUT=3,
13293 NET_ROSE_CLEAR_REQUEST_TIMEOUT=4,
13294 NET_ROSE_ACK_HOLD_BACK_TIMEOUT=5,
13295 NET_ROSE_ROUTING_CONTROL=6,
13296 NET_ROSE_LINK_FAIL_TIMEOUT=7,
13297 NET_ROSE_MAX_VCS=8,
13298 NET_ROSE_WINDOW_SIZE=9,
13299 NET_ROSE_NO_ACTIVITY_TIMEOUT=10
13304 NET_X25_RESTART_REQUEST_TIMEOUT=1,
13305 NET_X25_CALL_REQUEST_TIMEOUT=2,
13306 NET_X25_RESET_REQUEST_TIMEOUT=3,
13307 NET_X25_CLEAR_REQUEST_TIMEOUT=4,
13308 NET_X25_ACK_HOLD_BACK_TIMEOUT=5
13314 NET_TR_RIF_TIMEOUT=1
13319 NET_DECNET_NODE_TYPE = 1,
13320 NET_DECNET_NODE_ADDRESS = 2,
13321 NET_DECNET_NODE_NAME = 3,
13322 NET_DECNET_DEFAULT_DEVICE = 4,
13323 NET_DECNET_TIME_WAIT = 5,
13324 NET_DECNET_DN_COUNT = 6,
13325 NET_DECNET_DI_COUNT = 7,
13326 NET_DECNET_DR_COUNT = 8,
13327 NET_DECNET_DST_GC_INTERVAL = 9,
13328 NET_DECNET_CONF = 10,
13329 NET_DECNET_NO_FC_MAX_CWND = 11,
13330 NET_DECNET_MEM = 12,
13331 NET_DECNET_RMEM = 13,
13332 NET_DECNET_WMEM = 14,
13333 NET_DECNET_DEBUG_LEVEL = 255
13338 NET_DECNET_CONF_LOOPBACK = -2,
13339 NET_DECNET_CONF_DDCMP = -3,
13340 NET_DECNET_CONF_PPP = -4,
13341 NET_DECNET_CONF_X25 = -5,
13342 NET_DECNET_CONF_GRE = -6,
13343 NET_DECNET_CONF_ETHER = -7
13350 NET_DECNET_CONF_DEV_PRIORITY = 1,
13351 NET_DECNET_CONF_DEV_T1 = 2,
13352 NET_DECNET_CONF_DEV_T2 = 3,
13353 NET_DECNET_CONF_DEV_T3 = 4,
13354 NET_DECNET_CONF_DEV_FORWARDING = 5,
13355 NET_DECNET_CONF_DEV_BLKSIZE = 6,
13356 NET_DECNET_CONF_DEV_STATE = 7
13361 NET_SCTP_RTO_INITIAL = 1,
13362 NET_SCTP_RTO_MIN = 2,
13363 NET_SCTP_RTO_MAX = 3,
13364 NET_SCTP_RTO_ALPHA = 4,
13365 NET_SCTP_RTO_BETA = 5,
13366 NET_SCTP_VALID_COOKIE_LIFE = 6,
13367 NET_SCTP_ASSOCIATION_MAX_RETRANS = 7,
13368 NET_SCTP_PATH_MAX_RETRANS = 8,
13369 NET_SCTP_MAX_INIT_RETRANSMITS = 9,
13370 NET_SCTP_HB_INTERVAL = 10,
13371 NET_SCTP_PRESERVE_ENABLE = 11,
13372 NET_SCTP_MAX_BURST = 12,
13373 NET_SCTP_ADDIP_ENABLE = 13,
13374 NET_SCTP_PRSCTP_ENABLE = 14,
13375 NET_SCTP_SNDBUF_POLICY = 15,
13376 NET_SCTP_SACK_TIMEOUT = 16,
13377 NET_SCTP_RCVBUF_POLICY = 17,
13382 NET_BRIDGE_NF_CALL_ARPTABLES = 1,
13383 NET_BRIDGE_NF_CALL_IPTABLES = 2,
13384 NET_BRIDGE_NF_CALL_IP6TABLES = 3,
13385 NET_BRIDGE_NF_FILTER_VLAN_TAGGED = 4,
13419 FS_DQ_CACHE_HITS = 5,
13420 FS_DQ_ALLOCATED = 6,
13423 FS_DQ_WARNINGS = 9,
13442 DEV_CDROM_AUTOCLOSE=2,
13443 DEV_CDROM_AUTOEJECT=3,
13446 DEV_CDROM_CHECK_MEDIA=6
13451 DEV_PARPORT_DEFAULT=-3
13456 DEV_RAID_SPEED_LIMIT_MIN=1,
13457 DEV_RAID_SPEED_LIMIT_MAX=2
13462 DEV_PARPORT_DEFAULT_TIMESLICE=1,
13463 DEV_PARPORT_DEFAULT_SPINTIME=2
13468 DEV_PARPORT_SPINTIME=1,
13469 DEV_PARPORT_BASE_ADDR=2,
13472 DEV_PARPORT_MODES=5,
13473 DEV_PARPORT_DEVICES=6,
13474 DEV_PARPORT_AUTOPROBE=16
13479 DEV_PARPORT_DEVICES_ACTIVE=-3,
13484 DEV_PARPORT_DEVICE_TIMESLICE=1,
13489 DEV_MAC_HID_KEYBOARD_SENDS_LINUX_KEYCODES=1,
13490 DEV_MAC_HID_KEYBOARD_LOCK_KEYCODES=2,
13491 DEV_MAC_HID_MOUSE_BUTTON_EMULATION=3,
13492 DEV_MAC_HID_MOUSE_BUTTON2_KEYCODE=4,
13493 DEV_MAC_HID_MOUSE_BUTTON3_KEYCODE=5,
13494 DEV_MAC_HID_ADB_MOUSE_SENDS_KEYCODES=6
13499 DEV_SCSI_LOGGING_LEVEL=1,
13504 DEV_IPMI_POWEROFF_POWERCYCLE=1,
13510 ABI_DEFHANDLER_COFF=1,
13511 ABI_DEFHANDLER_ELF=2,
13512 ABI_DEFHANDLER_LCALL7=3,
13513 ABI_DEFHANDLER_LIBCSO=4,
13515 ABI_FAKE_UTSNAME=6,
13521 extern void sysctl_init(void);
13523 typedef struct ctl_table ctl_table;
13525 typedef int ctl_handler (ctl_table *table, int *name, int nlen,
13526 void *oldval, size_t *oldlenp,
13527 void *newval, size_t newlen,
13530 typedef int proc_handler (ctl_table *ctl, int write, struct file * filp,
13531 void *buffer, size_t *lenp, loff_t *ppos);
13533 extern int proc_dostring(ctl_table *, int, struct file *,
13534 void *, size_t *, loff_t *);
13535 extern int proc_dointvec(ctl_table *, int, struct file *,
13536 void *, size_t *, loff_t *);
13537 extern int proc_dointvec_bset(ctl_table *, int, struct file *,
13538 void *, size_t *, loff_t *);
13539 extern int proc_dointvec_minmax(ctl_table *, int, struct file *,
13540 void *, size_t *, loff_t *);
13541 extern int proc_dointvec_jiffies(ctl_table *, int, struct file *,
13542 void *, size_t *, loff_t *);
13543 extern int proc_dointvec_userhz_jiffies(ctl_table *, int, struct file *,
13544 void *, size_t *, loff_t *);
13545 extern int proc_dointvec_ms_jiffies(ctl_table *, int, struct file *,
13546 void *, size_t *, loff_t *);
13547 extern int proc_doulongvec_minmax(ctl_table *, int, struct file *,
13548 void *, size_t *, loff_t *);
13549 extern int proc_doulongvec_ms_jiffies_minmax(ctl_table *table, int,
13550 struct file *, void *, size_t *, loff_t *);
13552 extern int do_sysctl (int *name, int nlen,
13553 void *oldval, size_t *oldlenp,
13554 void *newval, size_t newlen);
13556 extern int do_sysctl_strategy (ctl_table *table,
13557 int *name, int nlen,
13558 void *oldval, size_t *oldlenp,
13559 void *newval, size_t newlen, void ** context);
13561 extern ctl_handler sysctl_string;
13562 extern ctl_handler sysctl_intvec;
13563 extern ctl_handler sysctl_jiffies;
13564 extern ctl_handler sysctl_ms_jiffies;
13565 # 1010 "include/linux/sysctl.h"
13569 const char *procname;
13574 proc_handler *proc_handler;
13575 ctl_handler *strategy;
13576 struct proc_dir_entry *de;
13583 struct ctl_table_header
13585 ctl_table *ctl_table;
13586 struct list_head ctl_entry;
13588 struct completion *unregistering;
13591 struct ctl_table_header * register_sysctl_table(ctl_table * table,
13592 int insert_at_head);
13593 void unregister_sysctl_table(struct ctl_table_header * table);
13594 # 317 "include/linux/net.h" 2
13595 extern ctl_table net_table[];
13596 extern int net_msg_cost;
13597 extern int net_msg_burst;
13598 # 29 "include/linux/skbuff.h" 2
13599 # 1 "include/linux/textsearch.h" 1
13600 # 13 "include/linux/textsearch.h"
13602 # 25 "include/linux/textsearch.h"
13605 unsigned int offset;
13608 # 41 "include/linux/textsearch.h"
13612 struct ts_config * (*init)(const void *, unsigned int, gfp_t);
13613 unsigned int (*find)(struct ts_config *,
13614 struct ts_state *);
13615 void (*destroy)(struct ts_config *);
13616 void * (*get_pattern)(struct ts_config *);
13617 unsigned int (*get_pattern_len)(struct ts_config *);
13618 struct module *owner;
13619 struct list_head list;
13630 struct ts_ops *ops;
13631 # 76 "include/linux/textsearch.h"
13632 unsigned int (*get_next_block)(unsigned int consumed,
13634 struct ts_config *conf,
13635 struct ts_state *state);
13636 # 89 "include/linux/textsearch.h"
13637 void (*finish)(struct ts_config *conf,
13638 struct ts_state *state);
13640 # 105 "include/linux/textsearch.h"
13641 static inline __attribute__((always_inline)) unsigned int textsearch_next(struct ts_config *conf,
13642 struct ts_state *state)
13644 unsigned int ret = conf->ops->find(conf, state);
13647 conf->finish(conf, state);
13651 # 124 "include/linux/textsearch.h"
13652 static inline __attribute__((always_inline)) unsigned int textsearch_find(struct ts_config *conf,
13653 struct ts_state *state)
13656 return textsearch_next(conf, state);
13663 static inline __attribute__((always_inline)) void *textsearch_get_pattern(struct ts_config *conf)
13665 return conf->ops->get_pattern(conf);
13672 static inline __attribute__((always_inline)) unsigned int textsearch_get_pattern_len(struct ts_config *conf)
13674 return conf->ops->get_pattern_len(conf);
13677 extern int textsearch_register(struct ts_ops *);
13678 extern int textsearch_unregister(struct ts_ops *);
13679 extern struct ts_config *textsearch_prepare(const char *, const void *,
13680 unsigned int, gfp_t, int);
13681 extern void textsearch_destroy(struct ts_config *conf);
13682 extern unsigned int textsearch_find_continuous(struct ts_config *,
13684 const void *, unsigned int);
13690 static inline __attribute__((always_inline)) struct ts_config *alloc_ts_config(size_t payload,
13693 struct ts_config *conf;
13695 conf = kmalloc((((sizeof(*conf)) + 8 -1) & ~(8 -1)) + payload, gfp_mask);
13696 if (conf == ((void *)0))
13697 return ERR_PTR(-12);
13699 memset(conf, 0, (((sizeof(*conf)) + 8 -1) & ~(8 -1)) + payload);
13703 static inline __attribute__((always_inline)) void *ts_config_priv(struct ts_config *conf)
13705 return ((u8 *) conf + (((sizeof(struct ts_config)) + 8 -1) & ~(8 -1)));
13707 # 30 "include/linux/skbuff.h" 2
13708 # 1 "include/net/checksum.h" 1
13709 # 26 "include/net/checksum.h"
13710 # 1 "include/asm/checksum.h" 1
13711 # 18 "include/asm/checksum.h"
13712 unsigned int csum_partial(const unsigned char *buff, int len, unsigned int sum);
13713 # 28 "include/asm/checksum.h"
13714 unsigned int csum_partial_copy(const unsigned char *src, unsigned char *dst,
13716 # 38 "include/asm/checksum.h"
13717 extern unsigned int csum_partial_copy_from_user(const unsigned char *src,
13718 unsigned char *dst, int len,
13719 int sum, int *csum_err);
13724 unsigned short ip_fast_csum(unsigned char *iph, unsigned int ihl);
13730 static inline __attribute__((always_inline)) unsigned int csum_fold(unsigned int sum)
13733 sum = (sum & 0xffff) + (sum >> 16);
13734 return ((~(sum << 16)) >> 16);
13742 static inline __attribute__((always_inline)) unsigned int
13743 csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len,
13744 unsigned short proto, unsigned int sum)
13747 __asm__ ("%0 = %0 + %1;\n\t"
13749 "if !CC jump 4;\n\t"
13750 "%0 = %0 + %4;\n\t"
13751 "%0 = %0 + %2;\n\t"
13753 "if !CC jump 4;\n\t"
13754 "%0 = %0 + %4;\n\t"
13755 "%0 = %0 + %3;\n\t"
13757 "if !CC jump 4;\n\t"
13758 "%0 = %0 + %4;\n\t"
13761 : "d" (daddr), "d" (saddr), "d" ((ntohs(len)<<16)+proto*256), "d" (1), "0"(sum));
13766 static inline __attribute__((always_inline)) unsigned short int
13767 csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len,
13768 unsigned short proto, unsigned int sum)
13770 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum));
13778 extern unsigned short ip_compute_csum(const unsigned char *buff, int len);
13779 # 27 "include/net/checksum.h" 2
13782 static inline __attribute__((always_inline))
13783 unsigned int csum_and_copy_from_user (const unsigned char *src, unsigned char *dst,
13784 int len, int sum, int *err_ptr)
13786 if (_access_ok((unsigned long)(src),(len)))
13787 return csum_partial_copy_from_user(src, dst, len, sum, err_ptr);
13797 static __inline__ __attribute__((always_inline)) unsigned int csum_and_copy_to_user
13798 (const unsigned char *src, unsigned char *dst, int len, unsigned int sum, int *err_ptr)
13800 sum = csum_partial(src, len, sum);
13802 if (_access_ok((unsigned long)(dst),(len))) {
13803 if (copy_to_user(dst, src, len) == 0)
13813 static inline __attribute__((always_inline)) unsigned int csum_add(unsigned int csum, unsigned int addend)
13816 return csum + (csum < addend);
13819 static inline __attribute__((always_inline)) unsigned int csum_sub(unsigned int csum, unsigned int addend)
13821 return csum_add(csum, ~addend);
13824 static inline __attribute__((always_inline)) unsigned int
13825 csum_block_add(unsigned int csum, unsigned int csum2, int offset)
13828 csum2 = ((csum2&0xFF00FF)<<8)+((csum2>>8)&0xFF00FF);
13829 return csum_add(csum, csum2);
13832 static inline __attribute__((always_inline)) unsigned int
13833 csum_block_sub(unsigned int csum, unsigned int csum2, int offset)
13836 csum2 = ((csum2&0xFF00FF)<<8)+((csum2>>8)&0xFF00FF);
13837 return csum_sub(csum, csum2);
13839 # 31 "include/linux/skbuff.h" 2
13840 # 1 "include/linux/dmaengine.h" 1
13841 # 32 "include/linux/skbuff.h" 2
13842 # 87 "include/linux/skbuff.h"
13844 # 110 "include/linux/skbuff.h"
13845 struct sk_buff_head {
13847 struct sk_buff *next;
13848 struct sk_buff *prev;
13859 typedef struct skb_frag_struct skb_frag_t;
13861 struct skb_frag_struct {
13870 struct skb_shared_info {
13872 unsigned short nr_frags;
13873 unsigned short gso_size;
13875 unsigned short gso_segs;
13876 unsigned short gso_type;
13877 unsigned int ip6_frag_id;
13878 struct sk_buff *frag_list;
13879 skb_frag_t frags[(65536/(1UL << 12) + 2)];
13881 # 161 "include/linux/skbuff.h"
13882 struct skb_timeval {
13889 SKB_FCLONE_UNAVAILABLE,
13895 SKB_GSO_TCPV4 = 1 << 0,
13896 SKB_GSO_UDP = 1 << 1,
13899 SKB_GSO_DODGY = 1 << 2,
13902 SKB_GSO_TCP_ECN = 1 << 3,
13904 SKB_GSO_TCPV6 = 1 << 4,
13906 # 232 "include/linux/skbuff.h"
13909 struct sk_buff *next;
13910 struct sk_buff *prev;
13913 struct skb_timeval tstamp;
13914 struct net_device *dev;
13915 struct net_device *input_dev;
13920 struct icmphdr *icmph;
13921 struct igmphdr *igmph;
13922 struct iphdr *ipiph;
13923 struct ipv6hdr *ipv6h;
13924 unsigned char *raw;
13929 struct ipv6hdr *ipv6h;
13930 struct arphdr *arph;
13931 unsigned char *raw;
13935 unsigned char *raw;
13938 struct dst_entry *dst;
13939 struct sec_path *sp;
13964 void (*destructor)(struct sk_buff *skb);
13965 # 315 "include/linux/skbuff.h"
13966 unsigned int truesize;
13968 unsigned char *head,
13973 # 331 "include/linux/skbuff.h"
13974 extern void kfree_skb(struct sk_buff *skb);
13975 extern void __kfree_skb(struct sk_buff *skb);
13976 extern struct sk_buff *__alloc_skb(unsigned int size,
13977 gfp_t priority, int fclone);
13978 static inline __attribute__((always_inline)) struct sk_buff *alloc_skb(unsigned int size,
13981 return __alloc_skb(size, priority, 0);
13984 static inline __attribute__((always_inline)) struct sk_buff *alloc_skb_fclone(unsigned int size,
13987 return __alloc_skb(size, priority, 1);
13990 extern struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp,
13993 extern void kfree_skbmem(struct sk_buff *skb);
13994 extern struct sk_buff *skb_clone(struct sk_buff *skb,
13996 extern struct sk_buff *skb_copy(const struct sk_buff *skb,
13998 extern struct sk_buff *pskb_copy(struct sk_buff *skb,
14000 extern int pskb_expand_head(struct sk_buff *skb,
14001 int nhead, int ntail,
14003 extern struct sk_buff *skb_realloc_headroom(struct sk_buff *skb,
14004 unsigned int headroom);
14005 extern struct sk_buff *skb_copy_expand(const struct sk_buff *skb,
14006 int newheadroom, int newtailroom,
14008 extern int skb_pad(struct sk_buff *skb, int pad);
14010 extern void skb_over_panic(struct sk_buff *skb, int len,
14012 extern void skb_under_panic(struct sk_buff *skb, int len,
14014 extern void skb_truesize_bug(struct sk_buff *skb);
14016 static inline __attribute__((always_inline)) void skb_truesize_check(struct sk_buff *skb)
14018 if (__builtin_expect(!!((int)skb->truesize < sizeof(struct sk_buff) + skb->len), 0))
14019 skb_truesize_bug(skb);
14022 extern int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb,
14023 int getfrag(void *from, char *to, int offset,
14024 int len,int odd, struct sk_buff *skb),
14025 void *from, int length);
14027 struct skb_seq_state
14029 __u32 lower_offset;
14030 __u32 upper_offset;
14032 __u32 stepped_offset;
14033 struct sk_buff *root_skb;
14034 struct sk_buff *cur_skb;
14038 extern void skb_prepare_seq_read(struct sk_buff *skb,
14039 unsigned int from, unsigned int to,
14040 struct skb_seq_state *st);
14041 extern unsigned int skb_seq_read(unsigned int consumed, const u8 **data,
14042 struct skb_seq_state *st);
14043 extern void skb_abort_seq_read(struct skb_seq_state *st);
14045 extern unsigned int skb_find_text(struct sk_buff *skb, unsigned int from,
14046 unsigned int to, struct ts_config *config,
14047 struct ts_state *state);
14048 # 415 "include/linux/skbuff.h"
14049 static inline __attribute__((always_inline)) int skb_queue_empty(const struct sk_buff_head *list)
14051 return list->next == (struct sk_buff *)list;
14053 # 427 "include/linux/skbuff.h"
14054 static inline __attribute__((always_inline)) struct sk_buff *skb_get(struct sk_buff *skb)
14056 atomic_inc(&skb->users);
14059 # 446 "include/linux/skbuff.h"
14060 static inline __attribute__((always_inline)) int skb_cloned(const struct sk_buff *skb)
14062 return skb->cloned &&
14063 (((&((struct skb_shared_info *)((skb)->end))->dataref)->counter) & ((1 << 16) - 1)) != 1;
14065 # 459 "include/linux/skbuff.h"
14066 static inline __attribute__((always_inline)) int skb_header_cloned(const struct sk_buff *skb)
14073 dataref = ((&((struct skb_shared_info *)((skb)->end))->dataref)->counter);
14074 dataref = (dataref & ((1 << 16) - 1)) - (dataref >> 16);
14075 return dataref != 1;
14077 # 479 "include/linux/skbuff.h"
14078 static inline __attribute__((always_inline)) void skb_header_release(struct sk_buff *skb)
14080 do { if (__builtin_expect(!!((skb->nohdr)!=0), 0)) do { dump_stack(); printk("<4>" "\nkernel BUG at %s:%d!\n", "include/linux/skbuff.h", 481); panic("BUG!"); } while (0); } while(0);
14082 atomic_add(1 << 16, &((struct skb_shared_info *)((skb)->end))->dataref);
14084 # 493 "include/linux/skbuff.h"
14085 static inline __attribute__((always_inline)) int skb_shared(const struct sk_buff *skb)
14087 return ((&skb->users)->counter) != 1;
14089 # 511 "include/linux/skbuff.h"
14090 static inline __attribute__((always_inline)) struct sk_buff *skb_share_check(struct sk_buff *skb,
14093 do { if (pri & (( gfp_t)0x10u)) do { do { } while (0); } while (0); } while (0);
14094 if (skb_shared(skb)) {
14095 struct sk_buff *nskb = skb_clone(skb, pri);
14101 # 543 "include/linux/skbuff.h"
14102 static inline __attribute__((always_inline)) struct sk_buff *skb_unshare(struct sk_buff *skb,
14105 do { if (pri & (( gfp_t)0x10u)) do { do { } while (0); } while (0); } while (0);
14106 if (skb_cloned(skb)) {
14107 struct sk_buff *nskb = skb_copy(skb, pri);
14113 # 568 "include/linux/skbuff.h"
14114 static inline __attribute__((always_inline)) struct sk_buff *skb_peek(struct sk_buff_head *list_)
14116 struct sk_buff *list = ((struct sk_buff *)list_)->next;
14117 if (list == (struct sk_buff *)list_)
14118 list = ((void *)0);
14121 # 589 "include/linux/skbuff.h"
14122 static inline __attribute__((always_inline)) struct sk_buff *skb_peek_tail(struct sk_buff_head *list_)
14124 struct sk_buff *list = ((struct sk_buff *)list_)->prev;
14125 if (list == (struct sk_buff *)list_)
14126 list = ((void *)0);
14136 static inline __attribute__((always_inline)) __u32 skb_queue_len(const struct sk_buff_head *list_)
14138 return list_->qlen;
14140 # 616 "include/linux/skbuff.h"
14141 static inline __attribute__((always_inline)) void skb_queue_head_init(struct sk_buff_head *list)
14143 do { *(&list->lock) = (spinlock_t) { .raw_lock = { }, }; } while (0);
14144 list->prev = list->next = (struct sk_buff *)list;
14147 # 641 "include/linux/skbuff.h"
14148 static inline __attribute__((always_inline)) void __skb_queue_after(struct sk_buff_head *list,
14149 struct sk_buff *prev,
14150 struct sk_buff *newsk)
14152 struct sk_buff *next;
14156 newsk->next = next;
14157 newsk->prev = prev;
14158 next->prev = prev->next = newsk;
14160 # 664 "include/linux/skbuff.h"
14161 extern void skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk);
14162 static inline __attribute__((always_inline)) void __skb_queue_head(struct sk_buff_head *list,
14163 struct sk_buff *newsk)
14165 __skb_queue_after(list, (struct sk_buff *)list, newsk);
14167 # 681 "include/linux/skbuff.h"
14168 extern void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk);
14169 static inline __attribute__((always_inline)) void __skb_queue_tail(struct sk_buff_head *list,
14170 struct sk_buff *newsk)
14172 struct sk_buff *prev, *next;
14175 next = (struct sk_buff *)list;
14177 newsk->next = next;
14178 newsk->prev = prev;
14179 next->prev = prev->next = newsk;
14181 # 704 "include/linux/skbuff.h"
14182 extern struct sk_buff *skb_dequeue(struct sk_buff_head *list);
14183 static inline __attribute__((always_inline)) struct sk_buff *__skb_dequeue(struct sk_buff_head *list)
14185 struct sk_buff *next, *prev, *result;
14187 prev = (struct sk_buff *) list;
14189 result = ((void *)0);
14190 if (next != prev) {
14196 result->next = result->prev = ((void *)0);
14205 extern void skb_insert(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head *list);
14206 static inline __attribute__((always_inline)) void __skb_insert(struct sk_buff *newsk,
14207 struct sk_buff *prev, struct sk_buff *next,
14208 struct sk_buff_head *list)
14210 newsk->next = next;
14211 newsk->prev = prev;
14212 next->prev = prev->next = newsk;
14219 extern void skb_append(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head *list);
14220 static inline __attribute__((always_inline)) void __skb_append(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head *list)
14222 __skb_insert(newsk, old, old->next, list);
14229 extern void skb_unlink(struct sk_buff *skb, struct sk_buff_head *list);
14230 static inline __attribute__((always_inline)) void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *list)
14232 struct sk_buff *next, *prev;
14237 skb->next = skb->prev = ((void *)0);
14241 # 775 "include/linux/skbuff.h"
14242 extern struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list);
14243 static inline __attribute__((always_inline)) struct sk_buff *__skb_dequeue_tail(struct sk_buff_head *list)
14245 struct sk_buff *skb = skb_peek_tail(list);
14247 __skb_unlink(skb, list);
14252 static inline __attribute__((always_inline)) int skb_is_nonlinear(const struct sk_buff *skb)
14254 return skb->data_len;
14257 static inline __attribute__((always_inline)) unsigned int skb_headlen(const struct sk_buff *skb)
14259 return skb->len - skb->data_len;
14262 static inline __attribute__((always_inline)) int skb_pagelen(const struct sk_buff *skb)
14266 for (i = (int)((struct skb_shared_info *)((skb)->end))->nr_frags - 1; i >= 0; i--)
14267 len += ((struct skb_shared_info *)((skb)->end))->frags[i].size;
14268 return len + skb_headlen(skb);
14271 static inline __attribute__((always_inline)) void skb_fill_page_desc(struct sk_buff *skb, int i,
14272 struct page *page, int off, int size)
14274 skb_frag_t *frag = &((struct skb_shared_info *)((skb)->end))->frags[i];
14277 frag->page_offset = off;
14279 ((struct skb_shared_info *)((skb)->end))->nr_frags = i + 1;
14281 # 822 "include/linux/skbuff.h"
14282 static inline __attribute__((always_inline)) unsigned char *__skb_put(struct sk_buff *skb, unsigned int len)
14284 unsigned char *tmp = skb->tail;
14285 do { if (__builtin_expect(!!((skb_is_nonlinear(skb))!=0), 0)) do { dump_stack(); printk("<4>" "\nkernel BUG at %s:%d!\n", "include/linux/skbuff.h", 825); panic("BUG!"); } while (0); } while(0);
14290 # 840 "include/linux/skbuff.h"
14291 static inline __attribute__((always_inline)) unsigned char *skb_put(struct sk_buff *skb, unsigned int len)
14293 unsigned char *tmp = skb->tail;
14294 do { if (__builtin_expect(!!((skb_is_nonlinear(skb))!=0), 0)) do { dump_stack(); printk("<4>" "\nkernel BUG at %s:%d!\n", "include/linux/skbuff.h", 843); panic("BUG!"); } while (0); } while(0);
14297 if (__builtin_expect(!!(skb->tail>skb->end), 0))
14298 skb_over_panic(skb, len, ({ __label__ _l; _l: &&_l;}));
14302 static inline __attribute__((always_inline)) unsigned char *__skb_push(struct sk_buff *skb, unsigned int len)
14308 # 867 "include/linux/skbuff.h"
14309 static inline __attribute__((always_inline)) unsigned char *skb_push(struct sk_buff *skb, unsigned int len)
14313 if (__builtin_expect(!!(skb->data<skb->head), 0))
14314 skb_under_panic(skb, len, ({ __label__ _l; _l: &&_l;}));
14318 static inline __attribute__((always_inline)) unsigned char *__skb_pull(struct sk_buff *skb, unsigned int len)
14321 do { if (__builtin_expect(!!((skb->len < skb->data_len)!=0), 0)) do { dump_stack(); printk("<4>" "\nkernel BUG at %s:%d!\n", "include/linux/skbuff.h", 879); panic("BUG!"); } while (0); } while(0);
14322 return skb->data += len;
14324 # 893 "include/linux/skbuff.h"
14325 static inline __attribute__((always_inline)) unsigned char *skb_pull(struct sk_buff *skb, unsigned int len)
14327 return __builtin_expect(!!(len > skb->len), 0) ? ((void *)0) : __skb_pull(skb, len);
14330 extern unsigned char *__pskb_pull_tail(struct sk_buff *skb, int delta);
14332 static inline __attribute__((always_inline)) unsigned char *__pskb_pull(struct sk_buff *skb, unsigned int len)
14334 if (len > skb_headlen(skb) &&
14335 !__pskb_pull_tail(skb, len-skb_headlen(skb)))
14336 return ((void *)0);
14338 return skb->data += len;
14341 static inline __attribute__((always_inline)) unsigned char *pskb_pull(struct sk_buff *skb, unsigned int len)
14343 return __builtin_expect(!!(len > skb->len), 0) ? ((void *)0) : __pskb_pull(skb, len);
14346 static inline __attribute__((always_inline)) int pskb_may_pull(struct sk_buff *skb, unsigned int len)
14348 if (__builtin_expect(!!(len <= skb_headlen(skb)), 1))
14350 if (__builtin_expect(!!(len > skb->len), 0))
14352 return __pskb_pull_tail(skb, len-skb_headlen(skb)) != ((void *)0);
14361 static inline __attribute__((always_inline)) int skb_headroom(const struct sk_buff *skb)
14363 return skb->data - skb->head;
14372 static inline __attribute__((always_inline)) int skb_tailroom(const struct sk_buff *skb)
14374 return skb_is_nonlinear(skb) ? 0 : skb->end - skb->tail;
14376 # 953 "include/linux/skbuff.h"
14377 static inline __attribute__((always_inline)) void skb_reserve(struct sk_buff *skb, int len)
14382 # 1002 "include/linux/skbuff.h"
14383 extern int ___pskb_trim(struct sk_buff *skb, unsigned int len);
14385 static inline __attribute__((always_inline)) void __skb_trim(struct sk_buff *skb, unsigned int len)
14387 if (__builtin_expect(!!(skb->data_len), 0)) {
14388 ({ typeof(1) __ret_warn_on = (1); if (__builtin_expect(!!(__ret_warn_on), 0)) { printk("BUG: warning at %s:%d/%s()\n", "include/linux/skbuff.h", 1007, (__func__)); dump_stack(); } __builtin_expect(!!(__ret_warn_on), 0); });
14392 skb->tail = skb->data + len;
14394 # 1023 "include/linux/skbuff.h"
14395 static inline __attribute__((always_inline)) void skb_trim(struct sk_buff *skb, unsigned int len)
14397 if (skb->len > len)
14398 __skb_trim(skb, len);
14402 static inline __attribute__((always_inline)) int __pskb_trim(struct sk_buff *skb, unsigned int len)
14405 return ___pskb_trim(skb, len);
14406 __skb_trim(skb, len);
14410 static inline __attribute__((always_inline)) int pskb_trim(struct sk_buff *skb, unsigned int len)
14412 return (len < skb->len) ? __pskb_trim(skb, len) : 0;
14414 # 1052 "include/linux/skbuff.h"
14415 static inline __attribute__((always_inline)) void pskb_trim_unique(struct sk_buff *skb, unsigned int len)
14417 int err = pskb_trim(skb, len);
14418 do { if (__builtin_expect(!!((err)!=0), 0)) do { dump_stack(); printk("<4>" "\nkernel BUG at %s:%d!\n", "include/linux/skbuff.h", 1055); panic("BUG!"); } while (0); } while(0);
14420 # 1066 "include/linux/skbuff.h"
14421 static inline __attribute__((always_inline)) void skb_orphan(struct sk_buff *skb)
14423 if (skb->destructor)
14424 skb->destructor(skb);
14425 skb->destructor = ((void *)0);
14426 skb->sk = ((void *)0);
14428 # 1082 "include/linux/skbuff.h"
14429 extern void skb_queue_purge(struct sk_buff_head *list);
14430 static inline __attribute__((always_inline)) void __skb_queue_purge(struct sk_buff_head *list)
14432 struct sk_buff *skb;
14433 while ((skb = __skb_dequeue(list)) != ((void *)0))
14436 # 1102 "include/linux/skbuff.h"
14437 static inline __attribute__((always_inline)) struct sk_buff *__dev_alloc_skb(unsigned int length,
14440 struct sk_buff *skb = alloc_skb(length + 16, gfp_mask);
14441 if (__builtin_expect(!!(skb), 1))
14442 skb_reserve(skb, 16);
14445 # 1123 "include/linux/skbuff.h"
14446 static inline __attribute__((always_inline)) struct sk_buff *dev_alloc_skb(unsigned int length)
14448 return __dev_alloc_skb(length, ((( gfp_t)0x20u)));
14451 extern struct sk_buff *__netdev_alloc_skb(struct net_device *dev,
14452 unsigned int length, gfp_t gfp_mask);
14453 # 1144 "include/linux/skbuff.h"
14454 static inline __attribute__((always_inline)) struct sk_buff *netdev_alloc_skb(struct net_device *dev,
14455 unsigned int length)
14457 return __netdev_alloc_skb(dev, length, ((( gfp_t)0x20u)));
14459 # 1162 "include/linux/skbuff.h"
14460 static inline __attribute__((always_inline)) int skb_cow(struct sk_buff *skb, unsigned int headroom)
14462 int delta = (headroom > 16 ? headroom : 16) -
14468 if (delta || skb_cloned(skb))
14469 return pskb_expand_head(skb, (delta + (16 -1)) &
14470 ~(16 -1), 0, ((( gfp_t)0x20u)));
14473 # 1187 "include/linux/skbuff.h"
14474 static inline __attribute__((always_inline)) int skb_padto(struct sk_buff *skb, unsigned int len)
14476 unsigned int size = skb->len;
14477 if (__builtin_expect(!!(size >= len), 1))
14479 return skb_pad(skb, len-size);
14482 static inline __attribute__((always_inline)) int skb_add_data(struct sk_buff *skb,
14483 char *from, int copy)
14485 const int off = skb->len;
14487 if (skb->ip_summed == 0) {
14489 unsigned int csum = csum_and_copy_from_user(from,
14490 skb_put(skb, copy),
14493 skb->csum = csum_block_add(skb->csum, csum, off);
14496 } else if (!copy_from_user(skb_put(skb, copy), from, copy))
14499 __skb_trim(skb, off);
14503 static inline __attribute__((always_inline)) int skb_can_coalesce(struct sk_buff *skb, int i,
14504 struct page *page, int off)
14507 struct skb_frag_struct *frag = &((struct skb_shared_info *)((skb)->end))->frags[i - 1];
14509 return page == frag->page &&
14510 off == frag->page_offset + frag->size;
14515 static inline __attribute__((always_inline)) int __skb_linearize(struct sk_buff *skb)
14517 return __pskb_pull_tail(skb, skb->data_len) ? 0 : -12;
14519 # 1240 "include/linux/skbuff.h"
14520 static inline __attribute__((always_inline)) int skb_linearize(struct sk_buff *skb)
14522 return skb_is_nonlinear(skb) ? __skb_linearize(skb) : 0;
14524 # 1252 "include/linux/skbuff.h"
14525 static inline __attribute__((always_inline)) int skb_linearize_cow(struct sk_buff *skb)
14527 return skb_is_nonlinear(skb) || skb_cloned(skb) ?
14528 __skb_linearize(skb) : 0;
14530 # 1269 "include/linux/skbuff.h"
14531 static inline __attribute__((always_inline)) void skb_postpull_rcsum(struct sk_buff *skb,
14532 const void *start, unsigned int len)
14534 if (skb->ip_summed == 3)
14535 skb->csum = csum_sub(skb->csum, csum_partial(start, len, 0));
14538 unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len);
14539 # 1287 "include/linux/skbuff.h"
14540 static inline __attribute__((always_inline)) int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len)
14542 if (__builtin_expect(!!(len >= skb->len), 1))
14544 if (skb->ip_summed == 3)
14545 skb->ip_summed = 0;
14546 return __pskb_trim(skb, len);
14549 static inline __attribute__((always_inline)) void *kmap_skb_frag(const skb_frag_t *frag)
14556 return lowmem_page_address(frag->page);
14559 static inline __attribute__((always_inline)) void kunmap_skb_frag(void *vaddr)
14566 # 1325 "include/linux/skbuff.h"
14567 extern struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags,
14568 int noblock, int *err);
14569 extern unsigned int datagram_poll(struct file *file, struct socket *sock,
14570 struct poll_table_struct *wait);
14571 extern int skb_copy_datagram_iovec(const struct sk_buff *from,
14572 int offset, struct iovec *to,
14574 extern int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb,
14576 struct iovec *iov);
14577 extern void skb_free_datagram(struct sock *sk, struct sk_buff *skb);
14578 extern void skb_kill_datagram(struct sock *sk, struct sk_buff *skb,
14579 unsigned int flags);
14580 extern unsigned int skb_checksum(const struct sk_buff *skb, int offset,
14581 int len, unsigned int csum);
14582 extern int skb_copy_bits(const struct sk_buff *skb, int offset,
14583 void *to, int len);
14584 extern int skb_store_bits(const struct sk_buff *skb, int offset,
14585 void *from, int len);
14586 extern unsigned int skb_copy_and_csum_bits(const struct sk_buff *skb,
14587 int offset, u8 *to, int len,
14588 unsigned int csum);
14589 extern void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to);
14590 extern void skb_split(struct sk_buff *skb,
14591 struct sk_buff *skb1, const u32 len);
14593 extern struct sk_buff *skb_segment(struct sk_buff *skb, int features);
14595 static inline __attribute__((always_inline)) void *skb_header_pointer(const struct sk_buff *skb, int offset,
14596 int len, void *buffer)
14598 int hlen = skb_headlen(skb);
14600 if (hlen - offset >= len)
14601 return skb->data + offset;
14603 if (skb_copy_bits(skb, offset, buffer, len) < 0)
14604 return ((void *)0);
14609 extern void skb_init(void);
14610 extern void skb_add_mtu(int mtu);
14611 # 1379 "include/linux/skbuff.h"
14612 static inline __attribute__((always_inline)) void skb_get_timestamp(const struct sk_buff *skb, struct timeval *stamp)
14614 stamp->tv_sec = skb->tstamp.off_sec;
14615 stamp->tv_usec = skb->tstamp.off_usec;
14617 # 1394 "include/linux/skbuff.h"
14618 static inline __attribute__((always_inline)) void skb_set_timestamp(struct sk_buff *skb, const struct timeval *stamp)
14620 skb->tstamp.off_sec = stamp->tv_sec;
14621 skb->tstamp.off_usec = stamp->tv_usec;
14624 extern void __net_timestamp(struct sk_buff *skb);
14626 extern unsigned int __skb_checksum_complete(struct sk_buff *skb);
14627 # 1420 "include/linux/skbuff.h"
14628 static inline __attribute__((always_inline)) unsigned int skb_checksum_complete(struct sk_buff *skb)
14630 return skb->ip_summed != 2 &&
14631 __skb_checksum_complete(skb);
14633 # 1476 "include/linux/skbuff.h"
14634 static inline __attribute__((always_inline)) void nf_reset(struct sk_buff *skb) {}
14635 # 1490 "include/linux/skbuff.h"
14636 static inline __attribute__((always_inline)) void skb_copy_secmark(struct sk_buff *to, const struct sk_buff *from)
14639 static inline __attribute__((always_inline)) void skb_init_secmark(struct sk_buff *skb)
14643 static inline __attribute__((always_inline)) int skb_is_gso(const struct sk_buff *skb)
14645 return ((struct skb_shared_info *)((skb)->end))->gso_size;
14647 # 112 "include/linux/if_ether.h" 2
14649 static inline __attribute__((always_inline)) struct ethhdr *eth_hdr(const struct sk_buff *skb)
14651 return (struct ethhdr *)skb->mac.raw;
14655 extern struct ctl_table ether_table[];
14656 # 30 "include/linux/netdevice.h" 2
14657 # 1 "include/linux/if_packet.h" 1
14661 struct sockaddr_pkt
14663 unsigned short spkt_family;
14664 unsigned char spkt_device[14];
14665 unsigned short spkt_protocol;
14670 unsigned short sll_family;
14671 unsigned short sll_protocol;
14673 unsigned short sll_hatype;
14674 unsigned char sll_pkttype;
14675 unsigned char sll_halen;
14676 unsigned char sll_addr[8];
14678 # 43 "include/linux/if_packet.h"
14679 struct tpacket_stats
14681 unsigned int tp_packets;
14682 unsigned int tp_drops;
14687 unsigned long tp_status;
14693 unsigned int tp_len;
14694 unsigned int tp_snaplen;
14695 unsigned short tp_mac;
14696 unsigned short tp_net;
14697 unsigned int tp_sec;
14698 unsigned int tp_usec;
14700 # 82 "include/linux/if_packet.h"
14703 unsigned int tp_block_size;
14704 unsigned int tp_block_nr;
14705 unsigned int tp_frame_size;
14706 unsigned int tp_frame_nr;
14712 unsigned short mr_type;
14713 unsigned short mr_alen;
14714 unsigned char mr_address[8];
14716 # 31 "include/linux/netdevice.h" 2
14723 # 1 "include/linux/device.h" 1
14724 # 14 "include/linux/device.h"
14725 # 1 "include/linux/ioport.h" 1
14726 # 17 "include/linux/ioport.h"
14728 resource_size_t start;
14729 resource_size_t end;
14731 unsigned long flags;
14732 struct resource *parent, *sibling, *child;
14735 struct resource_list {
14736 struct resource_list *next;
14737 struct resource *res;
14738 struct pci_dev *dev;
14740 # 94 "include/linux/ioport.h"
14741 extern struct resource ioport_resource;
14742 extern struct resource iomem_resource;
14744 extern int request_resource(struct resource *root, struct resource *new);
14745 extern struct resource * ____request_resource(struct resource *root, struct resource *new);
14746 extern int release_resource(struct resource *new);
14747 extern int insert_resource(struct resource *parent, struct resource *new);
14748 extern int allocate_resource(struct resource *root, struct resource *new,
14749 resource_size_t size, resource_size_t min,
14750 resource_size_t max, resource_size_t align,
14751 void (*alignf)(void *, struct resource *,
14752 resource_size_t, resource_size_t),
14753 void *alignf_data);
14754 int adjust_resource(struct resource *res, resource_size_t start,
14755 resource_size_t size);
14758 extern int find_next_system_ram(struct resource *res);
14765 extern struct resource * __request_region(struct resource *,
14766 resource_size_t start,
14767 resource_size_t n, const char *name);
14774 extern int __check_region(struct resource *, resource_size_t, resource_size_t);
14775 extern void __release_region(struct resource *, resource_size_t,
14778 static inline __attribute__((always_inline)) int __attribute__((deprecated)) check_region(resource_size_t s,
14781 return __check_region(&ioport_resource, s, n);
14783 # 15 "include/linux/device.h" 2
14785 # 1 "include/linux/klist.h" 1
14786 # 20 "include/linux/klist.h"
14790 struct list_head k_list;
14791 void (*get)(struct klist_node *);
14792 void (*put)(struct klist_node *);
14796 extern void klist_init(struct klist * k, void (*get)(struct klist_node *),
14797 void (*put)(struct klist_node *));
14799 struct klist_node {
14800 struct klist * n_klist;
14801 struct list_head n_node;
14803 struct completion n_removed;
14806 extern void klist_add_tail(struct klist_node * n, struct klist * k);
14807 extern void klist_add_head(struct klist_node * n, struct klist * k);
14809 extern void klist_del(struct klist_node * n);
14810 extern void klist_remove(struct klist_node * n);
14812 extern int klist_node_attached(struct klist_node * n);
14815 struct klist_iter {
14816 struct klist * i_klist;
14817 struct list_head * i_head;
14818 struct klist_node * i_cur;
14822 extern void klist_iter_init(struct klist * k, struct klist_iter * i);
14823 extern void klist_iter_init_node(struct klist * k, struct klist_iter * i,
14824 struct klist_node * n);
14825 extern void klist_iter_exit(struct klist_iter * i);
14826 extern struct klist_node * klist_next(struct klist_iter * i);
14827 # 17 "include/linux/device.h" 2
14828 # 31 "include/linux/device.h"
14830 struct device_driver;
14832 struct class_device;
14837 struct subsystem subsys;
14838 struct kset drivers;
14839 struct kset devices;
14840 struct klist klist_devices;
14841 struct klist klist_drivers;
14843 struct bus_attribute * bus_attrs;
14844 struct device_attribute * dev_attrs;
14845 struct driver_attribute * drv_attrs;
14847 int (*match)(struct device * dev, struct device_driver * drv);
14848 int (*uevent)(struct device *dev, char **envp,
14849 int num_envp, char *buffer, int buffer_size);
14850 int (*probe)(struct device * dev);
14851 int (*remove)(struct device * dev);
14852 void (*shutdown)(struct device * dev);
14854 int (*suspend)(struct device * dev, pm_message_t state);
14855 int (*suspend_late)(struct device * dev, pm_message_t state);
14856 int (*resume_early)(struct device * dev);
14857 int (*resume)(struct device * dev);
14860 extern int __attribute__((warn_unused_result)) bus_register(struct bus_type * bus);
14861 extern void bus_unregister(struct bus_type * bus);
14863 extern int __attribute__((warn_unused_result)) bus_rescan_devices(struct bus_type * bus);
14867 int bus_for_each_dev(struct bus_type * bus, struct device * start, void * data,
14868 int (*fn)(struct device *, void *));
14869 struct device * bus_find_device(struct bus_type *bus, struct device *start,
14870 void *data, int (*match)(struct device *, void *));
14872 int __attribute__((warn_unused_result)) bus_for_each_drv(struct bus_type *bus,
14873 struct device_driver *start, void *data,
14874 int (*fn)(struct device_driver *, void *));
14878 struct bus_attribute {
14879 struct attribute attr;
14880 ssize_t (*show)(struct bus_type *, char * buf);
14881 ssize_t (*store)(struct bus_type *, const char * buf, size_t count);
14887 extern int __attribute__((warn_unused_result)) bus_create_file(struct bus_type *,
14888 struct bus_attribute *);
14889 extern void bus_remove_file(struct bus_type *, struct bus_attribute *);
14891 struct device_driver {
14893 struct bus_type * bus;
14895 struct completion unloaded;
14896 struct kobject kobj;
14897 struct klist klist_devices;
14898 struct klist_node knode_bus;
14900 struct module * owner;
14902 int (*probe) (struct device * dev);
14903 int (*remove) (struct device * dev);
14904 void (*shutdown) (struct device * dev);
14905 int (*suspend) (struct device * dev, pm_message_t state);
14906 int (*resume) (struct device * dev);
14908 unsigned int multithread_probe:1;
14912 extern int __attribute__((warn_unused_result)) driver_register(struct device_driver * drv);
14913 extern void driver_unregister(struct device_driver * drv);
14915 extern struct device_driver * get_driver(struct device_driver * drv);
14916 extern void put_driver(struct device_driver * drv);
14917 extern struct device_driver *driver_find(const char *name, struct bus_type *bus);
14918 extern int driver_probe_done(void);
14922 struct driver_attribute {
14923 struct attribute attr;
14924 ssize_t (*show)(struct device_driver *, char * buf);
14925 ssize_t (*store)(struct device_driver *, const char * buf, size_t count);
14931 extern int __attribute__((warn_unused_result)) driver_create_file(struct device_driver *,
14932 struct driver_attribute *);
14933 extern void driver_remove_file(struct device_driver *, struct driver_attribute *);
14935 extern int __attribute__((warn_unused_result)) driver_for_each_device(struct device_driver * drv,
14936 struct device *start, void *data,
14937 int (*fn)(struct device *, void *));
14938 struct device * driver_find_device(struct device_driver *drv,
14939 struct device *start, void *data,
14940 int (*match)(struct device *, void *));
14947 struct module * owner;
14949 struct subsystem subsys;
14950 struct list_head children;
14951 struct list_head devices;
14952 struct list_head interfaces;
14953 struct semaphore sem;
14955 struct kobject *virtual_dir;
14957 struct class_attribute * class_attrs;
14958 struct class_device_attribute * class_dev_attrs;
14959 struct device_attribute * dev_attrs;
14961 int (*uevent)(struct class_device *dev, char **envp,
14962 int num_envp, char *buffer, int buffer_size);
14963 int (*dev_uevent)(struct device *dev, char **envp, int num_envp,
14964 char *buffer, int buffer_size);
14966 void (*release)(struct class_device *dev);
14967 void (*class_release)(struct class *class);
14968 void (*dev_release)(struct device *dev);
14970 int (*suspend)(struct device *, pm_message_t state);
14971 int (*resume)(struct device *);
14974 extern int __attribute__((warn_unused_result)) class_register(struct class *);
14975 extern void class_unregister(struct class *);
14978 struct class_attribute {
14979 struct attribute attr;
14980 ssize_t (*show)(struct class *, char * buf);
14981 ssize_t (*store)(struct class *, const char * buf, size_t count);
14987 extern int __attribute__((warn_unused_result)) class_create_file(struct class *,
14988 const struct class_attribute *);
14989 extern void class_remove_file(struct class *, const struct class_attribute *);
14991 struct class_device_attribute {
14992 struct attribute attr;
14993 ssize_t (*show)(struct class_device *, char * buf);
14994 ssize_t (*store)(struct class_device *, const char * buf, size_t count);
15001 extern int __attribute__((warn_unused_result)) class_device_create_file(struct class_device *,
15002 const struct class_device_attribute *);
15003 # 231 "include/linux/device.h"
15004 struct class_device {
15005 struct list_head node;
15007 struct kobject kobj;
15008 struct class * class;
15010 struct class_device_attribute *devt_attr;
15011 struct class_device_attribute uevent_attr;
15012 struct device * dev;
15014 struct class_device *parent;
15015 struct attribute_group ** groups;
15017 void (*release)(struct class_device *dev);
15018 int (*uevent)(struct class_device *dev, char **envp,
15019 int num_envp, char *buffer, int buffer_size);
15023 static inline __attribute__((always_inline)) void *
15024 class_get_devdata (struct class_device *dev)
15026 return dev->class_data;
15029 static inline __attribute__((always_inline)) void
15030 class_set_devdata (struct class_device *dev, void *data)
15032 dev->class_data = data;
15036 extern int __attribute__((warn_unused_result)) class_device_register(struct class_device *);
15037 extern void class_device_unregister(struct class_device *);
15038 extern void class_device_initialize(struct class_device *);
15039 extern int __attribute__((warn_unused_result)) class_device_add(struct class_device *);
15040 extern void class_device_del(struct class_device *);
15042 extern int class_device_rename(struct class_device *, char *);
15044 extern struct class_device * class_device_get(struct class_device *);
15045 extern void class_device_put(struct class_device *);
15047 extern void class_device_remove_file(struct class_device *,
15048 const struct class_device_attribute *);
15049 extern int __attribute__((warn_unused_result)) class_device_create_bin_file(struct class_device *,
15050 struct bin_attribute *);
15051 extern void class_device_remove_bin_file(struct class_device *,
15052 struct bin_attribute *);
15054 struct class_interface {
15055 struct list_head node;
15056 struct class *class;
15058 int (*add) (struct class_device *, struct class_interface *);
15059 void (*remove) (struct class_device *, struct class_interface *);
15060 int (*add_dev) (struct device *, struct class_interface *);
15061 void (*remove_dev) (struct device *, struct class_interface *);
15064 extern int __attribute__((warn_unused_result)) class_interface_register(struct class_interface *);
15065 extern void class_interface_unregister(struct class_interface *);
15067 extern struct class *class_create(struct module *owner, const char *name);
15068 extern void class_destroy(struct class *cls);
15069 extern struct class_device *class_device_create(struct class *cls,
15070 struct class_device *parent,
15072 struct device *device,
15073 const char *fmt, ...)
15074 __attribute__((format(printf,5,6)));
15075 extern void class_device_destroy(struct class *cls, dev_t devt);
15078 struct device_attribute {
15079 struct attribute attr;
15080 ssize_t (*show)(struct device *dev, struct device_attribute *attr,
15082 ssize_t (*store)(struct device *dev, struct device_attribute *attr,
15083 const char *buf, size_t count);
15089 extern int __attribute__((warn_unused_result)) device_create_file(struct device *device,
15090 struct device_attribute * entry);
15091 extern void device_remove_file(struct device * dev, struct device_attribute * attr);
15092 extern int __attribute__((warn_unused_result)) device_create_bin_file(struct device *dev,
15093 struct bin_attribute *attr);
15094 extern void device_remove_bin_file(struct device *dev,
15095 struct bin_attribute *attr);
15097 struct klist klist_children;
15098 struct klist_node knode_parent;
15099 struct klist_node knode_driver;
15100 struct klist_node knode_bus;
15101 struct device * parent;
15103 struct kobject kobj;
15105 unsigned is_registered:1;
15106 struct device_attribute uevent_attr;
15107 struct device_attribute *devt_attr;
15109 struct semaphore sem;
15113 struct bus_type * bus;
15114 struct device_driver *driver;
15117 void *platform_data;
15119 void *firmware_data;
15121 struct dev_pm_info power;
15124 u64 coherent_dma_mask;
15130 struct list_head dma_pools;
15132 struct dma_coherent_mem *dma_mem;
15136 struct list_head node;
15137 struct class *class;
15139 struct attribute_group **groups;
15141 void (*release)(struct device * dev);
15144 static inline __attribute__((always_inline)) void *
15145 dev_get_drvdata (struct device *dev)
15147 return dev->driver_data;
15150 static inline __attribute__((always_inline)) void
15151 dev_set_drvdata (struct device *dev, void *data)
15153 dev->driver_data = data;
15156 static inline __attribute__((always_inline)) int device_is_registered(struct device *dev)
15158 return dev->is_registered;
15164 extern int __attribute__((warn_unused_result)) device_register(struct device * dev);
15165 extern void device_unregister(struct device * dev);
15166 extern void device_initialize(struct device * dev);
15167 extern int __attribute__((warn_unused_result)) device_add(struct device * dev);
15168 extern void device_del(struct device * dev);
15169 extern int device_for_each_child(struct device *, void *,
15170 int (*fn)(struct device *, void *));
15171 extern int device_rename(struct device *dev, char *new_name);
15177 extern int __attribute__((warn_unused_result)) device_bind_driver(struct device *dev);
15178 extern void device_release_driver(struct device * dev);
15179 extern int __attribute__((warn_unused_result)) device_attach(struct device * dev);
15180 extern int __attribute__((warn_unused_result)) driver_attach(struct device_driver *drv);
15181 extern int __attribute__((warn_unused_result)) device_reprobe(struct device *dev);
15186 extern struct device *device_create(struct class *cls, struct device *parent,
15187 dev_t devt, const char *fmt, ...)
15188 __attribute__((format(printf,4,5)));
15189 extern void device_destroy(struct class *cls, dev_t devt);
15191 extern int virtual_device_parent(struct device *dev);
15199 extern int (*platform_notify)(struct device * dev);
15201 extern int (*platform_notify_remove)(struct device * dev);
15208 extern struct device * get_device(struct device * dev);
15209 extern void put_device(struct device * dev);
15213 extern void device_shutdown(void);
15217 extern int __attribute__((warn_unused_result)) firmware_register(struct subsystem *);
15218 extern void firmware_unregister(struct subsystem *);
15221 extern const char *dev_driver_string(struct device *dev);
15222 # 38 "include/linux/netdevice.h" 2
15228 struct ethtool_ops;
15229 struct netpoll_info;
15230 # 110 "include/linux/netdevice.h"
15231 struct net_device_stats
15233 unsigned long rx_packets;
15234 unsigned long tx_packets;
15235 unsigned long rx_bytes;
15236 unsigned long tx_bytes;
15237 unsigned long rx_errors;
15238 unsigned long tx_errors;
15239 unsigned long rx_dropped;
15240 unsigned long tx_dropped;
15241 unsigned long multicast;
15242 unsigned long collisions;
15245 unsigned long rx_length_errors;
15246 unsigned long rx_over_errors;
15247 unsigned long rx_crc_errors;
15248 unsigned long rx_frame_errors;
15249 unsigned long rx_fifo_errors;
15250 unsigned long rx_missed_errors;
15253 unsigned long tx_aborted_errors;
15254 unsigned long tx_carrier_errors;
15255 unsigned long tx_fifo_errors;
15256 unsigned long tx_heartbeat_errors;
15257 unsigned long tx_window_errors;
15260 unsigned long rx_compressed;
15261 unsigned long tx_compressed;
15267 IF_PORT_UNKNOWN = 0,
15282 struct neigh_parms;
15285 struct netif_rx_stats
15289 unsigned time_squeeze;
15290 unsigned cpu_collision;
15293 extern __typeof__(struct netif_rx_stats) per_cpu__netdev_rx_stat;
15302 struct dev_mc_list *next;
15304 unsigned char dmi_addrlen;
15311 struct hh_cache *hh_next;
15312 atomic_t hh_refcnt;
15318 int (*hh_output)(struct sk_buff *skb);
15327 unsigned long hh_data[(((32)+(16 -1))&~(16 - 1)) / sizeof(long)];
15329 # 227 "include/linux/netdevice.h"
15330 enum netdev_state_t
15332 __LINK_STATE_XOFF=0,
15333 __LINK_STATE_START,
15334 __LINK_STATE_PRESENT,
15335 __LINK_STATE_SCHED,
15336 __LINK_STATE_NOCARRIER,
15337 __LINK_STATE_RX_SCHED,
15338 __LINK_STATE_LINKWATCH_PENDING,
15339 __LINK_STATE_DORMANT,
15340 __LINK_STATE_QDISC_RUNNING,
15348 struct netdev_boot_setup {
15354 extern int __attribute__ ((__section__ (".init.text"))) netdev_boot_setup(char *str);
15355 # 263 "include/linux/netdevice.h"
15366 struct hlist_node name_hlist;
15372 unsigned long mem_end;
15373 unsigned long mem_start;
15374 unsigned long base_addr;
15382 unsigned char if_port;
15385 unsigned long state;
15387 struct net_device *next;
15390 int (*init)(struct net_device *dev);
15395 unsigned long features;
15396 # 331 "include/linux/netdevice.h"
15397 struct net_device *next_sched;
15404 struct net_device_stats* (*get_stats)(struct net_device *dev);
15408 const struct iw_handler_def * wireless_handlers;
15410 struct iw_public_data * wireless_data;
15412 const struct ethtool_ops *ethtool_ops;
15413 # 355 "include/linux/netdevice.h"
15414 unsigned int flags;
15415 unsigned short gflags;
15416 unsigned short priv_flags;
15417 unsigned short padded;
15419 unsigned char operstate;
15420 unsigned char link_mode;
15423 unsigned short type;
15424 unsigned short hard_header_len;
15426 struct net_device *master;
15431 unsigned char perm_addr[32];
15432 unsigned char addr_len;
15433 unsigned short dev_id;
15435 struct dev_mc_list *mc_list;
15453 struct list_head poll_list ;
15456 int (*poll) (struct net_device *dev, int *quota);
15459 unsigned long last_rx;
15461 unsigned char dev_addr[32];
15464 unsigned char broadcast[32];
15470 spinlock_t queue_lock ;
15471 struct Qdisc *qdisc;
15472 struct Qdisc *qdisc_sleeping;
15473 struct list_head qdisc_list;
15474 unsigned long tx_queue_len;
15477 struct sk_buff *gso_skb;
15480 spinlock_t ingress_lock;
15481 struct Qdisc *qdisc_ingress;
15487 spinlock_t _xmit_lock ;
15491 int xmit_lock_owner;
15493 int (*hard_start_xmit) (struct sk_buff *skb,
15494 struct net_device *dev);
15496 unsigned long trans_start;
15498 int watchdog_timeo;
15499 struct timer_list watchdog_timer;
15508 struct list_head todo_list;
15510 struct hlist_node index_hlist;
15513 enum { NETREG_UNINITIALIZED=0,
15515 NETREG_UNREGISTERING,
15516 NETREG_UNREGISTERED,
15521 void (*uninit)(struct net_device *dev);
15523 void (*destructor)(struct net_device *dev);
15526 int (*open)(struct net_device *dev);
15527 int (*stop)(struct net_device *dev);
15529 int (*hard_header) (struct sk_buff *skb,
15530 struct net_device *dev,
15531 unsigned short type,
15535 int (*rebuild_header)(struct sk_buff *skb);
15537 void (*set_multicast_list)(struct net_device *dev);
15539 int (*set_mac_address)(struct net_device *dev,
15542 int (*do_ioctl)(struct net_device *dev,
15543 struct ifreq *ifr, int cmd);
15545 int (*set_config)(struct net_device *dev,
15546 struct ifmap *map);
15548 int (*hard_header_cache)(struct neighbour *neigh,
15549 struct hh_cache *hh);
15550 void (*header_cache_update)(struct hh_cache *hh,
15551 struct net_device *dev,
15552 unsigned char * haddr);
15554 int (*change_mtu)(struct net_device *dev, int new_mtu);
15557 void (*tx_timeout) (struct net_device *dev);
15559 void (*vlan_rx_register)(struct net_device *dev,
15560 struct vlan_group *grp);
15561 void (*vlan_rx_add_vid)(struct net_device *dev,
15562 unsigned short vid);
15563 void (*vlan_rx_kill_vid)(struct net_device *dev,
15564 unsigned short vid);
15566 int (*hard_header_parse)(struct sk_buff *skb,
15567 unsigned char *haddr);
15568 int (*neigh_setup)(struct net_device *dev, struct neigh_parms *);
15570 struct netpoll_info *npinfo;
15573 void (*poll_controller)(struct net_device *dev);
15577 struct net_bridge_port *br_port;
15585 struct class_device class_dev;
15587 struct attribute_group *sysfs_groups[3];
15593 static inline __attribute__((always_inline)) void *netdev_priv(struct net_device *dev)
15595 return (char *)dev + ((sizeof(struct net_device)
15606 struct packet_type {
15608 struct net_device *dev;
15609 int (*func) (struct sk_buff *,
15610 struct net_device *,
15611 struct packet_type *,
15612 struct net_device *);
15613 struct sk_buff *(*gso_segment)(struct sk_buff *skb,
15615 int (*gso_send_check)(struct sk_buff *skb);
15616 void *af_packet_priv;
15617 struct list_head list;
15620 # 1 "include/linux/interrupt.h" 1
15621 # 10 "include/linux/interrupt.h"
15622 # 1 "include/linux/irqreturn.h" 1
15623 # 19 "include/linux/irqreturn.h"
15624 typedef int irqreturn_t;
15625 # 11 "include/linux/interrupt.h" 2
15628 # 1 "include/linux/irqflags.h" 1
15629 # 14 "include/linux/interrupt.h" 2
15630 # 1 "include/linux/bottom_half.h" 1
15631 extern void local_bh_disable(void);
15632 extern void __local_bh_enable(void);
15633 extern void _local_bh_enable(void);
15634 extern void local_bh_enable(void);
15635 extern void local_bh_enable_ip(unsigned long ip);
15636 # 15 "include/linux/interrupt.h" 2
15637 # 68 "include/linux/interrupt.h"
15638 typedef irqreturn_t (*irq_handler_t)(int, void *);
15641 irq_handler_t handler;
15642 unsigned long flags;
15646 struct irqaction *next;
15648 struct proc_dir_entry *dir;
15651 extern irqreturn_t no_action(int cpl, void *dev_id);
15652 extern int request_irq(unsigned int, irq_handler_t handler,
15653 unsigned long, const char *, void *);
15654 extern void free_irq(unsigned int, void *);
15655 # 105 "include/linux/interrupt.h"
15656 extern void disable_irq_nosync(unsigned int irq);
15657 extern void disable_irq(unsigned int irq);
15658 extern void enable_irq(unsigned int irq);
15659 # 120 "include/linux/interrupt.h"
15660 static inline __attribute__((always_inline)) void disable_irq_nosync_lockdep(unsigned int irq)
15662 disable_irq_nosync(irq);
15668 static inline __attribute__((always_inline)) void disable_irq_nosync_lockdep_irqsave(unsigned int irq, unsigned long *flags)
15670 disable_irq_nosync(irq);
15676 static inline __attribute__((always_inline)) void disable_irq_lockdep(unsigned int irq)
15684 static inline __attribute__((always_inline)) void enable_irq_lockdep(unsigned int irq)
15692 static inline __attribute__((always_inline)) void enable_irq_lockdep_irqrestore(unsigned int irq, unsigned long *flags)
15701 extern int set_irq_wake(unsigned int irq, unsigned int on);
15703 static inline __attribute__((always_inline)) int enable_irq_wake(unsigned int irq)
15705 return set_irq_wake(irq, 1);
15708 static inline __attribute__((always_inline)) int disable_irq_wake(unsigned int irq)
15710 return set_irq_wake(irq, 0);
15712 # 196 "include/linux/interrupt.h"
15713 static inline __attribute__((always_inline)) void __attribute__((deprecated)) cli(void)
15715 do { int _tmp_dummy; __asm__ __volatile__ ( "cli %0;" :"=d" (_tmp_dummy):); } while (0);
15717 static inline __attribute__((always_inline)) void __attribute__((deprecated)) sti(void)
15719 do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0);
15721 static inline __attribute__((always_inline)) void __attribute__((deprecated)) save_flags(unsigned long *x)
15723 asm volatile ("cli %0;" "sti %0;" :"=d"(*x):);;
15726 static inline __attribute__((always_inline)) void __attribute__((deprecated)) restore_flags(unsigned long x)
15728 do { if (((x) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
15731 static inline __attribute__((always_inline)) void __attribute__((deprecated)) save_and_cli(unsigned long *x)
15733 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(*x):); } while (0);
15735 # 227 "include/linux/interrupt.h"
15750 struct softirq_action
15752 void (*action)(struct softirq_action *);
15756 void do_softirq(void);
15757 extern void open_softirq(int nr, void (*action)(struct softirq_action*), void *data);
15758 extern void softirq_init(void);
15760 extern void raise_softirq_irqoff(unsigned int nr);
15761 extern void raise_softirq(unsigned int nr);
15762 # 275 "include/linux/interrupt.h"
15763 struct tasklet_struct
15765 struct tasklet_struct *next;
15766 unsigned long state;
15768 void (*func)(unsigned long);
15769 unsigned long data;
15771 # 291 "include/linux/interrupt.h"
15774 TASKLET_STATE_SCHED,
15777 # 319 "include/linux/interrupt.h"
15778 extern void __tasklet_schedule(struct tasklet_struct *t);
15780 static inline __attribute__((always_inline)) void tasklet_schedule(struct tasklet_struct *t)
15782 if (!test_and_set_bit(TASKLET_STATE_SCHED, &t->state))
15783 __tasklet_schedule(t);
15786 extern void __tasklet_hi_schedule(struct tasklet_struct *t);
15788 static inline __attribute__((always_inline)) void tasklet_hi_schedule(struct tasklet_struct *t)
15790 if (!test_and_set_bit(TASKLET_STATE_SCHED, &t->state))
15791 __tasklet_hi_schedule(t);
15795 static inline __attribute__((always_inline)) void tasklet_disable_nosync(struct tasklet_struct *t)
15797 atomic_inc(&t->count);
15798 __asm__ __volatile__("": : :"memory");
15801 static inline __attribute__((always_inline)) void tasklet_disable(struct tasklet_struct *t)
15803 tasklet_disable_nosync(t);
15805 __asm__ __volatile__("": : :"memory");
15808 static inline __attribute__((always_inline)) void tasklet_enable(struct tasklet_struct *t)
15810 __asm__ __volatile__("": : :"memory");
15811 atomic_dec(&t->count);
15814 static inline __attribute__((always_inline)) void tasklet_hi_enable(struct tasklet_struct *t)
15816 __asm__ __volatile__("": : :"memory");
15817 atomic_dec(&t->count);
15820 extern void tasklet_kill(struct tasklet_struct *t);
15821 extern void tasklet_kill_immediate(struct tasklet_struct *t, unsigned int cpu);
15822 extern void tasklet_init(struct tasklet_struct *t,
15823 void (*func)(unsigned long), unsigned long data);
15824 # 408 "include/linux/interrupt.h"
15825 extern unsigned long probe_irq_on(void);
15826 extern int probe_irq_off(unsigned long);
15827 extern unsigned int probe_irq_mask(unsigned long);
15828 # 562 "include/linux/netdevice.h" 2
15831 extern struct net_device loopback_dev;
15832 extern struct net_device *dev_base;
15833 extern rwlock_t dev_base_lock;
15835 extern int netdev_boot_setup_check(struct net_device *dev);
15836 extern unsigned long netdev_boot_base(const char *prefix, int unit);
15837 extern struct net_device *dev_getbyhwaddr(unsigned short type, char *hwaddr);
15838 extern struct net_device *dev_getfirstbyhwtype(unsigned short type);
15839 extern void dev_add_pack(struct packet_type *pt);
15840 extern void dev_remove_pack(struct packet_type *pt);
15841 extern void __dev_remove_pack(struct packet_type *pt);
15843 extern struct net_device *dev_get_by_flags(unsigned short flags,
15844 unsigned short mask);
15845 extern struct net_device *dev_get_by_name(const char *name);
15846 extern struct net_device *__dev_get_by_name(const char *name);
15847 extern int dev_alloc_name(struct net_device *dev, const char *name);
15848 extern int dev_open(struct net_device *dev);
15849 extern int dev_close(struct net_device *dev);
15850 extern int dev_queue_xmit(struct sk_buff *skb);
15851 extern int register_netdevice(struct net_device *dev);
15852 extern int unregister_netdevice(struct net_device *dev);
15853 extern void free_netdev(struct net_device *dev);
15854 extern void synchronize_net(void);
15855 extern int register_netdevice_notifier(struct notifier_block *nb);
15856 extern int unregister_netdevice_notifier(struct notifier_block *nb);
15857 extern int call_netdevice_notifiers(unsigned long val, void *v);
15858 extern struct net_device *dev_get_by_index(int ifindex);
15859 extern struct net_device *__dev_get_by_index(int ifindex);
15860 extern int dev_restart(struct net_device *dev);
15862 extern int netpoll_trap(void);
15865 typedef int gifconf_func_t(struct net_device * dev, char * bufptr, int len);
15866 extern int register_gifconf(unsigned int family, gifconf_func_t * gifconf);
15867 static inline __attribute__((always_inline)) int unregister_gifconf(unsigned int family)
15869 return register_gifconf(family, ((void *)0));
15877 struct softnet_data
15879 struct net_device *output_queue;
15880 struct sk_buff_head input_pkt_queue;
15881 struct list_head poll_list;
15882 struct sk_buff *completion_queue;
15884 struct net_device backlog_dev;
15890 extern __typeof__(struct softnet_data) per_cpu__softnet_data;
15894 extern void __netif_schedule(struct net_device *dev);
15896 static inline __attribute__((always_inline)) void netif_schedule(struct net_device *dev)
15898 if (!(__builtin_constant_p(__LINK_STATE_XOFF) ? __constant_test_bit((__LINK_STATE_XOFF),(&dev->state)) : __test_bit((__LINK_STATE_XOFF),(&dev->state))))
15899 __netif_schedule(dev);
15902 static inline __attribute__((always_inline)) void netif_start_queue(struct net_device *dev)
15904 clear_bit(__LINK_STATE_XOFF, &dev->state);
15907 static inline __attribute__((always_inline)) void netif_wake_queue(struct net_device *dev)
15910 if (netpoll_trap())
15913 if (test_and_clear_bit(__LINK_STATE_XOFF, &dev->state))
15914 __netif_schedule(dev);
15917 static inline __attribute__((always_inline)) void netif_stop_queue(struct net_device *dev)
15920 if (netpoll_trap())
15923 set_bit(__LINK_STATE_XOFF, &dev->state);
15926 static inline __attribute__((always_inline)) int netif_queue_stopped(const struct net_device *dev)
15928 return (__builtin_constant_p(__LINK_STATE_XOFF) ? __constant_test_bit((__LINK_STATE_XOFF),(&dev->state)) : __test_bit((__LINK_STATE_XOFF),(&dev->state)));
15931 static inline __attribute__((always_inline)) int netif_running(const struct net_device *dev)
15933 return (__builtin_constant_p(__LINK_STATE_START) ? __constant_test_bit((__LINK_STATE_START),(&dev->state)) : __test_bit((__LINK_STATE_START),(&dev->state)));
15940 static inline __attribute__((always_inline)) void dev_kfree_skb_irq(struct sk_buff *skb)
15942 if ((atomic_sub_return(1, (&skb->users)) == 0)) {
15943 struct softnet_data *sd;
15944 unsigned long flags;
15946 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
15947 sd = &per_cpu__softnet_data;
15948 skb->next = sd->completion_queue;
15949 sd->completion_queue = skb;
15950 raise_softirq_irqoff(NET_TX_SOFTIRQ);
15951 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
15958 extern void dev_kfree_skb_any(struct sk_buff *skb);
15961 extern int netif_rx(struct sk_buff *skb);
15962 extern int netif_rx_ni(struct sk_buff *skb);
15964 extern int netif_receive_skb(struct sk_buff *skb);
15965 extern int dev_valid_name(const char *name);
15966 extern int dev_ioctl(unsigned int cmd, void *);
15967 extern int dev_ethtool(struct ifreq *);
15968 extern unsigned dev_get_flags(const struct net_device *);
15969 extern int dev_change_flags(struct net_device *, unsigned);
15970 extern int dev_change_name(struct net_device *, char *);
15971 extern int dev_set_mtu(struct net_device *, int);
15972 extern int dev_set_mac_address(struct net_device *,
15973 struct sockaddr *);
15974 extern int dev_hard_start_xmit(struct sk_buff *skb,
15975 struct net_device *dev);
15977 extern void dev_init(void);
15979 extern int netdev_budget;
15982 extern void netdev_run_todo(void);
15984 static inline __attribute__((always_inline)) void dev_put(struct net_device *dev)
15986 atomic_dec(&dev->refcnt);
15989 static inline __attribute__((always_inline)) void dev_hold(struct net_device *dev)
15991 atomic_inc(&dev->refcnt);
15993 # 736 "include/linux/netdevice.h"
15994 extern void linkwatch_fire_event(struct net_device *dev);
15996 static inline __attribute__((always_inline)) int netif_carrier_ok(const struct net_device *dev)
15998 return !(__builtin_constant_p(__LINK_STATE_NOCARRIER) ? __constant_test_bit((__LINK_STATE_NOCARRIER),(&dev->state)) : __test_bit((__LINK_STATE_NOCARRIER),(&dev->state)));
16001 extern void __netdev_watchdog_up(struct net_device *dev);
16003 extern void netif_carrier_on(struct net_device *dev);
16005 extern void netif_carrier_off(struct net_device *dev);
16007 static inline __attribute__((always_inline)) void netif_dormant_on(struct net_device *dev)
16009 if (!test_and_set_bit(__LINK_STATE_DORMANT, &dev->state))
16010 linkwatch_fire_event(dev);
16013 static inline __attribute__((always_inline)) void netif_dormant_off(struct net_device *dev)
16015 if (test_and_clear_bit(__LINK_STATE_DORMANT, &dev->state))
16016 linkwatch_fire_event(dev);
16019 static inline __attribute__((always_inline)) int netif_dormant(const struct net_device *dev)
16021 return (__builtin_constant_p(__LINK_STATE_DORMANT) ? __constant_test_bit((__LINK_STATE_DORMANT),(&dev->state)) : __test_bit((__LINK_STATE_DORMANT),(&dev->state)));
16025 static inline __attribute__((always_inline)) int netif_oper_up(const struct net_device *dev) {
16026 return (dev->operstate == IF_OPER_UP ||
16027 dev->operstate == IF_OPER_UNKNOWN );
16031 static inline __attribute__((always_inline)) int netif_device_present(struct net_device *dev)
16033 return (__builtin_constant_p(__LINK_STATE_PRESENT) ? __constant_test_bit((__LINK_STATE_PRESENT),(&dev->state)) : __test_bit((__LINK_STATE_PRESENT),(&dev->state)));
16036 extern void netif_device_detach(struct net_device *dev);
16038 extern void netif_device_attach(struct net_device *dev);
16046 NETIF_MSG_DRV = 0x0001,
16047 NETIF_MSG_PROBE = 0x0002,
16048 NETIF_MSG_LINK = 0x0004,
16049 NETIF_MSG_TIMER = 0x0008,
16050 NETIF_MSG_IFDOWN = 0x0010,
16051 NETIF_MSG_IFUP = 0x0020,
16052 NETIF_MSG_RX_ERR = 0x0040,
16053 NETIF_MSG_TX_ERR = 0x0080,
16054 NETIF_MSG_TX_QUEUED = 0x0100,
16055 NETIF_MSG_INTR = 0x0200,
16056 NETIF_MSG_TX_DONE = 0x0400,
16057 NETIF_MSG_RX_STATUS = 0x0800,
16058 NETIF_MSG_PKTDATA = 0x1000,
16059 NETIF_MSG_HW = 0x2000,
16060 NETIF_MSG_WOL = 0x4000,
16062 # 821 "include/linux/netdevice.h"
16063 static inline __attribute__((always_inline)) u32 netif_msg_init(int debug_value, int default_msg_enable_bits)
16066 if (debug_value < 0 || debug_value >= (sizeof(u32) * 8))
16067 return default_msg_enable_bits;
16068 if (debug_value == 0)
16071 return (1 << debug_value) - 1;
16075 static inline __attribute__((always_inline)) int __netif_rx_schedule_prep(struct net_device *dev)
16077 return !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state);
16081 static inline __attribute__((always_inline)) int netif_rx_schedule_prep(struct net_device *dev)
16083 return netif_running(dev) && __netif_rx_schedule_prep(dev);
16090 extern void __netif_rx_schedule(struct net_device *dev);
16094 static inline __attribute__((always_inline)) void netif_rx_schedule(struct net_device *dev)
16096 if (netif_rx_schedule_prep(dev))
16097 __netif_rx_schedule(dev);
16103 static inline __attribute__((always_inline)) int netif_rx_reschedule(struct net_device *dev, int undo)
16105 if (netif_rx_schedule_prep(dev)) {
16106 unsigned long flags;
16108 dev->quota += undo;
16110 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
16111 list_add_tail(&dev->poll_list, &per_cpu__softnet_data.poll_list);
16112 do { ((irq_stat[0].__softirq_pending) |= (1UL << (NET_RX_SOFTIRQ))); } while (0);
16113 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
16124 static inline __attribute__((always_inline)) void netif_rx_complete(struct net_device *dev)
16126 unsigned long flags;
16128 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
16129 do { if (__builtin_expect(!!((!(__builtin_constant_p(__LINK_STATE_RX_SCHED) ? __constant_test_bit((__LINK_STATE_RX_SCHED),(&dev->state)) : __test_bit((__LINK_STATE_RX_SCHED),(&dev->state))))!=0), 0)) do { dump_stack(); printk("<4>" "\nkernel BUG at %s:%d!\n", "include/linux/netdevice.h", 887); panic("BUG!"); } while (0); } while(0);
16130 list_del(&dev->poll_list);
16131 __asm__ __volatile__("": : :"memory");
16132 clear_bit(__LINK_STATE_RX_SCHED, &dev->state);
16133 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
16136 static inline __attribute__((always_inline)) void netif_poll_disable(struct net_device *dev)
16138 while (test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state))
16140 schedule_timeout_interruptible(1);
16143 static inline __attribute__((always_inline)) void netif_poll_enable(struct net_device *dev)
16145 clear_bit(__LINK_STATE_RX_SCHED, &dev->state);
16151 static inline __attribute__((always_inline)) void __netif_rx_complete(struct net_device *dev)
16153 do { if (__builtin_expect(!!((!(__builtin_constant_p(__LINK_STATE_RX_SCHED) ? __constant_test_bit((__LINK_STATE_RX_SCHED),(&dev->state)) : __test_bit((__LINK_STATE_RX_SCHED),(&dev->state))))!=0), 0)) do { dump_stack(); printk("<4>" "\nkernel BUG at %s:%d!\n", "include/linux/netdevice.h", 911); panic("BUG!"); } while (0); } while(0);
16154 list_del(&dev->poll_list);
16155 __asm__ __volatile__("": : :"memory");
16156 clear_bit(__LINK_STATE_RX_SCHED, &dev->state);
16159 static inline __attribute__((always_inline)) void netif_tx_lock(struct net_device *dev)
16161 do { do { } while (0); (void)0; (void)(&dev->_xmit_lock); } while (0);
16162 dev->xmit_lock_owner = 0;
16165 static inline __attribute__((always_inline)) void netif_tx_lock_bh(struct net_device *dev)
16167 do { local_bh_disable(); do { do { } while (0); (void)0; (void)(&dev->_xmit_lock); } while (0); } while (0);
16168 dev->xmit_lock_owner = 0;
16171 static inline __attribute__((always_inline)) int netif_tx_trylock(struct net_device *dev)
16173 int ok = (({ do { do { } while (0); (void)0; (void)(&dev->_xmit_lock); } while (0); 1; }));
16174 if (__builtin_expect(!!(ok), 1))
16175 dev->xmit_lock_owner = 0;
16179 static inline __attribute__((always_inline)) void netif_tx_unlock(struct net_device *dev)
16181 dev->xmit_lock_owner = -1;
16182 do { do { } while (0); (void)0; (void)(&dev->_xmit_lock); } while (0);
16185 static inline __attribute__((always_inline)) void netif_tx_unlock_bh(struct net_device *dev)
16187 dev->xmit_lock_owner = -1;
16188 do { do { } while (0); local_bh_enable(); (void)0; (void)(&dev->_xmit_lock); } while (0);
16191 static inline __attribute__((always_inline)) void netif_tx_disable(struct net_device *dev)
16193 netif_tx_lock_bh(dev);
16194 netif_stop_queue(dev);
16195 netif_tx_unlock_bh(dev);
16200 extern void ether_setup(struct net_device *dev);
16203 extern struct net_device *alloc_netdev(int sizeof_priv, const char *name,
16204 void (*setup)(struct net_device *));
16205 extern int register_netdev(struct net_device *dev);
16206 extern void unregister_netdev(struct net_device *dev);
16208 extern void dev_mc_upload(struct net_device *dev);
16209 extern int dev_mc_delete(struct net_device *dev, void *addr, int alen, int all);
16210 extern int dev_mc_add(struct net_device *dev, void *addr, int alen, int newonly);
16211 extern void dev_mc_discard(struct net_device *dev);
16212 extern void dev_set_promiscuity(struct net_device *dev, int inc);
16213 extern void dev_set_allmulti(struct net_device *dev, int inc);
16214 extern void netdev_state_change(struct net_device *dev);
16215 extern void netdev_features_change(struct net_device *dev);
16217 extern void dev_load(const char *name);
16218 extern void dev_mcast_init(void);
16219 extern int netdev_max_backlog;
16220 extern int weight_p;
16221 extern int netdev_set_master(struct net_device *dev, struct net_device *master);
16222 extern int skb_checksum_help(struct sk_buff *skb);
16223 extern struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features);
16225 extern void netdev_rx_csum_fault(struct net_device *dev);
16232 extern void net_enable_timestamp(void);
16233 extern void net_disable_timestamp(void);
16236 extern void *dev_seq_start(struct seq_file *seq, loff_t *pos);
16237 extern void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos);
16238 extern void dev_seq_stop(struct seq_file *seq, void *v);
16241 extern void linkwatch_run_queue(void);
16243 static inline __attribute__((always_inline)) int net_gso_ok(int features, int gso_type)
16245 int feature = gso_type << 16;
16246 return (features & feature) == feature;
16249 static inline __attribute__((always_inline)) int skb_gso_ok(struct sk_buff *skb, int features)
16251 return net_gso_ok(features, ((struct skb_shared_info *)((skb)->end))->gso_type);
16254 static inline __attribute__((always_inline)) int netif_needs_gso(struct net_device *dev, struct sk_buff *skb)
16256 return skb_is_gso(skb) &&
16257 (!skb_gso_ok(skb, dev->features) ||
16258 __builtin_expect(!!(skb->ip_summed != 1), 0));
16265 static inline __attribute__((always_inline)) int skb_bond_should_drop(struct sk_buff *skb)
16267 struct net_device *dev = skb->dev;
16268 struct net_device *master = dev->master;
16271 (dev->priv_flags & 0x4)) {
16272 if ((dev->priv_flags & 0x40) &&
16273 skb->protocol == (( __be16)((__u16)( (((__u16)((0x0806)) & (__u16)0x00ffU) << 8) | (((__u16)((0x0806)) & (__u16)0xff00U) >> 8) ))))
16276 if (master->priv_flags & 0x10) {
16277 if (skb->pkt_type != 1 &&
16278 skb->pkt_type != 2)
16281 if (master->priv_flags & 0x8 &&
16282 skb->protocol == (( __be16)((__u16)( (((__u16)((0x8809)) & (__u16)0x00ffU) << 8) | (((__u16)((0x8809)) & (__u16)0xff00U) >> 8) ))))
16289 # 62 "net/ipv4/ip_output.c" 2
16290 # 1 "include/linux/etherdevice.h" 1
16291 # 32 "include/linux/etherdevice.h"
16292 extern int eth_header(struct sk_buff *skb, struct net_device *dev,
16293 unsigned short type, void *daddr,
16294 void *saddr, unsigned len);
16295 extern int eth_rebuild_header(struct sk_buff *skb);
16296 extern __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev);
16297 extern void eth_header_cache_update(struct hh_cache *hh, struct net_device *dev,
16298 unsigned char * haddr);
16299 extern int eth_header_cache(struct neighbour *neigh,
16300 struct hh_cache *hh);
16302 extern struct net_device *alloc_etherdev(int sizeof_priv);
16303 static inline __attribute__((always_inline)) void eth_copy_and_sum (struct sk_buff *dest,
16304 const unsigned char *src,
16307 memcpy (dest->data, src, len);
16316 static inline __attribute__((always_inline)) int is_zero_ether_addr(const u8 *addr)
16318 return !(addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]);
16320 # 68 "include/linux/etherdevice.h"
16321 static inline __attribute__((always_inline)) int is_multicast_ether_addr(const u8 *addr)
16323 return (0x01 & addr[0]);
16332 static inline __attribute__((always_inline)) int is_broadcast_ether_addr(const u8 *addr)
16334 return (addr[0] & addr[1] & addr[2] & addr[3] & addr[4] & addr[5]) == 0xff;
16336 # 93 "include/linux/etherdevice.h"
16337 static inline __attribute__((always_inline)) int is_valid_ether_addr(const u8 *addr)
16341 return !is_multicast_ether_addr(addr) && !is_zero_ether_addr(addr);
16343 # 107 "include/linux/etherdevice.h"
16344 static inline __attribute__((always_inline)) void random_ether_addr(u8 *addr)
16346 get_random_bytes (addr, 6);
16350 # 121 "include/linux/etherdevice.h"
16351 static inline __attribute__((always_inline)) unsigned compare_ether_addr(const u8 *addr1, const u8 *addr2)
16353 const u16 *a = (const u16 *) addr1;
16354 const u16 *b = (const u16 *) addr2;
16356 ((void)sizeof(char[1 - 2*!!(6 != 6)]));
16357 return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2])) != 0;
16359 # 63 "net/ipv4/ip_output.c" 2
16360 # 1 "include/linux/proc_fs.h" 1
16367 # 1 "include/linux/magic.h" 1
16368 # 8 "include/linux/proc_fs.h" 2
16369 # 24 "include/linux/proc_fs.h"
16373 # 43 "include/linux/proc_fs.h"
16374 typedef int (read_proc_t)(char *page, char **start, off_t off,
16375 int count, int *eof, void *data);
16376 typedef int (write_proc_t)(struct file *file, const char *buffer,
16377 unsigned long count, void *data);
16378 typedef int (get_info_t)(char *, char **, off_t, int);
16380 struct proc_dir_entry {
16381 unsigned int low_ino;
16382 unsigned short namelen;
16389 struct inode_operations * proc_iops;
16390 const struct file_operations * proc_fops;
16391 get_info_t *get_info;
16392 struct module *owner;
16393 struct proc_dir_entry *next, *parent, *subdir;
16395 read_proc_t *read_proc;
16396 write_proc_t *write_proc;
16402 struct kcore_list {
16403 struct kcore_list *next;
16404 unsigned long addr;
16409 struct list_head list;
16410 unsigned long long paddr;
16411 unsigned long long size;
16417 extern struct proc_dir_entry proc_root;
16418 extern struct proc_dir_entry *proc_root_fs;
16419 extern struct proc_dir_entry *proc_net;
16420 extern struct proc_dir_entry *proc_net_stat;
16421 extern struct proc_dir_entry *proc_bus;
16422 extern struct proc_dir_entry *proc_root_driver;
16423 extern struct proc_dir_entry *proc_root_kcore;
16425 extern spinlock_t proc_subdir_lock;
16427 extern void proc_root_init(void);
16428 extern void proc_misc_init(void);
16432 void proc_flush_task(struct task_struct *task);
16433 struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *);
16434 int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir);
16435 unsigned long task_vsize(struct mm_struct *);
16436 int task_statm(struct mm_struct *, int *, int *, int *, int *);
16437 char *task_mem(struct mm_struct *, char *);
16439 extern struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode,
16440 struct proc_dir_entry *parent);
16441 extern void remove_proc_entry(const char *name, struct proc_dir_entry *parent);
16443 extern struct vfsmount *proc_mnt;
16444 extern int proc_fill_super(struct super_block *,void *,int);
16445 extern struct inode *proc_get_inode(struct super_block *, unsigned int, struct proc_dir_entry *);
16447 extern int proc_match(int, const char *,struct proc_dir_entry *);
16448 # 125 "include/linux/proc_fs.h"
16449 extern int proc_readdir(struct file *, void *, filldir_t);
16450 extern struct dentry *proc_lookup(struct inode *, struct dentry *, struct nameidata *);
16452 extern const struct file_operations proc_kcore_operations;
16453 extern const struct file_operations proc_kmsg_operations;
16454 extern const struct file_operations ppc_htab_operations;
16460 extern void proc_tty_init(void);
16461 extern void proc_tty_register_driver(struct tty_driver *driver);
16462 extern void proc_tty_unregister_driver(struct tty_driver *driver);
16463 # 156 "include/linux/proc_fs.h"
16464 extern struct proc_dir_entry *proc_symlink(const char *,
16465 struct proc_dir_entry *, const char *);
16466 extern struct proc_dir_entry *proc_mkdir(const char *,struct proc_dir_entry *);
16467 extern struct proc_dir_entry *proc_mkdir_mode(const char *name, mode_t mode,
16468 struct proc_dir_entry *parent);
16470 static inline __attribute__((always_inline)) struct proc_dir_entry *create_proc_read_entry(const char *name,
16471 mode_t mode, struct proc_dir_entry *base,
16472 read_proc_t *read_proc, void * data)
16474 struct proc_dir_entry *res=create_proc_entry(name,mode,base);
16476 res->read_proc=read_proc;
16482 static inline __attribute__((always_inline)) struct proc_dir_entry *create_proc_info_entry(const char *name,
16483 mode_t mode, struct proc_dir_entry *base, get_info_t *get_info)
16485 struct proc_dir_entry *res=create_proc_entry(name,mode,base);
16486 if (res) res->get_info=get_info;
16490 static inline __attribute__((always_inline)) struct proc_dir_entry *proc_net_create(const char *name,
16491 mode_t mode, get_info_t *get_info)
16493 return create_proc_info_entry(name,mode,proc_net,get_info);
16496 static inline __attribute__((always_inline)) struct proc_dir_entry *proc_net_fops_create(const char *name,
16497 mode_t mode, const struct file_operations *fops)
16499 struct proc_dir_entry *res = create_proc_entry(name, mode, proc_net);
16501 res->proc_fops = fops;
16505 static inline __attribute__((always_inline)) void proc_net_remove(const char *name)
16507 remove_proc_entry(name,proc_net);
16509 # 240 "include/linux/proc_fs.h"
16510 static inline __attribute__((always_inline)) void kclist_add(struct kcore_list *new, void *addr, size_t size)
16518 int (*proc_get_link)(struct inode *, struct dentry **, struct vfsmount **);
16519 int (*proc_read)(struct task_struct *task, char *page);
16522 struct proc_inode {
16526 struct proc_dir_entry *pde;
16527 struct inode vfs_inode;
16530 static inline __attribute__((always_inline)) struct proc_inode *PROC_I(const struct inode *inode)
16532 return ({ const typeof( ((struct proc_inode *)0)->vfs_inode ) *__mptr = (inode); (struct proc_inode *)( (char *)__mptr - __builtin_offsetof(struct proc_inode,vfs_inode) );});
16535 static inline __attribute__((always_inline)) struct proc_dir_entry *PDE(const struct inode *inode)
16537 return PROC_I(inode)->pde;
16540 struct proc_maps_private {
16542 struct task_struct *task;
16547 # 64 "net/ipv4/ip_output.c" 2
16551 # 1 "include/net/snmp.h" 1
16552 # 25 "include/net/snmp.h"
16553 # 1 "include/linux/snmp.h" 1
16554 # 18 "include/linux/snmp.h"
16557 IPSTATS_MIB_NUM = 0,
16558 IPSTATS_MIB_INRECEIVES,
16559 IPSTATS_MIB_INHDRERRORS,
16560 IPSTATS_MIB_INTOOBIGERRORS,
16561 IPSTATS_MIB_INNOROUTES,
16562 IPSTATS_MIB_INADDRERRORS,
16563 IPSTATS_MIB_INUNKNOWNPROTOS,
16564 IPSTATS_MIB_INTRUNCATEDPKTS,
16565 IPSTATS_MIB_INDISCARDS,
16566 IPSTATS_MIB_INDELIVERS,
16567 IPSTATS_MIB_OUTFORWDATAGRAMS,
16568 IPSTATS_MIB_OUTREQUESTS,
16569 IPSTATS_MIB_OUTDISCARDS,
16570 IPSTATS_MIB_OUTNOROUTES,
16571 IPSTATS_MIB_REASMTIMEOUT,
16572 IPSTATS_MIB_REASMREQDS,
16573 IPSTATS_MIB_REASMOKS,
16574 IPSTATS_MIB_REASMFAILS,
16575 IPSTATS_MIB_FRAGOKS,
16576 IPSTATS_MIB_FRAGFAILS,
16577 IPSTATS_MIB_FRAGCREATES,
16578 IPSTATS_MIB_INMCASTPKTS,
16579 IPSTATS_MIB_OUTMCASTPKTS,
16593 ICMP_MIB_INDESTUNREACHS,
16594 ICMP_MIB_INTIMEEXCDS,
16595 ICMP_MIB_INPARMPROBS,
16596 ICMP_MIB_INSRCQUENCHS,
16597 ICMP_MIB_INREDIRECTS,
16599 ICMP_MIB_INECHOREPS,
16600 ICMP_MIB_INTIMESTAMPS,
16601 ICMP_MIB_INTIMESTAMPREPS,
16602 ICMP_MIB_INADDRMASKS,
16603 ICMP_MIB_INADDRMASKREPS,
16605 ICMP_MIB_OUTERRORS,
16606 ICMP_MIB_OUTDESTUNREACHS,
16607 ICMP_MIB_OUTTIMEEXCDS,
16608 ICMP_MIB_OUTPARMPROBS,
16609 ICMP_MIB_OUTSRCQUENCHS,
16610 ICMP_MIB_OUTREDIRECTS,
16612 ICMP_MIB_OUTECHOREPS,
16613 ICMP_MIB_OUTTIMESTAMPS,
16614 ICMP_MIB_OUTTIMESTAMPREPS,
16615 ICMP_MIB_OUTADDRMASKS,
16616 ICMP_MIB_OUTADDRMASKREPS,
16628 ICMP6_MIB_INERRORS,
16629 ICMP6_MIB_INDESTUNREACHS,
16630 ICMP6_MIB_INPKTTOOBIGS,
16631 ICMP6_MIB_INTIMEEXCDS,
16632 ICMP6_MIB_INPARMPROBLEMS,
16634 ICMP6_MIB_INECHOREPLIES,
16635 ICMP6_MIB_INGROUPMEMBQUERIES,
16636 ICMP6_MIB_INGROUPMEMBRESPONSES,
16637 ICMP6_MIB_INGROUPMEMBREDUCTIONS,
16638 ICMP6_MIB_INROUTERSOLICITS,
16639 ICMP6_MIB_INROUTERADVERTISEMENTS,
16640 ICMP6_MIB_INNEIGHBORSOLICITS,
16641 ICMP6_MIB_INNEIGHBORADVERTISEMENTS,
16642 ICMP6_MIB_INREDIRECTS,
16644 ICMP6_MIB_OUTDESTUNREACHS,
16645 ICMP6_MIB_OUTPKTTOOBIGS,
16646 ICMP6_MIB_OUTTIMEEXCDS,
16647 ICMP6_MIB_OUTPARMPROBLEMS,
16648 ICMP6_MIB_OUTECHOREPLIES,
16649 ICMP6_MIB_OUTROUTERSOLICITS,
16650 ICMP6_MIB_OUTNEIGHBORSOLICITS,
16651 ICMP6_MIB_OUTNEIGHBORADVERTISEMENTS,
16652 ICMP6_MIB_OUTREDIRECTS,
16653 ICMP6_MIB_OUTGROUPMEMBRESPONSES,
16654 ICMP6_MIB_OUTGROUPMEMBREDUCTIONS,
16666 TCP_MIB_RTOALGORITHM,
16670 TCP_MIB_ACTIVEOPENS,
16671 TCP_MIB_PASSIVEOPENS,
16672 TCP_MIB_ATTEMPTFAILS,
16673 TCP_MIB_ESTABRESETS,
16677 TCP_MIB_RETRANSSEGS,
16691 UDP_MIB_INDATAGRAMS,
16694 UDP_MIB_OUTDATAGRAMS,
16695 UDP_MIB_RCVBUFERRORS,
16696 UDP_MIB_SNDBUFERRORS,
16704 LINUX_MIB_SYNCOOKIESSENT,
16705 LINUX_MIB_SYNCOOKIESRECV,
16706 LINUX_MIB_SYNCOOKIESFAILED,
16707 LINUX_MIB_EMBRYONICRSTS,
16708 LINUX_MIB_PRUNECALLED,
16709 LINUX_MIB_RCVPRUNED,
16710 LINUX_MIB_OFOPRUNED,
16711 LINUX_MIB_OUTOFWINDOWICMPS,
16712 LINUX_MIB_LOCKDROPPEDICMPS,
16713 LINUX_MIB_ARPFILTER,
16714 LINUX_MIB_TIMEWAITED,
16715 LINUX_MIB_TIMEWAITRECYCLED,
16716 LINUX_MIB_TIMEWAITKILLED,
16717 LINUX_MIB_PAWSPASSIVEREJECTED,
16718 LINUX_MIB_PAWSACTIVEREJECTED,
16719 LINUX_MIB_PAWSESTABREJECTED,
16720 LINUX_MIB_DELAYEDACKS,
16721 LINUX_MIB_DELAYEDACKLOCKED,
16722 LINUX_MIB_DELAYEDACKLOST,
16723 LINUX_MIB_LISTENOVERFLOWS,
16724 LINUX_MIB_LISTENDROPS,
16725 LINUX_MIB_TCPPREQUEUED,
16726 LINUX_MIB_TCPDIRECTCOPYFROMBACKLOG,
16727 LINUX_MIB_TCPDIRECTCOPYFROMPREQUEUE,
16728 LINUX_MIB_TCPPREQUEUEDROPPED,
16729 LINUX_MIB_TCPHPHITS,
16730 LINUX_MIB_TCPHPHITSTOUSER,
16731 LINUX_MIB_TCPPUREACKS,
16732 LINUX_MIB_TCPHPACKS,
16733 LINUX_MIB_TCPRENORECOVERY,
16734 LINUX_MIB_TCPSACKRECOVERY,
16735 LINUX_MIB_TCPSACKRENEGING,
16736 LINUX_MIB_TCPFACKREORDER,
16737 LINUX_MIB_TCPSACKREORDER,
16738 LINUX_MIB_TCPRENOREORDER,
16739 LINUX_MIB_TCPTSREORDER,
16740 LINUX_MIB_TCPFULLUNDO,
16741 LINUX_MIB_TCPPARTIALUNDO,
16742 LINUX_MIB_TCPDSACKUNDO,
16743 LINUX_MIB_TCPLOSSUNDO,
16745 LINUX_MIB_TCPLOSTRETRANSMIT,
16746 LINUX_MIB_TCPRENOFAILURES,
16747 LINUX_MIB_TCPSACKFAILURES,
16748 LINUX_MIB_TCPLOSSFAILURES,
16749 LINUX_MIB_TCPFASTRETRANS,
16750 LINUX_MIB_TCPFORWARDRETRANS,
16751 LINUX_MIB_TCPSLOWSTARTRETRANS,
16752 LINUX_MIB_TCPTIMEOUTS,
16753 LINUX_MIB_TCPRENORECOVERYFAIL,
16754 LINUX_MIB_TCPSACKRECOVERYFAIL,
16755 LINUX_MIB_TCPSCHEDULERFAILED,
16756 LINUX_MIB_TCPRCVCOLLAPSED,
16757 LINUX_MIB_TCPDSACKOLDSENT,
16758 LINUX_MIB_TCPDSACKOFOSENT,
16759 LINUX_MIB_TCPDSACKRECV,
16760 LINUX_MIB_TCPDSACKOFORECV,
16761 LINUX_MIB_TCPABORTONSYN,
16762 LINUX_MIB_TCPABORTONDATA,
16763 LINUX_MIB_TCPABORTONCLOSE,
16764 LINUX_MIB_TCPABORTONMEMORY,
16765 LINUX_MIB_TCPABORTONTIMEOUT,
16766 LINUX_MIB_TCPABORTONLINGER,
16767 LINUX_MIB_TCPABORTFAILED,
16768 LINUX_MIB_TCPMEMORYPRESSURES,
16771 # 26 "include/net/snmp.h" 2
16772 # 35 "include/net/snmp.h"
16777 # 73 "include/net/snmp.h"
16778 struct ipstats_mib {
16779 unsigned long mibs[__IPSTATS_MIB_MAX];
16787 unsigned long mibs[(__ICMP_MIB_MAX + 1)];
16792 struct icmpv6_mib {
16793 unsigned long mibs[__ICMP6_MIB_MAX];
16799 unsigned long mibs[__TCP_MIB_MAX];
16805 unsigned long mibs[__UDP_MIB_MAX];
16811 unsigned long mibs[__LINUX_MIB_MAX];
16813 # 68 "net/ipv4/ip_output.c" 2
16814 # 1 "include/net/ip.h" 1
16815 # 26 "include/net/ip.h"
16816 # 1 "include/linux/ip.h" 1
16817 # 85 "include/linux/ip.h"
16840 struct ip_auth_hdr {
16849 struct ip_esp_hdr {
16855 struct ip_comp_hdr {
16861 struct ip_beet_phdr {
16867 # 27 "include/net/ip.h" 2
16870 # 1 "include/net/inet_sock.h" 1
16871 # 23 "include/net/inet_sock.h"
16872 # 1 "include/net/flow.h" 1
16873 # 10 "include/net/flow.h"
16874 # 1 "include/linux/in6.h" 1
16875 # 30 "include/linux/in6.h"
16881 __be16 u6_addr16[8];
16882 __be32 u6_addr32[4];
16888 # 51 "include/linux/in6.h"
16889 extern const struct in6_addr in6addr_loopback;
16892 struct sockaddr_in6 {
16893 unsigned short int sin6_family;
16895 __u32 sin6_flowinfo;
16896 struct in6_addr sin6_addr;
16897 __u32 sin6_scope_id;
16902 struct in6_addr ipv6mr_multiaddr;
16905 int ipv6mr_ifindex;
16910 struct in6_flowlabel_req
16912 struct in6_addr flr_dst;
16922 # 11 "include/net/flow.h" 2
16939 struct in6_addr daddr;
16940 struct in6_addr saddr;
16952 # 54 "include/net/flow.h"
16980 # 89 "include/net/flow.h"
16982 } __attribute__((__aligned__(32/8)));
16989 typedef int (*flow_resolve_t)(struct flowi *key, u16 family, u8 dir,
16990 void **objp, atomic_t **obj_refp);
16992 extern void *flow_cache_lookup(struct flowi *key, u16 family, u8 dir,
16993 flow_resolve_t resolver);
16994 extern void flow_cache_flush(void);
16995 extern atomic_t flow_cache_genid;
16996 # 24 "include/net/inet_sock.h" 2
16997 # 1 "include/net/sock.h" 1
16998 # 50 "include/net/sock.h"
16999 # 1 "include/linux/security.h" 1
17000 # 26 "include/linux/security.h"
17001 # 1 "include/linux/binfmts.h" 1
17008 # 23 "include/linux/binfmts.h"
17009 struct linux_binprm{
17011 struct page *page[32];
17012 struct mm_struct *mm;
17015 struct file * file;
17017 kernel_cap_t cap_inheritable, cap_permitted, cap_effective;
17024 unsigned interp_flags;
17025 unsigned interp_data;
17026 unsigned long loader, exec;
17028 # 55 "include/linux/binfmts.h"
17029 struct linux_binfmt {
17030 struct linux_binfmt * next;
17031 struct module *module;
17032 int (*load_binary)(struct linux_binprm *, struct pt_regs * regs);
17033 int (*load_shlib)(struct file *);
17034 int (*core_dump)(long signr, struct pt_regs * regs, struct file * file);
17035 unsigned long min_coredump;
17038 extern int register_binfmt(struct linux_binfmt *);
17039 extern int unregister_binfmt(struct linux_binfmt *);
17041 extern int prepare_binprm(struct linux_binprm *);
17042 extern void remove_arg_zero(struct linux_binprm *);
17043 extern int search_binary_handler(struct linux_binprm *,struct pt_regs *);
17044 extern int flush_old_exec(struct linux_binprm * bprm);
17046 extern int suid_dumpable;
17047 # 82 "include/linux/binfmts.h"
17048 extern int setup_arg_pages(struct linux_binprm * bprm,
17049 unsigned long stack_top,
17050 int executable_stack);
17051 extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm);
17052 extern void compute_creds(struct linux_binprm *binprm);
17053 extern int do_coredump(long signr, int exit_code, struct pt_regs * regs);
17054 extern int set_binfmt(struct linux_binfmt *new);
17055 # 27 "include/linux/security.h" 2
17059 # 1 "include/linux/shm.h" 1
17060 # 19 "include/linux/shm.h"
17061 # 1 "include/asm/shmparam.h" 1
17062 # 20 "include/linux/shm.h" 2
17066 struct ipc_perm shm_perm;
17068 __kernel_time_t shm_atime;
17069 __kernel_time_t shm_dtime;
17070 __kernel_time_t shm_ctime;
17071 __kernel_ipc_pid_t shm_cpid;
17072 __kernel_ipc_pid_t shm_lpid;
17073 unsigned short shm_nattch;
17074 unsigned short shm_unused;
17080 # 1 "include/asm/shmbuf.h" 1
17081 # 14 "include/asm/shmbuf.h"
17082 struct shmid64_ds {
17083 struct ipc64_perm shm_perm;
17085 __kernel_time_t shm_atime;
17086 unsigned long __unused1;
17087 __kernel_time_t shm_dtime;
17088 unsigned long __unused2;
17089 __kernel_time_t shm_ctime;
17090 unsigned long __unused3;
17091 __kernel_pid_t shm_cpid;
17092 __kernel_pid_t shm_lpid;
17093 unsigned long shm_nattch;
17094 unsigned long __unused4;
17095 unsigned long __unused5;
17099 unsigned long shmmax;
17100 unsigned long shmmin;
17101 unsigned long shmmni;
17102 unsigned long shmseg;
17103 unsigned long shmall;
17104 unsigned long __unused1;
17105 unsigned long __unused2;
17106 unsigned long __unused3;
17107 unsigned long __unused4;
17109 # 38 "include/linux/shm.h" 2
17110 # 58 "include/linux/shm.h"
17121 unsigned long shm_tot;
17122 unsigned long shm_rss;
17123 unsigned long shm_swp;
17124 unsigned long swap_attempts;
17125 unsigned long swap_successes;
17129 struct shmid_kernel
17131 struct kern_ipc_perm shm_perm;
17132 struct file * shm_file;
17134 unsigned long shm_nattch;
17135 unsigned long shm_segsz;
17141 struct user_struct *mlock_user;
17143 # 100 "include/linux/shm.h"
17144 static inline __attribute__((always_inline)) long do_shmat(int shmid, char *shmaddr,
17145 int shmflg, unsigned long *addr)
17149 # 31 "include/linux/security.h" 2
17150 # 1 "include/linux/msg.h" 1
17151 # 15 "include/linux/msg.h"
17153 struct ipc_perm msg_perm;
17154 struct msg *msg_first;
17155 struct msg *msg_last;
17156 __kernel_time_t msg_stime;
17157 __kernel_time_t msg_rtime;
17158 __kernel_time_t msg_ctime;
17159 unsigned long msg_lcbytes;
17160 unsigned long msg_lqbytes;
17161 unsigned short msg_cbytes;
17162 unsigned short msg_qnum;
17163 unsigned short msg_qbytes;
17164 __kernel_ipc_pid_t msg_lspid;
17165 __kernel_ipc_pid_t msg_lrpid;
17169 # 1 "include/asm/msgbuf.h" 1
17170 # 14 "include/asm/msgbuf.h"
17171 struct msqid64_ds {
17172 struct ipc64_perm msg_perm;
17173 __kernel_time_t msg_stime;
17174 unsigned long __unused1;
17175 __kernel_time_t msg_rtime;
17176 unsigned long __unused2;
17177 __kernel_time_t msg_ctime;
17178 unsigned long __unused3;
17179 unsigned long msg_cbytes;
17180 unsigned long msg_qnum;
17181 unsigned long msg_qbytes;
17182 __kernel_pid_t msg_lspid;
17183 __kernel_pid_t msg_lrpid;
17184 unsigned long __unused4;
17185 unsigned long __unused5;
17187 # 33 "include/linux/msg.h" 2
17204 unsigned short msgseg;
17206 # 68 "include/linux/msg.h"
17208 struct list_head m_list;
17211 struct msg_msgseg* next;
17218 struct kern_ipc_perm q_perm;
17223 unsigned long q_cbytes;
17224 unsigned long q_qnum;
17225 unsigned long q_qbytes;
17229 struct list_head q_messages;
17230 struct list_head q_receivers;
17231 struct list_head q_senders;
17233 # 32 "include/linux/security.h" 2
17235 # 1 "include/linux/key.h" 1
17236 # 27 "include/linux/key.h"
17237 typedef int32_t key_serial_t;
17240 typedef uint32_t key_perm_t;
17243 # 381 "include/linux/key.h"
17244 extern struct key root_user_keyring;
17245 extern struct key root_session_keyring;
17246 # 34 "include/linux/security.h" 2
17247 # 1 "include/linux/xfrm.h" 1
17248 # 13 "include/linux/xfrm.h"
17261 xfrm_address_t daddr;
17266 struct xfrm_sec_ctx {
17273 # 48 "include/linux/xfrm.h"
17274 struct xfrm_selector
17276 xfrm_address_t daddr;
17277 xfrm_address_t saddr;
17292 struct xfrm_lifetime_cfg
17294 __u64 soft_byte_limit;
17295 __u64 hard_byte_limit;
17296 __u64 soft_packet_limit;
17297 __u64 hard_packet_limit;
17298 __u64 soft_add_expires_seconds;
17299 __u64 hard_add_expires_seconds;
17300 __u64 soft_use_expires_seconds;
17301 __u64 hard_use_expires_seconds;
17304 struct xfrm_lifetime_cur
17312 struct xfrm_replay_state
17325 struct xfrm_stats {
17326 __u32 replay_window;
17328 __u32 integrity_failed;
17333 XFRM_POLICY_TYPE_MAIN = 0,
17334 XFRM_POLICY_TYPE_SUB = 1,
17335 XFRM_POLICY_TYPE_MAX = 2
17340 XFRM_POLICY_IN = 0,
17341 XFRM_POLICY_OUT = 1,
17342 XFRM_POLICY_FWD = 2,
17343 XFRM_POLICY_MAX = 3
17349 XFRM_SHARE_SESSION,
17353 # 136 "include/linux/xfrm.h"
17355 XFRM_MSG_BASE = 0x10,
17357 XFRM_MSG_NEWSA = 0x10,
17364 XFRM_MSG_NEWPOLICY,
17366 XFRM_MSG_DELPOLICY,
17368 XFRM_MSG_GETPOLICY,
17378 XFRM_MSG_UPDPOLICY,
17383 XFRM_MSG_POLEXPIRE,
17388 XFRM_MSG_FLUSHPOLICY,
17401 # 191 "include/linux/xfrm.h"
17402 struct xfrm_user_sec_ctx {
17410 struct xfrm_user_tmpl {
17413 xfrm_address_t saddr;
17423 struct xfrm_encap_tmpl {
17427 xfrm_address_t encap_oa;
17431 enum xfrm_ae_ftype_t {
17445 struct xfrm_userpolicy_type {
17452 enum xfrm_attr_type_t {
17464 XFRMA_REPLAY_THRESH,
17465 XFRMA_ETIMER_THRESH,
17475 struct xfrm_usersa_info {
17476 struct xfrm_selector sel;
17478 xfrm_address_t saddr;
17479 struct xfrm_lifetime_cfg lft;
17480 struct xfrm_lifetime_cur curlft;
17481 struct xfrm_stats stats;
17486 __u8 replay_window;
17494 struct xfrm_usersa_id {
17495 xfrm_address_t daddr;
17501 struct xfrm_aevent_id {
17502 struct xfrm_usersa_id sa_id;
17506 struct xfrm_userspi_info {
17507 struct xfrm_usersa_info info;
17512 struct xfrm_userpolicy_info {
17513 struct xfrm_selector sel;
17514 struct xfrm_lifetime_cfg lft;
17515 struct xfrm_lifetime_cur curlft;
17527 struct xfrm_userpolicy_id {
17528 struct xfrm_selector sel;
17533 struct xfrm_user_acquire {
17535 xfrm_address_t saddr;
17536 struct xfrm_selector sel;
17537 struct xfrm_userpolicy_info policy;
17544 struct xfrm_user_expire {
17545 struct xfrm_usersa_info state;
17549 struct xfrm_user_polexpire {
17550 struct xfrm_userpolicy_info pol;
17554 struct xfrm_usersa_flush {
17558 struct xfrm_user_report {
17560 struct xfrm_selector sel;
17562 # 361 "include/linux/xfrm.h"
17563 enum xfrm_nlgroups {
17580 # 35 "include/linux/security.h" 2
17589 extern int cap_capable (struct task_struct *tsk, int cap);
17590 extern int cap_settime (struct timespec *ts, struct timezone *tz);
17591 extern int cap_ptrace (struct task_struct *parent, struct task_struct *child);
17592 extern int cap_capget (struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted);
17593 extern int cap_capset_check (struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted);
17594 extern void cap_capset_set (struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted);
17595 extern int cap_bprm_set_security (struct linux_binprm *bprm);
17596 extern void cap_bprm_apply_creds (struct linux_binprm *bprm, int unsafe);
17597 extern int cap_bprm_secureexec(struct linux_binprm *bprm);
17598 extern int cap_inode_setxattr(struct dentry *dentry, char *name, void *value, size_t size, int flags);
17599 extern int cap_inode_removexattr(struct dentry *dentry, char *name);
17600 extern int cap_task_post_setuid (uid_t old_ruid, uid_t old_euid, uid_t old_suid, int flags);
17601 extern void cap_task_reparent_to_init (struct task_struct *p);
17602 extern int cap_syslog (int type);
17603 extern int cap_vm_enough_memory (long pages);
17612 struct xfrm_selector;
17613 struct xfrm_policy;
17615 struct xfrm_user_sec_ctx;
17617 extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb);
17618 extern int cap_netlink_recv(struct sk_buff *skb, int cap);
17619 # 90 "include/linux/security.h"
17621 struct sched_param;
17622 struct swap_info_struct;
17623 struct request_sock;
17624 # 2154 "include/linux/security.h"
17625 static inline __attribute__((always_inline)) int security_init(void)
17630 static inline __attribute__((always_inline)) int security_ptrace (struct task_struct *parent, struct task_struct * child)
17632 return cap_ptrace (parent, child);
17635 static inline __attribute__((always_inline)) int security_capget (struct task_struct *target,
17636 kernel_cap_t *effective,
17637 kernel_cap_t *inheritable,
17638 kernel_cap_t *permitted)
17640 return cap_capget (target, effective, inheritable, permitted);
17643 static inline __attribute__((always_inline)) int security_capset_check (struct task_struct *target,
17644 kernel_cap_t *effective,
17645 kernel_cap_t *inheritable,
17646 kernel_cap_t *permitted)
17648 return cap_capset_check (target, effective, inheritable, permitted);
17651 static inline __attribute__((always_inline)) void security_capset_set (struct task_struct *target,
17652 kernel_cap_t *effective,
17653 kernel_cap_t *inheritable,
17654 kernel_cap_t *permitted)
17656 cap_capset_set (target, effective, inheritable, permitted);
17659 static inline __attribute__((always_inline)) int security_capable(struct task_struct *tsk, int cap)
17661 return cap_capable(tsk, cap);
17664 static inline __attribute__((always_inline)) int security_acct (struct file *file)
17669 static inline __attribute__((always_inline)) int security_sysctl(struct ctl_table *table, int op)
17674 static inline __attribute__((always_inline)) int security_quotactl (int cmds, int type, int id,
17675 struct super_block * sb)
17680 static inline __attribute__((always_inline)) int security_quota_on (struct dentry * dentry)
17685 static inline __attribute__((always_inline)) int security_syslog(int type)
17687 return cap_syslog(type);
17690 static inline __attribute__((always_inline)) int security_settime(struct timespec *ts, struct timezone *tz)
17692 return cap_settime(ts, tz);
17695 static inline __attribute__((always_inline)) int security_vm_enough_memory(long pages)
17697 return cap_vm_enough_memory(pages);
17700 static inline __attribute__((always_inline)) int security_bprm_alloc (struct linux_binprm *bprm)
17705 static inline __attribute__((always_inline)) void security_bprm_free (struct linux_binprm *bprm)
17708 static inline __attribute__((always_inline)) void security_bprm_apply_creds (struct linux_binprm *bprm, int unsafe)
17710 cap_bprm_apply_creds (bprm, unsafe);
17713 static inline __attribute__((always_inline)) void security_bprm_post_apply_creds (struct linux_binprm *bprm)
17718 static inline __attribute__((always_inline)) int security_bprm_set (struct linux_binprm *bprm)
17720 return cap_bprm_set_security (bprm);
17723 static inline __attribute__((always_inline)) int security_bprm_check (struct linux_binprm *bprm)
17728 static inline __attribute__((always_inline)) int security_bprm_secureexec (struct linux_binprm *bprm)
17730 return cap_bprm_secureexec(bprm);
17733 static inline __attribute__((always_inline)) int security_sb_alloc (struct super_block *sb)
17738 static inline __attribute__((always_inline)) void security_sb_free (struct super_block *sb)
17741 static inline __attribute__((always_inline)) int security_sb_copy_data (struct file_system_type *type,
17742 void *orig, void *copy)
17747 static inline __attribute__((always_inline)) int security_sb_kern_mount (struct super_block *sb, void *data)
17752 static inline __attribute__((always_inline)) int security_sb_statfs (struct dentry *dentry)
17757 static inline __attribute__((always_inline)) int security_sb_mount (char *dev_name, struct nameidata *nd,
17758 char *type, unsigned long flags,
17764 static inline __attribute__((always_inline)) int security_sb_check_sb (struct vfsmount *mnt,
17765 struct nameidata *nd)
17770 static inline __attribute__((always_inline)) int security_sb_umount (struct vfsmount *mnt, int flags)
17775 static inline __attribute__((always_inline)) void security_sb_umount_close (struct vfsmount *mnt)
17778 static inline __attribute__((always_inline)) void security_sb_umount_busy (struct vfsmount *mnt)
17781 static inline __attribute__((always_inline)) void security_sb_post_remount (struct vfsmount *mnt,
17782 unsigned long flags, void *data)
17785 static inline __attribute__((always_inline)) void security_sb_post_mountroot (void)
17788 static inline __attribute__((always_inline)) void security_sb_post_addmount (struct vfsmount *mnt,
17789 struct nameidata *mountpoint_nd)
17792 static inline __attribute__((always_inline)) int security_sb_pivotroot (struct nameidata *old_nd,
17793 struct nameidata *new_nd)
17798 static inline __attribute__((always_inline)) void security_sb_post_pivotroot (struct nameidata *old_nd,
17799 struct nameidata *new_nd)
17802 static inline __attribute__((always_inline)) int security_inode_alloc (struct inode *inode)
17807 static inline __attribute__((always_inline)) void security_inode_free (struct inode *inode)
17810 static inline __attribute__((always_inline)) int security_inode_init_security (struct inode *inode,
17819 static inline __attribute__((always_inline)) int security_inode_create (struct inode *dir,
17820 struct dentry *dentry,
17826 static inline __attribute__((always_inline)) int security_inode_link (struct dentry *old_dentry,
17828 struct dentry *new_dentry)
17833 static inline __attribute__((always_inline)) int security_inode_unlink (struct inode *dir,
17834 struct dentry *dentry)
17839 static inline __attribute__((always_inline)) int security_inode_symlink (struct inode *dir,
17840 struct dentry *dentry,
17841 const char *old_name)
17846 static inline __attribute__((always_inline)) int security_inode_mkdir (struct inode *dir,
17847 struct dentry *dentry,
17853 static inline __attribute__((always_inline)) int security_inode_rmdir (struct inode *dir,
17854 struct dentry *dentry)
17859 static inline __attribute__((always_inline)) int security_inode_mknod (struct inode *dir,
17860 struct dentry *dentry,
17861 int mode, dev_t dev)
17866 static inline __attribute__((always_inline)) int security_inode_rename (struct inode *old_dir,
17867 struct dentry *old_dentry,
17868 struct inode *new_dir,
17869 struct dentry *new_dentry)
17874 static inline __attribute__((always_inline)) int security_inode_readlink (struct dentry *dentry)
17879 static inline __attribute__((always_inline)) int security_inode_follow_link (struct dentry *dentry,
17880 struct nameidata *nd)
17885 static inline __attribute__((always_inline)) int security_inode_permission (struct inode *inode, int mask,
17886 struct nameidata *nd)
17891 static inline __attribute__((always_inline)) int security_inode_setattr (struct dentry *dentry,
17892 struct iattr *attr)
17897 static inline __attribute__((always_inline)) int security_inode_getattr (struct vfsmount *mnt,
17898 struct dentry *dentry)
17903 static inline __attribute__((always_inline)) void security_inode_delete (struct inode *inode)
17906 static inline __attribute__((always_inline)) int security_inode_setxattr (struct dentry *dentry, char *name,
17907 void *value, size_t size, int flags)
17909 return cap_inode_setxattr(dentry, name, value, size, flags);
17912 static inline __attribute__((always_inline)) void security_inode_post_setxattr (struct dentry *dentry, char *name,
17913 void *value, size_t size, int flags)
17916 static inline __attribute__((always_inline)) int security_inode_getxattr (struct dentry *dentry, char *name)
17921 static inline __attribute__((always_inline)) int security_inode_listxattr (struct dentry *dentry)
17926 static inline __attribute__((always_inline)) int security_inode_removexattr (struct dentry *dentry, char *name)
17928 return cap_inode_removexattr(dentry, name);
17931 static inline __attribute__((always_inline)) const char *security_inode_xattr_getsuffix (void)
17933 return ((void *)0) ;
17936 static inline __attribute__((always_inline)) int security_inode_getsecurity(const struct inode *inode, const char *name, void *buffer, size_t size, int err)
17941 static inline __attribute__((always_inline)) int security_inode_setsecurity(struct inode *inode, const char *name, const void *value, size_t size, int flags)
17946 static inline __attribute__((always_inline)) int security_inode_listsecurity(struct inode *inode, char *buffer, size_t buffer_size)
17951 static inline __attribute__((always_inline)) int security_file_permission (struct file *file, int mask)
17956 static inline __attribute__((always_inline)) int security_file_alloc (struct file *file)
17961 static inline __attribute__((always_inline)) void security_file_free (struct file *file)
17964 static inline __attribute__((always_inline)) int security_file_ioctl (struct file *file, unsigned int cmd,
17970 static inline __attribute__((always_inline)) int security_file_mmap (struct file *file, unsigned long reqprot,
17971 unsigned long prot,
17972 unsigned long flags)
17977 static inline __attribute__((always_inline)) int security_file_mprotect (struct vm_area_struct *vma,
17978 unsigned long reqprot,
17979 unsigned long prot)
17984 static inline __attribute__((always_inline)) int security_file_lock (struct file *file, unsigned int cmd)
17989 static inline __attribute__((always_inline)) int security_file_fcntl (struct file *file, unsigned int cmd,
17995 static inline __attribute__((always_inline)) int security_file_set_fowner (struct file *file)
18000 static inline __attribute__((always_inline)) int security_file_send_sigiotask (struct task_struct *tsk,
18001 struct fown_struct *fown,
18007 static inline __attribute__((always_inline)) int security_file_receive (struct file *file)
18012 static inline __attribute__((always_inline)) int security_task_create (unsigned long clone_flags)
18017 static inline __attribute__((always_inline)) int security_task_alloc (struct task_struct *p)
18022 static inline __attribute__((always_inline)) void security_task_free (struct task_struct *p)
18025 static inline __attribute__((always_inline)) int security_task_setuid (uid_t id0, uid_t id1, uid_t id2,
18031 static inline __attribute__((always_inline)) int security_task_post_setuid (uid_t old_ruid, uid_t old_euid,
18032 uid_t old_suid, int flags)
18034 return cap_task_post_setuid (old_ruid, old_euid, old_suid, flags);
18037 static inline __attribute__((always_inline)) int security_task_setgid (gid_t id0, gid_t id1, gid_t id2,
18043 static inline __attribute__((always_inline)) int security_task_setpgid (struct task_struct *p, pid_t pgid)
18048 static inline __attribute__((always_inline)) int security_task_getpgid (struct task_struct *p)
18053 static inline __attribute__((always_inline)) int security_task_getsid (struct task_struct *p)
18058 static inline __attribute__((always_inline)) void security_task_getsecid (struct task_struct *p, u32 *secid)
18061 static inline __attribute__((always_inline)) int security_task_setgroups (struct group_info *group_info)
18066 static inline __attribute__((always_inline)) int security_task_setnice (struct task_struct *p, int nice)
18071 static inline __attribute__((always_inline)) int security_task_setioprio (struct task_struct *p, int ioprio)
18076 static inline __attribute__((always_inline)) int security_task_getioprio (struct task_struct *p)
18081 static inline __attribute__((always_inline)) int security_task_setrlimit (unsigned int resource,
18082 struct rlimit *new_rlim)
18087 static inline __attribute__((always_inline)) int security_task_setscheduler (struct task_struct *p,
18089 struct sched_param *lp)
18094 static inline __attribute__((always_inline)) int security_task_getscheduler (struct task_struct *p)
18099 static inline __attribute__((always_inline)) int security_task_movememory (struct task_struct *p)
18104 static inline __attribute__((always_inline)) int security_task_kill (struct task_struct *p,
18105 struct siginfo *info, int sig,
18111 static inline __attribute__((always_inline)) int security_task_wait (struct task_struct *p)
18116 static inline __attribute__((always_inline)) int security_task_prctl (int option, unsigned long arg2,
18117 unsigned long arg3,
18118 unsigned long arg4,
18119 unsigned long arg5)
18124 static inline __attribute__((always_inline)) void security_task_reparent_to_init (struct task_struct *p)
18126 cap_task_reparent_to_init (p);
18129 static inline __attribute__((always_inline)) void security_task_to_inode(struct task_struct *p, struct inode *inode)
18132 static inline __attribute__((always_inline)) int security_ipc_permission (struct kern_ipc_perm *ipcp,
18138 static inline __attribute__((always_inline)) int security_msg_msg_alloc (struct msg_msg * msg)
18143 static inline __attribute__((always_inline)) void security_msg_msg_free (struct msg_msg * msg)
18146 static inline __attribute__((always_inline)) int security_msg_queue_alloc (struct msg_queue *msq)
18151 static inline __attribute__((always_inline)) void security_msg_queue_free (struct msg_queue *msq)
18154 static inline __attribute__((always_inline)) int security_msg_queue_associate (struct msg_queue * msq,
18160 static inline __attribute__((always_inline)) int security_msg_queue_msgctl (struct msg_queue * msq, int cmd)
18165 static inline __attribute__((always_inline)) int security_msg_queue_msgsnd (struct msg_queue * msq,
18166 struct msg_msg * msg, int msqflg)
18171 static inline __attribute__((always_inline)) int security_msg_queue_msgrcv (struct msg_queue * msq,
18172 struct msg_msg * msg,
18173 struct task_struct * target,
18174 long type, int mode)
18179 static inline __attribute__((always_inline)) int security_shm_alloc (struct shmid_kernel *shp)
18184 static inline __attribute__((always_inline)) void security_shm_free (struct shmid_kernel *shp)
18187 static inline __attribute__((always_inline)) int security_shm_associate (struct shmid_kernel * shp,
18193 static inline __attribute__((always_inline)) int security_shm_shmctl (struct shmid_kernel * shp, int cmd)
18198 static inline __attribute__((always_inline)) int security_shm_shmat (struct shmid_kernel * shp,
18199 char *shmaddr, int shmflg)
18204 static inline __attribute__((always_inline)) int security_sem_alloc (struct sem_array *sma)
18209 static inline __attribute__((always_inline)) void security_sem_free (struct sem_array *sma)
18212 static inline __attribute__((always_inline)) int security_sem_associate (struct sem_array * sma, int semflg)
18217 static inline __attribute__((always_inline)) int security_sem_semctl (struct sem_array * sma, int cmd)
18222 static inline __attribute__((always_inline)) int security_sem_semop (struct sem_array * sma,
18223 struct sembuf * sops, unsigned nsops,
18229 static inline __attribute__((always_inline)) void security_d_instantiate (struct dentry *dentry, struct inode *inode)
18232 static inline __attribute__((always_inline)) int security_getprocattr(struct task_struct *p, char *name, void *value, size_t size)
18237 static inline __attribute__((always_inline)) int security_setprocattr(struct task_struct *p, char *name, void *value, size_t size)
18242 static inline __attribute__((always_inline)) int security_netlink_send (struct sock *sk, struct sk_buff *skb)
18244 return cap_netlink_send (sk, skb);
18247 static inline __attribute__((always_inline)) int security_netlink_recv (struct sk_buff *skb, int cap)
18249 return cap_netlink_recv (skb, cap);
18252 static inline __attribute__((always_inline)) struct dentry *securityfs_create_dir(const char *name,
18253 struct dentry *parent)
18255 return ERR_PTR(-19);
18258 static inline __attribute__((always_inline)) struct dentry *securityfs_create_file(const char *name,
18260 struct dentry *parent,
18262 struct file_operations *fops)
18264 return ERR_PTR(-19);
18267 static inline __attribute__((always_inline)) void securityfs_remove(struct dentry *dentry)
18271 static inline __attribute__((always_inline)) int security_secid_to_secctx(u32 secid, char **secdata, u32 *seclen)
18276 static inline __attribute__((always_inline)) void security_release_secctx(char *secdata, u32 seclen)
18279 # 2970 "include/linux/security.h"
18280 static inline __attribute__((always_inline)) int security_unix_stream_connect(struct socket * sock,
18281 struct socket * other,
18282 struct sock * newsk)
18287 static inline __attribute__((always_inline)) int security_unix_may_send(struct socket * sock,
18288 struct socket * other)
18293 static inline __attribute__((always_inline)) int security_socket_create (int family, int type,
18294 int protocol, int kern)
18299 static inline __attribute__((always_inline)) int security_socket_post_create(struct socket * sock,
18302 int protocol, int kern)
18307 static inline __attribute__((always_inline)) int security_socket_bind(struct socket * sock,
18308 struct sockaddr * address,
18314 static inline __attribute__((always_inline)) int security_socket_connect(struct socket * sock,
18315 struct sockaddr * address,
18321 static inline __attribute__((always_inline)) int security_socket_listen(struct socket * sock, int backlog)
18326 static inline __attribute__((always_inline)) int security_socket_accept(struct socket * sock,
18327 struct socket * newsock)
18332 static inline __attribute__((always_inline)) void security_socket_post_accept(struct socket * sock,
18333 struct socket * newsock)
18337 static inline __attribute__((always_inline)) int security_socket_sendmsg(struct socket * sock,
18338 struct msghdr * msg, int size)
18343 static inline __attribute__((always_inline)) int security_socket_recvmsg(struct socket * sock,
18344 struct msghdr * msg, int size,
18350 static inline __attribute__((always_inline)) int security_socket_getsockname(struct socket * sock)
18355 static inline __attribute__((always_inline)) int security_socket_getpeername(struct socket * sock)
18360 static inline __attribute__((always_inline)) int security_socket_getsockopt(struct socket * sock,
18361 int level, int optname)
18366 static inline __attribute__((always_inline)) int security_socket_setsockopt(struct socket * sock,
18367 int level, int optname)
18372 static inline __attribute__((always_inline)) int security_socket_shutdown(struct socket * sock, int how)
18376 static inline __attribute__((always_inline)) int security_sock_rcv_skb (struct sock * sk,
18377 struct sk_buff * skb)
18382 static inline __attribute__((always_inline)) int security_socket_getpeersec_stream(struct socket *sock, char *optval,
18383 int *optlen, unsigned len)
18388 static inline __attribute__((always_inline)) int security_socket_getpeersec_dgram(struct socket *sock, struct sk_buff *skb, u32 *secid)
18393 static inline __attribute__((always_inline)) int security_sk_alloc(struct sock *sk, int family, gfp_t priority)
18398 static inline __attribute__((always_inline)) void security_sk_free(struct sock *sk)
18402 static inline __attribute__((always_inline)) void security_sk_clone(const struct sock *sk, struct sock *newsk)
18406 static inline __attribute__((always_inline)) void security_sk_classify_flow(struct sock *sk, struct flowi *fl)
18410 static inline __attribute__((always_inline)) void security_req_classify_flow(const struct request_sock *req, struct flowi *fl)
18414 static inline __attribute__((always_inline)) void security_sock_graft(struct sock* sk, struct socket *parent)
18418 static inline __attribute__((always_inline)) int security_inet_conn_request(struct sock *sk,
18419 struct sk_buff *skb, struct request_sock *req)
18424 static inline __attribute__((always_inline)) void security_inet_csk_clone(struct sock *newsk,
18425 const struct request_sock *req)
18428 # 3194 "include/linux/security.h"
18429 static inline __attribute__((always_inline)) int security_xfrm_policy_alloc(struct xfrm_policy *xp, struct xfrm_user_sec_ctx *sec_ctx)
18434 static inline __attribute__((always_inline)) int security_xfrm_policy_clone(struct xfrm_policy *old, struct xfrm_policy *new)
18439 static inline __attribute__((always_inline)) void security_xfrm_policy_free(struct xfrm_policy *xp)
18443 static inline __attribute__((always_inline)) int security_xfrm_policy_delete(struct xfrm_policy *xp)
18448 static inline __attribute__((always_inline)) int security_xfrm_state_alloc(struct xfrm_state *x,
18449 struct xfrm_user_sec_ctx *sec_ctx)
18454 static inline __attribute__((always_inline)) int security_xfrm_state_alloc_acquire(struct xfrm_state *x,
18455 struct xfrm_sec_ctx *polsec, u32 secid)
18460 static inline __attribute__((always_inline)) void security_xfrm_state_free(struct xfrm_state *x)
18464 static inline __attribute__((always_inline)) int security_xfrm_state_delete(struct xfrm_state *x)
18469 static inline __attribute__((always_inline)) int security_xfrm_policy_lookup(struct xfrm_policy *xp, u32 fl_secid, u8 dir)
18474 static inline __attribute__((always_inline)) int security_xfrm_state_pol_flow_match(struct xfrm_state *x,
18475 struct xfrm_policy *xp, struct flowi *fl)
18480 static inline __attribute__((always_inline)) int security_xfrm_flow_state_match(struct flowi *fl,
18481 struct xfrm_state *xfrm, struct xfrm_policy *xp)
18486 static inline __attribute__((always_inline)) int security_xfrm_decode_session(struct sk_buff *skb, u32 *secid)
18491 static inline __attribute__((always_inline)) void security_skb_classify_flow(struct sk_buff *skb, struct flowi *fl)
18494 # 51 "include/net/sock.h" 2
18496 # 1 "include/linux/filter.h" 1
18497 # 26 "include/linux/filter.h"
18508 unsigned short len;
18509 struct sock_filter *filter;
18517 struct rcu_head rcu;
18518 struct sock_filter insns[0];
18521 static inline __attribute__((always_inline)) unsigned int sk_filter_len(struct sk_filter *fp)
18523 return fp->len*sizeof(struct sock_filter) + sizeof(*fp);
18525 # 144 "include/linux/filter.h"
18529 extern unsigned int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen);
18530 extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk);
18531 extern int sk_chk_filter(struct sock_filter *filter, int flen);
18532 # 53 "include/net/sock.h" 2
18535 # 1 "include/net/dst.h" 1
18536 # 12 "include/net/dst.h"
18537 # 1 "include/linux/rtnetlink.h" 1
18541 # 1 "include/linux/netlink.h" 1
18542 # 29 "include/linux/netlink.h"
18545 sa_family_t nl_family;
18546 unsigned short nl_pad;
18559 # 94 "include/linux/netlink.h"
18563 struct nlmsghdr msg;
18578 NETLINK_UNCONNECTED = 0,
18581 # 125 "include/linux/netlink.h"
18587 # 140 "include/linux/netlink.h"
18588 struct netlink_skb_parms
18590 struct ucred creds;
18594 kernel_cap_t eff_cap;
18603 extern struct sock *netlink_kernel_create(int unit, unsigned int groups, void (*input)(struct sock *sk, int len), struct module *module);
18604 extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err);
18605 extern int netlink_has_listeners(struct sock *sk, unsigned int group);
18606 extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock);
18607 extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid,
18608 __u32 group, gfp_t allocation);
18609 extern void netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code);
18610 extern int netlink_register_notifier(struct notifier_block *nb);
18611 extern int netlink_unregister_notifier(struct notifier_block *nb);
18614 struct sock *netlink_getsockbyfilp(struct file *filp);
18615 int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock,
18616 long timeo, struct sock *ssk);
18617 void netlink_detachskb(struct sock *sk, struct sk_buff *skb);
18618 int netlink_sendskb(struct sock *sk, struct sk_buff *skb, int protocol);
18619 # 179 "include/linux/netlink.h"
18620 struct netlink_callback
18622 struct sk_buff *skb;
18623 struct nlmsghdr *nlh;
18624 int (*dump)(struct sk_buff * skb, struct netlink_callback *cb);
18625 int (*done)(struct netlink_callback *cb);
18630 struct netlink_notify
18636 static __inline__ __attribute__((always_inline)) struct nlmsghdr *
18637 __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags)
18639 struct nlmsghdr *nlh;
18640 int size = ((len)+( ((((int) ( ((sizeof(struct nlmsghdr))+4 -1) & ~(4 -1) )))+4 -1) & ~(4 -1) ));
18642 nlh = (struct nlmsghdr*)skb_put(skb, ( ((size)+4 -1) & ~(4 -1) ));
18643 nlh->nlmsg_type = type;
18644 nlh->nlmsg_len = size;
18645 nlh->nlmsg_flags = flags;
18646 nlh->nlmsg_pid = pid;
18647 nlh->nlmsg_seq = seq;
18648 memset(((void*)(((char*)nlh) + ((0)+( ((((int) ( ((sizeof(struct nlmsghdr))+4 -1) & ~(4 -1) )))+4 -1) & ~(4 -1) )))) + len, 0, ( ((size)+4 -1) & ~(4 -1) ) - size);
18651 # 231 "include/linux/netlink.h"
18652 extern int netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
18653 struct nlmsghdr *nlh,
18654 int (*dump)(struct sk_buff *skb, struct netlink_callback*),
18655 int (*done)(struct netlink_callback*));
18660 extern void netlink_set_nonroot(int protocol, unsigned flag);
18661 # 5 "include/linux/rtnetlink.h" 2
18662 # 1 "include/linux/if_link.h" 1
18669 struct rtnl_link_stats
18683 __u32 rx_length_errors;
18684 __u32 rx_over_errors;
18685 __u32 rx_crc_errors;
18686 __u32 rx_frame_errors;
18687 __u32 rx_fifo_errors;
18688 __u32 rx_missed_errors;
18691 __u32 tx_aborted_errors;
18692 __u32 tx_carrier_errors;
18693 __u32 tx_fifo_errors;
18694 __u32 tx_heartbeat_errors;
18695 __u32 tx_window_errors;
18698 __u32 rx_compressed;
18699 __u32 tx_compressed;
18703 struct rtnl_link_ifmap
18743 # 121 "include/linux/if_link.h"
18751 IFLA_INET6_CACHEINFO,
18757 struct ifla_cacheinfo
18759 __u32 max_reasm_len;
18761 __u32 reachable_time;
18762 __u32 retrans_time;
18764 # 6 "include/linux/rtnetlink.h" 2
18765 # 1 "include/linux/if_addr.h" 1
18774 __u8 ifa_prefixlen;
18779 # 22 "include/linux/if_addr.h"
18792 # 47 "include/linux/if_addr.h"
18793 struct ifa_cacheinfo
18795 __u32 ifa_prefered;
18800 # 7 "include/linux/rtnetlink.h" 2
18801 # 1 "include/linux/neighbour.h" 1
18827 # 57 "include/linux/neighbour.h"
18828 struct nda_cacheinfo
18830 __u32 ndm_confirmed;
18835 # 90 "include/linux/neighbour.h"
18839 __u64 ndts_destroys;
18840 __u64 ndts_hash_grows;
18841 __u64 ndts_res_failed;
18842 __u64 ndts_lookups;
18844 __u64 ndts_rcv_probes_mcast;
18845 __u64 ndts_rcv_probes_ucast;
18846 __u64 ndts_periodic_gc_runs;
18847 __u64 ndts_forced_gc_runs;
18854 NDTPA_REACHABLE_TIME,
18855 NDTPA_BASE_REACHABLE_TIME,
18856 NDTPA_RETRANS_TIME,
18857 NDTPA_GC_STALETIME,
18858 NDTPA_DELAY_PROBE_TIME,
18861 NDTPA_UCAST_PROBES,
18862 NDTPA_MCAST_PROBES,
18863 NDTPA_ANYCAST_DELAY,
18880 __u16 ndtc_key_len;
18881 __u16 ndtc_entry_size;
18882 __u32 ndtc_entries;
18883 __u32 ndtc_last_flush;
18884 __u32 ndtc_last_rand;
18885 __u32 ndtc_hash_rnd;
18886 __u32 ndtc_hash_mask;
18887 __u32 ndtc_hash_chain_gc;
18888 __u32 ndtc_proxy_qlen;
18903 # 8 "include/linux/rtnetlink.h" 2
18959 RTM_NEWTCLASS = 40,
18966 RTM_NEWTFILTER = 44,
18973 RTM_NEWACTION = 48,
18980 RTM_NEWPREFIX = 52,
18982 RTM_GETPREFIX = 54,
18985 RTM_GETMULTICAST = 58,
18988 RTM_GETANYCAST = 62,
18991 RTM_NEWNEIGHTBL = 64,
18993 RTM_GETNEIGHTBL = 66,
19001 # 116 "include/linux/rtnetlink.h"
19004 unsigned short rta_len;
19005 unsigned short rta_type;
19007 # 143 "include/linux/rtnetlink.h"
19010 unsigned char rtm_family;
19011 unsigned char rtm_dst_len;
19012 unsigned char rtm_src_len;
19013 unsigned char rtm_tos;
19015 unsigned char rtm_table;
19016 unsigned char rtm_protocol;
19017 unsigned char rtm_scope;
19018 unsigned char rtm_type;
19020 unsigned rtm_flags;
19043 # 218 "include/linux/rtnetlink.h"
19046 RT_SCOPE_UNIVERSE=0,
19051 RT_SCOPE_NOWHERE=255
19053 # 237 "include/linux/rtnetlink.h"
19058 RT_TABLE_DEFAULT=253,
19060 RT_TABLE_LOCAL=255,
19061 RT_TABLE_MAX=0xFFFFFFFF
19087 # 285 "include/linux/rtnetlink.h"
19090 unsigned short rtnh_len;
19091 unsigned char rtnh_flags;
19092 unsigned char rtnh_hops;
19095 # 312 "include/linux/rtnetlink.h"
19096 struct rta_cacheinfo
19142 # 366 "include/linux/rtnetlink.h"
19171 unsigned char rtgen_family;
19173 # 406 "include/linux/rtnetlink.h"
19176 unsigned char ifi_family;
19177 unsigned char __ifi_pad;
19178 unsigned short ifi_type;
19180 unsigned ifi_flags;
19181 unsigned ifi_change;
19190 unsigned char prefix_family;
19191 unsigned char prefix_pad1;
19192 unsigned short prefix_pad2;
19193 int prefix_ifindex;
19194 unsigned char prefix_type;
19195 unsigned char prefix_len;
19196 unsigned char prefix_flags;
19197 unsigned char prefix_pad3;
19210 struct prefix_cacheinfo
19212 __u32 preferred_time;
19223 unsigned char tcm_family;
19224 unsigned char tcm__pad1;
19225 unsigned short tcm__pad2;
19244 # 506 "include/linux/rtnetlink.h"
19245 enum rtnetlink_groups {
19256 RTNLGRP_IPV4_IFADDR,
19258 RTNLGRP_IPV4_MROUTE,
19260 RTNLGRP_IPV4_ROUTE,
19264 RTNLGRP_IPV6_IFADDR,
19266 RTNLGRP_IPV6_MROUTE,
19268 RTNLGRP_IPV6_ROUTE,
19270 RTNLGRP_IPV6_IFINFO,
19272 RTNLGRP_DECnet_IFADDR,
19275 RTNLGRP_DECnet_ROUTE,
19277 RTNLGRP_DECnet_RULE,
19280 RTNLGRP_IPV6_PREFIX,
19291 unsigned char tca_family;
19292 unsigned char tca__pad1;
19293 unsigned short tca__pad2;
19295 # 567 "include/linux/rtnetlink.h"
19296 extern size_t rtattr_strlcpy(char *dest, const struct rtattr *rta, size_t size);
19297 static __inline__ __attribute__((always_inline)) int rtattr_strcmp(const struct rtattr *rta, const char *str)
19299 int len = strlen(str) + 1;
19300 return len > rta->rta_len || memcmp(((void*)(((char*)(rta)) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0)))), str, len);
19303 extern int rtattr_parse(struct rtattr *tb[], int maxattr, struct rtattr *rta, int len);
19308 struct rtnetlink_link
19310 int (*doit)(struct sk_buff *, struct nlmsghdr*, void *attr);
19311 int (*dumpit)(struct sk_buff *, struct netlink_callback *cb);
19314 extern struct rtnetlink_link * rtnetlink_links[32];
19315 extern int rtnetlink_send(struct sk_buff *skb, u32 pid, u32 group, int echo);
19316 extern int rtnl_unicast(struct sk_buff *skb, u32 pid);
19317 extern int rtnl_notify(struct sk_buff *skb, u32 pid, u32 group,
19318 struct nlmsghdr *nlh, gfp_t flags);
19319 extern void rtnl_set_sk_err(u32 group, int error);
19320 extern int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics);
19322 extern void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const void *data);
19323 # 679 "include/linux/rtnetlink.h"
19324 static inline __attribute__((always_inline)) struct rtattr *
19325 __rta_reserve(struct sk_buff *skb, int attrtype, int attrlen)
19327 struct rtattr *rta;
19328 int size = (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (attrlen));
19330 rta = (struct rtattr*)skb_put(skb, ( ((size)+4 -1) & ~(4 -1) ));
19331 rta->rta_type = attrtype;
19332 rta->rta_len = size;
19333 memset(((void*)(((char*)(rta)) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0)))) + attrlen, 0, ( ((size)+4 -1) & ~(4 -1) ) - size);
19342 extern void rtmsg_ifinfo(int type, struct net_device *dev, unsigned change);
19345 extern void rtnl_lock(void);
19346 extern void rtnl_unlock(void);
19347 extern int rtnl_trylock(void);
19349 extern void rtnetlink_init(void);
19350 extern void __rtnl_unlock(void);
19351 # 723 "include/linux/rtnetlink.h"
19352 static inline __attribute__((always_inline)) u32 rtm_get_table(struct rtattr **rta, u8 table)
19354 return ({ if (!rta[RTA_TABLE-1] || ((int)((rta[RTA_TABLE-1])->rta_len) - (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0))) < sizeof(u32)) goto rtattr_failure; *(u32 *) ((void*)(((char*)(rta[RTA_TABLE-1])) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0)))); });
19358 # 13 "include/net/dst.h" 2
19361 # 1 "include/net/neighbour.h" 1
19362 # 23 "include/net/neighbour.h"
19363 # 1 "include/linux/seq_file.h" 1
19364 # 9 "include/linux/seq_file.h"
19365 struct seq_operations;
19379 struct seq_operations *op;
19383 struct seq_operations {
19384 void * (*start) (struct seq_file *m, loff_t *pos);
19385 void (*stop) (struct seq_file *m, void *v);
19386 void * (*next) (struct seq_file *m, void *v, loff_t *pos);
19387 int (*show) (struct seq_file *m, void *v);
19390 int seq_open(struct file *, struct seq_operations *);
19391 ssize_t seq_read(struct file *, char *, size_t, loff_t *);
19392 loff_t seq_lseek(struct file *, loff_t, int);
19393 int seq_release(struct inode *, struct file *);
19394 int seq_escape(struct seq_file *, const char *, const char *);
19395 int seq_putc(struct seq_file *m, char c);
19396 int seq_puts(struct seq_file *m, const char *s);
19398 int seq_printf(struct seq_file *, const char *, ...)
19399 __attribute__ ((format (printf,2,3)));
19401 int seq_path(struct seq_file *, struct vfsmount *, struct dentry *, char *);
19403 int single_open(struct file *, int (*)(struct seq_file *, void *), void *);
19404 int single_release(struct inode *, struct file *);
19405 int seq_release_private(struct inode *, struct file *);
19406 # 24 "include/net/neighbour.h" 2
19407 # 32 "include/net/neighbour.h"
19412 struct net_device *dev;
19413 struct neigh_parms *next;
19414 int (*neigh_setup)(struct neighbour *);
19415 void (*neigh_destructor)(struct neighbour *);
19416 struct neigh_table *tbl;
19418 void *sysctl_table;
19422 struct rcu_head rcu_head;
19424 int base_reachable_time;
19427 int reachable_time;
19428 int delay_probe_time;
19440 struct neigh_statistics
19442 unsigned long allocs;
19443 unsigned long destroys;
19444 unsigned long hash_grows;
19446 unsigned long res_failed;
19448 unsigned long lookups;
19449 unsigned long hits;
19451 unsigned long rcv_probes_mcast;
19452 unsigned long rcv_probes_ucast;
19454 unsigned long periodic_gc_runs;
19455 unsigned long forced_gc_runs;
19457 # 89 "include/net/neighbour.h"
19460 struct neighbour *next;
19461 struct neigh_table *tbl;
19462 struct neigh_parms *parms;
19463 struct net_device *dev;
19464 unsigned long used;
19465 unsigned long confirmed;
19466 unsigned long updated;
19473 unsigned char ha[(((32)+((typeof(32))(sizeof(unsigned long))-1))&~((typeof(32))(sizeof(unsigned long))-1))];
19474 struct hh_cache *hh;
19476 int (*output)(struct sk_buff *skb);
19477 struct sk_buff_head arp_queue;
19478 struct timer_list timer;
19479 struct neigh_ops *ops;
19486 void (*solicit)(struct neighbour *, struct sk_buff*);
19487 void (*error_report)(struct neighbour *, struct sk_buff*);
19488 int (*output)(struct sk_buff*);
19489 int (*connected_output)(struct sk_buff*);
19490 int (*hh_output)(struct sk_buff*);
19491 int (*queue_xmit)(struct sk_buff*);
19494 struct pneigh_entry
19496 struct pneigh_entry *next;
19497 struct net_device *dev;
19509 struct neigh_table *next;
19513 __u32 (*hash)(const void *pkey, const struct net_device *);
19514 int (*constructor)(struct neighbour *);
19515 int (*pconstructor)(struct pneigh_entry *);
19516 void (*pdestructor)(struct pneigh_entry *);
19517 void (*proxy_redo)(struct sk_buff *skb);
19519 struct neigh_parms parms;
19525 unsigned long last_flush;
19526 struct timer_list gc_timer;
19527 struct timer_list proxy_timer;
19528 struct sk_buff_head proxy_queue;
19531 unsigned long last_rand;
19532 kmem_cache_t *kmem_cachep;
19533 struct neigh_statistics *stats;
19534 struct neighbour **hash_buckets;
19535 unsigned int hash_mask;
19537 unsigned int hash_chain_gc;
19538 struct pneigh_entry **phash_buckets;
19540 struct proc_dir_entry *pde;
19543 # 182 "include/net/neighbour.h"
19544 extern void neigh_table_init(struct neigh_table *tbl);
19545 extern void neigh_table_init_no_netlink(struct neigh_table *tbl);
19546 extern int neigh_table_clear(struct neigh_table *tbl);
19547 extern struct neighbour * neigh_lookup(struct neigh_table *tbl,
19549 struct net_device *dev);
19550 extern struct neighbour * neigh_lookup_nodev(struct neigh_table *tbl,
19552 extern struct neighbour * neigh_create(struct neigh_table *tbl,
19554 struct net_device *dev);
19555 extern void neigh_destroy(struct neighbour *neigh);
19556 extern int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb);
19557 extern int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new,
19559 extern void neigh_changeaddr(struct neigh_table *tbl, struct net_device *dev);
19560 extern int neigh_ifdown(struct neigh_table *tbl, struct net_device *dev);
19561 extern int neigh_resolve_output(struct sk_buff *skb);
19562 extern int neigh_connected_output(struct sk_buff *skb);
19563 extern int neigh_compat_output(struct sk_buff *skb);
19564 extern struct neighbour *neigh_event_ns(struct neigh_table *tbl,
19565 u8 *lladdr, void *saddr,
19566 struct net_device *dev);
19568 extern struct neigh_parms *neigh_parms_alloc(struct net_device *dev, struct neigh_table *tbl);
19569 extern void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms);
19570 extern void neigh_parms_destroy(struct neigh_parms *parms);
19571 extern unsigned long neigh_rand_reach_time(unsigned long base);
19573 extern void pneigh_enqueue(struct neigh_table *tbl, struct neigh_parms *p,
19574 struct sk_buff *skb);
19575 extern struct pneigh_entry *pneigh_lookup(struct neigh_table *tbl, const void *key, struct net_device *dev, int creat);
19576 extern int pneigh_delete(struct neigh_table *tbl, const void *key, struct net_device *dev);
19578 struct netlink_callback;
19580 extern int neigh_dump_info(struct sk_buff *skb, struct netlink_callback *cb);
19581 extern int neigh_add(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg);
19582 extern int neigh_delete(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg);
19583 extern void neigh_app_ns(struct neighbour *n);
19585 extern int neightbl_dump_info(struct sk_buff *skb, struct netlink_callback *cb);
19586 extern int neightbl_set(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg);
19588 extern void neigh_for_each(struct neigh_table *tbl, void (*cb)(struct neighbour *, void *), void *cookie);
19589 extern void __neigh_for_each_release(struct neigh_table *tbl, int (*cb)(struct neighbour *));
19590 extern void pneigh_for_each(struct neigh_table *tbl, void (*cb)(struct pneigh_entry *));
19592 struct neigh_seq_state {
19593 struct neigh_table *tbl;
19594 void *(*neigh_sub_iter)(struct neigh_seq_state *state,
19595 struct neighbour *n, loff_t *pos);
19596 unsigned int bucket;
19597 unsigned int flags;
19602 extern void *neigh_seq_start(struct seq_file *, loff_t *, struct neigh_table *, unsigned int);
19603 extern void *neigh_seq_next(struct seq_file *, void *, loff_t *);
19604 extern void neigh_seq_stop(struct seq_file *, void *);
19606 extern int neigh_sysctl_register(struct net_device *dev,
19607 struct neigh_parms *p,
19608 int p_id, int pdev_id,
19610 proc_handler *proc_handler,
19611 ctl_handler *strategy);
19612 extern void neigh_sysctl_unregister(struct neigh_parms *p);
19614 static inline __attribute__((always_inline)) void __neigh_parms_put(struct neigh_parms *parms)
19616 atomic_dec(&parms->refcnt);
19619 static inline __attribute__((always_inline)) void neigh_parms_put(struct neigh_parms *parms)
19621 if ((atomic_sub_return(1, (&parms->refcnt)) == 0))
19622 neigh_parms_destroy(parms);
19625 static inline __attribute__((always_inline)) struct neigh_parms *neigh_parms_clone(struct neigh_parms *parms)
19627 atomic_inc(&parms->refcnt);
19635 static inline __attribute__((always_inline)) void neigh_release(struct neighbour *neigh)
19637 if ((atomic_sub_return(1, (&neigh->refcnt)) == 0))
19638 neigh_destroy(neigh);
19641 static inline __attribute__((always_inline)) struct neighbour * neigh_clone(struct neighbour *neigh)
19644 atomic_inc(&neigh->refcnt);
19650 static inline __attribute__((always_inline)) void neigh_confirm(struct neighbour *neigh)
19653 neigh->confirmed = jiffies;
19656 static inline __attribute__((always_inline)) int neigh_is_connected(struct neighbour *neigh)
19658 return neigh->nud_state&(0x80|0x40|0x02);
19661 static inline __attribute__((always_inline)) int neigh_is_valid(struct neighbour *neigh)
19663 return neigh->nud_state&(0x80|0x40|0x02|0x10|0x04|0x08);
19666 static inline __attribute__((always_inline)) int neigh_event_send(struct neighbour *neigh, struct sk_buff *skb)
19668 neigh->used = jiffies;
19669 if (!(neigh->nud_state&((0x80|0x40|0x02)|0x08|0x10)))
19670 return __neigh_event_send(neigh, skb);
19674 static inline __attribute__((always_inline)) struct neighbour *
19675 __neigh_lookup(struct neigh_table *tbl, const void *pkey, struct net_device *dev, int creat)
19677 struct neighbour *n = neigh_lookup(tbl, pkey, dev);
19682 n = neigh_create(tbl, pkey, dev);
19683 return IS_ERR(n) ? ((void *)0) : n;
19686 static inline __attribute__((always_inline)) struct neighbour *
19687 __neigh_lookup_errno(struct neigh_table *tbl, const void *pkey,
19688 struct net_device *dev)
19690 struct neighbour *n = neigh_lookup(tbl, pkey, dev);
19695 return neigh_create(tbl, pkey, dev);
19698 struct neighbour_cb {
19699 unsigned long sched_next;
19700 unsigned int flags;
19702 # 16 "include/net/dst.h" 2
19703 # 36 "include/net/dst.h"
19708 struct dst_entry *next;
19711 struct dst_entry *child;
19712 struct net_device *dev;
19721 unsigned long lastuse;
19722 unsigned long expires;
19724 unsigned short header_len;
19725 unsigned short nfheader_len;
19726 unsigned short trailer_len;
19728 u32 metrics[(__RTAX_MAX - 1)];
19729 struct dst_entry *path;
19731 unsigned long rate_last;
19732 unsigned long rate_tokens;
19734 struct neighbour *neighbour;
19735 struct hh_cache *hh;
19736 struct xfrm_state *xfrm;
19738 int (*input)(struct sk_buff*);
19739 int (*output)(struct sk_buff*);
19745 struct dst_ops *ops;
19746 struct rcu_head rcu_head;
19754 unsigned short family;
19756 unsigned gc_thresh;
19759 struct dst_entry * (*check)(struct dst_entry *, __u32 cookie);
19760 void (*destroy)(struct dst_entry *);
19761 void (*ifdown)(struct dst_entry *,
19762 struct net_device *dev, int how);
19763 struct dst_entry * (*negative_advice)(struct dst_entry *);
19764 void (*link_failure)(struct sk_buff *);
19765 void (*update_pmtu)(struct dst_entry *dst, u32 mtu);
19769 kmem_cache_t *kmem_cachep;
19774 static inline __attribute__((always_inline)) u32
19775 dst_metric(const struct dst_entry *dst, int metric)
19777 return dst->metrics[metric-1];
19780 static inline __attribute__((always_inline)) u32 dst_mtu(const struct dst_entry *dst)
19782 u32 mtu = dst_metric(dst, RTAX_MTU);
19786 __asm__ __volatile__("": : :"memory");
19790 static inline __attribute__((always_inline)) u32
19791 dst_allfrag(const struct dst_entry *dst)
19793 int ret = dst_metric(dst, RTAX_FEATURES) & 0x00000008;
19795 __asm__ __volatile__("": : :"memory");
19799 static inline __attribute__((always_inline)) int
19800 dst_metric_locked(struct dst_entry *dst, int metric)
19802 return dst_metric(dst, RTAX_LOCK) & (1<<metric);
19805 static inline __attribute__((always_inline)) void dst_hold(struct dst_entry * dst)
19807 atomic_inc(&dst->__refcnt);
19810 static inline __attribute__((always_inline))
19811 struct dst_entry * dst_clone(struct dst_entry * dst)
19814 atomic_inc(&dst->__refcnt);
19818 static inline __attribute__((always_inline))
19819 void dst_release(struct dst_entry * dst)
19822 ({ typeof(((&dst->__refcnt)->counter) < 1) __ret_warn_on = (((&dst->__refcnt)->counter) < 1); if (__builtin_expect(!!(__ret_warn_on), 0)) { printk("BUG: warning at %s:%d/%s()\n", "include/net/dst.h", 154, (__func__)); dump_stack(); } __builtin_expect(!!(__ret_warn_on), 0); });
19823 __asm__ __volatile__("": : :"memory");
19824 atomic_dec(&dst->__refcnt);
19832 static inline __attribute__((always_inline)) struct dst_entry *dst_pop(struct dst_entry *dst)
19834 struct dst_entry *child = dst_clone(dst->child);
19840 extern void * dst_alloc(struct dst_ops * ops);
19841 extern void __dst_free(struct dst_entry * dst);
19842 extern struct dst_entry *dst_destroy(struct dst_entry * dst);
19844 static inline __attribute__((always_inline)) void dst_free(struct dst_entry * dst)
19846 if (dst->obsolete > 1)
19848 if (!((&dst->__refcnt)->counter)) {
19849 dst = dst_destroy(dst);
19856 static inline __attribute__((always_inline)) void dst_rcu_free(struct rcu_head *head)
19858 struct dst_entry *dst = ({ const typeof( ((struct dst_entry *)0)->rcu_head ) *__mptr = (head); (struct dst_entry *)( (char *)__mptr - __builtin_offsetof(struct dst_entry,rcu_head) );});
19862 static inline __attribute__((always_inline)) void dst_confirm(struct dst_entry *dst)
19865 neigh_confirm(dst->neighbour);
19868 static inline __attribute__((always_inline)) void dst_negative_advice(struct dst_entry **dst_p)
19870 struct dst_entry * dst = *dst_p;
19871 if (dst && dst->ops->negative_advice)
19872 *dst_p = dst->ops->negative_advice(dst);
19875 static inline __attribute__((always_inline)) void dst_link_failure(struct sk_buff *skb)
19877 struct dst_entry * dst = skb->dst;
19878 if (dst && dst->ops && dst->ops->link_failure)
19879 dst->ops->link_failure(skb);
19882 static inline __attribute__((always_inline)) void dst_set_expires(struct dst_entry *dst, int timeout)
19884 unsigned long expires = jiffies + timeout;
19889 if (dst->expires == 0 || (({ unsigned long __dummy; typeof(dst->expires) __dummy2; (void)(&__dummy == &__dummy2); 1; }) && ({ unsigned long __dummy; typeof(expires) __dummy2; (void)(&__dummy == &__dummy2); 1; }) && ((long)(expires) - (long)(dst->expires) < 0)))
19890 dst->expires = expires;
19894 static inline __attribute__((always_inline)) int dst_output(struct sk_buff *skb)
19896 return skb->dst->output(skb);
19900 static inline __attribute__((always_inline)) int dst_input(struct sk_buff *skb)
19905 err = skb->dst->input(skb);
19907 if (__builtin_expect(!!(err == 0), 1))
19910 if (__builtin_expect(!!(err != 4), 0))
19915 static inline __attribute__((always_inline)) struct dst_entry *dst_check(struct dst_entry *dst, u32 cookie)
19918 dst = dst->ops->check(dst, cookie);
19922 extern void dst_init(void);
19926 static inline __attribute__((always_inline)) int xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl,
19927 struct sock *sk, int flags)
19931 # 56 "include/net/sock.h" 2
19932 # 77 "include/net/sock.h"
19936 struct sock_iocb *owner;
19937 wait_queue_head_t wq;
19938 # 91 "include/net/sock.h"
19943 # 111 "include/net/sock.h"
19944 struct sock_common {
19945 unsigned short skc_family;
19946 volatile unsigned char skc_state;
19947 unsigned char skc_reuse;
19948 int skc_bound_dev_if;
19949 struct hlist_node skc_node;
19950 struct hlist_node skc_bind_node;
19951 atomic_t skc_refcnt;
19952 unsigned int skc_hash;
19953 struct proto *skc_prot;
19955 # 182 "include/net/sock.h"
19961 struct sock_common __sk_common;
19962 # 197 "include/net/sock.h"
19963 unsigned char sk_shutdown : 2,
19966 unsigned char sk_protocol;
19967 unsigned short sk_type;
19969 socket_lock_t sk_lock;
19970 wait_queue_head_t *sk_sleep;
19971 struct dst_entry *sk_dst_cache;
19972 struct xfrm_policy *sk_policy[2];
19973 rwlock_t sk_dst_lock;
19974 atomic_t sk_rmem_alloc;
19975 atomic_t sk_wmem_alloc;
19976 atomic_t sk_omem_alloc;
19977 struct sk_buff_head sk_receive_queue;
19978 struct sk_buff_head sk_write_queue;
19979 struct sk_buff_head sk_async_wait_queue;
19980 int sk_wmem_queued;
19981 int sk_forward_alloc;
19982 gfp_t sk_allocation;
19987 unsigned long sk_flags;
19988 unsigned long sk_lingertime;
19995 struct sk_buff *head;
19996 struct sk_buff *tail;
19998 struct sk_buff_head sk_error_queue;
19999 struct proto *sk_prot_creator;
20000 rwlock_t sk_callback_lock;
20003 unsigned short sk_ack_backlog;
20004 unsigned short sk_max_ack_backlog;
20006 struct ucred sk_peercred;
20009 struct sk_filter *sk_filter;
20011 struct timer_list sk_timer;
20012 struct timeval sk_stamp;
20013 struct socket *sk_socket;
20014 void *sk_user_data;
20015 struct page *sk_sndmsg_page;
20016 struct sk_buff *sk_send_head;
20017 __u32 sk_sndmsg_off;
20018 int sk_write_pending;
20020 void (*sk_state_change)(struct sock *sk);
20021 void (*sk_data_ready)(struct sock *sk, int bytes);
20022 void (*sk_write_space)(struct sock *sk);
20023 void (*sk_error_report)(struct sock *sk);
20024 int (*sk_backlog_rcv)(struct sock *sk,
20025 struct sk_buff *skb);
20026 void (*sk_destruct)(struct sock *sk);
20032 static inline __attribute__((always_inline)) struct sock *__sk_head(const struct hlist_head *head)
20034 return ({ const typeof( ((struct sock *)0)->__sk_common.skc_node ) *__mptr = (head->first); (struct sock *)( (char *)__mptr - __builtin_offsetof(struct sock,__sk_common.skc_node) );});
20037 static inline __attribute__((always_inline)) struct sock *sk_head(const struct hlist_head *head)
20039 return hlist_empty(head) ? ((void *)0) : __sk_head(head);
20042 static inline __attribute__((always_inline)) struct sock *sk_next(const struct sock *sk)
20044 return sk->__sk_common.skc_node.next ?
20045 ({ const typeof( ((struct sock *)0)->__sk_common.skc_node ) *__mptr = (sk->__sk_common.skc_node.next); (struct sock *)( (char *)__mptr - __builtin_offsetof(struct sock,__sk_common.skc_node) );}) : ((void *)0);
20048 static inline __attribute__((always_inline)) int sk_unhashed(const struct sock *sk)
20050 return hlist_unhashed(&sk->__sk_common.skc_node);
20053 static inline __attribute__((always_inline)) int sk_hashed(const struct sock *sk)
20055 return !sk_unhashed(sk);
20058 static __inline__ __attribute__((always_inline)) void sk_node_init(struct hlist_node *node)
20060 node->pprev = ((void *)0);
20063 static __inline__ __attribute__((always_inline)) void __sk_del_node(struct sock *sk)
20065 __hlist_del(&sk->__sk_common.skc_node);
20068 static __inline__ __attribute__((always_inline)) int __sk_del_node_init(struct sock *sk)
20070 if (sk_hashed(sk)) {
20072 sk_node_init(&sk->__sk_common.skc_node);
20084 static inline __attribute__((always_inline)) void sock_hold(struct sock *sk)
20086 atomic_inc(&sk->__sk_common.skc_refcnt);
20092 static inline __attribute__((always_inline)) void __sock_put(struct sock *sk)
20094 atomic_dec(&sk->__sk_common.skc_refcnt);
20097 static __inline__ __attribute__((always_inline)) int sk_del_node_init(struct sock *sk)
20099 int rc = __sk_del_node_init(sk);
20103 ({ typeof(((&sk->__sk_common.skc_refcnt)->counter) == 1) __ret_warn_on = (((&sk->__sk_common.skc_refcnt)->counter) == 1); if (__builtin_expect(!!(__ret_warn_on), 0)) { printk("BUG: warning at %s:%d/%s()\n", "include/net/sock.h", 337, (__func__)); dump_stack(); } __builtin_expect(!!(__ret_warn_on), 0); });
20109 static __inline__ __attribute__((always_inline)) void __sk_add_node(struct sock *sk, struct hlist_head *list)
20111 hlist_add_head(&sk->__sk_common.skc_node, list);
20114 static __inline__ __attribute__((always_inline)) void sk_add_node(struct sock *sk, struct hlist_head *list)
20117 __sk_add_node(sk, list);
20120 static __inline__ __attribute__((always_inline)) void __sk_del_bind_node(struct sock *sk)
20122 __hlist_del(&sk->__sk_common.skc_bind_node);
20125 static __inline__ __attribute__((always_inline)) void sk_add_bind_node(struct sock *sk,
20126 struct hlist_head *list)
20128 hlist_add_head(&sk->__sk_common.skc_bind_node, list);
20130 # 379 "include/net/sock.h"
20141 SOCK_USE_WRITE_QUEUE,
20148 static inline __attribute__((always_inline)) void sock_copy_flags(struct sock *nsk, struct sock *osk)
20150 nsk->sk_flags = osk->sk_flags;
20153 static inline __attribute__((always_inline)) void sock_set_flag(struct sock *sk, enum sock_flags flag)
20155 __set_bit(flag, &sk->sk_flags);
20158 static inline __attribute__((always_inline)) void sock_reset_flag(struct sock *sk, enum sock_flags flag)
20160 __clear_bit(flag, &sk->sk_flags);
20163 static inline __attribute__((always_inline)) int sock_flag(struct sock *sk, enum sock_flags flag)
20165 return (__builtin_constant_p(flag) ? __constant_test_bit((flag),(&sk->sk_flags)) : __test_bit((flag),(&sk->sk_flags)));
20168 static inline __attribute__((always_inline)) void sk_acceptq_removed(struct sock *sk)
20170 sk->sk_ack_backlog--;
20173 static inline __attribute__((always_inline)) void sk_acceptq_added(struct sock *sk)
20175 sk->sk_ack_backlog++;
20178 static inline __attribute__((always_inline)) int sk_acceptq_is_full(struct sock *sk)
20180 return sk->sk_ack_backlog > sk->sk_max_ack_backlog;
20186 static inline __attribute__((always_inline)) int sk_stream_min_wspace(struct sock *sk)
20188 return sk->sk_wmem_queued / 2;
20191 static inline __attribute__((always_inline)) int sk_stream_wspace(struct sock *sk)
20193 return sk->sk_sndbuf - sk->sk_wmem_queued;
20196 extern void sk_stream_write_space(struct sock *sk);
20198 static inline __attribute__((always_inline)) int sk_stream_memory_free(struct sock *sk)
20200 return sk->sk_wmem_queued < sk->sk_sndbuf;
20203 extern void sk_stream_rfree(struct sk_buff *skb);
20205 static inline __attribute__((always_inline)) void sk_stream_set_owner_r(struct sk_buff *skb, struct sock *sk)
20208 skb->destructor = sk_stream_rfree;
20209 atomic_add(skb->truesize, &sk->sk_rmem_alloc);
20210 sk->sk_forward_alloc -= skb->truesize;
20213 static inline __attribute__((always_inline)) void sk_stream_free_skb(struct sock *sk, struct sk_buff *skb)
20215 skb_truesize_check(skb);
20216 sock_set_flag(sk, SOCK_QUEUE_SHRUNK);
20217 sk->sk_wmem_queued -= skb->truesize;
20218 sk->sk_forward_alloc += skb->truesize;
20223 static inline __attribute__((always_inline)) void sk_add_backlog(struct sock *sk, struct sk_buff *skb)
20225 if (!sk->sk_backlog.tail) {
20226 sk->sk_backlog.head = sk->sk_backlog.tail = skb;
20228 sk->sk_backlog.tail->next = skb;
20229 sk->sk_backlog.tail = skb;
20231 skb->next = ((void *)0);
20233 # 494 "include/net/sock.h"
20234 extern int sk_stream_wait_connect(struct sock *sk, long *timeo_p);
20235 extern int sk_stream_wait_memory(struct sock *sk, long *timeo_p);
20236 extern void sk_stream_wait_close(struct sock *sk, long timeo_p);
20237 extern int sk_stream_error(struct sock *sk, int flags, int err);
20238 extern void sk_stream_kill_queues(struct sock *sk);
20240 extern int sk_wait_data(struct sock *sk, long *timeo);
20242 struct request_sock_ops;
20243 struct timewait_sock_ops;
20250 void (*close)(struct sock *sk,
20252 int (*connect)(struct sock *sk,
20253 struct sockaddr *uaddr,
20255 int (*disconnect)(struct sock *sk, int flags);
20257 struct sock * (*accept) (struct sock *sk, int flags, int *err);
20259 int (*ioctl)(struct sock *sk, int cmd,
20260 unsigned long arg);
20261 int (*init)(struct sock *sk);
20262 int (*destroy)(struct sock *sk);
20263 void (*shutdown)(struct sock *sk, int how);
20264 int (*setsockopt)(struct sock *sk, int level,
20265 int optname, char *optval,
20267 int (*getsockopt)(struct sock *sk, int level,
20268 int optname, char *optval,
20270 int (*compat_setsockopt)(struct sock *sk,
20272 int optname, char *optval,
20274 int (*compat_getsockopt)(struct sock *sk,
20276 int optname, char *optval,
20278 int (*sendmsg)(struct kiocb *iocb, struct sock *sk,
20279 struct msghdr *msg, size_t len);
20280 int (*recvmsg)(struct kiocb *iocb, struct sock *sk,
20281 struct msghdr *msg,
20282 size_t len, int noblock, int flags,
20284 int (*sendpage)(struct sock *sk, struct page *page,
20285 int offset, size_t size, int flags);
20286 int (*bind)(struct sock *sk,
20287 struct sockaddr *uaddr, int addr_len);
20289 int (*backlog_rcv) (struct sock *sk,
20290 struct sk_buff *skb);
20293 void (*hash)(struct sock *sk);
20294 void (*unhash)(struct sock *sk);
20295 int (*get_port)(struct sock *sk, unsigned short snum);
20298 void (*enter_memory_pressure)(void);
20299 atomic_t *memory_allocated;
20300 atomic_t *sockets_allocated;
20307 int *memory_pressure;
20313 kmem_cache_t *slab;
20314 unsigned int obj_size;
20316 atomic_t *orphan_count;
20318 struct request_sock_ops *rsk_prot;
20319 struct timewait_sock_ops *twsk_prot;
20321 struct module *owner;
20325 struct list_head node;
20331 u8 __pad[(1 << 5) - sizeof(int)];
20335 extern int proto_register(struct proto *prot, int alloc_slab);
20336 extern void proto_unregister(struct proto *prot);
20337 # 624 "include/net/sock.h"
20338 static __inline__ __attribute__((always_inline)) void sock_prot_inc_use(struct proto *prot)
20340 prot->stats[0].inuse++;
20343 static __inline__ __attribute__((always_inline)) void sock_prot_dec_use(struct proto *prot)
20345 prot->stats[0].inuse--;
20351 static inline __attribute__((always_inline)) void __sk_prot_rehash(struct sock *sk)
20353 sk->__sk_common.skc_prot->unhash(sk);
20354 sk->__sk_common.skc_prot->hash(sk);
20356 # 659 "include/net/sock.h"
20358 struct list_head list;
20362 struct socket *sock;
20364 struct scm_cookie *scm;
20365 struct msghdr *msg, async_msg;
20366 struct kiocb *kiocb;
20369 static inline __attribute__((always_inline)) struct sock_iocb *kiocb_to_siocb(struct kiocb *iocb)
20371 return (struct sock_iocb *)iocb->private;
20374 static inline __attribute__((always_inline)) struct kiocb *siocb_to_kiocb(struct sock_iocb *si)
20379 struct socket_alloc {
20380 struct socket socket;
20381 struct inode vfs_inode;
20384 static inline __attribute__((always_inline)) struct socket *SOCKET_I(struct inode *inode)
20386 return &({ const typeof( ((struct socket_alloc *)0)->vfs_inode ) *__mptr = (inode); (struct socket_alloc *)( (char *)__mptr - __builtin_offsetof(struct socket_alloc,vfs_inode) );})->socket;
20389 static inline __attribute__((always_inline)) struct inode *SOCK_INODE(struct socket *socket)
20391 return &({ const typeof( ((struct socket_alloc *)0)->socket ) *__mptr = (socket); (struct socket_alloc *)( (char *)__mptr - __builtin_offsetof(struct socket_alloc,socket) );})->vfs_inode;
20394 extern void __sk_stream_mem_reclaim(struct sock *sk);
20395 extern int sk_stream_mem_schedule(struct sock *sk, int size, int kind);
20399 static inline __attribute__((always_inline)) int sk_stream_pages(int amt)
20401 return (amt + ((int)(1UL << 12)) - 1) / ((int)(1UL << 12));
20404 static inline __attribute__((always_inline)) void sk_stream_mem_reclaim(struct sock *sk)
20406 if (sk->sk_forward_alloc >= ((int)(1UL << 12)))
20407 __sk_stream_mem_reclaim(sk);
20410 static inline __attribute__((always_inline)) void sk_stream_writequeue_purge(struct sock *sk)
20412 struct sk_buff *skb;
20414 while ((skb = __skb_dequeue(&sk->sk_write_queue)) != ((void *)0))
20415 sk_stream_free_skb(sk, skb);
20416 sk_stream_mem_reclaim(sk);
20419 static inline __attribute__((always_inline)) int sk_stream_rmem_schedule(struct sock *sk, struct sk_buff *skb)
20421 return (int)skb->truesize <= sk->sk_forward_alloc ||
20422 sk_stream_mem_schedule(sk, skb->truesize, 1);
20425 static inline __attribute__((always_inline)) int sk_stream_wmem_schedule(struct sock *sk, int size)
20427 return size <= sk->sk_forward_alloc ||
20428 sk_stream_mem_schedule(sk, size, 0);
20430 # 748 "include/net/sock.h"
20431 extern void lock_sock(struct sock *sk);
20432 extern void release_sock(struct sock *sk);
20433 # 758 "include/net/sock.h"
20434 extern struct sock *sk_alloc(int family,
20436 struct proto *prot, int zero_it);
20437 extern void sk_free(struct sock *sk);
20438 extern struct sock *sk_clone(const struct sock *sk,
20439 const gfp_t priority);
20441 extern struct sk_buff *sock_wmalloc(struct sock *sk,
20442 unsigned long size, int force,
20444 extern struct sk_buff *sock_rmalloc(struct sock *sk,
20445 unsigned long size, int force,
20447 extern void sock_wfree(struct sk_buff *skb);
20448 extern void sock_rfree(struct sk_buff *skb);
20450 extern int sock_setsockopt(struct socket *sock, int level,
20451 int op, char *optval,
20454 extern int sock_getsockopt(struct socket *sock, int level,
20455 int op, char *optval,
20457 extern struct sk_buff *sock_alloc_send_skb(struct sock *sk,
20458 unsigned long size,
20461 extern void *sock_kmalloc(struct sock *sk, int size,
20463 extern void sock_kfree_s(struct sock *sk, void *mem, int size);
20464 extern void sk_send_sigurg(struct sock *sk);
20470 extern int sock_no_bind(struct socket *,
20471 struct sockaddr *, int);
20472 extern int sock_no_connect(struct socket *,
20473 struct sockaddr *, int, int);
20474 extern int sock_no_socketpair(struct socket *,
20476 extern int sock_no_accept(struct socket *,
20477 struct socket *, int);
20478 extern int sock_no_getname(struct socket *,
20479 struct sockaddr *, int *, int);
20480 extern unsigned int sock_no_poll(struct file *, struct socket *,
20481 struct poll_table_struct *);
20482 extern int sock_no_ioctl(struct socket *, unsigned int,
20484 extern int sock_no_listen(struct socket *, int);
20485 extern int sock_no_shutdown(struct socket *, int);
20486 extern int sock_no_getsockopt(struct socket *, int , int,
20488 extern int sock_no_setsockopt(struct socket *, int, int,
20490 extern int sock_no_sendmsg(struct kiocb *, struct socket *,
20491 struct msghdr *, size_t);
20492 extern int sock_no_recvmsg(struct kiocb *, struct socket *,
20493 struct msghdr *, size_t, int);
20494 extern int sock_no_mmap(struct file *file,
20495 struct socket *sock,
20496 struct vm_area_struct *vma);
20497 extern ssize_t sock_no_sendpage(struct socket *sock,
20499 int offset, size_t size,
20506 extern int sock_common_getsockopt(struct socket *sock, int level, int optname,
20507 char *optval, int *optlen);
20508 extern int sock_common_recvmsg(struct kiocb *iocb, struct socket *sock,
20509 struct msghdr *msg, size_t size, int flags);
20510 extern int sock_common_setsockopt(struct socket *sock, int level, int optname,
20511 char *optval, int optlen);
20512 extern int compat_sock_common_getsockopt(struct socket *sock, int level,
20513 int optname, char *optval, int *optlen);
20514 extern int compat_sock_common_setsockopt(struct socket *sock, int level,
20515 int optname, char *optval, int optlen);
20517 extern void sk_common_release(struct sock *sk);
20524 extern void sock_init_data(struct socket *sock, struct sock *sk);
20525 # 864 "include/net/sock.h"
20526 static inline __attribute__((always_inline)) int sk_filter(struct sock *sk, struct sk_buff *skb)
20529 struct sk_filter *filter;
20531 err = security_sock_rcv_skb(sk, skb);
20535 do { local_bh_disable(); (void)0; } while(0);
20536 filter = sk->sk_filter;
20538 unsigned int pkt_len = sk_run_filter(skb, filter->insns,
20540 err = pkt_len ? pskb_trim(skb, pkt_len) : -1;
20542 do { (void)0; local_bh_enable(); } while(0);
20551 static inline __attribute__((always_inline)) void sk_filter_rcu_free(struct rcu_head *rcu)
20553 struct sk_filter *fp = ({ const typeof( ((struct sk_filter *)0)->rcu ) *__mptr = (rcu); (struct sk_filter *)( (char *)__mptr - __builtin_offsetof(struct sk_filter,rcu) );});
20556 # 903 "include/net/sock.h"
20557 static inline __attribute__((always_inline)) void sk_filter_release(struct sock *sk, struct sk_filter *fp)
20559 unsigned int size = sk_filter_len(fp);
20561 atomic_sub(size, &sk->sk_omem_alloc);
20563 if ((atomic_sub_return(1, (&fp->refcnt)) == 0))
20564 call_rcu_bh(&fp->rcu, sk_filter_rcu_free);
20567 static inline __attribute__((always_inline)) void sk_filter_charge(struct sock *sk, struct sk_filter *fp)
20569 atomic_inc(&fp->refcnt);
20570 atomic_add(sk_filter_len(fp), &sk->sk_omem_alloc);
20572 # 945 "include/net/sock.h"
20573 static inline __attribute__((always_inline)) void sock_put(struct sock *sk)
20575 if ((atomic_sub_return(1, (&sk->__sk_common.skc_refcnt)) == 0))
20579 extern int sk_receive_skb(struct sock *sk, struct sk_buff *skb);
20580 # 960 "include/net/sock.h"
20581 static inline __attribute__((always_inline)) void sock_orphan(struct sock *sk)
20583 do { local_bh_disable(); do { do { } while (0); (void)0; (void)(&sk->sk_callback_lock); } while (0); } while (0);
20584 sock_set_flag(sk, SOCK_DEAD);
20585 sk->sk_socket = ((void *)0);
20586 sk->sk_sleep = ((void *)0);
20587 do { do { } while (0); local_bh_enable(); (void)0; (void)(&sk->sk_callback_lock); } while (0);
20590 static inline __attribute__((always_inline)) void sock_graft(struct sock *sk, struct socket *parent)
20592 do { local_bh_disable(); do { do { } while (0); (void)0; (void)(&sk->sk_callback_lock); } while (0); } while (0);
20593 sk->sk_sleep = &parent->wait;
20595 sk->sk_socket = parent;
20596 security_sock_graft(sk, parent);
20597 do { do { } while (0); local_bh_enable(); (void)0; (void)(&sk->sk_callback_lock); } while (0);
20600 static inline __attribute__((always_inline)) void sock_copy(struct sock *nsk, const struct sock *osk)
20606 memcpy(nsk, osk, osk->__sk_common.skc_prot->obj_size);
20613 extern int sock_i_uid(struct sock *sk);
20614 extern unsigned long sock_i_ino(struct sock *sk);
20616 static inline __attribute__((always_inline)) struct dst_entry *
20617 __sk_dst_get(struct sock *sk)
20619 return sk->sk_dst_cache;
20622 static inline __attribute__((always_inline)) struct dst_entry *
20623 sk_dst_get(struct sock *sk)
20625 struct dst_entry *dst;
20627 do { do { } while (0); (void)0; (void)(&sk->sk_dst_lock); } while (0);
20628 dst = sk->sk_dst_cache;
20631 do { do { } while (0); (void)0; (void)(&sk->sk_dst_lock); } while (0);
20635 static inline __attribute__((always_inline)) void
20636 __sk_dst_set(struct sock *sk, struct dst_entry *dst)
20638 struct dst_entry *old_dst;
20640 old_dst = sk->sk_dst_cache;
20641 sk->sk_dst_cache = dst;
20642 dst_release(old_dst);
20645 static inline __attribute__((always_inline)) void
20646 sk_dst_set(struct sock *sk, struct dst_entry *dst)
20648 do { do { } while (0); (void)0; (void)(&sk->sk_dst_lock); } while (0);
20649 __sk_dst_set(sk, dst);
20650 do { do { } while (0); (void)0; (void)(&sk->sk_dst_lock); } while (0);
20653 static inline __attribute__((always_inline)) void
20654 __sk_dst_reset(struct sock *sk)
20656 struct dst_entry *old_dst;
20658 old_dst = sk->sk_dst_cache;
20659 sk->sk_dst_cache = ((void *)0);
20660 dst_release(old_dst);
20663 static inline __attribute__((always_inline)) void
20664 sk_dst_reset(struct sock *sk)
20666 do { do { } while (0); (void)0; (void)(&sk->sk_dst_lock); } while (0);
20667 __sk_dst_reset(sk);
20668 do { do { } while (0); (void)0; (void)(&sk->sk_dst_lock); } while (0);
20671 extern struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie);
20673 extern struct dst_entry *sk_dst_check(struct sock *sk, u32 cookie);
20675 static inline __attribute__((always_inline)) int sk_can_gso(const struct sock *sk)
20677 return net_gso_ok(sk->sk_route_caps, sk->sk_gso_type);
20680 static inline __attribute__((always_inline)) void sk_setup_caps(struct sock *sk, struct dst_entry *dst)
20682 __sk_dst_set(sk, dst);
20683 sk->sk_route_caps = dst->dev->features;
20684 if (sk->sk_route_caps & 2048)
20685 sk->sk_route_caps |= 0xffff0000;
20686 if (sk_can_gso(sk)) {
20687 if (dst->header_len)
20688 sk->sk_route_caps &= ~0xffff0000;
20690 sk->sk_route_caps |= 1 | 8;
20694 static inline __attribute__((always_inline)) void sk_charge_skb(struct sock *sk, struct sk_buff *skb)
20696 sk->sk_wmem_queued += skb->truesize;
20697 sk->sk_forward_alloc -= skb->truesize;
20700 static inline __attribute__((always_inline)) int skb_copy_to_page(struct sock *sk, char *from,
20701 struct sk_buff *skb, struct page *page,
20704 if (skb->ip_summed == 0) {
20706 unsigned int csum = csum_and_copy_from_user(from,
20707 lowmem_page_address(page) + off,
20711 skb->csum = csum_block_add(skb->csum, csum, skb->len);
20712 } else if (copy_from_user(lowmem_page_address(page) + off, from, copy))
20716 skb->data_len += copy;
20717 skb->truesize += copy;
20718 sk->sk_wmem_queued += copy;
20719 sk->sk_forward_alloc -= copy;
20722 # 1111 "include/net/sock.h"
20723 static inline __attribute__((always_inline)) void skb_set_owner_w(struct sk_buff *skb, struct sock *sk)
20727 skb->destructor = sock_wfree;
20728 atomic_add(skb->truesize, &sk->sk_wmem_alloc);
20731 static inline __attribute__((always_inline)) void skb_set_owner_r(struct sk_buff *skb, struct sock *sk)
20734 skb->destructor = sock_rfree;
20735 atomic_add(skb->truesize, &sk->sk_rmem_alloc);
20738 extern void sk_reset_timer(struct sock *sk, struct timer_list* timer,
20739 unsigned long expires);
20741 extern void sk_stop_timer(struct sock *sk, struct timer_list* timer);
20743 extern int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb);
20745 static inline __attribute__((always_inline)) int sock_queue_err_skb(struct sock *sk, struct sk_buff *skb)
20750 if (((&sk->sk_rmem_alloc)->counter) + skb->truesize >=
20751 (unsigned)sk->sk_rcvbuf)
20753 skb_set_owner_r(skb, sk);
20754 skb_queue_tail(&sk->sk_error_queue, skb);
20755 if (!sock_flag(sk, SOCK_DEAD))
20756 sk->sk_data_ready(sk, skb->len);
20764 static inline __attribute__((always_inline)) int sock_error(struct sock *sk)
20767 if (__builtin_expect(!!(!sk->sk_err), 1))
20769 err = ((__typeof__(*(&sk->sk_err)))__xchg((unsigned long)(0),(&sk->sk_err),sizeof(*(&sk->sk_err))));
20773 static inline __attribute__((always_inline)) unsigned long sock_wspace(struct sock *sk)
20777 if (!(sk->sk_shutdown & 2)) {
20778 amt = sk->sk_sndbuf - ((&sk->sk_wmem_alloc)->counter);
20785 static inline __attribute__((always_inline)) void sk_wake_async(struct sock *sk, int how, int band)
20787 if (sk->sk_socket && sk->sk_socket->fasync_list)
20788 sock_wake_async(sk->sk_socket, how, band);
20794 static inline __attribute__((always_inline)) void sk_stream_moderate_sndbuf(struct sock *sk)
20796 if (!(sk->sk_userlocks & 1)) {
20797 sk->sk_sndbuf = ({ typeof(sk->sk_sndbuf) _x = (sk->sk_sndbuf); typeof(sk->sk_wmem_queued / 2) _y = (sk->sk_wmem_queued / 2); (void) (&_x == &_y); _x < _y ? _x : _y; });
20798 sk->sk_sndbuf = ({ typeof(sk->sk_sndbuf) _x = (sk->sk_sndbuf); typeof(2048) _y = (2048); (void) (&_x == &_y); _x > _y ? _x : _y; });
20802 static inline __attribute__((always_inline)) struct sk_buff *sk_stream_alloc_pskb(struct sock *sk,
20806 struct sk_buff *skb;
20809 hdr_len = (((sk->__sk_common.skc_prot->max_header) + ((1 << 5) - 1)) & ~((1 << 5) - 1));
20810 skb = alloc_skb_fclone(size + hdr_len, gfp);
20812 skb->truesize += mem;
20813 if (sk_stream_wmem_schedule(sk, skb->truesize)) {
20814 skb_reserve(skb, hdr_len);
20819 sk->__sk_common.skc_prot->enter_memory_pressure();
20820 sk_stream_moderate_sndbuf(sk);
20822 return ((void *)0);
20825 static inline __attribute__((always_inline)) struct sk_buff *sk_stream_alloc_skb(struct sock *sk,
20829 return sk_stream_alloc_pskb(sk, size, 0, gfp);
20832 static inline __attribute__((always_inline)) struct page *sk_stream_alloc_page(struct sock *sk)
20834 struct page *page = ((void *)0);
20836 page = alloc_pages_node(((0)), sk->sk_allocation, 0);
20838 sk->__sk_common.skc_prot->enter_memory_pressure();
20839 sk_stream_moderate_sndbuf(sk);
20843 # 1247 "include/net/sock.h"
20844 static inline __attribute__((always_inline)) int sock_writeable(const struct sock *sk)
20846 return ((&sk->sk_wmem_alloc)->counter) < (sk->sk_sndbuf / 2);
20849 static inline __attribute__((always_inline)) gfp_t gfp_any(void)
20851 return (((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8)))) ? ((( gfp_t)0x20u)) : ((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u));
20854 static inline __attribute__((always_inline)) long sock_rcvtimeo(const struct sock *sk, int noblock)
20856 return noblock ? 0 : sk->sk_rcvtimeo;
20859 static inline __attribute__((always_inline)) long sock_sndtimeo(const struct sock *sk, int noblock)
20861 return noblock ? 0 : sk->sk_sndtimeo;
20864 static inline __attribute__((always_inline)) int sock_rcvlowat(const struct sock *sk, int waitall, int len)
20866 return (waitall ? len : ({ int __x = (sk->sk_rcvlowat); int __y = (len); __x < __y ? __x: __y; })) ? : 1;
20872 static inline __attribute__((always_inline)) int sock_intr_errno(long timeo)
20874 return timeo == ((long)(~0UL>>1)) ? -512 : -4;
20877 static __inline__ __attribute__((always_inline)) void
20878 sock_recv_timestamp(struct msghdr *msg, struct sock *sk, struct sk_buff *skb)
20880 struct timeval stamp;
20882 skb_get_timestamp(skb, &stamp);
20883 if (sock_flag(sk, SOCK_RCVTSTAMP)) {
20886 if (stamp.tv_sec == 0)
20887 do_gettimeofday(&stamp);
20888 skb_set_timestamp(skb, &stamp);
20889 put_cmsg(msg, 1, 29, sizeof(struct timeval),
20892 sk->sk_stamp = stamp;
20894 # 1317 "include/net/sock.h"
20895 static inline __attribute__((always_inline)) void sk_eat_skb(struct sock *sk, struct sk_buff *skb, int copied_early)
20897 __skb_unlink(skb, &sk->sk_receive_queue);
20902 extern void sock_enable_timestamp(struct sock *sk);
20903 extern int sock_get_timestamp(struct sock *, struct timeval *);
20904 # 1363 "include/net/sock.h"
20905 static inline __attribute__((always_inline)) void sock_valbool_flag(struct sock *sk, int bit, int valbool)
20908 sock_set_flag(sk, bit);
20910 sock_reset_flag(sk, bit);
20913 extern __u32 sysctl_wmem_max;
20914 extern __u32 sysctl_rmem_max;
20917 int siocdevprivate_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg);
20925 extern void sk_init(void);
20928 extern struct ctl_table core_table[];
20931 extern int sysctl_optmem_max;
20933 extern __u32 sysctl_wmem_default;
20934 extern __u32 sysctl_rmem_default;
20935 # 25 "include/net/inet_sock.h" 2
20936 # 1 "include/net/request_sock.h" 1
20937 # 24 "include/net/request_sock.h"
20938 struct request_sock;
20943 struct request_sock_ops {
20945 kmem_cache_t *slab;
20947 int (*rtx_syn_ack)(struct sock *sk,
20948 struct request_sock *req,
20949 struct dst_entry *dst);
20950 void (*send_ack)(struct sk_buff *skb,
20951 struct request_sock *req);
20952 void (*send_reset)(struct sk_buff *skb);
20953 void (*destructor)(struct request_sock *req);
20958 struct request_sock {
20959 struct request_sock *dl_next;
20967 unsigned long expires;
20968 struct request_sock_ops *rsk_ops;
20973 static inline __attribute__((always_inline)) struct request_sock *reqsk_alloc(struct request_sock_ops *ops)
20975 struct request_sock *req = kmem_cache_alloc(ops->slab, ((( gfp_t)0x20u)));
20977 if (req != ((void *)0))
20978 req->rsk_ops = ops;
20983 static inline __attribute__((always_inline)) void __reqsk_free(struct request_sock *req)
20985 kmem_cache_free(req->rsk_ops->slab, req);
20988 static inline __attribute__((always_inline)) void reqsk_free(struct request_sock *req)
20990 req->rsk_ops->destructor(req);
20994 extern int sysctl_max_syn_backlog;
21000 struct listen_sock {
21007 u32 nr_table_entries;
21008 struct request_sock *syn_table[0];
21010 # 113 "include/net/request_sock.h"
21011 struct request_sock_queue {
21012 struct request_sock *rskq_accept_head;
21013 struct request_sock *rskq_accept_tail;
21014 rwlock_t syn_wait_lock;
21015 u8 rskq_defer_accept;
21017 struct listen_sock *listen_opt;
21020 extern int reqsk_queue_alloc(struct request_sock_queue *queue,
21021 const int nr_table_entries);
21023 static inline __attribute__((always_inline)) struct listen_sock *reqsk_queue_yank_listen_sk(struct request_sock_queue *queue)
21025 struct listen_sock *lopt;
21027 do { local_bh_disable(); do { do { } while (0); (void)0; (void)(&queue->syn_wait_lock); } while (0); } while (0);
21028 lopt = queue->listen_opt;
21029 queue->listen_opt = ((void *)0);
21030 do { do { } while (0); local_bh_enable(); (void)0; (void)(&queue->syn_wait_lock); } while (0);
21035 static inline __attribute__((always_inline)) void __reqsk_queue_destroy(struct request_sock_queue *queue)
21037 kfree(reqsk_queue_yank_listen_sk(queue));
21040 extern void reqsk_queue_destroy(struct request_sock_queue *queue);
21042 static inline __attribute__((always_inline)) struct request_sock *
21043 reqsk_queue_yank_acceptq(struct request_sock_queue *queue)
21045 struct request_sock *req = queue->rskq_accept_head;
21047 queue->rskq_accept_head = ((void *)0);
21051 static inline __attribute__((always_inline)) int reqsk_queue_empty(struct request_sock_queue *queue)
21053 return queue->rskq_accept_head == ((void *)0);
21056 static inline __attribute__((always_inline)) void reqsk_queue_unlink(struct request_sock_queue *queue,
21057 struct request_sock *req,
21058 struct request_sock **prev_req)
21060 do { do { } while (0); (void)0; (void)(&queue->syn_wait_lock); } while (0);
21061 *prev_req = req->dl_next;
21062 do { do { } while (0); (void)0; (void)(&queue->syn_wait_lock); } while (0);
21065 static inline __attribute__((always_inline)) void reqsk_queue_add(struct request_sock_queue *queue,
21066 struct request_sock *req,
21067 struct sock *parent,
21068 struct sock *child)
21071 sk_acceptq_added(parent);
21073 if (queue->rskq_accept_head == ((void *)0))
21074 queue->rskq_accept_head = req;
21076 queue->rskq_accept_tail->dl_next = req;
21078 queue->rskq_accept_tail = req;
21079 req->dl_next = ((void *)0);
21082 static inline __attribute__((always_inline)) struct request_sock *reqsk_queue_remove(struct request_sock_queue *queue)
21084 struct request_sock *req = queue->rskq_accept_head;
21086 do { if (__builtin_expect(!!(!(req != ((void *)0))), 0)) { printk("<3>" "KERNEL: assertion (%s) failed at %s (%d)\n", "req != NULL", "include/net/request_sock.h" , 188); } } while(0);
21088 queue->rskq_accept_head = req->dl_next;
21089 if (queue->rskq_accept_head == ((void *)0))
21090 queue->rskq_accept_tail = ((void *)0);
21095 static inline __attribute__((always_inline)) struct sock *reqsk_queue_get_child(struct request_sock_queue *queue,
21096 struct sock *parent)
21098 struct request_sock *req = reqsk_queue_remove(queue);
21099 struct sock *child = req->sk;
21101 do { if (__builtin_expect(!!(!(child != ((void *)0))), 0)) { printk("<3>" "KERNEL: assertion (%s) failed at %s (%d)\n", "child != NULL", "include/net/request_sock.h" , 203); } } while(0);
21103 sk_acceptq_removed(parent);
21108 static inline __attribute__((always_inline)) int reqsk_queue_removed(struct request_sock_queue *queue,
21109 struct request_sock *req)
21111 struct listen_sock *lopt = queue->listen_opt;
21113 if (req->retrans == 0)
21114 --lopt->qlen_young;
21116 return --lopt->qlen;
21119 static inline __attribute__((always_inline)) int reqsk_queue_added(struct request_sock_queue *queue)
21121 struct listen_sock *lopt = queue->listen_opt;
21122 const int prev_qlen = lopt->qlen;
21124 lopt->qlen_young++;
21129 static inline __attribute__((always_inline)) int reqsk_queue_len(const struct request_sock_queue *queue)
21131 return queue->listen_opt != ((void *)0) ? queue->listen_opt->qlen : 0;
21134 static inline __attribute__((always_inline)) int reqsk_queue_len_young(const struct request_sock_queue *queue)
21136 return queue->listen_opt->qlen_young;
21139 static inline __attribute__((always_inline)) int reqsk_queue_is_full(const struct request_sock_queue *queue)
21141 return queue->listen_opt->qlen >> queue->listen_opt->max_qlen_log;
21144 static inline __attribute__((always_inline)) void reqsk_queue_hash_req(struct request_sock_queue *queue,
21145 u32 hash, struct request_sock *req,
21146 unsigned long timeout)
21148 struct listen_sock *lopt = queue->listen_opt;
21150 req->expires = jiffies + timeout;
21152 req->sk = ((void *)0);
21153 req->dl_next = lopt->syn_table[hash];
21155 do { do { } while (0); (void)0; (void)(&queue->syn_wait_lock); } while (0);
21156 lopt->syn_table[hash] = req;
21157 do { do { } while (0); (void)0; (void)(&queue->syn_wait_lock); } while (0);
21159 # 26 "include/net/inet_sock.h" 2
21160 # 38 "include/net/inet_sock.h"
21161 struct ip_options {
21163 unsigned char optlen;
21167 unsigned char is_data:1,
21174 unsigned char router_alert;
21175 unsigned char cipso;
21176 unsigned char __pad2;
21177 unsigned char __data[0];
21182 struct inet_request_sock {
21183 struct request_sock req;
21191 u16 snd_wscale : 4,
21198 struct ip_options *opt;
21201 static inline __attribute__((always_inline)) struct inet_request_sock *inet_rsk(const struct request_sock *sk)
21203 return (struct inet_request_sock *)sk;
21206 struct ip_mc_socklist;
21209 # 106 "include/net/inet_sock.h"
21224 struct ip_options *opt;
21237 struct ip_mc_socklist *mc_list;
21239 unsigned int flags;
21240 unsigned int fragsize;
21241 struct ip_options *opt;
21252 static inline __attribute__((always_inline)) struct inet_sock *inet_sk(const struct sock *sk)
21254 return (struct inet_sock *)sk;
21257 static inline __attribute__((always_inline)) void __inet_sk_copy_descendant(struct sock *sk_to,
21258 const struct sock *sk_from,
21259 const int ancestor_size)
21261 memcpy(inet_sk(sk_to) + 1, inet_sk(sk_from) + 1,
21262 sk_from->__sk_common.skc_prot->obj_size - ancestor_size);
21265 static inline __attribute__((always_inline)) void inet_sk_copy_descendant(struct sock *sk_to,
21266 const struct sock *sk_from)
21268 __inet_sk_copy_descendant(sk_to, sk_from, sizeof(struct inet_sock));
21272 extern int inet_sk_rebuild_header(struct sock *sk);
21274 static inline __attribute__((always_inline)) unsigned int inet_ehashfn(const __be32 laddr, const __u16 lport,
21275 const __be32 faddr, const __be16 fport)
21277 unsigned int h = (( __u32)laddr ^ lport) ^ (( __u32)faddr ^ ( __u32)fport);
21283 static inline __attribute__((always_inline)) int inet_sk_ehashfn(const struct sock *sk)
21285 const struct inet_sock *inet = inet_sk(sk);
21286 const __be32 laddr = inet->rcv_saddr;
21287 const __u16 lport = inet->num;
21288 const __be32 faddr = inet->daddr;
21289 const __be16 fport = inet->dport;
21291 return inet_ehashfn(laddr, lport, faddr, fport);
21293 # 30 "include/net/ip.h" 2
21298 struct inet_skb_parm
21300 struct ip_options opt;
21301 unsigned char flags;
21314 struct ip_options *opt;
21321 struct ip_ra_chain *next;
21323 void (*destructor)(struct sock *);
21326 extern struct ip_ra_chain *ip_ra_chain;
21327 extern rwlock_t ip_ra_lock;
21328 # 73 "include/net/ip.h"
21331 struct packet_type;
21336 extern void ip_mc_dropsocket(struct sock *);
21337 extern void ip_mc_dropdevice(struct net_device *dev);
21338 extern int igmp_mc_proc_init(void);
21344 extern int ip_build_and_send_pkt(struct sk_buff *skb, struct sock *sk,
21345 __be32 saddr, __be32 daddr,
21346 struct ip_options *opt);
21347 extern int ip_rcv(struct sk_buff *skb, struct net_device *dev,
21348 struct packet_type *pt, struct net_device *orig_dev);
21349 extern int ip_local_deliver(struct sk_buff *skb);
21350 extern int ip_mr_input(struct sk_buff *skb);
21351 extern int ip_output(struct sk_buff *skb);
21352 extern int ip_mc_output(struct sk_buff *skb);
21353 extern int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *));
21354 extern int ip_do_nat(struct sk_buff *skb);
21355 extern void ip_send_check(struct iphdr *ip);
21356 extern int ip_queue_xmit(struct sk_buff *skb, int ipfragok);
21357 extern void ip_init(void);
21358 extern int ip_append_data(struct sock *sk,
21359 int getfrag(void *from, char *to, int offset, int len,
21360 int odd, struct sk_buff *skb),
21361 void *from, int len, int protolen,
21362 struct ipcm_cookie *ipc,
21364 unsigned int flags);
21365 extern int ip_generic_getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb);
21366 extern ssize_t ip_append_page(struct sock *sk, struct page *page,
21367 int offset, size_t size, int flags);
21368 extern int ip_push_pending_frames(struct sock *sk);
21369 extern void ip_flush_pending_frames(struct sock *sk);
21372 extern int ip4_datagram_connect(struct sock *sk,
21373 struct sockaddr *uaddr, int addr_len);
21374 # 126 "include/net/ip.h"
21375 static inline __attribute__((always_inline)) void ip_tr_mc_map(u32 addr, char *buf)
21385 struct ip_reply_arg {
21386 struct kvec iov[1];
21392 void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *arg,
21401 extern struct ipv4_config ipv4_config;
21402 extern __typeof__(struct ipstats_mib) *ip_statistics[2];
21406 extern __typeof__(struct linux_mib) *net_statistics[2];
21413 extern int sysctl_local_port_range[2];
21414 extern int sysctl_ip_default_ttl;
21415 extern int sysctl_ip_nonlocal_bind;
21418 extern int sysctl_ipfrag_high_thresh;
21419 extern int sysctl_ipfrag_low_thresh;
21420 extern int sysctl_ipfrag_time;
21421 extern int sysctl_ipfrag_secret_interval;
21422 extern int sysctl_ipfrag_max_dist;
21425 extern int inet_peer_threshold;
21426 extern int inet_peer_minttl;
21427 extern int inet_peer_maxttl;
21428 extern int inet_peer_gc_mintime;
21429 extern int inet_peer_gc_maxtime;
21432 extern int sysctl_ip_dynaddr;
21434 extern void ipfrag_init(void);
21441 static inline __attribute__((always_inline))
21442 int ip_decrease_ttl(struct iphdr *iph)
21444 u32 check = iph->check;
21445 check += htons(0x0100);
21446 iph->check = check + (check>=0xFFFF);
21450 static inline __attribute__((always_inline))
21451 int ip_dont_fragment(struct sock *sk, struct dst_entry *dst)
21453 return (inet_sk(sk)->pmtudisc == 2 ||
21454 (inet_sk(sk)->pmtudisc == 1 &&
21455 !(dst_metric(dst, RTAX_LOCK)&(1<<RTAX_MTU))));
21458 extern void __ip_select_ident(struct iphdr *iph, struct dst_entry *dst, int more);
21460 static inline __attribute__((always_inline)) void ip_select_ident(struct iphdr *iph, struct dst_entry *dst, struct sock *sk)
21462 if (iph->frag_off & htons(0x4000)) {
21468 iph->id = (sk && inet_sk(sk)->daddr) ?
21469 htons(inet_sk(sk)->id++) : 0;
21471 __ip_select_ident(iph, dst, 0);
21474 static inline __attribute__((always_inline)) void ip_select_ident_more(struct iphdr *iph, struct dst_entry *dst, struct sock *sk, int more)
21476 if (iph->frag_off & htons(0x4000)) {
21477 if (sk && inet_sk(sk)->daddr) {
21478 iph->id = htons(inet_sk(sk)->id);
21479 inet_sk(sk)->id += 1 + more;
21483 __ip_select_ident(iph, dst, more);
21490 static inline __attribute__((always_inline)) void ip_eth_mc_map(u32 addr, char *buf)
21508 static inline __attribute__((always_inline)) void ip_ib_mc_map(u32 addr, char *buf)
21514 addr = ntohl(addr);
21527 buf[19] = addr & 0xff;
21529 buf[18] = addr & 0xff;
21531 buf[17] = addr & 0xff;
21533 buf[16] = addr & 0x0f;
21540 static __inline__ __attribute__((always_inline)) void inet_reset_saddr(struct sock *sk)
21542 inet_sk(sk)->rcv_saddr = inet_sk(sk)->saddr = 0;
21543 # 302 "include/net/ip.h"
21548 extern int ip_call_ra_chain(struct sk_buff *skb);
21554 enum ip_defrag_users
21556 IP_DEFRAG_LOCAL_DELIVER,
21557 IP_DEFRAG_CALL_RA_CHAIN,
21558 IP_DEFRAG_CONNTRACK_IN,
21559 IP_DEFRAG_CONNTRACK_OUT,
21565 struct sk_buff *ip_defrag(struct sk_buff *skb, u32 user);
21566 extern int ip_frag_nqueues;
21567 extern atomic_t ip_frag_mem;
21573 extern int ip_forward(struct sk_buff *skb);
21574 extern int ip_net_unreachable(struct sk_buff *skb);
21580 extern void ip_options_build(struct sk_buff *skb, struct ip_options *opt, __be32 daddr, struct rtable *rt, int is_frag);
21581 extern int ip_options_echo(struct ip_options *dopt, struct sk_buff *skb);
21582 extern void ip_options_fragment(struct sk_buff *skb);
21583 extern int ip_options_compile(struct ip_options *opt, struct sk_buff *skb);
21584 extern int ip_options_get(struct ip_options **optp,
21585 unsigned char *data, int optlen);
21586 extern int ip_options_get_from_user(struct ip_options **optp,
21587 unsigned char *data, int optlen);
21588 extern void ip_options_undo(struct ip_options * opt);
21589 extern void ip_forward_options(struct sk_buff *skb);
21590 extern int ip_options_rcv_srr(struct sk_buff *skb);
21596 extern void ip_cmsg_recv(struct msghdr *msg, struct sk_buff *skb);
21597 extern int ip_cmsg_send(struct msghdr *msg, struct ipcm_cookie *ipc);
21598 extern int ip_setsockopt(struct sock *sk, int level, int optname, char *optval, int optlen);
21599 extern int ip_getsockopt(struct sock *sk, int level, int optname, char *optval, int *optlen);
21600 extern int compat_ip_setsockopt(struct sock *sk, int level,
21601 int optname, char *optval, int optlen);
21602 extern int compat_ip_getsockopt(struct sock *sk, int level,
21603 int optname, char *optval, int *optlen);
21604 extern int ip_ra_control(struct sock *sk, unsigned char on, void (*destructor)(struct sock *));
21606 extern int ip_recv_error(struct sock *sk, struct msghdr *msg, int len);
21607 extern void ip_icmp_error(struct sock *sk, struct sk_buff *skb, int err,
21608 __be16 port, u32 info, u8 *payload);
21609 extern void ip_local_error(struct sock *sk, int err, __be32 daddr, __be16 dport,
21615 int ipv4_doint_and_flush(ctl_table *ctl, int write,
21616 struct file* filp, void *buffer,
21617 size_t *lenp, loff_t *ppos);
21618 int ipv4_doint_and_flush_strategy(ctl_table *table, int *name, int nlen,
21619 void *oldval, size_t *oldlenp,
21620 void *newval, size_t newlen,
21623 extern int ip_misc_proc_init(void);
21626 extern struct ctl_table ipv4_table[];
21627 # 69 "net/ipv4/ip_output.c" 2
21628 # 1 "include/net/protocol.h" 1
21629 # 36 "include/net/protocol.h"
21630 struct net_protocol {
21631 int (*handler)(struct sk_buff *skb);
21632 void (*err_handler)(struct sk_buff *skb, u32 info);
21633 int (*gso_send_check)(struct sk_buff *skb);
21634 struct sk_buff *(*gso_segment)(struct sk_buff *skb,
21638 # 69 "include/net/protocol.h"
21639 struct inet_protosw {
21640 struct list_head list;
21643 unsigned short type;
21646 struct proto *prot;
21647 const struct proto_ops *ops;
21654 unsigned char flags;
21660 extern struct net_protocol *inet_protocol_base;
21661 extern struct net_protocol *inet_protos[256];
21667 extern int inet_add_protocol(struct net_protocol *prot, unsigned char num);
21668 extern int inet_del_protocol(struct net_protocol *prot, unsigned char num);
21669 extern void inet_register_protosw(struct inet_protosw *p);
21670 extern void inet_unregister_protosw(struct inet_protosw *p);
21671 # 70 "net/ipv4/ip_output.c" 2
21672 # 1 "include/net/route.h" 1
21673 # 28 "include/net/route.h"
21674 # 1 "include/net/inetpeer.h" 1
21675 # 18 "include/net/inetpeer.h"
21679 struct inet_peer *avl_left, *avl_right;
21683 struct inet_peer *unused_next, **unused_prevp;
21689 unsigned long tcp_ts_stamp;
21692 void inet_initpeers(void) __attribute__ ((__section__ (".init.text")));
21695 struct inet_peer *inet_getpeer(__be32 daddr, int create);
21698 extern void inet_putpeer(struct inet_peer *p);
21700 extern spinlock_t inet_peer_idlock;
21702 static inline __attribute__((always_inline)) __u16 inet_getid(struct inet_peer *p, int more)
21706 do { local_bh_disable(); do { do { } while (0); (void)0; (void)(&inet_peer_idlock); } while (0); } while (0);
21707 id = p->ip_id_count;
21708 p->ip_id_count += 1 + more;
21709 do { do { } while (0); local_bh_enable(); (void)0; (void)(&inet_peer_idlock); } while (0);
21712 # 29 "include/net/route.h" 2
21714 # 1 "include/linux/in_route.h" 1
21715 # 31 "include/net/route.h" 2
21717 # 1 "include/linux/route.h" 1
21718 # 30 "include/linux/route.h"
21721 unsigned long rt_pad1;
21722 struct sockaddr rt_dst;
21723 struct sockaddr rt_gateway;
21724 struct sockaddr rt_genmask;
21725 unsigned short rt_flags;
21727 unsigned long rt_pad3;
21731 unsigned long rt_mtu;
21735 unsigned long rt_window;
21736 unsigned short rt_irtt;
21738 # 33 "include/net/route.h" 2
21739 # 49 "include/net/route.h"
21746 struct dst_entry dst;
21747 struct rtable *rt_next;
21750 struct in_device *idev;
21754 __u16 rt_multipath_alg;
21767 __be32 rt_spec_dst;
21768 struct inet_peer *peer;
21779 struct rt_cache_stat
21781 unsigned int in_hit;
21782 unsigned int in_slow_tot;
21783 unsigned int in_slow_mc;
21784 unsigned int in_no_route;
21785 unsigned int in_brd;
21786 unsigned int in_martian_dst;
21787 unsigned int in_martian_src;
21788 unsigned int out_hit;
21789 unsigned int out_slow_tot;
21790 unsigned int out_slow_mc;
21791 unsigned int gc_total;
21792 unsigned int gc_ignored;
21793 unsigned int gc_goal_miss;
21794 unsigned int gc_dst_overflow;
21795 unsigned int in_hlist_search;
21796 unsigned int out_hlist_search;
21799 extern struct ip_rt_acct *ip_rt_acct;
21802 extern int ip_rt_init(void);
21803 extern void ip_rt_redirect(__be32 old_gw, __be32 dst, __be32 new_gw,
21804 __be32 src, struct net_device *dev);
21805 extern void ip_rt_advice(struct rtable **rp, int advice);
21806 extern void rt_cache_flush(int how);
21807 extern int __ip_route_output_key(struct rtable **, const struct flowi *flp);
21808 extern int ip_route_output_key(struct rtable **, struct flowi *flp);
21809 extern int ip_route_output_flow(struct rtable **rp, struct flowi *flp, struct sock *sk, int flags);
21810 extern int ip_route_input(struct sk_buff*, __be32 dst, __be32 src, u8 tos, struct net_device *devin);
21811 extern unsigned short ip_rt_frag_needed(struct iphdr *iph, unsigned short new_mtu);
21812 extern void ip_rt_send_redirect(struct sk_buff *skb);
21814 extern unsigned inet_addr_type(__be32 addr);
21815 extern void ip_rt_multicast_event(struct in_device *);
21816 extern int ip_rt_ioctl(unsigned int cmd, void *arg);
21817 extern void ip_rt_get_source(u8 *src, struct rtable *rt);
21818 extern int ip_rt_dump(struct sk_buff *skb, struct netlink_callback *cb);
21821 extern void fib_add_ifaddr(struct in_ifaddr *);
21823 static inline __attribute__((always_inline)) void ip_rt_put(struct rtable * rt)
21826 dst_release(&rt->u.dst);
21831 extern __u8 ip_tos2prio[16];
21833 static inline __attribute__((always_inline)) char rt_tos2priority(u8 tos)
21835 return ip_tos2prio[((tos)&0x1E)>>1];
21838 static inline __attribute__((always_inline)) int ip_route_connect(struct rtable **rp, __be32 dst,
21839 __be32 src, u32 tos, int oif, u8 protocol,
21840 __be16 sport, __be16 dport, struct sock *sk)
21842 struct flowi fl = { .oif = oif,
21843 .nl_u = { .ip4_u = { .daddr = dst,
21847 .uli_u = { .ports =
21849 .dport = dport } } };
21852 if (!dst || !src) {
21853 err = __ip_route_output_key(rp, &fl);
21856 fl.nl_u.ip4_u.daddr = (*rp)->rt_dst;
21857 fl.nl_u.ip4_u.saddr = (*rp)->rt_src;
21861 security_sk_classify_flow(sk, &fl);
21862 return ip_route_output_flow(rp, &fl, sk, 0);
21865 static inline __attribute__((always_inline)) int ip_route_newports(struct rtable **rp, u8 protocol,
21866 __be16 sport, __be16 dport, struct sock *sk)
21868 if (sport != (*rp)->fl.uli_u.ports.sport ||
21869 dport != (*rp)->fl.uli_u.ports.dport) {
21872 memcpy(&fl, &(*rp)->fl, sizeof(fl));
21873 fl.uli_u.ports.sport = sport;
21874 fl.uli_u.ports.dport = dport;
21875 fl.proto = protocol;
21878 security_sk_classify_flow(sk, &fl);
21879 return ip_route_output_flow(rp, &fl, sk, 0);
21884 extern void rt_bind_peer(struct rtable *rt, int create);
21886 static inline __attribute__((always_inline)) struct inet_peer *rt_get_peer(struct rtable *rt)
21891 rt_bind_peer(rt, 0);
21895 extern ctl_table ipv4_route_table[];
21896 # 71 "net/ipv4/ip_output.c" 2
21897 # 1 "include/net/xfrm.h" 1
21898 # 11 "include/net/xfrm.h"
21899 # 1 "include/linux/pfkeyv2.h" 1
21900 # 14 "include/linux/pfkeyv2.h"
21902 uint8_t sadb_msg_version;
21903 uint8_t sadb_msg_type;
21904 uint8_t sadb_msg_errno;
21905 uint8_t sadb_msg_satype;
21906 uint16_t sadb_msg_len;
21907 uint16_t sadb_msg_reserved;
21908 uint32_t sadb_msg_seq;
21909 uint32_t sadb_msg_pid;
21910 } __attribute__((packed));
21914 uint16_t sadb_ext_len;
21915 uint16_t sadb_ext_type;
21916 } __attribute__((packed));
21920 uint16_t sadb_sa_len;
21921 uint16_t sadb_sa_exttype;
21922 uint32_t sadb_sa_spi;
21923 uint8_t sadb_sa_replay;
21924 uint8_t sadb_sa_state;
21925 uint8_t sadb_sa_auth;
21926 uint8_t sadb_sa_encrypt;
21927 uint32_t sadb_sa_flags;
21928 } __attribute__((packed));
21931 struct sadb_lifetime {
21932 uint16_t sadb_lifetime_len;
21933 uint16_t sadb_lifetime_exttype;
21934 uint32_t sadb_lifetime_allocations;
21935 uint64_t sadb_lifetime_bytes;
21936 uint64_t sadb_lifetime_addtime;
21937 uint64_t sadb_lifetime_usetime;
21938 } __attribute__((packed));
21941 struct sadb_address {
21942 uint16_t sadb_address_len;
21943 uint16_t sadb_address_exttype;
21944 uint8_t sadb_address_proto;
21945 uint8_t sadb_address_prefixlen;
21946 uint16_t sadb_address_reserved;
21947 } __attribute__((packed));
21951 uint16_t sadb_key_len;
21952 uint16_t sadb_key_exttype;
21953 uint16_t sadb_key_bits;
21954 uint16_t sadb_key_reserved;
21955 } __attribute__((packed));
21958 struct sadb_ident {
21959 uint16_t sadb_ident_len;
21960 uint16_t sadb_ident_exttype;
21961 uint16_t sadb_ident_type;
21962 uint16_t sadb_ident_reserved;
21963 uint64_t sadb_ident_id;
21964 } __attribute__((packed));
21968 uint16_t sadb_sens_len;
21969 uint16_t sadb_sens_exttype;
21970 uint32_t sadb_sens_dpd;
21971 uint8_t sadb_sens_sens_level;
21972 uint8_t sadb_sens_sens_len;
21973 uint8_t sadb_sens_integ_level;
21974 uint8_t sadb_sens_integ_len;
21975 uint32_t sadb_sens_reserved;
21976 } __attribute__((packed));
21984 uint16_t sadb_prop_len;
21985 uint16_t sadb_prop_exttype;
21986 uint8_t sadb_prop_replay;
21987 uint8_t sadb_prop_reserved[3];
21988 } __attribute__((packed));
21997 uint8_t sadb_comb_auth;
21998 uint8_t sadb_comb_encrypt;
21999 uint16_t sadb_comb_flags;
22000 uint16_t sadb_comb_auth_minbits;
22001 uint16_t sadb_comb_auth_maxbits;
22002 uint16_t sadb_comb_encrypt_minbits;
22003 uint16_t sadb_comb_encrypt_maxbits;
22004 uint32_t sadb_comb_reserved;
22005 uint32_t sadb_comb_soft_allocations;
22006 uint32_t sadb_comb_hard_allocations;
22007 uint64_t sadb_comb_soft_bytes;
22008 uint64_t sadb_comb_hard_bytes;
22009 uint64_t sadb_comb_soft_addtime;
22010 uint64_t sadb_comb_hard_addtime;
22011 uint64_t sadb_comb_soft_usetime;
22012 uint64_t sadb_comb_hard_usetime;
22013 } __attribute__((packed));
22016 struct sadb_supported {
22017 uint16_t sadb_supported_len;
22018 uint16_t sadb_supported_exttype;
22019 uint32_t sadb_supported_reserved;
22020 } __attribute__((packed));
22029 uint8_t sadb_alg_id;
22030 uint8_t sadb_alg_ivlen;
22031 uint16_t sadb_alg_minbits;
22032 uint16_t sadb_alg_maxbits;
22033 uint16_t sadb_alg_reserved;
22034 } __attribute__((packed));
22037 struct sadb_spirange {
22038 uint16_t sadb_spirange_len;
22039 uint16_t sadb_spirange_exttype;
22040 uint32_t sadb_spirange_min;
22041 uint32_t sadb_spirange_max;
22042 uint32_t sadb_spirange_reserved;
22043 } __attribute__((packed));
22046 struct sadb_x_kmprivate {
22047 uint16_t sadb_x_kmprivate_len;
22048 uint16_t sadb_x_kmprivate_exttype;
22049 uint32_t sadb_x_kmprivate_reserved;
22050 } __attribute__((packed));
22053 struct sadb_x_sa2 {
22054 uint16_t sadb_x_sa2_len;
22055 uint16_t sadb_x_sa2_exttype;
22056 uint8_t sadb_x_sa2_mode;
22057 uint8_t sadb_x_sa2_reserved1;
22058 uint16_t sadb_x_sa2_reserved2;
22059 uint32_t sadb_x_sa2_sequence;
22060 uint32_t sadb_x_sa2_reqid;
22061 } __attribute__((packed));
22064 struct sadb_x_policy {
22065 uint16_t sadb_x_policy_len;
22066 uint16_t sadb_x_policy_exttype;
22067 uint16_t sadb_x_policy_type;
22068 uint8_t sadb_x_policy_dir;
22069 uint8_t sadb_x_policy_reserved;
22070 uint32_t sadb_x_policy_id;
22071 uint32_t sadb_x_policy_priority;
22072 } __attribute__((packed));
22075 struct sadb_x_ipsecrequest {
22076 uint16_t sadb_x_ipsecrequest_len;
22077 uint16_t sadb_x_ipsecrequest_proto;
22078 uint8_t sadb_x_ipsecrequest_mode;
22079 uint8_t sadb_x_ipsecrequest_level;
22080 uint16_t sadb_x_ipsecrequest_reserved1;
22081 uint32_t sadb_x_ipsecrequest_reqid;
22082 uint32_t sadb_x_ipsecrequest_reserved2;
22083 } __attribute__((packed));
22089 struct sadb_x_nat_t_type {
22090 uint16_t sadb_x_nat_t_type_len;
22091 uint16_t sadb_x_nat_t_type_exttype;
22092 uint8_t sadb_x_nat_t_type_type;
22093 uint8_t sadb_x_nat_t_type_reserved[3];
22094 } __attribute__((packed));
22098 struct sadb_x_nat_t_port {
22099 uint16_t sadb_x_nat_t_port_len;
22100 uint16_t sadb_x_nat_t_port_exttype;
22101 uint16_t sadb_x_nat_t_port_port;
22102 uint16_t sadb_x_nat_t_port_reserved;
22103 } __attribute__((packed));
22107 struct sadb_x_sec_ctx {
22108 uint16_t sadb_x_sec_len;
22109 uint16_t sadb_x_sec_exttype;
22110 uint8_t sadb_x_ctx_alg;
22111 uint8_t sadb_x_ctx_doi;
22112 uint16_t sadb_x_ctx_len;
22113 } __attribute__((packed));
22114 # 12 "include/net/xfrm.h" 2
22115 # 1 "include/linux/ipsec.h" 1
22116 # 12 "include/linux/ipsec.h"
22118 IPSEC_MODE_ANY = 0,
22119 IPSEC_MODE_TRANSPORT = 1,
22120 IPSEC_MODE_TUNNEL = 2,
22121 IPSEC_MODE_BEET = 3
22126 IPSEC_DIR_INBOUND = 1,
22127 IPSEC_DIR_OUTBOUND = 2,
22130 IPSEC_DIR_INVALID = 5
22134 IPSEC_POLICY_DISCARD = 0,
22135 IPSEC_POLICY_NONE = 1,
22136 IPSEC_POLICY_IPSEC = 2,
22137 IPSEC_POLICY_ENTRUST = 3,
22138 IPSEC_POLICY_BYPASS = 4
22142 IPSEC_LEVEL_DEFAULT = 0,
22143 IPSEC_LEVEL_USE = 1,
22144 IPSEC_LEVEL_REQUIRE = 2,
22145 IPSEC_LEVEL_UNIQUE = 3
22147 # 13 "include/net/xfrm.h" 2
22154 # 1 "include/net/ipv6.h" 1
22155 # 18 "include/net/ipv6.h"
22156 # 1 "include/linux/ipv6.h" 1
22157 # 18 "include/linux/ipv6.h"
22158 struct in6_pktinfo {
22159 struct in6_addr ipi6_addr;
22165 struct in6_addr ifr6_addr;
22166 __u32 ifr6_prefixlen;
22169 # 37 "include/linux/ipv6.h"
22170 struct ipv6_rt_hdr {
22174 __u8 segments_left;
22183 struct ipv6_opt_hdr {
22190 # 69 "include/linux/ipv6.h"
22192 struct ipv6_rt_hdr rt_hdr;
22194 struct in6_addr addr[0];
22204 struct ipv6_rt_hdr rt_hdr;
22206 struct in6_addr addr;
22215 struct ipv6_destopt_hao {
22218 struct in6_addr addr;
22219 } __attribute__ ((__packed__));
22221 struct ipv6_auth_hdr {
22230 struct ipv6_esp_hdr {
22236 struct ipv6_comp_hdr {
22241 # 127 "include/linux/ipv6.h"
22254 __be16 payload_len;
22258 struct in6_addr saddr;
22259 struct in6_addr daddr;
22265 struct ipv6_devconf {
22270 __s32 accept_redirects;
22272 __s32 dad_transmits;
22273 __s32 rtr_solicits;
22274 __s32 rtr_solicit_interval;
22275 __s32 rtr_solicit_delay;
22276 __s32 force_mld_version;
22284 __s32 max_addresses;
22285 __s32 accept_ra_defrtr;
22286 __s32 accept_ra_pinfo;
22300 DEVCONF_FORWARDING = 0,
22304 DEVCONF_ACCEPT_REDIRECTS,
22306 DEVCONF_DAD_TRANSMITS,
22307 DEVCONF_RTR_SOLICITS,
22308 DEVCONF_RTR_SOLICIT_INTERVAL,
22309 DEVCONF_RTR_SOLICIT_DELAY,
22310 DEVCONF_USE_TEMPADDR,
22311 DEVCONF_TEMP_VALID_LFT,
22312 DEVCONF_TEMP_PREFERED_LFT,
22313 DEVCONF_REGEN_MAX_RETRY,
22314 DEVCONF_MAX_DESYNC_FACTOR,
22315 DEVCONF_MAX_ADDRESSES,
22316 DEVCONF_FORCE_MLD_VERSION,
22317 DEVCONF_ACCEPT_RA_DEFRTR,
22318 DEVCONF_ACCEPT_RA_PINFO,
22319 DEVCONF_ACCEPT_RA_RTR_PREF,
22320 DEVCONF_RTR_PROBE_INTERVAL,
22321 DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN,
22327 # 1 "include/linux/icmpv6.h" 1
22341 __u32 un_data32[1];
22342 __u16 un_data16[2];
22345 struct icmpv6_echo {
22350 struct icmpv6_nd_advt {
22357 # 38 "include/linux/icmpv6.h"
22360 struct icmpv6_nd_ra {
22367 # 56 "include/linux/icmpv6.h"
22372 # 76 "include/linux/icmpv6.h"
22374 # 143 "include/linux/icmpv6.h"
22375 struct icmp6_filter {
22378 # 165 "include/linux/icmpv6.h"
22379 extern void icmpv6_send(struct sk_buff *skb,
22380 int type, int code,
22382 struct net_device *dev);
22384 extern int icmpv6_init(struct net_proto_family *ops);
22385 extern int icmpv6_err_convert(int type, int code,
22387 extern void icmpv6_cleanup(void);
22388 extern void icmpv6_param_prob(struct sk_buff *skb,
22389 int code, int pos);
22390 # 213 "include/linux/ipv6.h" 2
22391 # 1 "include/linux/tcp.h" 1
22392 # 23 "include/linux/tcp.h"
22409 # 53 "include/linux/tcp.h"
22420 union tcp_word_hdr {
22428 TCP_FLAG_CWR = (( __be32)((__u32)( (((__u32)((0x00800000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x00800000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x00800000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x00800000)) & (__u32)0xff000000UL) >> 24) ))),
22429 TCP_FLAG_ECE = (( __be32)((__u32)( (((__u32)((0x00400000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x00400000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x00400000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x00400000)) & (__u32)0xff000000UL) >> 24) ))),
22430 TCP_FLAG_URG = (( __be32)((__u32)( (((__u32)((0x00200000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x00200000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x00200000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x00200000)) & (__u32)0xff000000UL) >> 24) ))),
22431 TCP_FLAG_ACK = (( __be32)((__u32)( (((__u32)((0x00100000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x00100000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x00100000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x00100000)) & (__u32)0xff000000UL) >> 24) ))),
22432 TCP_FLAG_PSH = (( __be32)((__u32)( (((__u32)((0x00080000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x00080000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x00080000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x00080000)) & (__u32)0xff000000UL) >> 24) ))),
22433 TCP_FLAG_RST = (( __be32)((__u32)( (((__u32)((0x00040000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x00040000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x00040000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x00040000)) & (__u32)0xff000000UL) >> 24) ))),
22434 TCP_FLAG_SYN = (( __be32)((__u32)( (((__u32)((0x00020000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x00020000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x00020000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x00020000)) & (__u32)0xff000000UL) >> 24) ))),
22435 TCP_FLAG_FIN = (( __be32)((__u32)( (((__u32)((0x00010000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x00010000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x00010000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x00010000)) & (__u32)0xff000000UL) >> 24) ))),
22436 TCP_RESERVED_BITS = (( __be32)((__u32)( (((__u32)((0x0F000000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x0F000000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x0F000000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x0F000000)) & (__u32)0xff000000UL) >> 24) ))),
22437 TCP_DATA_OFFSET = (( __be32)((__u32)( (((__u32)((0xF0000000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0xF0000000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0xF0000000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0xF0000000)) & (__u32)0xff000000UL) >> 24) )))
22439 # 103 "include/linux/tcp.h"
22444 TCP_CA_Disorder = 1,
22448 TCP_CA_Recovery = 3,
22457 __u8 tcpi_ca_state;
22458 __u8 tcpi_retransmits;
22462 __u8 tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4;
22466 __u32 tcpi_snd_mss;
22467 __u32 tcpi_rcv_mss;
22469 __u32 tcpi_unacked;
22472 __u32 tcpi_retrans;
22473 __u32 tcpi_fackets;
22476 __u32 tcpi_last_data_sent;
22477 __u32 tcpi_last_ack_sent;
22478 __u32 tcpi_last_data_recv;
22479 __u32 tcpi_last_ack_recv;
22483 __u32 tcpi_rcv_ssthresh;
22486 __u32 tcpi_snd_ssthresh;
22487 __u32 tcpi_snd_cwnd;
22489 __u32 tcpi_reordering;
22491 __u32 tcpi_rcv_rtt;
22492 __u32 tcpi_rcv_space;
22494 __u32 tcpi_total_retrans;
22502 # 1 "include/net/inet_connection_sock.h" 1
22503 # 30 "include/net/inet_connection_sock.h"
22504 struct inet_bind_bucket;
22505 struct inet_hashinfo;
22506 struct tcp_congestion_ops;
22512 struct inet_connection_sock_af_ops {
22513 int (*queue_xmit)(struct sk_buff *skb, int ipfragok);
22514 void (*send_check)(struct sock *sk, int len,
22515 struct sk_buff *skb);
22516 int (*rebuild_header)(struct sock *sk);
22517 int (*conn_request)(struct sock *sk, struct sk_buff *skb);
22518 struct sock *(*syn_recv_sock)(struct sock *sk, struct sk_buff *skb,
22519 struct request_sock *req,
22520 struct dst_entry *dst);
22521 int (*remember_stamp)(struct sock *sk);
22522 __u16 net_header_len;
22523 int (*setsockopt)(struct sock *sk, int level, int optname,
22524 char *optval, int optlen);
22525 int (*getsockopt)(struct sock *sk, int level, int optname,
22526 char *optval, int *optlen);
22527 int (*compat_setsockopt)(struct sock *sk,
22528 int level, int optname,
22529 char *optval, int optlen);
22530 int (*compat_getsockopt)(struct sock *sk,
22531 int level, int optname,
22532 char *optval, int *optlen);
22533 void (*addr2sockaddr)(struct sock *sk, struct sockaddr *);
22536 # 83 "include/net/inet_connection_sock.h"
22537 struct inet_connection_sock {
22539 struct inet_sock icsk_inet;
22540 struct request_sock_queue icsk_accept_queue;
22541 struct inet_bind_bucket *icsk_bind_hash;
22542 unsigned long icsk_timeout;
22543 struct timer_list icsk_retransmit_timer;
22544 struct timer_list icsk_delack_timer;
22546 __u32 icsk_pmtu_cookie;
22547 const struct tcp_congestion_ops *icsk_ca_ops;
22548 const struct inet_connection_sock_af_ops *icsk_af_ops;
22549 unsigned int (*icsk_sync_mss)(struct sock *sk, u32 pmtu);
22550 __u8 icsk_ca_state;
22551 __u8 icsk_retransmits;
22554 __u8 icsk_syn_retries;
22555 __u8 icsk_probes_out;
22556 __u16 icsk_ext_hdr_len;
22563 unsigned long timeout;
22565 __u16 last_seg_size;
22578 u32 icsk_ca_priv[16];
22587 static inline __attribute__((always_inline)) struct inet_connection_sock *inet_csk(const struct sock *sk)
22589 return (struct inet_connection_sock *)sk;
22592 static inline __attribute__((always_inline)) void *inet_csk_ca(const struct sock *sk)
22594 return (void *)inet_csk(sk)->icsk_ca_priv;
22597 extern struct sock *inet_csk_clone(struct sock *sk,
22598 const struct request_sock *req,
22599 const gfp_t priority);
22601 enum inet_csk_ack_state_t {
22602 ICSK_ACK_SCHED = 1,
22603 ICSK_ACK_TIMER = 2,
22604 ICSK_ACK_PUSHED = 4,
22605 ICSK_ACK_PUSHED2 = 8
22608 extern void inet_csk_init_xmit_timers(struct sock *sk,
22609 void (*retransmit_handler)(unsigned long),
22610 void (*delack_handler)(unsigned long),
22611 void (*keepalive_handler)(unsigned long));
22612 extern void inet_csk_clear_xmit_timers(struct sock *sk);
22614 static inline __attribute__((always_inline)) void inet_csk_schedule_ack(struct sock *sk)
22616 inet_csk(sk)->icsk_ack.pending |= ICSK_ACK_SCHED;
22619 static inline __attribute__((always_inline)) int inet_csk_ack_scheduled(const struct sock *sk)
22621 return inet_csk(sk)->icsk_ack.pending & ICSK_ACK_SCHED;
22624 static inline __attribute__((always_inline)) void inet_csk_delack_init(struct sock *sk)
22626 memset(&inet_csk(sk)->icsk_ack, 0, sizeof(inet_csk(sk)->icsk_ack));
22629 extern void inet_csk_delete_keepalive_timer(struct sock *sk);
22630 extern void inet_csk_reset_keepalive_timer(struct sock *sk, unsigned long timeout);
22633 extern const char inet_csk_timer_bug_msg[];
22636 static inline __attribute__((always_inline)) void inet_csk_clear_xmit_timer(struct sock *sk, const int what)
22638 struct inet_connection_sock *icsk = inet_csk(sk);
22640 if (what == 1 || what == 3) {
22641 icsk->icsk_pending = 0;
22645 } else if (what == 2) {
22646 icsk->icsk_ack.blocked = icsk->icsk_ack.pending = 0;
22653 pr_debug("%s", inet_csk_timer_bug_msg);
22661 static inline __attribute__((always_inline)) void inet_csk_reset_xmit_timer(struct sock *sk, const int what,
22662 unsigned long when,
22663 const unsigned long max_when)
22665 struct inet_connection_sock *icsk = inet_csk(sk);
22667 if (when > max_when) {
22669 pr_debug("reset_xmit_timer: sk=%p %d when=0x%lx, caller=%p\n",
22670 sk, what, when, ({ __label__ _l; _l: &&_l;}));
22675 if (what == 1 || what == 3) {
22676 icsk->icsk_pending = what;
22677 icsk->icsk_timeout = jiffies + when;
22678 sk_reset_timer(sk, &icsk->icsk_retransmit_timer, icsk->icsk_timeout);
22679 } else if (what == 2) {
22680 icsk->icsk_ack.pending |= ICSK_ACK_TIMER;
22681 icsk->icsk_ack.timeout = jiffies + when;
22682 sk_reset_timer(sk, &icsk->icsk_delack_timer, icsk->icsk_ack.timeout);
22686 pr_debug("%s", inet_csk_timer_bug_msg);
22691 extern struct sock *inet_csk_accept(struct sock *sk, int flags, int *err);
22693 extern struct request_sock *inet_csk_search_req(const struct sock *sk,
22694 struct request_sock ***prevp,
22695 const __be16 rport,
22696 const __be32 raddr,
22697 const __be32 laddr);
22698 extern int inet_csk_bind_conflict(const struct sock *sk,
22699 const struct inet_bind_bucket *tb);
22700 extern int inet_csk_get_port(struct inet_hashinfo *hashinfo,
22701 struct sock *sk, unsigned short snum,
22702 int (*bind_conflict)(const struct sock *sk,
22703 const struct inet_bind_bucket *tb));
22705 extern struct dst_entry* inet_csk_route_req(struct sock *sk,
22706 const struct request_sock *req);
22708 static inline __attribute__((always_inline)) void inet_csk_reqsk_queue_add(struct sock *sk,
22709 struct request_sock *req,
22710 struct sock *child)
22712 reqsk_queue_add(&inet_csk(sk)->icsk_accept_queue, req, sk, child);
22715 extern void inet_csk_reqsk_queue_hash_add(struct sock *sk,
22716 struct request_sock *req,
22717 unsigned long timeout);
22719 static inline __attribute__((always_inline)) void inet_csk_reqsk_queue_removed(struct sock *sk,
22720 struct request_sock *req)
22722 if (reqsk_queue_removed(&inet_csk(sk)->icsk_accept_queue, req) == 0)
22723 inet_csk_delete_keepalive_timer(sk);
22726 static inline __attribute__((always_inline)) void inet_csk_reqsk_queue_added(struct sock *sk,
22727 const unsigned long timeout)
22729 if (reqsk_queue_added(&inet_csk(sk)->icsk_accept_queue) == 0)
22730 inet_csk_reset_keepalive_timer(sk, timeout);
22733 static inline __attribute__((always_inline)) int inet_csk_reqsk_queue_len(const struct sock *sk)
22735 return reqsk_queue_len(&inet_csk(sk)->icsk_accept_queue);
22738 static inline __attribute__((always_inline)) int inet_csk_reqsk_queue_young(const struct sock *sk)
22740 return reqsk_queue_len_young(&inet_csk(sk)->icsk_accept_queue);
22743 static inline __attribute__((always_inline)) int inet_csk_reqsk_queue_is_full(const struct sock *sk)
22745 return reqsk_queue_is_full(&inet_csk(sk)->icsk_accept_queue);
22748 static inline __attribute__((always_inline)) void inet_csk_reqsk_queue_unlink(struct sock *sk,
22749 struct request_sock *req,
22750 struct request_sock **prev)
22752 reqsk_queue_unlink(&inet_csk(sk)->icsk_accept_queue, req, prev);
22755 static inline __attribute__((always_inline)) void inet_csk_reqsk_queue_drop(struct sock *sk,
22756 struct request_sock *req,
22757 struct request_sock **prev)
22759 inet_csk_reqsk_queue_unlink(sk, req, prev);
22760 inet_csk_reqsk_queue_removed(sk, req);
22764 extern void inet_csk_reqsk_queue_prune(struct sock *parent,
22765 const unsigned long interval,
22766 const unsigned long timeout,
22767 const unsigned long max_rto);
22769 extern void inet_csk_destroy_sock(struct sock *sk);
22774 static inline __attribute__((always_inline)) unsigned int inet_csk_listen_poll(const struct sock *sk)
22776 return !reqsk_queue_empty(&inet_csk(sk)->icsk_accept_queue) ?
22780 extern int inet_csk_listen_start(struct sock *sk, const int nr_table_entries);
22781 extern void inet_csk_listen_stop(struct sock *sk);
22783 extern void inet_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr);
22785 extern int inet_csk_ctl_sock_create(struct socket **sock,
22786 unsigned short family,
22787 unsigned short type,
22788 unsigned char protocol);
22790 extern int inet_csk_compat_getsockopt(struct sock *sk, int level, int optname,
22791 char *optval, int *optlen);
22792 extern int inet_csk_compat_setsockopt(struct sock *sk, int level, int optname,
22793 char *optval, int optlen);
22794 # 166 "include/linux/tcp.h" 2
22795 # 1 "include/net/inet_timewait_sock.h" 1
22796 # 27 "include/net/inet_timewait_sock.h"
22797 # 1 "include/net/tcp_states.h" 1
22798 # 16 "include/net/tcp_states.h"
22800 TCP_ESTABLISHED = 1,
22820 TCPF_ESTABLISHED = (1 << 1),
22821 TCPF_SYN_SENT = (1 << 2),
22822 TCPF_SYN_RECV = (1 << 3),
22823 TCPF_FIN_WAIT1 = (1 << 4),
22824 TCPF_FIN_WAIT2 = (1 << 5),
22825 TCPF_TIME_WAIT = (1 << 6),
22826 TCPF_CLOSE = (1 << 7),
22827 TCPF_CLOSE_WAIT = (1 << 8),
22828 TCPF_LAST_ACK = (1 << 9),
22829 TCPF_LISTEN = (1 << 10),
22830 TCPF_CLOSING = (1 << 11)
22832 # 28 "include/net/inet_timewait_sock.h" 2
22833 # 1 "include/net/timewait_sock.h" 1
22834 # 17 "include/net/timewait_sock.h"
22835 struct timewait_sock_ops {
22836 kmem_cache_t *twsk_slab;
22837 unsigned int twsk_obj_size;
22838 int (*twsk_unique)(struct sock *sk,
22839 struct sock *sktw, void *twp);
22840 void (*twsk_destructor)(struct sock *sk);
22843 static inline __attribute__((always_inline)) int twsk_unique(struct sock *sk, struct sock *sktw, void *twp)
22845 if (sk->__sk_common.skc_prot->twsk_prot->twsk_unique != ((void *)0))
22846 return sk->__sk_common.skc_prot->twsk_prot->twsk_unique(sk, sktw, twp);
22850 static inline __attribute__((always_inline)) void twsk_destructor(struct sock *sk)
22852 if (sk->__sk_common.skc_prot->twsk_prot->twsk_destructor != ((void *)0))
22853 sk->__sk_common.skc_prot->twsk_prot->twsk_destructor(sk);
22855 # 29 "include/net/inet_timewait_sock.h" 2
22859 struct inet_hashinfo;
22860 # 66 "include/net/inet_timewait_sock.h"
22861 struct inet_timewait_death_row {
22865 struct timer_list twcal_timer;
22866 struct hlist_head twcal_row[(1 << 5)];
22868 spinlock_t death_lock;
22872 struct work_struct twkill_work;
22873 struct timer_list tw_timer;
22875 struct hlist_head cells[8];
22876 struct inet_hashinfo *hashinfo;
22877 int sysctl_tw_recycle;
22878 int sysctl_max_tw_buckets;
22881 extern void inet_twdr_hangman(unsigned long data);
22882 extern void inet_twdr_twkill_work(void *data);
22883 extern void inet_twdr_twcal_tick(unsigned long data);
22891 struct inet_bind_bucket;
22898 struct inet_timewait_sock {
22903 struct sock_common __tw_common;
22904 # 118 "include/net/inet_timewait_sock.h"
22905 volatile unsigned char tw_substate;
22907 unsigned char tw_rcv_wscale;
22911 __be32 tw_daddr __attribute__((aligned(4)));
22912 __be32 tw_rcv_saddr;
22916 __u8 tw_ipv6only:1;
22918 __u16 tw_ipv6_offset;
22920 unsigned long tw_ttd;
22921 struct inet_bind_bucket *tw_tb;
22922 struct hlist_node tw_death_node;
22925 static inline __attribute__((always_inline)) void inet_twsk_add_node(struct inet_timewait_sock *tw,
22926 struct hlist_head *list)
22928 hlist_add_head(&tw->__tw_common.skc_node, list);
22931 static inline __attribute__((always_inline)) void inet_twsk_add_bind_node(struct inet_timewait_sock *tw,
22932 struct hlist_head *list)
22934 hlist_add_head(&tw->__tw_common.skc_bind_node, list);
22937 static inline __attribute__((always_inline)) int inet_twsk_dead_hashed(const struct inet_timewait_sock *tw)
22939 return !hlist_unhashed(&tw->tw_death_node);
22942 static inline __attribute__((always_inline)) void inet_twsk_dead_node_init(struct inet_timewait_sock *tw)
22944 tw->tw_death_node.pprev = ((void *)0);
22947 static inline __attribute__((always_inline)) void __inet_twsk_del_dead_node(struct inet_timewait_sock *tw)
22949 __hlist_del(&tw->tw_death_node);
22950 inet_twsk_dead_node_init(tw);
22953 static inline __attribute__((always_inline)) int inet_twsk_del_dead_node(struct inet_timewait_sock *tw)
22955 if (inet_twsk_dead_hashed(tw)) {
22956 __inet_twsk_del_dead_node(tw);
22961 # 184 "include/net/inet_timewait_sock.h"
22962 static inline __attribute__((always_inline)) struct inet_timewait_sock *inet_twsk(const struct sock *sk)
22964 return (struct inet_timewait_sock *)sk;
22967 static inline __attribute__((always_inline)) __be32 inet_rcv_saddr(const struct sock *sk)
22969 return __builtin_expect(!!(sk->__sk_common.skc_state != TCP_TIME_WAIT), 1) ?
22970 inet_sk(sk)->rcv_saddr : inet_twsk(sk)->tw_rcv_saddr;
22973 static inline __attribute__((always_inline)) void inet_twsk_put(struct inet_timewait_sock *tw)
22975 if ((atomic_sub_return(1, (&tw->__tw_common.skc_refcnt)) == 0)) {
22976 struct module *owner = tw->__tw_common.skc_prot->owner;
22977 twsk_destructor((struct sock *)tw);
22982 kmem_cache_free(tw->__tw_common.skc_prot->twsk_prot->twsk_slab, tw);
22987 extern struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk,
22990 extern void __inet_twsk_kill(struct inet_timewait_sock *tw,
22991 struct inet_hashinfo *hashinfo);
22993 extern void __inet_twsk_hashdance(struct inet_timewait_sock *tw,
22995 struct inet_hashinfo *hashinfo);
22997 extern void inet_twsk_schedule(struct inet_timewait_sock *tw,
22998 struct inet_timewait_death_row *twdr,
22999 const int timeo, const int timewait_len);
23000 extern void inet_twsk_deschedule(struct inet_timewait_sock *tw,
23001 struct inet_timewait_death_row *twdr);
23002 # 167 "include/linux/tcp.h" 2
23005 struct tcp_sack_block_wire {
23010 struct tcp_sack_block {
23015 struct tcp_options_received {
23017 long ts_recent_stamp;
23021 __u16 saw_tstamp : 1,
23035 struct tcp_request_sock {
23036 struct inet_request_sock req;
23041 static inline __attribute__((always_inline)) struct tcp_request_sock *tcp_rsk(const struct request_sock *req)
23043 return (struct tcp_request_sock *)req;
23048 struct inet_connection_sock inet_conn;
23049 int tcp_header_len;
23072 struct sk_buff_head prequeue;
23073 struct task_struct *task;
23090 __u16 xmit_size_goal;
23093 __u32 window_clamp;
23094 __u32 rcv_ssthresh;
23096 __u32 frto_highmark;
23100 __u8 keepalive_probes;
23115 struct tcp_options_received rx_opt;
23120 __u32 snd_ssthresh;
23122 __u16 snd_cwnd_cnt;
23123 __u16 snd_cwnd_clamp;
23124 __u32 snd_cwnd_used;
23125 __u32 snd_cwnd_stamp;
23127 struct sk_buff_head out_of_order_queue;
23136 struct tcp_sack_block duplicate_sack[1];
23137 struct tcp_sack_block selective_acks[4];
23139 struct tcp_sack_block recv_sack_cache[4];
23142 struct sk_buff* lost_skb_hint;
23144 struct sk_buff *scoreboard_skb_hint;
23145 struct sk_buff *retransmit_skb_hint;
23146 struct sk_buff *forward_skb_hint;
23147 struct sk_buff *fastpath_skb_hint;
23149 int fastpath_cnt_hint;
23151 int retransmit_cnt_hint;
23152 int forward_cnt_hint;
23155 __u16 prior_ssthresh;
23161 __u32 retrans_stamp;
23172 __u32 total_retrans;
23175 unsigned int keepalive_time;
23176 unsigned int keepalive_intvl;
23179 unsigned long last_synq_overflow;
23181 __u32 tso_deferred;
23199 __u32 probe_seq_start;
23200 __u32 probe_seq_end;
23204 static inline __attribute__((always_inline)) struct tcp_sock *tcp_sk(const struct sock *sk)
23206 return (struct tcp_sock *)sk;
23209 struct tcp_timewait_sock {
23210 struct inet_timewait_sock tw_sk;
23214 __u32 tw_ts_recent;
23215 long tw_ts_recent_stamp;
23218 static inline __attribute__((always_inline)) struct tcp_timewait_sock *tcp_twsk(const struct sock *sk)
23220 return (struct tcp_timewait_sock *)sk;
23222 # 214 "include/linux/ipv6.h" 2
23223 # 1 "include/linux/udp.h" 1
23224 # 22 "include/linux/udp.h"
23231 # 42 "include/linux/udp.h"
23234 struct inet_sock inet;
23236 unsigned int corkflag;
23245 static inline __attribute__((always_inline)) struct udp_sock *udp_sk(const struct sock *sk)
23247 return (struct udp_sock *)sk;
23249 # 215 "include/linux/ipv6.h" 2
23251 # 1 "include/net/if_inet6.h" 1
23252 # 19 "include/net/if_inet6.h"
23253 # 1 "include/linux/ipv6.h" 1
23254 # 20 "include/net/if_inet6.h" 2
23255 # 35 "include/net/if_inet6.h"
23256 struct inet6_ifaddr
23258 struct in6_addr addr;
23262 __u32 prefered_lft;
23263 unsigned long cstamp;
23264 unsigned long tstamp;
23273 struct timer_list timer;
23275 struct inet6_dev *idev;
23276 struct rt6_info *rt;
23278 struct inet6_ifaddr *lst_next;
23279 struct inet6_ifaddr *if_next;
23290 struct ip6_sf_socklist
23292 unsigned int sl_max;
23293 unsigned int sl_count;
23294 struct in6_addr sl_addr[0];
23302 struct ipv6_mc_socklist
23304 struct in6_addr addr;
23306 struct ipv6_mc_socklist *next;
23308 unsigned int sfmode;
23309 struct ip6_sf_socklist *sflist;
23314 struct ip6_sf_list *sf_next;
23315 struct in6_addr sf_addr;
23316 unsigned long sf_count[2];
23317 unsigned char sf_gsresp;
23318 unsigned char sf_oldin;
23319 unsigned char sf_crcount;
23330 struct in6_addr mca_addr;
23331 struct inet6_dev *idev;
23332 struct ifmcaddr6 *next;
23333 struct ip6_sf_list *mca_sources;
23334 struct ip6_sf_list *mca_tomb;
23335 unsigned int mca_sfmode;
23336 unsigned long mca_sfcount[2];
23337 struct timer_list mca_timer;
23338 unsigned mca_flags;
23340 atomic_t mca_refcnt;
23341 spinlock_t mca_lock;
23342 unsigned char mca_crcount;
23343 unsigned long mca_cstamp;
23344 unsigned long mca_tstamp;
23349 struct ipv6_ac_socklist
23351 struct in6_addr acl_addr;
23353 struct ipv6_ac_socklist *acl_next;
23358 struct in6_addr aca_addr;
23359 struct inet6_dev *aca_idev;
23360 struct rt6_info *aca_rt;
23361 struct ifacaddr6 *aca_next;
23363 atomic_t aca_refcnt;
23364 spinlock_t aca_lock;
23365 unsigned long aca_cstamp;
23366 unsigned long aca_tstamp;
23374 struct ipv6_devstat {
23375 struct proc_dir_entry *proc_dir_entry;
23376 __typeof__(struct icmpv6_mib) *icmpv6[2];
23381 struct net_device *dev;
23383 struct inet6_ifaddr *addr_list;
23385 struct ifmcaddr6 *mc_list;
23386 struct ifmcaddr6 *mc_tomb;
23388 unsigned long mc_v1_seen;
23389 unsigned long mc_maxdelay;
23390 unsigned char mc_qrv;
23391 unsigned char mc_gq_running;
23392 unsigned char mc_ifc_count;
23393 struct timer_list mc_gq_timer;
23394 struct timer_list mc_ifc_timer;
23396 struct ifacaddr6 *ac_list;
23408 struct neigh_parms *nd_parms;
23409 struct inet6_dev *next;
23410 struct ipv6_devconf cnf;
23411 struct ipv6_devstat stats;
23412 unsigned long tstamp;
23413 struct rcu_head rcu;
23416 extern struct ipv6_devconf ipv6_devconf;
23418 static inline __attribute__((always_inline)) void ipv6_eth_mc_map(struct in6_addr *addr, char *buf)
23429 memcpy(buf + 2, &addr->in6_u.u6_addr32[3], sizeof(__u32));
23432 static inline __attribute__((always_inline)) void ipv6_tr_mc_map(struct in6_addr *addr, char *buf)
23436 if (((addr->in6_u.u6_addr8[0] == 0xFF) &&
23437 ((addr->in6_u.u6_addr8[1] == 0x01) || (addr->in6_u.u6_addr8[1] == 0x02)) &&
23438 (addr->in6_u.u6_addr16[1] == 0) &&
23439 (addr->in6_u.u6_addr32[1] == 0) &&
23440 (addr->in6_u.u6_addr32[2] == 0) &&
23441 (addr->in6_u.u6_addr16[6] == 0) &&
23442 (addr->in6_u.u6_addr8[15] == 1)) ||
23443 ((addr->in6_u.u6_addr8[0] == 0xFF) &&
23444 (addr->in6_u.u6_addr8[1] == 0x02) &&
23445 (addr->in6_u.u6_addr16[1] == 0) &&
23446 (addr->in6_u.u6_addr32[1] == 0) &&
23447 (addr->in6_u.u6_addr16[4] == 0) &&
23448 (addr->in6_u.u6_addr8[10] == 0) &&
23449 (addr->in6_u.u6_addr8[11] == 1) &&
23450 (addr->in6_u.u6_addr8[12] == 0xff)))
23459 } else if ((addr->in6_u.u6_addr8[0] ==0xff) &&
23460 ((addr->in6_u.u6_addr8[1] & 0xF0) == 0) &&
23461 (addr->in6_u.u6_addr16[1] == 0) &&
23462 (addr->in6_u.u6_addr32[1] == 0) &&
23463 (addr->in6_u.u6_addr32[2] == 0) &&
23464 (addr->in6_u.u6_addr16[6] == 0) &&
23465 (addr->in6_u.u6_addr8[15] == 2))
23476 i = addr->in6_u.u6_addr8[15] & 7 ;
23486 static inline __attribute__((always_inline)) void ipv6_arcnet_mc_map(const struct in6_addr *addr, char *buf)
23491 static inline __attribute__((always_inline)) void ipv6_ib_mc_map(struct in6_addr *addr, char *buf)
23503 memcpy(buf + 10, addr->in6_u.u6_addr8 + 6, 10);
23505 # 217 "include/linux/ipv6.h" 2
23513 struct inet6_skb_parm {
23532 static inline __attribute__((always_inline)) int inet6_iif(const struct sk_buff *skb)
23534 return ((struct inet6_skb_parm*)((skb)->cb))->iif;
23537 struct inet6_request_sock {
23538 struct in6_addr loc_addr;
23539 struct in6_addr rmt_addr;
23540 struct sk_buff *pktopts;
23544 struct tcp6_request_sock {
23545 struct tcp_request_sock tcp6rsk_tcp;
23546 struct inet6_request_sock tcp6rsk_inet6;
23548 # 268 "include/linux/ipv6.h"
23549 struct ipv6_pinfo {
23550 struct in6_addr saddr;
23551 struct in6_addr rcv_saddr;
23552 struct in6_addr daddr;
23553 struct in6_addr *daddr_cache;
23593 struct ipv6_mc_socklist *ipv6_mc_list;
23594 struct ipv6_ac_socklist *ipv6_ac_list;
23595 struct ipv6_fl_socklist *ipv6_fl_list;
23597 struct ipv6_txoptions *opt;
23598 struct sk_buff *pktoptions;
23600 struct ipv6_txoptions *opt;
23601 struct rt6_info *rt;
23610 struct inet_sock inet;
23613 struct icmp6_filter filter;
23615 struct ipv6_pinfo inet6;
23619 struct udp_sock udp;
23621 struct ipv6_pinfo inet6;
23625 struct tcp_sock tcp;
23627 struct ipv6_pinfo inet6;
23630 extern int inet6_sk_rebuild_header(struct sock *sk);
23631 # 440 "include/linux/ipv6.h"
23632 static inline __attribute__((always_inline)) struct ipv6_pinfo * inet6_sk(const struct sock *__sk)
23634 return ((void *)0);
23637 static inline __attribute__((always_inline)) struct inet6_request_sock *
23638 inet6_rsk(const struct request_sock *rsk)
23640 return ((void *)0);
23643 static inline __attribute__((always_inline)) struct raw6_sock *raw6_sk(const struct sock *sk)
23645 return ((void *)0);
23647 # 19 "include/net/ipv6.h" 2
23649 # 1 "include/net/ndisc.h" 1
23650 # 18 "include/net/ndisc.h"
23652 __ND_OPT_PREFIX_INFO_END = 0,
23653 ND_OPT_SOURCE_LL_ADDR = 1,
23654 ND_OPT_TARGET_LL_ADDR = 2,
23655 ND_OPT_PREFIX_INFO = 3,
23656 ND_OPT_REDIRECT_HDR = 4,
23658 __ND_OPT_ARRAY_MAX,
23659 ND_OPT_ROUTE_INFO = 24,
23662 # 47 "include/net/ndisc.h"
23667 struct net_proto_family;
23670 extern struct neigh_table nd_tbl;
23673 struct icmp6hdr icmph;
23674 struct in6_addr target;
23679 struct icmp6hdr icmph;
23684 struct icmp6hdr icmph;
23685 __u32 reachable_time;
23686 __u32 retrans_timer;
23689 struct nd_opt_hdr {
23692 } __attribute__((__packed__));
23695 extern int ndisc_init(struct net_proto_family *ops);
23697 extern void ndisc_cleanup(void);
23699 extern int ndisc_rcv(struct sk_buff *skb);
23701 extern void ndisc_send_ns(struct net_device *dev,
23702 struct neighbour *neigh,
23703 struct in6_addr *solicit,
23704 struct in6_addr *daddr,
23705 struct in6_addr *saddr);
23707 extern void ndisc_send_rs(struct net_device *dev,
23708 struct in6_addr *saddr,
23709 struct in6_addr *daddr);
23711 extern void ndisc_forwarding_on(void);
23712 extern void ndisc_forwarding_off(void);
23714 extern void ndisc_send_redirect(struct sk_buff *skb,
23715 struct neighbour *neigh,
23716 struct in6_addr *target);
23718 extern int ndisc_mc_map(struct in6_addr *addr, char *buf, struct net_device *dev, int dir);
23721 struct rt6_info * dflt_rt_lookup(void);
23726 extern int igmp6_init(struct net_proto_family *ops);
23728 extern void igmp6_cleanup(void);
23730 extern int igmp6_event_query(struct sk_buff *skb);
23732 extern int igmp6_event_report(struct sk_buff *skb);
23734 extern void igmp6_cleanup(void);
23737 extern int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl,
23739 struct file * filp,
23745 extern void inet6_ifinfo_notify(int event,
23746 struct inet6_dev *idev);
23748 static inline __attribute__((always_inline)) struct neighbour * ndisc_get_neigh(struct net_device *dev, struct in6_addr *addr)
23752 return __neigh_lookup(&nd_tbl, addr, dev, 1);
23754 return ((void *)0);
23756 # 21 "include/net/ipv6.h" 2
23757 # 97 "include/net/ipv6.h"
23759 unsigned char nexthdr;
23760 unsigned char reserved;
23761 unsigned short frag_off;
23762 __u32 identification;
23764 # 111 "include/net/ipv6.h"
23765 extern int sysctl_ipv6_bindv6only;
23766 extern int sysctl_mld_max_msf;
23769 extern __typeof__(struct ipstats_mib) *ipv6_statistics[2];
23773 extern __typeof__(struct icmpv6_mib) *icmpv6_statistics[2];
23774 # 145 "include/net/ipv6.h"
23775 extern __typeof__(struct udp_mib) *udp_stats_in6[2];
23780 int snmp6_register_dev(struct inet6_dev *idev);
23781 int snmp6_unregister_dev(struct inet6_dev *idev);
23782 int snmp6_alloc_dev(struct inet6_dev *idev);
23783 int snmp6_free_dev(struct inet6_dev *idev);
23784 int snmp6_mib_init(void *ptr[2], size_t mibsize, size_t mibalign);
23785 void snmp6_mib_free(void *ptr[2]);
23787 struct ip6_ra_chain
23789 struct ip6_ra_chain *next;
23792 void (*destructor)(struct sock *);
23795 extern struct ip6_ra_chain *ip6_ra_chain;
23796 extern rwlock_t ip6_ra_lock;
23803 struct ipv6_txoptions
23813 struct ipv6_opt_hdr *hopopt;
23814 struct ipv6_opt_hdr *dst0opt;
23815 struct ipv6_rt_hdr *srcrt;
23816 struct ipv6_opt_hdr *dst1opt;
23821 struct ip6_flowlabel
23823 struct ip6_flowlabel *next;
23825 struct in6_addr dst;
23826 struct ipv6_txoptions *opt;
23828 unsigned long linger;
23831 unsigned long lastuse;
23832 unsigned long expires;
23838 struct ipv6_fl_socklist
23840 struct ipv6_fl_socklist *next;
23841 struct ip6_flowlabel *fl;
23844 extern struct ip6_flowlabel *fl6_sock_lookup(struct sock *sk, u32 label);
23845 extern struct ipv6_txoptions *fl6_merge_options(struct ipv6_txoptions * opt_space,
23846 struct ip6_flowlabel * fl,
23847 struct ipv6_txoptions * fopt);
23848 extern void fl6_free_socklist(struct sock *sk);
23849 extern int ipv6_flowlabel_opt(struct sock *sk, char *optval, int optlen);
23850 extern void ip6_flowlabel_init(void);
23851 extern void ip6_flowlabel_cleanup(void);
23853 static inline __attribute__((always_inline)) void fl6_sock_release(struct ip6_flowlabel *fl)
23856 atomic_dec(&fl->users);
23859 extern int ip6_ra_control(struct sock *sk, int sel,
23860 void (*destructor)(struct sock *));
23863 extern int ipv6_parse_hopopts(struct sk_buff **skbp);
23865 extern struct ipv6_txoptions * ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt);
23866 extern struct ipv6_txoptions * ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt,
23868 struct ipv6_opt_hdr *newopt,
23870 struct ipv6_txoptions *ipv6_fixup_options(struct ipv6_txoptions *opt_space,
23871 struct ipv6_txoptions *opt);
23873 extern int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb);
23875 extern int ip6_frag_nqueues;
23876 extern atomic_t ip6_frag_mem;
23884 typedef int (*inet_getfrag_t) (const void *data,
23885 struct in6_addr *addr,
23887 unsigned int, unsigned int);
23889 extern int __ipv6_addr_type(const struct in6_addr *addr);
23890 static inline __attribute__((always_inline)) int ipv6_addr_type(const struct in6_addr *addr)
23892 return __ipv6_addr_type(addr) & 0xffff;
23895 static inline __attribute__((always_inline)) int ipv6_addr_scope(const struct in6_addr *addr)
23897 return __ipv6_addr_type(addr) & 0x00f0U;
23900 static inline __attribute__((always_inline)) int __ipv6_addr_src_scope(int type)
23902 return (type == 0x0000U ? -1 : (type >> 16));
23905 static inline __attribute__((always_inline)) int ipv6_addr_src_scope(const struct in6_addr *addr)
23907 return __ipv6_addr_src_scope(__ipv6_addr_type(addr));
23910 static inline __attribute__((always_inline)) int ipv6_addr_cmp(const struct in6_addr *a1, const struct in6_addr *a2)
23912 return memcmp((const void *) a1, (const void *) a2, sizeof(struct in6_addr));
23915 static inline __attribute__((always_inline)) int
23916 ipv6_masked_addr_cmp(const struct in6_addr *a1, const struct in6_addr *m,
23917 const struct in6_addr *a2)
23921 for (i = 0; i < 4; i++)
23922 if ((a1->in6_u.u6_addr32[i] ^ a2->in6_u.u6_addr32[i]) & m->in6_u.u6_addr32[i])
23927 static inline __attribute__((always_inline)) void ipv6_addr_copy(struct in6_addr *a1, const struct in6_addr *a2)
23929 memcpy((void *) a1, (const void *) a2, sizeof(struct in6_addr));
23932 static inline __attribute__((always_inline)) void ipv6_addr_prefix(struct in6_addr *pfx,
23933 const struct in6_addr *addr,
23940 memcpy(pfx->in6_u.u6_addr8, addr, o);
23942 pfx->in6_u.u6_addr8[o] = addr->in6_u.u6_addr8[o] & (0xff00 >> b);
23946 memset(pfx->in6_u.u6_addr8 + o, 0, 16 - o);
23950 static inline __attribute__((always_inline)) void ipv6_addr_set(struct in6_addr *addr,
23951 __be32 w1, __be32 w2,
23952 __be32 w3, __be32 w4)
23954 addr->in6_u.u6_addr32[0] = w1;
23955 addr->in6_u.u6_addr32[1] = w2;
23956 addr->in6_u.u6_addr32[2] = w3;
23957 addr->in6_u.u6_addr32[3] = w4;
23961 static inline __attribute__((always_inline)) int ipv6_addr_equal(const struct in6_addr *a1,
23962 const struct in6_addr *a2)
23964 return (a1->in6_u.u6_addr32[0] == a2->in6_u.u6_addr32[0] &&
23965 a1->in6_u.u6_addr32[1] == a2->in6_u.u6_addr32[1] &&
23966 a1->in6_u.u6_addr32[2] == a2->in6_u.u6_addr32[2] &&
23967 a1->in6_u.u6_addr32[3] == a2->in6_u.u6_addr32[3]);
23970 static inline __attribute__((always_inline)) int __ipv6_prefix_equal(const __be32 *a1, const __be32 *a2,
23971 unsigned int prefixlen)
23976 pdw = prefixlen >> 5;
23977 if (pdw && memcmp(a1, a2, pdw << 2))
23981 pbi = prefixlen & 0x1f;
23982 if (pbi && ((a1[pdw] ^ a2[pdw]) & htonl((0xffffffff) << (32 - pbi))))
23988 static inline __attribute__((always_inline)) int ipv6_prefix_equal(const struct in6_addr *a1,
23989 const struct in6_addr *a2,
23990 unsigned int prefixlen)
23992 return __ipv6_prefix_equal(a1->in6_u.u6_addr32, a2->in6_u.u6_addr32,
23996 static inline __attribute__((always_inline)) int ipv6_addr_any(const struct in6_addr *a)
23998 return ((a->in6_u.u6_addr32[0] | a->in6_u.u6_addr32[1] |
23999 a->in6_u.u6_addr32[2] | a->in6_u.u6_addr32[3] ) == 0);
24006 static inline __attribute__((always_inline)) int __ipv6_addr_diff(const void *token1, const void *token2, int addrlen)
24008 const __u32 *a1 = token1, *a2 = token2;
24013 for (i = 0; i < addrlen; i++) {
24014 __u32 xb = a1[i] ^ a2[i];
24019 while ((xb & (1 << j)) == 0)
24022 return (i * 32 + 31 - j);
24025 # 412 "include/net/ipv6.h"
24026 return (addrlen << 5);
24029 static inline __attribute__((always_inline)) int ipv6_addr_diff(const struct in6_addr *a1, const struct in6_addr *a2)
24031 return __ipv6_addr_diff(a1, a2, sizeof(struct in6_addr));
24033 # 428 "include/net/ipv6.h"
24034 extern int ipv6_rcv(struct sk_buff *skb,
24035 struct net_device *dev,
24036 struct packet_type *pt,
24037 struct net_device *orig_dev);
24039 extern int ip6_rcv_finish(struct sk_buff *skb);
24044 extern int ip6_xmit(struct sock *sk,
24045 struct sk_buff *skb,
24047 struct ipv6_txoptions *opt,
24050 extern int ip6_nd_hdr(struct sock *sk,
24051 struct sk_buff *skb,
24052 struct net_device *dev,
24053 struct in6_addr *saddr,
24054 struct in6_addr *daddr,
24055 int proto, int len);
24057 extern int ip6_find_1stfragopt(struct sk_buff *skb, u8 **nexthdr);
24059 extern int ip6_append_data(struct sock *sk,
24060 int getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb),
24066 struct ipv6_txoptions *opt,
24068 struct rt6_info *rt,
24069 unsigned int flags);
24071 extern int ip6_push_pending_frames(struct sock *sk);
24073 extern void ip6_flush_pending_frames(struct sock *sk);
24075 extern int ip6_dst_lookup(struct sock *sk,
24076 struct dst_entry **dst,
24078 extern int ip6_sk_dst_lookup(struct sock *sk,
24079 struct dst_entry **dst,
24086 extern int ip6_output(struct sk_buff *skb);
24087 extern int ip6_forward(struct sk_buff *skb);
24088 extern int ip6_input(struct sk_buff *skb);
24089 extern int ip6_mc_input(struct sk_buff *skb);
24095 extern u8 * ipv6_build_nfrag_opts(struct sk_buff *skb,
24097 struct ipv6_txoptions *opt,
24098 struct in6_addr *daddr,
24100 extern u8 * ipv6_build_frag_opts(struct sk_buff *skb,
24102 struct ipv6_txoptions *opt);
24103 extern void ipv6_push_nfrag_opts(struct sk_buff *skb,
24104 struct ipv6_txoptions *opt,
24106 struct in6_addr **daddr_p);
24107 extern void ipv6_push_frag_opts(struct sk_buff *skb,
24108 struct ipv6_txoptions *opt,
24111 extern int ipv6_skip_exthdr(const struct sk_buff *, int start,
24114 extern int ipv6_ext_hdr(u8 nexthdr);
24116 extern int ipv6_find_tlv(struct sk_buff *skb, int offset, int type);
24118 extern struct ipv6_txoptions * ipv6_invert_rthdr(struct sock *sk,
24119 struct ipv6_rt_hdr *hdr);
24126 extern int ipv6_setsockopt(struct sock *sk, int level,
24130 extern int ipv6_getsockopt(struct sock *sk, int level,
24134 extern int compat_ipv6_setsockopt(struct sock *sk,
24139 extern int compat_ipv6_getsockopt(struct sock *sk,
24145 extern void ipv6_packet_init(void);
24147 extern void ipv6_packet_cleanup(void);
24149 extern int ip6_datagram_connect(struct sock *sk,
24150 struct sockaddr *addr, int addr_len);
24152 extern int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len);
24153 extern void ipv6_icmp_error(struct sock *sk, struct sk_buff *skb, int err, u16 port,
24154 u32 info, u8 *payload);
24155 extern void ipv6_local_error(struct sock *sk, int err, struct flowi *fl, u32 info);
24157 extern int inet6_release(struct socket *sock);
24158 extern int inet6_bind(struct socket *sock, struct sockaddr *uaddr,
24160 extern int inet6_getname(struct socket *sock, struct sockaddr *uaddr,
24161 int *uaddr_len, int peer);
24162 extern int inet6_ioctl(struct socket *sock, unsigned int cmd,
24163 unsigned long arg);
24165 extern int inet6_hash_connect(struct inet_timewait_death_row *death_row,
24171 extern int sysctl_ip6frag_high_thresh;
24172 extern int sysctl_ip6frag_low_thresh;
24173 extern int sysctl_ip6frag_time;
24174 extern int sysctl_ip6frag_secret_interval;
24176 extern const struct proto_ops inet6_stream_ops;
24177 extern const struct proto_ops inet6_dgram_ops;
24179 struct group_source_req;
24180 struct group_filter;
24182 extern int ip6_mc_source(int add, int omode, struct sock *sk,
24183 struct group_source_req *pgsr);
24184 extern int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf);
24185 extern int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf,
24186 struct group_filter *optval,
24190 extern int ac6_proc_init(void);
24191 extern void ac6_proc_exit(void);
24192 extern int raw6_proc_init(void);
24193 extern void raw6_proc_exit(void);
24194 extern int tcp6_proc_init(void);
24195 extern void tcp6_proc_exit(void);
24196 extern int udp6_proc_init(void);
24197 extern void udp6_proc_exit(void);
24198 extern int ipv6_misc_proc_init(void);
24199 extern void ipv6_misc_proc_exit(void);
24201 extern struct rt6_statistics rt6_stats;
24205 extern ctl_table ipv6_route_table[];
24206 extern ctl_table ipv6_icmp_table[];
24208 extern void ipv6_sysctl_register(void);
24209 extern void ipv6_sysctl_unregister(void);
24210 # 20 "include/net/xfrm.h" 2
24211 # 1 "include/net/ip6_fib.h" 1
24212 # 18 "include/net/ip6_fib.h"
24213 # 1 "include/linux/ipv6_route.h" 1
24214 # 42 "include/linux/ipv6_route.h"
24216 struct in6_addr rtmsg_dst;
24217 struct in6_addr rtmsg_src;
24218 struct in6_addr rtmsg_gateway;
24220 __u16 rtmsg_dst_len;
24221 __u16 rtmsg_src_len;
24222 __u32 rtmsg_metric;
24223 unsigned long rtmsg_info;
24227 # 19 "include/net/ip6_fib.h" 2
24232 # 1 "include/net/netlink.h" 1
24233 # 162 "include/net/netlink.h"
24247 # 199 "include/net/netlink.h"
24248 struct nla_policy {
24259 struct nlmsghdr *nlh;
24263 extern void netlink_run_queue(struct sock *sk, unsigned int *qlen,
24264 int (*cb)(struct sk_buff *,
24265 struct nlmsghdr *, int *));
24266 extern void netlink_queue_skip(struct nlmsghdr *nlh,
24267 struct sk_buff *skb);
24268 extern int nlmsg_notify(struct sock *sk, struct sk_buff *skb,
24269 u32 pid, unsigned int group, int report,
24272 extern int nla_validate(struct nlattr *head, int len, int maxtype,
24273 struct nla_policy *policy);
24274 extern int nla_parse(struct nlattr *tb[], int maxtype,
24275 struct nlattr *head, int len,
24276 struct nla_policy *policy);
24277 extern struct nlattr * nla_find(struct nlattr *head, int len, int attrtype);
24278 extern size_t nla_strlcpy(char *dst, const struct nlattr *nla,
24280 extern int nla_memcpy(void *dest, struct nlattr *src, int count);
24281 extern int nla_memcmp(const struct nlattr *nla, const void *data,
24283 extern int nla_strcmp(const struct nlattr *nla, const char *str);
24284 extern struct nlattr * __nla_reserve(struct sk_buff *skb, int attrtype,
24286 extern void * __nla_reserve_nohdr(struct sk_buff *skb, int attrlen);
24287 extern struct nlattr * nla_reserve(struct sk_buff *skb, int attrtype,
24289 extern void * nla_reserve_nohdr(struct sk_buff *skb, int attrlen);
24290 extern void __nla_put(struct sk_buff *skb, int attrtype,
24291 int attrlen, const void *data);
24292 extern void __nla_put_nohdr(struct sk_buff *skb, int attrlen,
24294 extern int nla_put(struct sk_buff *skb, int attrtype,
24295 int attrlen, const void *data);
24296 extern int nla_put_nohdr(struct sk_buff *skb, int attrlen,
24298 # 258 "include/net/netlink.h"
24299 static inline __attribute__((always_inline)) int nlmsg_msg_size(int payload)
24301 return ((int) ( ((sizeof(struct nlmsghdr))+4 -1) & ~(4 -1) )) + payload;
24308 static inline __attribute__((always_inline)) int nlmsg_total_size(int payload)
24310 return ( ((nlmsg_msg_size(payload))+4 -1) & ~(4 -1) );
24317 static inline __attribute__((always_inline)) int nlmsg_padlen(int payload)
24319 return nlmsg_total_size(payload) - nlmsg_msg_size(payload);
24326 static inline __attribute__((always_inline)) void *nlmsg_data(const struct nlmsghdr *nlh)
24328 return (unsigned char *) nlh + ((int) ( ((sizeof(struct nlmsghdr))+4 -1) & ~(4 -1) ));
24335 static inline __attribute__((always_inline)) int nlmsg_len(const struct nlmsghdr *nlh)
24337 return nlh->nlmsg_len - ((int) ( ((sizeof(struct nlmsghdr))+4 -1) & ~(4 -1) ));
24345 static inline __attribute__((always_inline)) struct nlattr *nlmsg_attrdata(const struct nlmsghdr *nlh,
24348 unsigned char *data = nlmsg_data(nlh);
24349 return (struct nlattr *) (data + ( ((hdrlen)+4 -1) & ~(4 -1) ));
24357 static inline __attribute__((always_inline)) int nlmsg_attrlen(const struct nlmsghdr *nlh, int hdrlen)
24359 return nlmsg_len(nlh) - ( ((hdrlen)+4 -1) & ~(4 -1) );
24367 static inline __attribute__((always_inline)) int nlmsg_ok(const struct nlmsghdr *nlh, int remaining)
24369 return (remaining >= sizeof(struct nlmsghdr) &&
24370 nlh->nlmsg_len >= sizeof(struct nlmsghdr) &&
24371 nlh->nlmsg_len <= remaining);
24373 # 341 "include/net/netlink.h"
24374 static inline __attribute__((always_inline)) struct nlmsghdr *nlmsg_next(struct nlmsghdr *nlh, int *remaining)
24376 int totlen = ( ((nlh->nlmsg_len)+4 -1) & ~(4 -1) );
24378 *remaining -= totlen;
24380 return (struct nlmsghdr *) ((unsigned char *) nlh + totlen);
24382 # 360 "include/net/netlink.h"
24383 static inline __attribute__((always_inline)) int nlmsg_parse(struct nlmsghdr *nlh, int hdrlen,
24384 struct nlattr *tb[], int maxtype,
24385 struct nla_policy *policy)
24387 if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
24390 return nla_parse(tb, maxtype, nlmsg_attrdata(nlh, hdrlen),
24391 nlmsg_attrlen(nlh, hdrlen), policy);
24393 # 379 "include/net/netlink.h"
24394 static inline __attribute__((always_inline)) struct nlattr *nlmsg_find_attr(struct nlmsghdr *nlh,
24395 int hdrlen, int attrtype)
24397 return nla_find(nlmsg_attrdata(nlh, hdrlen),
24398 nlmsg_attrlen(nlh, hdrlen), attrtype);
24400 # 393 "include/net/netlink.h"
24401 static inline __attribute__((always_inline)) int nlmsg_validate(struct nlmsghdr *nlh, int hdrlen, int maxtype,
24402 struct nla_policy *policy)
24404 if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
24407 return nla_validate(nlmsg_attrdata(nlh, hdrlen),
24408 nlmsg_attrlen(nlh, hdrlen), maxtype, policy);
24417 static inline __attribute__((always_inline)) int nlmsg_report(struct nlmsghdr *nlh)
24419 return !!(nlh->nlmsg_flags & 8);
24421 # 472 "include/net/netlink.h"
24422 static inline __attribute__((always_inline)) struct nlmsghdr *nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq,
24423 int type, int payload, int flags)
24425 if (__builtin_expect(!!(skb_tailroom(skb) < nlmsg_total_size(payload)), 0))
24426 return ((void *)0);
24428 return __nlmsg_put(skb, pid, seq, type, payload, flags);
24430 # 492 "include/net/netlink.h"
24431 static inline __attribute__((always_inline)) struct nlmsghdr *nlmsg_put_answer(struct sk_buff *skb,
24432 struct netlink_callback *cb,
24433 int type, int payload,
24436 return nlmsg_put(skb, (*(struct netlink_skb_parms*)&((cb->skb)->cb)).pid, cb->nlh->nlmsg_seq,
24437 type, payload, flags);
24439 # 508 "include/net/netlink.h"
24440 static inline __attribute__((always_inline)) struct sk_buff *nlmsg_new(int size, gfp_t flags)
24442 return alloc_skb(size, flags);
24444 # 524 "include/net/netlink.h"
24445 static inline __attribute__((always_inline)) int nlmsg_end(struct sk_buff *skb, struct nlmsghdr *nlh)
24447 nlh->nlmsg_len = skb->tail - (unsigned char *) nlh;
24458 static inline __attribute__((always_inline)) void *nlmsg_get_pos(struct sk_buff *skb)
24462 # 549 "include/net/netlink.h"
24463 static inline __attribute__((always_inline)) int nlmsg_trim(struct sk_buff *skb, void *mark)
24466 skb_trim(skb, (unsigned char *) mark - skb->data);
24470 # 565 "include/net/netlink.h"
24471 static inline __attribute__((always_inline)) int nlmsg_cancel(struct sk_buff *skb, struct nlmsghdr *nlh)
24473 return nlmsg_trim(skb, nlh);
24480 static inline __attribute__((always_inline)) void nlmsg_free(struct sk_buff *skb)
24484 # 587 "include/net/netlink.h"
24485 static inline __attribute__((always_inline)) int nlmsg_multicast(struct sock *sk, struct sk_buff *skb,
24486 u32 pid, unsigned int group, gfp_t flags)
24490 (*(struct netlink_skb_parms*)&((skb)->cb)).dst_group = group;
24492 err = netlink_broadcast(sk, skb, pid, group, flags);
24505 static inline __attribute__((always_inline)) int nlmsg_unicast(struct sock *sk, struct sk_buff *skb, u32 pid)
24509 err = netlink_unicast(sk, skb, pid, 0x40);
24515 # 638 "include/net/netlink.h"
24516 static inline __attribute__((always_inline)) int nla_attr_size(int payload)
24518 return ((int) (((sizeof(struct nlattr)) + 4 - 1) & ~(4 - 1))) + payload;
24525 static inline __attribute__((always_inline)) int nla_total_size(int payload)
24527 return (((nla_attr_size(payload)) + 4 - 1) & ~(4 - 1));
24534 static inline __attribute__((always_inline)) int nla_padlen(int payload)
24536 return nla_total_size(payload) - nla_attr_size(payload);
24543 static inline __attribute__((always_inline)) void *nla_data(const struct nlattr *nla)
24545 return (char *) nla + ((int) (((sizeof(struct nlattr)) + 4 - 1) & ~(4 - 1)));
24552 static inline __attribute__((always_inline)) int nla_len(const struct nlattr *nla)
24554 return nla->nla_len - ((int) (((sizeof(struct nlattr)) + 4 - 1) & ~(4 - 1)));
24562 static inline __attribute__((always_inline)) int nla_ok(const struct nlattr *nla, int remaining)
24564 return remaining >= sizeof(*nla) &&
24565 nla->nla_len >= sizeof(*nla) &&
24566 nla->nla_len <= remaining;
24568 # 699 "include/net/netlink.h"
24569 static inline __attribute__((always_inline)) struct nlattr *nla_next(const struct nlattr *nla, int *remaining)
24571 int totlen = (((nla->nla_len) + 4 - 1) & ~(4 - 1));
24573 *remaining -= totlen;
24574 return (struct nlattr *) ((char *) nla + totlen);
24576 # 714 "include/net/netlink.h"
24577 static inline __attribute__((always_inline)) struct nlattr *nla_find_nested(struct nlattr *nla, int attrtype)
24579 return nla_find(nla_data(nla), nla_len(nla), attrtype);
24581 # 728 "include/net/netlink.h"
24582 static inline __attribute__((always_inline)) int nla_parse_nested(struct nlattr *tb[], int maxtype,
24583 struct nlattr *nla,
24584 struct nla_policy *policy)
24586 return nla_parse(tb, maxtype, nla_data(nla), nla_len(nla), policy);
24594 static inline __attribute__((always_inline)) int nla_put_u8(struct sk_buff *skb, int attrtype, u8 value)
24596 return nla_put(skb, attrtype, sizeof(u8), &value);
24605 static inline __attribute__((always_inline)) int nla_put_u16(struct sk_buff *skb, int attrtype, u16 value)
24607 return nla_put(skb, attrtype, sizeof(u16), &value);
24616 static inline __attribute__((always_inline)) int nla_put_u32(struct sk_buff *skb, int attrtype, u32 value)
24618 return nla_put(skb, attrtype, sizeof(u32), &value);
24627 static inline __attribute__((always_inline)) int nla_put_u64(struct sk_buff *skb, int attrtype, u64 value)
24629 return nla_put(skb, attrtype, sizeof(u64), &value);
24638 static inline __attribute__((always_inline)) int nla_put_string(struct sk_buff *skb, int attrtype,
24641 return nla_put(skb, attrtype, strlen(str) + 1, str);
24649 static inline __attribute__((always_inline)) int nla_put_flag(struct sk_buff *skb, int attrtype)
24651 return nla_put(skb, attrtype, 0, ((void *)0));
24660 static inline __attribute__((always_inline)) int nla_put_msecs(struct sk_buff *skb, int attrtype,
24661 unsigned long jiffies)
24663 u64 tmp = jiffies_to_msecs(jiffies);
24664 return nla_put(skb, attrtype, sizeof(u64), &tmp);
24666 # 853 "include/net/netlink.h"
24667 static inline __attribute__((always_inline)) u32 nla_get_u32(struct nlattr *nla)
24669 return *(u32 *) nla_data(nla);
24676 static inline __attribute__((always_inline)) __be32 nla_get_be32(struct nlattr *nla)
24678 return *(__be32 *) nla_data(nla);
24685 static inline __attribute__((always_inline)) u16 nla_get_u16(struct nlattr *nla)
24687 return *(u16 *) nla_data(nla);
24694 static inline __attribute__((always_inline)) u8 nla_get_u8(struct nlattr *nla)
24696 return *(u8 *) nla_data(nla);
24703 static inline __attribute__((always_inline)) u64 nla_get_u64(struct nlattr *nla)
24707 nla_memcpy(&tmp, nla, sizeof(tmp));
24716 static inline __attribute__((always_inline)) int nla_get_flag(struct nlattr *nla)
24727 static inline __attribute__((always_inline)) unsigned long nla_get_msecs(struct nlattr *nla)
24729 u64 msecs = nla_get_u64(nla);
24731 return msecs_to_jiffies((unsigned long) msecs);
24733 # 927 "include/net/netlink.h"
24734 static inline __attribute__((always_inline)) struct nlattr *nla_nest_start(struct sk_buff *skb, int attrtype)
24736 struct nlattr *start = (struct nlattr *) skb->tail;
24738 if (nla_put(skb, attrtype, 0, ((void *)0)) < 0)
24739 return ((void *)0);
24743 # 947 "include/net/netlink.h"
24744 static inline __attribute__((always_inline)) int nla_nest_end(struct sk_buff *skb, struct nlattr *start)
24746 start->nla_len = skb->tail - (unsigned char *) start;
24749 # 961 "include/net/netlink.h"
24750 static inline __attribute__((always_inline)) int nla_nest_cancel(struct sk_buff *skb, struct nlattr *start)
24752 return nlmsg_trim(skb, start);
24754 # 978 "include/net/netlink.h"
24755 static inline __attribute__((always_inline)) int nla_validate_nested(struct nlattr *start, int maxtype,
24756 struct nla_policy *policy)
24758 return nla_validate(nla_data(start), nla_len(start), maxtype, policy);
24760 # 24 "include/net/ip6_fib.h" 2
24774 struct in6_addr fc_dst;
24775 struct in6_addr fc_src;
24776 struct in6_addr fc_gateway;
24778 unsigned long fc_expires;
24779 struct nlattr *fc_mx;
24782 struct nl_info fc_nlinfo;
24787 struct fib6_node *parent;
24788 struct fib6_node *left;
24789 struct fib6_node *right;
24791 struct fib6_node *subtree;
24793 struct rt6_info *leaf;
24799 # 74 "include/net/ip6_fib.h"
24802 struct in6_addr addr;
24811 struct dst_entry dst;
24812 struct rt6_info *next;
24815 struct inet6_dev *rt6i_idev;
24821 struct fib6_node *rt6i_node;
24823 struct in6_addr rt6i_gateway;
24828 struct fib6_table *rt6i_table;
24830 struct rt6key rt6i_dst;
24831 struct rt6key rt6i_src;
24836 struct fib6_walker_t
24838 struct fib6_walker_t *prev, *next;
24839 struct fib6_node *root, *node;
24840 struct rt6_info *leaf;
24841 unsigned char state;
24842 unsigned char prune;
24843 int (*func)(struct fib6_walker_t *);
24847 struct rt6_statistics {
24849 __u32 fib_route_nodes;
24850 __u32 fib_rt_alloc;
24851 __u32 fib_rt_entries;
24852 __u32 fib_rt_cache;
24853 __u32 fib_discarded_routes;
24855 # 151 "include/net/ip6_fib.h"
24856 typedef void (*f_pnode)(struct fib6_node *fn, void *);
24858 struct fib6_table {
24859 struct hlist_node tb6_hlist;
24862 struct fib6_node tb6_root;
24864 # 176 "include/net/ip6_fib.h"
24865 typedef struct rt6_info *(*pol_lookup_t)(struct fib6_table *,
24866 struct flowi *, int);
24872 extern struct fib6_table * fib6_get_table(u32 id);
24873 extern struct fib6_table * fib6_new_table(u32 id);
24874 extern struct dst_entry * fib6_rule_lookup(struct flowi *fl, int flags,
24875 pol_lookup_t lookup);
24877 extern struct fib6_node *fib6_lookup(struct fib6_node *root,
24878 struct in6_addr *daddr,
24879 struct in6_addr *saddr);
24881 struct fib6_node *fib6_locate(struct fib6_node *root,
24882 struct in6_addr *daddr, int dst_len,
24883 struct in6_addr *saddr, int src_len);
24885 extern void fib6_clean_all(int (*func)(struct rt6_info *, void *arg),
24886 int prune, void *arg);
24888 extern int fib6_add(struct fib6_node *root,
24889 struct rt6_info *rt,
24890 struct nl_info *info);
24892 extern int fib6_del(struct rt6_info *rt,
24893 struct nl_info *info);
24895 extern void inet6_rt_notify(int event, struct rt6_info *rt,
24896 struct nl_info *info);
24898 extern void fib6_run_gc(unsigned long dummy);
24900 extern void fib6_gc_cleanup(void);
24902 extern void fib6_init(void);
24904 extern void fib6_rules_init(void);
24905 extern void fib6_rules_cleanup(void);
24906 extern int fib6_rules_dump(struct sk_buff *,
24907 struct netlink_callback *);
24908 # 21 "include/net/xfrm.h" 2
24914 extern struct sock *xfrm_nl;
24915 extern u32 sysctl_xfrm_aevent_etime;
24916 extern u32 sysctl_xfrm_aevent_rseqth;
24918 extern struct mutex xfrm_cfg_mutex;
24919 # 94 "include/net/xfrm.h"
24923 struct hlist_node bydst;
24924 struct hlist_node bysrc;
24925 struct hlist_node byspi;
24931 struct xfrm_selector sel;
24947 u8 aalgo, ealgo, calgo;
24950 xfrm_address_t saddr;
24955 struct xfrm_lifetime_cfg lft;
24958 struct xfrm_algo *aalg;
24959 struct xfrm_algo *ealg;
24960 struct xfrm_algo *calg;
24963 struct xfrm_encap_tmpl *encap;
24966 xfrm_address_t *coaddr;
24969 struct xfrm_state *tunnel;
24972 atomic_t tunnel_users;
24975 struct xfrm_replay_state replay;
24978 struct xfrm_replay_state preplay;
24987 u32 replay_maxdiff;
24990 struct timer_list rtimer;
24993 struct xfrm_stats stats;
24995 struct xfrm_lifetime_cur curlft;
24996 struct timer_list timer;
25003 struct xfrm_type *type;
25004 struct xfrm_mode *mode;
25007 struct xfrm_sec_ctx *security;
25022 XFRM_STATE_EXPIRED,
25044 struct xfrm_policy_afinfo {
25045 unsigned short family;
25046 struct xfrm_type *type_map[IPPROTO_MAX];
25047 struct xfrm_mode *mode_map[5];
25048 struct dst_ops *dst_ops;
25049 void (*garbage_collect)(void);
25050 int (*dst_lookup)(struct xfrm_dst **dst, struct flowi *fl);
25051 int (*get_saddr)(xfrm_address_t *saddr, xfrm_address_t *daddr);
25052 struct dst_entry *(*find_bundle)(struct flowi *fl, struct xfrm_policy *policy);
25053 int (*bundle_create)(struct xfrm_policy *policy,
25054 struct xfrm_state **xfrm,
25057 struct dst_entry **dst_p);
25058 void (*decode_session)(struct sk_buff *skb,
25062 extern int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo);
25063 extern int xfrm_policy_unregister_afinfo(struct xfrm_policy_afinfo *afinfo);
25064 extern void km_policy_notify(struct xfrm_policy *xp, int dir, struct km_event *c);
25065 extern void km_state_notify(struct xfrm_state *x, struct km_event *c);
25069 extern int km_query(struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *pol);
25070 extern void km_state_expired(struct xfrm_state *x, int hard, u32 pid);
25071 extern int __xfrm_state_delete(struct xfrm_state *x);
25073 struct xfrm_state_afinfo {
25074 unsigned short family;
25075 int (*init_flags)(struct xfrm_state *x);
25076 void (*init_tempsel)(struct xfrm_state *x, struct flowi *fl,
25077 struct xfrm_tmpl *tmpl,
25078 xfrm_address_t *daddr, xfrm_address_t *saddr);
25079 int (*tmpl_sort)(struct xfrm_tmpl **dst, struct xfrm_tmpl **src, int n);
25080 int (*state_sort)(struct xfrm_state **dst, struct xfrm_state **src, int n);
25083 extern int xfrm_state_register_afinfo(struct xfrm_state_afinfo *afinfo);
25084 extern int xfrm_state_unregister_afinfo(struct xfrm_state_afinfo *afinfo);
25086 extern void xfrm_state_delete_tunnel(struct xfrm_state *x);
25091 struct module *owner;
25096 int (*init_state)(struct xfrm_state *x);
25097 void (*destructor)(struct xfrm_state *);
25098 int (*input)(struct xfrm_state *, struct sk_buff *skb);
25099 int (*output)(struct xfrm_state *, struct sk_buff *pskb);
25100 int (*reject)(struct xfrm_state *, struct sk_buff *, struct flowi *);
25101 int (*hdr_offset)(struct xfrm_state *, struct sk_buff *, u8 **);
25102 xfrm_address_t *(*local_addr)(struct xfrm_state *, xfrm_address_t *);
25103 xfrm_address_t *(*remote_addr)(struct xfrm_state *, xfrm_address_t *);
25105 u32 (*get_max_size)(struct xfrm_state *, int size);
25108 extern int xfrm_register_type(struct xfrm_type *type, unsigned short family);
25109 extern int xfrm_unregister_type(struct xfrm_type *type, unsigned short family);
25110 extern struct xfrm_type *xfrm_get_type(u8 proto, unsigned short family);
25111 extern void xfrm_put_type(struct xfrm_type *type);
25114 int (*input)(struct xfrm_state *x, struct sk_buff *skb);
25115 int (*output)(struct xfrm_state *x,struct sk_buff *skb);
25117 struct module *owner;
25118 unsigned int encap;
25121 extern int xfrm_register_mode(struct xfrm_mode *mode, int family);
25122 extern int xfrm_unregister_mode(struct xfrm_mode *mode, int family);
25123 extern struct xfrm_mode *xfrm_get_mode(unsigned int encap, int family);
25124 extern void xfrm_put_mode(struct xfrm_mode *mode);
25137 xfrm_address_t saddr;
25160 struct xfrm_policy *next;
25161 struct hlist_node bydst;
25162 struct hlist_node byidx;
25167 struct timer_list timer;
25172 struct xfrm_selector selector;
25173 struct xfrm_lifetime_cfg lft;
25174 struct xfrm_lifetime_cur curlft;
25175 struct dst_entry *bundles;
25181 struct xfrm_sec_ctx *security;
25182 struct xfrm_tmpl xfrm_vec[6];
25184 # 375 "include/net/xfrm.h"
25187 struct list_head list;
25189 int (*notify)(struct xfrm_state *x, struct km_event *c);
25190 int (*acquire)(struct xfrm_state *x, struct xfrm_tmpl *, struct xfrm_policy *xp, int dir);
25191 struct xfrm_policy *(*compile_policy)(struct sock *sk, int opt, u8 *data, int len, int *dir);
25192 int (*new_mapping)(struct xfrm_state *x, xfrm_address_t *ipaddr, u16 sport);
25193 int (*notify_policy)(struct xfrm_policy *x, int dir, struct km_event *c);
25194 int (*report)(u8 proto, struct xfrm_selector *sel, xfrm_address_t *addr);
25197 extern int xfrm_register_km(struct xfrm_mgr *km);
25198 extern int xfrm_unregister_km(struct xfrm_mgr *km);
25200 extern unsigned int xfrm_policy_count[XFRM_POLICY_MAX*2];
25202 static inline __attribute__((always_inline)) void xfrm_pol_hold(struct xfrm_policy *policy)
25204 if (__builtin_expect(!!(policy != ((void *)0)), 1))
25205 atomic_inc(&policy->refcnt);
25208 extern void __xfrm_policy_destroy(struct xfrm_policy *policy);
25210 static inline __attribute__((always_inline)) void xfrm_pol_put(struct xfrm_policy *policy)
25212 if ((atomic_sub_return(1, (&policy->refcnt)) == 0))
25213 __xfrm_policy_destroy(policy);
25215 # 414 "include/net/xfrm.h"
25216 static inline __attribute__((always_inline)) void xfrm_pols_put(struct xfrm_policy **pols, int npols)
25218 xfrm_pol_put(pols[0]);
25222 extern void __xfrm_state_destroy(struct xfrm_state *);
25224 static inline __attribute__((always_inline)) void __xfrm_state_put(struct xfrm_state *x)
25226 atomic_dec(&x->refcnt);
25229 static inline __attribute__((always_inline)) void xfrm_state_put(struct xfrm_state *x)
25231 if ((atomic_sub_return(1, (&x->refcnt)) == 0))
25232 __xfrm_state_destroy(x);
25235 static inline __attribute__((always_inline)) void xfrm_state_hold(struct xfrm_state *x)
25237 atomic_inc(&x->refcnt);
25240 static __inline__ __attribute__((always_inline)) int addr_match(void *token1, void *token2, int prefixlen)
25242 __be32 *a1 = token1;
25243 __be32 *a2 = token2;
25247 pdw = prefixlen >> 5;
25248 pbi = prefixlen & 0x1f;
25251 if (memcmp(a1, a2, pdw << 2))
25257 mask = htonl((0xffffffff) << (32 - pbi));
25259 if ((a1[pdw] ^ a2[pdw]) & mask)
25266 static __inline__ __attribute__((always_inline))
25267 __be16 xfrm_flowi_sport(struct flowi *fl)
25270 switch(fl->proto) {
25274 port = fl->uli_u.ports.sport;
25278 port = htons(fl->uli_u.icmpt.type);
25291 static __inline__ __attribute__((always_inline))
25292 __be16 xfrm_flowi_dport(struct flowi *fl)
25295 switch(fl->proto) {
25299 port = fl->uli_u.ports.dport;
25303 port = htons(fl->uli_u.icmpt.code);
25311 static inline __attribute__((always_inline)) int
25312 __xfrm4_selector_match(struct xfrm_selector *sel, struct flowi *fl)
25314 return addr_match(&fl->nl_u.ip4_u.daddr, &sel->daddr, sel->prefixlen_d) &&
25315 addr_match(&fl->nl_u.ip4_u.saddr, &sel->saddr, sel->prefixlen_s) &&
25316 !((xfrm_flowi_dport(fl) ^ sel->dport) & sel->dport_mask) &&
25317 !((xfrm_flowi_sport(fl) ^ sel->sport) & sel->sport_mask) &&
25318 (fl->proto == sel->proto || !sel->proto) &&
25319 (fl->oif == sel->ifindex || !sel->ifindex);
25322 static inline __attribute__((always_inline)) int
25323 __xfrm6_selector_match(struct xfrm_selector *sel, struct flowi *fl)
25325 return addr_match(&fl->nl_u.ip6_u.daddr, &sel->daddr, sel->prefixlen_d) &&
25326 addr_match(&fl->nl_u.ip6_u.saddr, &sel->saddr, sel->prefixlen_s) &&
25327 !((xfrm_flowi_dport(fl) ^ sel->dport) & sel->dport_mask) &&
25328 !((xfrm_flowi_sport(fl) ^ sel->sport) & sel->sport_mask) &&
25329 (fl->proto == sel->proto || !sel->proto) &&
25330 (fl->oif == sel->ifindex || !sel->ifindex);
25333 static inline __attribute__((always_inline)) int
25334 xfrm_selector_match(struct xfrm_selector *sel, struct flowi *fl,
25335 unsigned short family)
25339 return __xfrm4_selector_match(sel, fl);
25341 return __xfrm6_selector_match(sel, fl);
25345 # 557 "include/net/xfrm.h"
25346 static inline __attribute__((always_inline)) int xfrm_sec_ctx_match(struct xfrm_sec_ctx *s1, struct xfrm_sec_ctx *s2)
25350 # 574 "include/net/xfrm.h"
25354 struct xfrm_dst *next;
25355 struct dst_entry dst;
25357 struct rt6_info rt6;
25359 struct dst_entry *route;
25361 u32 route_mtu_cached;
25362 u32 child_mtu_cached;
25367 static inline __attribute__((always_inline)) void xfrm_dst_destroy(struct xfrm_dst *xdst)
25369 dst_release(xdst->route);
25370 if (__builtin_expect(!!(xdst->u.dst.xfrm), 1))
25371 xfrm_state_put(xdst->u.dst.xfrm);
25374 extern void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev);
25380 struct xfrm_state *xvec[6];
25383 static inline __attribute__((always_inline)) struct sec_path *
25384 secpath_get(struct sec_path *sp)
25387 atomic_inc(&sp->refcnt);
25391 extern void __secpath_destroy(struct sec_path *sp);
25393 static inline __attribute__((always_inline)) void
25394 secpath_put(struct sec_path *sp)
25396 if (sp && (atomic_sub_return(1, (&sp->refcnt)) == 0))
25397 __secpath_destroy(sp);
25400 extern struct sec_path *secpath_dup(struct sec_path *src);
25402 static inline __attribute__((always_inline)) void
25403 secpath_reset(struct sk_buff *skb)
25411 static inline __attribute__((always_inline)) int
25412 xfrm_addr_any(xfrm_address_t *addr, unsigned short family)
25416 return addr->a4 == 0;
25418 return ipv6_addr_any((struct in6_addr *)&addr->a6);
25423 static inline __attribute__((always_inline)) int
25424 __xfrm4_state_addr_cmp(struct xfrm_tmpl *tmpl, struct xfrm_state *x)
25426 return (tmpl->saddr.a4 &&
25427 tmpl->saddr.a4 != x->props.saddr.a4);
25430 static inline __attribute__((always_inline)) int
25431 __xfrm6_state_addr_cmp(struct xfrm_tmpl *tmpl, struct xfrm_state *x)
25433 return (!ipv6_addr_any((struct in6_addr*)&tmpl->saddr) &&
25434 ipv6_addr_cmp((struct in6_addr *)&tmpl->saddr, (struct in6_addr*)&x->props.saddr));
25437 static inline __attribute__((always_inline)) int
25438 xfrm_state_addr_cmp(struct xfrm_tmpl *tmpl, struct xfrm_state *x, unsigned short family)
25442 return __xfrm4_state_addr_cmp(tmpl, x);
25444 return __xfrm6_state_addr_cmp(tmpl, x);
25448 # 741 "include/net/xfrm.h"
25449 static inline __attribute__((always_inline)) void xfrm_sk_free_policy(struct sock *sk) {}
25450 static inline __attribute__((always_inline)) int xfrm_sk_clone_policy(struct sock *sk) { return 0; }
25451 static inline __attribute__((always_inline)) int xfrm6_route_forward(struct sk_buff *skb) { return 1; }
25452 static inline __attribute__((always_inline)) int xfrm4_route_forward(struct sk_buff *skb) { return 1; }
25453 static inline __attribute__((always_inline)) int xfrm6_policy_check(struct sock *sk, int dir, struct sk_buff *skb)
25457 static inline __attribute__((always_inline)) int xfrm4_policy_check(struct sock *sk, int dir, struct sk_buff *skb)
25461 static inline __attribute__((always_inline)) int xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *skb, unsigned short family)
25467 static __inline__ __attribute__((always_inline))
25468 xfrm_address_t *xfrm_flowi_daddr(struct flowi *fl, unsigned short family)
25472 return (xfrm_address_t *)&fl->nl_u.ip4_u.daddr;
25474 return (xfrm_address_t *)&fl->nl_u.ip6_u.daddr;
25476 return ((void *)0);
25479 static __inline__ __attribute__((always_inline))
25480 xfrm_address_t *xfrm_flowi_saddr(struct flowi *fl, unsigned short family)
25484 return (xfrm_address_t *)&fl->nl_u.ip4_u.saddr;
25486 return (xfrm_address_t *)&fl->nl_u.ip6_u.saddr;
25488 return ((void *)0);
25491 static __inline__ __attribute__((always_inline)) int
25492 __xfrm4_state_addr_check(struct xfrm_state *x,
25493 xfrm_address_t *daddr, xfrm_address_t *saddr)
25495 if (daddr->a4 == x->id.daddr.a4 &&
25496 (saddr->a4 == x->props.saddr.a4 || !saddr->a4 || !x->props.saddr.a4))
25501 static __inline__ __attribute__((always_inline)) int
25502 __xfrm6_state_addr_check(struct xfrm_state *x,
25503 xfrm_address_t *daddr, xfrm_address_t *saddr)
25505 if (!ipv6_addr_cmp((struct in6_addr *)daddr, (struct in6_addr *)&x->id.daddr) &&
25506 (!ipv6_addr_cmp((struct in6_addr *)saddr, (struct in6_addr *)&x->props.saddr)||
25507 ipv6_addr_any((struct in6_addr *)saddr) ||
25508 ipv6_addr_any((struct in6_addr *)&x->props.saddr)))
25513 static __inline__ __attribute__((always_inline)) int
25514 xfrm_state_addr_check(struct xfrm_state *x,
25515 xfrm_address_t *daddr, xfrm_address_t *saddr,
25516 unsigned short family)
25520 return __xfrm4_state_addr_check(x, daddr, saddr);
25522 return __xfrm6_state_addr_check(x, daddr, saddr);
25527 static __inline__ __attribute__((always_inline)) int
25528 xfrm_state_addr_flow_check(struct xfrm_state *x, struct flowi *fl,
25529 unsigned short family)
25533 return __xfrm4_state_addr_check(x,
25534 (xfrm_address_t *)&fl->nl_u.ip4_u.daddr,
25535 (xfrm_address_t *)&fl->nl_u.ip4_u.saddr);
25537 return __xfrm6_state_addr_check(x,
25538 (xfrm_address_t *)&fl->nl_u.ip6_u.daddr,
25539 (xfrm_address_t *)&fl->nl_u.ip6_u.saddr);
25544 static inline __attribute__((always_inline)) int xfrm_state_kern(struct xfrm_state *x)
25546 return ((&x->tunnel_users)->counter);
25549 static inline __attribute__((always_inline)) int xfrm_id_proto_match(u8 proto, u8 userproto)
25551 return (!userproto || proto == userproto ||
25552 (userproto == 255 && (proto == IPPROTO_AH ||
25553 proto == IPPROTO_ESP ||
25554 proto == IPPROTO_COMP)));
25560 struct xfrm_algo_auth_info {
25565 struct xfrm_algo_encr_info {
25570 struct xfrm_algo_comp_info {
25574 struct xfrm_algo_desc {
25579 struct xfrm_algo_auth_info auth;
25580 struct xfrm_algo_encr_info encr;
25581 struct xfrm_algo_comp_info comp;
25583 struct sadb_alg desc;
25587 struct xfrm_tunnel {
25588 int (*handler)(struct sk_buff *skb);
25589 int (*err_handler)(struct sk_buff *skb, __u32 info);
25591 struct xfrm_tunnel *next;
25595 struct xfrm6_tunnel {
25596 int (*handler)(struct sk_buff *skb);
25597 int (*err_handler)(struct sk_buff *skb, struct inet6_skb_parm *opt,
25598 int type, int code, int offset, __u32 info);
25600 struct xfrm6_tunnel *next;
25604 extern void xfrm_init(void);
25605 extern void xfrm4_init(void);
25606 extern void xfrm6_init(void);
25607 extern void xfrm6_fini(void);
25608 extern void xfrm_state_init(void);
25609 extern void xfrm4_state_init(void);
25610 extern void xfrm6_state_init(void);
25611 extern void xfrm6_state_fini(void);
25613 extern int xfrm_state_walk(u8 proto, int (*func)(struct xfrm_state *, int, void*), void *);
25614 extern struct xfrm_state *xfrm_state_alloc(void);
25615 extern struct xfrm_state *xfrm_state_find(xfrm_address_t *daddr, xfrm_address_t *saddr,
25616 struct flowi *fl, struct xfrm_tmpl *tmpl,
25617 struct xfrm_policy *pol, int *err,
25618 unsigned short family);
25619 extern int xfrm_state_check_expire(struct xfrm_state *x);
25620 extern void xfrm_state_insert(struct xfrm_state *x);
25621 extern int xfrm_state_add(struct xfrm_state *x);
25622 extern int xfrm_state_update(struct xfrm_state *x);
25623 extern struct xfrm_state *xfrm_state_lookup(xfrm_address_t *daddr, __be32 spi, u8 proto, unsigned short family);
25624 extern struct xfrm_state *xfrm_state_lookup_byaddr(xfrm_address_t *daddr, xfrm_address_t *saddr, u8 proto, unsigned short family);
25631 static inline __attribute__((always_inline)) int xfrm_tmpl_sort(struct xfrm_tmpl **dst, struct xfrm_tmpl **src,
25632 int n, unsigned short family)
25637 static inline __attribute__((always_inline)) int xfrm_state_sort(struct xfrm_state **dst, struct xfrm_state **src,
25638 int n, unsigned short family)
25643 extern struct xfrm_state *xfrm_find_acq_byseq(u32 seq);
25644 extern int xfrm_state_delete(struct xfrm_state *x);
25645 extern void xfrm_state_flush(u8 proto);
25646 extern int xfrm_replay_check(struct xfrm_state *x, __be32 seq);
25647 extern void xfrm_replay_advance(struct xfrm_state *x, __be32 seq);
25648 extern void xfrm_replay_notify(struct xfrm_state *x, int event);
25649 extern int xfrm_state_check(struct xfrm_state *x, struct sk_buff *skb);
25650 extern int xfrm_state_mtu(struct xfrm_state *x, int mtu);
25651 extern int xfrm_init_state(struct xfrm_state *x);
25652 extern int xfrm4_rcv(struct sk_buff *skb);
25653 extern int xfrm4_output(struct sk_buff *skb);
25654 extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler);
25655 extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler);
25656 extern int xfrm6_rcv_spi(struct sk_buff *skb, __be32 spi);
25657 extern int xfrm6_rcv(struct sk_buff **pskb);
25658 extern int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr,
25659 xfrm_address_t *saddr, u8 proto);
25660 extern int xfrm6_tunnel_register(struct xfrm6_tunnel *handler);
25661 extern int xfrm6_tunnel_deregister(struct xfrm6_tunnel *handler);
25662 extern u32 xfrm6_tunnel_alloc_spi(xfrm_address_t *saddr);
25663 extern void xfrm6_tunnel_free_spi(xfrm_address_t *saddr);
25664 extern u32 xfrm6_tunnel_spi_lookup(xfrm_address_t *saddr);
25665 extern int xfrm6_output(struct sk_buff *skb);
25666 extern int xfrm6_find_1stfragopt(struct xfrm_state *x, struct sk_buff *skb,
25674 static inline __attribute__((always_inline)) int xfrm_user_policy(struct sock *sk, int optname, u8 *optval, int optlen)
25679 static inline __attribute__((always_inline)) int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type)
25685 static inline __attribute__((always_inline)) int xfrm_dst_lookup(struct xfrm_dst **dst, struct flowi *fl, unsigned short family)
25691 struct xfrm_policy *xfrm_policy_alloc(gfp_t gfp);
25692 extern int xfrm_policy_walk(u8 type, int (*func)(struct xfrm_policy *, int, int, void*), void *);
25693 int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl);
25694 struct xfrm_policy *xfrm_policy_bysel_ctx(u8 type, int dir,
25695 struct xfrm_selector *sel,
25696 struct xfrm_sec_ctx *ctx, int delete);
25697 struct xfrm_policy *xfrm_policy_byid(u8, int dir, u32 id, int delete);
25698 void xfrm_policy_flush(u8 type);
25699 u32 xfrm_get_acqseq(void);
25700 void xfrm_alloc_spi(struct xfrm_state *x, __be32 minspi, __be32 maxspi);
25701 struct xfrm_state * xfrm_find_acq(u8 mode, u32 reqid, u8 proto,
25702 xfrm_address_t *daddr, xfrm_address_t *saddr,
25703 int create, unsigned short family);
25704 extern void xfrm_policy_flush(u8 type);
25705 extern int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol);
25706 extern int xfrm_bundle_ok(struct xfrm_policy *pol, struct xfrm_dst *xdst,
25707 struct flowi *fl, int family, int strict);
25708 extern void xfrm_init_pmtu(struct dst_entry *dst);
25710 extern wait_queue_head_t km_waitq;
25711 extern int km_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr, u16 sport);
25712 extern void km_policy_expired(struct xfrm_policy *pol, int dir, int hard, u32 pid);
25713 extern int km_report(u8 proto, struct xfrm_selector *sel, xfrm_address_t *addr);
25715 extern void xfrm_input_init(void);
25716 extern int xfrm_parse_spi(struct sk_buff *skb, u8 nexthdr, __be32 *spi, __be32 *seq);
25718 extern void xfrm_probe_algs(void);
25719 extern int xfrm_count_auth_supported(void);
25720 extern int xfrm_count_enc_supported(void);
25721 extern struct xfrm_algo_desc *xfrm_aalg_get_byidx(unsigned int idx);
25722 extern struct xfrm_algo_desc *xfrm_ealg_get_byidx(unsigned int idx);
25723 extern struct xfrm_algo_desc *xfrm_aalg_get_byid(int alg_id);
25724 extern struct xfrm_algo_desc *xfrm_ealg_get_byid(int alg_id);
25725 extern struct xfrm_algo_desc *xfrm_calg_get_byid(int alg_id);
25726 extern struct xfrm_algo_desc *xfrm_aalg_get_byname(char *name, int probe);
25727 extern struct xfrm_algo_desc *xfrm_ealg_get_byname(char *name, int probe);
25728 extern struct xfrm_algo_desc *xfrm_calg_get_byname(char *name, int probe);
25731 struct scatterlist;
25732 typedef int (icv_update_fn_t)(struct hash_desc *, struct scatterlist *,
25735 extern int skb_icv_walk(const struct sk_buff *skb, struct hash_desc *tfm,
25736 int offset, int len, icv_update_fn_t icv_update);
25738 static inline __attribute__((always_inline)) int xfrm_addr_cmp(xfrm_address_t *a, xfrm_address_t *b,
25744 return a->a4 - b->a4;
25746 return ipv6_addr_cmp((struct in6_addr *)a,
25747 (struct in6_addr *)b);
25751 static inline __attribute__((always_inline)) int xfrm_policy_id2dir(u32 index)
25756 static inline __attribute__((always_inline)) int xfrm_aevent_is_on(void)
25761 do { do { } while (0); (void)0; } while(0);
25762 nlsk = ({ typeof(xfrm_nl) _________p1 = xfrm_nl; do { } while(0); (_________p1); });
25764 ret = netlink_has_listeners(nlsk, XFRMNLGRP_AEVENTS);
25765 do { (void)0; do { } while (0); } while(0);
25769 static inline __attribute__((always_inline)) void xfrm_aevent_doreplay(struct xfrm_state *x)
25771 if (xfrm_aevent_is_on())
25772 xfrm_replay_notify(x, XFRM_AE_CR);
25774 # 72 "net/ipv4/ip_output.c" 2
25777 # 1 "include/net/arp.h" 1
25782 # 1 "include/linux/if_arp.h" 1
25783 # 103 "include/linux/if_arp.h"
25785 struct sockaddr arp_pa;
25786 struct sockaddr arp_ha;
25788 struct sockaddr arp_netmask;
25792 struct arpreq_old {
25793 struct sockaddr arp_pa;
25794 struct sockaddr arp_ha;
25796 struct sockaddr arp_netmask;
25798 # 131 "include/linux/if_arp.h"
25803 unsigned char ar_hln;
25804 unsigned char ar_pln;
25806 # 149 "include/linux/if_arp.h"
25808 # 6 "include/net/arp.h" 2
25813 extern struct neigh_table arp_tbl;
25815 extern void arp_init(void);
25816 extern int arp_find(unsigned char *haddr, struct sk_buff *skb);
25817 extern int arp_ioctl(unsigned int cmd, void *arg);
25818 extern void arp_send(int type, int ptype, __be32 dest_ip,
25819 struct net_device *dev, __be32 src_ip,
25820 unsigned char *dest_hw, unsigned char *src_hw, unsigned char *th);
25821 extern int arp_bind_neighbour(struct dst_entry *dst);
25822 extern int arp_mc_map(u32 addr, u8 *haddr, struct net_device *dev, int dir);
25823 extern void arp_ifdown(struct net_device *dev);
25825 extern struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,
25826 struct net_device *dev, __be32 src_ip,
25827 unsigned char *dest_hw, unsigned char *src_hw,
25828 unsigned char *target_hw);
25829 extern void arp_xmit(struct sk_buff *skb);
25831 extern struct neigh_ops arp_broken_ops;
25832 # 75 "net/ipv4/ip_output.c" 2
25833 # 1 "include/net/icmp.h" 1
25834 # 21 "include/net/icmp.h"
25835 # 1 "include/linux/icmp.h" 1
25836 # 68 "include/linux/icmp.h"
25860 struct icmp_filter {
25863 # 22 "include/net/icmp.h" 2
25873 extern struct icmp_err icmp_err_convert[];
25874 extern __typeof__(struct icmp_mib) *icmp_statistics[2];
25880 struct net_proto_family;
25883 extern void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info);
25884 extern int icmp_rcv(struct sk_buff *skb);
25885 extern int icmp_ioctl(struct sock *sk, int cmd, unsigned long arg);
25886 extern void icmp_init(struct net_proto_family *ops);
25889 extern int xrlim_allow(struct dst_entry *dst, int timeout);
25893 struct inet_sock inet;
25894 struct icmp_filter filter;
25897 static inline __attribute__((always_inline)) struct raw_sock *raw_sk(const struct sock *sk)
25899 return (struct raw_sock *)sk;
25902 extern int sysctl_icmp_echo_ignore_all;
25903 extern int sysctl_icmp_echo_ignore_broadcasts;
25904 extern int sysctl_icmp_ignore_bogus_error_responses;
25905 extern int sysctl_icmp_errors_use_inbound_ifaddr;
25906 extern int sysctl_icmp_ratelimit;
25907 extern int sysctl_icmp_ratemask;
25908 # 76 "net/ipv4/ip_output.c" 2
25912 # 1 "include/linux/igmp.h" 1
25913 # 29 "include/linux/igmp.h"
25921 # 45 "include/linux/igmp.h"
25922 struct igmpv3_grec {
25924 __u8 grec_auxwords;
25927 __be32 grec_src[0];
25930 struct igmpv3_report {
25936 struct igmpv3_grec grec[0];
25939 struct igmpv3_query {
25959 # 132 "include/linux/igmp.h"
25960 extern int sysctl_igmp_max_memberships;
25961 extern int sysctl_igmp_max_msf;
25963 struct ip_sf_socklist
25965 unsigned int sl_max;
25966 unsigned int sl_count;
25969 # 151 "include/linux/igmp.h"
25970 struct ip_mc_socklist
25972 struct ip_mc_socklist *next;
25973 struct ip_mreqn multi;
25974 unsigned int sfmode;
25975 struct ip_sf_socklist *sflist;
25980 struct ip_sf_list *sf_next;
25982 unsigned long sf_count[2];
25983 unsigned char sf_gsresp;
25984 unsigned char sf_oldin;
25985 unsigned char sf_crcount;
25990 struct in_device *interface;
25992 struct ip_sf_list *sources;
25993 struct ip_sf_list *tomb;
25994 unsigned int sfmode;
25995 unsigned long sfcount[2];
25996 struct ip_mc_list *next;
25997 struct timer_list timer;
26003 char unsolicit_count;
26005 unsigned char gsquery;
26006 unsigned char crcount;
26008 # 200 "include/linux/igmp.h"
26009 extern int ip_check_mc(struct in_device *dev, __be32 mc_addr, __be32 src_addr, u16 proto);
26010 extern int igmp_rcv(struct sk_buff *);
26011 extern int ip_mc_join_group(struct sock *sk, struct ip_mreqn *imr);
26012 extern int ip_mc_leave_group(struct sock *sk, struct ip_mreqn *imr);
26013 extern void ip_mc_drop_socket(struct sock *sk);
26014 extern int ip_mc_source(int add, int omode, struct sock *sk,
26015 struct ip_mreq_source *mreqs, int ifindex);
26016 extern int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf,int ifindex);
26017 extern int ip_mc_msfget(struct sock *sk, struct ip_msfilter *msf,
26018 struct ip_msfilter *optval, int *optlen);
26019 extern int ip_mc_gsfget(struct sock *sk, struct group_filter *gsf,
26020 struct group_filter *optval, int *optlen);
26021 extern int ip_mc_sf_allow(struct sock *sk, __be32 local, __be32 rmt, int dif);
26022 extern void ip_mr_init(void);
26023 extern void ip_mc_init_dev(struct in_device *);
26024 extern void ip_mc_destroy_dev(struct in_device *);
26025 extern void ip_mc_up(struct in_device *);
26026 extern void ip_mc_down(struct in_device *);
26027 extern void ip_mc_dec_group(struct in_device *in_dev, __be32 addr);
26028 extern void ip_mc_inc_group(struct in_device *in_dev, __be32 addr);
26029 # 80 "net/ipv4/ip_output.c" 2
26030 # 1 "include/linux/netfilter_ipv4.h" 1
26038 # 1 "include/linux/netfilter.h" 1
26039 # 350 "include/linux/netfilter.h"
26040 static inline __attribute__((always_inline)) int nf_hook_thresh(int pf, unsigned int hook,
26041 struct sk_buff **pskb,
26042 struct net_device *indev,
26043 struct net_device *outdev,
26044 int (*okfn)(struct sk_buff *), int thresh,
26047 return okfn(*pskb);
26049 static inline __attribute__((always_inline)) int nf_hook(int pf, unsigned int hook, struct sk_buff **pskb,
26050 struct net_device *indev, struct net_device *outdev,
26051 int (*okfn)(struct sk_buff *))
26055 static inline __attribute__((always_inline)) void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {}
26057 static inline __attribute__((always_inline)) void
26058 nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, int family) {}
26059 # 9 "include/linux/netfilter_ipv4.h" 2
26060 # 54 "include/linux/netfilter_ipv4.h"
26061 enum nf_ip_hook_priorities {
26062 NF_IP_PRI_FIRST = (-((int)(~0U>>1)) - 1),
26063 NF_IP_PRI_CONNTRACK_DEFRAG = -400,
26064 NF_IP_PRI_RAW = -300,
26065 NF_IP_PRI_SELINUX_FIRST = -225,
26066 NF_IP_PRI_CONNTRACK = -200,
26067 NF_IP_PRI_BRIDGE_SABOTAGE_FORWARD = -175,
26068 NF_IP_PRI_MANGLE = -150,
26069 NF_IP_PRI_NAT_DST = -100,
26070 NF_IP_PRI_BRIDGE_SABOTAGE_LOCAL_OUT = -50,
26071 NF_IP_PRI_FILTER = 0,
26072 NF_IP_PRI_NAT_SRC = 100,
26073 NF_IP_PRI_SELINUX_LAST = 225,
26074 NF_IP_PRI_CONNTRACK_HELPER = ((int)(~0U>>1)) - 2,
26075 NF_IP_PRI_NAT_SEQ_ADJUST = ((int)(~0U>>1)) - 1,
26076 NF_IP_PRI_CONNTRACK_CONFIRM = ((int)(~0U>>1)),
26077 NF_IP_PRI_LAST = ((int)(~0U>>1)),
26079 # 80 "include/linux/netfilter_ipv4.h"
26080 extern int ip_route_me_harder(struct sk_buff **pskb, unsigned addr_type);
26081 extern int ip_xfrm_me_harder(struct sk_buff **pskb);
26082 extern unsigned int nf_ip_checksum(struct sk_buff *skb, unsigned int hook,
26083 unsigned int dataoff, u_int8_t protocol);
26084 # 81 "net/ipv4/ip_output.c" 2
26085 # 1 "include/linux/netfilter_bridge.h" 1
26086 # 9 "include/linux/netfilter_bridge.h"
26087 # 1 "include/linux/if_vlan.h" 1
26088 # 19 "include/linux/if_vlan.h"
26091 struct packet_type;
26092 struct vlan_collection;
26093 struct vlan_dev_info;
26095 # 42 "include/linux/if_vlan.h"
26096 struct vlan_ethhdr {
26097 unsigned char h_dest[6];
26098 unsigned char h_source[6];
26099 __be16 h_vlan_proto;
26101 __be16 h_vlan_encapsulated_proto;
26106 static inline __attribute__((always_inline)) struct vlan_ethhdr *vlan_eth_hdr(const struct sk_buff *skb)
26108 return (struct vlan_ethhdr *)skb->mac.raw;
26113 __be16 h_vlan_encapsulated_proto;
26119 extern void vlan_ioctl_set(int (*hook)(void *));
26120 # 75 "include/linux/if_vlan.h"
26121 struct vlan_group {
26122 int real_dev_ifindex;
26123 struct hlist_node hlist;
26124 struct net_device *vlan_devices[4096];
26125 struct rcu_head rcu;
26128 struct vlan_priority_tci_mapping {
26129 unsigned long priority;
26130 unsigned short vlan_qos;
26134 struct vlan_priority_tci_mapping *next;
26138 struct vlan_dev_info {
26142 unsigned long ingress_priority_map[8];
26143 struct vlan_priority_tci_mapping *egress_priority_map[16];
26145 unsigned short vlan_id;
26146 unsigned short flags;
26154 struct dev_mc_list *old_mc_list;
26160 int old_promiscuity;
26161 struct net_device *real_dev;
26162 struct proc_dir_entry *dent;
26163 unsigned long cnt_inc_headroom_on_tx;
26164 unsigned long cnt_encap_on_xmit;
26165 struct net_device_stats dev_stats;
26172 static inline __attribute__((always_inline)) struct net_device_stats *vlan_dev_get_stats(struct net_device *dev)
26174 return &(((struct vlan_dev_info *)(dev->priv))->dev_stats);
26177 static inline __attribute__((always_inline)) __u32 vlan_get_ingress_priority(struct net_device *dev,
26178 unsigned short vlan_tag)
26180 struct vlan_dev_info *vip = ((struct vlan_dev_info *)(dev->priv));
26182 return vip->ingress_priority_map[(vlan_tag >> 13) & 0x7];
26186 struct vlan_skb_tx_cookie {
26190 # 152 "include/linux/if_vlan.h"
26191 static inline __attribute__((always_inline)) int __vlan_hwaccel_rx(struct sk_buff *skb,
26192 struct vlan_group *grp,
26193 unsigned short vlan_tag, int polling)
26195 struct net_device_stats *stats;
26197 if (skb_bond_should_drop(skb)) {
26198 dev_kfree_skb_any(skb);
26202 skb->dev = grp->vlan_devices[vlan_tag & 0xfff];
26203 if (skb->dev == ((void *)0)) {
26204 dev_kfree_skb_any(skb);
26212 skb->dev->last_rx = jiffies;
26214 stats = vlan_dev_get_stats(skb->dev);
26215 stats->rx_packets++;
26216 stats->rx_bytes += skb->len;
26218 skb->priority = vlan_get_ingress_priority(skb->dev, vlan_tag);
26219 switch (skb->pkt_type) {
26224 stats->multicast++;
26232 if (!compare_ether_addr(eth_hdr(skb)->h_dest,
26233 skb->dev->dev_addr))
26238 return (polling ? netif_receive_skb(skb) : netif_rx(skb));
26241 static inline __attribute__((always_inline)) int vlan_hwaccel_rx(struct sk_buff *skb,
26242 struct vlan_group *grp,
26243 unsigned short vlan_tag)
26245 return __vlan_hwaccel_rx(skb, grp, vlan_tag, 0);
26248 static inline __attribute__((always_inline)) int vlan_hwaccel_receive_skb(struct sk_buff *skb,
26249 struct vlan_group *grp,
26250 unsigned short vlan_tag)
26252 return __vlan_hwaccel_rx(skb, grp, vlan_tag, 1);
26254 # 227 "include/linux/if_vlan.h"
26255 static inline __attribute__((always_inline)) struct sk_buff *__vlan_put_tag(struct sk_buff *skb, unsigned short tag)
26257 struct vlan_ethhdr *veth;
26259 if (skb_headroom(skb) < 4) {
26260 struct sk_buff *sk_tmp = skb;
26261 skb = skb_realloc_headroom(sk_tmp, 4);
26264 printk("<3>" "vlan: failed to realloc headroom\n");
26265 return ((void *)0);
26268 skb = skb_unshare(skb, ((( gfp_t)0x20u)));
26270 printk("<3>" "vlan: failed to unshare skbuff\n");
26271 return ((void *)0);
26275 veth = (struct vlan_ethhdr *)skb_push(skb, 4);
26278 memmove(skb->data, skb->data + 4, 2 * 6);
26281 veth->h_vlan_proto = (( __be16)((__u16)( (((__u16)((0x8100)) & (__u16)0x00ffU) << 8) | (((__u16)((0x8100)) & (__u16)0xff00U) >> 8) )));
26284 veth->h_vlan_TCI = htons(tag);
26286 skb->protocol = (( __be16)((__u16)( (((__u16)((0x8100)) & (__u16)0x00ffU) << 8) | (((__u16)((0x8100)) & (__u16)0xff00U) >> 8) )));
26292 # 272 "include/linux/if_vlan.h"
26293 static inline __attribute__((always_inline)) struct sk_buff *__vlan_hwaccel_put_tag(struct sk_buff *skb, unsigned short tag)
26295 struct vlan_skb_tx_cookie *cookie;
26297 cookie = ((struct vlan_skb_tx_cookie *)&((skb)->cb[0]));
26298 cookie->magic = 0x564c414e;
26299 cookie->vlan_tag = tag;
26303 # 293 "include/linux/if_vlan.h"
26304 static inline __attribute__((always_inline)) struct sk_buff *vlan_put_tag(struct sk_buff *skb, unsigned short tag)
26306 if (skb->dev->features & 128) {
26307 return __vlan_hwaccel_put_tag(skb, tag);
26309 return __vlan_put_tag(skb, tag);
26312 # 309 "include/linux/if_vlan.h"
26313 static inline __attribute__((always_inline)) int __vlan_get_tag(struct sk_buff *skb, unsigned short *tag)
26315 struct vlan_ethhdr *veth = (struct vlan_ethhdr *)skb->data;
26317 if (veth->h_vlan_proto != (( __be16)((__u16)( (((__u16)((0x8100)) & (__u16)0x00ffU) << 8) | (((__u16)((0x8100)) & (__u16)0xff00U) >> 8) )))) {
26321 *tag = ntohs(veth->h_vlan_TCI);
26325 # 329 "include/linux/if_vlan.h"
26326 static inline __attribute__((always_inline)) int __vlan_hwaccel_get_tag(struct sk_buff *skb, unsigned short *tag)
26328 struct vlan_skb_tx_cookie *cookie;
26330 cookie = ((struct vlan_skb_tx_cookie *)&((skb)->cb[0]));
26331 if (cookie->magic == 0x564c414e) {
26332 *tag = cookie->vlan_tag;
26339 # 352 "include/linux/if_vlan.h"
26340 static inline __attribute__((always_inline)) int vlan_get_tag(struct sk_buff *skb, unsigned short *tag)
26342 if (skb->dev->features & 128) {
26343 return __vlan_hwaccel_get_tag(skb, tag);
26345 return __vlan_get_tag(skb, tag);
26354 enum vlan_ioctl_cmds {
26357 SET_VLAN_INGRESS_PRIORITY_CMD,
26358 SET_VLAN_EGRESS_PRIORITY_CMD,
26359 GET_VLAN_INGRESS_PRIORITY_CMD,
26360 GET_VLAN_EGRESS_PRIORITY_CMD,
26361 SET_VLAN_NAME_TYPE_CMD,
26363 GET_VLAN_REALDEV_NAME_CMD,
26367 enum vlan_name_types {
26368 VLAN_NAME_TYPE_PLUS_VID,
26369 VLAN_NAME_TYPE_RAW_PLUS_VID,
26370 VLAN_NAME_TYPE_PLUS_VID_NO_PAD,
26371 VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD,
26372 VLAN_NAME_TYPE_HIGHEST
26375 struct vlan_ioctl_args {
26382 unsigned int skb_priority;
26383 unsigned int name_type;
26384 unsigned int bind_type;
26390 # 10 "include/linux/netfilter_bridge.h" 2
26391 # 28 "include/linux/netfilter_bridge.h"
26392 enum nf_br_hook_priorities {
26393 NF_BR_PRI_FIRST = (-((int)(~0U>>1)) - 1),
26394 NF_BR_PRI_NAT_DST_BRIDGED = -300,
26395 NF_BR_PRI_FILTER_BRIDGED = -200,
26396 NF_BR_PRI_BRNF = 0,
26397 NF_BR_PRI_NAT_DST_OTHER = 100,
26398 NF_BR_PRI_FILTER_OTHER = 200,
26399 NF_BR_PRI_NAT_SRC = 300,
26400 NF_BR_PRI_LAST = ((int)(~0U>>1)),
26402 # 82 "net/ipv4/ip_output.c" 2
26403 # 1 "include/linux/mroute.h" 1
26404 # 34 "include/linux/mroute.h"
26405 typedef unsigned long vifbitmap_t;
26406 typedef unsigned short vifi_t;
26407 # 54 "include/linux/mroute.h"
26410 unsigned char vifc_flags;
26411 unsigned char vifc_threshold;
26412 unsigned int vifc_rate_limit;
26413 struct in_addr vifc_lcl_addr;
26414 struct in_addr vifc_rmt_addr;
26416 # 71 "include/linux/mroute.h"
26419 struct in_addr mfcc_origin;
26420 struct in_addr mfcc_mcastgrp;
26421 vifi_t mfcc_parent;
26422 unsigned char mfcc_ttls[32];
26423 unsigned int mfcc_pkt_cnt;
26424 unsigned int mfcc_byte_cnt;
26425 unsigned int mfcc_wrong_if;
26435 struct in_addr src;
26436 struct in_addr grp;
26437 unsigned long pktcnt;
26438 unsigned long bytecnt;
26439 unsigned long wrong_if;
26446 struct sioc_vif_req
26449 unsigned long icount;
26450 unsigned long ocount;
26451 unsigned long ibytes;
26452 unsigned long obytes;
26462 __u32 unused1,unused2;
26463 unsigned char im_msgtype;
26464 unsigned char im_mbz;
26465 unsigned char im_vif;
26466 unsigned char unused3;
26467 struct in_addr im_src,im_dst;
26469 # 131 "include/linux/mroute.h"
26470 extern int ip_mroute_setsockopt(struct sock *, int, char *, int);
26471 extern int ip_mroute_getsockopt(struct sock *, int, char *, int *);
26472 extern int ipmr_ioctl(struct sock *sk, int cmd, void *arg);
26473 extern void ip_mr_init(void);
26478 struct net_device *dev;
26479 unsigned long bytes_in,bytes_out;
26480 unsigned long pkt_in,pkt_out;
26481 unsigned long rate_limit;
26482 unsigned char threshold;
26483 unsigned short flags;
26484 __be32 local,remote;
26492 struct mfc_cache *next;
26493 __be32 mfc_mcastgrp;
26500 unsigned long expires;
26501 struct sk_buff_head unresolved;
26504 unsigned long last_assert;
26507 unsigned long bytes;
26509 unsigned long wrong_if;
26510 unsigned char ttls[32];
26514 # 212 "include/linux/mroute.h"
26523 extern int pim_rcv_v1(struct sk_buff *);
26526 extern int ipmr_get_route(struct sk_buff *skb, struct rtmsg *rtm, int nowait);
26527 # 83 "net/ipv4/ip_output.c" 2
26531 int sysctl_ip_default_ttl = 64;
26535 void ip_send_check(struct iphdr *iph)
26538 iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl);
26542 static int ip_dev_loopback_xmit(struct sk_buff *newskb)
26544 newskb->mac.raw = newskb->data;
26545 __skb_pull(newskb, newskb->nh.raw - newskb->data);
26546 newskb->pkt_type = 5;
26547 newskb->ip_summed = 2;
26548 do { if (__builtin_expect(!!(!(newskb->dst)), 0)) { printk("<3>" "KERNEL: assertion (%s) failed at %s (%d)\n", "newskb->dst", "net/ipv4/ip_output.c" , 103); } } while(0);
26553 static inline __attribute__((always_inline)) int ip_select_ttl(struct inet_sock *inet, struct dst_entry *dst)
26555 int ttl = inet->uc_ttl;
26558 ttl = dst_metric(dst, RTAX_HOPLIMIT);
26566 int ip_build_and_send_pkt(struct sk_buff *skb, struct sock *sk,
26567 __be32 saddr, __be32 daddr, struct ip_options *opt)
26569 struct inet_sock *inet = inet_sk(sk);
26570 struct rtable *rt = (struct rtable *)skb->dst;
26575 iph=(struct iphdr *)skb_push(skb,sizeof(struct iphdr) + opt->optlen);
26577 iph=(struct iphdr *)skb_push(skb,sizeof(struct iphdr));
26581 iph->tos = inet->tos;
26582 if (ip_dont_fragment(sk, &rt->u.dst))
26583 iph->frag_off = htons(0x4000);
26586 iph->ttl = ip_select_ttl(inet, &rt->u.dst);
26587 iph->daddr = rt->rt_dst;
26588 iph->saddr = rt->rt_src;
26589 iph->protocol = sk->sk_protocol;
26590 iph->tot_len = htons(skb->len);
26591 ip_select_ident(iph, &rt->u.dst, sk);
26594 if (opt && opt->optlen) {
26595 iph->ihl += opt->optlen>>2;
26596 ip_options_build(skb, opt, daddr, rt, 0);
26598 ip_send_check(iph);
26600 skb->priority = sk->sk_priority;
26603 return (dst_output)(skb);
26607 extern typeof(ip_build_and_send_pkt) ip_build_and_send_pkt; static const char __kstrtab_ip_build_and_send_pkt[] __attribute__((section("__ksymtab_strings"))) = "_" "ip_build_and_send_pkt"; static const struct kernel_symbol __ksymtab_ip_build_and_send_pkt __attribute__((__used__)) __attribute__((section("__ksymtab" "_gpl"), unused)) = { (unsigned long)&ip_build_and_send_pkt, __kstrtab_ip_build_and_send_pkt };
26609 static inline __attribute__((always_inline)) int ip_finish_output2(struct sk_buff *skb)
26611 struct dst_entry *dst = skb->dst;
26612 struct hh_cache *hh = dst->hh;
26613 struct net_device *dev = dst->dev;
26614 int hh_len = (((dev)->hard_header_len&~(16 - 1)) + 16);
26617 if (__builtin_expect(!!(skb_headroom(skb) < hh_len && dev->hard_header), 0)) {
26618 struct sk_buff *skb2;
26620 skb2 = skb_realloc_headroom(skb, (((dev)->hard_header_len&~(16 - 1)) + 16));
26621 if (skb2 == ((void *)0)) {
26626 skb_set_owner_w(skb2, skb->sk);
26634 do { local_bh_disable(); do { do { } while (0); (void)0; (void)(&hh->hh_lock); } while (0); } while (0);
26635 hh_alen = (((hh->hh_len)+(16 -1))&~(16 - 1));
26636 memcpy(skb->data - hh_alen, hh->hh_data, hh_alen);
26637 do { do { } while (0); local_bh_enable(); (void)0; (void)(&hh->hh_lock); } while (0);
26638 skb_push(skb, hh->hh_len);
26639 return hh->hh_output(skb);
26640 } else if (dst->neighbour)
26641 return dst->neighbour->output(skb);
26643 if (net_ratelimit())
26644 printk("<7>" "ip_finish_output2: No header cache and no neighbour!\n");
26649 static inline __attribute__((always_inline)) int ip_finish_output(struct sk_buff *skb)
26658 if (skb->len > dst_mtu(skb->dst) && !skb_is_gso(skb))
26659 return ip_fragment(skb, ip_finish_output2);
26661 return ip_finish_output2(skb);
26664 int ip_mc_output(struct sk_buff *skb)
26666 struct sock *sk = skb->sk;
26667 struct rtable *rt = (struct rtable*)skb->dst;
26668 struct net_device *dev = rt->u.dst.dev;
26673 (({ (void)((0)); ((ip_statistics[!(((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8))))])); })->mibs[IPSTATS_MIB_OUTREQUESTS]++);
26676 skb->protocol = htons(0x0800);
26682 if (rt->rt_flags&0x20000000) {
26683 if ((!sk || inet_sk(sk)->mc_loop)
26684 # 250 "net/ipv4/ip_output.c"
26686 struct sk_buff *newskb = skb_clone(skb, ((( gfp_t)0x20u)));
26688 (ip_dev_loopback_xmit)(newskb);
26695 if (skb->nh.iph->ttl == 0) {
26701 if (rt->rt_flags&0x10000000) {
26702 struct sk_buff *newskb = skb_clone(skb, ((( gfp_t)0x20u)));
26704 (ip_dev_loopback_xmit)(newskb);
26708 return (ip_finish_output)(skb);
26713 int ip_output(struct sk_buff *skb)
26715 struct net_device *dev = skb->dst->dev;
26717 (({ (void)((0)); ((ip_statistics[!(((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8))))])); })->mibs[IPSTATS_MIB_OUTREQUESTS]++);
26720 skb->protocol = htons(0x0800);
26722 return (ip_finish_output)(skb);
26727 int ip_queue_xmit(struct sk_buff *skb, int ipfragok)
26729 struct sock *sk = skb->sk;
26730 struct inet_sock *inet = inet_sk(sk);
26731 struct ip_options *opt = inet->opt;
26738 rt = (struct rtable *) skb->dst;
26739 if (rt != ((void *)0))
26740 goto packet_routed;
26743 rt = (struct rtable *)__sk_dst_check(sk, 0);
26744 if (rt == ((void *)0)) {
26748 daddr = inet->daddr;
26749 if(opt && opt->srr)
26750 daddr = opt->faddr;
26753 struct flowi fl = { .oif = sk->__sk_common.skc_bound_dev_if,
26756 .saddr = inet->saddr,
26757 .tos = (((inet_sk(sk)->tos)&0x1E) | sock_flag(sk, SOCK_LOCALROUTE)) } },
26758 .proto = sk->sk_protocol,
26759 .uli_u = { .ports =
26760 { .sport = inet->sport,
26761 .dport = inet->dport } } };
26767 security_sk_classify_flow(sk, &fl);
26768 if (ip_route_output_flow(&rt, &fl, sk, 0))
26771 sk_setup_caps(sk, &rt->u.dst);
26773 skb->dst = dst_clone(&rt->u.dst);
26776 if (opt && opt->is_strictroute && rt->rt_dst != rt->rt_gateway)
26780 iph = (struct iphdr *) skb_push(skb, sizeof(struct iphdr) + (opt ? opt->optlen : 0));
26781 *((__u16 *)iph) = htons((4 << 12) | (5 << 8) | (inet->tos & 0xff));
26782 iph->tot_len = htons(skb->len);
26783 if (ip_dont_fragment(sk, &rt->u.dst) && !ipfragok)
26784 iph->frag_off = htons(0x4000);
26787 iph->ttl = ip_select_ttl(inet, &rt->u.dst);
26788 iph->protocol = sk->sk_protocol;
26789 iph->saddr = rt->rt_src;
26790 iph->daddr = rt->rt_dst;
26794 if (opt && opt->optlen) {
26795 iph->ihl += opt->optlen >> 2;
26796 ip_options_build(skb, opt, inet->daddr, rt, 0);
26799 ip_select_ident_more(iph, &rt->u.dst, sk,
26800 (((struct skb_shared_info *)((skb)->end))->gso_segs ?: 1) - 1);
26803 ip_send_check(iph);
26805 skb->priority = sk->sk_priority;
26807 return (dst_output)(skb);
26811 (({ (void)((0)); ((ip_statistics[!(((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8))))])); })->mibs[IPSTATS_MIB_OUTNOROUTES]++);
26817 static void ip_copy_metadata(struct sk_buff *to, struct sk_buff *from)
26819 to->pkt_type = from->pkt_type;
26820 to->priority = from->priority;
26821 to->protocol = from->protocol;
26822 dst_release(to->dst);
26823 to->dst = dst_clone(from->dst);
26824 to->dev = from->dev;
26827 ((struct inet_skb_parm*)((to)->cb))->flags = ((struct inet_skb_parm*)((from)->cb))->flags;
26828 # 413 "net/ipv4/ip_output.c"
26829 skb_copy_secmark(to, from);
26831 # 423 "net/ipv4/ip_output.c"
26832 int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*))
26837 struct net_device *dev;
26838 struct sk_buff *skb2;
26839 unsigned int mtu, hlen, left, len, ll_rs, pad;
26841 __be16 not_last_frag;
26842 struct rtable *rt = (struct rtable*)skb->dst;
26845 dev = rt->u.dst.dev;
26853 if (__builtin_expect(!!((iph->frag_off & htons(0x4000)) && !skb->local_df), 0)) {
26854 (({ (void)((0)); ((ip_statistics[!(((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8))))])); })->mibs[IPSTATS_MIB_FRAGFAILS]++);
26855 icmp_send(skb, 3, 4,
26856 htonl(dst_mtu(&rt->u.dst)));
26865 hlen = iph->ihl * 4;
26866 mtu = dst_mtu(&rt->u.dst) - hlen;
26867 ((struct inet_skb_parm*)((skb)->cb))->flags |= 8;
26868 # 467 "net/ipv4/ip_output.c"
26869 if (((struct skb_shared_info *)((skb)->end))->frag_list) {
26870 struct sk_buff *frag;
26871 int first_len = skb_pagelen(skb);
26873 if (first_len - hlen > mtu ||
26874 ((first_len - hlen) & 7) ||
26875 (iph->frag_off & htons(0x2000|0x1FFF)) ||
26879 for (frag = ((struct skb_shared_info *)((skb)->end))->frag_list; frag; frag = frag->next) {
26881 if (frag->len > mtu ||
26882 ((frag->len & 7) && frag->next) ||
26883 skb_headroom(frag) < hlen)
26887 if (skb_shared(frag))
26890 do { if (__builtin_expect(!!((frag->sk)!=0), 0)) do { dump_stack(); printk("<4>" "\nkernel BUG at %s:%d!\n", "net/ipv4/ip_output.c", 488); panic("BUG!"); } while (0); } while(0);
26892 sock_hold(skb->sk);
26893 frag->sk = skb->sk;
26894 frag->destructor = sock_wfree;
26895 skb->truesize -= frag->truesize;
26903 frag = ((struct skb_shared_info *)((skb)->end))->frag_list;
26904 ((struct skb_shared_info *)((skb)->end))->frag_list = ((void *)0);
26905 skb->data_len = first_len - skb_headlen(skb);
26906 skb->len = first_len;
26907 iph->tot_len = htons(first_len);
26908 iph->frag_off = htons(0x2000);
26909 ip_send_check(iph);
26915 frag->ip_summed = 0;
26916 frag->h.raw = frag->data;
26917 frag->nh.raw = __skb_push(frag, hlen);
26918 memcpy(frag->nh.raw, iph, hlen);
26919 iph = frag->nh.iph;
26920 iph->tot_len = htons(frag->len);
26921 ip_copy_metadata(frag, skb);
26923 ip_options_fragment(frag);
26924 offset += skb->len - hlen;
26925 iph->frag_off = htons(offset>>3);
26926 if (frag->next != ((void *)0))
26927 iph->frag_off |= htons(0x2000);
26929 ip_send_check(iph);
26935 (({ (void)((0)); ((ip_statistics[!(((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8))))])); })->mibs[IPSTATS_MIB_FRAGCREATES]++);
26941 skb->next = ((void *)0);
26945 (({ (void)((0)); ((ip_statistics[!(((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8))))])); })->mibs[IPSTATS_MIB_FRAGOKS]++);
26954 (({ (void)((0)); ((ip_statistics[!(((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8))))])); })->mibs[IPSTATS_MIB_FRAGFAILS]++);
26959 left = skb->len - hlen;
26966 ll_rs = ((((rt->u.dst.dev)->hard_header_len+pad)&~(16 - 1)) + 16);
26973 offset = (ntohs(iph->frag_off) & 0x1FFF) << 3;
26974 not_last_frag = iph->frag_off & htons(0x2000);
26994 if ((skb2 = alloc_skb(len+hlen+ll_rs, ((( gfp_t)0x20u)))) == ((void *)0)) {
27004 ip_copy_metadata(skb2, skb);
27005 skb_reserve(skb2, ll_rs);
27006 skb_put(skb2, len + hlen);
27007 skb2->nh.raw = skb2->data;
27008 skb2->h.raw = skb2->data + hlen;
27016 skb_set_owner_w(skb2, skb->sk);
27022 memcpy(skb2->nh.raw, skb->data, hlen);
27027 if (skb_copy_bits(skb, ptr, skb2->h.raw, len))
27028 do { dump_stack(); printk("<4>" "\nkernel BUG at %s:%d!\n", "net/ipv4/ip_output.c", 626); panic("BUG!"); } while (0);
27034 iph = skb2->nh.iph;
27035 iph->frag_off = htons((offset >> 3));
27044 ip_options_fragment(skb);
27050 if (left > 0 || not_last_frag)
27051 iph->frag_off |= htons(0x2000);
27058 iph->tot_len = htons(len + hlen);
27060 ip_send_check(iph);
27062 err = output(skb2);
27066 (({ (void)((0)); ((ip_statistics[!(((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8))))])); })->mibs[IPSTATS_MIB_FRAGCREATES]++);
27069 (({ (void)((0)); ((ip_statistics[!(((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8))))])); })->mibs[IPSTATS_MIB_FRAGOKS]++);
27074 (({ (void)((0)); ((ip_statistics[!(((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8))))])); })->mibs[IPSTATS_MIB_FRAGFAILS]++);
27078 extern typeof(ip_fragment) ip_fragment; static const char __kstrtab_ip_fragment[] __attribute__((section("__ksymtab_strings"))) = "_" "ip_fragment"; static const struct kernel_symbol __ksymtab_ip_fragment __attribute__((__used__)) __attribute__((section("__ksymtab" ""), unused)) = { (unsigned long)&ip_fragment, __kstrtab_ip_fragment };
27081 ip_generic_getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb)
27083 struct iovec *iov = from;
27085 if (skb->ip_summed == 1) {
27086 if (memcpy_fromiovecend(to, iov, offset, len) < 0)
27089 unsigned int csum = 0;
27090 if (csum_partial_copy_fromiovecend(to, iov, offset, len, &csum) < 0)
27092 skb->csum = csum_block_add(skb->csum, csum, odd);
27097 static inline __attribute__((always_inline)) unsigned int
27098 csum_page(struct page *page, int offset, int copy)
27102 kaddr = kmap(page);
27103 csum = csum_partial(kaddr + offset, copy, 0);
27104 do { (void) (page); } while (0);
27108 static inline __attribute__((always_inline)) int ip_ufo_append_data(struct sock *sk,
27109 int getfrag(void *from, char *to, int offset, int len,
27110 int odd, struct sk_buff *skb),
27111 void *from, int length, int hh_len, int fragheaderlen,
27112 int transhdrlen, int mtu,unsigned int flags)
27114 struct sk_buff *skb;
27121 if ((skb = skb_peek_tail(&sk->sk_write_queue)) == ((void *)0)) {
27122 skb = sock_alloc_send_skb(sk,
27123 hh_len + fragheaderlen + transhdrlen + 20,
27124 (flags & 0x40), &err);
27126 if (skb == ((void *)0))
27130 skb_reserve(skb, hh_len);
27133 skb_put(skb,fragheaderlen + transhdrlen);
27136 skb->nh.raw = skb->data;
27139 skb->h.raw = skb->data + fragheaderlen;
27141 skb->ip_summed = 1;
27143 sk->sk_sndmsg_off = 0;
27146 err = skb_append_datato_frags(sk,skb, getfrag, from,
27147 (length - transhdrlen));
27150 ((struct skb_shared_info *)((skb)->end))->gso_size = mtu - fragheaderlen;
27151 ((struct skb_shared_info *)((skb)->end))->gso_type = SKB_GSO_UDP;
27152 __skb_queue_tail(&sk->sk_write_queue, skb);
27162 # 772 "net/ipv4/ip_output.c"
27163 int ip_append_data(struct sock *sk,
27164 int getfrag(void *from, char *to, int offset, int len,
27165 int odd, struct sk_buff *skb),
27166 void *from, int length, int transhdrlen,
27167 struct ipcm_cookie *ipc, struct rtable *rt,
27168 unsigned int flags)
27170 struct inet_sock *inet = inet_sk(sk);
27171 struct sk_buff *skb;
27173 struct ip_options *opt = ((void *)0);
27180 unsigned int maxfraglen, fragheaderlen;
27186 if (skb_queue_empty(&sk->sk_write_queue)) {
27192 if (inet->cork.opt == ((void *)0)) {
27193 inet->cork.opt = kmalloc(sizeof(struct ip_options) + 40, sk->sk_allocation);
27194 if (__builtin_expect(!!(inet->cork.opt == ((void *)0)), 0))
27197 memcpy(inet->cork.opt, opt, sizeof(struct ip_options)+opt->optlen);
27198 inet->cork.flags |= 1;
27199 inet->cork.addr = ipc->addr;
27201 dst_hold(&rt->u.dst);
27202 inet->cork.fragsize = mtu = dst_mtu(rt->u.dst.path);
27203 inet->cork.rt = rt;
27204 inet->cork.length = 0;
27205 sk->sk_sndmsg_page = ((void *)0);
27206 sk->sk_sndmsg_off = 0;
27207 if ((exthdrlen = rt->u.dst.header_len) != 0) {
27208 length += exthdrlen;
27209 transhdrlen += exthdrlen;
27212 rt = inet->cork.rt;
27213 if (inet->cork.flags & 1)
27214 opt = inet->cork.opt;
27218 mtu = inet->cork.fragsize;
27220 hh_len = (((rt->u.dst.dev)->hard_header_len&~(16 - 1)) + 16);
27222 fragheaderlen = sizeof(struct iphdr) + (opt ? opt->optlen : 0);
27223 maxfraglen = ((mtu - fragheaderlen) & ~7) + fragheaderlen;
27225 if (inet->cork.length + length > 0xFFFF - fragheaderlen) {
27226 ip_local_error(sk, 90, rt->rt_dst, inet->dport, mtu-exthdrlen);
27235 length + fragheaderlen <= mtu &&
27236 rt->u.dst.dev->features & (2 | (4 | 8)) &&
27240 inet->cork.length += length;
27241 if (((length > mtu) && (sk->sk_protocol == IPPROTO_UDP)) &&
27242 (rt->u.dst.dev->features & (SKB_GSO_UDP << 16))) {
27244 err = ip_ufo_append_data(sk, getfrag, from, length, hh_len,
27245 fragheaderlen, transhdrlen, mtu,
27251 # 868 "net/ipv4/ip_output.c"
27252 if ((skb = skb_peek_tail(&sk->sk_write_queue)) == ((void *)0))
27253 goto alloc_new_skb;
27255 while (length > 0) {
27257 copy = mtu - skb->len;
27259 copy = maxfraglen - skb->len;
27262 unsigned int datalen;
27263 unsigned int fraglen;
27264 unsigned int fraggap;
27265 unsigned int alloclen;
27266 struct sk_buff *skb_prev;
27270 fraggap = skb_prev->len - maxfraglen;
27278 datalen = length + fraggap;
27279 if (datalen > mtu - fragheaderlen)
27280 datalen = maxfraglen - fragheaderlen;
27281 fraglen = datalen + fragheaderlen;
27283 if ((flags & 0x8000) &&
27284 !(rt->u.dst.dev->features&1))
27287 alloclen = datalen + fragheaderlen;
27294 if (datalen == length + fraggap)
27295 alloclen += rt->u.dst.trailer_len;
27298 skb = sock_alloc_send_skb(sk,
27299 alloclen + hh_len + 15,
27300 (flags & 0x40), &err);
27303 if (((&sk->sk_wmem_alloc)->counter) <=
27305 skb = sock_wmalloc(sk,
27306 alloclen + hh_len + 15, 1,
27307 sk->sk_allocation);
27308 if (__builtin_expect(!!(skb == ((void *)0)), 0))
27311 if (skb == ((void *)0))
27317 skb->ip_summed = csummode;
27319 skb_reserve(skb, hh_len);
27324 data = skb_put(skb, fraglen);
27325 skb->nh.raw = data + exthdrlen;
27326 data += fragheaderlen;
27327 skb->h.raw = data + exthdrlen;
27330 skb->csum = skb_copy_and_csum_bits(
27331 skb_prev, maxfraglen,
27332 data + transhdrlen, fraggap, 0);
27333 skb_prev->csum = csum_sub(skb_prev->csum,
27336 pskb_trim_unique(skb_prev, maxfraglen);
27339 copy = datalen - transhdrlen - fraggap;
27340 if (copy > 0 && getfrag(from, data + transhdrlen, offset, copy, fraggap, skb) < 0) {
27347 length -= datalen - fraggap;
27355 __skb_queue_tail(&sk->sk_write_queue, skb);
27362 if (!(rt->u.dst.dev->features&1)) {
27366 if (getfrag(from, skb_put(skb, copy),
27367 offset, copy, off, skb) < 0) {
27368 __skb_trim(skb, off);
27373 int i = ((struct skb_shared_info *)((skb)->end))->nr_frags;
27374 skb_frag_t *frag = &((struct skb_shared_info *)((skb)->end))->frags[i-1];
27375 struct page *page = sk->sk_sndmsg_page;
27376 int off = sk->sk_sndmsg_off;
27379 if (page && (left = (1UL << 12) - off) > 0) {
27382 if (page != frag->page) {
27383 if (i == (65536/(1UL << 12) + 2)) {
27388 skb_fill_page_desc(skb, i, page, sk->sk_sndmsg_off, 0);
27389 frag = &((struct skb_shared_info *)((skb)->end))->frags[i];
27391 } else if (i < (65536/(1UL << 12) + 2)) {
27392 if (copy > (1UL << 12))
27393 copy = (1UL << 12);
27394 page = alloc_pages_node(((0)), sk->sk_allocation, 0);
27395 if (page == ((void *)0)) {
27399 sk->sk_sndmsg_page = page;
27400 sk->sk_sndmsg_off = 0;
27402 skb_fill_page_desc(skb, i, page, 0, 0);
27403 frag = &((struct skb_shared_info *)((skb)->end))->frags[i];
27404 skb->truesize += (1UL << 12);
27405 atomic_add((1UL << 12), &sk->sk_wmem_alloc);
27410 if (getfrag(from, lowmem_page_address(frag->page)+frag->page_offset+frag->size, offset, copy, skb->len, skb) < 0) {
27414 sk->sk_sndmsg_off += copy;
27415 frag->size += copy;
27417 skb->data_len += copy;
27426 inet->cork.length -= length;
27427 (({ (void)((0)); ((ip_statistics[!(((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8))))])); })->mibs[IPSTATS_MIB_OUTDISCARDS]++);
27431 ssize_t ip_append_page(struct sock *sk, struct page *page,
27432 int offset, size_t size, int flags)
27434 struct inet_sock *inet = inet_sk(sk);
27435 struct sk_buff *skb;
27437 struct ip_options *opt = ((void *)0);
27442 unsigned int maxfraglen, fragheaderlen, fraggap;
27450 if (skb_queue_empty(&sk->sk_write_queue))
27453 rt = inet->cork.rt;
27454 if (inet->cork.flags & 1)
27455 opt = inet->cork.opt;
27457 if (!(rt->u.dst.dev->features&1))
27460 hh_len = (((rt->u.dst.dev)->hard_header_len&~(16 - 1)) + 16);
27461 mtu = inet->cork.fragsize;
27463 fragheaderlen = sizeof(struct iphdr) + (opt ? opt->optlen : 0);
27464 maxfraglen = ((mtu - fragheaderlen) & ~7) + fragheaderlen;
27466 if (inet->cork.length + size > 0xFFFF - fragheaderlen) {
27467 ip_local_error(sk, 90, rt->rt_dst, inet->dport, mtu);
27471 if ((skb = skb_peek_tail(&sk->sk_write_queue)) == ((void *)0))
27474 inet->cork.length += size;
27475 if ((sk->sk_protocol == IPPROTO_UDP) &&
27476 (rt->u.dst.dev->features & (SKB_GSO_UDP << 16))) {
27477 ((struct skb_shared_info *)((skb)->end))->gso_size = mtu - fragheaderlen;
27478 ((struct skb_shared_info *)((skb)->end))->gso_type = SKB_GSO_UDP;
27485 if (skb_is_gso(skb))
27490 len = mtu - skb->len;
27492 len = maxfraglen - skb->len;
27495 struct sk_buff *skb_prev;
27501 fraggap = skb_prev->len - maxfraglen;
27503 alloclen = fragheaderlen + hh_len + fraggap + 15;
27504 skb = sock_wmalloc(sk, alloclen, 1, sk->sk_allocation);
27505 if (__builtin_expect(!!(!skb), 0)) {
27513 skb->ip_summed = 0;
27515 skb_reserve(skb, hh_len);
27520 data = skb_put(skb, fragheaderlen + fraggap);
27521 skb->nh.iph = iph = (struct iphdr *)data;
27522 data += fragheaderlen;
27526 skb->csum = skb_copy_and_csum_bits(
27527 skb_prev, maxfraglen,
27529 skb_prev->csum = csum_sub(skb_prev->csum,
27531 pskb_trim_unique(skb_prev, maxfraglen);
27537 __skb_queue_tail(&sk->sk_write_queue, skb);
27541 i = ((struct skb_shared_info *)((skb)->end))->nr_frags;
27544 if (skb_can_coalesce(skb, i, page, offset)) {
27545 ((struct skb_shared_info *)((skb)->end))->frags[i-1].size += len;
27546 } else if (i < (65536/(1UL << 12) + 2)) {
27548 skb_fill_page_desc(skb, i, page, offset, len);
27554 if (skb->ip_summed == 0) {
27556 csum = csum_page(page, offset, len);
27557 skb->csum = csum_block_add(skb->csum, csum, skb->len);
27561 skb->data_len += len;
27568 inet->cork.length -= size;
27569 (({ (void)((0)); ((ip_statistics[!(((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8))))])); })->mibs[IPSTATS_MIB_OUTDISCARDS]++);
27577 int ip_push_pending_frames(struct sock *sk)
27579 struct sk_buff *skb, *tmp_skb;
27580 struct sk_buff **tail_skb;
27581 struct inet_sock *inet = inet_sk(sk);
27582 struct ip_options *opt = ((void *)0);
27583 struct rtable *rt = inet->cork.rt;
27589 if ((skb = __skb_dequeue(&sk->sk_write_queue)) == ((void *)0))
27591 tail_skb = &(((struct skb_shared_info *)((skb)->end))->frag_list);
27594 if (skb->data < skb->nh.raw)
27595 __skb_pull(skb, skb->nh.raw - skb->data);
27596 while ((tmp_skb = __skb_dequeue(&sk->sk_write_queue)) != ((void *)0)) {
27597 __skb_pull(tmp_skb, skb->h.raw - skb->nh.raw);
27598 *tail_skb = tmp_skb;
27599 tail_skb = &(tmp_skb->next);
27600 skb->len += tmp_skb->len;
27601 skb->data_len += tmp_skb->len;
27602 skb->truesize += tmp_skb->truesize;
27603 __sock_put(tmp_skb->sk);
27604 tmp_skb->destructor = ((void *)0);
27605 tmp_skb->sk = ((void *)0);
27612 if (inet->pmtudisc != 2)
27618 if (inet->pmtudisc == 2 ||
27619 (skb->len <= dst_mtu(&rt->u.dst) &&
27620 ip_dont_fragment(sk, &rt->u.dst)))
27621 df = htons(0x4000);
27623 if (inet->cork.flags & 1)
27624 opt = inet->cork.opt;
27626 if (rt->rt_type == RTN_MULTICAST)
27627 ttl = inet->mc_ttl;
27629 ttl = ip_select_ttl(inet, &rt->u.dst);
27631 iph = (struct iphdr *)skb->data;
27635 iph->ihl += opt->optlen>>2;
27636 ip_options_build(skb, opt, inet->cork.addr, rt, 0);
27638 iph->tos = inet->tos;
27639 iph->tot_len = htons(skb->len);
27640 iph->frag_off = df;
27641 ip_select_ident(iph, &rt->u.dst, sk);
27643 iph->protocol = sk->sk_protocol;
27644 iph->saddr = rt->rt_src;
27645 iph->daddr = rt->rt_dst;
27646 ip_send_check(iph);
27648 skb->priority = sk->sk_priority;
27649 skb->dst = dst_clone(&rt->u.dst);
27652 err = (dst_output)(skb);
27656 err = inet->recverr ? ((err) != 2 ? -105 : 0) : 0;
27662 inet->cork.flags &= ~1;
27663 kfree(inet->cork.opt);
27664 inet->cork.opt = ((void *)0);
27665 if (inet->cork.rt) {
27666 ip_rt_put(inet->cork.rt);
27667 inet->cork.rt = ((void *)0);
27672 (({ (void)((0)); ((ip_statistics[!(((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8))))])); })->mibs[IPSTATS_MIB_OUTDISCARDS]++);
27679 void ip_flush_pending_frames(struct sock *sk)
27681 struct inet_sock *inet = inet_sk(sk);
27682 struct sk_buff *skb;
27684 while ((skb = __skb_dequeue_tail(&sk->sk_write_queue)) != ((void *)0))
27687 inet->cork.flags &= ~1;
27688 kfree(inet->cork.opt);
27689 inet->cork.opt = ((void *)0);
27690 if (inet->cork.rt) {
27691 ip_rt_put(inet->cork.rt);
27692 inet->cork.rt = ((void *)0);
27700 static int ip_reply_glue_bits(void *dptr, char *to, int offset,
27701 int len, int odd, struct sk_buff *skb)
27705 csum = csum_partial_copy((dptr+offset), (to), (len), (0));
27706 skb->csum = csum_block_add(skb->csum, csum, odd);
27709 # 1335 "net/ipv4/ip_output.c"
27710 void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *arg,
27713 struct inet_sock *inet = inet_sk(sk);
27715 struct ip_options opt;
27718 struct ipcm_cookie ipc;
27720 struct rtable *rt = (struct rtable*)skb->dst;
27722 if (ip_options_echo(&replyopts.opt, skb))
27725 daddr = ipc.addr = rt->rt_src;
27726 ipc.opt = ((void *)0);
27728 if (replyopts.opt.optlen) {
27729 ipc.opt = &replyopts.opt;
27732 daddr = replyopts.opt.faddr;
27736 struct flowi fl = { .nl_u = { .ip4_u =
27738 .saddr = rt->rt_spec_dst,
27739 .tos = ((skb->nh.iph->tos)&0x1E) } },
27741 .uli_u = { .ports =
27742 { .sport = skb->h.th->dest,
27743 .dport = skb->h.th->source } },
27744 .proto = sk->sk_protocol };
27745 security_skb_classify_flow(skb, &fl);
27746 if (ip_route_output_key(&rt, &fl))
27756 do { do { } while (0); (void)0; (void)(&((sk)->sk_lock.slock)); } while (0);
27757 inet->tos = skb->nh.iph->tos;
27758 sk->sk_priority = skb->priority;
27759 sk->sk_protocol = skb->nh.iph->protocol;
27760 ip_append_data(sk, ip_reply_glue_bits, arg->iov->iov_base, len, 0,
27762 if ((skb = skb_peek(&sk->sk_write_queue)) != ((void *)0)) {
27763 if (arg->csumoffset >= 0)
27764 *((u16 *)skb->h.raw + arg->csumoffset) = csum_fold(csum_add(skb->csum, arg->csum));
27765 skb->ip_summed = 0;
27766 ip_push_pending_frames(sk);
27769 do { do { } while (0); (void)0; (void)(&((sk)->sk_lock.slock)); } while (0);
27774 void __attribute__ ((__section__ (".init.text"))) ip_init(void)
27784 extern typeof(ip_generic_getfrag) ip_generic_getfrag; static const char __kstrtab_ip_generic_getfrag[] __attribute__((section("__ksymtab_strings"))) = "_" "ip_generic_getfrag"; static const struct kernel_symbol __ksymtab_ip_generic_getfrag __attribute__((__used__)) __attribute__((section("__ksymtab" ""), unused)) = { (unsigned long)&ip_generic_getfrag, __kstrtab_ip_generic_getfrag };
27785 extern typeof(ip_queue_xmit) ip_queue_xmit; static const char __kstrtab_ip_queue_xmit[] __attribute__((section("__ksymtab_strings"))) = "_" "ip_queue_xmit"; static const struct kernel_symbol __ksymtab_ip_queue_xmit __attribute__((__used__)) __attribute__((section("__ksymtab" ""), unused)) = { (unsigned long)&ip_queue_xmit, __kstrtab_ip_queue_xmit };
27786 extern typeof(ip_send_check) ip_send_check; static const char __kstrtab_ip_send_check[] __attribute__((section("__ksymtab_strings"))) = "_" "ip_send_check"; static const struct kernel_symbol __ksymtab_ip_send_check __attribute__((__used__)) __attribute__((section("__ksymtab" ""), unused)) = { (unsigned long)&ip_send_check, __kstrtab_ip_send_check };