diff --git a/.gitmodules b/.gitmodules index e951300..01f7ce8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,6 @@ -[submodule "src_tinc/tinc"] - path = src_tinc/tinc - url = http://tinc-vpn.org/git/tinc - ignore = dirty [submodule "platform_external_openssl"] path = platform_external_openssl url = https://github.com/Vilbrekin/platform_external_openssl.git +[submodule "tinc"] + path = tinc + url = http://tinc-vpn.org/git/tinc diff --git a/jni/Android.mk b/jni/Android.mk index 6f3ce11..03e85c4 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -9,13 +9,16 @@ modules-LOCALS += SRC_FILES_arm CFLAGS_arm SRC_FILES_arm64 CFLAGS_arm64 SRC_FILE LOCAL_MODULE := tincd LOCAL_LDFLAGS := LOCAL_LDLIBS := -lz -LOCAL_CFLAGS := -std=gnu99 -DCONFDIR=\"/etc\" -DLOCALSTATEDIR=\"/var\" +LOCAL_CFLAGS := -std=gnu99 -DHAVE_CONFIG_H -DCONFDIR=\"/etc\" -DLOCALSTATEDIR=\"/var\" LOCAL_STATIC_LIBRARIES := libcrypto_static libssl_static LOCAL_FORCE_STATIC_EXECUTABLE := true -LOCAL_C_INCLUDES := tinc/src LOCAL_SRC_FILES += tinc/src/protocol_edge.c tinc/src/xmalloc.c tinc/src/dummy_device.c tinc/src/protocol_subnet.c tinc/src/edge.c tinc/src/pidfile.c tinc/src/conf.c tinc/src/protocol_misc.c tinc/src/utils.c tinc/src/event.c tinc/src/protocol_key.c tinc/src/raw_socket_device.c tinc/src/protocol.c tinc/src/net_socket.c tinc/src/logger.c tinc/src/list.c tinc/src/fake-getaddrinfo.c tinc/src/net.c tinc/src/tincd.c tinc/src/graph.c tinc/src/process.c tinc/src/net_packet.c tinc/src/netutl.c tinc/src/linux/device.c tinc/src/avl_tree.c tinc/src/route.c tinc/src/meta.c tinc/src/protocol_auth.c tinc/src/net_setup.c tinc/src/getopt.c tinc/src/multicast_device.c tinc/src/connection.c tinc/src/subnet.c tinc/src/node.c tinc/src/fake-getnameinfo.c tinc/src/getopt1.c tinc/src/dropin.c OPENSSL_DIR := $(NDK_PROJECT_PATH)/platform_external_openssl LOCAL_C_INCLUDES := $(OPENSSL_DIR)/include + +# Hack around missing #ifdef HAVE_CONFIG_H in system.h and relative paths includes (so that it finds ../config.h file) +LOCAL_C_INCLUDES += $(LOCAL_PATH)/tinc + include $(BUILD_EXECUTABLE) # Dependency on OpenSSL diff --git a/jni/config.h b/jni/config.h new file mode 100644 index 0000000..33755b3 --- /dev/null +++ b/jni/config.h @@ -0,0 +1,444 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Support for jumbograms (packets up to 9000 bytes) */ +/* #undef ENABLE_JUMBOGRAMS */ + +/* Support for tunemu */ +/* #undef ENABLE_TUNEMU */ + +/* Support for UML */ +/* #undef ENABLE_UML */ + +/* Support for VDE */ +/* #undef ENABLE_VDE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_INET_H 1 + +/* Define to 1 if you have the `asprintf' function. */ +#define HAVE_ASPRINTF 1 + +/* Unknown BSD variant */ +/* #undef HAVE_BSD */ + +/* Cygwin */ +/* #undef HAVE_CYGWIN */ + +/* Define to 1 if you have the `daemon' function. */ +#define HAVE_DAEMON 1 + +/* Darwin (MacOS/X) */ +/* #undef HAVE_DARWIN */ + +/* Define to 1 if you have the declaration of `freeaddrinfo', and to 0 if you + don't. */ +#define HAVE_DECL_FREEADDRINFO 1 + +/* Define to 1 if you have the declaration of `gai_strerror', and to 0 if you + don't. */ +#define HAVE_DECL_GAI_STRERROR 1 + +/* Define to 1 if you have the declaration of `getaddrinfo', and to 0 if you + don't. */ +#define HAVE_DECL_GETADDRINFO 1 + +/* Define to 1 if you have the declaration of `getnameinfo', and to 0 if you + don't. */ +#define HAVE_DECL_GETNAMEINFO 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DIRENT_H 1 + +/* DragonFly */ +/* #undef HAVE_DRAGONFLY */ + +/* Define to 1 if you have the `EVP_EncryptInit_ex' function. */ +#define HAVE_EVP_ENCRYPTINIT_EX 1 + +/* Define to 1 if you have the `fchmod' function. */ +#define HAVE_FCHMOD 1 + +/* Define to 1 if you have the `flock' function. */ +#define HAVE_FLOCK 1 + +/* Define to 1 if you have the `fork' function. */ +#define HAVE_FORK 1 + +/* FreeBSD */ +/* #undef HAVE_FREEBSD */ + +/* Define to 1 if you have the `ftime' function. */ +#define HAVE_FTIME 1 + +/* Define to 1 if you have the `gettimeofday' function. */ +#define HAVE_GETTIMEOFDAY 1 + +/* Define to 1 if you have the `get_current_dir_name' function. */ +/* #undef HAVE_GET_CURRENT_DIR_NAME */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `nsl' library (-lnsl). */ +/* #undef HAVE_LIBNSL */ + +/* Define to 1 if you have the `socket' library (-lsocket). */ +/* #undef HAVE_LIBSOCKET */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LIBVDEPLUG_DYN_H */ + +/* Linux */ +#define HAVE_LINUX 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LINUX_IF_TUN_H 1 + +/* enable lzo compression support */ +/* #undef HAVE_LZO */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LZO1X_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LZO2_LZO1X_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LZO_LZO1X_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* MinGW */ +/* #undef HAVE_MINGW */ + +/* Define to 1 if you have the `mlockall' function. */ +/* #undef HAVE_MLOCKALL */ + +/* NetBSD */ +/* #undef HAVE_NETBSD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_NETDB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_ICMP6_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IF_ETHER_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IN6_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IN_SYSTM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IP6_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IP_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IP_ICMP_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_TCP_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETPACKET_PACKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NET_ETHERNET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NET_IF_ARP_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NET_IF_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NET_IF_TAP_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NET_IF_TUN_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_NET_IF_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NET_TAP_IF_TAP_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NET_TUN_IF_TUN_H */ + +/* OpenBSD */ +/* #undef HAVE_OPENBSD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_ENGINE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_ERR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_EVP_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_PEM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_RAND_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_RSA_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_SHA_H 1 + +/* Define to 1 if you have the `pselect' function. */ +#define HAVE_PSELECT 1 + +/* Define to 1 if you have the `putenv' function. */ +#define HAVE_PUTENV 1 + +/* Define to 1 if you have the `random' function. */ +/* #undef HAVE_RANDOM */ + +/* Define to 1 if you have the `RAND_pseudo_bytes' function. */ +#define HAVE_RAND_PSEUDO_BYTES 1 + +/* Define to 1 if you have the `select' function. */ +#define HAVE_SELECT 1 + +/* Define to 1 if the system has the type `socklen_t'. */ +#define HAVE_SOCKLEN_T 1 + +/* Solaris/SunOS */ +/* #undef HAVE_SOLARIS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDBOOL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strdup' function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the `strerror' function. */ +#define HAVE_STRERROR 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + +/* Define to 1 if you have the `strtol' function. */ +#define HAVE_STRTOL 1 + +/* Define to 1 if the system has the type `struct addrinfo'. */ +#define HAVE_STRUCT_ADDRINFO 1 + +/* Define to 1 if the system has the type `struct arphdr'. */ +#define HAVE_STRUCT_ARPHDR 1 + +/* Define to 1 if the system has the type `struct ether_arp'. */ +/* #undef HAVE_STRUCT_ETHER_ARP */ + +/* Define to 1 if the system has the type `struct ether_header'. */ +#define HAVE_STRUCT_ETHER_HEADER 1 + +/* Define to 1 if the system has the type `struct icmp'. */ +#define HAVE_STRUCT_ICMP 1 + +/* Define to 1 if the system has the type `struct icmp6_hdr'. */ +#define HAVE_STRUCT_ICMP6_HDR 1 + +/* Define to 1 if the system has the type `struct in6_addr'. */ +#define HAVE_STRUCT_IN6_ADDR 1 + +/* Define to 1 if the system has the type `struct in_addr'. */ +#define HAVE_STRUCT_IN_ADDR 1 + +/* Define to 1 if the system has the type `struct ip'. */ +#define HAVE_STRUCT_IP 1 + +/* Define to 1 if the system has the type `struct ip6_hdr'. */ +#define HAVE_STRUCT_IP6_HDR 1 + +/* Define to 1 if the system has the type `struct nd_neighbor_solicit'. */ +#define HAVE_STRUCT_ND_NEIGHBOR_SOLICIT 1 + +/* Define to 1 if the system has the type `struct nd_opt_hdr'. */ +#define HAVE_STRUCT_ND_OPT_HDR 1 + +/* Define to 1 if the system has the type `struct sockaddr_in6'. */ +#define HAVE_STRUCT_SOCKADDR_IN6 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYSLOG_H 1 + +/* Define to 1 if you have the `system' function. */ +#define HAVE_SYSTEM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_FILE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `unsetenv' function. */ +#define HAVE_UNSETENV 1 + +/* Define to 1 if you have the `usleep' function. */ +#define HAVE_USLEEP 1 + +/* Define to 1 if you have the `vsyslog' function. */ +#define HAVE_VSYSLOG 1 + +/* Define to 1 if you have the `writev' function. */ +#define HAVE_WRITEV 1 + +/* have zlib compression support */ +#define HAVE_ZLIB 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ZLIB_H 1 + +/* Location of lzo1x.h */ +/* #undef LZO1X_H */ + +/* Name of package */ +#define PACKAGE "tinc" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "tinc" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "tinc 1.0.24" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "tinc" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.0.24" + +/* Define as the return type of signal handlers (`int' or `void'). */ +#define RETSIGTYPE void + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if you can safely include both and . */ +#define TIME_WITH_SYS_TIME 1 + +/* Define to 1 if your declares `struct tm'. */ +/* #undef TM_IN_SYS_TIME */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.0.24" + +/* Compile with support for Windows 2000 */ +/* #undef WITH_WINDOWS2000 */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Enable BSD extensions */ +#define __USE_BSD 1 + +/* Defined if the __malloc__ attribute is not supported. */ +#define __malloc__ /**/ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `int' if does not define. */ +/* #undef pid_t */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define to empty if the keyword `volatile' does not work. Warning: valid + code using `volatile' can become incorrect without. Disable with care. */ +/* #undef volatile */ diff --git a/jni/tinc b/jni/tinc deleted file mode 120000 index b74bae6..0000000 --- a/jni/tinc +++ /dev/null @@ -1 +0,0 @@ -../src_tinc/tinc/ \ No newline at end of file diff --git a/jni/tinc/src b/jni/tinc/src new file mode 120000 index 0000000..6767ccf --- /dev/null +++ b/jni/tinc/src @@ -0,0 +1 @@ +../../tinc/src/ \ No newline at end of file diff --git a/libs/armeabi/tincd b/libs/armeabi/tincd index db57b1d..f995150 100755 Binary files a/libs/armeabi/tincd and b/libs/armeabi/tincd differ diff --git a/libs/mips/tincd b/libs/mips/tincd index e7deacb..e52622d 100755 Binary files a/libs/mips/tincd and b/libs/mips/tincd differ diff --git a/libs/x86/tincd b/libs/x86/tincd index d48a22d..0e54098 100755 Binary files a/libs/x86/tincd and b/libs/x86/tincd differ diff --git a/src_tinc/.gitignore b/src_tinc/.gitignore deleted file mode 100644 index a3302a0..0000000 --- a/src_tinc/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -toolchain/ -build.log diff --git a/src_tinc/tinc b/src_tinc/tinc deleted file mode 160000 index 67498fb..0000000 --- a/src_tinc/tinc +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 67498fb1b55960bcc2ccead2e6341de4167413af diff --git a/tinc b/tinc new file mode 160000 index 0000000..110ca19 --- /dev/null +++ b/tinc @@ -0,0 +1 @@ +Subproject commit 110ca1958af2465e383b4ca20b67fd0e780f3fb5