]> Joshua Wise's Git repositories - netwatch.git/commitdiff
Tweak MSS up.
authorJoshua Wise <joshua@rebirth.joshuawise.com>
Tue, 11 Nov 2008 05:05:07 +0000 (00:05 -0500)
committerJoshua Wise <joshua@rebirth.joshuawise.com>
Tue, 11 Nov 2008 05:05:07 +0000 (00:05 -0500)
lwip/src/include/lwipopts.h
net/http/fsdata.c
net/http/httpd.c
net/net.c

index c2ef625f7378e4bf85af63f844f8af3794ef5ca9..0b9ebbe7f9f3bbb278b4fe8cd237dc6601fc45c7 100644 (file)
@@ -13,5 +13,6 @@
 
 #define MEM_SIZE       65536
 #define TCP_SND_BUF     2048
 
 #define MEM_SIZE       65536
 #define TCP_SND_BUF     2048
+#define TCP_MSS         2048
 
 #endif
 
 #endif
index 7195a700f3c071558c5a5fa1c5ffda2e164202b5..7e700232df9feefd68158a4941bcf31d294e1864 100644 (file)
@@ -4,8 +4,8 @@ static const unsigned char data_404_html[] =
   "</html>";
 
 static const unsigned char data_index_html[] =
   "</html>";
 
 static const unsigned char data_index_html[] =
-  "<html><head><title>NetWatch!</title></head>"
-  "<body><h1>NetWatch!</h1><iframe src=\"registers.html\" height=300></body>"
+  "<html><head><title>NetWatch</title></head>"
+  "<body><h1>NetWatch</h1><iframe src=\"registers.html\" height=100 width=600 /></body>"
   "</html>";
 
 const struct fsdata_file file_404_html[] = {{NULL, "/404.html", data_404_html, sizeof(data_404_html)}};
   "</html>";
 
 const struct fsdata_file file_404_html[] = {{NULL, "/404.html", data_404_html, sizeof(data_404_html)}};
index e8cdd53a0675c82b8a24f978021c154e9034e00a..3ecea9325566e774f888f1e8cd67b77415a919f0 100644 (file)
@@ -84,6 +84,8 @@ send_data(struct tcp_pcb *pcb, struct http_state *hs)
     len = hs->left;
     LWIP_ASSERT((len == hs->left), "hs->left did not fit into u16_t!");
   }
     len = hs->left;
     LWIP_ASSERT((len == hs->left), "hs->left did not fit into u16_t!");
   }
+  
+  outputf("send_data trying %d bytes", len);
 
   do {
     err = tcp_write(pcb, hs->file, len, 0);
 
   do {
     err = tcp_write(pcb, hs->file, len, 0);
index 8390f044e09c46640f4b1d478eb0f8783b96b28d..2022ccaa8bf1846c59261930bb9439095ec86075 100644 (file)
--- a/net/net.c
+++ b/net/net.c
@@ -45,49 +45,49 @@ void eth_poll()
                tcp_tmr();
        ticks++;
 
                tcp_tmr();
        ticks++;
 
-       if (!_nic->poll(_nic, 0))
-               return;
-       
-       _nic->packet = pkt;
-       _nic->poll(_nic, 1);
-       
-       len = _nic->packetlen;
-
-       outputf("NIC: Packet: %d bytes", len);
-               
-       p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL);
-       if (p == NULL)
+       if (_nic->poll(_nic, 0))
        {
        {
-               outputf("NIC: out of memory for packet?");
-               LINK_STATS_INC(link.memerr);
-               LINK_STATS_INC(link.drop);
-               return;
-       }
-       
-       for(q = p; q != NULL; q = q->next)
-       {
-               memcpy(q->payload, pkt+pos, q->len);
-               pos += q->len;
-       }
-
-       LINK_STATS_INC(link.recv);
+               _nic->packet = pkt;
+               _nic->poll(_nic, 1);
+               
+               len = _nic->packetlen;
+               
+               outputf("NIC: Packet: %d bytes", len);
+                       
+               p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL);
+               if (p == NULL)
+               {
+                       outputf("NIC: out of memory for packet?");
+                       LINK_STATS_INC(link.memerr);
+                       LINK_STATS_INC(link.drop);
+                       return;
+               }
        
        
-       ethhdr = p->payload;
-
-       switch (htons(ethhdr->type)) {
-       case ETHTYPE_IP:
-       case ETHTYPE_ARP:
-               if (_netif.input(p, &_netif) != ERR_OK)
+               for(q = p; q != NULL; q = q->next)
                {
                {
-                       LWIP_DEBUGF(NETIF_DEBUG, ("netdev_input: IP input error\n"));
+                       memcpy(q->payload, pkt+pos, q->len);
+                       pos += q->len;
+               }
+               
+               LINK_STATS_INC(link.recv);
+               
+               ethhdr = p->payload;
+               
+               switch (htons(ethhdr->type)) {
+               case ETHTYPE_IP:
+               case ETHTYPE_ARP:
+                       if (_netif.input(p, &_netif) != ERR_OK)
+                       {
+                               LWIP_DEBUGF(NETIF_DEBUG, ("netdev_input: IP input error\n"));
+                               pbuf_free(p);
+                       }
+                       break;
+                       
+               default:
+                       outputf("Unhandled packet type %04x input", ethhdr->type);
                        pbuf_free(p);
                        pbuf_free(p);
+                       break;
                }
                }
-               break;
-
-       default:
-               outputf("Unhandled packet type %04x input", ethhdr->type);
-               pbuf_free(p);
-               break;
        }
 }
 
        }
 }
 
This page took 0.036319 seconds and 4 git commands to generate.