revised docs
This commit is contained in:
30
README.md
30
README.md
@@ -38,7 +38,7 @@ There are generally two ways one might want to use the service.
|
|||||||
|
|
||||||
## How does it work?
|
## 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
|
## 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.
|
- 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**
|
**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
|
### Apple
|
||||||
- For everything: `make apple`
|
- For everything: `make apple <flags>`
|
||||||
|
|
||||||
##### iOS
|
##### 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/*`
|
- Unity3D plugin `make ios_unity3d_bundle` -> `build/ios_unity3d_bundle/*`
|
||||||
|
|
||||||
##### OSX
|
##### OSX
|
||||||
- [Linking into an app at compiletime](../docs/osx_zt_sdk.md) `make osx_shared_lib` -> `build/libztosx.so`
|
- [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/*`
|
- [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` }
|
- [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`
|
- [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`
|
- [SDK Service](docs/osx_zt_sdk.md) `make osx_intercept` -> `build/libztintercept.so`
|
||||||
- [Unity3D plugin](apple/ZeroTierSDK_Apple) `make osx_unity3d_bundle`
|
- [Unity3D plugin](integrations/apple/ZeroTierSDK_Apple) `make osx_unity3d_bundle`
|
||||||
|
|
||||||
***
|
***
|
||||||
### Linux
|
### Linux
|
||||||
- For everything: `make linux`
|
- For everything: `make linux <flags>`
|
||||||
- [Dynamic-linking into an app/service at runtime](../docs/linux_zt_sdk.md) `make linux_shared_lib`
|
- [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` }
|
- 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
|
### Android
|
||||||
- For everything: `make android`
|
- For everything: `make android`
|
||||||
|
|
||||||
- [Embedding within an app](android) `make android_jni_lib` -> `build/android_jni_lib/YOUR_ARCH/libZeroTierOneJNI.so`
|
- [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/*`
|
- [Unity 3D plugin](docs/android_unity3d_zt_sdk.md) `make android_unity3d_plugin` -> `build/android_unity3d_plugin/*`
|
||||||
|
|
||||||
***
|
***
|
||||||
### Windows
|
### Windows
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ There are generally two ways one might want to use the service.
|
|||||||
|
|
||||||
## How does it work?
|
## 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
|
## 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.
|
- 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**
|
**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
|
### Apple
|
||||||
- For everything: `make apple`
|
- For everything: `make apple <flags>`
|
||||||
|
|
||||||
##### iOS
|
##### 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/*`
|
- Unity3D plugin `make ios_unity3d_bundle` -> `build/ios_unity3d_bundle/*`
|
||||||
|
|
||||||
##### OSX
|
##### OSX
|
||||||
- [Linking into an app at compiletime](../docs/osx_zt_sdk.md) `make osx_shared_lib` -> `build/libztosx.so`
|
- [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/*`
|
- [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` }
|
- [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`
|
- [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`
|
- [SDK Service](docs/osx_zt_sdk.md) `make osx_intercept` -> `build/libztintercept.so`
|
||||||
- [Unity3D plugin](apple/ZeroTierSDK_Apple) `make osx_unity3d_bundle`
|
- [Unity3D plugin](integrations/apple/ZeroTierSDK_Apple) `make osx_unity3d_bundle`
|
||||||
|
|
||||||
***
|
***
|
||||||
### Linux
|
### Linux
|
||||||
- For everything: `make linux`
|
- For everything: `make linux <flags>`
|
||||||
- [Dynamic-linking into an app/service at runtime](../docs/linux_zt_sdk.md) `make linux_shared_lib`
|
- [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` }
|
- 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
|
### Android
|
||||||
- For everything: `make android`
|
- For everything: `make android`
|
||||||
|
|
||||||
- [Embedding within an app](android) `make android_jni_lib` -> `build/android_jni_lib/YOUR_ARCH/libZeroTierOneJNI.so`
|
- [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/*`
|
- [Unity 3D plugin](docs/android_unity3d_zt_sdk.md) `make android_unity3d_plugin` -> `build/android_unity3d_plugin/*`
|
||||||
|
|
||||||
***
|
***
|
||||||
### Windows
|
### Windows
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
<Properties StartupItem="Assembly-CSharp.csproj">
|
<Properties StartupItem="Assembly-CSharp.csproj">
|
||||||
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" PreferredExecutionTarget="Unity.Instance.Unity Editor" />
|
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" PreferredExecutionTarget="Unity.Instance.Unity Editor" />
|
||||||
<MonoDevelop.Ide.Workbench ActiveDocument="Assets/ZeroTierNetworkInterface.cs">
|
<MonoDevelop.Ide.Workbench ActiveDocument="Assets/ZeroTierSockets_Demo.cs">
|
||||||
<Files>
|
<Files>
|
||||||
<File FileName="Assets/WorldMain.cs" Line="1" Column="1" />
|
|
||||||
<File FileName="Assets/ZeroTierNetworkInterface.cs" Line="367" Column="1" />
|
|
||||||
<File FileName="Assets/ZeroTierSockets_Demo.cs" Line="237" Column="21" />
|
|
||||||
<File FileName="Assets/MyZeroTier.cs" Line="1" Column="1" />
|
<File FileName="Assets/MyZeroTier.cs" Line="1" Column="1" />
|
||||||
<File FileName="Assets/ZeroTierUtils.cs" Line="1" Column="1" />
|
<File FileName="Assets/WorldMain.cs" Line="1" Column="1" />
|
||||||
|
<File FileName="Assets/ZeroTierSockets_Demo.cs" Line="238" Column="21" />
|
||||||
|
<File FileName="Assets/ZTSDK.cs" Line="67" Column="23" />
|
||||||
</Files>
|
</Files>
|
||||||
</MonoDevelop.Ide.Workbench>
|
</MonoDevelop.Ide.Workbench>
|
||||||
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
#define ZTSDK_BUILD_VERSION 44
|
|
||||||
11
src/sdk.h
11
src/sdk.h
@@ -52,8 +52,6 @@
|
|||||||
#include <jni.h>
|
#include <jni.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "build.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@@ -122,13 +120,6 @@ int zts_get_device_id();
|
|||||||
bool zts_is_relayed();
|
bool zts_is_relayed();
|
||||||
char *zts_get_homepath();
|
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_socket(SOCKET_SIG);
|
||||||
int zts_connect(CONNECT_SIG);
|
int zts_connect(CONNECT_SIG);
|
||||||
int zts_bind(BIND_SIG);
|
int zts_bind(BIND_SIG);
|
||||||
@@ -204,7 +195,7 @@ ssize_t zts_recvmsg(RECVMSG_SIG);
|
|||||||
|
|
||||||
|
|
||||||
// Prototypes for redefinition of syscalls
|
// Prototypes for redefinition of syscalls
|
||||||
// - Implemented in SDK_Intercept.c
|
// - Implemented in intercept.c
|
||||||
#if defined(SDK_INTERCEPT)
|
#if defined(SDK_INTERCEPT)
|
||||||
int socket(SOCKET_SIG);
|
int socket(SOCKET_SIG);
|
||||||
int connect(CONNECT_SIG);
|
int connect(CONNECT_SIG);
|
||||||
|
|||||||
Reference in New Issue
Block a user