summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/lwipopts.h6
-rw-r--r--netcon/NetconEthernetTap.cpp12
-rw-r--r--netcon/NetconEthernetTap.hpp2
3 files changed, 7 insertions, 13 deletions
diff --git a/ext/lwipopts.h b/ext/lwipopts.h
index 97d28255..78ec1f9d 100644
--- a/ext/lwipopts.h
+++ b/ext/lwipopts.h
@@ -71,7 +71,7 @@
/* these are originally defined in tcp_impl.h */
#ifndef TCP_TMR_INTERVAL
/* The TCP timer interval in milliseconds. */
-#define TCP_TMR_INTERVAL 250
+#define TCP_TMR_INTERVAL 20
#endif /* TCP_TMR_INTERVAL */
#ifndef TCP_FAST_INTERVAL
@@ -113,7 +113,7 @@
------------------------------------------------------------------------------*/
-#define LWIP_CHKSUM_ALGORITHM 2
+#define LWIP_CHKSUM_ALGORITHM 0
/**
@@ -146,7 +146,7 @@
* MEMP_NUM_RAW_PCB: Number of raw connection PCBs
* (requires the LWIP_RAW option)
*/
-#define MEMP_NUM_RAW_PCB 32
+#define MEMP_NUM_RAW_PCB 128
/**
* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
diff --git a/netcon/NetconEthernetTap.cpp b/netcon/NetconEthernetTap.cpp
index e4c063b0..0b5b0727 100644
--- a/netcon/NetconEthernetTap.cpp
+++ b/netcon/NetconEthernetTap.cpp
@@ -308,7 +308,6 @@ void NetconEthernetTap::closeAll()
}
#define ZT_LWIP_TCP_TIMER_INTERVAL 5
-//#define ZT_LWIP_ARP_TIMER_INTERVAL 5000
void NetconEthernetTap::threadMain()
throw()
@@ -328,13 +327,9 @@ void NetconEthernetTap::threadMain()
fprintf(stderr, "- IP_REASSEMBLY = %d\n", IP_REASSEMBLY);
fprintf(stderr, "- TCP_WND = %d\n", TCP_WND);
fprintf(stderr, "- TCP_MSS = %d\n", TCP_MSS);
- fprintf(stderr, "- NO_SYS = %d\n", NO_SYS);
- fprintf(stderr, "- LWIP_SOCKET = %d\n", LWIP_SOCKET);
- fprintf(stderr, "- LWIP_NETCONN = %d\n", LWIP_NETCONN);
fprintf(stderr, "- ARP_TMR_INTERVAL = %d\n", ARP_TMR_INTERVAL);
fprintf(stderr, "- TCP_TMR_INTERVAL = %d\n", TCP_TMR_INTERVAL);
fprintf(stderr, "- IP_TMR_INTERVAL = %d\n", IP_TMR_INTERVAL);
- fprintf(stderr, "- DEFAULT_READ_BUFFER_SIZE = %d\n", DEFAULT_READ_BUFFER_SIZE);
// Main timer loop
while (_run) {
@@ -670,7 +665,6 @@ err_t NetconEthernetTap::nc_recved(void *arg, struct tcp_pcb *tpcb, struct pbuf
fprintf(stderr, "nc_recved(): unable to write entire pbuf to buffer\n");
}
l->tap->lwipstack->_tcp_recved(tpcb, n); // TODO: would it be more efficient to call this once at the end?
- fprintf(stderr, "nc_recved(): streamSend(%d bytes)\n", n);
}
else {
fprintf(stderr, "nc_recved(): No data written to intercept buffer\n");
@@ -830,8 +824,8 @@ void NetconEthernetTap::handle_retval(PhySocket *sock, void **uptr, unsigned cha
TcpConnection *conn = (TcpConnection*)*uptr;
if(conn->pending) {
memcpy(&(conn->perceived_fd), &buf[1], sizeof(int));
- fprintf(stderr, "handle_retval(): Mapping [our=%d -> their=%d]\n",
- _phy.getDescriptor(conn->dataSock), conn->perceived_fd);
+ //fprintf(stderr, "handle_retval(): Mapping [our=%d -> their=%d]\n",
+ //_phy.getDescriptor(conn->dataSock), conn->perceived_fd);
conn->pending = false;
}
}
@@ -862,7 +856,7 @@ void NetconEthernetTap::handle_socket(PhySocket *sock, void **uptr, struct socke
new_conn->their_fd = fds[1];
tcp_connections.push_back(new_conn);
sock_fd_write(_phy.getDescriptor(sock), fds[1]);
- fprintf(stderr, "handle_socket(): socketpair = { our=%d, their=%d}\n", fds[0], fds[1]);
+ //fprintf(stderr, "handle_socket(): socketpair = { our=%d, their=%d}\n", fds[0], fds[1]);
/* Once the client tells us what its fd is for the other end,
we can then complete the mapping */
new_conn->pending = true;
diff --git a/netcon/NetconEthernetTap.hpp b/netcon/NetconEthernetTap.hpp
index bac707c8..d2ff431e 100644
--- a/netcon/NetconEthernetTap.hpp
+++ b/netcon/NetconEthernetTap.hpp
@@ -185,7 +185,7 @@ static err_t low_level_output(struct netif *netif, struct pbuf *p)
{
//fprintf(stderr, "low_level_output()\n");
struct pbuf *q;
- char buf[ZT1_MAX_MTU+32];
+ char buf[ZT_MAX_MTU+32];
char *bufptr;
int tot_len = 0;