Port of LwIP performed by Ralf in 2010. Not recommended for use with recent mbed libraries, but good demos of raw LwIP possible
Dependents: LwIP_raw_API_serverExample tiny-dtls
Core/lwipopts.h@0:0791c1fece8e, 2012-09-18 (annotated)
- Committer:
- RodColeman
- Date:
- Tue Sep 18 14:41:24 2012 +0000
- Revision:
- 0:0791c1fece8e
[mbed] converted /Eth_TCP_Wei_Server/lwip
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
RodColeman | 0:0791c1fece8e | 1 | #ifndef LWIPOPTS_H |
RodColeman | 0:0791c1fece8e | 2 | #define LWIPOPTS_H |
RodColeman | 0:0791c1fece8e | 3 | |
RodColeman | 0:0791c1fece8e | 4 | #include <string.h> |
RodColeman | 0:0791c1fece8e | 5 | #include <stdlib.h> |
RodColeman | 0:0791c1fece8e | 6 | //#include <mbed.h> |
RodColeman | 0:0791c1fece8e | 7 | #include <stdio.h> |
RodColeman | 0:0791c1fece8e | 8 | |
RodColeman | 0:0791c1fece8e | 9 | #ifdef __cplusplus |
RodColeman | 0:0791c1fece8e | 10 | using namespace std; |
RodColeman | 0:0791c1fece8e | 11 | #endif |
RodColeman | 0:0791c1fece8e | 12 | |
RodColeman | 0:0791c1fece8e | 13 | // Application specific lwIP Options. |
RodColeman | 0:0791c1fece8e | 14 | #define IPv6 0 |
RodColeman | 0:0791c1fece8e | 15 | #define NO_SYS 1 |
RodColeman | 0:0791c1fece8e | 16 | #define LWIP_ARP 1 |
RodColeman | 0:0791c1fece8e | 17 | #define LWIP_RAW 0 |
RodColeman | 0:0791c1fece8e | 18 | #define LWIP_UDP 1 |
RodColeman | 0:0791c1fece8e | 19 | #define LWIP_TCP 1 |
RodColeman | 0:0791c1fece8e | 20 | #define LWIP_DNS 1 |
RodColeman | 0:0791c1fece8e | 21 | #define LWIP_DHCP 1 |
RodColeman | 0:0791c1fece8e | 22 | #define LWIP_IGMP 0 |
RodColeman | 0:0791c1fece8e | 23 | #define LWIP_SNMP 0 |
RodColeman | 0:0791c1fece8e | 24 | #define LWIP_SOCKET 0 |
RodColeman | 0:0791c1fece8e | 25 | #define LWIP_NETCONN 0 |
RodColeman | 0:0791c1fece8e | 26 | #define LWIP_AUTOIP 0 |
RodColeman | 0:0791c1fece8e | 27 | #define LWIP_CALLBACK_API 1 |
RodColeman | 0:0791c1fece8e | 28 | |
RodColeman | 0:0791c1fece8e | 29 | #define MEM_LIBC_MALLOC 0 |
RodColeman | 0:0791c1fece8e | 30 | #define MEMP_MEM_MALLOC 1 |
RodColeman | 0:0791c1fece8e | 31 | #define MEM_ALIGNMENT 4 |
RodColeman | 0:0791c1fece8e | 32 | //#define MEM_SIZE 5000 |
RodColeman | 0:0791c1fece8e | 33 | #define MEM_SIZE 10000 |
RodColeman | 0:0791c1fece8e | 34 | //#define MEM_SIZE (EMAC_MEM_SIZE - (2 * SIZEOF_STRUCT_MEM) - MEM_ALIGNMENT) |
RodColeman | 0:0791c1fece8e | 35 | #define MEM_POSITION __attribute((section("AHBSRAM1"),aligned)) |
RodColeman | 0:0791c1fece8e | 36 | // EMAC_MEM_ADDR |
RodColeman | 0:0791c1fece8e | 37 | |
RodColeman | 0:0791c1fece8e | 38 | #define ARP_QUEUEING 0 |
RodColeman | 0:0791c1fece8e | 39 | #define LWIP_NETIF_HOSTNAME 1 |
RodColeman | 0:0791c1fece8e | 40 | |
RodColeman | 0:0791c1fece8e | 41 | #define ARP_TABLE_SIZE 4 |
RodColeman | 0:0791c1fece8e | 42 | |
RodColeman | 0:0791c1fece8e | 43 | #define DNS_TABLE_SIZE 1 |
RodColeman | 0:0791c1fece8e | 44 | #define DNS_USES_STATIC_BUF 0 |
RodColeman | 0:0791c1fece8e | 45 | // 0 - Stack |
RodColeman | 0:0791c1fece8e | 46 | // 1 - RW-MEM |
RodColeman | 0:0791c1fece8e | 47 | // 2 - Heap |
RodColeman | 0:0791c1fece8e | 48 | |
RodColeman | 0:0791c1fece8e | 49 | #define IP_FRAG_USES_STATIC_BUF 0 |
RodColeman | 0:0791c1fece8e | 50 | #define LWIP_STATS 0 |
RodColeman | 0:0791c1fece8e | 51 | |
RodColeman | 0:0791c1fece8e | 52 | #define DNS_LOCAL_HOSTLIST_IS_DYNAMIC 1 |
RodColeman | 0:0791c1fece8e | 53 | |
RodColeman | 0:0791c1fece8e | 54 | #define TCP_SND_BUF 2000 |
RodColeman | 0:0791c1fece8e | 55 | #define TCP_MSS 0x276 |
RodColeman | 0:0791c1fece8e | 56 | //0x300 |
RodColeman | 0:0791c1fece8e | 57 | //#define TCP_SND_QUEUELEN (2 * TCP_SND_BUF/TCP_MSS) |
RodColeman | 0:0791c1fece8e | 58 | #define TCP_SND_QUEUELEN 16 |
RodColeman | 0:0791c1fece8e | 59 | #define MEMP_NUM_TCP_PCB 5 |
RodColeman | 0:0791c1fece8e | 60 | #define MEMP_NUM_TCP_PCB_LISTEN 8 |
RodColeman | 0:0791c1fece8e | 61 | #define MEMP_NUM_TCP_SEG 20 |
RodColeman | 0:0791c1fece8e | 62 | #define MEMP_NUM_PBUF 16 |
RodColeman | 0:0791c1fece8e | 63 | #define PBUF_POOL_SIZE 6 |
RodColeman | 0:0791c1fece8e | 64 | |
RodColeman | 0:0791c1fece8e | 65 | #ifndef HOSTNAME |
RodColeman | 0:0791c1fece8e | 66 | #define HOSTNAME "mbed-c3p0" |
RodColeman | 0:0791c1fece8e | 67 | #endif |
RodColeman | 0:0791c1fece8e | 68 | |
RodColeman | 0:0791c1fece8e | 69 | //#define LWIP_DEBUG 1 |
RodColeman | 0:0791c1fece8e | 70 | //#define LWIP_DBG_TYPES_ON ~0x0 |
RodColeman | 0:0791c1fece8e | 71 | //#define LWIP_DBG_MIN_LEVEL 0 |
RodColeman | 0:0791c1fece8e | 72 | //#define MEM_DEBUG (LWIP_DBG_ON | LWIP_DBG_LEVEL_WARNING) |
RodColeman | 0:0791c1fece8e | 73 | //#define TCP_INPUT_DEBUG (LWIP_DBG_ON | LWIP_DBG_LEVEL_WARNING) |
RodColeman | 0:0791c1fece8e | 74 | //#define TCP_OUTPUT_DEBUG (LWIP_DBG_ON | LWIP_DBG_LEVEL_WARNING) |
RodColeman | 0:0791c1fece8e | 75 | //#define NETIF_DEBUG (LWIP_DBG_ON | LWIP_DBG_LEVEL_WARNING) |
RodColeman | 0:0791c1fece8e | 76 | //#define DHCP_DEBUG (LWIP_DBG_ON | LWIP_DBG_LEVEL_WARNING) |
RodColeman | 0:0791c1fece8e | 77 | //#define IP_DEBUG (LWIP_DBG_ON | LWIP_DBG_LEVEL_WARNING) |
RodColeman | 0:0791c1fece8e | 78 | //#define TCP_DEBUG (LWIP_DBG_ON | LWIP_DBG_LEVEL_WARNING) |
RodColeman | 0:0791c1fece8e | 79 | //#define TCP_CWND_DEBUG (LWIP_DBG_ON | LWIP_DBG_LEVEL_WARNING) |
RodColeman | 0:0791c1fece8e | 80 | |
RodColeman | 0:0791c1fece8e | 81 | #endif |