Included switch LWIP_UDPLITE (enabled by default) to switch off UDP-Lite support if not needed (reduces udp.c code size)

This commit is contained in:
goldsimon
2007-06-10 12:02:24 +00:00
parent df0e4492a7
commit 95f4c02381
6 changed files with 31 additions and 9 deletions

View File

@@ -348,6 +348,11 @@ a lot of data that needs to be copied, this should be set high. */
#define LWIP_UDP 1
#endif
/* Enable the UDP-Lite protocol (only makes sense if LWIP_UDP=1) */
#ifndef LWIP_UDPLITE
#define LWIP_UDPLITE 1
#endif
#ifndef UDP_TTL
#define UDP_TTL (IP_DEFAULT_TTL)
#endif

View File

@@ -68,9 +68,11 @@ struct udp_pcb {
/* ports are in host byte order */
u16_t local_port, remote_port;
#if LWIP_UDPLITE
/* used for UDP_LITE only */
u16_t chksum_len;
#endif /* LWIP_UDPLITE */
/* addr and port are in same byte order as in the pcb */
void (* recv)(void *arg, struct udp_pcb *pcb, struct pbuf *p,
struct ip_addr *addr, u16_t port);