add the support of the Socket API

This commit is contained in:
Stefan Lankes 2011-06-06 21:45:10 +02:00
parent 7ecdc87d89
commit 3b79af56a3
3 changed files with 14 additions and 36 deletions

View file

@ -1,4 +1,4 @@
C_source := err.c
C_source := api_lib.c api_msg.c err.c netbuf.c netifapi.c sockets.c tcpip.c
MODULE := lwip_src_api
include $(TOPDIR)/Makefile.inc

View file

@ -3,6 +3,9 @@
#include <asm/tasks.h>
#include <metalsvm/mailbox.h>
#include <metalsvm/errno.h>
#define EWOULDBLOCK EAGAIN /* Operation would block */
typedef sem_t sys_mutex_t;

View file

@ -9,21 +9,15 @@
*/
#define NO_SYS 0
/**
* NO_SYS_NO_TIMERS==1: Drop support for sys_timeout when NO_SYS==1
* Mainly for compatibility to old versions.
*/
#define NO_SYS_NO_TIMERS 0
/**
* LWIP_SOCKET==1: Enable Socket API (require to use sockets.c)
*/
#define LWIP_SOCKET 0
#define LWIP_SOCKET 1
/**
* LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c)
*/
#define LWIP_NETCONN 0
#define LWIP_NETCONN 1
/**
* LWIP_DHCP==1: Enable DHCP module.
@ -40,29 +34,10 @@
*/
#define LWIP_TCP 1
/**
* TCP_QUEUE_OOSEQ==1: TCP will queue segments that arrive out of order.
* Define to 0 if your device is low on memory.
*/
#ifndef TCP_QUEUE_OOSEQ
#define TCP_QUEUE_OOSEQ 0
#endif
/**
* TCP_SND_BUF: TCP sender buffer space (bytes).
*/
#ifndef TCP_SND_BUF
#define TCP_SND_BUF 2048
#endif
/**
* TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least
* as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work.
*/
#ifndef TCP_SND_QUEUELEN
#define TCP_SND_QUEUELEN ((4 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS))
#endif
/**
* LWIP_BROADCAST_PING==1: respond to broadcast pings (default is unicast only)
@ -74,22 +49,22 @@
*/
#define LWIP_MULTICAST_PING 1
/**
* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active timeouts.
* (requires NO_SYS==0)
*/
#define MEMP_NUM_SYS_TIMEOUT 7
/**
* LWIP_HAVE_LOOPIF==1: Support loop interface (127.0.0.1) and loopif.c
*/
#define LWIP_HAVE_LOOPIF 0
#define LWIP_HAVE_LOOPIF 1
/**
* LWIP_NETIF_LOOPBACK==1: Support sending packets with a destination IP
* address equal to the netif IP address, looping them back up the stack.
*/
#define LWIP_NETIF_LOOPBACK 0
/**
* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active timeouts.
* (requires NO_SYS==0)
*/
#define MEMP_NUM_SYS_TIMEOUT 7
#define LWIP_NETIF_LOOPBACK 1
/**
* LWIP_CHECKSUM_ON_COPY==1: Calculate checksum when copying data from