1. Reduce the size of the heap memory to reduce the amount of memory usage 2. Change the TCP segment size 3. Disable UDP + DHCP + DNS 4. Change the configurations of the TCP/IP thread

Dependencies:   Socket lwip-eth lwip-sys lwip

Dependents:   aos_mbed

Fork of EthernetInterface by mbed official

Files at this revision

API Documentation at this revision

Comitter:
aos
Date:
Sun Feb 02 10:46:57 2014 +0000
Parent:
35:cba86db5ab96
Child:
37:b680f7e1c112
Commit message:
Disable DHCP + DNS + UDP

Changed in this revision

EthernetInterface.cpp Show annotated file Show diff for this revision Revisions of this file
Socket.lib Show annotated file Show diff for this revision Revisions of this file
lwip.lib Show annotated file Show diff for this revision Revisions of this file
lwipopts_conf.h Show annotated file Show diff for this revision Revisions of this file
--- a/EthernetInterface.cpp	Wed Oct 09 12:00:18 2013 +0100
+++ b/EthernetInterface.cpp	Sun Feb 02 10:46:57 2014 +0000
@@ -111,8 +111,9 @@
     
     int inited;
     if (use_dhcp) {
+        #if LWIP_DHCP
         dhcp_start(&lpcNetif);
-        
+        #endif
         // Wait for an IP Address
         // -1: error, 0: timeout
         inited = netif_up.wait(timeout_ms);
@@ -128,8 +129,10 @@
 
 int EthernetInterface::disconnect() {
     if (use_dhcp) {
+        #if LWIP_DHCP
         dhcp_release(&lpcNetif);
         dhcp_stop(&lpcNetif);
+        #endif
     } else {
         netif_set_down(&lpcNetif);
     }
--- a/Socket.lib	Wed Oct 09 12:00:18 2013 +0100
+++ b/Socket.lib	Sun Feb 02 10:46:57 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/Socket/#434906b5b977
+http://mbed.org/users/mbed_official/code/Socket/#92677e486349
--- a/lwip.lib	Wed Oct 09 12:00:18 2013 +0100
+++ b/lwip.lib	Sun Feb 02 10:46:57 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/lwip/#931deec14b08
+http://mbed.org/users/mbed_official/code/lwip/#5737291d43a8
--- a/lwipopts_conf.h	Wed Oct 09 12:00:18 2013 +0100
+++ b/lwipopts_conf.h	Sun Feb 02 10:46:57 2014 +0000
@@ -21,4 +21,20 @@
 
 #define LWIP_TRANSPORT_ETHERNET      1
 
+#define LWIP_UDP                     0
+#define LWIP_UDPLITE                 0
+
+#define LWIP_STATS                   0
+
+#define LWIP_ARP                     1
+#define ARP_TABLE_SIZE               10
+#define ARP_QUEUEING                 1
+#define ETHARP_TRUST_IP_MAC          1
+
+#define IP_FORWARD                   0
+#define IP_OPTIONS_ALLOWED           1
+#define IP_REASSEMBLY                0
+#define IP_FRAG                      0
+#define IP_DEFAULT_TTL               255
+
 #endif