mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-23 16:47:05 +08:00
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:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user