Implemented barebones VL2 SOCK_RAW functionality, moved ZT core helper functions from OneService to libzt

This commit is contained in:
Joseph Henry
2017-08-02 14:39:21 -07:00
parent ecb2dc5178
commit 7e30474ee4
14 changed files with 549 additions and 80 deletions

View File

@@ -40,7 +40,7 @@
#include "SocketTap.hpp"
/****************************************************************************/
/* PicoTCP API Signatures (See libzt.h for the API an app should use) */
/* PicoTCP API Signatures (See libzt.h for the API an app should use) */
/****************************************************************************/
#define PICO_IPV4_TO_STRING_SIG char *ipbuf, const uint32_t ip
@@ -150,12 +150,12 @@ namespace ZeroTier
/*
* Read from RX buffer to application - Called from SocketTap
*/
void pico_Read(SocketTap *tap, ZeroTier::PhySocket *sock,Connection *conn,bool stack_invoked);
int pico_Read(SocketTap *tap, ZeroTier::PhySocket *sock,Connection *conn,bool stack_invoked);
/*
* Write to userspace network stack - Called from SocketTap
*/
void pico_Write(Connection *conn, void *data, ssize_t len);
int pico_Write(Connection *conn, void *data, ssize_t len);
/*
* Close a Connection - Called from SocketTap