mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-14 02:27:38 -07:00
initial commit
This commit is contained in:
parent
a43c3fbf2e
commit
750352836f
165 changed files with 69374 additions and 5 deletions
|
@ -44,6 +44,8 @@
|
|||
#include "../osdep/Thread.hpp"
|
||||
#include "../osdep/Phy.hpp"
|
||||
|
||||
#include "NetconService.h"
|
||||
|
||||
namespace ZeroTier {
|
||||
|
||||
class NetconEthernetTap;
|
||||
|
@ -93,12 +95,39 @@ private:
|
|||
void phyOnUnixData(PhySocket *sock,void **uptr,void *data,unsigned long len);
|
||||
void phyOnUnixWritable(PhySocket *sock,void **uptr);
|
||||
|
||||
void handle_kill_intercept(NetconIntercept* h);
|
||||
int send_return_value(NetconIntercept *h, int retval);
|
||||
|
||||
// For LWIP Callbacks
|
||||
err_t nc_poll(void* arg, struct tcp_pcb *tpcb);
|
||||
err_t nc_accept(void* arg, struct tcp_pcb *newpcb, err_t err);
|
||||
err_t nc_recved(void *arg, struct tcp_pcb *tpcb, struct pbuf *p, err_t err);
|
||||
void nc_err(void *arg, err_t err);
|
||||
void nc_close(struct tcp_pcb* tpcb);
|
||||
err_t nc_send(struct tcp_pcb *tpcb);
|
||||
err_t nc_sent(void* arg, struct tcp_pcb *tpcb, u16_t len);
|
||||
err_t nc_connected(void *arg, struct tcp_pcb *tpcb, err_t err);
|
||||
|
||||
// RPC handlers (from NetconIntercept)
|
||||
void handle_bind(NetconIntercept *h, struct bind_st *bind_rpc);
|
||||
void handle_listen(NetconIntercept *h, struct listen_st *listen_rpc);
|
||||
void handle_retval(NetconIntercept *h, unsigned char* buf);
|
||||
void handle_socket(NetconIntercept *h, struct socket_st* socket_rpc);
|
||||
void handle_connect(NetconIntercept *h, struct connect_st* connect_rpc);
|
||||
void handle_write(NetconConnection *c);
|
||||
|
||||
void (*_handler)(void *,uint64_t,const MAC &,const MAC &,unsigned int,unsigned int,const void *,unsigned int);
|
||||
void *_arg;
|
||||
|
||||
// Logging helper
|
||||
|
||||
|
||||
Phy<NetconEthernetTap *> _phy;
|
||||
PhySocket *_unixListenSocket;
|
||||
|
||||
LWIPStack *lwipstack;
|
||||
NetconService *nc_service;
|
||||
|
||||
uint64_t _nwid;
|
||||
Thread _thread;
|
||||
std::string _homePath;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue