From 445d5a3a20aee761682d29a4547d0e0cea93e4f2 Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Tue, 20 Dec 2016 13:39:00 -0800 Subject: [PATCH] revised docs --- README.md | 30 +++++++++++++------------- docs/intro.md | 30 +++++++++++++------------- integrations/Unity3D/Unity3D.userprefs | 9 ++++---- src/build.h | 1 - src/sdk.h | 11 +--------- 5 files changed, 35 insertions(+), 46 deletions(-) delete mode 100644 src/build.h diff --git a/README.md b/README.md index 3bd2c49..fa2fc0d 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ There are generally two ways one might want to use the service. ## How does it work? -We've designed a background tap service that pairs the ZeroTier protocol with swappable user-space network stacks. We've provided drivers for [Lightweight IP (lwIP)](http://savannah.nongnu.org/projects/lwip/) and [picoTCP](http://www.picotcp.com/). The aim is to give you a new way to bring your applications onto your virtual network. For a more in-depth explanation of how it works take a look at our [SDK Primer](docs/zt_sdk_primer.md) +We've designed a background tap service that pairs the ZeroTier protocol with swappable user-space network stacks. We've provided drivers for [Lightweight IP (lwIP)](http://savannah.nongnu.org/projects/lwip/) and [picoTCP](http://www.picotcp.com/). The aim is to give you a new way to bring your applications onto your virtual network. For a more in-depth explanation of how it works take a look at our [Technical discussion](docs/technical.md) ## APIs @@ -46,7 +46,7 @@ We've designed a background tap service that pairs the ZeroTier protocol with sw - Uses dynamic loading of our library to allow function interposition or "hooking" to re-implement traditional socket API functions like `socket()`, `connect()`, `bind()`, etc. **Direct Call** -- Directly call the `zt_` API specified in [src/sdk.h](src/SDK.h). For this to work, just use one of the provided headers that specify the interface for your system/architecture and then either dynamically-load our library into your app or statically-link it at compile-time. +- Directly call the `zts_*` API specified in [src/sdk.h](src/sdk.h). For this to work, just use one of the provided headers that specify the interface for your system/architecture and then either dynamically-load our library into your app or statically-link it at compile-time. *** @@ -66,32 +66,32 @@ We've designed a background tap service that pairs the ZeroTier protocol with sw *** ### Apple - - For everything: `make apple` + - For everything: `make apple ` ##### iOS - - [Embedding within an app](apple/example_app/iOS) `make ios_app_framework` -> `build/ios_app_framework/*` + - [Embedding within an app](integrations/apple/example_app/iOS) `make ios_app_framework` -> `build/ios_app_framework/*` - Unity3D plugin `make ios_unity3d_bundle` -> `build/ios_unity3d_bundle/*` ##### OSX - - [Linking into an app at compiletime](../docs/osx_zt_sdk.md) `make osx_shared_lib` -> `build/libztosx.so` - - [Embedding within an app with Xcode](apple/example_app/OSX) `make osx_app_framework` -> `build/osx_app_framework/*` - - [Dynamic-linking into an app/service at runtime](../docs/osx_zt_sdk.md) `make osx_service_and_intercept` -> { `build/zerotier-sdk-service` + `build/libztintercept.so` } - - [Intercept library](../docs/osx_zt_sdk.md) `make osx_sdk_service` -> `build/zerotier-sdk-service` - - [SDK Service](../docs/osx_zt_sdk.md) `make osx_intercept` -> `build/libztintercept.so` - - [Unity3D plugin](apple/ZeroTierSDK_Apple) `make osx_unity3d_bundle` + - [Linking into an app at compiletime](docs/osx_zt_sdk.md) `make osx_shared_lib` -> `build/libztosx.so` + - [Embedding within an app with Xcode](integrations/apple/example_app/OSX) `make osx_app_framework` -> `build/osx_app_framework/*` + - [Dynamic-linking into an app/service at runtime](docs/osx_zt_sdk.md) `make osx_service_and_intercept` -> { `build/zerotier-sdk-service` + `build/libztintercept.so` } + - [Intercept library](docs/osx_zt_sdk.md) `make osx_sdk_service` -> `build/zerotier-sdk-service` + - [SDK Service](docs/osx_zt_sdk.md) `make osx_intercept` -> `build/libztintercept.so` + - [Unity3D plugin](integrations/apple/ZeroTierSDK_Apple) `make osx_unity3d_bundle` *** ### Linux - - For everything: `make linux` - - [Dynamic-linking into an app/service at runtime](../docs/linux_zt_sdk.md) `make linux_shared_lib` + - For everything: `make linux ` + - [Dynamic-linking into an app/service at runtime](docs/linux_zt_sdk.md) `make linux_shared_lib` - Service and Intercept `make linux_service_and_intercept` -> { `build/zerotier-sdk-service` + `build/libztintercept.so` } - - [Using the SDK with Docker](docker) + - [Using the SDK with Docker](integrations/docker) ### Android - For everything: `make android` - - [Embedding within an app](android) `make android_jni_lib` -> `build/android_jni_lib/YOUR_ARCH/libZeroTierOneJNI.so` - - [Unity 3D plugin](../docs/android_unity3d_zt_sdk.md) `make android_unity3d_plugin` -> `build/android_unity3d_plugin/*` + - [Embedding within an app](integrations/android) `make android_jni_lib` -> `build/android_jni_lib/YOUR_ARCH/libZeroTierOneJNI.so` + - [Unity 3D plugin](docs/android_unity3d_zt_sdk.md) `make android_unity3d_plugin` -> `build/android_unity3d_plugin/*` *** ### Windows diff --git a/docs/intro.md b/docs/intro.md index 3bd2c49..fa2fc0d 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -38,7 +38,7 @@ There are generally two ways one might want to use the service. ## How does it work? -We've designed a background tap service that pairs the ZeroTier protocol with swappable user-space network stacks. We've provided drivers for [Lightweight IP (lwIP)](http://savannah.nongnu.org/projects/lwip/) and [picoTCP](http://www.picotcp.com/). The aim is to give you a new way to bring your applications onto your virtual network. For a more in-depth explanation of how it works take a look at our [SDK Primer](docs/zt_sdk_primer.md) +We've designed a background tap service that pairs the ZeroTier protocol with swappable user-space network stacks. We've provided drivers for [Lightweight IP (lwIP)](http://savannah.nongnu.org/projects/lwip/) and [picoTCP](http://www.picotcp.com/). The aim is to give you a new way to bring your applications onto your virtual network. For a more in-depth explanation of how it works take a look at our [Technical discussion](docs/technical.md) ## APIs @@ -46,7 +46,7 @@ We've designed a background tap service that pairs the ZeroTier protocol with sw - Uses dynamic loading of our library to allow function interposition or "hooking" to re-implement traditional socket API functions like `socket()`, `connect()`, `bind()`, etc. **Direct Call** -- Directly call the `zt_` API specified in [src/sdk.h](src/SDK.h). For this to work, just use one of the provided headers that specify the interface for your system/architecture and then either dynamically-load our library into your app or statically-link it at compile-time. +- Directly call the `zts_*` API specified in [src/sdk.h](src/sdk.h). For this to work, just use one of the provided headers that specify the interface for your system/architecture and then either dynamically-load our library into your app or statically-link it at compile-time. *** @@ -66,32 +66,32 @@ We've designed a background tap service that pairs the ZeroTier protocol with sw *** ### Apple - - For everything: `make apple` + - For everything: `make apple ` ##### iOS - - [Embedding within an app](apple/example_app/iOS) `make ios_app_framework` -> `build/ios_app_framework/*` + - [Embedding within an app](integrations/apple/example_app/iOS) `make ios_app_framework` -> `build/ios_app_framework/*` - Unity3D plugin `make ios_unity3d_bundle` -> `build/ios_unity3d_bundle/*` ##### OSX - - [Linking into an app at compiletime](../docs/osx_zt_sdk.md) `make osx_shared_lib` -> `build/libztosx.so` - - [Embedding within an app with Xcode](apple/example_app/OSX) `make osx_app_framework` -> `build/osx_app_framework/*` - - [Dynamic-linking into an app/service at runtime](../docs/osx_zt_sdk.md) `make osx_service_and_intercept` -> { `build/zerotier-sdk-service` + `build/libztintercept.so` } - - [Intercept library](../docs/osx_zt_sdk.md) `make osx_sdk_service` -> `build/zerotier-sdk-service` - - [SDK Service](../docs/osx_zt_sdk.md) `make osx_intercept` -> `build/libztintercept.so` - - [Unity3D plugin](apple/ZeroTierSDK_Apple) `make osx_unity3d_bundle` + - [Linking into an app at compiletime](docs/osx_zt_sdk.md) `make osx_shared_lib` -> `build/libztosx.so` + - [Embedding within an app with Xcode](integrations/apple/example_app/OSX) `make osx_app_framework` -> `build/osx_app_framework/*` + - [Dynamic-linking into an app/service at runtime](docs/osx_zt_sdk.md) `make osx_service_and_intercept` -> { `build/zerotier-sdk-service` + `build/libztintercept.so` } + - [Intercept library](docs/osx_zt_sdk.md) `make osx_sdk_service` -> `build/zerotier-sdk-service` + - [SDK Service](docs/osx_zt_sdk.md) `make osx_intercept` -> `build/libztintercept.so` + - [Unity3D plugin](integrations/apple/ZeroTierSDK_Apple) `make osx_unity3d_bundle` *** ### Linux - - For everything: `make linux` - - [Dynamic-linking into an app/service at runtime](../docs/linux_zt_sdk.md) `make linux_shared_lib` + - For everything: `make linux ` + - [Dynamic-linking into an app/service at runtime](docs/linux_zt_sdk.md) `make linux_shared_lib` - Service and Intercept `make linux_service_and_intercept` -> { `build/zerotier-sdk-service` + `build/libztintercept.so` } - - [Using the SDK with Docker](docker) + - [Using the SDK with Docker](integrations/docker) ### Android - For everything: `make android` - - [Embedding within an app](android) `make android_jni_lib` -> `build/android_jni_lib/YOUR_ARCH/libZeroTierOneJNI.so` - - [Unity 3D plugin](../docs/android_unity3d_zt_sdk.md) `make android_unity3d_plugin` -> `build/android_unity3d_plugin/*` + - [Embedding within an app](integrations/android) `make android_jni_lib` -> `build/android_jni_lib/YOUR_ARCH/libZeroTierOneJNI.so` + - [Unity 3D plugin](docs/android_unity3d_zt_sdk.md) `make android_unity3d_plugin` -> `build/android_unity3d_plugin/*` *** ### Windows diff --git a/integrations/Unity3D/Unity3D.userprefs b/integrations/Unity3D/Unity3D.userprefs index 016913b..b995740 100644 --- a/integrations/Unity3D/Unity3D.userprefs +++ b/integrations/Unity3D/Unity3D.userprefs @@ -1,12 +1,11 @@  - + - - - - + + + diff --git a/src/build.h b/src/build.h deleted file mode 100644 index ad4168a..0000000 --- a/src/build.h +++ /dev/null @@ -1 +0,0 @@ -#define ZTSDK_BUILD_VERSION 44 diff --git a/src/sdk.h b/src/sdk.h index d896290..dca9711 100644 --- a/src/sdk.h +++ b/src/sdk.h @@ -52,8 +52,6 @@ #include #endif -#include "build.h" - #ifdef __cplusplus extern "C" { #endif @@ -122,13 +120,6 @@ int zts_get_device_id(); bool zts_is_relayed(); char *zts_get_homepath(); -// ZT Intercept/RPC Controls -// TODO: Remove any? -//void set_intercept_status(int mode); // TODO: Rethink this -//void init_service(int key, const char * path); -//void init_service_and_rpc(int key, const char * path, const char * nwid); -//void init_intercept(int key); - int zts_socket(SOCKET_SIG); int zts_connect(CONNECT_SIG); int zts_bind(BIND_SIG); @@ -204,7 +195,7 @@ ssize_t zts_recvmsg(RECVMSG_SIG); // Prototypes for redefinition of syscalls -// - Implemented in SDK_Intercept.c +// - Implemented in intercept.c #if defined(SDK_INTERCEPT) int socket(SOCKET_SIG); int connect(CONNECT_SIG);