Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 285999 Details for
Bug 382423
Hostapd fails to build with >=libnl-2.0
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Preprocessor output
preprocessor-output (text/plain), 218.90 KB, created by
Bjarke Istrup Pedersen (RETIRED)
on 2011-09-09 20:55:15 UTC
(
hide
)
Description:
Preprocessor output
Filename:
MIME Type:
Creator:
Bjarke Istrup Pedersen (RETIRED)
Created:
2011-09-09 20:55:15 UTC
Size:
218.90 KB
patch
obsolete
># 1 "ieee802_1x.c" ># 1 "<built-in>" ># 1 "<command-line>" ># 1 "ieee802_1x.c" ># 15 "ieee802_1x.c" ># 1 "../utils/includes.h" 1 ># 23 "../utils/includes.h" ># 1 "../utils/build_config.h" 1 ># 24 "../utils/includes.h" 2 > ># 1 "/usr/include/stdlib.h" 1 3 4 ># 25 "/usr/include/stdlib.h" 3 4 ># 1 "/usr/include/features.h" 1 3 4 ># 357 "/usr/include/features.h" 3 4 ># 1 "/usr/include/sys/cdefs.h" 1 3 4 ># 353 "/usr/include/sys/cdefs.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 354 "/usr/include/sys/cdefs.h" 2 3 4 ># 358 "/usr/include/features.h" 2 3 4 ># 381 "/usr/include/features.h" 3 4 ># 1 "/usr/include/gnu/stubs.h" 1 3 4 > > > ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 5 "/usr/include/gnu/stubs.h" 2 3 4 > > ># 1 "/usr/include/gnu/stubs-32.h" 1 3 4 ># 8 "/usr/include/gnu/stubs.h" 2 3 4 ># 382 "/usr/include/features.h" 2 3 4 ># 26 "/usr/include/stdlib.h" 2 3 4 > > > > > > > ># 1 "/usr/lib/gcc/i586-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 ># 211 "/usr/lib/gcc/i586-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 >typedef unsigned int size_t; ># 323 "/usr/lib/gcc/i586-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 >typedef long int wchar_t; ># 34 "/usr/include/stdlib.h" 2 3 4 > > > > > > > > ># 1 "/usr/include/bits/waitflags.h" 1 3 4 ># 43 "/usr/include/stdlib.h" 2 3 4 ># 1 "/usr/include/bits/waitstatus.h" 1 3 4 ># 65 "/usr/include/bits/waitstatus.h" 3 4 ># 1 "/usr/include/endian.h" 1 3 4 ># 37 "/usr/include/endian.h" 3 4 ># 1 "/usr/include/bits/endian.h" 1 3 4 ># 38 "/usr/include/endian.h" 2 3 4 ># 61 "/usr/include/endian.h" 3 4 ># 1 "/usr/include/bits/byteswap.h" 1 3 4 ># 62 "/usr/include/endian.h" 2 3 4 ># 66 "/usr/include/bits/waitstatus.h" 2 3 4 > >union wait > { > int w_status; > struct > { > > unsigned int __w_termsig:7; > unsigned int __w_coredump:1; > unsigned int __w_retcode:8; > unsigned int:16; > > > > > > > > } __wait_terminated; > struct > { > > unsigned int __w_stopval:8; > unsigned int __w_stopsig:8; > unsigned int:16; > > > > > > > } __wait_stopped; > }; ># 44 "/usr/include/stdlib.h" 2 3 4 ># 68 "/usr/include/stdlib.h" 3 4 >typedef union > { > union wait *__uptr; > int *__iptr; > } __WAIT_STATUS __attribute__ ((__transparent_union__)); ># 96 "/usr/include/stdlib.h" 3 4 > > >typedef struct > { > int quot; > int rem; > } div_t; > > > >typedef struct > { > long int quot; > long int rem; > } ldiv_t; > > > > > > > >__extension__ typedef struct > { > long long int quot; > long long int rem; > } lldiv_t; > > ># 140 "/usr/include/stdlib.h" 3 4 >extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__)) ; > > > > >extern double atof (__const char *__nptr) > __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; > >extern int atoi (__const char *__nptr) > __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; > >extern long int atol (__const char *__nptr) > __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; > > > > > >__extension__ extern long long int atoll (__const char *__nptr) > __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; > > > > > >extern double strtod (__const char *__restrict __nptr, > char **__restrict __endptr) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; > > > > > >extern float strtof (__const char *__restrict __nptr, > char **__restrict __endptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; > >extern long double strtold (__const char *__restrict __nptr, > char **__restrict __endptr) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; > > > > > >extern long int strtol (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; > >extern unsigned long int strtoul (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; > > > > >__extension__ >extern long long int strtoq (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; > >__extension__ >extern unsigned long long int strtouq (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; > > > > > >__extension__ >extern long long int strtoll (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; > >__extension__ >extern unsigned long long int strtoull (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; > ># 311 "/usr/include/stdlib.h" 3 4 >extern char *l64a (long int __n) __attribute__ ((__nothrow__)) ; > > >extern long int a64l (__const char *__s) > __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; > > > > ># 1 "/usr/include/sys/types.h" 1 3 4 ># 28 "/usr/include/sys/types.h" 3 4 > > ># 1 "/usr/include/bits/types.h" 1 3 4 ># 28 "/usr/include/bits/types.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 29 "/usr/include/bits/types.h" 2 3 4 > > >typedef unsigned char __u_char; >typedef unsigned short int __u_short; >typedef unsigned int __u_int; >typedef unsigned long int __u_long; > > >typedef signed char __int8_t; >typedef unsigned char __uint8_t; >typedef signed short int __int16_t; >typedef unsigned short int __uint16_t; >typedef signed int __int32_t; >typedef unsigned int __uint32_t; > > > > >__extension__ typedef signed long long int __int64_t; >__extension__ typedef unsigned long long int __uint64_t; > > > > > > > >__extension__ typedef long long int __quad_t; >__extension__ typedef unsigned long long int __u_quad_t; ># 131 "/usr/include/bits/types.h" 3 4 ># 1 "/usr/include/bits/typesizes.h" 1 3 4 ># 132 "/usr/include/bits/types.h" 2 3 4 > > >__extension__ typedef __u_quad_t __dev_t; >__extension__ typedef unsigned int __uid_t; >__extension__ typedef unsigned int __gid_t; >__extension__ typedef unsigned long int __ino_t; >__extension__ typedef __u_quad_t __ino64_t; >__extension__ typedef unsigned int __mode_t; >__extension__ typedef unsigned int __nlink_t; >__extension__ typedef long int __off_t; >__extension__ typedef __quad_t __off64_t; >__extension__ typedef int __pid_t; >__extension__ typedef struct { int __val[2]; } __fsid_t; >__extension__ typedef long int __clock_t; >__extension__ typedef unsigned long int __rlim_t; >__extension__ typedef __u_quad_t __rlim64_t; >__extension__ typedef unsigned int __id_t; >__extension__ typedef long int __time_t; >__extension__ typedef unsigned int __useconds_t; >__extension__ typedef long int __suseconds_t; > >__extension__ typedef int __daddr_t; >__extension__ typedef long int __swblk_t; >__extension__ typedef int __key_t; > > >__extension__ typedef int __clockid_t; > > >__extension__ typedef void * __timer_t; > > >__extension__ typedef long int __blksize_t; > > > > >__extension__ typedef long int __blkcnt_t; >__extension__ typedef __quad_t __blkcnt64_t; > > >__extension__ typedef unsigned long int __fsblkcnt_t; >__extension__ typedef __u_quad_t __fsblkcnt64_t; > > >__extension__ typedef unsigned long int __fsfilcnt_t; >__extension__ typedef __u_quad_t __fsfilcnt64_t; > >__extension__ typedef int __ssize_t; > > > >typedef __off64_t __loff_t; >typedef __quad_t *__qaddr_t; >typedef char *__caddr_t; > > >__extension__ typedef int __intptr_t; > > >__extension__ typedef unsigned int __socklen_t; ># 31 "/usr/include/sys/types.h" 2 3 4 > > > >typedef __u_char u_char; >typedef __u_short u_short; >typedef __u_int u_int; >typedef __u_long u_long; >typedef __quad_t quad_t; >typedef __u_quad_t u_quad_t; >typedef __fsid_t fsid_t; > > > > >typedef __loff_t loff_t; > > > >typedef __ino_t ino_t; ># 61 "/usr/include/sys/types.h" 3 4 >typedef __dev_t dev_t; > > > > >typedef __gid_t gid_t; > > > > >typedef __mode_t mode_t; > > > > >typedef __nlink_t nlink_t; > > > > >typedef __uid_t uid_t; > > > > > >typedef __off_t off_t; ># 99 "/usr/include/sys/types.h" 3 4 >typedef __pid_t pid_t; > > > > > >typedef __id_t id_t; > > > > >typedef __ssize_t ssize_t; > > > > > >typedef __daddr_t daddr_t; >typedef __caddr_t caddr_t; > > > > > >typedef __key_t key_t; ># 133 "/usr/include/sys/types.h" 3 4 ># 1 "/usr/include/time.h" 1 3 4 ># 58 "/usr/include/time.h" 3 4 > > >typedef __clock_t clock_t; > > > ># 74 "/usr/include/time.h" 3 4 > > >typedef __time_t time_t; > > > ># 92 "/usr/include/time.h" 3 4 >typedef __clockid_t clockid_t; ># 104 "/usr/include/time.h" 3 4 >typedef __timer_t timer_t; ># 134 "/usr/include/sys/types.h" 2 3 4 ># 147 "/usr/include/sys/types.h" 3 4 ># 1 "/usr/lib/gcc/i586-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 ># 148 "/usr/include/sys/types.h" 2 3 4 > > > >typedef unsigned long int ulong; >typedef unsigned short int ushort; >typedef unsigned int uint; ># 195 "/usr/include/sys/types.h" 3 4 >typedef int int8_t __attribute__ ((__mode__ (__QI__))); >typedef int int16_t __attribute__ ((__mode__ (__HI__))); >typedef int int32_t __attribute__ ((__mode__ (__SI__))); >typedef int int64_t __attribute__ ((__mode__ (__DI__))); > > >typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); >typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); >typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); >typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); > >typedef int register_t __attribute__ ((__mode__ (__word__))); ># 220 "/usr/include/sys/types.h" 3 4 ># 1 "/usr/include/sys/select.h" 1 3 4 ># 31 "/usr/include/sys/select.h" 3 4 ># 1 "/usr/include/bits/select.h" 1 3 4 ># 32 "/usr/include/sys/select.h" 2 3 4 > > ># 1 "/usr/include/bits/sigset.h" 1 3 4 ># 24 "/usr/include/bits/sigset.h" 3 4 >typedef int __sig_atomic_t; > > > > >typedef struct > { > unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; > } __sigset_t; ># 35 "/usr/include/sys/select.h" 2 3 4 > > > >typedef __sigset_t sigset_t; > > > > > ># 1 "/usr/include/time.h" 1 3 4 ># 120 "/usr/include/time.h" 3 4 >struct timespec > { > __time_t tv_sec; > long int tv_nsec; > }; ># 45 "/usr/include/sys/select.h" 2 3 4 > ># 1 "/usr/include/bits/time.h" 1 3 4 ># 75 "/usr/include/bits/time.h" 3 4 >struct timeval > { > __time_t tv_sec; > __suseconds_t tv_usec; > }; ># 47 "/usr/include/sys/select.h" 2 3 4 > > >typedef __suseconds_t suseconds_t; > > > > > >typedef long int __fd_mask; ># 67 "/usr/include/sys/select.h" 3 4 >typedef struct > { > > > > > > > __fd_mask __fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; > > > } fd_set; > > > > > > >typedef __fd_mask fd_mask; ># 99 "/usr/include/sys/select.h" 3 4 > ># 109 "/usr/include/sys/select.h" 3 4 >extern int select (int __nfds, fd_set *__restrict __readfds, > fd_set *__restrict __writefds, > fd_set *__restrict __exceptfds, > struct timeval *__restrict __timeout); ># 121 "/usr/include/sys/select.h" 3 4 >extern int pselect (int __nfds, fd_set *__restrict __readfds, > fd_set *__restrict __writefds, > fd_set *__restrict __exceptfds, > const struct timespec *__restrict __timeout, > const __sigset_t *__restrict __sigmask); > > > ># 221 "/usr/include/sys/types.h" 2 3 4 > > ># 1 "/usr/include/sys/sysmacros.h" 1 3 4 ># 30 "/usr/include/sys/sysmacros.h" 3 4 >__extension__ >extern unsigned int gnu_dev_major (unsigned long long int __dev) > __attribute__ ((__nothrow__)); >__extension__ >extern unsigned int gnu_dev_minor (unsigned long long int __dev) > __attribute__ ((__nothrow__)); >__extension__ >extern unsigned long long int gnu_dev_makedev (unsigned int __major, > unsigned int __minor) > __attribute__ ((__nothrow__)); ># 224 "/usr/include/sys/types.h" 2 3 4 > > > > > >typedef __blksize_t blksize_t; > > > > > > >typedef __blkcnt_t blkcnt_t; > > > >typedef __fsblkcnt_t fsblkcnt_t; > > > >typedef __fsfilcnt_t fsfilcnt_t; ># 271 "/usr/include/sys/types.h" 3 4 ># 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 ># 36 "/usr/include/bits/pthreadtypes.h" 3 4 >typedef unsigned long int pthread_t; > > >typedef union >{ > char __size[36]; > long int __align; >} pthread_attr_t; > > >typedef struct __pthread_internal_slist >{ > struct __pthread_internal_slist *__next; >} __pthread_slist_t; > > > > >typedef union >{ > struct __pthread_mutex_s > { > int __lock; > unsigned int __count; > int __owner; > > > int __kind; > unsigned int __nusers; > __extension__ union > { > int __spins; > __pthread_slist_t __list; > }; > } __data; > char __size[24]; > long int __align; >} pthread_mutex_t; > >typedef union >{ > char __size[4]; > long int __align; >} pthread_mutexattr_t; > > > > >typedef union >{ > struct > { > int __lock; > unsigned int __futex; > __extension__ unsigned long long int __total_seq; > __extension__ unsigned long long int __wakeup_seq; > __extension__ unsigned long long int __woken_seq; > void *__mutex; > unsigned int __nwaiters; > unsigned int __broadcast_seq; > } __data; > char __size[48]; > __extension__ long long int __align; >} pthread_cond_t; > >typedef union >{ > char __size[4]; > long int __align; >} pthread_condattr_t; > > > >typedef unsigned int pthread_key_t; > > > >typedef int pthread_once_t; > > > > > >typedef union >{ > struct > { > int __lock; > unsigned int __nr_readers; > unsigned int __readers_wakeup; > unsigned int __writer_wakeup; > unsigned int __nr_readers_queued; > unsigned int __nr_writers_queued; > > > unsigned char __flags; > unsigned char __shared; > unsigned char __pad1; > unsigned char __pad2; > int __writer; > } __data; > char __size[32]; > long int __align; >} pthread_rwlock_t; > >typedef union >{ > char __size[8]; > long int __align; >} pthread_rwlockattr_t; > > > > > >typedef volatile int pthread_spinlock_t; > > > > >typedef union >{ > char __size[20]; > long int __align; >} pthread_barrier_t; > >typedef union >{ > char __size[4]; > int __align; >} pthread_barrierattr_t; ># 272 "/usr/include/sys/types.h" 2 3 4 > > > ># 321 "/usr/include/stdlib.h" 2 3 4 > > > > > > >extern long int random (void) __attribute__ ((__nothrow__)); > > >extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__)); > > > > > >extern char *initstate (unsigned int __seed, char *__statebuf, > size_t __statelen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); > > > >extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); > > > > > > > >struct random_data > { > int32_t *fptr; > int32_t *rptr; > int32_t *state; > int rand_type; > int rand_deg; > int rand_sep; > int32_t *end_ptr; > }; > >extern int random_r (struct random_data *__restrict __buf, > int32_t *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); > >extern int srandom_r (unsigned int __seed, struct random_data *__buf) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); > >extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, > size_t __statelen, > struct random_data *__restrict __buf) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))); > >extern int setstate_r (char *__restrict __statebuf, > struct random_data *__restrict __buf) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); > > > > > > >extern int rand (void) __attribute__ ((__nothrow__)); > >extern void srand (unsigned int __seed) __attribute__ ((__nothrow__)); > > > > >extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__)); > > > > > > > >extern double drand48 (void) __attribute__ ((__nothrow__)); >extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); > > >extern long int lrand48 (void) __attribute__ ((__nothrow__)); >extern long int nrand48 (unsigned short int __xsubi[3]) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); > > >extern long int mrand48 (void) __attribute__ ((__nothrow__)); >extern long int jrand48 (unsigned short int __xsubi[3]) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); > > >extern void srand48 (long int __seedval) __attribute__ ((__nothrow__)); >extern unsigned short int *seed48 (unsigned short int __seed16v[3]) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); >extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); > > > > > >struct drand48_data > { > unsigned short int __x[3]; > unsigned short int __old_x[3]; > unsigned short int __c; > unsigned short int __init; > unsigned long long int __a; > }; > > >extern int drand48_r (struct drand48_data *__restrict __buffer, > double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); >extern int erand48_r (unsigned short int __xsubi[3], > struct drand48_data *__restrict __buffer, > double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern int lrand48_r (struct drand48_data *__restrict __buffer, > long int *__restrict __result) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); >extern int nrand48_r (unsigned short int __xsubi[3], > struct drand48_data *__restrict __buffer, > long int *__restrict __result) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern int mrand48_r (struct drand48_data *__restrict __buffer, > long int *__restrict __result) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); >extern int jrand48_r (unsigned short int __xsubi[3], > struct drand48_data *__restrict __buffer, > long int *__restrict __result) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern int srand48_r (long int __seedval, struct drand48_data *__buffer) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); > >extern int seed48_r (unsigned short int __seed16v[3], > struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); > >extern int lcong48_r (unsigned short int __param[7], > struct drand48_data *__buffer) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); > > > > > > > > > >extern void *malloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; > >extern void *calloc (size_t __nmemb, size_t __size) > __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; > > > > > > > > > > >extern void *realloc (void *__ptr, size_t __size) > __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); > >extern void free (void *__ptr) __attribute__ ((__nothrow__)); > > > > >extern void cfree (void *__ptr) __attribute__ ((__nothrow__)); > > > ># 1 "/usr/include/alloca.h" 1 3 4 ># 25 "/usr/include/alloca.h" 3 4 ># 1 "/usr/lib/gcc/i586-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 ># 26 "/usr/include/alloca.h" 2 3 4 > > > > > > > >extern void *alloca (size_t __size) __attribute__ ((__nothrow__)); > > > > > > ># 498 "/usr/include/stdlib.h" 2 3 4 > > > > > >extern void *valloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; > > > > >extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; > > > > >extern void abort (void) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); > > > >extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); ># 531 "/usr/include/stdlib.h" 3 4 > > > > > >extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); > > > > > > >extern void exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); ># 554 "/usr/include/stdlib.h" 3 4 > > > > > > >extern void _Exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); > > > > > > >extern char *getenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; > > > > >extern char *__secure_getenv (__const char *__name) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; > > > > > >extern int putenv (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); > > > > > >extern int setenv (__const char *__name, __const char *__value, int __replace) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); > > >extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); > > > > > > >extern int clearenv (void) __attribute__ ((__nothrow__)); ># 606 "/usr/include/stdlib.h" 3 4 >extern char *mktemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; ># 620 "/usr/include/stdlib.h" 3 4 >extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ; ># 642 "/usr/include/stdlib.h" 3 4 >extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ; ># 663 "/usr/include/stdlib.h" 3 4 >extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; ># 712 "/usr/include/stdlib.h" 3 4 > > > > > >extern int system (__const char *__command) ; > ># 734 "/usr/include/stdlib.h" 3 4 >extern char *realpath (__const char *__restrict __name, > char *__restrict __resolved) __attribute__ ((__nothrow__)) ; > > > > > > >typedef int (*__compar_fn_t) (__const void *, __const void *); ># 752 "/usr/include/stdlib.h" 3 4 > > > >extern void *bsearch (__const void *__key, __const void *__base, > size_t __nmemb, size_t __size, __compar_fn_t __compar) > __attribute__ ((__nonnull__ (1, 2, 5))) ; > > > >extern void qsort (void *__base, size_t __nmemb, size_t __size, > __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); ># 771 "/usr/include/stdlib.h" 3 4 >extern int abs (int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; >extern long int labs (long int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; > > > >__extension__ extern long long int llabs (long long int __x) > __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; > > > > > > > >extern div_t div (int __numer, int __denom) > __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; >extern ldiv_t ldiv (long int __numer, long int __denom) > __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; > > > > >__extension__ extern lldiv_t lldiv (long long int __numer, > long long int __denom) > __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; > ># 808 "/usr/include/stdlib.h" 3 4 >extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, > int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ; > > > > >extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, > int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ; > > > > >extern char *gcvt (double __value, int __ndigit, char *__buf) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) ; > > > > >extern char *qecvt (long double __value, int __ndigit, > int *__restrict __decpt, int *__restrict __sign) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ; >extern char *qfcvt (long double __value, int __ndigit, > int *__restrict __decpt, int *__restrict __sign) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ; >extern char *qgcvt (long double __value, int __ndigit, char *__buf) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) ; > > > > >extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, > int *__restrict __sign, char *__restrict __buf, > size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); >extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, > int *__restrict __sign, char *__restrict __buf, > size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); > >extern int qecvt_r (long double __value, int __ndigit, > int *__restrict __decpt, int *__restrict __sign, > char *__restrict __buf, size_t __len) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); >extern int qfcvt_r (long double __value, int __ndigit, > int *__restrict __decpt, int *__restrict __sign, > char *__restrict __buf, size_t __len) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); > > > > > > > >extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__)) ; > > >extern int mbtowc (wchar_t *__restrict __pwc, > __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)) ; > > >extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__)) ; > > > >extern size_t mbstowcs (wchar_t *__restrict __pwcs, > __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)); > >extern size_t wcstombs (char *__restrict __s, > __const wchar_t *__restrict __pwcs, size_t __n) > __attribute__ ((__nothrow__)); > > > > > > > > >extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; ># 896 "/usr/include/stdlib.h" 3 4 >extern int getsubopt (char **__restrict __optionp, > char *__const *__restrict __tokens, > char **__restrict __valuep) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3))) ; ># 948 "/usr/include/stdlib.h" 3 4 >extern int getloadavg (double __loadavg[], int __nelem) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); ># 964 "/usr/include/stdlib.h" 3 4 > ># 26 "../utils/includes.h" 2 ># 1 "/usr/include/stdio.h" 1 3 4 ># 30 "/usr/include/stdio.h" 3 4 > > > > ># 1 "/usr/lib/gcc/i586-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 ># 35 "/usr/include/stdio.h" 2 3 4 ># 45 "/usr/include/stdio.h" 3 4 >struct _IO_FILE; > > > >typedef struct _IO_FILE FILE; > > > > > ># 65 "/usr/include/stdio.h" 3 4 >typedef struct _IO_FILE __FILE; ># 75 "/usr/include/stdio.h" 3 4 ># 1 "/usr/include/libio.h" 1 3 4 ># 32 "/usr/include/libio.h" 3 4 ># 1 "/usr/include/_G_config.h" 1 3 4 ># 15 "/usr/include/_G_config.h" 3 4 ># 1 "/usr/lib/gcc/i586-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 ># 16 "/usr/include/_G_config.h" 2 3 4 > > > > ># 1 "/usr/include/wchar.h" 1 3 4 ># 83 "/usr/include/wchar.h" 3 4 >typedef struct >{ > int __count; > union > { > > unsigned int __wch; > > > > char __wchb[4]; > } __value; >} __mbstate_t; ># 21 "/usr/include/_G_config.h" 2 3 4 > >typedef struct >{ > __off_t __pos; > __mbstate_t __state; >} _G_fpos_t; >typedef struct >{ > __off64_t __pos; > __mbstate_t __state; >} _G_fpos64_t; ># 53 "/usr/include/_G_config.h" 3 4 >typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); >typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); >typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); >typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); ># 33 "/usr/include/libio.h" 2 3 4 ># 53 "/usr/include/libio.h" 3 4 ># 1 "/usr/lib/gcc/i586-pc-linux-gnu/4.5.3/include/stdarg.h" 1 3 4 ># 40 "/usr/lib/gcc/i586-pc-linux-gnu/4.5.3/include/stdarg.h" 3 4 >typedef __builtin_va_list __gnuc_va_list; ># 54 "/usr/include/libio.h" 2 3 4 ># 170 "/usr/include/libio.h" 3 4 >struct _IO_jump_t; struct _IO_FILE; ># 180 "/usr/include/libio.h" 3 4 >typedef void _IO_lock_t; > > > > > >struct _IO_marker { > struct _IO_marker *_next; > struct _IO_FILE *_sbuf; > > > > int _pos; ># 203 "/usr/include/libio.h" 3 4 >}; > > >enum __codecvt_result >{ > __codecvt_ok, > __codecvt_partial, > __codecvt_error, > __codecvt_noconv >}; ># 271 "/usr/include/libio.h" 3 4 >struct _IO_FILE { > int _flags; > > > > > char* _IO_read_ptr; > char* _IO_read_end; > char* _IO_read_base; > char* _IO_write_base; > char* _IO_write_ptr; > char* _IO_write_end; > char* _IO_buf_base; > char* _IO_buf_end; > > char *_IO_save_base; > char *_IO_backup_base; > char *_IO_save_end; > > struct _IO_marker *_markers; > > struct _IO_FILE *_chain; > > int _fileno; > > > > int _flags2; > > __off_t _old_offset; > > > > unsigned short _cur_column; > signed char _vtable_offset; > char _shortbuf[1]; > > > > _IO_lock_t *_lock; ># 319 "/usr/include/libio.h" 3 4 > __off64_t _offset; ># 328 "/usr/include/libio.h" 3 4 > void *__pad1; > void *__pad2; > void *__pad3; > void *__pad4; > size_t __pad5; > > int _mode; > > char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; > >}; > > >typedef struct _IO_FILE _IO_FILE; > > >struct _IO_FILE_plus; > >extern struct _IO_FILE_plus _IO_2_1_stdin_; >extern struct _IO_FILE_plus _IO_2_1_stdout_; >extern struct _IO_FILE_plus _IO_2_1_stderr_; ># 364 "/usr/include/libio.h" 3 4 >typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); > > > > > > > >typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, > size_t __n); > > > > > > > >typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); > > >typedef int __io_close_fn (void *__cookie); ># 416 "/usr/include/libio.h" 3 4 >extern int __underflow (_IO_FILE *); >extern int __uflow (_IO_FILE *); >extern int __overflow (_IO_FILE *, int); ># 460 "/usr/include/libio.h" 3 4 >extern int _IO_getc (_IO_FILE *__fp); >extern int _IO_putc (int __c, _IO_FILE *__fp); >extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__)); >extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__)); > >extern int _IO_peekc_locked (_IO_FILE *__fp); > > > > > >extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__)); >extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__)); >extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__)); ># 490 "/usr/include/libio.h" 3 4 >extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, > __gnuc_va_list, int *__restrict); >extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, > __gnuc_va_list); >extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); >extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); > >extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); >extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); > >extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__)); ># 76 "/usr/include/stdio.h" 2 3 4 > > > > >typedef __gnuc_va_list va_list; ># 109 "/usr/include/stdio.h" 3 4 > > >typedef _G_fpos_t fpos_t; > > > > ># 161 "/usr/include/stdio.h" 3 4 ># 1 "/usr/include/bits/stdio_lim.h" 1 3 4 ># 162 "/usr/include/stdio.h" 2 3 4 > > > >extern struct _IO_FILE *stdin; >extern struct _IO_FILE *stdout; >extern struct _IO_FILE *stderr; > > > > > > > >extern int remove (__const char *__filename) __attribute__ ((__nothrow__)); > >extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__)); > > > > >extern int renameat (int __oldfd, __const char *__old, int __newfd, > __const char *__new) __attribute__ ((__nothrow__)); > > > > > > > > >extern FILE *tmpfile (void) ; ># 206 "/usr/include/stdio.h" 3 4 >extern char *tmpnam (char *__s) __attribute__ ((__nothrow__)) ; > > > > > >extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__)) ; ># 224 "/usr/include/stdio.h" 3 4 >extern char *tempnam (__const char *__dir, __const char *__pfx) > __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; > > > > > > > > >extern int fclose (FILE *__stream); > > > > >extern int fflush (FILE *__stream); > ># 249 "/usr/include/stdio.h" 3 4 >extern int fflush_unlocked (FILE *__stream); ># 263 "/usr/include/stdio.h" 3 4 > > > > > > >extern FILE *fopen (__const char *__restrict __filename, > __const char *__restrict __modes) ; > > > > >extern FILE *freopen (__const char *__restrict __filename, > __const char *__restrict __modes, > FILE *__restrict __stream) ; ># 292 "/usr/include/stdio.h" 3 4 > ># 303 "/usr/include/stdio.h" 3 4 >extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__)) ; ># 316 "/usr/include/stdio.h" 3 4 >extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) > __attribute__ ((__nothrow__)) ; > > > > >extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__)) ; > > > > > > >extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__)); > > > >extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, > int __modes, size_t __n) __attribute__ ((__nothrow__)); > > > > > >extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, > size_t __size) __attribute__ ((__nothrow__)); > > >extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__)); > > > > > > > > >extern int fprintf (FILE *__restrict __stream, > __const char *__restrict __format, ...); > > > > >extern int printf (__const char *__restrict __format, ...); > >extern int sprintf (char *__restrict __s, > __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); > > > > > >extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, > __gnuc_va_list __arg); > > > > >extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); > >extern int vsprintf (char *__restrict __s, __const char *__restrict __format, > __gnuc_va_list __arg) __attribute__ ((__nothrow__)); > > > > > >extern int snprintf (char *__restrict __s, size_t __maxlen, > __const char *__restrict __format, ...) > __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))); > >extern int vsnprintf (char *__restrict __s, size_t __maxlen, > __const char *__restrict __format, __gnuc_va_list __arg) > __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))); > ># 414 "/usr/include/stdio.h" 3 4 >extern int vdprintf (int __fd, __const char *__restrict __fmt, > __gnuc_va_list __arg) > __attribute__ ((__format__ (__printf__, 2, 0))); >extern int dprintf (int __fd, __const char *__restrict __fmt, ...) > __attribute__ ((__format__ (__printf__, 2, 3))); > > > > > > > > >extern int fscanf (FILE *__restrict __stream, > __const char *__restrict __format, ...) ; > > > > >extern int scanf (__const char *__restrict __format, ...) ; > >extern int sscanf (__const char *__restrict __s, > __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); ># 445 "/usr/include/stdio.h" 3 4 >extern int fscanf (FILE *__restrict __stream, __const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf") > > ; >extern int scanf (__const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf") > ; >extern int sscanf (__const char *__restrict __s, __const char *__restrict __format, ...) __asm__ ("" "__isoc99_sscanf") __attribute__ ((__nothrow__)) > > ; ># 465 "/usr/include/stdio.h" 3 4 > > > > > > > > >extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, > __gnuc_va_list __arg) > __attribute__ ((__format__ (__scanf__, 2, 0))) ; > > > > > >extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) > __attribute__ ((__format__ (__scanf__, 1, 0))) ; > > >extern int vsscanf (__const char *__restrict __s, > __const char *__restrict __format, __gnuc_va_list __arg) > __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__scanf__, 2, 0))); ># 496 "/usr/include/stdio.h" 3 4 >extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfscanf") > > > > __attribute__ ((__format__ (__scanf__, 2, 0))) ; >extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf") > > __attribute__ ((__format__ (__scanf__, 1, 0))) ; >extern int vsscanf (__const char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vsscanf") __attribute__ ((__nothrow__)) > > > > __attribute__ ((__format__ (__scanf__, 2, 0))); ># 524 "/usr/include/stdio.h" 3 4 > > > > > > > > > >extern int fgetc (FILE *__stream); >extern int getc (FILE *__stream); > > > > > >extern int getchar (void); > ># 552 "/usr/include/stdio.h" 3 4 >extern int getc_unlocked (FILE *__stream); >extern int getchar_unlocked (void); ># 563 "/usr/include/stdio.h" 3 4 >extern int fgetc_unlocked (FILE *__stream); > > > > > > > > > > > >extern int fputc (int __c, FILE *__stream); >extern int putc (int __c, FILE *__stream); > > > > > >extern int putchar (int __c); > ># 596 "/usr/include/stdio.h" 3 4 >extern int fputc_unlocked (int __c, FILE *__stream); > > > > > > > >extern int putc_unlocked (int __c, FILE *__stream); >extern int putchar_unlocked (int __c); > > > > > > >extern int getw (FILE *__stream); > > >extern int putw (int __w, FILE *__stream); > > > > > > > > >extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) > ; > > > > > > >extern char *gets (char *__s) ; > ># 658 "/usr/include/stdio.h" 3 4 >extern __ssize_t __getdelim (char **__restrict __lineptr, > size_t *__restrict __n, int __delimiter, > FILE *__restrict __stream) ; >extern __ssize_t getdelim (char **__restrict __lineptr, > size_t *__restrict __n, int __delimiter, > FILE *__restrict __stream) ; > > > > > > > >extern __ssize_t getline (char **__restrict __lineptr, > size_t *__restrict __n, > FILE *__restrict __stream) ; > > > > > > > > >extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); > > > > > >extern int puts (__const char *__s); > > > > > > >extern int ungetc (int __c, FILE *__stream); > > > > > > >extern size_t fread (void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __stream) ; > > > > >extern size_t fwrite (__const void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __s) ; > ># 730 "/usr/include/stdio.h" 3 4 >extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __stream) ; >extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __stream) ; > > > > > > > > >extern int fseek (FILE *__stream, long int __off, int __whence); > > > > >extern long int ftell (FILE *__stream) ; > > > > >extern void rewind (FILE *__stream); > ># 766 "/usr/include/stdio.h" 3 4 >extern int fseeko (FILE *__stream, __off_t __off, int __whence); > > > > >extern __off_t ftello (FILE *__stream) ; ># 785 "/usr/include/stdio.h" 3 4 > > > > > > >extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); > > > > >extern int fsetpos (FILE *__stream, __const fpos_t *__pos); ># 808 "/usr/include/stdio.h" 3 4 > ># 817 "/usr/include/stdio.h" 3 4 > > >extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__)); > >extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) ; > >extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) ; > > > > >extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__)); >extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ; >extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ; > > > > > > > > >extern void perror (__const char *__s); > > > > > > ># 1 "/usr/include/bits/sys_errlist.h" 1 3 4 ># 27 "/usr/include/bits/sys_errlist.h" 3 4 >extern int sys_nerr; >extern __const char *__const sys_errlist[]; ># 847 "/usr/include/stdio.h" 2 3 4 > > > > >extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)) ; > > > > >extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ; ># 866 "/usr/include/stdio.h" 3 4 >extern FILE *popen (__const char *__command, __const char *__modes) ; > > > > > >extern int pclose (FILE *__stream); > > > > > >extern char *ctermid (char *__s) __attribute__ ((__nothrow__)); ># 906 "/usr/include/stdio.h" 3 4 >extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__)); > > > >extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__)) ; > > >extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__)); ># 936 "/usr/include/stdio.h" 3 4 > ># 27 "../utils/includes.h" 2 ># 1 "/usr/lib/gcc/i586-pc-linux-gnu/4.5.3/include/stdarg.h" 1 3 4 ># 28 "../utils/includes.h" 2 ># 1 "/usr/include/string.h" 1 3 4 ># 29 "/usr/include/string.h" 3 4 > > > > > ># 1 "/usr/lib/gcc/i586-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 ># 35 "/usr/include/string.h" 2 3 4 > > > > > > > > > >extern void *memcpy (void *__restrict __dest, > __const void *__restrict __src, size_t __n) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern void *memmove (void *__dest, __const void *__src, size_t __n) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); > > > > > > >extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, > int __c, size_t __n) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); > > > > > >extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); > > >extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) > __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); ># 95 "/usr/include/string.h" 3 4 >extern void *memchr (__const void *__s, int __c, size_t __n) > __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); > > ># 126 "/usr/include/string.h" 3 4 > > >extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); > >extern char *strncpy (char *__restrict __dest, > __const char *__restrict __src, size_t __n) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern char *strcat (char *__restrict __dest, __const char *__restrict __src) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); > >extern char *strncat (char *__restrict __dest, __const char *__restrict __src, > size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern int strcmp (__const char *__s1, __const char *__s2) > __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > >extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) > __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern int strcoll (__const char *__s1, __const char *__s2) > __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > >extern size_t strxfrm (char *__restrict __dest, > __const char *__restrict __src, size_t __n) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); > > > > > > ># 1 "/usr/include/xlocale.h" 1 3 4 ># 28 "/usr/include/xlocale.h" 3 4 >typedef struct __locale_struct >{ > > struct __locale_data *__locales[13]; > > > const unsigned short int *__ctype_b; > const int *__ctype_tolower; > const int *__ctype_toupper; > > > const char *__names[13]; >} *__locale_t; > > >typedef __locale_t locale_t; ># 163 "/usr/include/string.h" 2 3 4 > > >extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) > __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); > >extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, > __locale_t __l) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))); > > > > > >extern char *strdup (__const char *__s) > __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); > > > > > > >extern char *strndup (__const char *__string, size_t __n) > __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); ># 210 "/usr/include/string.h" 3 4 > ># 235 "/usr/include/string.h" 3 4 >extern char *strchr (__const char *__s, int __c) > __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); ># 262 "/usr/include/string.h" 3 4 >extern char *strrchr (__const char *__s, int __c) > __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); > > ># 281 "/usr/include/string.h" 3 4 > > > >extern size_t strcspn (__const char *__s, __const char *__reject) > __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern size_t strspn (__const char *__s, __const char *__accept) > __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); ># 314 "/usr/include/string.h" 3 4 >extern char *strpbrk (__const char *__s, __const char *__accept) > __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); ># 342 "/usr/include/string.h" 3 4 >extern char *strstr (__const char *__haystack, __const char *__needle) > __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > > > > >extern char *strtok (char *__restrict __s, __const char *__restrict __delim) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); > > > > >extern char *__strtok_r (char *__restrict __s, > __const char *__restrict __delim, > char **__restrict __save_ptr) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); > >extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, > char **__restrict __save_ptr) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); ># 397 "/usr/include/string.h" 3 4 > > >extern size_t strlen (__const char *__s) > __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); > > > > > >extern size_t strnlen (__const char *__string, size_t __maxlen) > __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); > > > > > >extern char *strerror (int __errnum) __attribute__ ((__nothrow__)); > ># 427 "/usr/include/string.h" 3 4 >extern int strerror_r (int __errnum, char *__buf, size_t __buflen) __asm__ ("" "__xpg_strerror_r") __attribute__ ((__nothrow__)) > > __attribute__ ((__nonnull__ (2))); ># 445 "/usr/include/string.h" 3 4 >extern char *strerror_l (int __errnum, __locale_t __l) __attribute__ ((__nothrow__)); > > > > > >extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); > > > >extern void bcopy (__const void *__src, void *__dest, size_t __n) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); > > >extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) > __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); ># 489 "/usr/include/string.h" 3 4 >extern char *index (__const char *__s, int __c) > __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); ># 517 "/usr/include/string.h" 3 4 >extern char *rindex (__const char *__s, int __c) > __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); > > > > >extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); ># 536 "/usr/include/string.h" 3 4 >extern int strcasecmp (__const char *__s1, __const char *__s2) > __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) > __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); ># 559 "/usr/include/string.h" 3 4 >extern char *strsep (char **__restrict __stringp, > __const char *__restrict __delim) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); > > > > >extern char *strsignal (int __sig) __attribute__ ((__nothrow__)); > > >extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); >extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); > > > >extern char *__stpncpy (char *__restrict __dest, > __const char *__restrict __src, size_t __n) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); >extern char *stpncpy (char *__restrict __dest, > __const char *__restrict __src, size_t __n) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); ># 646 "/usr/include/string.h" 3 4 > ># 29 "../utils/includes.h" 2 > > ># 1 "/usr/include/signal.h" 1 3 4 ># 31 "/usr/include/signal.h" 3 4 > > ># 1 "/usr/include/bits/sigset.h" 1 3 4 ># 104 "/usr/include/bits/sigset.h" 3 4 >extern int __sigismember (__const __sigset_t *, int); >extern int __sigaddset (__sigset_t *, int); >extern int __sigdelset (__sigset_t *, int); ># 34 "/usr/include/signal.h" 2 3 4 > > > > > > > >typedef __sig_atomic_t sig_atomic_t; > ># 58 "/usr/include/signal.h" 3 4 ># 1 "/usr/include/bits/signum.h" 1 3 4 ># 59 "/usr/include/signal.h" 2 3 4 ># 76 "/usr/include/signal.h" 3 4 ># 1 "/usr/include/time.h" 1 3 4 ># 77 "/usr/include/signal.h" 2 3 4 > > ># 1 "/usr/include/bits/siginfo.h" 1 3 4 ># 25 "/usr/include/bits/siginfo.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 26 "/usr/include/bits/siginfo.h" 2 3 4 > > > > > > > >typedef union sigval > { > int sival_int; > void *sival_ptr; > } sigval_t; ># 51 "/usr/include/bits/siginfo.h" 3 4 >typedef struct siginfo > { > int si_signo; > int si_errno; > > int si_code; > > union > { > int _pad[((128 / sizeof (int)) - 3)]; > > > struct > { > __pid_t si_pid; > __uid_t si_uid; > } _kill; > > > struct > { > int si_tid; > int si_overrun; > sigval_t si_sigval; > } _timer; > > > struct > { > __pid_t si_pid; > __uid_t si_uid; > sigval_t si_sigval; > } _rt; > > > struct > { > __pid_t si_pid; > __uid_t si_uid; > int si_status; > __clock_t si_utime; > __clock_t si_stime; > } _sigchld; > > > struct > { > void *si_addr; > } _sigfault; > > > struct > { > long int si_band; > int si_fd; > } _sigpoll; > } _sifields; > } siginfo_t; ># 129 "/usr/include/bits/siginfo.h" 3 4 >enum >{ > SI_ASYNCNL = -60, > > SI_TKILL = -6, > > SI_SIGIO, > > SI_ASYNCIO, > > SI_MESGQ, > > SI_TIMER, > > SI_QUEUE, > > SI_USER, > > SI_KERNEL = 0x80 > >}; > > > >enum >{ > ILL_ILLOPC = 1, > > ILL_ILLOPN, > > ILL_ILLADR, > > ILL_ILLTRP, > > ILL_PRVOPC, > > ILL_PRVREG, > > ILL_COPROC, > > ILL_BADSTK > >}; > > >enum >{ > FPE_INTDIV = 1, > > FPE_INTOVF, > > FPE_FLTDIV, > > FPE_FLTOVF, > > FPE_FLTUND, > > FPE_FLTRES, > > FPE_FLTINV, > > FPE_FLTSUB > >}; > > >enum >{ > SEGV_MAPERR = 1, > > SEGV_ACCERR > >}; > > >enum >{ > BUS_ADRALN = 1, > > BUS_ADRERR, > > BUS_OBJERR > >}; > > >enum >{ > TRAP_BRKPT = 1, > > TRAP_TRACE > >}; > > >enum >{ > CLD_EXITED = 1, > > CLD_KILLED, > > CLD_DUMPED, > > CLD_TRAPPED, > > CLD_STOPPED, > > CLD_CONTINUED > >}; > > >enum >{ > POLL_IN = 1, > > POLL_OUT, > > POLL_MSG, > > POLL_ERR, > > POLL_PRI, > > POLL_HUP > >}; ># 273 "/usr/include/bits/siginfo.h" 3 4 >typedef struct sigevent > { > sigval_t sigev_value; > int sigev_signo; > int sigev_notify; > > union > { > int _pad[((64 / sizeof (int)) - 3)]; > > > > __pid_t _tid; > > struct > { > void (*_function) (sigval_t); > void *_attribute; > } _sigev_thread; > } _sigev_un; > } sigevent_t; > > > > > > >enum >{ > SIGEV_SIGNAL = 0, > > SIGEV_NONE, > > SIGEV_THREAD, > > > SIGEV_THREAD_ID = 4 > >}; ># 80 "/usr/include/signal.h" 2 3 4 > > > > >typedef void (*__sighandler_t) (int); > > > > >extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler) > __attribute__ ((__nothrow__)); ># 99 "/usr/include/signal.h" 3 4 > > >extern __sighandler_t signal (int __sig, __sighandler_t __handler) > __attribute__ ((__nothrow__)); ># 113 "/usr/include/signal.h" 3 4 > ># 126 "/usr/include/signal.h" 3 4 >extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__)); > > > > > > >extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__)); > > > > >extern int raise (int __sig) __attribute__ ((__nothrow__)); > > > > >extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) > __attribute__ ((__nothrow__)); >extern int gsignal (int __sig) __attribute__ ((__nothrow__)); > > > > >extern void psignal (int __sig, __const char *__s); > > > > >extern void psiginfo (__const siginfo_t *__pinfo, __const char *__s); ># 168 "/usr/include/signal.h" 3 4 >extern int __sigpause (int __sig_or_mask, int __is_sig); ># 196 "/usr/include/signal.h" 3 4 >extern int sigblock (int __mask) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); > > >extern int sigsetmask (int __mask) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); > > >extern int siggetmask (void) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); ># 216 "/usr/include/signal.h" 3 4 >typedef __sighandler_t sig_t; > > > > > >extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); > > >extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); > > >extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); > > >extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); > > >extern int sigismember (__const sigset_t *__set, int __signo) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); ># 252 "/usr/include/signal.h" 3 4 ># 1 "/usr/include/bits/sigaction.h" 1 3 4 ># 25 "/usr/include/bits/sigaction.h" 3 4 >struct sigaction > { > > > union > { > > __sighandler_t sa_handler; > > void (*sa_sigaction) (int, siginfo_t *, void *); > } > __sigaction_handler; > > > > > > > > __sigset_t sa_mask; > > > int sa_flags; > > > void (*sa_restorer) (void); > }; ># 253 "/usr/include/signal.h" 2 3 4 > > >extern int sigprocmask (int __how, __const sigset_t *__restrict __set, > sigset_t *__restrict __oset) __attribute__ ((__nothrow__)); > > > > > > >extern int sigsuspend (__const sigset_t *__set) __attribute__ ((__nonnull__ (1))); > > >extern int sigaction (int __sig, __const struct sigaction *__restrict __act, > struct sigaction *__restrict __oact) __attribute__ ((__nothrow__)); > > >extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); > > > > > > >extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig) > __attribute__ ((__nonnull__ (1, 2))); > > > > > > >extern int sigwaitinfo (__const sigset_t *__restrict __set, > siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1))); > > > > > > >extern int sigtimedwait (__const sigset_t *__restrict __set, > siginfo_t *__restrict __info, > __const struct timespec *__restrict __timeout) > __attribute__ ((__nonnull__ (1))); > > > >extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val) > __attribute__ ((__nothrow__)); ># 310 "/usr/include/signal.h" 3 4 >extern __const char *__const _sys_siglist[65]; >extern __const char *__const sys_siglist[65]; > > >struct sigvec > { > __sighandler_t sv_handler; > int sv_mask; > > int sv_flags; > > }; ># 334 "/usr/include/signal.h" 3 4 >extern int sigvec (int __sig, __const struct sigvec *__vec, > struct sigvec *__ovec) __attribute__ ((__nothrow__)); > > > ># 1 "/usr/include/bits/sigcontext.h" 1 3 4 ># 28 "/usr/include/bits/sigcontext.h" 3 4 ># 1 "/usr/include/asm/sigcontext.h" 1 3 4 > > > > ># 1 "/usr/include/linux/types.h" 1 3 4 > > > ># 1 "/usr/include/asm/types.h" 1 3 4 > > > ># 1 "/usr/include/asm-generic/types.h" 1 3 4 > > > > > > ># 1 "/usr/include/asm-generic/int-ll64.h" 1 3 4 ># 11 "/usr/include/asm-generic/int-ll64.h" 3 4 ># 1 "/usr/include/asm/bitsperlong.h" 1 3 4 ># 10 "/usr/include/asm/bitsperlong.h" 3 4 ># 1 "/usr/include/asm-generic/bitsperlong.h" 1 3 4 ># 11 "/usr/include/asm/bitsperlong.h" 2 3 4 ># 12 "/usr/include/asm-generic/int-ll64.h" 2 3 4 > > > > > > > >typedef __signed__ char __s8; >typedef unsigned char __u8; > >typedef __signed__ short __s16; >typedef unsigned short __u16; > >typedef __signed__ int __s32; >typedef unsigned int __u32; > > >__extension__ typedef __signed__ long long __s64; >__extension__ typedef unsigned long long __u64; ># 8 "/usr/include/asm-generic/types.h" 2 3 4 > > > >typedef unsigned short umode_t; ># 5 "/usr/include/asm/types.h" 2 3 4 ># 5 "/usr/include/linux/types.h" 2 3 4 > > > ># 1 "/usr/include/linux/posix_types.h" 1 3 4 > > > ># 1 "/usr/include/linux/stddef.h" 1 3 4 ># 14 "/usr/include/linux/stddef.h" 3 4 ># 1 "/usr/lib/gcc/i586-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 ># 149 "/usr/lib/gcc/i586-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 >typedef int ptrdiff_t; ># 15 "/usr/include/linux/stddef.h" 2 3 4 ># 5 "/usr/include/linux/posix_types.h" 2 3 4 ># 36 "/usr/include/linux/posix_types.h" 3 4 >typedef struct { > unsigned long fds_bits [(1024/(8 * sizeof(unsigned long)))]; >} __kernel_fd_set; > > >typedef void (*__kernel_sighandler_t)(int); > > >typedef int __kernel_key_t; >typedef int __kernel_mqd_t; > ># 1 "/usr/include/asm/posix_types.h" 1 3 4 > ># 1 "/usr/include/asm/posix_types_32.h" 1 3 4 ># 10 "/usr/include/asm/posix_types_32.h" 3 4 >typedef unsigned long __kernel_ino_t; >typedef unsigned short __kernel_mode_t; >typedef unsigned short __kernel_nlink_t; >typedef long __kernel_off_t; >typedef int __kernel_pid_t; >typedef unsigned short __kernel_ipc_pid_t; >typedef unsigned short __kernel_uid_t; >typedef unsigned short __kernel_gid_t; >typedef unsigned int __kernel_size_t; >typedef int __kernel_ssize_t; >typedef int __kernel_ptrdiff_t; >typedef long __kernel_time_t; >typedef long __kernel_suseconds_t; >typedef long __kernel_clock_t; >typedef int __kernel_timer_t; >typedef int __kernel_clockid_t; >typedef int __kernel_daddr_t; >typedef char * __kernel_caddr_t; >typedef unsigned short __kernel_uid16_t; >typedef unsigned short __kernel_gid16_t; >typedef unsigned int __kernel_uid32_t; >typedef unsigned int __kernel_gid32_t; > >typedef unsigned short __kernel_old_uid_t; >typedef unsigned short __kernel_old_gid_t; >typedef unsigned short __kernel_old_dev_t; > > >typedef long long __kernel_loff_t; > > >typedef struct { > int val[2]; >} __kernel_fsid_t; ># 3 "/usr/include/asm/posix_types.h" 2 3 4 ># 48 "/usr/include/linux/posix_types.h" 2 3 4 ># 9 "/usr/include/linux/types.h" 2 3 4 ># 27 "/usr/include/linux/types.h" 3 4 >typedef __u16 __le16; >typedef __u16 __be16; >typedef __u32 __le32; >typedef __u32 __be32; >typedef __u64 __le64; >typedef __u64 __be64; > >typedef __u16 __sum16; >typedef __u32 __wsum; ># 6 "/usr/include/asm/sigcontext.h" 2 3 4 ># 23 "/usr/include/asm/sigcontext.h" 3 4 >struct _fpx_sw_bytes { > __u32 magic1; > __u32 extended_size; > > > __u64 xstate_bv; > > > > > __u32 xstate_size; > > > > > __u32 padding[7]; >}; ># 56 "/usr/include/asm/sigcontext.h" 3 4 >struct _fpreg { > unsigned short significand[4]; > unsigned short exponent; >}; > >struct _fpxreg { > unsigned short significand[4]; > unsigned short exponent; > unsigned short padding[3]; >}; > >struct _xmmreg { > unsigned long element[4]; >}; > >struct _fpstate { > > unsigned long cw; > unsigned long sw; > unsigned long tag; > unsigned long ipoff; > unsigned long cssel; > unsigned long dataoff; > unsigned long datasel; > struct _fpreg _st[8]; > unsigned short status; > unsigned short magic; > > > unsigned long _fxsr_env[6]; > unsigned long mxcsr; > unsigned long reserved; > struct _fpxreg _fxsr_st[8]; > struct _xmmreg _xmm[8]; > unsigned long padding1[44]; > > union { > unsigned long padding2[12]; > struct _fpx_sw_bytes sw_reserved; > > }; >}; > > > > > > >struct sigcontext { > unsigned short gs, __gsh; > unsigned short fs, __fsh; > unsigned short es, __esh; > unsigned short ds, __dsh; > unsigned long edi; > unsigned long esi; > unsigned long ebp; > unsigned long esp; > unsigned long ebx; > unsigned long edx; > unsigned long ecx; > unsigned long eax; > unsigned long trapno; > unsigned long err; > unsigned long eip; > unsigned short cs, __csh; > unsigned long eflags; > unsigned long esp_at_signal; > unsigned short ss, __ssh; > struct _fpstate *fpstate; > unsigned long oldmask; > unsigned long cr2; >}; ># 190 "/usr/include/asm/sigcontext.h" 3 4 >struct _xsave_hdr { > __u64 xstate_bv; > __u64 reserved1[2]; > __u64 reserved2[5]; >}; > >struct _ymmh_state { > > __u32 ymmh_space[64]; >}; > > > > > > > >struct _xstate { > struct _fpstate fpstate; > struct _xsave_hdr xstate_hdr; > struct _ymmh_state ymmh; > >}; ># 29 "/usr/include/bits/sigcontext.h" 2 3 4 ># 340 "/usr/include/signal.h" 2 3 4 > > >extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__)); > > > > > > ># 1 "/usr/lib/gcc/i586-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 ># 350 "/usr/include/signal.h" 2 3 4 > > > > >extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__)); > ># 1 "/usr/include/bits/sigstack.h" 1 3 4 ># 26 "/usr/include/bits/sigstack.h" 3 4 >struct sigstack > { > void *ss_sp; > int ss_onstack; > }; > > > >enum >{ > SS_ONSTACK = 1, > > SS_DISABLE > >}; ># 50 "/usr/include/bits/sigstack.h" 3 4 >typedef struct sigaltstack > { > void *ss_sp; > int ss_flags; > size_t ss_size; > } stack_t; ># 357 "/usr/include/signal.h" 2 3 4 > > ># 1 "/usr/include/sys/ucontext.h" 1 3 4 ># 23 "/usr/include/sys/ucontext.h" 3 4 ># 1 "/usr/include/signal.h" 1 3 4 ># 24 "/usr/include/sys/ucontext.h" 2 3 4 > > > ># 1 "/usr/include/bits/sigcontext.h" 1 3 4 ># 28 "/usr/include/sys/ucontext.h" 2 3 4 > > > >typedef int greg_t; > > > > > >typedef greg_t gregset_t[19]; ># 85 "/usr/include/sys/ucontext.h" 3 4 >struct _libc_fpreg >{ > unsigned short int significand[4]; > unsigned short int exponent; >}; > >struct _libc_fpstate >{ > unsigned long int cw; > unsigned long int sw; > unsigned long int tag; > unsigned long int ipoff; > unsigned long int cssel; > unsigned long int dataoff; > unsigned long int datasel; > struct _libc_fpreg _st[8]; > unsigned long int status; >}; > > >typedef struct _libc_fpstate *fpregset_t; > > >typedef struct > { > gregset_t gregs; > > > fpregset_t fpregs; > unsigned long int oldmask; > unsigned long int cr2; > } mcontext_t; > > >typedef struct ucontext > { > unsigned long int uc_flags; > struct ucontext *uc_link; > stack_t uc_stack; > mcontext_t uc_mcontext; > __sigset_t uc_sigmask; > struct _libc_fpstate __fpregs_mem; > } ucontext_t; ># 360 "/usr/include/signal.h" 2 3 4 > > > > > >extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) > __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); > > > >extern int sigaltstack (__const struct sigaltstack *__restrict __ss, > struct sigaltstack *__restrict __oss) __attribute__ ((__nothrow__)); ># 395 "/usr/include/signal.h" 3 4 ># 1 "/usr/include/bits/sigthread.h" 1 3 4 ># 31 "/usr/include/bits/sigthread.h" 3 4 >extern int pthread_sigmask (int __how, > __const __sigset_t *__restrict __newmask, > __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__)); > > >extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__)); ># 396 "/usr/include/signal.h" 2 3 4 > > > > > > >extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__)); > >extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__)); > > > > ># 32 "../utils/includes.h" 2 > > ># 1 "/usr/include/errno.h" 1 3 4 ># 32 "/usr/include/errno.h" 3 4 > > > > ># 1 "/usr/include/bits/errno.h" 1 3 4 ># 25 "/usr/include/bits/errno.h" 3 4 ># 1 "/usr/include/linux/errno.h" 1 3 4 > > > ># 1 "/usr/include/asm/errno.h" 1 3 4 ># 1 "/usr/include/asm-generic/errno.h" 1 3 4 > > > ># 1 "/usr/include/asm-generic/errno-base.h" 1 3 4 ># 5 "/usr/include/asm-generic/errno.h" 2 3 4 ># 1 "/usr/include/asm/errno.h" 2 3 4 ># 5 "/usr/include/linux/errno.h" 2 3 4 ># 26 "/usr/include/bits/errno.h" 2 3 4 ># 47 "/usr/include/bits/errno.h" 3 4 >extern int *__errno_location (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); ># 37 "/usr/include/errno.h" 2 3 4 ># 59 "/usr/include/errno.h" 3 4 > ># 35 "../utils/includes.h" 2 > ># 1 "/usr/include/ctype.h" 1 3 4 ># 30 "/usr/include/ctype.h" 3 4 > ># 48 "/usr/include/ctype.h" 3 4 >enum >{ > _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), > _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), > _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), > _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), > _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), > _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), > _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), > _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), > _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), > _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), > _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), > _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) >}; ># 81 "/usr/include/ctype.h" 3 4 >extern __const unsigned short int **__ctype_b_loc (void) > __attribute__ ((__nothrow__)) __attribute__ ((__const)); >extern __const __int32_t **__ctype_tolower_loc (void) > __attribute__ ((__nothrow__)) __attribute__ ((__const)); >extern __const __int32_t **__ctype_toupper_loc (void) > __attribute__ ((__nothrow__)) __attribute__ ((__const)); ># 96 "/usr/include/ctype.h" 3 4 > > > > > > >extern int isalnum (int) __attribute__ ((__nothrow__)); >extern int isalpha (int) __attribute__ ((__nothrow__)); >extern int iscntrl (int) __attribute__ ((__nothrow__)); >extern int isdigit (int) __attribute__ ((__nothrow__)); >extern int islower (int) __attribute__ ((__nothrow__)); >extern int isgraph (int) __attribute__ ((__nothrow__)); >extern int isprint (int) __attribute__ ((__nothrow__)); >extern int ispunct (int) __attribute__ ((__nothrow__)); >extern int isspace (int) __attribute__ ((__nothrow__)); >extern int isupper (int) __attribute__ ((__nothrow__)); >extern int isxdigit (int) __attribute__ ((__nothrow__)); > > > >extern int tolower (int __c) __attribute__ ((__nothrow__)); > > >extern int toupper (int __c) __attribute__ ((__nothrow__)); > > > > > > > > >extern int isblank (int) __attribute__ ((__nothrow__)); > > ># 142 "/usr/include/ctype.h" 3 4 >extern int isascii (int __c) __attribute__ ((__nothrow__)); > > > >extern int toascii (int __c) __attribute__ ((__nothrow__)); > > > >extern int _toupper (int) __attribute__ ((__nothrow__)); >extern int _tolower (int) __attribute__ ((__nothrow__)); ># 247 "/usr/include/ctype.h" 3 4 >extern int isalnum_l (int, __locale_t) __attribute__ ((__nothrow__)); >extern int isalpha_l (int, __locale_t) __attribute__ ((__nothrow__)); >extern int iscntrl_l (int, __locale_t) __attribute__ ((__nothrow__)); >extern int isdigit_l (int, __locale_t) __attribute__ ((__nothrow__)); >extern int islower_l (int, __locale_t) __attribute__ ((__nothrow__)); >extern int isgraph_l (int, __locale_t) __attribute__ ((__nothrow__)); >extern int isprint_l (int, __locale_t) __attribute__ ((__nothrow__)); >extern int ispunct_l (int, __locale_t) __attribute__ ((__nothrow__)); >extern int isspace_l (int, __locale_t) __attribute__ ((__nothrow__)); >extern int isupper_l (int, __locale_t) __attribute__ ((__nothrow__)); >extern int isxdigit_l (int, __locale_t) __attribute__ ((__nothrow__)); > >extern int isblank_l (int, __locale_t) __attribute__ ((__nothrow__)); > > > >extern int __tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); >extern int tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); > > >extern int __toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); >extern int toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); ># 323 "/usr/include/ctype.h" 3 4 > ># 37 "../utils/includes.h" 2 ># 1 "/usr/include/time.h" 1 3 4 ># 30 "/usr/include/time.h" 3 4 > > > > > > > > ># 1 "/usr/lib/gcc/i586-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 ># 39 "/usr/include/time.h" 2 3 4 > > > ># 1 "/usr/include/bits/time.h" 1 3 4 ># 43 "/usr/include/time.h" 2 3 4 ># 131 "/usr/include/time.h" 3 4 > > >struct tm >{ > int tm_sec; > int tm_min; > int tm_hour; > int tm_mday; > int tm_mon; > int tm_year; > int tm_wday; > int tm_yday; > int tm_isdst; > > > long int tm_gmtoff; > __const char *tm_zone; > > > > >}; > > > > > > > > >struct itimerspec > { > struct timespec it_interval; > struct timespec it_value; > }; > > >struct sigevent; ># 180 "/usr/include/time.h" 3 4 > > > >extern clock_t clock (void) __attribute__ ((__nothrow__)); > > >extern time_t time (time_t *__timer) __attribute__ ((__nothrow__)); > > >extern double difftime (time_t __time1, time_t __time0) > __attribute__ ((__nothrow__)) __attribute__ ((__const__)); > > >extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__)); > > > > > >extern size_t strftime (char *__restrict __s, size_t __maxsize, > __const char *__restrict __format, > __const struct tm *__restrict __tp) __attribute__ ((__nothrow__)); > ># 217 "/usr/include/time.h" 3 4 >extern size_t strftime_l (char *__restrict __s, size_t __maxsize, > __const char *__restrict __format, > __const struct tm *__restrict __tp, > __locale_t __loc) __attribute__ ((__nothrow__)); ># 230 "/usr/include/time.h" 3 4 > > > >extern struct tm *gmtime (__const time_t *__timer) __attribute__ ((__nothrow__)); > > > >extern struct tm *localtime (__const time_t *__timer) __attribute__ ((__nothrow__)); > > > > > >extern struct tm *gmtime_r (__const time_t *__restrict __timer, > struct tm *__restrict __tp) __attribute__ ((__nothrow__)); > > > >extern struct tm *localtime_r (__const time_t *__restrict __timer, > struct tm *__restrict __tp) __attribute__ ((__nothrow__)); > > > > > >extern char *asctime (__const struct tm *__tp) __attribute__ ((__nothrow__)); > > >extern char *ctime (__const time_t *__timer) __attribute__ ((__nothrow__)); > > > > > > > >extern char *asctime_r (__const struct tm *__restrict __tp, > char *__restrict __buf) __attribute__ ((__nothrow__)); > > >extern char *ctime_r (__const time_t *__restrict __timer, > char *__restrict __buf) __attribute__ ((__nothrow__)); > > > > >extern char *__tzname[2]; >extern int __daylight; >extern long int __timezone; > > > > >extern char *tzname[2]; > > > >extern void tzset (void) __attribute__ ((__nothrow__)); > > > >extern int daylight; >extern long int timezone; > > > > > >extern int stime (__const time_t *__when) __attribute__ ((__nothrow__)); ># 313 "/usr/include/time.h" 3 4 >extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__)); > > >extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__)); > > >extern int dysize (int __year) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); ># 328 "/usr/include/time.h" 3 4 >extern int nanosleep (__const struct timespec *__requested_time, > struct timespec *__remaining); > > > >extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__)); > > >extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__)); > > >extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) > __attribute__ ((__nothrow__)); > > > > > > >extern int clock_nanosleep (clockid_t __clock_id, int __flags, > __const struct timespec *__req, > struct timespec *__rem); > > >extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__)); > > > > >extern int timer_create (clockid_t __clock_id, > struct sigevent *__restrict __evp, > timer_t *__restrict __timerid) __attribute__ ((__nothrow__)); > > >extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__)); > > >extern int timer_settime (timer_t __timerid, int __flags, > __const struct itimerspec *__restrict __value, > struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__)); > > >extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) > __attribute__ ((__nothrow__)); > > >extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__)); ># 417 "/usr/include/time.h" 3 4 > ># 38 "../utils/includes.h" 2 > > > ># 1 "/usr/include/unistd.h" 1 3 4 ># 28 "/usr/include/unistd.h" 3 4 > ># 203 "/usr/include/unistd.h" 3 4 ># 1 "/usr/include/bits/posix_opt.h" 1 3 4 ># 204 "/usr/include/unistd.h" 2 3 4 > > > ># 1 "/usr/include/bits/environments.h" 1 3 4 ># 208 "/usr/include/unistd.h" 2 3 4 ># 227 "/usr/include/unistd.h" 3 4 ># 1 "/usr/lib/gcc/i586-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 ># 228 "/usr/include/unistd.h" 2 3 4 ># 256 "/usr/include/unistd.h" 3 4 >typedef __useconds_t useconds_t; ># 268 "/usr/include/unistd.h" 3 4 >typedef __intptr_t intptr_t; > > > > > > >typedef __socklen_t socklen_t; ># 288 "/usr/include/unistd.h" 3 4 >extern int access (__const char *__name, int __type) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); ># 305 "/usr/include/unistd.h" 3 4 >extern int faccessat (int __fd, __const char *__file, int __type, int __flag) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) ; ># 331 "/usr/include/unistd.h" 3 4 >extern __off_t lseek (int __fd, __off_t __offset, int __whence) __attribute__ ((__nothrow__)); ># 350 "/usr/include/unistd.h" 3 4 >extern int close (int __fd); > > > > > > >extern ssize_t read (int __fd, void *__buf, size_t __nbytes) ; > > > > > >extern ssize_t write (int __fd, __const void *__buf, size_t __n) ; ># 373 "/usr/include/unistd.h" 3 4 >extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, > __off_t __offset) ; > > > > > > >extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n, > __off_t __offset) ; ># 414 "/usr/include/unistd.h" 3 4 >extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__)) ; ># 429 "/usr/include/unistd.h" 3 4 >extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__)); ># 441 "/usr/include/unistd.h" 3 4 >extern unsigned int sleep (unsigned int __seconds); > > > > > > > >extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) > __attribute__ ((__nothrow__)); > > > > > > >extern int usleep (__useconds_t __useconds); ># 466 "/usr/include/unistd.h" 3 4 >extern int pause (void); > > > >extern int chown (__const char *__file, __uid_t __owner, __gid_t __group) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; > > > >extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__)) ; > > > > >extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; > > > > > > >extern int fchownat (int __fd, __const char *__file, __uid_t __owner, > __gid_t __group, int __flag) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) ; > > > >extern int chdir (__const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; > > > >extern int fchdir (int __fd) __attribute__ ((__nothrow__)) ; ># 508 "/usr/include/unistd.h" 3 4 >extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__)) ; ># 522 "/usr/include/unistd.h" 3 4 >extern char *getwd (char *__buf) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) ; > > > > >extern int dup (int __fd) __attribute__ ((__nothrow__)) ; > > >extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__)); ># 540 "/usr/include/unistd.h" 3 4 >extern char **__environ; > > > > > > > >extern int execve (__const char *__path, char *__const __argv[], > char *__const __envp[]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); > > > > >extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[]) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); > > > > >extern int execv (__const char *__path, char *__const __argv[]) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); > > > >extern int execle (__const char *__path, __const char *__arg, ...) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); > > > >extern int execl (__const char *__path, __const char *__arg, ...) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); > > > >extern int execvp (__const char *__file, char *__const __argv[]) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); > > > > >extern int execlp (__const char *__file, __const char *__arg, ...) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); ># 595 "/usr/include/unistd.h" 3 4 >extern int nice (int __inc) __attribute__ ((__nothrow__)) ; > > > > >extern void _exit (int __status) __attribute__ ((__noreturn__)); > > > > > ># 1 "/usr/include/bits/confname.h" 1 3 4 ># 26 "/usr/include/bits/confname.h" 3 4 >enum > { > _PC_LINK_MAX, > > _PC_MAX_CANON, > > _PC_MAX_INPUT, > > _PC_NAME_MAX, > > _PC_PATH_MAX, > > _PC_PIPE_BUF, > > _PC_CHOWN_RESTRICTED, > > _PC_NO_TRUNC, > > _PC_VDISABLE, > > _PC_SYNC_IO, > > _PC_ASYNC_IO, > > _PC_PRIO_IO, > > _PC_SOCK_MAXBUF, > > _PC_FILESIZEBITS, > > _PC_REC_INCR_XFER_SIZE, > > _PC_REC_MAX_XFER_SIZE, > > _PC_REC_MIN_XFER_SIZE, > > _PC_REC_XFER_ALIGN, > > _PC_ALLOC_SIZE_MIN, > > _PC_SYMLINK_MAX, > > _PC_2_SYMLINKS > > }; > > >enum > { > _SC_ARG_MAX, > > _SC_CHILD_MAX, > > _SC_CLK_TCK, > > _SC_NGROUPS_MAX, > > _SC_OPEN_MAX, > > _SC_STREAM_MAX, > > _SC_TZNAME_MAX, > > _SC_JOB_CONTROL, > > _SC_SAVED_IDS, > > _SC_REALTIME_SIGNALS, > > _SC_PRIORITY_SCHEDULING, > > _SC_TIMERS, > > _SC_ASYNCHRONOUS_IO, > > _SC_PRIORITIZED_IO, > > _SC_SYNCHRONIZED_IO, > > _SC_FSYNC, > > _SC_MAPPED_FILES, > > _SC_MEMLOCK, > > _SC_MEMLOCK_RANGE, > > _SC_MEMORY_PROTECTION, > > _SC_MESSAGE_PASSING, > > _SC_SEMAPHORES, > > _SC_SHARED_MEMORY_OBJECTS, > > _SC_AIO_LISTIO_MAX, > > _SC_AIO_MAX, > > _SC_AIO_PRIO_DELTA_MAX, > > _SC_DELAYTIMER_MAX, > > _SC_MQ_OPEN_MAX, > > _SC_MQ_PRIO_MAX, > > _SC_VERSION, > > _SC_PAGESIZE, > > > _SC_RTSIG_MAX, > > _SC_SEM_NSEMS_MAX, > > _SC_SEM_VALUE_MAX, > > _SC_SIGQUEUE_MAX, > > _SC_TIMER_MAX, > > > > > _SC_BC_BASE_MAX, > > _SC_BC_DIM_MAX, > > _SC_BC_SCALE_MAX, > > _SC_BC_STRING_MAX, > > _SC_COLL_WEIGHTS_MAX, > > _SC_EQUIV_CLASS_MAX, > > _SC_EXPR_NEST_MAX, > > _SC_LINE_MAX, > > _SC_RE_DUP_MAX, > > _SC_CHARCLASS_NAME_MAX, > > > _SC_2_VERSION, > > _SC_2_C_BIND, > > _SC_2_C_DEV, > > _SC_2_FORT_DEV, > > _SC_2_FORT_RUN, > > _SC_2_SW_DEV, > > _SC_2_LOCALEDEF, > > > _SC_PII, > > _SC_PII_XTI, > > _SC_PII_SOCKET, > > _SC_PII_INTERNET, > > _SC_PII_OSI, > > _SC_POLL, > > _SC_SELECT, > > _SC_UIO_MAXIOV, > > _SC_IOV_MAX = _SC_UIO_MAXIOV, > > _SC_PII_INTERNET_STREAM, > > _SC_PII_INTERNET_DGRAM, > > _SC_PII_OSI_COTS, > > _SC_PII_OSI_CLTS, > > _SC_PII_OSI_M, > > _SC_T_IOV_MAX, > > > > _SC_THREADS, > > _SC_THREAD_SAFE_FUNCTIONS, > > _SC_GETGR_R_SIZE_MAX, > > _SC_GETPW_R_SIZE_MAX, > > _SC_LOGIN_NAME_MAX, > > _SC_TTY_NAME_MAX, > > _SC_THREAD_DESTRUCTOR_ITERATIONS, > > _SC_THREAD_KEYS_MAX, > > _SC_THREAD_STACK_MIN, > > _SC_THREAD_THREADS_MAX, > > _SC_THREAD_ATTR_STACKADDR, > > _SC_THREAD_ATTR_STACKSIZE, > > _SC_THREAD_PRIORITY_SCHEDULING, > > _SC_THREAD_PRIO_INHERIT, > > _SC_THREAD_PRIO_PROTECT, > > _SC_THREAD_PROCESS_SHARED, > > > _SC_NPROCESSORS_CONF, > > _SC_NPROCESSORS_ONLN, > > _SC_PHYS_PAGES, > > _SC_AVPHYS_PAGES, > > _SC_ATEXIT_MAX, > > _SC_PASS_MAX, > > > _SC_XOPEN_VERSION, > > _SC_XOPEN_XCU_VERSION, > > _SC_XOPEN_UNIX, > > _SC_XOPEN_CRYPT, > > _SC_XOPEN_ENH_I18N, > > _SC_XOPEN_SHM, > > > _SC_2_CHAR_TERM, > > _SC_2_C_VERSION, > > _SC_2_UPE, > > > _SC_XOPEN_XPG2, > > _SC_XOPEN_XPG3, > > _SC_XOPEN_XPG4, > > > _SC_CHAR_BIT, > > _SC_CHAR_MAX, > > _SC_CHAR_MIN, > > _SC_INT_MAX, > > _SC_INT_MIN, > > _SC_LONG_BIT, > > _SC_WORD_BIT, > > _SC_MB_LEN_MAX, > > _SC_NZERO, > > _SC_SSIZE_MAX, > > _SC_SCHAR_MAX, > > _SC_SCHAR_MIN, > > _SC_SHRT_MAX, > > _SC_SHRT_MIN, > > _SC_UCHAR_MAX, > > _SC_UINT_MAX, > > _SC_ULONG_MAX, > > _SC_USHRT_MAX, > > > _SC_NL_ARGMAX, > > _SC_NL_LANGMAX, > > _SC_NL_MSGMAX, > > _SC_NL_NMAX, > > _SC_NL_SETMAX, > > _SC_NL_TEXTMAX, > > > _SC_XBS5_ILP32_OFF32, > > _SC_XBS5_ILP32_OFFBIG, > > _SC_XBS5_LP64_OFF64, > > _SC_XBS5_LPBIG_OFFBIG, > > > _SC_XOPEN_LEGACY, > > _SC_XOPEN_REALTIME, > > _SC_XOPEN_REALTIME_THREADS, > > > _SC_ADVISORY_INFO, > > _SC_BARRIERS, > > _SC_BASE, > > _SC_C_LANG_SUPPORT, > > _SC_C_LANG_SUPPORT_R, > > _SC_CLOCK_SELECTION, > > _SC_CPUTIME, > > _SC_THREAD_CPUTIME, > > _SC_DEVICE_IO, > > _SC_DEVICE_SPECIFIC, > > _SC_DEVICE_SPECIFIC_R, > > _SC_FD_MGMT, > > _SC_FIFO, > > _SC_PIPE, > > _SC_FILE_ATTRIBUTES, > > _SC_FILE_LOCKING, > > _SC_FILE_SYSTEM, > > _SC_MONOTONIC_CLOCK, > > _SC_MULTI_PROCESS, > > _SC_SINGLE_PROCESS, > > _SC_NETWORKING, > > _SC_READER_WRITER_LOCKS, > > _SC_SPIN_LOCKS, > > _SC_REGEXP, > > _SC_REGEX_VERSION, > > _SC_SHELL, > > _SC_SIGNALS, > > _SC_SPAWN, > > _SC_SPORADIC_SERVER, > > _SC_THREAD_SPORADIC_SERVER, > > _SC_SYSTEM_DATABASE, > > _SC_SYSTEM_DATABASE_R, > > _SC_TIMEOUTS, > > _SC_TYPED_MEMORY_OBJECTS, > > _SC_USER_GROUPS, > > _SC_USER_GROUPS_R, > > _SC_2_PBS, > > _SC_2_PBS_ACCOUNTING, > > _SC_2_PBS_LOCATE, > > _SC_2_PBS_MESSAGE, > > _SC_2_PBS_TRACK, > > _SC_SYMLOOP_MAX, > > _SC_STREAMS, > > _SC_2_PBS_CHECKPOINT, > > > _SC_V6_ILP32_OFF32, > > _SC_V6_ILP32_OFFBIG, > > _SC_V6_LP64_OFF64, > > _SC_V6_LPBIG_OFFBIG, > > > _SC_HOST_NAME_MAX, > > _SC_TRACE, > > _SC_TRACE_EVENT_FILTER, > > _SC_TRACE_INHERIT, > > _SC_TRACE_LOG, > > > _SC_LEVEL1_ICACHE_SIZE, > > _SC_LEVEL1_ICACHE_ASSOC, > > _SC_LEVEL1_ICACHE_LINESIZE, > > _SC_LEVEL1_DCACHE_SIZE, > > _SC_LEVEL1_DCACHE_ASSOC, > > _SC_LEVEL1_DCACHE_LINESIZE, > > _SC_LEVEL2_CACHE_SIZE, > > _SC_LEVEL2_CACHE_ASSOC, > > _SC_LEVEL2_CACHE_LINESIZE, > > _SC_LEVEL3_CACHE_SIZE, > > _SC_LEVEL3_CACHE_ASSOC, > > _SC_LEVEL3_CACHE_LINESIZE, > > _SC_LEVEL4_CACHE_SIZE, > > _SC_LEVEL4_CACHE_ASSOC, > > _SC_LEVEL4_CACHE_LINESIZE, > > > > _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, > > _SC_RAW_SOCKETS, > > > _SC_V7_ILP32_OFF32, > > _SC_V7_ILP32_OFFBIG, > > _SC_V7_LP64_OFF64, > > _SC_V7_LPBIG_OFFBIG, > > > _SC_SS_REPL_MAX, > > > _SC_TRACE_EVENT_NAME_MAX, > > _SC_TRACE_NAME_MAX, > > _SC_TRACE_SYS_MAX, > > _SC_TRACE_USER_EVENT_MAX, > > > _SC_XOPEN_STREAMS, > > > _SC_THREAD_ROBUST_PRIO_INHERIT, > > _SC_THREAD_ROBUST_PRIO_PROTECT > > }; > > >enum > { > _CS_PATH, > > > _CS_V6_WIDTH_RESTRICTED_ENVS, > > > > _CS_GNU_LIBC_VERSION, > > _CS_GNU_LIBPTHREAD_VERSION, > > > _CS_V5_WIDTH_RESTRICTED_ENVS, > > > > _CS_V7_WIDTH_RESTRICTED_ENVS, > > > > _CS_LFS_CFLAGS = 1000, > > _CS_LFS_LDFLAGS, > > _CS_LFS_LIBS, > > _CS_LFS_LINTFLAGS, > > _CS_LFS64_CFLAGS, > > _CS_LFS64_LDFLAGS, > > _CS_LFS64_LIBS, > > _CS_LFS64_LINTFLAGS, > > > _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, > > _CS_XBS5_ILP32_OFF32_LDFLAGS, > > _CS_XBS5_ILP32_OFF32_LIBS, > > _CS_XBS5_ILP32_OFF32_LINTFLAGS, > > _CS_XBS5_ILP32_OFFBIG_CFLAGS, > > _CS_XBS5_ILP32_OFFBIG_LDFLAGS, > > _CS_XBS5_ILP32_OFFBIG_LIBS, > > _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, > > _CS_XBS5_LP64_OFF64_CFLAGS, > > _CS_XBS5_LP64_OFF64_LDFLAGS, > > _CS_XBS5_LP64_OFF64_LIBS, > > _CS_XBS5_LP64_OFF64_LINTFLAGS, > > _CS_XBS5_LPBIG_OFFBIG_CFLAGS, > > _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, > > _CS_XBS5_LPBIG_OFFBIG_LIBS, > > _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, > > > _CS_POSIX_V6_ILP32_OFF32_CFLAGS, > > _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, > > _CS_POSIX_V6_ILP32_OFF32_LIBS, > > _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, > > _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, > > _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, > > _CS_POSIX_V6_ILP32_OFFBIG_LIBS, > > _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, > > _CS_POSIX_V6_LP64_OFF64_CFLAGS, > > _CS_POSIX_V6_LP64_OFF64_LDFLAGS, > > _CS_POSIX_V6_LP64_OFF64_LIBS, > > _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, > > _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, > > _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, > > _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, > > _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, > > > _CS_POSIX_V7_ILP32_OFF32_CFLAGS, > > _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, > > _CS_POSIX_V7_ILP32_OFF32_LIBS, > > _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, > > _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, > > _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, > > _CS_POSIX_V7_ILP32_OFFBIG_LIBS, > > _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, > > _CS_POSIX_V7_LP64_OFF64_CFLAGS, > > _CS_POSIX_V7_LP64_OFF64_LDFLAGS, > > _CS_POSIX_V7_LP64_OFF64_LIBS, > > _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, > > _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, > > _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, > > _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, > > _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, > > > _CS_V6_ENV, > > _CS_V7_ENV > > }; ># 607 "/usr/include/unistd.h" 2 3 4 > > >extern long int pathconf (__const char *__path, int __name) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); > > >extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__)); > > >extern long int sysconf (int __name) __attribute__ ((__nothrow__)); > > > >extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__)); > > > > >extern __pid_t getpid (void) __attribute__ ((__nothrow__)); > > >extern __pid_t getppid (void) __attribute__ ((__nothrow__)); > > > > >extern __pid_t getpgrp (void) __attribute__ ((__nothrow__)); ># 643 "/usr/include/unistd.h" 3 4 >extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__)); > >extern __pid_t getpgid (__pid_t __pid) __attribute__ ((__nothrow__)); > > > > > > >extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__)); ># 669 "/usr/include/unistd.h" 3 4 >extern int setpgrp (void) __attribute__ ((__nothrow__)); ># 686 "/usr/include/unistd.h" 3 4 >extern __pid_t setsid (void) __attribute__ ((__nothrow__)); > > > >extern __pid_t getsid (__pid_t __pid) __attribute__ ((__nothrow__)); > > > >extern __uid_t getuid (void) __attribute__ ((__nothrow__)); > > >extern __uid_t geteuid (void) __attribute__ ((__nothrow__)); > > >extern __gid_t getgid (void) __attribute__ ((__nothrow__)); > > >extern __gid_t getegid (void) __attribute__ ((__nothrow__)); > > > > >extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__)) ; ># 719 "/usr/include/unistd.h" 3 4 >extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__)); > > > > >extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__)); > > > > >extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__)); > > > > > > >extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__)); > > > > >extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__)); > > > > >extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__)); ># 775 "/usr/include/unistd.h" 3 4 >extern __pid_t fork (void) __attribute__ ((__nothrow__)); > > > > > > > >extern __pid_t vfork (void) __attribute__ ((__nothrow__)); > > > > > >extern char *ttyname (int __fd) __attribute__ ((__nothrow__)); > > > >extern int ttyname_r (int __fd, char *__buf, size_t __buflen) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) ; > > > >extern int isatty (int __fd) __attribute__ ((__nothrow__)); > > > > > >extern int ttyslot (void) __attribute__ ((__nothrow__)); > > > > >extern int link (__const char *__from, __const char *__to) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) ; > > > > >extern int linkat (int __fromfd, __const char *__from, int __tofd, > __const char *__to, int __flags) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))) ; > > > > >extern int symlink (__const char *__from, __const char *__to) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) ; > > > > >extern ssize_t readlink (__const char *__restrict __path, > char *__restrict __buf, size_t __len) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) ; > > > > >extern int symlinkat (__const char *__from, int __tofd, > __const char *__to) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) ; > > >extern ssize_t readlinkat (int __fd, __const char *__restrict __path, > char *__restrict __buf, size_t __len) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))) ; > > > >extern int unlink (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); > > > >extern int unlinkat (int __fd, __const char *__name, int __flag) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); > > > >extern int rmdir (__const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); > > > >extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__)); > > >extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__)); > > > > > > >extern char *getlogin (void); > > > > > > > >extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))); > > > > >extern int setlogin (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); ># 890 "/usr/include/unistd.h" 3 4 ># 1 "/usr/include/getopt.h" 1 3 4 ># 59 "/usr/include/getopt.h" 3 4 >extern char *optarg; ># 73 "/usr/include/getopt.h" 3 4 >extern int optind; > > > > >extern int opterr; > > > >extern int optopt; ># 152 "/usr/include/getopt.h" 3 4 >extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) > __attribute__ ((__nothrow__)); ># 891 "/usr/include/unistd.h" 2 3 4 > > > > > > > >extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); > > > > > > >extern int sethostname (__const char *__name, size_t __len) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; > > > >extern int sethostid (long int __id) __attribute__ ((__nothrow__)) ; > > > > > >extern int getdomainname (char *__name, size_t __len) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; >extern int setdomainname (__const char *__name, size_t __len) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; > > > > > >extern int vhangup (void) __attribute__ ((__nothrow__)); > > >extern int revoke (__const char *__file) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; > > > > > > > >extern int profil (unsigned short int *__sample_buffer, size_t __size, > size_t __offset, unsigned int __scale) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); > > > > > >extern int acct (__const char *__name) __attribute__ ((__nothrow__)); > > > >extern char *getusershell (void) __attribute__ ((__nothrow__)); >extern void endusershell (void) __attribute__ ((__nothrow__)); >extern void setusershell (void) __attribute__ ((__nothrow__)); > > > > > >extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__)) ; > > > > > > >extern int chroot (__const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; > > > >extern char *getpass (__const char *__prompt) __attribute__ ((__nonnull__ (1))); ># 976 "/usr/include/unistd.h" 3 4 >extern int fsync (int __fd); > > > > > > >extern long int gethostid (void); > > >extern void sync (void) __attribute__ ((__nothrow__)); > > > > > >extern int getpagesize (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); > > > > >extern int getdtablesize (void) __attribute__ ((__nothrow__)); ># 1007 "/usr/include/unistd.h" 3 4 >extern int truncate (__const char *__file, __off_t __length) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; ># 1029 "/usr/include/unistd.h" 3 4 >extern int ftruncate (int __fd, __off_t __length) __attribute__ ((__nothrow__)) ; ># 1050 "/usr/include/unistd.h" 3 4 >extern int brk (void *__addr) __attribute__ ((__nothrow__)) ; > > > > > >extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__)); ># 1071 "/usr/include/unistd.h" 3 4 >extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__)); ># 1094 "/usr/include/unistd.h" 3 4 >extern int lockf (int __fd, int __cmd, __off_t __len) ; ># 1125 "/usr/include/unistd.h" 3 4 >extern int fdatasync (int __fildes); ># 1154 "/usr/include/unistd.h" 3 4 >extern char *ctermid (char *__s) __attribute__ ((__nothrow__)); ># 1163 "/usr/include/unistd.h" 3 4 > ># 42 "../utils/includes.h" 2 > > > > > ># 1 "/usr/include/sys/socket.h" 1 3 4 ># 26 "/usr/include/sys/socket.h" 3 4 > > ># 1 "/usr/include/sys/uio.h" 1 3 4 ># 26 "/usr/include/sys/uio.h" 3 4 > > > ># 1 "/usr/include/bits/uio.h" 1 3 4 ># 44 "/usr/include/bits/uio.h" 3 4 >struct iovec > { > void *iov_base; > size_t iov_len; > }; ># 30 "/usr/include/sys/uio.h" 2 3 4 ># 40 "/usr/include/sys/uio.h" 3 4 >extern ssize_t readv (int __fd, __const struct iovec *__iovec, int __count) > ; ># 51 "/usr/include/sys/uio.h" 3 4 >extern ssize_t writev (int __fd, __const struct iovec *__iovec, int __count) > ; ># 66 "/usr/include/sys/uio.h" 3 4 >extern ssize_t preadv (int __fd, __const struct iovec *__iovec, int __count, > __off_t __offset) ; ># 78 "/usr/include/sys/uio.h" 3 4 >extern ssize_t pwritev (int __fd, __const struct iovec *__iovec, int __count, > __off_t __offset) ; ># 121 "/usr/include/sys/uio.h" 3 4 > ># 29 "/usr/include/sys/socket.h" 2 3 4 > ># 1 "/usr/lib/gcc/i586-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 ># 31 "/usr/include/sys/socket.h" 2 3 4 ># 40 "/usr/include/sys/socket.h" 3 4 ># 1 "/usr/include/bits/socket.h" 1 3 4 ># 29 "/usr/include/bits/socket.h" 3 4 ># 1 "/usr/lib/gcc/i586-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 ># 30 "/usr/include/bits/socket.h" 2 3 4 ># 40 "/usr/include/bits/socket.h" 3 4 >enum __socket_type >{ > SOCK_STREAM = 1, > > > SOCK_DGRAM = 2, > > > SOCK_RAW = 3, > > SOCK_RDM = 4, > > SOCK_SEQPACKET = 5, > > > SOCK_DCCP = 6, > > SOCK_PACKET = 10, > > > > > > > > SOCK_CLOEXEC = 02000000, > > > SOCK_NONBLOCK = 04000 > > >}; ># 175 "/usr/include/bits/socket.h" 3 4 ># 1 "/usr/include/bits/sockaddr.h" 1 3 4 ># 29 "/usr/include/bits/sockaddr.h" 3 4 >typedef unsigned short int sa_family_t; ># 176 "/usr/include/bits/socket.h" 2 3 4 > > >struct sockaddr > { > sa_family_t sa_family; > char sa_data[14]; > }; ># 191 "/usr/include/bits/socket.h" 3 4 >struct sockaddr_storage > { > sa_family_t ss_family; > unsigned long int __ss_align; > char __ss_padding[(128 - (2 * sizeof (unsigned long int)))]; > }; > > > >enum > { > MSG_OOB = 0x01, > > MSG_PEEK = 0x02, > > MSG_DONTROUTE = 0x04, > > > > > > > MSG_CTRUNC = 0x08, > > MSG_PROXY = 0x10, > > MSG_TRUNC = 0x20, > > MSG_DONTWAIT = 0x40, > > MSG_EOR = 0x80, > > MSG_WAITALL = 0x100, > > MSG_FIN = 0x200, > > MSG_SYN = 0x400, > > MSG_CONFIRM = 0x800, > > MSG_RST = 0x1000, > > MSG_ERRQUEUE = 0x2000, > > MSG_NOSIGNAL = 0x4000, > > MSG_MORE = 0x8000, > > MSG_WAITFORONE = 0x10000, > > > MSG_CMSG_CLOEXEC = 0x40000000 > > > > }; > > > > >struct msghdr > { > void *msg_name; > socklen_t msg_namelen; > > struct iovec *msg_iov; > size_t msg_iovlen; > > void *msg_control; > size_t msg_controllen; > > > > > int msg_flags; > }; ># 278 "/usr/include/bits/socket.h" 3 4 >struct cmsghdr > { > size_t cmsg_len; > > > > > int cmsg_level; > int cmsg_type; > > __extension__ unsigned char __cmsg_data []; > > }; ># 308 "/usr/include/bits/socket.h" 3 4 >extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, > struct cmsghdr *__cmsg) __attribute__ ((__nothrow__)); ># 335 "/usr/include/bits/socket.h" 3 4 >enum > { > SCM_RIGHTS = 0x01 > > > > > > }; ># 381 "/usr/include/bits/socket.h" 3 4 ># 1 "/usr/include/asm/socket.h" 1 3 4 ># 1 "/usr/include/asm-generic/socket.h" 1 3 4 > > > ># 1 "/usr/include/asm/sockios.h" 1 3 4 ># 1 "/usr/include/asm-generic/sockios.h" 1 3 4 ># 1 "/usr/include/asm/sockios.h" 2 3 4 ># 5 "/usr/include/asm-generic/socket.h" 2 3 4 ># 1 "/usr/include/asm/socket.h" 2 3 4 ># 382 "/usr/include/bits/socket.h" 2 3 4 ># 415 "/usr/include/bits/socket.h" 3 4 >struct linger > { > int l_onoff; > int l_linger; > }; > > > > > > > > > >extern int recvmmsg (int __fd, struct mmsghdr *__vmessages, > unsigned int __vlen, int __flags, > __const struct timespec *__tmo); > > ># 41 "/usr/include/sys/socket.h" 2 3 4 > > > > >struct osockaddr > { > unsigned short int sa_family; > unsigned char sa_data[14]; > }; > > > > >enum >{ > SHUT_RD = 0, > > SHUT_WR, > > SHUT_RDWR > >}; ># 105 "/usr/include/sys/socket.h" 3 4 >extern int socket (int __domain, int __type, int __protocol) __attribute__ ((__nothrow__)); > > > > > >extern int socketpair (int __domain, int __type, int __protocol, > int __fds[2]) __attribute__ ((__nothrow__)); > > >extern int bind (int __fd, __const struct sockaddr * __addr, socklen_t __len) > __attribute__ ((__nothrow__)); > > >extern int getsockname (int __fd, struct sockaddr *__restrict __addr, > socklen_t *__restrict __len) __attribute__ ((__nothrow__)); ># 129 "/usr/include/sys/socket.h" 3 4 >extern int connect (int __fd, __const struct sockaddr * __addr, socklen_t __len); > > > >extern int getpeername (int __fd, struct sockaddr *__restrict __addr, > socklen_t *__restrict __len) __attribute__ ((__nothrow__)); > > > > > > >extern ssize_t send (int __fd, __const void *__buf, size_t __n, int __flags); > > > > > > >extern ssize_t recv (int __fd, void *__buf, size_t __n, int __flags); > > > > > > >extern ssize_t sendto (int __fd, __const void *__buf, size_t __n, > int __flags, __const struct sockaddr * __addr, > socklen_t __addr_len); ># 166 "/usr/include/sys/socket.h" 3 4 >extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n, > int __flags, struct sockaddr *__restrict __addr, > socklen_t *__restrict __addr_len); > > > > > > > >extern ssize_t sendmsg (int __fd, __const struct msghdr *__message, > int __flags); > > > > > > >extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags); > > > > > >extern int getsockopt (int __fd, int __level, int __optname, > void *__restrict __optval, > socklen_t *__restrict __optlen) __attribute__ ((__nothrow__)); > > > > >extern int setsockopt (int __fd, int __level, int __optname, > __const void *__optval, socklen_t __optlen) __attribute__ ((__nothrow__)); > > > > > >extern int listen (int __fd, int __n) __attribute__ ((__nothrow__)); ># 214 "/usr/include/sys/socket.h" 3 4 >extern int accept (int __fd, struct sockaddr *__restrict __addr, > socklen_t *__restrict __addr_len); ># 232 "/usr/include/sys/socket.h" 3 4 >extern int shutdown (int __fd, int __how) __attribute__ ((__nothrow__)); > > > > >extern int sockatmark (int __fd) __attribute__ ((__nothrow__)); > > > > > > > >extern int isfdtype (int __fd, int __fdtype) __attribute__ ((__nothrow__)); ># 254 "/usr/include/sys/socket.h" 3 4 > ># 48 "../utils/includes.h" 2 ># 1 "/usr/include/netinet/in.h" 1 3 4 ># 24 "/usr/include/netinet/in.h" 3 4 ># 1 "/usr/lib/gcc/i586-pc-linux-gnu/4.5.3/include/stdint.h" 1 3 4 > > ># 1 "/usr/include/stdint.h" 1 3 4 ># 27 "/usr/include/stdint.h" 3 4 ># 1 "/usr/include/bits/wchar.h" 1 3 4 ># 28 "/usr/include/stdint.h" 2 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 29 "/usr/include/stdint.h" 2 3 4 ># 49 "/usr/include/stdint.h" 3 4 >typedef unsigned char uint8_t; >typedef unsigned short int uint16_t; > >typedef unsigned int uint32_t; > > > > > >__extension__ >typedef unsigned long long int uint64_t; > > > > > > >typedef signed char int_least8_t; >typedef short int int_least16_t; >typedef int int_least32_t; > > > >__extension__ >typedef long long int int_least64_t; > > > >typedef unsigned char uint_least8_t; >typedef unsigned short int uint_least16_t; >typedef unsigned int uint_least32_t; > > > >__extension__ >typedef unsigned long long int uint_least64_t; > > > > > > >typedef signed char int_fast8_t; > > > > > >typedef int int_fast16_t; >typedef int int_fast32_t; >__extension__ >typedef long long int int_fast64_t; > > > >typedef unsigned char uint_fast8_t; > > > > > >typedef unsigned int uint_fast16_t; >typedef unsigned int uint_fast32_t; >__extension__ >typedef unsigned long long int uint_fast64_t; ># 129 "/usr/include/stdint.h" 3 4 >typedef unsigned int uintptr_t; ># 138 "/usr/include/stdint.h" 3 4 >__extension__ >typedef long long int intmax_t; >__extension__ >typedef unsigned long long int uintmax_t; ># 4 "/usr/lib/gcc/i586-pc-linux-gnu/4.5.3/include/stdint.h" 2 3 4 ># 25 "/usr/include/netinet/in.h" 2 3 4 > > > > > > > >enum > { > IPPROTO_IP = 0, > > IPPROTO_HOPOPTS = 0, > > IPPROTO_ICMP = 1, > > IPPROTO_IGMP = 2, > > IPPROTO_IPIP = 4, > > IPPROTO_TCP = 6, > > IPPROTO_EGP = 8, > > IPPROTO_PUP = 12, > > IPPROTO_UDP = 17, > > IPPROTO_IDP = 22, > > IPPROTO_TP = 29, > > IPPROTO_DCCP = 33, > > IPPROTO_IPV6 = 41, > > IPPROTO_ROUTING = 43, > > IPPROTO_FRAGMENT = 44, > > IPPROTO_RSVP = 46, > > IPPROTO_GRE = 47, > > IPPROTO_ESP = 50, > > IPPROTO_AH = 51, > > IPPROTO_ICMPV6 = 58, > > IPPROTO_NONE = 59, > > IPPROTO_DSTOPTS = 60, > > IPPROTO_MTP = 92, > > IPPROTO_ENCAP = 98, > > IPPROTO_PIM = 103, > > IPPROTO_COMP = 108, > > IPPROTO_SCTP = 132, > > IPPROTO_UDPLITE = 136, > > IPPROTO_RAW = 255, > > IPPROTO_MAX > }; > > > >typedef uint16_t in_port_t; > > >enum > { > IPPORT_ECHO = 7, > IPPORT_DISCARD = 9, > IPPORT_SYSTAT = 11, > IPPORT_DAYTIME = 13, > IPPORT_NETSTAT = 15, > IPPORT_FTP = 21, > IPPORT_TELNET = 23, > IPPORT_SMTP = 25, > IPPORT_TIMESERVER = 37, > IPPORT_NAMESERVER = 42, > IPPORT_WHOIS = 43, > IPPORT_MTP = 57, > > IPPORT_TFTP = 69, > IPPORT_RJE = 77, > IPPORT_FINGER = 79, > IPPORT_TTYLINK = 87, > IPPORT_SUPDUP = 95, > > > IPPORT_EXECSERVER = 512, > IPPORT_LOGINSERVER = 513, > IPPORT_CMDSERVER = 514, > IPPORT_EFSSERVER = 520, > > > IPPORT_BIFFUDP = 512, > IPPORT_WHOSERVER = 513, > IPPORT_ROUTESERVER = 520, > > > IPPORT_RESERVED = 1024, > > > IPPORT_USERRESERVED = 5000 > }; > > > >typedef uint32_t in_addr_t; >struct in_addr > { > in_addr_t s_addr; > }; ># 198 "/usr/include/netinet/in.h" 3 4 >struct in6_addr > { > union > { > uint8_t __u6_addr8[16]; > > uint16_t __u6_addr16[8]; > uint32_t __u6_addr32[4]; > > } __in6_u; > > > > > > }; > >extern const struct in6_addr in6addr_any; >extern const struct in6_addr in6addr_loopback; ># 225 "/usr/include/netinet/in.h" 3 4 >struct sockaddr_in > { > sa_family_t sin_family; > in_port_t sin_port; > struct in_addr sin_addr; > > > unsigned char sin_zero[sizeof (struct sockaddr) - > (sizeof (unsigned short int)) - > sizeof (in_port_t) - > sizeof (struct in_addr)]; > }; > > >struct sockaddr_in6 > { > sa_family_t sin6_family; > in_port_t sin6_port; > uint32_t sin6_flowinfo; > struct in6_addr sin6_addr; > uint32_t sin6_scope_id; > }; > > > > >struct ip_mreq > { > > struct in_addr imr_multiaddr; > > > struct in_addr imr_interface; > }; > >struct ip_mreq_source > { > > struct in_addr imr_multiaddr; > > > struct in_addr imr_interface; > > > struct in_addr imr_sourceaddr; > }; > > > > >struct ipv6_mreq > { > > struct in6_addr ipv6mr_multiaddr; > > > unsigned int ipv6mr_interface; > }; > > > > >struct group_req > { > > uint32_t gr_interface; > > > struct sockaddr_storage gr_group; > }; > >struct group_source_req > { > > uint32_t gsr_interface; > > > struct sockaddr_storage gsr_group; > > > struct sockaddr_storage gsr_source; > }; > > > >struct ip_msfilter > { > > struct in_addr imsf_multiaddr; > > > struct in_addr imsf_interface; > > > uint32_t imsf_fmode; > > > uint32_t imsf_numsrc; > > struct in_addr imsf_slist[1]; > }; > > > > > >struct group_filter > { > > uint32_t gf_interface; > > > struct sockaddr_storage gf_group; > > > uint32_t gf_fmode; > > > uint32_t gf_numsrc; > > struct sockaddr_storage gf_slist[1]; >}; ># 356 "/usr/include/netinet/in.h" 3 4 ># 1 "/usr/include/bits/in.h" 1 3 4 ># 98 "/usr/include/bits/in.h" 3 4 >struct ip_opts > { > struct in_addr ip_dst; > char ip_opts[40]; > }; > > >struct ip_mreqn > { > struct in_addr imr_multiaddr; > struct in_addr imr_address; > int imr_ifindex; > }; > > >struct in_pktinfo > { > int ipi_ifindex; > struct in_addr ipi_spec_dst; > struct in_addr ipi_addr; > }; ># 357 "/usr/include/netinet/in.h" 2 3 4 ># 365 "/usr/include/netinet/in.h" 3 4 >extern uint32_t ntohl (uint32_t __netlong) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); >extern uint16_t ntohs (uint16_t __netshort) > __attribute__ ((__nothrow__)) __attribute__ ((__const__)); >extern uint32_t htonl (uint32_t __hostlong) > __attribute__ ((__nothrow__)) __attribute__ ((__const__)); >extern uint16_t htons (uint16_t __hostshort) > __attribute__ ((__nothrow__)) __attribute__ ((__const__)); > > > > ># 1 "/usr/include/bits/byteswap.h" 1 3 4 ># 377 "/usr/include/netinet/in.h" 2 3 4 ># 440 "/usr/include/netinet/in.h" 3 4 >extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) __attribute__ ((__nothrow__)); > > >extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in) > __attribute__ ((__nothrow__)); ># 565 "/usr/include/netinet/in.h" 3 4 > ># 49 "../utils/includes.h" 2 ># 1 "/usr/include/arpa/inet.h" 1 3 4 ># 31 "/usr/include/arpa/inet.h" 3 4 > > > > >extern in_addr_t inet_addr (__const char *__cp) __attribute__ ((__nothrow__)); > > >extern in_addr_t inet_lnaof (struct in_addr __in) __attribute__ ((__nothrow__)); > > > >extern struct in_addr inet_makeaddr (in_addr_t __net, in_addr_t __host) > __attribute__ ((__nothrow__)); > > >extern in_addr_t inet_netof (struct in_addr __in) __attribute__ ((__nothrow__)); > > > >extern in_addr_t inet_network (__const char *__cp) __attribute__ ((__nothrow__)); > > > >extern char *inet_ntoa (struct in_addr __in) __attribute__ ((__nothrow__)); > > > > >extern int inet_pton (int __af, __const char *__restrict __cp, > void *__restrict __buf) __attribute__ ((__nothrow__)); > > > > >extern __const char *inet_ntop (int __af, __const void *__restrict __cp, > char *__restrict __buf, socklen_t __len) > __attribute__ ((__nothrow__)); > > > > > > >extern int inet_aton (__const char *__cp, struct in_addr *__inp) __attribute__ ((__nothrow__)); > > > >extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) __attribute__ ((__nothrow__)); > > > > >extern char *inet_net_ntop (int __af, __const void *__cp, int __bits, > char *__buf, size_t __len) __attribute__ ((__nothrow__)); > > > > >extern int inet_net_pton (int __af, __const char *__cp, > void *__buf, size_t __len) __attribute__ ((__nothrow__)); > > > > >extern unsigned int inet_nsap_addr (__const char *__cp, > unsigned char *__buf, int __len) __attribute__ ((__nothrow__)); > > > >extern char *inet_nsap_ntoa (int __len, __const unsigned char *__cp, > char *__buf) __attribute__ ((__nothrow__)); > > > ># 50 "../utils/includes.h" 2 > > > > ># 1 "/usr/include/sys/time.h" 1 3 4 ># 29 "/usr/include/sys/time.h" 3 4 ># 1 "/usr/include/bits/time.h" 1 3 4 ># 30 "/usr/include/sys/time.h" 2 3 4 ># 39 "/usr/include/sys/time.h" 3 4 > ># 57 "/usr/include/sys/time.h" 3 4 >struct timezone > { > int tz_minuteswest; > int tz_dsttime; > }; > >typedef struct timezone *__restrict __timezone_ptr_t; ># 73 "/usr/include/sys/time.h" 3 4 >extern int gettimeofday (struct timeval *__restrict __tv, > __timezone_ptr_t __tz) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); > > > > >extern int settimeofday (__const struct timeval *__tv, > __const struct timezone *__tz) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); > > > > > >extern int adjtime (__const struct timeval *__delta, > struct timeval *__olddelta) __attribute__ ((__nothrow__)); > > > > >enum __itimer_which > { > > ITIMER_REAL = 0, > > > ITIMER_VIRTUAL = 1, > > > > ITIMER_PROF = 2 > > }; > > > >struct itimerval > { > > struct timeval it_interval; > > struct timeval it_value; > }; > > > > > > >typedef int __itimer_which_t; > > > > >extern int getitimer (__itimer_which_t __which, > struct itimerval *__value) __attribute__ ((__nothrow__)); > > > > >extern int setitimer (__itimer_which_t __which, > __const struct itimerval *__restrict __new, > struct itimerval *__restrict __old) __attribute__ ((__nothrow__)); > > > > >extern int utimes (__const char *__file, __const struct timeval __tvp[2]) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); > > > >extern int lutimes (__const char *__file, __const struct timeval __tvp[2]) > __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); > > >extern int futimes (int __fd, __const struct timeval __tvp[2]) __attribute__ ((__nothrow__)); ># 191 "/usr/include/sys/time.h" 3 4 > ># 55 "../utils/includes.h" 2 ># 16 "ieee802_1x.c" 2 > ># 1 "../utils/common.h" 1 ># 18 "../utils/common.h" ># 1 "../utils/os.h" 1 ># 18 "../utils/os.h" >typedef long os_time_t; > > > > > > >void os_sleep(os_time_t sec, os_time_t usec); > >struct os_time { > os_time_t sec; > os_time_t usec; >}; > > > > > > >int os_get_time(struct os_time *t); ># 70 "../utils/os.h" >int os_mktime(int year, int month, int day, int hour, int min, int sec, > os_time_t *t); > > > > > > > >int os_daemonize(const char *pid_file); > > > > > >void os_daemonize_terminate(const char *pid_file); > > > > > > > >int os_get_random(unsigned char *buf, size_t len); > > > > > >unsigned long os_random(void); ># 114 "../utils/os.h" >char * os_rel2abs_path(const char *rel_path); ># 124 "../utils/os.h" >int os_program_init(void); ># 134 "../utils/os.h" >void os_program_deinit(void); ># 146 "../utils/os.h" >int os_setenv(const char *name, const char *value, int overwrite); ># 156 "../utils/os.h" >int os_unsetenv(const char *name); ># 168 "../utils/os.h" >char * os_readfile(const char *name, size_t *len); ># 177 "../utils/os.h" >void * os_zalloc(size_t size); ># 476 "../utils/os.h" >size_t os_strlcpy(char *dest, const char *src, size_t siz); ># 19 "../utils/common.h" 2 > > > ># 1 "/usr/include/byteswap.h" 1 3 4 ># 23 "/usr/include/byteswap.h" 3 4 ># 1 "/usr/include/bits/byteswap.h" 1 3 4 ># 24 "/usr/include/byteswap.h" 2 3 4 ># 23 "../utils/common.h" 2 ># 157 "../utils/common.h" >typedef uint64_t u64; >typedef uint32_t u32; >typedef uint16_t u16; >typedef uint8_t u8; >typedef int64_t s64; >typedef int32_t s32; >typedef int16_t s16; >typedef int8_t s8; ># 423 "../utils/common.h" >typedef u16 be16; >typedef u16 le16; >typedef u32 be32; >typedef u32 le32; >typedef u64 be64; >typedef u64 le64; ># 438 "../utils/common.h" >int hwaddr_aton(const char *txt, u8 *addr); >int hwaddr_aton2(const char *txt, u8 *addr); >int hexstr2bin(const char *hex, u8 *buf, size_t len); >void inc_byte_array(u8 *counter, size_t len); >void wpa_get_ntp_timestamp(u8 *buf); >int wpa_snprintf_hex(char *buf, size_t buf_size, const u8 *data, size_t len); >int wpa_snprintf_hex_uppercase(char *buf, size_t buf_size, const u8 *data, > size_t len); ># 455 "../utils/common.h" >const char * wpa_ssid_txt(const u8 *ssid, size_t ssid_len); > >static inline int is_zero_ether_addr(const u8 *a) >{ > return !(a[0] | a[1] | a[2] | a[3] | a[4] | a[5]); >} > ># 1 "../utils/wpa_debug.h" 1 ># 18 "../utils/wpa_debug.h" ># 1 "../utils/wpabuf.h" 1 ># 23 "../utils/wpabuf.h" >struct wpabuf { > size_t size; > size_t used; > u8 *ext_data; > > >}; > > >int wpabuf_resize(struct wpabuf **buf, size_t add_len); >struct wpabuf * wpabuf_alloc(size_t len); >struct wpabuf * wpabuf_alloc_ext_data(u8 *data, size_t len); >struct wpabuf * wpabuf_alloc_copy(const void *data, size_t len); >struct wpabuf * wpabuf_dup(const struct wpabuf *src); >void wpabuf_free(struct wpabuf *buf); >void * wpabuf_put(struct wpabuf *buf, size_t len); >struct wpabuf * wpabuf_concat(struct wpabuf *a, struct wpabuf *b); >struct wpabuf * wpabuf_zeropad(struct wpabuf *buf, size_t len); >void wpabuf_printf(struct wpabuf *buf, char *fmt, ...) __attribute__ ((format (printf, (2), (3)))); > > > > > > > >static inline size_t wpabuf_size(const struct wpabuf *buf) >{ > return buf->size; >} > > > > > > >static inline size_t wpabuf_len(const struct wpabuf *buf) >{ > return buf->used; >} > > > > > > >static inline size_t wpabuf_tailroom(const struct wpabuf *buf) >{ > return buf->size - buf->used; >} > > > > > > >static inline const void * wpabuf_head(const struct wpabuf *buf) >{ > if (buf->ext_data) > return buf->ext_data; > return buf + 1; >} > >static inline const u8 * wpabuf_head_u8(const struct wpabuf *buf) >{ > return wpabuf_head(buf); >} > > > > > > >static inline void * wpabuf_mhead(struct wpabuf *buf) >{ > if (buf->ext_data) > return buf->ext_data; > return buf + 1; >} > >static inline u8 * wpabuf_mhead_u8(struct wpabuf *buf) >{ > return wpabuf_mhead(buf); >} > >static inline void wpabuf_put_u8(struct wpabuf *buf, u8 data) >{ > u8 *pos = wpabuf_put(buf, 1); > *pos = data; >} > >static inline void wpabuf_put_le16(struct wpabuf *buf, u16 data) >{ > u8 *pos = wpabuf_put(buf, 2); > do { (pos)[1] = ((u16) (data)) >> 8; (pos)[0] = ((u16) (data)) & 0xff; } while (0); >} > >static inline void wpabuf_put_be16(struct wpabuf *buf, u16 data) >{ > u8 *pos = wpabuf_put(buf, 2); > do { (pos)[0] = ((u16) (data)) >> 8; (pos)[1] = ((u16) (data)) & 0xff; } while (0); >} > >static inline void wpabuf_put_be24(struct wpabuf *buf, u32 data) >{ > u8 *pos = wpabuf_put(buf, 3); > do { (pos)[0] = (u8) ((((u32) (data)) >> 16) & 0xff); (pos)[1] = (u8) ((((u32) (data)) >> 8) & 0xff); (pos)[2] = (u8) (((u32) (data)) & 0xff); } while (0); >} > >static inline void wpabuf_put_be32(struct wpabuf *buf, u32 data) >{ > u8 *pos = wpabuf_put(buf, 4); > do { (pos)[0] = (u8) ((((u32) (data)) >> 24) & 0xff); (pos)[1] = (u8) ((((u32) (data)) >> 16) & 0xff); (pos)[2] = (u8) ((((u32) (data)) >> 8) & 0xff); (pos)[3] = (u8) (((u32) (data)) & 0xff); } while (0); >} > >static inline void wpabuf_put_data(struct wpabuf *buf, const void *data, > size_t len) >{ > if (data) > memcpy((wpabuf_put(buf, len)), (data), (len)); >} > >static inline void wpabuf_put_buf(struct wpabuf *dst, > const struct wpabuf *src) >{ > wpabuf_put_data(dst, wpabuf_head(src), wpabuf_len(src)); >} > >static inline void wpabuf_set(struct wpabuf *buf, const void *data, size_t len) >{ > buf->ext_data = (u8 *) data; > buf->size = buf->used = len; >} > >static inline void wpabuf_put_str(struct wpabuf *dst, const char *str) >{ > wpabuf_put_data(dst, str, strlen(str)); >} ># 19 "../utils/wpa_debug.h" 2 > > > > >enum { MSG_MSGDUMP, MSG_DEBUG, MSG_INFO, MSG_WARNING, MSG_ERROR }; ># 40 "../utils/wpa_debug.h" >int wpa_debug_open_file(const char *path); >void wpa_debug_close_file(void); ># 50 "../utils/wpa_debug.h" >void wpa_debug_print_timestamp(void); ># 63 "../utils/wpa_debug.h" >void wpa_printf(int level, const char *fmt, ...) >__attribute__ ((format (printf, (2), (3)))); ># 77 "../utils/wpa_debug.h" >void wpa_hexdump(int level, const char *title, const u8 *buf, size_t len); > >static inline void wpa_hexdump_buf(int level, const char *title, > const struct wpabuf *buf) >{ > wpa_hexdump(level, title, wpabuf_head(buf), wpabuf_len(buf)); >} ># 98 "../utils/wpa_debug.h" >void wpa_hexdump_key(int level, const char *title, const u8 *buf, size_t len); > >static inline void wpa_hexdump_buf_key(int level, const char *title, > const struct wpabuf *buf) >{ > wpa_hexdump_key(level, title, wpabuf_head(buf), wpabuf_len(buf)); >} ># 119 "../utils/wpa_debug.h" >void wpa_hexdump_ascii(int level, const char *title, const u8 *buf, > size_t len); ># 136 "../utils/wpa_debug.h" >void wpa_hexdump_ascii_key(int level, const char *title, const u8 *buf, > size_t len); ># 161 "../utils/wpa_debug.h" >void wpa_msg(void *ctx, int level, const char *fmt, ...) __attribute__ ((format (printf, (3), (4)))); ># 175 "../utils/wpa_debug.h" >void wpa_msg_ctrl(void *ctx, int level, const char *fmt, ...) >__attribute__ ((format (printf, (3), (4)))); > >typedef void (*wpa_msg_cb_func)(void *ctx, int level, const char *txt, > size_t len); > > > > > >void wpa_msg_register_cb(wpa_msg_cb_func func); > > > > > > > >void hostapd_logger(void *ctx, const u8 *addr, unsigned int module, int level, > const char *fmt, ...) __attribute__ ((format (printf, (5), (6)))); > >typedef void (*hostapd_logger_cb_func)(void *ctx, const u8 *addr, > unsigned int module, int level, > const char *txt, size_t len); > > > > > >void hostapd_logger_register_cb(hostapd_logger_cb_func func); ># 215 "../utils/wpa_debug.h" >enum hostapd_logger_level { > HOSTAPD_LEVEL_DEBUG_VERBOSE = 0, > HOSTAPD_LEVEL_DEBUG = 1, > HOSTAPD_LEVEL_INFO = 2, > HOSTAPD_LEVEL_NOTICE = 3, > HOSTAPD_LEVEL_WARNING = 4 >}; ># 231 "../utils/wpa_debug.h" >static inline void wpa_debug_open_syslog(void) >{ >} > >static inline void wpa_debug_close_syslog(void) >{ >} ># 463 "../utils/common.h" 2 ># 474 "../utils/common.h" >void * __hide_aliasing_typecast(void *foo); ># 18 "ieee802_1x.c" 2 ># 1 "../utils/eloop.h" 1 ># 37 "../utils/eloop.h" >typedef enum { > EVENT_TYPE_READ = 0, > EVENT_TYPE_WRITE, > EVENT_TYPE_EXCEPTION >} eloop_event_type; > > > > > > > >typedef void (*eloop_sock_handler)(int sock, void *eloop_ctx, void *sock_ctx); > > > > > > >typedef void (*eloop_event_handler)(void *eloop_data, void *user_ctx); > > > > > > >typedef void (*eloop_timeout_handler)(void *eloop_data, void *user_ctx); ># 72 "../utils/eloop.h" >typedef void (*eloop_signal_handler)(int sig, void *signal_ctx); > > > > > > > >int eloop_init(void); ># 96 "../utils/eloop.h" >int eloop_register_read_sock(int sock, eloop_sock_handler handler, > void *eloop_data, void *user_data); ># 106 "../utils/eloop.h" >void eloop_unregister_read_sock(int sock); ># 123 "../utils/eloop.h" >int eloop_register_sock(int sock, eloop_event_type type, > eloop_sock_handler handler, > void *eloop_data, void *user_data); ># 135 "../utils/eloop.h" >void eloop_unregister_sock(int sock, eloop_event_type type); ># 159 "../utils/eloop.h" >int eloop_register_event(void *event, size_t event_size, > eloop_event_handler handler, > void *eloop_data, void *user_data); ># 171 "../utils/eloop.h" >void eloop_unregister_event(void *event, size_t event_size); ># 185 "../utils/eloop.h" >int eloop_register_timeout(unsigned int secs, unsigned int usecs, > eloop_timeout_handler handler, > void *eloop_data, void *user_data); ># 200 "../utils/eloop.h" >int eloop_cancel_timeout(eloop_timeout_handler handler, > void *eloop_data, void *user_data); ># 213 "../utils/eloop.h" >int eloop_is_timeout_registered(eloop_timeout_handler handler, > void *eloop_data, void *user_data); ># 229 "../utils/eloop.h" >int eloop_register_signal(int sig, eloop_signal_handler handler, > void *user_data); ># 249 "../utils/eloop.h" >int eloop_register_signal_terminate(eloop_signal_handler handler, > void *user_data); ># 269 "../utils/eloop.h" >int eloop_register_signal_reconfig(eloop_signal_handler handler, > void *user_data); ># 279 "../utils/eloop.h" >void eloop_run(void); > > > > > > > >void eloop_terminate(void); > > > > > > > >void eloop_destroy(void); ># 306 "../utils/eloop.h" >int eloop_terminated(void); > > > > > > > >void eloop_wait_for_read_sock(int sock); ># 19 "ieee802_1x.c" 2 ># 1 "../crypto/md5.h" 1 ># 20 "../crypto/md5.h" >int hmac_md5_vector(const u8 *key, size_t key_len, size_t num_elem, > const u8 *addr[], const size_t *len, u8 *mac); >int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len, > u8 *mac); ># 20 "ieee802_1x.c" 2 ># 1 "../crypto/crypto.h" 1 ># 38 "../crypto/crypto.h" >int md4_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac); ># 48 "../crypto/crypto.h" >int md5_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac); ># 74 "../crypto/crypto.h" >int sha1_vector(size_t num_elem, const u8 *addr[], const size_t *len, > u8 *mac); ># 89 "../crypto/crypto.h" >int __attribute__((__warn_unused_result__)) fips186_2_prf(const u8 *seed, size_t seed_len, u8 *x, > size_t xlen); ># 100 "../crypto/crypto.h" >int sha256_vector(size_t num_elem, const u8 *addr[], const size_t *len, > u8 *mac); > > > > > > > >void des_encrypt(const u8 *clear, const u8 *key, u8 *cypher); > > > > > > > >void * aes_encrypt_init(const u8 *key, size_t len); > > > > > > > >void aes_encrypt(void *ctx, const u8 *plain, u8 *crypt); > > > > > >void aes_encrypt_deinit(void *ctx); > > > > > > > >void * aes_decrypt_init(const u8 *key, size_t len); > > > > > > > >void aes_decrypt(void *ctx, const u8 *crypt, u8 *plain); > > > > > >void aes_decrypt_deinit(void *ctx); > > >enum crypto_hash_alg { > CRYPTO_HASH_ALG_MD5, CRYPTO_HASH_ALG_SHA1, > CRYPTO_HASH_ALG_HMAC_MD5, CRYPTO_HASH_ALG_HMAC_SHA1 >}; > >struct crypto_hash; ># 175 "../crypto/crypto.h" >struct crypto_hash * crypto_hash_init(enum crypto_hash_alg alg, const u8 *key, > size_t key_len); ># 188 "../crypto/crypto.h" >void crypto_hash_update(struct crypto_hash *ctx, const u8 *data, size_t len); ># 207 "../crypto/crypto.h" >int crypto_hash_finish(struct crypto_hash *ctx, u8 *hash, size_t *len); > > >enum crypto_cipher_alg { > CRYPTO_CIPHER_NULL = 0, CRYPTO_CIPHER_ALG_AES, CRYPTO_CIPHER_ALG_3DES, > CRYPTO_CIPHER_ALG_DES, CRYPTO_CIPHER_ALG_RC2, CRYPTO_CIPHER_ALG_RC4 >}; > >struct crypto_cipher; ># 230 "../crypto/crypto.h" >struct crypto_cipher * crypto_cipher_init(enum crypto_cipher_alg alg, > const u8 *iv, const u8 *key, > size_t key_len); ># 246 "../crypto/crypto.h" >int __attribute__((__warn_unused_result__)) crypto_cipher_encrypt(struct crypto_cipher *ctx, > const u8 *plain, u8 *crypt, size_t len); ># 261 "../crypto/crypto.h" >int __attribute__((__warn_unused_result__)) crypto_cipher_decrypt(struct crypto_cipher *ctx, > const u8 *crypt, u8 *plain, size_t len); ># 272 "../crypto/crypto.h" >void crypto_cipher_deinit(struct crypto_cipher *ctx); > > >struct crypto_public_key; >struct crypto_private_key; ># 292 "../crypto/crypto.h" >struct crypto_public_key * crypto_public_key_import(const u8 *key, size_t len); ># 305 "../crypto/crypto.h" >struct crypto_private_key * crypto_private_key_import(const u8 *key, > size_t len, > const char *passwd); ># 323 "../crypto/crypto.h" >struct crypto_public_key * crypto_public_key_from_cert(const u8 *buf, > size_t len); ># 339 "../crypto/crypto.h" >int __attribute__((__warn_unused_result__)) crypto_public_key_encrypt_pkcs1_v15( > struct crypto_public_key *key, const u8 *in, size_t inlen, > u8 *out, size_t *outlen); ># 356 "../crypto/crypto.h" >int __attribute__((__warn_unused_result__)) crypto_private_key_decrypt_pkcs1_v15( > struct crypto_private_key *key, const u8 *in, size_t inlen, > u8 *out, size_t *outlen); ># 373 "../crypto/crypto.h" >int __attribute__((__warn_unused_result__)) crypto_private_key_sign_pkcs1(struct crypto_private_key *key, > const u8 *in, size_t inlen, > u8 *out, size_t *outlen); ># 385 "../crypto/crypto.h" >void crypto_public_key_free(struct crypto_public_key *key); ># 395 "../crypto/crypto.h" >void crypto_private_key_free(struct crypto_private_key *key); ># 406 "../crypto/crypto.h" >int __attribute__((__warn_unused_result__)) crypto_public_key_decrypt_pkcs1( > struct crypto_public_key *key, const u8 *crypt, size_t crypt_len, > u8 *plain, size_t *plain_len); ># 417 "../crypto/crypto.h" >int __attribute__((__warn_unused_result__)) crypto_global_init(void); ># 426 "../crypto/crypto.h" >void crypto_global_deinit(void); ># 448 "../crypto/crypto.h" >int __attribute__((__warn_unused_result__)) crypto_mod_exp(const u8 *base, size_t base_len, > const u8 *power, size_t power_len, > const u8 *modulus, size_t modulus_len, > u8 *result, size_t *result_len); ># 466 "../crypto/crypto.h" >int rc4_skip(const u8 *key, size_t keylen, size_t skip, > u8 *data, size_t data_len); ># 21 "ieee802_1x.c" 2 ># 1 "../common/ieee802_11_defs.h" 1 ># 240 "../common/ieee802_11_defs.h" >struct ieee80211_hdr { > le16 frame_control; > le16 duration_id; > u8 addr1[6]; > u8 addr2[6]; > u8 addr3[6]; > le16 seq_ctrl; > > >} __attribute__ ((packed)); ># 259 "../common/ieee802_11_defs.h" >struct ieee80211_mgmt { > le16 frame_control; > le16 duration; > u8 da[6]; > u8 sa[6]; > u8 bssid[6]; > le16 seq_ctrl; > union { > struct { > le16 auth_alg; > le16 auth_transaction; > le16 status_code; > > u8 variable[0]; > } __attribute__ ((packed)) auth; > struct { > le16 reason_code; > } __attribute__ ((packed)) deauth; > struct { > le16 capab_info; > le16 listen_interval; > > u8 variable[0]; > } __attribute__ ((packed)) assoc_req; > struct { > le16 capab_info; > le16 status_code; > le16 aid; > > u8 variable[0]; > } __attribute__ ((packed)) assoc_resp, reassoc_resp; > struct { > le16 capab_info; > le16 listen_interval; > u8 current_ap[6]; > > u8 variable[0]; > } __attribute__ ((packed)) reassoc_req; > struct { > le16 reason_code; > } __attribute__ ((packed)) disassoc; > struct { > u8 timestamp[8]; > le16 beacon_int; > le16 capab_info; > > > u8 variable[0]; > } __attribute__ ((packed)) beacon; > struct { > > u8 variable[0]; > } __attribute__ ((packed)) probe_req; > struct { > u8 timestamp[8]; > le16 beacon_int; > le16 capab_info; > > > u8 variable[0]; > } __attribute__ ((packed)) probe_resp; > struct { > u8 category; > union { > struct { > u8 action_code; > u8 dialog_token; > u8 status_code; > u8 variable[0]; > } __attribute__ ((packed)) wmm_action; > struct{ > u8 action_code; > u8 element_id; > u8 length; > u8 switch_mode; > u8 new_chan; > u8 switch_count; > } __attribute__ ((packed)) chan_switch; > struct { > u8 action; > u8 sta_addr[6]; > u8 target_ap_addr[6]; > u8 variable[0]; > } __attribute__ ((packed)) ft_action_req; > struct { > u8 action; > u8 sta_addr[6]; > u8 target_ap_addr[6]; > le16 status_code; > u8 variable[0]; > } __attribute__ ((packed)) ft_action_resp; > struct { > u8 action; > u8 trans_id[2]; > } __attribute__ ((packed)) sa_query_req; > struct { > u8 action; > u8 trans_id[2]; > } __attribute__ ((packed)) sa_query_resp; > } u; > } __attribute__ ((packed)) action; > } u; >} __attribute__ ((packed)); > > >struct ieee80211_ht_capabilities { > le16 ht_capabilities_info; > u8 a_mpdu_params; > u8 supported_mcs_set[16]; > le16 ht_extended_capabilities; > le32 tx_bf_capability_info; > u8 asel_capabilities; >} __attribute__ ((packed)); > > >struct ieee80211_ht_operation { > u8 control_chan; > u8 ht_param; > le16 operation_mode; > le16 stbc_param; > u8 basic_set[16]; >} __attribute__ ((packed)); ># 508 "../common/ieee802_11_defs.h" >struct wmm_information_element { > > > u8 oui[3]; > u8 oui_type; > u8 oui_subtype; > u8 version; > u8 qos_info; > >} __attribute__ ((packed)); ># 530 "../common/ieee802_11_defs.h" >struct wmm_ac_parameter { > u8 aci_aifsn; > u8 cw; > le16 txop_limit; >} __attribute__ ((packed)); > > > > > >struct wmm_parameter_element { > > > u8 oui[3]; > u8 oui_type; > u8 oui_subtype; > u8 version; > u8 qos_info; > u8 reserved; > struct wmm_ac_parameter ac[4]; > >} __attribute__ ((packed)); > > >struct wmm_tspec_element { > u8 eid; > u8 length; > u8 oui[3]; > u8 oui_type; > u8 oui_subtype; > u8 version; > > u8 ts_info[3]; > le16 nominal_msdu_size; > le16 maximum_msdu_size; > le32 minimum_service_interval; > le32 maximum_service_interval; > le32 inactivity_interval; > le32 suspension_interval; > le32 service_start_time; > le32 minimum_data_rate; > le32 mean_data_rate; > le32 peak_data_rate; > le32 maximum_burst_size; > le32 delay_bound; > le32 minimum_phy_rate; > le16 surplus_bandwidth_allowance; > le16 medium_time; >} __attribute__ ((packed)); > > > >enum { > WMM_AC_BE = 0 , > WMM_AC_BK = 1 , > WMM_AC_VI = 2 , > WMM_AC_VO = 3 >}; ># 22 "ieee802_1x.c" 2 ># 1 "../common/wpa_ctrl.h" 1 ># 114 "../common/wpa_ctrl.h" >struct wpa_ctrl * wpa_ctrl_open(const char *ctrl_path); ># 123 "../common/wpa_ctrl.h" >void wpa_ctrl_close(struct wpa_ctrl *ctrl); ># 152 "../common/wpa_ctrl.h" >int wpa_ctrl_request(struct wpa_ctrl *ctrl, const char *cmd, size_t cmd_len, > char *reply, size_t *reply_len, > void (*msg_cb)(char *msg, size_t len)); ># 167 "../common/wpa_ctrl.h" >int wpa_ctrl_attach(struct wpa_ctrl *ctrl); ># 179 "../common/wpa_ctrl.h" >int wpa_ctrl_detach(struct wpa_ctrl *ctrl); ># 195 "../common/wpa_ctrl.h" >int wpa_ctrl_recv(struct wpa_ctrl *ctrl, char *reply, size_t *reply_len); ># 208 "../common/wpa_ctrl.h" >int wpa_ctrl_pending(struct wpa_ctrl *ctrl); ># 224 "../common/wpa_ctrl.h" >int wpa_ctrl_get_fd(struct wpa_ctrl *ctrl); ># 23 "ieee802_1x.c" 2 ># 1 "../radius/radius.h" 1 ># 24 "../radius/radius.h" >struct radius_hdr { > u8 code; > u8 identifier; > u16 length; > u8 authenticator[16]; > >} __attribute__ ((packed)); > >enum { RADIUS_CODE_ACCESS_REQUEST = 1, > RADIUS_CODE_ACCESS_ACCEPT = 2, > RADIUS_CODE_ACCESS_REJECT = 3, > RADIUS_CODE_ACCOUNTING_REQUEST = 4, > RADIUS_CODE_ACCOUNTING_RESPONSE = 5, > RADIUS_CODE_ACCESS_CHALLENGE = 11, > RADIUS_CODE_STATUS_SERVER = 12, > RADIUS_CODE_STATUS_CLIENT = 13, > RADIUS_CODE_RESERVED = 255 >}; > >struct radius_attr_hdr { > u8 type; > u8 length; > >} __attribute__ ((packed)); > > > >enum { RADIUS_ATTR_USER_NAME = 1, > RADIUS_ATTR_USER_PASSWORD = 2, > RADIUS_ATTR_NAS_IP_ADDRESS = 4, > RADIUS_ATTR_NAS_PORT = 5, > RADIUS_ATTR_FRAMED_MTU = 12, > RADIUS_ATTR_REPLY_MESSAGE = 18, > RADIUS_ATTR_STATE = 24, > RADIUS_ATTR_CLASS = 25, > RADIUS_ATTR_VENDOR_SPECIFIC = 26, > RADIUS_ATTR_SESSION_TIMEOUT = 27, > RADIUS_ATTR_IDLE_TIMEOUT = 28, > RADIUS_ATTR_TERMINATION_ACTION = 29, > RADIUS_ATTR_CALLED_STATION_ID = 30, > RADIUS_ATTR_CALLING_STATION_ID = 31, > RADIUS_ATTR_NAS_IDENTIFIER = 32, > RADIUS_ATTR_PROXY_STATE = 33, > RADIUS_ATTR_ACCT_STATUS_TYPE = 40, > RADIUS_ATTR_ACCT_DELAY_TIME = 41, > RADIUS_ATTR_ACCT_INPUT_OCTETS = 42, > RADIUS_ATTR_ACCT_OUTPUT_OCTETS = 43, > RADIUS_ATTR_ACCT_SESSION_ID = 44, > RADIUS_ATTR_ACCT_AUTHENTIC = 45, > RADIUS_ATTR_ACCT_SESSION_TIME = 46, > RADIUS_ATTR_ACCT_INPUT_PACKETS = 47, > RADIUS_ATTR_ACCT_OUTPUT_PACKETS = 48, > RADIUS_ATTR_ACCT_TERMINATE_CAUSE = 49, > RADIUS_ATTR_ACCT_MULTI_SESSION_ID = 50, > RADIUS_ATTR_ACCT_LINK_COUNT = 51, > RADIUS_ATTR_ACCT_INPUT_GIGAWORDS = 52, > RADIUS_ATTR_ACCT_OUTPUT_GIGAWORDS = 53, > RADIUS_ATTR_EVENT_TIMESTAMP = 55, > RADIUS_ATTR_NAS_PORT_TYPE = 61, > RADIUS_ATTR_TUNNEL_TYPE = 64, > RADIUS_ATTR_TUNNEL_MEDIUM_TYPE = 65, > RADIUS_ATTR_CONNECT_INFO = 77, > RADIUS_ATTR_EAP_MESSAGE = 79, > RADIUS_ATTR_MESSAGE_AUTHENTICATOR = 80, > RADIUS_ATTR_TUNNEL_PRIVATE_GROUP_ID = 81, > RADIUS_ATTR_ACCT_INTERIM_INTERVAL = 85, > RADIUS_ATTR_CHARGEABLE_USER_IDENTITY = 89, > RADIUS_ATTR_NAS_IPV6_ADDRESS = 95 >}; ># 149 "../radius/radius.h" >struct radius_attr_vendor { > u8 vendor_type; > u8 vendor_length; >} __attribute__ ((packed)); > > > > > > > >enum { RADIUS_VENDOR_ATTR_MS_MPPE_SEND_KEY = 16, > RADIUS_VENDOR_ATTR_MS_MPPE_RECV_KEY = 17 >}; > > > > > >struct radius_ms_mppe_keys { > u8 *send; > size_t send_len; > u8 *recv; > size_t recv_len; >}; > > >struct radius_msg; ># 191 "../radius/radius.h" >struct radius_hdr * radius_msg_get_hdr(struct radius_msg *msg); >struct wpabuf * radius_msg_get_buf(struct radius_msg *msg); >struct radius_msg * radius_msg_new(u8 code, u8 identifier); >void radius_msg_free(struct radius_msg *msg); >void radius_msg_dump(struct radius_msg *msg); >int radius_msg_finish(struct radius_msg *msg, const u8 *secret, > size_t secret_len); >int radius_msg_finish_srv(struct radius_msg *msg, const u8 *secret, > size_t secret_len, const u8 *req_authenticator); >void radius_msg_finish_acct(struct radius_msg *msg, const u8 *secret, > size_t secret_len); >struct radius_attr_hdr * radius_msg_add_attr(struct radius_msg *msg, u8 type, > const u8 *data, size_t data_len); >struct radius_msg * radius_msg_parse(const u8 *data, size_t len); >int radius_msg_add_eap(struct radius_msg *msg, const u8 *data, > size_t data_len); >u8 *radius_msg_get_eap(struct radius_msg *msg, size_t *len); >int radius_msg_verify(struct radius_msg *msg, const u8 *secret, > size_t secret_len, struct radius_msg *sent_msg, > int auth); >int radius_msg_verify_msg_auth(struct radius_msg *msg, const u8 *secret, > size_t secret_len, const u8 *req_auth); >int radius_msg_copy_attr(struct radius_msg *dst, struct radius_msg *src, > u8 type); >void radius_msg_make_authenticator(struct radius_msg *msg, > const u8 *data, size_t len); >struct radius_ms_mppe_keys * >radius_msg_get_ms_keys(struct radius_msg *msg, struct radius_msg *sent_msg, > const u8 *secret, size_t secret_len); >struct radius_ms_mppe_keys * >radius_msg_get_cisco_keys(struct radius_msg *msg, struct radius_msg *sent_msg, > const u8 *secret, size_t secret_len); >int radius_msg_add_mppe_keys(struct radius_msg *msg, > const u8 *req_authenticator, > const u8 *secret, size_t secret_len, > const u8 *send_key, size_t send_key_len, > const u8 *recv_key, size_t recv_key_len); >struct radius_attr_hdr * >radius_msg_add_attr_user_password(struct radius_msg *msg, > const u8 *data, size_t data_len, > const u8 *secret, size_t secret_len); >int radius_msg_get_attr(struct radius_msg *msg, u8 type, u8 *buf, size_t len); >int radius_msg_get_vlanid(struct radius_msg *msg); > >static inline int radius_msg_add_attr_int32(struct radius_msg *msg, u8 type, > u32 value) >{ > u32 val = htonl(value); > return radius_msg_add_attr(msg, type, (u8 *) &val, 4) != ((void *)0); >} > >static inline int radius_msg_get_attr_int32(struct radius_msg *msg, u8 type, > u32 *value) >{ > u32 val; > int res; > res = radius_msg_get_attr(msg, type, (u8 *) &val, 4); > if (res != 4) > return -1; > > *value = ntohl(val); > return 0; >} >int radius_msg_get_attr_ptr(struct radius_msg *msg, u8 type, u8 **buf, > size_t *len, const u8 *start); >int radius_msg_count_attr(struct radius_msg *msg, u8 type, int min_len); > > >struct radius_attr_data { > u8 *data; > size_t len; >}; > >struct radius_class_data { > struct radius_attr_data *attr; > size_t count; >}; > >void radius_free_class(struct radius_class_data *c); >int radius_copy_class(struct radius_class_data *dst, > const struct radius_class_data *src); ># 24 "ieee802_1x.c" 2 ># 1 "../radius/radius_client.h" 1 ># 18 "../radius/radius_client.h" ># 1 "../utils/ip_addr.h" 1 ># 18 "../utils/ip_addr.h" >struct hostapd_ip_addr { > int af; > union { > struct in_addr v4; > > > > u8 max_len[16]; > } u; >}; > >const char * hostapd_ip_txt(const struct hostapd_ip_addr *addr, char *buf, > size_t buflen); >int hostapd_ip_diff(struct hostapd_ip_addr *a, struct hostapd_ip_addr *b); >int hostapd_parse_ip_addr(const char *txt, struct hostapd_ip_addr *addr); ># 19 "../radius/radius_client.h" 2 > >struct radius_msg; ># 33 "../radius/radius_client.h" >struct hostapd_radius_server { > > > > struct hostapd_ip_addr addr; > > > > > int port; > > > > > u8 *shared_secret; > > > > > size_t shared_secret_len; > > > > > > > int index; > > > > > > int round_trip_time; > > > > > u32 requests; > > > > > u32 retransmissions; > > > > > u32 access_accepts; > > > > > u32 access_rejects; > > > > > u32 access_challenges; > > > > > u32 responses; > > > > > u32 malformed_responses; > > > > > u32 bad_authenticators; > > > > > u32 timeouts; > > > > > u32 unknown_types; > > > > > u32 packets_dropped; >}; > > > > >struct hostapd_radius_servers { > > > > struct hostapd_radius_server *auth_servers; > > > > > int num_auth_servers; > > > > > struct hostapd_radius_server *auth_server; > > > > > struct hostapd_radius_server *acct_servers; > > > > > int num_acct_servers; > > > > > struct hostapd_radius_server *acct_server; ># 167 "../radius/radius_client.h" > int retry_primary_interval; > > > > > int msg_dumps; > > > > > struct hostapd_ip_addr client_addr; > > > > > int force_client_addr; >}; > > > > > >typedef enum { > > > > RADIUS_AUTH, > > > > > RADIUS_ACCT, ># 207 "../radius/radius_client.h" > RADIUS_ACCT_INTERIM >} RadiusType; > > > > >typedef enum { > > > > > > RADIUS_RX_PROCESSED, ># 228 "../radius/radius_client.h" > RADIUS_RX_QUEUED, > > > > > RADIUS_RX_UNKNOWN, > > > > > RADIUS_RX_INVALID_AUTHENTICATOR >} RadiusRxResult; > >struct radius_client_data; > >int radius_client_register(struct radius_client_data *radius, > RadiusType msg_type, > RadiusRxResult (*handler) > (struct radius_msg *msg, struct radius_msg *req, > const u8 *shared_secret, size_t shared_secret_len, > void *data), > void *data); >int radius_client_send(struct radius_client_data *radius, > struct radius_msg *msg, > RadiusType msg_type, const u8 *addr); >u8 radius_client_get_id(struct radius_client_data *radius); >void radius_client_flush(struct radius_client_data *radius, int only_auth); >struct radius_client_data * >radius_client_init(void *ctx, struct hostapd_radius_servers *conf); >void radius_client_deinit(struct radius_client_data *radius); >void radius_client_flush_auth(struct radius_client_data *radius, > const u8 *addr); >int radius_client_get_mib(struct radius_client_data *radius, char *buf, > size_t buflen); ># 25 "ieee802_1x.c" 2 ># 1 "../eap_server/eap.h" 1 ># 18 "../eap_server/eap.h" ># 1 "../common/defs.h" 1 ># 24 "../common/defs.h" >typedef enum { FALSE = 0, TRUE = 1 } Boolean; ># 47 "../common/defs.h" >static inline int wpa_key_mgmt_wpa_ieee8021x(int akm) >{ > return akm == (1 << (0)) || > akm == (1 << (5)) || > akm == (1 << (7)); >} > >static inline int wpa_key_mgmt_wpa_psk(int akm) >{ > return akm == (1 << (1)) || > akm == (1 << (6)) || > akm == (1 << (8)); >} > >static inline int wpa_key_mgmt_ft(int akm) >{ > return akm == (1 << (6)) || > akm == (1 << (5)); >} > >static inline int wpa_key_mgmt_sha256(int akm) >{ > return akm == (1 << (8)) || > akm == (1 << (7)); >} ># 83 "../common/defs.h" >enum wpa_alg { > WPA_ALG_NONE, > WPA_ALG_WEP, > WPA_ALG_TKIP, > WPA_ALG_CCMP, > WPA_ALG_IGTK, > WPA_ALG_PMK >}; > > > > >enum wpa_cipher { > CIPHER_NONE, > CIPHER_WEP40, > CIPHER_TKIP, > CIPHER_CCMP, > CIPHER_WEP104 >}; > > > > >enum wpa_key_mgmt { > KEY_MGMT_802_1X, > KEY_MGMT_PSK, > KEY_MGMT_NONE, > KEY_MGMT_802_1X_NO_WPA, > KEY_MGMT_WPA_NONE, > KEY_MGMT_FT_802_1X, > KEY_MGMT_FT_PSK, > KEY_MGMT_802_1X_SHA256, > KEY_MGMT_PSK_SHA256, > KEY_MGMT_WPS >}; ># 129 "../common/defs.h" >enum wpa_states { > > > > > > > > WPA_DISCONNECTED, ># 147 "../common/defs.h" > WPA_INACTIVE, > > > > > > > > WPA_SCANNING, ># 165 "../common/defs.h" > WPA_AUTHENTICATING, ># 176 "../common/defs.h" > WPA_ASSOCIATING, ># 186 "../common/defs.h" > WPA_ASSOCIATED, ># 196 "../common/defs.h" > WPA_4WAY_HANDSHAKE, ># 206 "../common/defs.h" > WPA_GROUP_HANDSHAKE, ># 224 "../common/defs.h" > WPA_COMPLETED >}; ># 239 "../common/defs.h" >enum mfp_options { > NO_MGMT_FRAME_PROTECTION = 0, > MGMT_FRAME_PROTECTION_OPTIONAL = 1, > MGMT_FRAME_PROTECTION_REQUIRED = 2 >}; > > > > >enum hostapd_hw_mode { > HOSTAPD_MODE_IEEE80211B, > HOSTAPD_MODE_IEEE80211G, > HOSTAPD_MODE_IEEE80211A, > NUM_HOSTAPD_MODES >}; ># 19 "../eap_server/eap.h" 2 ># 1 "../eap_common/eap_defs.h" 1 ># 24 "../eap_common/eap_defs.h" >struct eap_hdr { > u8 code; > u8 identifier; > be16 length; > >} __attribute__ ((packed)); > > > > > >enum { EAP_CODE_REQUEST = 1, EAP_CODE_RESPONSE = 2, EAP_CODE_SUCCESS = 3, > EAP_CODE_FAILURE = 4 }; ># 45 "../eap_common/eap_defs.h" >typedef enum { > EAP_TYPE_NONE = 0, > EAP_TYPE_IDENTITY = 1 , > EAP_TYPE_NOTIFICATION = 2 , > EAP_TYPE_NAK = 3 , > EAP_TYPE_MD5 = 4, > EAP_TYPE_OTP = 5 , > EAP_TYPE_GTC = 6, > EAP_TYPE_TLS = 13 , > EAP_TYPE_LEAP = 17 , > EAP_TYPE_SIM = 18 , > EAP_TYPE_TTLS = 21 , > EAP_TYPE_AKA = 23 , > EAP_TYPE_PEAP = 25 , > EAP_TYPE_MSCHAPV2 = 26 , > EAP_TYPE_TLV = 33 , > EAP_TYPE_TNC = 38 > > , > EAP_TYPE_FAST = 43 , > EAP_TYPE_PAX = 46 , > EAP_TYPE_PSK = 47 , > EAP_TYPE_SAKE = 48 , > EAP_TYPE_IKEV2 = 49 , > EAP_TYPE_AKA_PRIME = 50 , > EAP_TYPE_GPSK = 51 , > EAP_TYPE_EXPANDED = 254 >} EapType; > > > >enum { > EAP_VENDOR_IETF = 0, > EAP_VENDOR_MICROSOFT = 0x000137 , > EAP_VENDOR_WFA = 0x00372A >}; ># 20 "../eap_server/eap.h" 2 ># 1 "../eap_server/eap_methods.h" 1 ># 20 "../eap_server/eap_methods.h" >const struct eap_method * eap_server_get_eap_method(int vendor, > EapType method); >struct eap_method * eap_server_method_alloc(int version, int vendor, > EapType method, const char *name); >void eap_server_method_free(struct eap_method *method); >int eap_server_method_register(struct eap_method *method); > >EapType eap_server_get_type(const char *name, int *vendor); >void eap_server_unregister_methods(void); >const char * eap_server_get_name(int vendor, EapType type); > > >int eap_server_identity_register(void); >int eap_server_md5_register(void); >int eap_server_tls_register(void); >int eap_server_mschapv2_register(void); >int eap_server_peap_register(void); >int eap_server_tlv_register(void); >int eap_server_gtc_register(void); >int eap_server_ttls_register(void); >int eap_server_sim_register(void); >int eap_server_aka_register(void); >int eap_server_aka_prime_register(void); >int eap_server_pax_register(void); >int eap_server_psk_register(void); >int eap_server_sake_register(void); >int eap_server_gpsk_register(void); >int eap_server_vendor_test_register(void); >int eap_server_fast_register(void); >int eap_server_wsc_register(void); >int eap_server_ikev2_register(void); >int eap_server_tnc_register(void); ># 21 "../eap_server/eap.h" 2 ># 1 "../utils/wpabuf.h" 1 ># 22 "../eap_server/eap.h" 2 > >struct eap_sm; ># 32 "../eap_server/eap.h" >struct eap_user { > struct { > int vendor; > u32 method; > } methods[8]; > u8 *password; > size_t password_len; > int password_hash; > > int phase2; > int force_version; > int ttls_auth; > >}; > >struct eap_eapol_interface { > > Boolean eapResp; > struct wpabuf *eapRespData; > Boolean portEnabled; > int retransWhile; > Boolean eapRestart; > int eapSRTT; > int eapRTTVAR; > > > Boolean eapReq; > Boolean eapNoReq; > Boolean eapSuccess; > Boolean eapFail; > Boolean eapTimeout; > struct wpabuf *eapReqData; > u8 *eapKeyData; > size_t eapKeyDataLen; > Boolean eapKeyAvailable; > > > Boolean aaaEapReq; > Boolean aaaEapNoReq; > Boolean aaaSuccess; > Boolean aaaFail; > struct wpabuf *aaaEapReqData; > u8 *aaaEapKeyData; > size_t aaaEapKeyDataLen; > Boolean aaaEapKeyAvailable; > int aaaMethodTimeout; > > > Boolean aaaEapResp; > struct wpabuf *aaaEapRespData; > > Boolean aaaTimeout; >}; > >struct eapol_callbacks { > int (*get_eap_user)(void *ctx, const u8 *identity, size_t identity_len, > int phase2, struct eap_user *user); > const char * (*get_eap_req_id_text)(void *ctx, size_t *len); >}; > >struct eap_config { > void *ssl_ctx; > void *msg_ctx; > void *eap_sim_db_priv; > Boolean backend_auth; > int eap_server; > u8 *pac_opaque_encr_key; > u8 *eap_fast_a_id; > size_t eap_fast_a_id_len; > char *eap_fast_a_id_info; > int eap_fast_prov; > int pac_key_lifetime; > int pac_key_refresh_time; > int eap_sim_aka_result_ind; > int tnc; > struct wps_context *wps; > const struct wpabuf *assoc_wps_ie; > const u8 *peer_addr; >}; > > >struct eap_sm * eap_server_sm_init(void *eapol_ctx, > struct eapol_callbacks *eapol_cb, > struct eap_config *eap_conf); >void eap_server_sm_deinit(struct eap_sm *sm); >int eap_server_sm_step(struct eap_sm *sm); >void eap_sm_notify_cached(struct eap_sm *sm); >void eap_sm_pending_cb(struct eap_sm *sm); >int eap_sm_method_pending(struct eap_sm *sm); >const u8 * eap_get_identity(struct eap_sm *sm, size_t *len); >struct eap_eapol_interface * eap_get_interface(struct eap_sm *sm); ># 26 "ieee802_1x.c" 2 ># 1 "../eap_common/eap_wsc_common.h" 1 ># 31 "../eap_common/eap_wsc_common.h" >struct wpabuf * eap_wsc_build_frag_ack(u8 id, u8 code); ># 27 "ieee802_1x.c" 2 ># 1 "../eapol_auth/eapol_auth_sm.h" 1 ># 23 "../eapol_auth/eapol_auth_sm.h" >struct eapol_auth_config { > int eap_reauth_period; > int wpa; > int individual_wep_key_len; > int eap_server; > void *ssl_ctx; > void *msg_ctx; > void *eap_sim_db_priv; > char *eap_req_id_text; > size_t eap_req_id_text_len; > u8 *pac_opaque_encr_key; > u8 *eap_fast_a_id; > size_t eap_fast_a_id_len; > char *eap_fast_a_id_info; > int eap_fast_prov; > int pac_key_lifetime; > int pac_key_refresh_time; > int eap_sim_aka_result_ind; > int tnc; > struct wps_context *wps; > > > void *ctx; >}; > >struct eap_user; > >typedef enum { > EAPOL_LOGGER_DEBUG, EAPOL_LOGGER_INFO, EAPOL_LOGGER_WARNING >} eapol_logger_level; > >enum eapol_event { > EAPOL_AUTH_SM_CHANGE, > EAPOL_AUTH_REAUTHENTICATE >}; > >struct eapol_auth_cb { > void (*eapol_send)(void *ctx, void *sta_ctx, u8 type, const u8 *data, > size_t datalen); > void (*aaa_send)(void *ctx, void *sta_ctx, const u8 *data, > size_t datalen); > void (*finished)(void *ctx, void *sta_ctx, int success, int preauth); > int (*get_eap_user)(void *ctx, const u8 *identity, size_t identity_len, > int phase2, struct eap_user *user); > int (*sta_entry_alive)(void *ctx, const u8 *addr); > void (*logger)(void *ctx, const u8 *addr, eapol_logger_level level, > const char *txt); > void (*set_port_authorized)(void *ctx, void *sta_ctx, int authorized); > void (*abort_auth)(void *ctx, void *sta_ctx); > void (*tx_key)(void *ctx, void *sta_ctx); > void (*eapol_event)(void *ctx, void *sta_ctx, enum eapol_event type); >}; > > >struct eapol_authenticator * eapol_auth_init(struct eapol_auth_config *conf, > struct eapol_auth_cb *cb); >void eapol_auth_deinit(struct eapol_authenticator *eapol); >struct eapol_state_machine * >eapol_auth_alloc(struct eapol_authenticator *eapol, const u8 *addr, > int flags, const struct wpabuf *assoc_wps_ie, void *sta_ctx); >void eapol_auth_free(struct eapol_state_machine *sm); >void eapol_auth_step(struct eapol_state_machine *sm); >void eapol_auth_dump_state(FILE *f, const char *prefix, > struct eapol_state_machine *sm); >int eapol_auth_eap_pending_cb(struct eapol_state_machine *sm, void *ctx); ># 28 "ieee802_1x.c" 2 ># 1 "../eapol_auth/eapol_auth_sm_i.h" 1 ># 23 "../eapol_auth/eapol_auth_sm_i.h" >typedef enum { ForceUnauthorized = 1, ForceAuthorized = 3, Auto = 2 } > PortTypes; >typedef enum { Unauthorized = 2, Authorized = 1 } PortState; >typedef enum { Both = 0, In = 1 } ControlledDirection; >typedef unsigned int Counter; > > > > > >struct eapol_authenticator { > struct eapol_auth_config conf; > struct eapol_auth_cb cb; > > u8 *default_wep_key; > u8 default_wep_key_idx; >}; > > > > > >struct eapol_state_machine { > > int aWhile; > int quietWhile; > int reAuthWhen; > > > Boolean authAbort; > Boolean authFail; > PortState authPortStatus; > Boolean authStart; > Boolean authTimeout; > Boolean authSuccess; > Boolean eapolEap; > Boolean initialize; > Boolean keyDone; > Boolean keyRun; > Boolean keyTxEnabled; > PortTypes portControl; > Boolean portValid; > Boolean reAuthenticate; > > > > > > enum { AUTH_PAE_INITIALIZE, AUTH_PAE_DISCONNECTED, AUTH_PAE_CONNECTING, > AUTH_PAE_AUTHENTICATING, AUTH_PAE_AUTHENTICATED, > AUTH_PAE_ABORTING, AUTH_PAE_HELD, AUTH_PAE_FORCE_AUTH, > AUTH_PAE_FORCE_UNAUTH, AUTH_PAE_RESTART } auth_pae_state; > > Boolean eapolLogoff; > Boolean eapolStart; > PortTypes portMode; > unsigned int reAuthCount; > > unsigned int quietPeriod; > > unsigned int reAuthMax; > > > Counter authEntersConnecting; > Counter authEapLogoffsWhileConnecting; > Counter authEntersAuthenticating; > Counter authAuthSuccessesWhileAuthenticating; > Counter authAuthTimeoutsWhileAuthenticating; > Counter authAuthFailWhileAuthenticating; > Counter authAuthEapStartsWhileAuthenticating; > Counter authAuthEapLogoffWhileAuthenticating; > Counter authAuthReauthsWhileAuthenticated; > Counter authAuthEapStartsWhileAuthenticated; > Counter authAuthEapLogoffWhileAuthenticated; > > > enum { BE_AUTH_REQUEST, BE_AUTH_RESPONSE, BE_AUTH_SUCCESS, > BE_AUTH_FAIL, BE_AUTH_TIMEOUT, BE_AUTH_IDLE, BE_AUTH_INITIALIZE, > BE_AUTH_IGNORE > } be_auth_state; > > unsigned int serverTimeout; > > > Counter backendResponses; > Counter backendAccessChallenges; > Counter backendOtherRequestsToSupplicant; > Counter backendAuthSuccesses; > Counter backendAuthFails; > > > enum { REAUTH_TIMER_INITIALIZE, REAUTH_TIMER_REAUTHENTICATE > } reauth_timer_state; > > unsigned int reAuthPeriod; > Boolean reAuthEnabled; > > > enum { AUTH_KEY_TX_NO_KEY_TRANSMIT, AUTH_KEY_TX_KEY_TRANSMIT > } auth_key_tx_state; > > > enum { KEY_RX_NO_KEY_RECEIVE, KEY_RX_KEY_RECEIVE } key_rx_state; > > Boolean rxKey; > > > enum { CTRL_DIR_FORCE_BOTH, CTRL_DIR_IN_OR_BOTH } ctrl_dir_state; > > ControlledDirection adminControlledDirections; > ControlledDirection operControlledDirections; > Boolean operEdge; > > > Counter dot1xAuthEapolFramesRx; > Counter dot1xAuthEapolFramesTx; > Counter dot1xAuthEapolStartFramesRx; > Counter dot1xAuthEapolLogoffFramesRx; > Counter dot1xAuthEapolRespIdFramesRx; > Counter dot1xAuthEapolRespFramesRx; > Counter dot1xAuthEapolReqIdFramesTx; > Counter dot1xAuthEapolReqFramesTx; > Counter dot1xAuthInvalidEapolFramesRx; > Counter dot1xAuthEapLengthErrorFramesRx; > Counter dot1xAuthLastEapolFrameVersion; > > > u8 addr[6]; > int flags; > > > struct eap_eapol_interface *eap_if; > > int radius_identifier; > > struct radius_msg *last_recv_radius; > u8 last_eap_id; > u8 *identity; > size_t identity_len; > u8 eap_type_authsrv; > > u8 eap_type_supp; > struct radius_class_data radius_class; > > > u8 *eapol_key_sign; > size_t eapol_key_sign_len; > u8 *eapol_key_crypt; > size_t eapol_key_crypt_len; > > struct eap_sm *eap; > > Boolean initializing; > Boolean changed; > > struct eapol_authenticator *eapol; > > void *sta; >}; ># 29 "ieee802_1x.c" 2 ># 1 "hostapd.h" 1 ># 20 "hostapd.h" >struct wpa_driver_ops; >struct wpa_ctrl_dst; >struct radius_server_data; >struct upnp_wps_device_sm; >struct hapd_interfaces; >struct hostapd_data; >struct sta_info; >struct hostap_sta_driver_data; >struct ieee80211_ht_capabilities; >struct full_dynamic_vlan; > >struct hostapd_probereq_cb { > int (*cb)(void *ctx, const u8 *sa, const u8 *ie, size_t ie_len); > void *ctx; >}; > > > >struct hostapd_rate_data { > int rate; > int flags; >}; > >struct hostapd_frame_info { > u32 channel; > u32 datarate; > u32 ssi_signal; >}; > > >struct hostapd_driver_ops { > int (*set_ap_wps_ie)(struct hostapd_data *hapd); > int (*send_mgmt_frame)(struct hostapd_data *hapd, const void *msg, > size_t len); > int (*send_eapol)(struct hostapd_data *hapd, const u8 *addr, > const u8 *data, size_t data_len, int encrypt); > int (*set_authorized)(struct hostapd_data *hapd, struct sta_info *sta, > int authorized); > int (*set_key)(const char *ifname, struct hostapd_data *hapd, > enum wpa_alg alg, const u8 *addr, int key_idx, > int set_tx, const u8 *seq, size_t seq_len, > const u8 *key, size_t key_len); > int (*read_sta_data)(struct hostapd_data *hapd, > struct hostap_sta_driver_data *data, > const u8 *addr); > int (*sta_clear_stats)(struct hostapd_data *hapd, const u8 *addr); > int (*set_sta_flags)(struct hostapd_data *hapd, struct sta_info *sta); > int (*set_drv_ieee8021x)(struct hostapd_data *hapd, const char *ifname, > int enabled); > int (*set_radius_acl_auth)(struct hostapd_data *hapd, > const u8 *mac, int accepted, > u32 session_timeout); > int (*set_radius_acl_expire)(struct hostapd_data *hapd, > const u8 *mac); > int (*set_bss_params)(struct hostapd_data *hapd, int use_protection); > int (*set_beacon)(struct hostapd_data *hapd, > const u8 *head, size_t head_len, > const u8 *tail, size_t tail_len, int dtim_period, > int beacon_int); > int (*vlan_if_add)(struct hostapd_data *hapd, const char *ifname); > int (*vlan_if_remove)(struct hostapd_data *hapd, const char *ifname); > int (*set_wds_sta)(struct hostapd_data *hapd, const u8 *addr, int aid, > int val); > int (*set_sta_vlan)(const char *ifname, struct hostapd_data *hapd, > const u8 *addr, int vlan_id); > int (*get_inact_sec)(struct hostapd_data *hapd, const u8 *addr); > int (*sta_deauth)(struct hostapd_data *hapd, const u8 *addr, > int reason); > int (*sta_disassoc)(struct hostapd_data *hapd, const u8 *addr, > int reason); > int (*sta_add)(struct hostapd_data *hapd, > const u8 *addr, u16 aid, u16 capability, > const u8 *supp_rates, size_t supp_rates_len, > u16 listen_interval, > const struct ieee80211_ht_capabilities *ht_capab); > int (*sta_remove)(struct hostapd_data *hapd, const u8 *addr); > int (*set_countermeasures)(struct hostapd_data *hapd, int enabled); >}; > > > > >struct hostapd_data { > struct hostapd_iface *iface; > struct hostapd_config *iconf; > struct hostapd_bss_config *conf; > int interface_added; > > u8 own_addr[6]; > > int num_sta; > struct sta_info *sta_list; > > > struct sta_info *sta_hash[256]; > > > > > > > > u32 sta_aid[((2008 + 31) / 32)]; > > const struct wpa_driver_ops *driver; > void *drv_priv; > struct hostapd_driver_ops drv; > > void (*new_assoc_sta_cb)(struct hostapd_data *hapd, > struct sta_info *sta, int reassoc); > > void *msg_ctx; > > struct radius_client_data *radius; > u32 acct_session_id_hi, acct_session_id_lo; > > struct iapp_data *iapp; > > struct hostapd_cached_radius_acl *acl_cache; > struct hostapd_acl_query_data *acl_queries; > > struct wpa_authenticator *wpa_auth; > struct eapol_authenticator *eapol_auth; > > struct rsn_preauth_interface *preauth_iface; > time_t michael_mic_failure; > int michael_mic_failures; > int tkip_countermeasures; > > int ctrl_sock; > struct wpa_ctrl_dst *ctrl_dst; > > void *ssl_ctx; > void *eap_sim_db_priv; > struct radius_server_data *radius_srv; > > int parameter_set_count; > > > > > > struct l2_packet_data *l2; > struct wps_context *wps; > > struct wpabuf *wps_beacon_ie; > struct wpabuf *wps_probe_resp_ie; > > > > > > > struct hostapd_probereq_cb *probereq_cb; > size_t num_probereq_cb; > > void (*public_action_cb)(void *ctx, const u8 *buf, size_t len, > int freq); > void *public_action_cb_ctx; > > void (*wps_reg_success_cb)(void *ctx, const u8 *mac_addr, > const u8 *uuid_e); > void *wps_reg_success_cb_ctx; >}; > > > > > >struct hostapd_iface { > struct hapd_interfaces *interfaces; > void *owner; > int (*reload_config)(struct hostapd_iface *iface); > struct hostapd_config * (*config_read_cb)(const char *config_fname); > char *config_fname; > struct hostapd_config *conf; > > size_t num_bss; > struct hostapd_data **bss; > > int num_ap; > struct ap_info *ap_list; > struct ap_info *ap_hash[256]; > struct ap_info *ap_iter_list; > > struct hostapd_hw_modes *hw_features; > int num_hw_features; > struct hostapd_hw_modes *current_mode; > > > int num_rates; > struct hostapd_rate_data *current_rates; > int freq; > > u16 hw_flags; > > > > int num_sta_non_erp; > > > int num_sta_no_short_slot_time; > > > int num_sta_no_short_preamble; > > int olbc; > > > int num_sta_ht_no_gf; > > > int num_sta_no_ht; > > > int num_sta_ht_20mhz; > > > int olbc_ht; > > u16 ht_op_mode; > void (*scan_cb)(struct hostapd_iface *iface); > > int (*ctrl_iface_init)(struct hostapd_data *hapd); > void (*ctrl_iface_deinit)(struct hostapd_data *hapd); > > int (*for_each_interface)(struct hapd_interfaces *interfaces, > int (*cb)(struct hostapd_iface *iface, > void *ctx), void *ctx); >}; > > >int hostapd_reload_config(struct hostapd_iface *iface); >struct hostapd_data * >hostapd_alloc_bss_data(struct hostapd_iface *hapd_iface, > struct hostapd_config *conf, > struct hostapd_bss_config *bss); >int hostapd_setup_interface(struct hostapd_iface *iface); >int hostapd_setup_interface_complete(struct hostapd_iface *iface, int err); >void hostapd_interface_deinit(struct hostapd_iface *iface); >void hostapd_interface_free(struct hostapd_iface *iface); >void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta, > int reassoc); > > >int hostapd_register_probereq_cb(struct hostapd_data *hapd, > int (*cb)(void *ctx, const u8 *sa, > const u8 *ie, size_t ie_len), > void *ctx); >void hostapd_prune_associations(struct hostapd_data *hapd, const u8 *addr); > > >int hostapd_notif_assoc(struct hostapd_data *hapd, const u8 *addr, > const u8 *ie, size_t ielen); >void hostapd_notif_disassoc(struct hostapd_data *hapd, const u8 *addr); ># 30 "ieee802_1x.c" 2 ># 1 "accounting.h" 1 ># 18 "accounting.h" >void accounting_sta_interim(struct hostapd_data *hapd, struct sta_info *sta); ># 39 "accounting.h" >void accounting_sta_start(struct hostapd_data *hapd, struct sta_info *sta); >void accounting_sta_stop(struct hostapd_data *hapd, struct sta_info *sta); >int accounting_init(struct hostapd_data *hapd); >void accounting_deinit(struct hostapd_data *hapd); ># 31 "ieee802_1x.c" 2 ># 1 "sta_info.h" 1 ># 41 "sta_info.h" >struct sta_info { > struct sta_info *next; > struct sta_info *hnext; > u8 addr[6]; > u16 aid; > u32 flags; > u16 capability; > u16 listen_interval; > u8 supported_rates[32]; > int supported_rates_len; > > unsigned int nonerp_set:1; > unsigned int no_short_slot_time_set:1; > unsigned int no_short_preamble_set:1; > unsigned int no_ht_gf_set:1; > unsigned int no_ht_set:1; > unsigned int ht_20mhz_set:1; > > u16 auth_alg; > u8 previous_ap[6]; > > enum { > STA_NULLFUNC = 0, STA_DISASSOC, STA_DEAUTH, STA_REMOVE > } timeout_next; > > > struct eapol_state_machine *eapol_sm; > > > struct ieee80211_mgmt *last_assoc_req; > > u32 acct_session_id_hi; > u32 acct_session_id_lo; > time_t acct_session_start; > int acct_session_started; > int acct_terminate_cause; > int acct_interim_interval; > > unsigned long last_rx_bytes; > unsigned long last_tx_bytes; > u32 acct_input_gigawords; > u32 acct_output_gigawords; > > u8 *challenge; > > struct wpa_state_machine *wpa_sm; > struct rsn_preauth_interface *preauth_iface; > > struct hostapd_ssid *ssid; > struct hostapd_ssid *ssid_probe; > > int vlan_id; > > struct ieee80211_ht_capabilities *ht_capabilities; ># 106 "sta_info.h" > struct wpabuf *wps_ie; >}; ># 126 "sta_info.h" >struct hostapd_data; > >int ap_for_each_sta(struct hostapd_data *hapd, > int (*cb)(struct hostapd_data *hapd, struct sta_info *sta, > void *ctx), > void *ctx); >struct sta_info * ap_get_sta(struct hostapd_data *hapd, const u8 *sta); >void ap_sta_hash_add(struct hostapd_data *hapd, struct sta_info *sta); >void ap_free_sta(struct hostapd_data *hapd, struct sta_info *sta); >void ap_free_sta(struct hostapd_data *hapd, struct sta_info *sta); >void hostapd_free_stas(struct hostapd_data *hapd); >void ap_handle_timer(void *eloop_ctx, void *timeout_ctx); >void ap_sta_session_timeout(struct hostapd_data *hapd, struct sta_info *sta, > u32 session_timeout); >void ap_sta_no_session_timeout(struct hostapd_data *hapd, > struct sta_info *sta); >struct sta_info * ap_sta_add(struct hostapd_data *hapd, const u8 *addr); >void ap_sta_disassociate(struct hostapd_data *hapd, struct sta_info *sta, > u16 reason); >void ap_sta_deauthenticate(struct hostapd_data *hapd, struct sta_info *sta, > u16 reason); >int ap_sta_bind_vlan(struct hostapd_data *hapd, struct sta_info *sta, > int old_vlanid); >void ap_sta_start_sa_query(struct hostapd_data *hapd, struct sta_info *sta); >void ap_sta_stop_sa_query(struct hostapd_data *hapd, struct sta_info *sta); >int ap_check_sa_query_timeout(struct hostapd_data *hapd, struct sta_info *sta); >void ap_sta_disconnect(struct hostapd_data *hapd, struct sta_info *sta, > const u8 *addr, u16 reason); ># 32 "ieee802_1x.c" 2 ># 1 "wpa_auth.h" 1 ># 19 "wpa_auth.h" ># 1 "../common/eapol_common.h" 1 ># 24 "../common/eapol_common.h" >struct ieee802_1x_hdr { > u8 version; > u8 type; > be16 length; > >} __attribute__ ((packed)); > > > > > > > >enum { IEEE802_1X_TYPE_EAP_PACKET = 0, > IEEE802_1X_TYPE_EAPOL_START = 1, > IEEE802_1X_TYPE_EAPOL_LOGOFF = 2, > IEEE802_1X_TYPE_EAPOL_KEY = 3, > IEEE802_1X_TYPE_EAPOL_ENCAPSULATED_ASF_ALERT = 4 >}; > >enum { EAPOL_KEY_TYPE_RC4 = 1, EAPOL_KEY_TYPE_RSN = 2, > EAPOL_KEY_TYPE_WPA = 254 }; ># 20 "wpa_auth.h" 2 ># 1 "../common/wpa_common.h" 1 ># 148 "../common/wpa_common.h" >struct wpa_eapol_key { > u8 type; > > u8 key_info[2]; > u8 key_length[2]; > u8 replay_counter[8]; > u8 key_nonce[32]; > u8 key_iv[16]; > u8 key_rsc[8]; > u8 key_id[8]; > u8 key_mic[16]; > u8 key_data_length[2]; > >} __attribute__ ((packed)); > > > > > >struct wpa_ptk { > u8 kck[16]; > u8 kek[16]; > u8 tk1[16]; > union { > u8 tk2[16]; > struct { > u8 tx_mic_key[8]; > u8 rx_mic_key[8]; > } auth; > } u; >} __attribute__ ((packed)); ># 195 "../common/wpa_common.h" >struct wpa_ie_hdr { > u8 elem_id; > u8 len; > u8 oui[4]; > u8 version[2]; >} __attribute__ ((packed)); ># 227 "../common/wpa_common.h" >struct rsn_ie_hdr { > u8 elem_id; > u8 len; > u8 version[2]; >} __attribute__ ((packed)); ># 250 "../common/wpa_common.h" >struct rsn_error_kde { > be16 mui; > be16 error_type; >} __attribute__ ((packed)); ># 298 "../common/wpa_common.h" >int wpa_eapol_key_mic(const u8 *key, int ver, const u8 *buf, size_t len, > u8 *mic); >void wpa_pmk_to_ptk(const u8 *pmk, size_t pmk_len, const char *label, > const u8 *addr1, const u8 *addr2, > const u8 *nonce1, const u8 *nonce2, > u8 *ptk, size_t ptk_len, int use_sha256); ># 326 "../common/wpa_common.h" >struct wpa_ie_data { > int proto; > int pairwise_cipher; > int group_cipher; > int key_mgmt; > int capabilities; > size_t num_pmkid; > const u8 *pmkid; > int mgmt_group_cipher; >}; > > >int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len, > struct wpa_ie_data *data); > >void rsn_pmkid(const u8 *pmk, size_t pmk_len, const u8 *aa, const u8 *spa, > u8 *pmkid, int use_sha256); > >const char * wpa_cipher_txt(int cipher); >const char * wpa_key_mgmt_txt(int key_mgmt, int proto); >int wpa_compare_rsn_ie(int ft_initial_assoc, > const u8 *ie1, size_t ie1len, > const u8 *ie2, size_t ie2len); >int wpa_insert_pmkid(u8 *ies, size_t ies_len, const u8 *pmkid); ># 21 "wpa_auth.h" 2 > > > > > > > >struct ft_rrb_frame { > u8 frame_type; > u8 packet_type; > le16 action_length; > u8 ap_address[6]; > > > > >} __attribute__ ((packed)); ># 52 "wpa_auth.h" >struct ft_r0kh_r1kh_pull_frame { > u8 frame_type; > u8 packet_type; > le16 data_length; > u8 ap_address[6]; > > u8 nonce[16]; > u8 pmk_r0_name[16]; > u8 r1kh_id[6]; > u8 s1kh_id[6]; > u8 pad[4]; > u8 key_wrap_extra[8]; >} __attribute__ ((packed)); > >struct ft_r0kh_r1kh_resp_frame { > u8 frame_type; > u8 packet_type; > le16 data_length; > u8 ap_address[6]; > > u8 nonce[16]; > u8 r1kh_id[6]; > u8 s1kh_id[6]; > u8 pmk_r1[32]; > u8 pmk_r1_name[16]; > le16 pairwise; > u8 pad[2]; > u8 key_wrap_extra[8]; >} __attribute__ ((packed)); > >struct ft_r0kh_r1kh_push_frame { > u8 frame_type; > u8 packet_type; > le16 data_length; > u8 ap_address[6]; > > > u8 timestamp[4]; > > u8 r1kh_id[6]; > u8 s1kh_id[6]; > u8 pmk_r0_name[16]; > u8 pmk_r1[32]; > u8 pmk_r1_name[16]; > le16 pairwise; > u8 pad[6]; > u8 key_wrap_extra[8]; >} __attribute__ ((packed)); ># 108 "wpa_auth.h" >struct wpa_authenticator; >struct wpa_state_machine; >struct rsn_pmksa_cache_entry; >struct eapol_state_machine; > > >struct ft_remote_r0kh { > struct ft_remote_r0kh *next; > u8 addr[6]; > u8 id[48]; > size_t id_len; > u8 key[16]; >}; > > >struct ft_remote_r1kh { > struct ft_remote_r1kh *next; > u8 addr[6]; > u8 id[6]; > u8 key[16]; >}; > > >struct wpa_auth_config { > int wpa; > int wpa_key_mgmt; > int wpa_pairwise; > int wpa_group; > int wpa_group_rekey; > int wpa_strict_rekey; > int wpa_gmk_rekey; > int wpa_ptk_rekey; > int rsn_pairwise; > int rsn_preauth; > int eapol_version; > int peerkey; > int wmm_enabled; > int wmm_uapsd; > int okc; ># 164 "wpa_auth.h" >}; > >typedef enum { > LOGGER_DEBUG, LOGGER_INFO, LOGGER_WARNING >} logger_level; > >typedef enum { > WPA_EAPOL_portEnabled, WPA_EAPOL_portValid, WPA_EAPOL_authorized, > WPA_EAPOL_portControl_Auto, WPA_EAPOL_keyRun, WPA_EAPOL_keyAvailable, > WPA_EAPOL_keyDone, WPA_EAPOL_inc_EapolFramesTx >} wpa_eapol_variable; > >struct wpa_auth_callbacks { > void *ctx; > void (*logger)(void *ctx, const u8 *addr, logger_level level, > const char *txt); > void (*disconnect)(void *ctx, const u8 *addr, u16 reason); > void (*mic_failure_report)(void *ctx, const u8 *addr); > void (*set_eapol)(void *ctx, const u8 *addr, wpa_eapol_variable var, > int value); > int (*get_eapol)(void *ctx, const u8 *addr, wpa_eapol_variable var); > const u8 * (*get_psk)(void *ctx, const u8 *addr, const u8 *prev_psk); > int (*get_msk)(void *ctx, const u8 *addr, u8 *msk, size_t *len); > int (*set_key)(void *ctx, int vlan_id, enum wpa_alg alg, > const u8 *addr, int idx, u8 *key, size_t key_len); > int (*get_seqnum)(void *ctx, const u8 *addr, int idx, u8 *seq); > int (*send_eapol)(void *ctx, const u8 *addr, const u8 *data, > size_t data_len, int encrypt); > int (*for_each_sta)(void *ctx, int (*cb)(struct wpa_state_machine *sm, > void *ctx), void *cb_ctx); > int (*for_each_auth)(void *ctx, int (*cb)(struct wpa_authenticator *a, > void *ctx), void *cb_ctx); > int (*send_ether)(void *ctx, const u8 *dst, u16 proto, const u8 *data, > size_t data_len); > > > > > >}; > >struct wpa_authenticator * wpa_init(const u8 *addr, > struct wpa_auth_config *conf, > struct wpa_auth_callbacks *cb); >void wpa_deinit(struct wpa_authenticator *wpa_auth); >int wpa_reconfig(struct wpa_authenticator *wpa_auth, > struct wpa_auth_config *conf); > >enum { > WPA_IE_OK, WPA_INVALID_IE, WPA_INVALID_GROUP, WPA_INVALID_PAIRWISE, > WPA_INVALID_AKMP, WPA_NOT_ENABLED, WPA_ALLOC_FAIL, > WPA_MGMT_FRAME_PROTECTION_VIOLATION, WPA_INVALID_MGMT_GROUP_CIPHER, > WPA_INVALID_MDIE, WPA_INVALID_PROTO >}; > >int wpa_validate_wpa_ie(struct wpa_authenticator *wpa_auth, > struct wpa_state_machine *sm, > const u8 *wpa_ie, size_t wpa_ie_len, > const u8 *mdie, size_t mdie_len); >int wpa_auth_uses_mfp(struct wpa_state_machine *sm); >struct wpa_state_machine * >wpa_auth_sta_init(struct wpa_authenticator *wpa_auth, const u8 *addr); >int wpa_auth_sta_associated(struct wpa_authenticator *wpa_auth, > struct wpa_state_machine *sm); >void wpa_auth_sta_no_wpa(struct wpa_state_machine *sm); >void wpa_auth_sta_deinit(struct wpa_state_machine *sm); >void wpa_receive(struct wpa_authenticator *wpa_auth, > struct wpa_state_machine *sm, > u8 *data, size_t data_len); >typedef enum { > WPA_AUTH, WPA_ASSOC, WPA_DISASSOC, WPA_DEAUTH, WPA_REAUTH, > WPA_REAUTH_EAPOL, WPA_ASSOC_FT >} wpa_event; >void wpa_remove_ptk(struct wpa_state_machine *sm); >int wpa_auth_sm_event(struct wpa_state_machine *sm, wpa_event event); >void wpa_auth_sm_notify(struct wpa_state_machine *sm); >void wpa_gtk_rekey(struct wpa_authenticator *wpa_auth); >int wpa_get_mib(struct wpa_authenticator *wpa_auth, char *buf, size_t buflen); >int wpa_get_mib_sta(struct wpa_state_machine *sm, char *buf, size_t buflen); >void wpa_auth_countermeasures_start(struct wpa_authenticator *wpa_auth); >int wpa_auth_pairwise_set(struct wpa_state_machine *sm); >int wpa_auth_get_pairwise(struct wpa_state_machine *sm); >int wpa_auth_sta_key_mgmt(struct wpa_state_machine *sm); >int wpa_auth_sta_wpa_version(struct wpa_state_machine *sm); >int wpa_auth_sta_clear_pmksa(struct wpa_state_machine *sm, > struct rsn_pmksa_cache_entry *entry); >struct rsn_pmksa_cache_entry * >wpa_auth_sta_get_pmksa(struct wpa_state_machine *sm); >void wpa_auth_sta_local_mic_failure_report(struct wpa_state_machine *sm); >const u8 * wpa_auth_get_wpa_ie(struct wpa_authenticator *wpa_auth, > size_t *len); >int wpa_auth_pmksa_add(struct wpa_state_machine *sm, const u8 *pmk, > int session_timeout, struct eapol_state_machine *eapol); >int wpa_auth_pmksa_add_preauth(struct wpa_authenticator *wpa_auth, > const u8 *pmk, size_t len, const u8 *sta_addr, > int session_timeout, > struct eapol_state_machine *eapol); >int wpa_auth_sta_set_vlan(struct wpa_state_machine *sm, int vlan_id); ># 33 "ieee802_1x.c" 2 ># 1 "preauth_auth.h" 1 ># 30 "preauth_auth.h" >static inline int rsn_preauth_iface_init(struct hostapd_data *hapd) >{ > return 0; >} > >static inline void rsn_preauth_iface_deinit(struct hostapd_data *hapd) >{ >} > >static inline void rsn_preauth_finished(struct hostapd_data *hapd, > struct sta_info *sta, > int success) >{ >} > >static inline void rsn_preauth_send(struct hostapd_data *hapd, > struct sta_info *sta, > u8 *buf, size_t len) >{ >} > >static inline void rsn_preauth_free_station(struct hostapd_data *hapd, > struct sta_info *sta) >{ >} ># 34 "ieee802_1x.c" 2 ># 1 "pmksa_cache_auth.h" 1 ># 23 "pmksa_cache_auth.h" >struct rsn_pmksa_cache_entry { > struct rsn_pmksa_cache_entry *next, *hnext; > u8 pmkid[16]; > u8 pmk[32]; > size_t pmk_len; > os_time_t expiration; > int akmp; > u8 spa[6]; > > u8 *identity; > size_t identity_len; > struct radius_class_data radius_class; > u8 eap_type_authsrv; > int vlan_id; > int opportunistic; >}; > >struct rsn_pmksa_cache; > >struct rsn_pmksa_cache * >pmksa_cache_auth_init(void (*free_cb)(struct rsn_pmksa_cache_entry *entry, > void *ctx), void *ctx); >void pmksa_cache_auth_deinit(struct rsn_pmksa_cache *pmksa); >struct rsn_pmksa_cache_entry * >pmksa_cache_auth_get(struct rsn_pmksa_cache *pmksa, > const u8 *spa, const u8 *pmkid); >struct rsn_pmksa_cache_entry * pmksa_cache_get_okc( > struct rsn_pmksa_cache *pmksa, const u8 *spa, const u8 *aa, > const u8 *pmkid); >struct rsn_pmksa_cache_entry * >pmksa_cache_auth_add(struct rsn_pmksa_cache *pmksa, > const u8 *pmk, size_t pmk_len, > const u8 *aa, const u8 *spa, int session_timeout, > struct eapol_state_machine *eapol, int akmp); >struct rsn_pmksa_cache_entry * >pmksa_cache_add_okc(struct rsn_pmksa_cache *pmksa, > const struct rsn_pmksa_cache_entry *old_entry, > const u8 *aa, const u8 *pmkid); >void pmksa_cache_to_eapol_data(struct rsn_pmksa_cache_entry *entry, > struct eapol_state_machine *eapol); ># 35 "ieee802_1x.c" 2 ># 1 "ap_config.h" 1 ># 25 "ap_config.h" >typedef u8 macaddr[6]; > >struct mac_acl_entry { > macaddr addr; > int vlan_id; >}; > >struct hostapd_radius_servers; >struct ft_remote_r0kh; >struct ft_remote_r1kh; > > > > >struct hostapd_wep_keys { > u8 idx; > u8 *key[4]; > size_t len[4]; > int keys_set; > size_t default_len; >}; > >typedef enum hostap_security_policy { > SECURITY_PLAINTEXT = 0, > SECURITY_STATIC_WEP = 1, > SECURITY_IEEE_802_1X = 2, > SECURITY_WPA_PSK = 3, > SECURITY_WPA = 4 >} secpolicy; > >struct hostapd_ssid { > char ssid[32 + 1]; > size_t ssid_len; > int ssid_set; > > char vlan[16 + 1]; > secpolicy security_policy; > > struct hostapd_wpa_psk *wpa_psk; > char *wpa_passphrase; > char *wpa_psk_file; > > struct hostapd_wep_keys wep; > > > > > int dynamic_vlan; > > > > struct hostapd_wep_keys **dyn_vlan_keys; > size_t max_dyn_vlan_keys; >}; > > > > >struct hostapd_vlan { > struct hostapd_vlan *next; > int vlan_id; > char ifname[16 + 1]; > int dynamic_vlan; ># 96 "ap_config.h" >}; > > >struct hostapd_wpa_psk { > struct hostapd_wpa_psk *next; > int group; > u8 psk[32]; > u8 addr[6]; >}; > > >struct hostapd_eap_user { > struct hostapd_eap_user *next; > u8 *identity; > size_t identity_len; > struct { > int vendor; > u32 method; > } methods[8]; > u8 *password; > size_t password_len; > int phase2; > int force_version; > unsigned int wildcard_prefix:1; > unsigned int password_hash:1; > > int ttls_auth; >}; > > > > >struct hostapd_tx_queue_params { > int aifs; > int cwmin; > int cwmax; > int burst; > int configured; >}; > >struct hostapd_wmm_ac_params { > int cwmin; > int cwmax; > int aifs; > int txop_limit; > int admission_control_mandatory; >}; > > > > > >struct hostapd_bss_config { > char iface[16 + 1]; > char bridge[16 + 1]; > > enum hostapd_logger_level logger_syslog_level, logger_stdout_level; > > unsigned int logger_syslog; > unsigned int logger_stdout; > > char *dump_log_name; > > int max_num_sta; > > int dtim_period; > > int ieee802_1x; > int eapol_version; > int eap_server; > > struct hostapd_eap_user *eap_user; > char *eap_sim_db; > struct hostapd_ip_addr own_ip_addr; > char *nas_identifier; > struct hostapd_radius_servers *radius; > int acct_interim_interval; > > struct hostapd_ssid ssid; > > char *eap_req_id_text; > > size_t eap_req_id_text_len; > int eapol_key_index_workaround; > > size_t default_wep_key_len; > int individual_wep_key_len; > int wep_rekeying_period; > int broadcast_key_idx_min, broadcast_key_idx_max; > int eap_reauth_period; > > int ieee802_11f; > char iapp_iface[16 + 1]; > > > enum { > ACCEPT_UNLESS_DENIED = 0, > DENY_UNLESS_ACCEPTED = 1, > USE_EXTERNAL_RADIUS_AUTH = 2 > } macaddr_acl; > struct mac_acl_entry *accept_mac; > int num_accept_mac; > struct mac_acl_entry *deny_mac; > int num_deny_mac; > int wds_sta; > > int auth_algs; > > > int wpa; > int wpa_key_mgmt; > > > > > > > > int wpa_pairwise; > int wpa_group; > int wpa_group_rekey; > int wpa_strict_rekey; > int wpa_gmk_rekey; > int wpa_ptk_rekey; > int rsn_pairwise; > int rsn_preauth; > char *rsn_preauth_interfaces; > int peerkey; ># 236 "ap_config.h" > char *ctrl_interface; > > gid_t ctrl_interface_gid; > > int ctrl_interface_gid_set; > > char *ca_cert; > char *server_cert; > char *private_key; > char *private_key_passwd; > int check_crl; > char *dh_file; > u8 *pac_opaque_encr_key; > u8 *eap_fast_a_id; > size_t eap_fast_a_id_len; > char *eap_fast_a_id_info; > int eap_fast_prov; > int pac_key_lifetime; > int pac_key_refresh_time; > int eap_sim_aka_result_ind; > int tnc; > > char *radius_server_clients; > int radius_server_auth_port; > int radius_server_ipv6; > > char *test_socket; > > int use_pae_group_addr; > > > > > int ap_max_inactivity; > int ignore_broadcast_ssid; > > int wmm_enabled; > int wmm_uapsd; > > struct hostapd_vlan *vlan, *vlan_tail; > > macaddr bssid; > > > > > > > u16 max_listen_interval; > > int okc; > > int wps_state; ># 315 "ap_config.h" >}; > > > > > >struct hostapd_config { > struct hostapd_bss_config *bss, *last_bss; > size_t num_bss; > > u16 beacon_int; > int rts_threshold; > int fragm_threshold; > u8 send_probe_response; > u8 channel; > enum hostapd_hw_mode hw_mode; > enum { > LONG_PREAMBLE = 0, > SHORT_PREAMBLE = 1 > } preamble; > enum { > CTS_PROTECTION_AUTOMATIC = 0, > CTS_PROTECTION_FORCE_ENABLED = 1, > CTS_PROTECTION_FORCE_DISABLED = 2, > CTS_PROTECTION_AUTOMATIC_NO_OLBC = 3, > } cts_protection_type; > > int *supported_rates; > int *basic_rates; > > const struct wpa_driver_ops *driver; > > int ap_table_max_size; > int ap_table_expiration_time; > > char country[3]; > > > > > > > int ieee80211d; > > struct hostapd_tx_queue_params tx_queue[8]; ># 368 "ap_config.h" > struct hostapd_wmm_ac_params wmm_ac_params[4]; > > int ht_op_mode_fixed; > u16 ht_capab; > int ieee80211n; > int secondary_channel; >}; > > >int hostapd_mac_comp(const void *a, const void *b); >int hostapd_mac_comp_empty(const void *a); >struct hostapd_config * hostapd_config_defaults(void); >void hostapd_config_defaults_bss(struct hostapd_bss_config *bss); >void hostapd_config_free(struct hostapd_config *conf); >int hostapd_maclist_found(struct mac_acl_entry *list, int num_entries, > const u8 *addr, int *vlan_id); >int hostapd_rate_found(int *list, int rate); >int hostapd_wep_key_cmp(struct hostapd_wep_keys *a, > struct hostapd_wep_keys *b); >const u8 * hostapd_get_psk(const struct hostapd_bss_config *conf, > const u8 *addr, const u8 *prev_psk); >int hostapd_setup_wpa_psk(struct hostapd_bss_config *conf); >const char * hostapd_get_vlan_id_ifname(struct hostapd_vlan *vlan, > int vlan_id); >const struct hostapd_eap_user * >hostapd_get_eap_user(const struct hostapd_bss_config *conf, const u8 *identity, > size_t identity_len, int phase2); ># 36 "ieee802_1x.c" 2 ># 1 "ieee802_1x.h" 1 ># 18 "ieee802_1x.h" >struct hostapd_data; >struct sta_info; >struct eapol_state_machine; >struct hostapd_config; >struct hostapd_bss_config; > > > > > > > >struct ieee802_1x_eapol_key { > u8 type; > u16 key_length; > u8 replay_counter[8]; > > > u8 key_iv[16]; > u8 key_index; > > > > u8 key_signature[16]; ># 50 "ieee802_1x.h" >} __attribute__ ((packed)); > > > > > > >void ieee802_1x_receive(struct hostapd_data *hapd, const u8 *sa, const u8 *buf, > size_t len); >void ieee802_1x_new_station(struct hostapd_data *hapd, struct sta_info *sta); >void ieee802_1x_free_station(struct sta_info *sta); > >void ieee802_1x_tx_key(struct hostapd_data *hapd, struct sta_info *sta); >void ieee802_1x_abort_auth(struct hostapd_data *hapd, struct sta_info *sta); >void ieee802_1x_set_sta_authorized(struct hostapd_data *hapd, > struct sta_info *sta, int authorized); >void ieee802_1x_dump_state(FILE *f, const char *prefix, struct sta_info *sta); >int ieee802_1x_init(struct hostapd_data *hapd); >void ieee802_1x_deinit(struct hostapd_data *hapd); >int ieee802_1x_tx_status(struct hostapd_data *hapd, struct sta_info *sta, > const u8 *buf, size_t len, int ack); >u8 * ieee802_1x_get_identity(struct eapol_state_machine *sm, size_t *len); >u8 * ieee802_1x_get_radius_class(struct eapol_state_machine *sm, size_t *len, > int idx); >const u8 * ieee802_1x_get_key(struct eapol_state_machine *sm, size_t *len); >void ieee802_1x_notify_port_enabled(struct eapol_state_machine *sm, > int enabled); >void ieee802_1x_notify_port_valid(struct eapol_state_machine *sm, > int valid); >void ieee802_1x_notify_pre_auth(struct eapol_state_machine *sm, int pre_auth); >int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen); >int ieee802_1x_get_mib_sta(struct hostapd_data *hapd, struct sta_info *sta, > char *buf, size_t buflen); >void hostapd_get_ntp_timestamp(u8 *buf); >char *eap_type_text(u8 type); > >const char *radius_mode_txt(struct hostapd_data *hapd); >int radius_sta_rate(struct hostapd_data *hapd, struct sta_info *sta); ># 37 "ieee802_1x.c" 2 > > >static void ieee802_1x_finished(struct hostapd_data *hapd, > struct sta_info *sta, int success); > > >static void ieee802_1x_send(struct hostapd_data *hapd, struct sta_info *sta, > u8 type, const u8 *data, size_t datalen) >{ > u8 *buf; > struct ieee802_1x_hdr *xhdr; > size_t len; > int encrypt = 0; > > len = sizeof(*xhdr) + datalen; > buf = os_zalloc(len); > if (buf == ((void *)0)) { > wpa_printf(MSG_ERROR, "malloc() failed for " > "ieee802_1x_send(len=%lu)", > (unsigned long) len); > return; > } > > xhdr = (struct ieee802_1x_hdr *) buf; > xhdr->version = hapd->conf->eapol_version; > xhdr->type = type; > xhdr->length = (( be16) (__extension__ ({ register unsigned short int __v, __x = (unsigned short int) ((datalen)); if (__builtin_constant_p (__x)) __v = ((unsigned short int) ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8))); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; }))); > > if (datalen > 0 && data != ((void *)0)) > memcpy((xhdr + 1), (data), (datalen)); > > if (wpa_auth_pairwise_set(sta->wpa_sm)) > encrypt = 1; > if (sta->flags & (1 << (8))) { > rsn_preauth_send(hapd, sta, buf, len); > } else { > hapd->drv.send_eapol(hapd, sta->addr, buf, len, encrypt); > } > > free((buf)); >} > > >void ieee802_1x_set_sta_authorized(struct hostapd_data *hapd, > struct sta_info *sta, int authorized) >{ > int res; > > if (sta->flags & (1 << (8))) > return; > > if (authorized) { > if (!(sta->flags & (1 << (5)))) > wpa_msg(hapd->msg_ctx, MSG_INFO, > "AP-STA-CONNECTED " "%02x:%02x:%02x:%02x:%02x:%02x", (sta->addr)[0], (sta->addr)[1], (sta->addr)[2], (sta->addr)[3], (sta->addr)[4], (sta->addr)[5]); > sta->flags |= (1 << (5)); > res = hapd->drv.set_authorized(hapd, sta, 1); > hostapd_logger(hapd, sta->addr, 0x00000002, > HOSTAPD_LEVEL_DEBUG, "authorizing port"); > } else { > if ((sta->flags & ((1 << (5)) | (1 << (1)))) == > ((1 << (5)) | (1 << (1)))) > wpa_msg(hapd->msg_ctx, MSG_INFO, > "AP-STA-DISCONNECTED " "%02x:%02x:%02x:%02x:%02x:%02x", > (sta->addr)[0], (sta->addr)[1], (sta->addr)[2], (sta->addr)[3], (sta->addr)[4], (sta->addr)[5]); > sta->flags &= ~(1 << (5)); > res = hapd->drv.set_authorized(hapd, sta, 0); > hostapd_logger(hapd, sta->addr, 0x00000002, > HOSTAPD_LEVEL_DEBUG, "unauthorizing port"); > } > > if (res && (*__errno_location ()) != 2) { > printf("Could not set station " "%02x:%02x:%02x:%02x:%02x:%02x" " flags for kernel " > "driver (errno=%d).\n", (sta->addr)[0], (sta->addr)[1], (sta->addr)[2], (sta->addr)[3], (sta->addr)[4], (sta->addr)[5], (*__errno_location ())); > } > > if (authorized) > accounting_sta_start(hapd, sta); >} > > >static void ieee802_1x_tx_key_one(struct hostapd_data *hapd, > struct sta_info *sta, > int idx, int broadcast, > u8 *key_data, size_t key_len) >{ > u8 *buf, *ekey; > struct ieee802_1x_hdr *hdr; > struct ieee802_1x_eapol_key *key; > size_t len, ekey_len; > struct eapol_state_machine *sm = sta->eapol_sm; > > if (sm == ((void *)0)) > return; > > len = sizeof(*key) + key_len; > buf = os_zalloc(sizeof(*hdr) + len); > if (buf == ((void *)0)) > return; > > hdr = (struct ieee802_1x_hdr *) buf; > key = (struct ieee802_1x_eapol_key *) (hdr + 1); > key->type = EAPOL_KEY_TYPE_RC4; > key->key_length = htons(key_len); > wpa_get_ntp_timestamp(key->replay_counter); > > if (os_get_random(key->key_iv, sizeof(key->key_iv))) { > wpa_printf(MSG_ERROR, "Could not get random numbers"); > free((buf)); > return; > } > > key->key_index = idx | (broadcast ? 0 : (1 << (7))); > if (hapd->conf->eapol_key_index_workaround) { > > > > > key->key_index |= (1 << (7)); > } > > > > if (sm->eap_if->eapKeyData == ((void *)0) || sm->eap_if->eapKeyDataLen < 64) { > wpa_printf(MSG_ERROR, "No eapKeyData available for encrypting " > "and signing EAPOL-Key"); > free((buf)); > return; > } > memcpy(((u8 *) (key + 1)), (key_data), (key_len)); > ekey_len = sizeof(key->key_iv) + 32; > ekey = malloc((ekey_len)); > if (ekey == ((void *)0)) { > wpa_printf(MSG_ERROR, "Could not encrypt key"); > free((buf)); > return; > } > memcpy((ekey), (key->key_iv), (sizeof(key->key_iv))); > memcpy((ekey + sizeof(key->key_iv)), (sm->eap_if->eapKeyData), (32)); > rc4_skip(ekey, ekey_len, 0, (u8 *) (key + 1), key_len); > free((ekey)); > > > > hdr->version = hapd->conf->eapol_version; > hdr->type = IEEE802_1X_TYPE_EAPOL_KEY; > hdr->length = (( be16) (__extension__ ({ register unsigned short int __v, __x = (unsigned short int) ((len)); if (__builtin_constant_p (__x)) __v = ((unsigned short int) ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8))); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; }))); > hmac_md5(sm->eap_if->eapKeyData + 32, 32, buf, sizeof(*hdr) + len, > key->key_signature); > > wpa_printf(MSG_DEBUG, "IEEE 802.1X: Sending EAPOL-Key to " "%02x:%02x:%02x:%02x:%02x:%02x" > " (%s index=%d)", (sm->addr)[0], (sm->addr)[1], (sm->addr)[2], (sm->addr)[3], (sm->addr)[4], (sm->addr)[5], > broadcast ? "broadcast" : "unicast", idx); > ieee802_1x_send(hapd, sta, IEEE802_1X_TYPE_EAPOL_KEY, (u8 *) key, len); > if (sta->eapol_sm) > sta->eapol_sm->dot1xAuthEapolFramesTx++; > free((buf)); >} > > > >static struct hostapd_wep_keys * >ieee802_1x_group_alloc(struct hostapd_data *hapd, const char *ifname) >{ > struct hostapd_wep_keys *key; > > key = os_zalloc(sizeof(*key)); > if (key == ((void *)0)) > return ((void *)0); > > key->default_len = hapd->conf->default_wep_key_len; > > if (key->idx >= hapd->conf->broadcast_key_idx_max || > key->idx < hapd->conf->broadcast_key_idx_min) > key->idx = hapd->conf->broadcast_key_idx_min; > else > key->idx++; > > if (!key->key[key->idx]) > key->key[key->idx] = malloc((key->default_len)); > if (key->key[key->idx] == ((void *)0) || > os_get_random(key->key[key->idx], key->default_len)) { > printf("Could not generate random WEP key (dynamic VLAN).\n"); > free((key->key[key->idx])); > key->key[key->idx] = ((void *)0); > free((key)); > return ((void *)0); > } > key->len[key->idx] = key->default_len; > > wpa_printf(MSG_DEBUG, "%s: Default WEP idx %d for dynamic VLAN\n", > ifname, key->idx); > wpa_hexdump_key(MSG_DEBUG, "Default WEP key (dynamic VLAN)", > key->key[key->idx], key->len[key->idx]); > > if (hapd->drv.set_key(ifname, hapd, WPA_ALG_WEP, ((void *)0), key->idx, 1, > ((void *)0), 0, key->key[key->idx], key->len[key->idx])) > printf("Could not set dynamic VLAN WEP encryption key.\n"); > > hapd->drv.set_drv_ieee8021x(hapd, ifname, 1); > > return key; >} > > >static struct hostapd_wep_keys * >ieee802_1x_get_group(struct hostapd_data *hapd, struct hostapd_ssid *ssid, > size_t vlan_id) >{ > const char *ifname; > > if (vlan_id == 0) > return &ssid->wep; > > if (vlan_id <= ssid->max_dyn_vlan_keys && ssid->dyn_vlan_keys && > ssid->dyn_vlan_keys[vlan_id]) > return ssid->dyn_vlan_keys[vlan_id]; > > wpa_printf(MSG_DEBUG, "IEEE 802.1X: Creating new group " > "state machine for VLAN ID %lu", > (unsigned long) vlan_id); > > ifname = hostapd_get_vlan_id_ifname(hapd->conf->vlan, vlan_id); > if (ifname == ((void *)0)) { > wpa_printf(MSG_DEBUG, "IEEE 802.1X: Unknown VLAN ID %lu - " > "cannot create group key state machine", > (unsigned long) vlan_id); > return ((void *)0); > } > > if (ssid->dyn_vlan_keys == ((void *)0)) { > int size = (vlan_id + 1) * sizeof(ssid->dyn_vlan_keys[0]); > ssid->dyn_vlan_keys = os_zalloc(size); > if (ssid->dyn_vlan_keys == ((void *)0)) > return ((void *)0); > ssid->max_dyn_vlan_keys = vlan_id; > } > > if (ssid->max_dyn_vlan_keys < vlan_id) { > struct hostapd_wep_keys **na; > int size = (vlan_id + 1) * sizeof(ssid->dyn_vlan_keys[0]); > na = realloc((ssid->dyn_vlan_keys), (size)); > if (na == ((void *)0)) > return ((void *)0); > ssid->dyn_vlan_keys = na; > memset(&ssid->dyn_vlan_keys[ssid->max_dyn_vlan_keys + 1], 0, (vlan_id - ssid->max_dyn_vlan_keys) * sizeof(ssid->dyn_vlan_keys[0])) > > ; > ssid->max_dyn_vlan_keys = vlan_id; > } > > ssid->dyn_vlan_keys[vlan_id] = ieee802_1x_group_alloc(hapd, ifname); > > return ssid->dyn_vlan_keys[vlan_id]; >} > > > >void ieee802_1x_tx_key(struct hostapd_data *hapd, struct sta_info *sta) >{ > struct eapol_authenticator *eapol = hapd->eapol_auth; > struct eapol_state_machine *sm = sta->eapol_sm; > > struct hostapd_wep_keys *key = ((void *)0); > int vlan_id; > > > if (sm == ((void *)0) || !sm->eap_if->eapKeyData) > return; > > wpa_printf(MSG_DEBUG, "IEEE 802.1X: Sending EAPOL-Key(s) to " "%02x:%02x:%02x:%02x:%02x:%02x", > (sta->addr)[0], (sta->addr)[1], (sta->addr)[2], (sta->addr)[3], (sta->addr)[4], (sta->addr)[5]); > > > vlan_id = sta->vlan_id; > if (vlan_id < 0 || vlan_id > 4094) > vlan_id = 0; > > if (vlan_id) { > key = ieee802_1x_get_group(hapd, sta->ssid, vlan_id); > if (key && key->key[key->idx]) > ieee802_1x_tx_key_one(hapd, sta, key->idx, 1, > key->key[key->idx], > key->len[key->idx]); > } else > > if (eapol->default_wep_key) { > ieee802_1x_tx_key_one(hapd, sta, eapol->default_wep_key_idx, 1, > eapol->default_wep_key, > hapd->conf->default_wep_key_len); > } > > if (hapd->conf->individual_wep_key_len > 0) { > u8 *ikey; > ikey = malloc((hapd->conf->individual_wep_key_len)); > if (ikey == ((void *)0) || > os_get_random(ikey, hapd->conf->individual_wep_key_len)) { > wpa_printf(MSG_ERROR, "Could not generate random " > "individual WEP key."); > free((ikey)); > return; > } > > wpa_hexdump_key(MSG_DEBUG, "Individual WEP key", > ikey, hapd->conf->individual_wep_key_len); > > ieee802_1x_tx_key_one(hapd, sta, 0, 0, ikey, > hapd->conf->individual_wep_key_len); > > > > if (hapd->drv.set_key(hapd->conf->iface, hapd, WPA_ALG_WEP, > sta->addr, 0, 1, ((void *)0), 0, ikey, > hapd->conf->individual_wep_key_len)) { > wpa_printf(MSG_ERROR, "Could not set individual WEP " > "encryption."); > } > > free((ikey)); > } >} > > >const char *radius_mode_txt(struct hostapd_data *hapd) >{ > switch (hapd->iface->conf->hw_mode) { > case HOSTAPD_MODE_IEEE80211A: > return "802.11a"; > case HOSTAPD_MODE_IEEE80211G: > return "802.11g"; > case HOSTAPD_MODE_IEEE80211B: > default: > return "802.11b"; > } >} > > >int radius_sta_rate(struct hostapd_data *hapd, struct sta_info *sta) >{ > int i; > u8 rate = 0; > > for (i = 0; i < sta->supported_rates_len; i++) > if ((sta->supported_rates[i] & 0x7f) > rate) > rate = sta->supported_rates[i] & 0x7f; > > return rate; >} > > > >static void ieee802_1x_learn_identity(struct hostapd_data *hapd, > struct eapol_state_machine *sm, > const u8 *eap, size_t len) >{ > const u8 *identity; > size_t identity_len; > > if (len <= sizeof(struct eap_hdr) || > eap[sizeof(struct eap_hdr)] != EAP_TYPE_IDENTITY) > return; > > identity = eap_get_identity(sm->eap, &identity_len); > if (identity == ((void *)0)) > return; > > > free((sm->identity)); > sm->identity = malloc((identity_len + 1)); > if (sm->identity == ((void *)0)) { > sm->identity_len = 0; > return; > } > > memcpy((sm->identity), (identity), (identity_len)); > sm->identity_len = identity_len; > sm->identity[identity_len] = '\0'; > hostapd_logger(hapd, sm->addr, 0x00000002, > HOSTAPD_LEVEL_DEBUG, "STA identity '%s'", sm->identity); > sm->dot1xAuthEapolRespIdFramesRx++; >} > > >static void ieee802_1x_encapsulate_radius(struct hostapd_data *hapd, > struct sta_info *sta, > const u8 *eap, size_t len) >{ > struct radius_msg *msg; > char buf[128]; > struct eapol_state_machine *sm = sta->eapol_sm; > > if (sm == ((void *)0)) > return; > > ieee802_1x_learn_identity(hapd, sm, eap, len); > > wpa_printf(MSG_DEBUG, "Encapsulating EAP message into a RADIUS " > "packet"); > > sm->radius_identifier = radius_client_get_id(hapd->radius); > msg = radius_msg_new(RADIUS_CODE_ACCESS_REQUEST, > sm->radius_identifier); > if (msg == ((void *)0)) { > printf("Could not create net RADIUS packet\n"); > return; > } > > radius_msg_make_authenticator(msg, (u8 *) sta, sizeof(*sta)); > > if (sm->identity && > !radius_msg_add_attr(msg, RADIUS_ATTR_USER_NAME, > sm->identity, sm->identity_len)) { > printf("Could not add User-Name\n"); > goto fail; > } > > if (hapd->conf->own_ip_addr.af == 2 && > !radius_msg_add_attr(msg, RADIUS_ATTR_NAS_IP_ADDRESS, > (u8 *) &hapd->conf->own_ip_addr.u.v4, 4)) { > printf("Could not add NAS-IP-Address\n"); > goto fail; > } ># 469 "ieee802_1x.c" > if (hapd->conf->nas_identifier && > !radius_msg_add_attr(msg, RADIUS_ATTR_NAS_IDENTIFIER, > (u8 *) hapd->conf->nas_identifier, > strlen(hapd->conf->nas_identifier))) { > printf("Could not add NAS-Identifier\n"); > goto fail; > } > > if (!radius_msg_add_attr_int32(msg, RADIUS_ATTR_NAS_PORT, sta->aid)) { > printf("Could not add NAS-Port\n"); > goto fail; > } > > snprintf(buf, sizeof(buf), "%02X-%02X-%02X-%02X-%02X-%02X" ":%s", > (hapd->own_addr)[0], (hapd->own_addr)[1], (hapd->own_addr)[2], (hapd->own_addr)[3], (hapd->own_addr)[4], (hapd->own_addr)[5], hapd->conf->ssid.ssid); > buf[sizeof(buf) - 1] = '\0'; > if (!radius_msg_add_attr(msg, RADIUS_ATTR_CALLED_STATION_ID, > (u8 *) buf, strlen(buf))) { > printf("Could not add Called-Station-Id\n"); > goto fail; > } > > snprintf(buf, sizeof(buf), "%02X-%02X-%02X-%02X-%02X-%02X", > (sta->addr)[0], (sta->addr)[1], (sta->addr)[2], (sta->addr)[3], (sta->addr)[4], (sta->addr)[5]); > buf[sizeof(buf) - 1] = '\0'; > if (!radius_msg_add_attr(msg, RADIUS_ATTR_CALLING_STATION_ID, > (u8 *) buf, strlen(buf))) { > printf("Could not add Calling-Station-Id\n"); > goto fail; > } > > > > > if (!radius_msg_add_attr_int32(msg, RADIUS_ATTR_FRAMED_MTU, 1400)) { > printf("Could not add Framed-MTU\n"); > goto fail; > } > > if (!radius_msg_add_attr_int32(msg, RADIUS_ATTR_NAS_PORT_TYPE, > 19)) { > printf("Could not add NAS-Port-Type\n"); > goto fail; > } > > if (sta->flags & (1 << (8))) { > os_strlcpy(buf, "IEEE 802.11i Pre-Authentication", > sizeof(buf)); > } else { > snprintf(buf, sizeof(buf), "CONNECT %d%sMbps %s", > radius_sta_rate(hapd, sta) / 2, > (radius_sta_rate(hapd, sta) & 1) ? ".5" : "", > radius_mode_txt(hapd)); > buf[sizeof(buf) - 1] = '\0'; > } > if (!radius_msg_add_attr(msg, RADIUS_ATTR_CONNECT_INFO, > (u8 *) buf, strlen(buf))) { > printf("Could not add Connect-Info\n"); > goto fail; > } > > if (eap && !radius_msg_add_eap(msg, eap, len)) { > printf("Could not add EAP-Message\n"); > goto fail; > } > > > > if (sm->last_recv_radius && > radius_msg_get_hdr(sm->last_recv_radius)->code == > RADIUS_CODE_ACCESS_CHALLENGE) { > int res = radius_msg_copy_attr(msg, sm->last_recv_radius, > RADIUS_ATTR_STATE); > if (res < 0) { > printf("Could not copy State attribute from previous " > "Access-Challenge\n"); > goto fail; > } > if (res > 0) { > wpa_printf(MSG_DEBUG, "Copied RADIUS State Attribute"); > } > } > > radius_client_send(hapd->radius, msg, RADIUS_AUTH, sta->addr); > return; > > fail: > radius_msg_free(msg); >} > > > >static void handle_eap_response(struct hostapd_data *hapd, > struct sta_info *sta, struct eap_hdr *eap, > size_t len) >{ > u8 type, *data; > struct eapol_state_machine *sm = sta->eapol_sm; > if (sm == ((void *)0)) > return; > > data = (u8 *) (eap + 1); > > if (len < sizeof(*eap) + 1) { > printf("handle_eap_response: too short response data\n"); > return; > } > > sm->eap_type_supp = type = data[0]; > > hostapd_logger(hapd, sm->addr, 0x00000002, > HOSTAPD_LEVEL_DEBUG, "received EAP packet (code=%d " > "id=%d len=%d) from STA: EAP Response-%s (%d)", > eap->code, eap->identifier, (__extension__ ({ register unsigned short int __v, __x = (unsigned short int) (( u16) (be16) (eap->length)); if (__builtin_constant_p (__x)) __v = ((unsigned short int) ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8))); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })), > eap_server_get_name(0, type), type); > > sm->dot1xAuthEapolRespFramesRx++; > > wpabuf_free(sm->eap_if->eapRespData); > sm->eap_if->eapRespData = wpabuf_alloc_copy(eap, len); > sm->eapolEap = TRUE; >} > > > >static void handle_eap(struct hostapd_data *hapd, struct sta_info *sta, > u8 *buf, size_t len) >{ > struct eap_hdr *eap; > u16 eap_len; > > if (len < sizeof(*eap)) { > printf(" too short EAP packet\n"); > return; > } > > eap = (struct eap_hdr *) buf; > > eap_len = (__extension__ ({ register unsigned short int __v, __x = (unsigned short int) (( u16) (be16) (eap->length)); if (__builtin_constant_p (__x)) __v = ((unsigned short int) ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8))); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > wpa_printf(MSG_DEBUG, "EAP: code=%d identifier=%d length=%d", > eap->code, eap->identifier, eap_len); > if (eap_len < sizeof(*eap)) { > wpa_printf(MSG_DEBUG, " Invalid EAP length"); > return; > } else if (eap_len > len) { > wpa_printf(MSG_DEBUG, " Too short frame to contain this EAP " > "packet"); > return; > } else if (eap_len < len) { > wpa_printf(MSG_DEBUG, " Ignoring %lu extra bytes after EAP " > "packet", (unsigned long) len - eap_len); > } > > switch (eap->code) { > case EAP_CODE_REQUEST: > wpa_printf(MSG_DEBUG, " (request)"); > return; > case EAP_CODE_RESPONSE: > wpa_printf(MSG_DEBUG, " (response)"); > handle_eap_response(hapd, sta, eap, eap_len); > break; > case EAP_CODE_SUCCESS: > wpa_printf(MSG_DEBUG, " (success)"); > return; > case EAP_CODE_FAILURE: > wpa_printf(MSG_DEBUG, " (failure)"); > return; > default: > wpa_printf(MSG_DEBUG, " (unknown code)"); > return; > } >} > > >static struct eapol_state_machine * >ieee802_1x_alloc_eapol_sm(struct hostapd_data *hapd, struct sta_info *sta) >{ > int flags = 0; > if (sta->flags & (1 << (8))) > flags |= (1 << (0)); > if (sta->wpa_sm) { > flags |= (1 << (2)); > if (wpa_auth_sta_get_pmksa(sta->wpa_sm)) > flags |= (1 << (3)); > } > return eapol_auth_alloc(hapd->eapol_auth, sta->addr, flags, > sta->wps_ie, sta); >} ># 668 "ieee802_1x.c" >void ieee802_1x_receive(struct hostapd_data *hapd, const u8 *sa, const u8 *buf, > size_t len) >{ > struct sta_info *sta; > struct ieee802_1x_hdr *hdr; > struct ieee802_1x_eapol_key *key; > u16 datalen; > struct rsn_pmksa_cache_entry *pmksa; > > if (!hapd->conf->ieee802_1x && !hapd->conf->wpa && > !hapd->conf->wps_state) > return; > > wpa_printf(MSG_DEBUG, "IEEE 802.1X: %lu bytes from " "%02x:%02x:%02x:%02x:%02x:%02x", > (unsigned long) len, (sa)[0], (sa)[1], (sa)[2], (sa)[3], (sa)[4], (sa)[5]); > sta = ap_get_sta(hapd, sa); > if (!sta || !(sta->flags & (1 << (1)))) { > wpa_printf(MSG_DEBUG, "IEEE 802.1X data frame from not " > "associated STA"); > return; > } > > if (len < sizeof(*hdr)) { > printf(" too short IEEE 802.1X packet\n"); > return; > } > > hdr = (struct ieee802_1x_hdr *) buf; > datalen = (__extension__ ({ register unsigned short int __v, __x = (unsigned short int) (( u16) (be16) (hdr->length)); if (__builtin_constant_p (__x)) __v = ((unsigned short int) ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8))); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); > wpa_printf(MSG_DEBUG, " IEEE 802.1X: version=%d type=%d length=%d", > hdr->version, hdr->type, datalen); > > if (len - sizeof(*hdr) < datalen) { > printf(" frame too short for this IEEE 802.1X packet\n"); > if (sta->eapol_sm) > sta->eapol_sm->dot1xAuthEapLengthErrorFramesRx++; > return; > } > if (len - sizeof(*hdr) > datalen) { > wpa_printf(MSG_DEBUG, " ignoring %lu extra octets after " > "IEEE 802.1X packet", > (unsigned long) len - sizeof(*hdr) - datalen); > } > > if (sta->eapol_sm) { > sta->eapol_sm->dot1xAuthLastEapolFrameVersion = hdr->version; > sta->eapol_sm->dot1xAuthEapolFramesRx++; > } > > key = (struct ieee802_1x_eapol_key *) (hdr + 1); > if (datalen >= sizeof(struct ieee802_1x_eapol_key) && > hdr->type == IEEE802_1X_TYPE_EAPOL_KEY && > (key->type == EAPOL_KEY_TYPE_WPA || > key->type == EAPOL_KEY_TYPE_RSN)) { > wpa_receive(hapd->wpa_auth, sta->wpa_sm, (u8 *) hdr, > sizeof(*hdr) + datalen); > return; > } > > if ((!hapd->conf->ieee802_1x && > !(sta->flags & ((1 << (12)) | (1 << (13))))) || > wpa_key_mgmt_wpa_psk(wpa_auth_sta_key_mgmt(sta->wpa_sm))) > return; > > if (!sta->eapol_sm) { > sta->eapol_sm = ieee802_1x_alloc_eapol_sm(hapd, sta); > if (!sta->eapol_sm) > return; ># 749 "ieee802_1x.c" > sta->eapol_sm->eap_if->portEnabled = TRUE; > } ># 759 "ieee802_1x.c" > switch (hdr->type) { > case IEEE802_1X_TYPE_EAP_PACKET: > handle_eap(hapd, sta, (u8 *) (hdr + 1), datalen); > break; > > case IEEE802_1X_TYPE_EAPOL_START: > hostapd_logger(hapd, sta->addr, 0x00000002, > HOSTAPD_LEVEL_DEBUG, "received EAPOL-Start " > "from STA"); > sta->eapol_sm->flags &= ~(1 << (1)); > pmksa = wpa_auth_sta_get_pmksa(sta->wpa_sm); > if (pmksa) { > hostapd_logger(hapd, sta->addr, 0x00000008, > HOSTAPD_LEVEL_DEBUG, "cached PMKSA " > "available - ignore it since " > "STA sent EAPOL-Start"); > wpa_auth_sta_clear_pmksa(sta->wpa_sm, pmksa); > } > sta->eapol_sm->eapolStart = TRUE; > sta->eapol_sm->dot1xAuthEapolStartFramesRx++; > wpa_auth_sm_event(sta->wpa_sm, WPA_REAUTH_EAPOL); > break; > > case IEEE802_1X_TYPE_EAPOL_LOGOFF: > hostapd_logger(hapd, sta->addr, 0x00000002, > HOSTAPD_LEVEL_DEBUG, "received EAPOL-Logoff " > "from STA"); > sta->acct_terminate_cause = > 1; > accounting_sta_stop(hapd, sta); > sta->eapol_sm->eapolLogoff = TRUE; > sta->eapol_sm->dot1xAuthEapolLogoffFramesRx++; > break; > > case IEEE802_1X_TYPE_EAPOL_KEY: > wpa_printf(MSG_DEBUG, " EAPOL-Key"); > if (!(sta->flags & (1 << (5)))) { > wpa_printf(MSG_DEBUG, " Dropped key data from " > "unauthorized Supplicant"); > break; > } > break; > > case IEEE802_1X_TYPE_EAPOL_ENCAPSULATED_ASF_ALERT: > wpa_printf(MSG_DEBUG, " EAPOL-Encapsulated-ASF-Alert"); > > break; > > default: > wpa_printf(MSG_DEBUG, " unknown IEEE 802.1X packet type"); > sta->eapol_sm->dot1xAuthInvalidEapolFramesRx++; > break; > } > > eapol_auth_step(sta->eapol_sm); >} ># 825 "ieee802_1x.c" >void ieee802_1x_new_station(struct hostapd_data *hapd, struct sta_info *sta) >{ > struct rsn_pmksa_cache_entry *pmksa; > int reassoc = 1; > int force_1x = 0; ># 843 "ieee802_1x.c" > if ((!force_1x && !hapd->conf->ieee802_1x) || > wpa_key_mgmt_wpa_psk(wpa_auth_sta_key_mgmt(sta->wpa_sm))) > return; > > if (sta->eapol_sm == ((void *)0)) { > hostapd_logger(hapd, sta->addr, 0x00000002, > HOSTAPD_LEVEL_DEBUG, "start authentication"); > sta->eapol_sm = ieee802_1x_alloc_eapol_sm(hapd, sta); > if (sta->eapol_sm == ((void *)0)) { > hostapd_logger(hapd, sta->addr, > 0x00000002, > HOSTAPD_LEVEL_INFO, > "failed to allocate state machine"); > return; > } > reassoc = 0; > } ># 872 "ieee802_1x.c" > sta->eapol_sm->eap_if->portEnabled = TRUE; > > pmksa = wpa_auth_sta_get_pmksa(sta->wpa_sm); > if (pmksa) { > int old_vlanid; > > hostapd_logger(hapd, sta->addr, 0x00000002, > HOSTAPD_LEVEL_DEBUG, > "PMK from PMKSA cache - skip IEEE 802.1X/EAP"); > > > sta->eapol_sm->keyRun = TRUE; > sta->eapol_sm->eap_if->eapKeyAvailable = TRUE; > sta->eapol_sm->auth_pae_state = AUTH_PAE_AUTHENTICATING; > sta->eapol_sm->be_auth_state = BE_AUTH_SUCCESS; > sta->eapol_sm->authSuccess = TRUE; > if (sta->eapol_sm->eap) > eap_sm_notify_cached(sta->eapol_sm->eap); > old_vlanid = sta->vlan_id; > pmksa_cache_to_eapol_data(pmksa, sta->eapol_sm); > if (sta->ssid->dynamic_vlan == 0) > sta->vlan_id = 0; > ap_sta_bind_vlan(hapd, sta, old_vlanid); > } else { > if (reassoc) { > > > > > > sta->eapol_sm->reAuthenticate = TRUE; > } > eapol_auth_step(sta->eapol_sm); > } >} > > >void ieee802_1x_free_station(struct sta_info *sta) >{ > struct eapol_state_machine *sm = sta->eapol_sm; > > if (sm == ((void *)0)) > return; > > sta->eapol_sm = ((void *)0); > > > radius_msg_free(sm->last_recv_radius); > radius_free_class(&sm->radius_class); > > > free((sm->identity)); > eapol_auth_free(sm); >} > > > >static void ieee802_1x_decapsulate_radius(struct hostapd_data *hapd, > struct sta_info *sta) >{ > u8 *eap; > size_t len; > struct eap_hdr *hdr; > int eap_type = -1; > char buf[64]; > struct radius_msg *msg; > struct eapol_state_machine *sm = sta->eapol_sm; > > if (sm == ((void *)0) || sm->last_recv_radius == ((void *)0)) { > if (sm) > sm->eap_if->aaaEapNoReq = TRUE; > return; > } > > msg = sm->last_recv_radius; > > eap = radius_msg_get_eap(msg, &len); > if (eap == ((void *)0)) { > > > > hostapd_logger(hapd, sta->addr, 0x00000002, > HOSTAPD_LEVEL_WARNING, "could not extract " > "EAP-Message from RADIUS message"); > sm->eap_if->aaaEapNoReq = TRUE; > return; > } > > if (len < sizeof(*hdr)) { > hostapd_logger(hapd, sta->addr, 0x00000002, > HOSTAPD_LEVEL_WARNING, "too short EAP packet " > "received from authentication server"); > free((eap)); > sm->eap_if->aaaEapNoReq = TRUE; > return; > } > > if (len > sizeof(*hdr)) > eap_type = eap[sizeof(*hdr)]; > > hdr = (struct eap_hdr *) eap; > switch (hdr->code) { > case EAP_CODE_REQUEST: > if (eap_type >= 0) > sm->eap_type_authsrv = eap_type; > snprintf(buf, sizeof(buf), "EAP-Request-%s (%d)", > eap_type >= 0 ? eap_server_get_name(0, eap_type) : > "??", > eap_type); > break; > case EAP_CODE_RESPONSE: > snprintf(buf, sizeof(buf), "EAP Response-%s (%d)", > eap_type >= 0 ? eap_server_get_name(0, eap_type) : > "??", > eap_type); > break; > case EAP_CODE_SUCCESS: > os_strlcpy(buf, "EAP Success", sizeof(buf)); > break; > case EAP_CODE_FAILURE: > os_strlcpy(buf, "EAP Failure", sizeof(buf)); > break; > default: > os_strlcpy(buf, "unknown EAP code", sizeof(buf)); > break; > } > buf[sizeof(buf) - 1] = '\0'; > hostapd_logger(hapd, sta->addr, 0x00000002, > HOSTAPD_LEVEL_DEBUG, "decapsulated EAP packet (code=%d " > "id=%d len=%d) from RADIUS server: %s", > hdr->code, hdr->identifier, (__extension__ ({ register unsigned short int __v, __x = (unsigned short int) (( u16) (be16) (hdr->length)); if (__builtin_constant_p (__x)) __v = ((unsigned short int) ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8))); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })), > buf); > sm->eap_if->aaaEapReq = TRUE; > > wpabuf_free(sm->eap_if->aaaEapReqData); > sm->eap_if->aaaEapReqData = wpabuf_alloc_ext_data(eap, len); >} > > >static void ieee802_1x_get_keys(struct hostapd_data *hapd, > struct sta_info *sta, struct radius_msg *msg, > struct radius_msg *req, > const u8 *shared_secret, > size_t shared_secret_len) >{ > struct radius_ms_mppe_keys *keys; > struct eapol_state_machine *sm = sta->eapol_sm; > if (sm == ((void *)0)) > return; > > keys = radius_msg_get_ms_keys(msg, req, shared_secret, > shared_secret_len); > > if (keys && keys->send && keys->recv) { > size_t len = keys->send_len + keys->recv_len; > wpa_hexdump_key(MSG_DEBUG, "MS-MPPE-Send-Key", > keys->send, keys->send_len); > wpa_hexdump_key(MSG_DEBUG, "MS-MPPE-Recv-Key", > keys->recv, keys->recv_len); > > free((sm->eap_if->aaaEapKeyData)); > sm->eap_if->aaaEapKeyData = malloc((len)); > if (sm->eap_if->aaaEapKeyData) { > memcpy((sm->eap_if->aaaEapKeyData), (keys->recv), (keys->recv_len)) > ; > memcpy((sm->eap_if->aaaEapKeyData + keys->recv_len), (keys->send), (keys->send_len)) > ; > sm->eap_if->aaaEapKeyDataLen = len; > sm->eap_if->aaaEapKeyAvailable = TRUE; > } > } > > if (keys) { > free((keys->send)); > free((keys->recv)); > free((keys)); > } >} > > >static void ieee802_1x_store_radius_class(struct hostapd_data *hapd, > struct sta_info *sta, > struct radius_msg *msg) >{ > u8 *class; > size_t class_len; > struct eapol_state_machine *sm = sta->eapol_sm; > int count, i; > struct radius_attr_data *nclass; > size_t nclass_count; > > if (!hapd->conf->radius->acct_server || hapd->radius == ((void *)0) || > sm == ((void *)0)) > return; > > radius_free_class(&sm->radius_class); > count = radius_msg_count_attr(msg, RADIUS_ATTR_CLASS, 1); > if (count <= 0) > return; > > nclass = os_zalloc(count * sizeof(struct radius_attr_data)); > if (nclass == ((void *)0)) > return; > > nclass_count = 0; > > class = ((void *)0); > for (i = 0; i < count; i++) { > do { > if (radius_msg_get_attr_ptr(msg, RADIUS_ATTR_CLASS, > &class, &class_len, > class) < 0) { > i = count; > break; > } > } while (class_len < 1); > > nclass[nclass_count].data = malloc((class_len)); > if (nclass[nclass_count].data == ((void *)0)) > break; > > memcpy((nclass[nclass_count].data), (class), (class_len)); > nclass[nclass_count].len = class_len; > nclass_count++; > } > > sm->radius_class.attr = nclass; > sm->radius_class.count = nclass_count; > wpa_printf(MSG_DEBUG, "IEEE 802.1X: Stored %lu RADIUS Class " > "attributes for " "%02x:%02x:%02x:%02x:%02x:%02x", > (unsigned long) sm->radius_class.count, > (sta->addr)[0], (sta->addr)[1], (sta->addr)[2], (sta->addr)[3], (sta->addr)[4], (sta->addr)[5]); >} > > > >static void ieee802_1x_update_sta_identity(struct hostapd_data *hapd, > struct sta_info *sta, > struct radius_msg *msg) >{ > u8 *buf, *identity; > size_t len; > struct eapol_state_machine *sm = sta->eapol_sm; > > if (sm == ((void *)0)) > return; > > if (radius_msg_get_attr_ptr(msg, RADIUS_ATTR_USER_NAME, &buf, &len, > ((void *)0)) < 0) > return; > > identity = malloc((len + 1)); > if (identity == ((void *)0)) > return; > > memcpy((identity), (buf), (len)); > identity[len] = '\0'; > > hostapd_logger(hapd, sta->addr, 0x00000002, > HOSTAPD_LEVEL_DEBUG, "old identity '%s' updated with " > "User-Name from Access-Accept '%s'", > sm->identity ? (char *) sm->identity : "N/A", > (char *) identity); > > free((sm->identity)); > sm->identity = identity; > sm->identity_len = len; >} > > >struct sta_id_search { > u8 identifier; > struct eapol_state_machine *sm; >}; > > >static int ieee802_1x_select_radius_identifier(struct hostapd_data *hapd, > struct sta_info *sta, > void *ctx) >{ > struct sta_id_search *id_search = ctx; > struct eapol_state_machine *sm = sta->eapol_sm; > > if (sm && sm->radius_identifier >= 0 && > sm->radius_identifier == id_search->identifier) { > id_search->sm = sm; > return 1; > } > return 0; >} > > >static struct eapol_state_machine * >ieee802_1x_search_radius_identifier(struct hostapd_data *hapd, u8 identifier) >{ > struct sta_id_search id_search; > id_search.identifier = identifier; > id_search.sm = ((void *)0); > ap_for_each_sta(hapd, ieee802_1x_select_radius_identifier, &id_search); > return id_search.sm; >} ># 1184 "ieee802_1x.c" >static RadiusRxResult >ieee802_1x_receive_auth(struct radius_msg *msg, struct radius_msg *req, > const u8 *shared_secret, size_t shared_secret_len, > void *data) >{ > struct hostapd_data *hapd = data; > struct sta_info *sta; > u32 session_timeout = 0, termination_action, acct_interim_interval; > int session_timeout_set, old_vlanid = 0; > struct eapol_state_machine *sm; > int override_eapReq = 0; > struct radius_hdr *hdr = radius_msg_get_hdr(msg); > > sm = ieee802_1x_search_radius_identifier(hapd, hdr->identifier); > if (sm == ((void *)0)) { > wpa_printf(MSG_DEBUG, "IEEE 802.1X: Could not find matching " > "station for this RADIUS message"); > return RADIUS_RX_UNKNOWN; > } > sta = sm->sta; > > > > if (hdr->code == RADIUS_CODE_ACCESS_REJECT && > radius_msg_get_attr(msg, RADIUS_ATTR_MESSAGE_AUTHENTICATOR, ((void *)0), > 0) < 0 && > radius_msg_get_attr(msg, RADIUS_ATTR_EAP_MESSAGE, ((void *)0), 0) < 0) { > wpa_printf(MSG_DEBUG, "Allowing RADIUS Access-Reject without " > "Message-Authenticator since it does not include " > "EAP-Message"); > } else if (radius_msg_verify(msg, shared_secret, shared_secret_len, > req, 1)) { > printf("Incoming RADIUS packet did not have correct " > "Message-Authenticator - dropped\n"); > return RADIUS_RX_INVALID_AUTHENTICATOR; > } > > if (hdr->code != RADIUS_CODE_ACCESS_ACCEPT && > hdr->code != RADIUS_CODE_ACCESS_REJECT && > hdr->code != RADIUS_CODE_ACCESS_CHALLENGE) { > printf("Unknown RADIUS message code\n"); > return RADIUS_RX_UNKNOWN; > } > > sm->radius_identifier = -1; > wpa_printf(MSG_DEBUG, "RADIUS packet matching with station " "%02x:%02x:%02x:%02x:%02x:%02x", > (sta->addr)[0], (sta->addr)[1], (sta->addr)[2], (sta->addr)[3], (sta->addr)[4], (sta->addr)[5]); > > radius_msg_free(sm->last_recv_radius); > sm->last_recv_radius = msg; > > session_timeout_set = > !radius_msg_get_attr_int32(msg, RADIUS_ATTR_SESSION_TIMEOUT, > &session_timeout); > if (radius_msg_get_attr_int32(msg, RADIUS_ATTR_TERMINATION_ACTION, > &termination_action)) > termination_action = 0; > > if (hapd->conf->acct_interim_interval == 0 && > hdr->code == RADIUS_CODE_ACCESS_ACCEPT && > radius_msg_get_attr_int32(msg, RADIUS_ATTR_ACCT_INTERIM_INTERVAL, > &acct_interim_interval) == 0) { > if (acct_interim_interval < 60) { > hostapd_logger(hapd, sta->addr, > 0x00000002, > HOSTAPD_LEVEL_INFO, > "ignored too small " > "Acct-Interim-Interval %d", > acct_interim_interval); > } else > sta->acct_interim_interval = acct_interim_interval; > } > > > switch (hdr->code) { > case RADIUS_CODE_ACCESS_ACCEPT: > if (sta->ssid->dynamic_vlan == 0) > sta->vlan_id = 0; > > else { > old_vlanid = sta->vlan_id; > sta->vlan_id = radius_msg_get_vlanid(msg); > } > if (sta->vlan_id > 0 && > hostapd_get_vlan_id_ifname(hapd->conf->vlan, > sta->vlan_id)) { > hostapd_logger(hapd, sta->addr, > 0x00000004, > HOSTAPD_LEVEL_INFO, > "VLAN ID %d", sta->vlan_id); > } else if (sta->ssid->dynamic_vlan == 2) { > sta->eapol_sm->authFail = TRUE; > hostapd_logger(hapd, sta->addr, > 0x00000002, > HOSTAPD_LEVEL_INFO, "authentication " > "server did not include required VLAN " > "ID in Access-Accept"); > break; > } > > > if (ap_sta_bind_vlan(hapd, sta, old_vlanid) < 0) > break; > > > if (session_timeout_set && termination_action == > 1) { > sm->reAuthPeriod = session_timeout; > } else if (session_timeout_set) > ap_sta_session_timeout(hapd, sta, session_timeout); > > sm->eap_if->aaaSuccess = TRUE; > override_eapReq = 1; > ieee802_1x_get_keys(hapd, sta, msg, req, shared_secret, > shared_secret_len); > ieee802_1x_store_radius_class(hapd, sta, msg); > ieee802_1x_update_sta_identity(hapd, sta, msg); > if (sm->eap_if->eapKeyAvailable && > wpa_auth_pmksa_add(sta->wpa_sm, sm->eapol_key_crypt, > session_timeout_set ? > (int) session_timeout : -1, sm) == 0) { > hostapd_logger(hapd, sta->addr, 0x00000008, > HOSTAPD_LEVEL_DEBUG, > "Added PMKSA cache entry"); > } > break; > case RADIUS_CODE_ACCESS_REJECT: > sm->eap_if->aaaFail = TRUE; > override_eapReq = 1; > break; > case RADIUS_CODE_ACCESS_CHALLENGE: > sm->eap_if->aaaEapReq = TRUE; > if (session_timeout_set) { > > sm->eap_if->aaaMethodTimeout = session_timeout; > hostapd_logger(hapd, sm->addr, > 0x00000002, > HOSTAPD_LEVEL_DEBUG, > "using EAP timeout of %d seconds (from " > "RADIUS)", > sm->eap_if->aaaMethodTimeout); > } else { > > > > > sm->eap_if->aaaMethodTimeout = 0; > } > break; > } > > ieee802_1x_decapsulate_radius(hapd, sta); > if (override_eapReq) > sm->eap_if->aaaEapReq = FALSE; > > eapol_auth_step(sm); > > return RADIUS_RX_QUEUED; >} > > > >void ieee802_1x_abort_auth(struct hostapd_data *hapd, struct sta_info *sta) >{ > struct eapol_state_machine *sm = sta->eapol_sm; > if (sm == ((void *)0)) > return; > > hostapd_logger(hapd, sta->addr, 0x00000002, > HOSTAPD_LEVEL_DEBUG, "aborting authentication"); > > > radius_msg_free(sm->last_recv_radius); > sm->last_recv_radius = ((void *)0); > > > if (sm->eap_if->eapTimeout) { > > > > > > sm->eap_if->portEnabled = FALSE; > ap_sta_disconnect(hapd, sta, sta->addr, > 2); > } >} > > >static int ieee802_1x_rekey_broadcast(struct hostapd_data *hapd) >{ > struct eapol_authenticator *eapol = hapd->eapol_auth; > > if (hapd->conf->default_wep_key_len < 1) > return 0; > > free((eapol->default_wep_key)); > eapol->default_wep_key = malloc((hapd->conf->default_wep_key_len)); > if (eapol->default_wep_key == ((void *)0) || > os_get_random(eapol->default_wep_key, > hapd->conf->default_wep_key_len)) { > printf("Could not generate random WEP key.\n"); > free((eapol->default_wep_key)); > eapol->default_wep_key = ((void *)0); > return -1; > } > > wpa_hexdump_key(MSG_DEBUG, "IEEE 802.1X: New default WEP key", > eapol->default_wep_key, > hapd->conf->default_wep_key_len); > > return 0; >} > > >static int ieee802_1x_sta_key_available(struct hostapd_data *hapd, > struct sta_info *sta, void *ctx) >{ > if (sta->eapol_sm) { > sta->eapol_sm->eap_if->eapKeyAvailable = TRUE; > eapol_auth_step(sta->eapol_sm); > } > return 0; >} > > >static void ieee802_1x_rekey(void *eloop_ctx, void *timeout_ctx) >{ > struct hostapd_data *hapd = eloop_ctx; > struct eapol_authenticator *eapol = hapd->eapol_auth; > > if (eapol->default_wep_key_idx >= 3) > eapol->default_wep_key_idx = > hapd->conf->individual_wep_key_len > 0 ? 1 : 0; > else > eapol->default_wep_key_idx++; > > wpa_printf(MSG_DEBUG, "IEEE 802.1X: New default WEP key index %d", > eapol->default_wep_key_idx); > > if (ieee802_1x_rekey_broadcast(hapd)) { > hostapd_logger(hapd, ((void *)0), 0x00000002, > HOSTAPD_LEVEL_WARNING, "failed to generate a " > "new broadcast key"); > free((eapol->default_wep_key)); > eapol->default_wep_key = ((void *)0); > return; > } > > > > if (hapd->drv.set_key(hapd->conf->iface, hapd, WPA_ALG_WEP, ((void *)0), > eapol->default_wep_key_idx, 1, ((void *)0), 0, > eapol->default_wep_key, > hapd->conf->default_wep_key_len)) { > hostapd_logger(hapd, ((void *)0), 0x00000002, > HOSTAPD_LEVEL_WARNING, "failed to configure a " > "new broadcast key"); > free((eapol->default_wep_key)); > eapol->default_wep_key = ((void *)0); > return; > } > > ap_for_each_sta(hapd, ieee802_1x_sta_key_available, ((void *)0)); > > if (hapd->conf->wep_rekeying_period > 0) { > eloop_register_timeout(hapd->conf->wep_rekeying_period, 0, > ieee802_1x_rekey, hapd, ((void *)0)); > } >} > > >static void ieee802_1x_eapol_send(void *ctx, void *sta_ctx, u8 type, > const u8 *data, size_t datalen) >{ ># 1483 "ieee802_1x.c" > ieee802_1x_send(ctx, sta_ctx, type, data, datalen); >} > > >static void ieee802_1x_aaa_send(void *ctx, void *sta_ctx, > const u8 *data, size_t datalen) >{ > > struct hostapd_data *hapd = ctx; > struct sta_info *sta = sta_ctx; > > ieee802_1x_encapsulate_radius(hapd, sta, data, datalen); > >} > > >static void _ieee802_1x_finished(void *ctx, void *sta_ctx, int success, > int preauth) >{ > struct hostapd_data *hapd = ctx; > struct sta_info *sta = sta_ctx; > if (preauth) > rsn_preauth_finished(hapd, sta, success); > else > ieee802_1x_finished(hapd, sta, success); >} > > >static int ieee802_1x_get_eap_user(void *ctx, const u8 *identity, > size_t identity_len, int phase2, > struct eap_user *user) >{ > struct hostapd_data *hapd = ctx; > const struct hostapd_eap_user *eap_user; > int i, count; > > eap_user = hostapd_get_eap_user(hapd->conf, identity, > identity_len, phase2); > if (eap_user == ((void *)0)) > return -1; > > memset(user, 0, sizeof(*user)); > user->phase2 = phase2; > count = 8; > if (count > 8) > count = 8; > for (i = 0; i < count; i++) { > user->methods[i].vendor = eap_user->methods[i].vendor; > user->methods[i].method = eap_user->methods[i].method; > } > > if (eap_user->password) { > user->password = malloc((eap_user->password_len)); > if (user->password == ((void *)0)) > return -1; > memcpy((user->password), (eap_user->password), (eap_user->password_len)) > ; > user->password_len = eap_user->password_len; > } > user->force_version = eap_user->force_version; > user->ttls_auth = eap_user->ttls_auth; > > return 0; >} > > >static int ieee802_1x_sta_entry_alive(void *ctx, const u8 *addr) >{ > struct hostapd_data *hapd = ctx; > struct sta_info *sta; > sta = ap_get_sta(hapd, addr); > if (sta == ((void *)0) || sta->eapol_sm == ((void *)0)) > return 0; > return 1; >} > > >static void ieee802_1x_logger(void *ctx, const u8 *addr, > eapol_logger_level level, const char *txt) >{ > > struct hostapd_data *hapd = ctx; > int hlevel; > > switch (level) { > case EAPOL_LOGGER_WARNING: > hlevel = HOSTAPD_LEVEL_WARNING; > break; > case EAPOL_LOGGER_INFO: > hlevel = HOSTAPD_LEVEL_INFO; > break; > case EAPOL_LOGGER_DEBUG: > default: > hlevel = HOSTAPD_LEVEL_DEBUG; > break; > } > > hostapd_logger(hapd, addr, 0x00000002, hlevel, "%s", > txt); > >} > > >static void ieee802_1x_set_port_authorized(void *ctx, void *sta_ctx, > int authorized) >{ > struct hostapd_data *hapd = ctx; > struct sta_info *sta = sta_ctx; > ieee802_1x_set_sta_authorized(hapd, sta, authorized); >} > > >static void _ieee802_1x_abort_auth(void *ctx, void *sta_ctx) >{ > struct hostapd_data *hapd = ctx; > struct sta_info *sta = sta_ctx; > ieee802_1x_abort_auth(hapd, sta); >} > > >static void _ieee802_1x_tx_key(void *ctx, void *sta_ctx) >{ > struct hostapd_data *hapd = ctx; > struct sta_info *sta = sta_ctx; > ieee802_1x_tx_key(hapd, sta); >} > > >static void ieee802_1x_eapol_event(void *ctx, void *sta_ctx, > enum eapol_event type) >{ > > struct sta_info *sta = sta_ctx; > switch (type) { > case EAPOL_AUTH_SM_CHANGE: > wpa_auth_sm_notify(sta->wpa_sm); > break; > case EAPOL_AUTH_REAUTHENTICATE: > wpa_auth_sm_event(sta->wpa_sm, WPA_REAUTH_EAPOL); > break; > } >} > > >int ieee802_1x_init(struct hostapd_data *hapd) >{ > int i; > struct eapol_auth_config conf; > struct eapol_auth_cb cb; > > memset(&conf, 0, sizeof(conf)); > conf.ctx = hapd; > conf.eap_reauth_period = hapd->conf->eap_reauth_period; > conf.wpa = hapd->conf->wpa; > conf.individual_wep_key_len = hapd->conf->individual_wep_key_len; > conf.eap_server = hapd->conf->eap_server; > conf.ssl_ctx = hapd->ssl_ctx; > conf.msg_ctx = hapd->msg_ctx; > conf.eap_sim_db_priv = hapd->eap_sim_db_priv; > conf.eap_req_id_text = hapd->conf->eap_req_id_text; > conf.eap_req_id_text_len = hapd->conf->eap_req_id_text_len; > conf.pac_opaque_encr_key = hapd->conf->pac_opaque_encr_key; > conf.eap_fast_a_id = hapd->conf->eap_fast_a_id; > conf.eap_fast_a_id_len = hapd->conf->eap_fast_a_id_len; > conf.eap_fast_a_id_info = hapd->conf->eap_fast_a_id_info; > conf.eap_fast_prov = hapd->conf->eap_fast_prov; > conf.pac_key_lifetime = hapd->conf->pac_key_lifetime; > conf.pac_key_refresh_time = hapd->conf->pac_key_refresh_time; > conf.eap_sim_aka_result_ind = hapd->conf->eap_sim_aka_result_ind; > conf.tnc = hapd->conf->tnc; > conf.wps = hapd->wps; > > memset(&cb, 0, sizeof(cb)); > cb.eapol_send = ieee802_1x_eapol_send; > cb.aaa_send = ieee802_1x_aaa_send; > cb.finished = _ieee802_1x_finished; > cb.get_eap_user = ieee802_1x_get_eap_user; > cb.sta_entry_alive = ieee802_1x_sta_entry_alive; > cb.logger = ieee802_1x_logger; > cb.set_port_authorized = ieee802_1x_set_port_authorized; > cb.abort_auth = _ieee802_1x_abort_auth; > cb.tx_key = _ieee802_1x_tx_key; > cb.eapol_event = ieee802_1x_eapol_event; > > hapd->eapol_auth = eapol_auth_init(&conf, &cb); > if (hapd->eapol_auth == ((void *)0)) > return -1; > > if ((hapd->conf->ieee802_1x || hapd->conf->wpa) && > hapd->drv.set_drv_ieee8021x(hapd, hapd->conf->iface, 1)) > return -1; > > > if (radius_client_register(hapd->radius, RADIUS_AUTH, > ieee802_1x_receive_auth, hapd)) > return -1; > > > if (hapd->conf->default_wep_key_len) { > for (i = 0; i < 4; i++) > hapd->drv.set_key(hapd->conf->iface, hapd, > WPA_ALG_NONE, ((void *)0), i, 0, ((void *)0), 0, > ((void *)0), 0); > > ieee802_1x_rekey(hapd, ((void *)0)); > > if (hapd->eapol_auth->default_wep_key == ((void *)0)) > return -1; > } > > return 0; >} > > >void ieee802_1x_deinit(struct hostapd_data *hapd) >{ > eloop_cancel_timeout(ieee802_1x_rekey, hapd, ((void *)0)); > > if (hapd->driver != ((void *)0) && > (hapd->conf->ieee802_1x || hapd->conf->wpa)) > hapd->drv.set_drv_ieee8021x(hapd, hapd->conf->iface, 0); > > eapol_auth_deinit(hapd->eapol_auth); > hapd->eapol_auth = ((void *)0); >} > > >int ieee802_1x_tx_status(struct hostapd_data *hapd, struct sta_info *sta, > const u8 *buf, size_t len, int ack) >{ > struct ieee80211_hdr *hdr; > struct ieee802_1x_hdr *xhdr; > struct ieee802_1x_eapol_key *key; > u8 *pos; > const unsigned char rfc1042_hdr[6] = > { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 }; > > if (sta == ((void *)0)) > return -1; > if (len < sizeof(*hdr) + sizeof(rfc1042_hdr) + 2 + sizeof(*xhdr)) > return 0; > > hdr = (struct ieee80211_hdr *) buf; > pos = (u8 *) (hdr + 1); > if (memcmp((pos), (rfc1042_hdr), (sizeof(rfc1042_hdr))) != 0) > return 0; > pos += sizeof(rfc1042_hdr); > if (((u16) (((pos)[0] << 8) | (pos)[1])) != 0x888E) > return 0; > pos += 2; > > xhdr = (struct ieee802_1x_hdr *) pos; > pos += sizeof(*xhdr); > > wpa_printf(MSG_DEBUG, "IEEE 802.1X: " "%02x:%02x:%02x:%02x:%02x:%02x" " TX status - version=%d " > "type=%d length=%d - ack=%d", > (sta->addr)[0], (sta->addr)[1], (sta->addr)[2], (sta->addr)[3], (sta->addr)[4], (sta->addr)[5], xhdr->version, xhdr->type, > (__extension__ ({ register unsigned short int __v, __x = (unsigned short int) (( u16) (be16) (xhdr->length)); if (__builtin_constant_p (__x)) __v = ((unsigned short int) ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8))); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })), ack); > > > > > > > if (xhdr->type == IEEE802_1X_TYPE_EAPOL_KEY && !ack && > pos + sizeof(*key) <= buf + len) { > key = (struct ieee802_1x_eapol_key *) pos; > hostapd_logger(hapd, sta->addr, 0x00000002, > HOSTAPD_LEVEL_DEBUG, "did not Ack EAPOL-Key " > "frame (%scast index=%d)", > key->key_index & (1 << (7)) ? "uni" : "broad", > key->key_index & ~(1 << (7))); > > > > > > > } > > > > > return 1; >} > > >u8 * ieee802_1x_get_identity(struct eapol_state_machine *sm, size_t *len) >{ > if (sm == ((void *)0) || sm->identity == ((void *)0)) > return ((void *)0); > > *len = sm->identity_len; > return sm->identity; >} > > >u8 * ieee802_1x_get_radius_class(struct eapol_state_machine *sm, size_t *len, > int idx) >{ > if (sm == ((void *)0) || sm->radius_class.attr == ((void *)0) || > idx >= (int) sm->radius_class.count) > return ((void *)0); > > *len = sm->radius_class.attr[idx].len; > return sm->radius_class.attr[idx].data; >} > > >const u8 * ieee802_1x_get_key(struct eapol_state_machine *sm, size_t *len) >{ > if (sm == ((void *)0)) > return ((void *)0); > > *len = sm->eap_if->eapKeyDataLen; > return sm->eap_if->eapKeyData; >} > > >void ieee802_1x_notify_port_enabled(struct eapol_state_machine *sm, > int enabled) >{ > if (sm == ((void *)0)) > return; > sm->eap_if->portEnabled = enabled ? TRUE : FALSE; > eapol_auth_step(sm); >} > > >void ieee802_1x_notify_port_valid(struct eapol_state_machine *sm, > int valid) >{ > if (sm == ((void *)0)) > return; > sm->portValid = valid ? TRUE : FALSE; > eapol_auth_step(sm); >} > > >void ieee802_1x_notify_pre_auth(struct eapol_state_machine *sm, int pre_auth) >{ > if (sm == ((void *)0)) > return; > if (pre_auth) > sm->flags |= (1 << (0)); > else > sm->flags &= ~(1 << (0)); >} > > >static const char * bool_txt(Boolean bool) >{ > return bool ? "TRUE" : "FALSE"; >} > > >int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen) >{ > > return 0; >} > > >int ieee802_1x_get_mib_sta(struct hostapd_data *hapd, struct sta_info *sta, > char *buf, size_t buflen) >{ > int len = 0, ret; > struct eapol_state_machine *sm = sta->eapol_sm; > > if (sm == ((void *)0)) > return 0; > > ret = snprintf(buf + len, buflen - len, > "dot1xPaePortNumber=%d\n" > "dot1xPaePortProtocolVersion=%d\n" > "dot1xPaePortCapabilities=1\n" > "dot1xPaePortInitialize=%d\n" > "dot1xPaePortReauthenticate=FALSE\n", > sta->aid, > 2, > sm->initialize); > if (ret < 0 || (size_t) ret >= buflen - len) > return len; > len += ret; > > > ret = snprintf(buf + len, buflen - len, > "dot1xAuthPaeState=%d\n" > "dot1xAuthBackendAuthState=%d\n" > "dot1xAuthAdminControlledDirections=%d\n" > "dot1xAuthOperControlledDirections=%d\n" > "dot1xAuthAuthControlledPortStatus=%d\n" > "dot1xAuthAuthControlledPortControl=%d\n" > "dot1xAuthQuietPeriod=%u\n" > "dot1xAuthServerTimeout=%u\n" > "dot1xAuthReAuthPeriod=%u\n" > "dot1xAuthReAuthEnabled=%s\n" > "dot1xAuthKeyTxEnabled=%s\n", > sm->auth_pae_state + 1, > sm->be_auth_state + 1, > sm->adminControlledDirections, > sm->operControlledDirections, > sm->authPortStatus, > sm->portControl, > sm->quietPeriod, > sm->serverTimeout, > sm->reAuthPeriod, > bool_txt(sm->reAuthEnabled), > bool_txt(sm->keyTxEnabled)); > if (ret < 0 || (size_t) ret >= buflen - len) > return len; > len += ret; > > > ret = snprintf(buf + len, buflen - len, > "dot1xAuthEapolFramesRx=%u\n" > "dot1xAuthEapolFramesTx=%u\n" > "dot1xAuthEapolStartFramesRx=%u\n" > "dot1xAuthEapolLogoffFramesRx=%u\n" > "dot1xAuthEapolRespIdFramesRx=%u\n" > "dot1xAuthEapolRespFramesRx=%u\n" > "dot1xAuthEapolReqIdFramesTx=%u\n" > "dot1xAuthEapolReqFramesTx=%u\n" > "dot1xAuthInvalidEapolFramesRx=%u\n" > "dot1xAuthEapLengthErrorFramesRx=%u\n" > "dot1xAuthLastEapolFrameVersion=%u\n" > "dot1xAuthLastEapolFrameSource=" "%02x:%02x:%02x:%02x:%02x:%02x" "\n", > sm->dot1xAuthEapolFramesRx, > sm->dot1xAuthEapolFramesTx, > sm->dot1xAuthEapolStartFramesRx, > sm->dot1xAuthEapolLogoffFramesRx, > sm->dot1xAuthEapolRespIdFramesRx, > sm->dot1xAuthEapolRespFramesRx, > sm->dot1xAuthEapolReqIdFramesTx, > sm->dot1xAuthEapolReqFramesTx, > sm->dot1xAuthInvalidEapolFramesRx, > sm->dot1xAuthEapLengthErrorFramesRx, > sm->dot1xAuthLastEapolFrameVersion, > (sm->addr)[0], (sm->addr)[1], (sm->addr)[2], (sm->addr)[3], (sm->addr)[4], (sm->addr)[5]); > if (ret < 0 || (size_t) ret >= buflen - len) > return len; > len += ret; > > > ret = snprintf(buf + len, buflen - len, > "dot1xAuthEntersConnecting=%u\n" > "dot1xAuthEapLogoffsWhileConnecting=%u\n" > "dot1xAuthEntersAuthenticating=%u\n" > "dot1xAuthAuthSuccessesWhileAuthenticating=%u\n" > "dot1xAuthAuthTimeoutsWhileAuthenticating=%u\n" > "dot1xAuthAuthFailWhileAuthenticating=%u\n" > "dot1xAuthAuthEapStartsWhileAuthenticating=%u\n" > "dot1xAuthAuthEapLogoffWhileAuthenticating=%u\n" > "dot1xAuthAuthReauthsWhileAuthenticated=%u\n" > "dot1xAuthAuthEapStartsWhileAuthenticated=%u\n" > "dot1xAuthAuthEapLogoffWhileAuthenticated=%u\n" > "dot1xAuthBackendResponses=%u\n" > "dot1xAuthBackendAccessChallenges=%u\n" > "dot1xAuthBackendOtherRequestsToSupplicant=%u\n" > "dot1xAuthBackendAuthSuccesses=%u\n" > "dot1xAuthBackendAuthFails=%u\n", > sm->authEntersConnecting, > sm->authEapLogoffsWhileConnecting, > sm->authEntersAuthenticating, > sm->authAuthSuccessesWhileAuthenticating, > sm->authAuthTimeoutsWhileAuthenticating, > sm->authAuthFailWhileAuthenticating, > sm->authAuthEapStartsWhileAuthenticating, > sm->authAuthEapLogoffWhileAuthenticating, > sm->authAuthReauthsWhileAuthenticated, > sm->authAuthEapStartsWhileAuthenticated, > sm->authAuthEapLogoffWhileAuthenticated, > sm->backendResponses, > sm->backendAccessChallenges, > sm->backendOtherRequestsToSupplicant, > sm->backendAuthSuccesses, > sm->backendAuthFails); > if (ret < 0 || (size_t) ret >= buflen - len) > return len; > len += ret; > > > ret = snprintf(buf + len, buflen - len, > > > > > "dot1xAuthSessionId=%08X-%08X\n" > "dot1xAuthSessionAuthenticMethod=%d\n" > "dot1xAuthSessionTime=%u\n" > "dot1xAuthSessionTerminateCause=999\n" > "dot1xAuthSessionUserName=%s\n", > sta->acct_session_id_hi, sta->acct_session_id_lo, > (wpa_key_mgmt_wpa_ieee8021x( > wpa_auth_sta_key_mgmt(sta->wpa_sm))) ? > 1 : 2, > (unsigned int) (time(((void *)0)) - > sta->acct_session_start), > sm->identity); > if (ret < 0 || (size_t) ret >= buflen - len) > return len; > len += ret; > > return len; >} > > >static void ieee802_1x_finished(struct hostapd_data *hapd, > struct sta_info *sta, int success) >{ > const u8 *key; > size_t len; > > static const int dot11RSNAConfigPMKLifetime = 43200; > > key = ieee802_1x_get_key(sta->eapol_sm, &len); > if (success && key && len >= 32 && > wpa_auth_pmksa_add(sta->wpa_sm, key, dot11RSNAConfigPMKLifetime, > sta->eapol_sm) == 0) { > hostapd_logger(hapd, sta->addr, 0x00000008, > HOSTAPD_LEVEL_DEBUG, > "Added PMKSA cache entry (IEEE 802.1X)"); > } ># 2025 "ieee802_1x.c" >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 382423
: 285999 |
286001