Vodafone K3770/K3772-Z modems driver & networking library

Dependencies:   Socket

This library is deprecated. Please use the newest production branch of the library from https://mbed.org/users/mbed_official/code/VodafoneUSBModem/

Committer:
donatien
Date:
Fri Aug 17 15:21:55 2012 +0000
Revision:
0:bd5343539e38
Initial public commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
donatien 0:bd5343539e38 1 /* Copyright (C) 2012 mbed.org, MIT License
donatien 0:bd5343539e38 2 *
donatien 0:bd5343539e38 3 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
donatien 0:bd5343539e38 4 * and associated documentation files (the "Software"), to deal in the Software without restriction,
donatien 0:bd5343539e38 5 * including without limitation the rights to use, copy, modify, merge, publish, distribute,
donatien 0:bd5343539e38 6 * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
donatien 0:bd5343539e38 7 * furnished to do so, subject to the following conditions:
donatien 0:bd5343539e38 8 *
donatien 0:bd5343539e38 9 * The above copyright notice and this permission notice shall be included in all copies or
donatien 0:bd5343539e38 10 * substantial portions of the Software.
donatien 0:bd5343539e38 11 *
donatien 0:bd5343539e38 12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
donatien 0:bd5343539e38 13 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
donatien 0:bd5343539e38 14 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
donatien 0:bd5343539e38 15 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
donatien 0:bd5343539e38 16 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
donatien 0:bd5343539e38 17 */
donatien 0:bd5343539e38 18
donatien 0:bd5343539e38 19 #ifndef LWIPOPTS_H
donatien 0:bd5343539e38 20 #define LWIPOPTS_H
donatien 0:bd5343539e38 21
donatien 0:bd5343539e38 22 #include "lwipopts_conf.h"
donatien 0:bd5343539e38 23
donatien 0:bd5343539e38 24 // Operating System
donatien 0:bd5343539e38 25 #define NO_SYS 0
donatien 0:bd5343539e38 26
donatien 0:bd5343539e38 27 #if NO_SYS == 0
donatien 0:bd5343539e38 28 #include "cmsis_os.h"
donatien 0:bd5343539e38 29
donatien 0:bd5343539e38 30 #define LWIP_RAW 0
donatien 0:bd5343539e38 31
donatien 0:bd5343539e38 32 #define TCPIP_MBOX_SIZE 6
donatien 0:bd5343539e38 33 #define DEFAULT_TCP_RECVMBOX_SIZE 6
donatien 0:bd5343539e38 34 #define DEFAULT_UDP_RECVMBOX_SIZE 6
donatien 0:bd5343539e38 35 #define DEFAULT_RAW_RECVMBOX_SIZE 6
donatien 0:bd5343539e38 36 #define DEFAULT_ACCEPTMBOX_SIZE 6
donatien 0:bd5343539e38 37
donatien 0:bd5343539e38 38 #define TCPIP_THREAD_STACKSIZE 1024
donatien 0:bd5343539e38 39 #define TCPIP_THREAD_PRIO 1
donatien 0:bd5343539e38 40
donatien 0:bd5343539e38 41 #define DEFAULT_THREAD_STACKSIZE 512
donatien 0:bd5343539e38 42
donatien 0:bd5343539e38 43 #define MEMP_NUM_SYS_TIMEOUT 16
donatien 0:bd5343539e38 44 #endif
donatien 0:bd5343539e38 45
donatien 0:bd5343539e38 46 // 32-bit alignment
donatien 0:bd5343539e38 47 #define MEM_ALIGNMENT 4
donatien 0:bd5343539e38 48
donatien 0:bd5343539e38 49 #define MEM_SIZE 16362
donatien 0:bd5343539e38 50
donatien 0:bd5343539e38 51 #define PBUF_POOL_SIZE 5
donatien 0:bd5343539e38 52 #define MEMP_NUM_TCP_PCB_LISTEN 4
donatien 0:bd5343539e38 53 #define MEMP_NUM_TCP_PCB 4
donatien 0:bd5343539e38 54 #define MEMP_NUM_PBUF 8
donatien 0:bd5343539e38 55
donatien 0:bd5343539e38 56 #define TCP_QUEUE_OOSEQ 0
donatien 0:bd5343539e38 57 #define TCP_OVERSIZE 0
donatien 0:bd5343539e38 58
donatien 0:bd5343539e38 59 #define LWIP_DHCP 1
donatien 0:bd5343539e38 60 #define LWIP_DNS 1
donatien 0:bd5343539e38 61
donatien 0:bd5343539e38 62 #define LWIP_COMPAT_SOCKETS 0
donatien 0:bd5343539e38 63 #define LWIP_POSIX_SOCKETS_IO_NAMES 0
donatien 0:bd5343539e38 64 #define LWIP_SO_RCVTIMEO 1
donatien 0:bd5343539e38 65 #define LWIP_TCP_KEEPALIVE 1
donatien 0:bd5343539e38 66
donatien 0:bd5343539e38 67 // Debug Options
donatien 0:bd5343539e38 68 // #define LWIP_DEBUG
donatien 0:bd5343539e38 69 #define UDP_LPC_EMAC LWIP_DBG_OFF
donatien 0:bd5343539e38 70 #define SYS_DEBUG LWIP_DBG_OFF
donatien 0:bd5343539e38 71 #define PPP_DEBUG LWIP_DBG_OFF
donatien 0:bd5343539e38 72 #define IP_DEBUG LWIP_DBG_OFF
donatien 0:bd5343539e38 73 #define MEM_DEBUG LWIP_DBG_OFF
donatien 0:bd5343539e38 74 #define MEMP_DEBUG LWIP_DBG_OFF
donatien 0:bd5343539e38 75 #define PBUF_DEBUG LWIP_DBG_OFF
donatien 0:bd5343539e38 76 #define API_LIB_DEBUG LWIP_DBG_OFF
donatien 0:bd5343539e38 77 #define API_MSG_DEBUG LWIP_DBG_OFF
donatien 0:bd5343539e38 78 #define TCPIP_DEBUG LWIP_DBG_OFF
donatien 0:bd5343539e38 79 #define SOCKETS_DEBUG LWIP_DBG_OFF
donatien 0:bd5343539e38 80 #define TCP_DEBUG LWIP_DBG_OFF
donatien 0:bd5343539e38 81 #define TCP_INPUT_DEBUG LWIP_DBG_OFF
donatien 0:bd5343539e38 82 #define TCP_FR_DEBUG LWIP_DBG_OFF
donatien 0:bd5343539e38 83 #define TCP_RTO_DEBUG LWIP_DBG_OFF
donatien 0:bd5343539e38 84 #define TCP_CWND_DEBUG LWIP_DBG_OFF
donatien 0:bd5343539e38 85 #define TCP_WND_DEBUG LWIP_DBG_OFF
donatien 0:bd5343539e38 86 #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF
donatien 0:bd5343539e38 87 #define TCP_RST_DEBUG LWIP_DBG_OFF
donatien 0:bd5343539e38 88 #define TCP_QLEN_DEBUG LWIP_DBG_OFF
donatien 0:bd5343539e38 89 #define ETHARP_DEBUG LWIP_DBG_OFF
donatien 0:bd5343539e38 90 #define NETIF_DEBUG LWIP_DBG_OFF
donatien 0:bd5343539e38 91 #define DHCP_DEBUG LWIP_DBG_OFF
donatien 0:bd5343539e38 92
donatien 0:bd5343539e38 93 #ifdef LWIP_DEBUG
donatien 0:bd5343539e38 94 #define MEMP_OVERFLOW_CHECK 1
donatien 0:bd5343539e38 95 #define MEMP_SANITY_CHECK 1
donatien 0:bd5343539e38 96 #else
donatien 0:bd5343539e38 97 #define LWIP_STATS 0
donatien 0:bd5343539e38 98 #endif
donatien 0:bd5343539e38 99
donatien 0:bd5343539e38 100 #define LWIP_PLATFORM_BYTESWAP 1
donatien 0:bd5343539e38 101
donatien 0:bd5343539e38 102 #if LWIP_TRANSPORT_ETHERNET
donatien 0:bd5343539e38 103
donatien 0:bd5343539e38 104 /* MSS should match the hardware packet size */
donatien 0:bd5343539e38 105 #define TCP_MSS 1460
donatien 0:bd5343539e38 106 #define TCP_SND_BUF (2 * TCP_MSS)
donatien 0:bd5343539e38 107 #define TCP_WND (2 * TCP_MSS)
donatien 0:bd5343539e38 108 #define TCP_SND_QUEUELEN (2 * TCP_SND_BUF/TCP_MSS)
donatien 0:bd5343539e38 109
donatien 0:bd5343539e38 110 // Broadcast
donatien 0:bd5343539e38 111 #define IP_SOF_BROADCAST 1
donatien 0:bd5343539e38 112 #define IP_SOF_BROADCAST_RECV 1
donatien 0:bd5343539e38 113
donatien 0:bd5343539e38 114 #define LWIP_BROADCAST_PING 1
donatien 0:bd5343539e38 115
donatien 0:bd5343539e38 116 #define LWIP_CHECKSUM_ON_COPY 1
donatien 0:bd5343539e38 117
donatien 0:bd5343539e38 118 #define LWIP_NETIF_HOSTNAME 1
donatien 0:bd5343539e38 119 #define LWIP_NETIF_STATUS_CALLBACK 1
donatien 0:bd5343539e38 120
donatien 0:bd5343539e38 121 #elif LWIP_TRANSPORT_PPP
donatien 0:bd5343539e38 122
donatien 0:bd5343539e38 123 #define TCP_SND_BUF (3 * 536)
donatien 0:bd5343539e38 124 #define TCP_WND (2 * 536)
donatien 0:bd5343539e38 125
donatien 0:bd5343539e38 126 #define LWIP_ARP 0
donatien 0:bd5343539e38 127
donatien 0:bd5343539e38 128 #define PPP_SUPPORT 1
donatien 0:bd5343539e38 129 #define CHAP_SUPPORT 1
donatien 0:bd5343539e38 130 #define PAP_SUPPORT 1
donatien 0:bd5343539e38 131 #define PPP_THREAD_STACKSIZE 4*192
donatien 0:bd5343539e38 132 #define PPP_THREAD_PRIO 0
donatien 0:bd5343539e38 133
donatien 0:bd5343539e38 134 #define MAXNAMELEN 64 /* max length of hostname or name for auth */
donatien 0:bd5343539e38 135 #define MAXSECRETLEN 64
donatien 0:bd5343539e38 136
donatien 0:bd5343539e38 137 #else
donatien 0:bd5343539e38 138 #error A transport mechanism (Ethernet or PPP) must be defined
donatien 0:bd5343539e38 139 #endif
donatien 0:bd5343539e38 140
donatien 0:bd5343539e38 141 #endif /* LWIPOPTS_H_ */