summaryrefslogtreecommitdiff
path: root/netcon
diff options
context:
space:
mode:
Diffstat (limited to 'netcon')
-rw-r--r--netcon/NetconEthernetTap.cpp5
-rwxr-xr-xnetcon/intercept.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/netcon/NetconEthernetTap.cpp b/netcon/NetconEthernetTap.cpp
index 0b5b0727..538ae0be 100644
--- a/netcon/NetconEthernetTap.cpp
+++ b/netcon/NetconEthernetTap.cpp
@@ -307,7 +307,7 @@ void NetconEthernetTap::closeAll()
closeConnection(tcp_connections.front());
}
-#define ZT_LWIP_TCP_TIMER_INTERVAL 5
+#define ZT_LWIP_TCP_TIMER_INTERVAL 1
void NetconEthernetTap::threadMain()
throw()
@@ -344,6 +344,7 @@ void NetconEthernetTap::threadMain()
if (since_tcp >= ZT_LWIP_TCP_TIMER_INTERVAL) {
prev_tcp_time = now;
lwipstack->tcp_tmr();
+ //fprintf(stderr, "tcp_tmr\n");
} else {
tcp_remaining = ZT_LWIP_TCP_TIMER_INTERVAL - since_tcp;
}
@@ -353,6 +354,7 @@ void NetconEthernetTap::threadMain()
} else {
etharp_remaining = ARP_TMR_INTERVAL - since_etharp;
}
+ //fprintf(stderr, "poll_wait_time = %d\n", (unsigned long)std::min(tcp_remaining,etharp_remaining));
_phy.poll((unsigned long)std::min(tcp_remaining,etharp_remaining));
}
closeAll();
@@ -399,6 +401,7 @@ void NetconEthernetTap::phyOnFileDescriptorActivity(PhySocket *sock,void **uptr,
now space on the buffer */
if(sndbuf == 0) {
_phy.setNotifyReadable(sock, false);
+ lwipstack->_tcp_output(conn->pcb);
return;
}
diff --git a/netcon/intercept.c b/netcon/intercept.c
index b79340e5..ba3e9bbf 100755
--- a/netcon/intercept.c
+++ b/netcon/intercept.c
@@ -137,7 +137,7 @@ static int is_initialized = 0;
static int fdret_sock; // used for fd-transfers
static int newfd; // used for "this_end" socket
-static char* af_sock_name = "/tmp/.ztnc_8056c2e21c000001";
+static char* af_sock_name = "/tmp/.ztnc_e5cd7a9e1c5311ab";
static char* logfilename = "intercept.log";
FILE *logfile = NULL;
static char* logmode = "a";
@@ -791,7 +791,7 @@ int listen(LISTEN_SIG)
return(reallisten(sockfd, backlog));
char cmd[BUF_SZ];
- //dwr("listen(%d)\n", sockfd);
+ dwr("listen(%d)\n", sockfd);
/* Assemble and route command */
memset(cmd, '\0', BUF_SZ);
struct listen_st rpc_st;