diff options
author | Joseph Henry <joseph.henry@zerotier.com> | 2015-09-24 15:30:07 -0400 |
---|---|---|
committer | Joseph Henry <joseph.henry@zerotier.com> | 2015-09-24 15:30:07 -0400 |
commit | 851e4c667f76c69e54aba3ee44acf9c384b94ecc (patch) | |
tree | a288e5a2e6ebd727df4266ae0437d23c3a8630bb | |
parent | 0027a1e152962ae2090c0cafeb085b72114a6330 (diff) | |
download | infinitytier-851e4c667f76c69e54aba3ee44acf9c384b94ecc.tar.gz infinitytier-851e4c667f76c69e54aba3ee44acf9c384b94ecc.zip |
Minor changes
-rw-r--r-- | netcon/LWIPStack.hpp | 2 | ||||
-rw-r--r-- | netcon/NetconEthernetTap.cpp | 9 | ||||
-rw-r--r-- | netcon/NetconService.hpp | 2 |
3 files changed, 8 insertions, 5 deletions
diff --git a/netcon/LWIPStack.hpp b/netcon/LWIPStack.hpp index 9bf3b613..b93de87d 100644 --- a/netcon/LWIPStack.hpp +++ b/netcon/LWIPStack.hpp @@ -197,7 +197,7 @@ public: ~LWIPStack() { - if (lebref) + if (libref) dlclose(libref); } }; diff --git a/netcon/NetconEthernetTap.cpp b/netcon/NetconEthernetTap.cpp index 07121a44..36cea177 100644 --- a/netcon/NetconEthernetTap.cpp +++ b/netcon/NetconEthernetTap.cpp @@ -30,6 +30,7 @@ #include <algorithm> #include <utility> #include <dlfcn.h> +//#include <sys/types.h> #include "NetconEthernetTap.hpp" @@ -165,6 +166,8 @@ std::vector<InetAddress> NetconEthernetTap::ips() const void NetconEthernetTap::put(const MAC &from,const MAC &to,unsigned int etherType,const void *data,unsigned int len) { + //fprintf(stderr, "__put(): tid = %d\n", gettid()); + struct pbuf *p,*q; //fprintf(stderr, "_put(%s,%s,%.4x,[data],%u)\n",from.toString().c_str(),to.toString().c_str(),etherType,len); if (!_enabled) @@ -624,7 +627,7 @@ err_t NetconEthernetTap::nc_recved(void *arg, struct tcp_pcb *tpcb, struct pbuf if(n < p->len) { fprintf(stderr, "nc_recved(): unable to write entire pbuf to buffer\n"); } - tap->lwipstack->tcp_recved(tpcb, n); + tap->lwipstack->tcp_recved(tpcb, n); // TODO: would it be more efficient to call this once at the end? } else { fprintf(stderr, "nc_recved(): No data written to intercept buffer\n"); @@ -673,7 +676,7 @@ void NetconEthernetTap::nc_err(void *arg, err_t err) err_t NetconEthernetTap::nc_sent(void* arg, struct tcp_pcb *tpcb, u16_t len) { //fprintf(stderr, "nc_sent\n"); - return len; + return ERR_OK; } /* @@ -696,7 +699,7 @@ err_t NetconEthernetTap::nc_connected(void *arg, struct tcp_pcb *tpcb, err_t err tap->send_return_value(tap->clients[i],err); } } - return err; + return ERR_OK; } diff --git a/netcon/NetconService.hpp b/netcon/NetconService.hpp index ab093b07..451d10cb 100644 --- a/netcon/NetconService.hpp +++ b/netcon/NetconService.hpp @@ -83,7 +83,7 @@ namespace ZeroTier { class NetconClient { public: - vector<NetconConnection*> connections; + vector<NetconConnection*> connections; // TODO: Switch to storing the actual object here int tid; bool waiting_for_retval; |