pre-release preparation (organization of source files, added readmes, etc)

This commit is contained in:
Joseph Henry
2016-10-24 09:44:14 -07:00
parent a538b9131b
commit 27eeed0fa9
55 changed files with 463 additions and 345 deletions

5
src/README.md Normal file
View File

@@ -0,0 +1,5 @@
Source Directory Structure
====
`wrappers` - Example bindings of the ZeroTierSDK Sockets API to your favorite native languages
`stack_drivers` - Drivers to mate various network stacks to the ZeroTier tap interface

View File

@@ -30,14 +30,14 @@
#include <sys/socket.h>
#include <stdbool.h>
#include "SDK_Signatures.h"
#include "signatures.h"
#if defined(__ANDROID__)
// For defining the Android direct-call API
#include <jni.h>
#endif
#include "SDK_LocalBuild.h"
#include "build.h"
#ifdef __cplusplus
extern "C" {

View File

@@ -42,7 +42,6 @@
#include <pthread.h>
#include <sys/time.h>
#include <sys/types.h>
//#include <sys/socket.h>
#include <sys/poll.h>
#include <sys/un.h>
#include <sys/resource.h>
@@ -55,9 +54,9 @@
#include <linux/net.h>
#endif
#include "SDK.h"
#include "SDK_Debug.h"
#include "SDK_RPC.h"
#include "sdk.h"
#include "debug.h"
#include "rpc.h"
pthread_key_t thr_id_key;
//char *api_netpath;

View File

@@ -25,8 +25,9 @@
* LLC. Start here: http://www.zerotier.com/
*/
#include "SDK_Debug.h"
#include "SDK_EthernetTap.hpp"
#include "debug.h"
#include "tap.hpp"
#include "Phy.hpp"
#include "Utils.hpp"
#include "OSUtils.hpp"

View File

@@ -41,12 +41,11 @@
#include <fcntl.h>
#include <dlfcn.h>
#include <stdint.h>
//#include <sys/socket.h>
#include <strings.h>
#include "SDK.h"
#include "SDK_RPC.h"
#include "SDK_Debug.h"
#include "sdk.h"
#include "rpc.h"
#include "debug.h"
// externs common between SDK_Intercept and SDK_Socket from SDK.h

View File

@@ -46,10 +46,10 @@
#include "Utils.hpp"
#include "OSUtils.hpp"
#include "SDK_EthernetTap.hpp"
#include "SDK.h"
#include "SDK_Debug.h"
#include "SDK_LocalBuild.h"
#include "tap.hpp"
#include "sdk.h"
#include "debug.h"
#include "build.h"
std::string service_path;
pthread_t intercept_thread;

View File

@@ -68,10 +68,11 @@
#endif
#define SOCK_TYPE_MASK 0xf
#include "SDK.h"
#include "SDK_Signatures.h"
#include "SDK_Debug.h"
#include "SDK_RPC.h"
#include "sdk.h"
#include "signatures.h"
#include "debug.h"
#include "rpc.h"
#include "Constants.hpp" // For Tap's MTU
// Prototypes

View File

@@ -0,0 +1,4 @@
Stack Drivers
====
These files contain code to load and interface with network stacks.

View File

@@ -30,7 +30,7 @@
#include "Mutex.hpp"
#include "OSUtils.hpp"
#include "SDK_Debug.h"
#include "debug.h"
#include <stdio.h>
#include <dlfcn.h>

View File

@@ -42,7 +42,7 @@
#include "Mutex.hpp"
#include "OSUtils.hpp"
#include "SDK_Debug.h"
#include "debug.h"
#include <stdio.h>
#include <dlfcn.h>

View File

@@ -43,8 +43,8 @@
#include "Constants.hpp"
#include "Phy.hpp"
#include "SDK_Debug.h"
#include "SDK_EthernetTap.hpp"
#include "debug.h"
#include "tap.hpp"
#include "pico_stack.h"
#include "pico_ipv4.h"

View File

@@ -35,16 +35,16 @@
#include <sys/resource.h>
#include <sys/syscall.h>
#include "SDK_EthernetTap.hpp"
#include "SDK_Utils.hpp"
#include "SDK.h"
#include "SDK_defs.h"
#include "SDK_Debug.h"
#include "tap.hpp"
#include "utils.hpp"
#include "sdk.h"
#include "defs.h"
#include "debug.h"
#if defined(SDK_LWIP)
#include "SDK_lwIP.hpp"
#include "lwip.hpp"
#elif defined(SDK_PICOTCP)
#include "SDK_picoTCP.hpp"
#include "picotcp.hpp"
#include "pico_stack.h"
#include "pico_ipv4.h"
#include "pico_icmp4.h"
@@ -52,7 +52,7 @@
#include "pico_protocol.h"
#include "pico_socket.h"
#elif defined(SDK_JIP)
#include "SDK_jip.hpp"
#include "jip.hpp"
#endif
#include "Utils.hpp"

View File

@@ -46,13 +46,13 @@
#include "netif/etharp.h"
#include "SDK_defs.h"
#include "SDK_RPC.h"
#include "SDK_lwIP.hpp"
#include "SDK_jip.hpp"
#include "defs.h"
#include "rpc.h"
#include "lwip.hpp"
#include "jip.hpp"
#if defined(SDK_PICOTCP)
#include "SDK_picoTCP.hpp"
#include "picotcp.hpp"
#include "pico_protocol.h"
#endif

3
src/wrappers/README.md Normal file
View File

@@ -0,0 +1,3 @@
Language/Framework Wrappers
====
These wrappers are designed to abstract the ZeroTierSDK Sockets API (implemented in `src/Sockets.c`) to your native language of choice. Specific examples of how to use these are located in the `integrations` directory..