mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-26 01:57:01 +08:00
if LWIP_TCP is 0 do not link in TCP code.putting ugly ifdefs in api and core :(.Also only udp_init if LWIP_UDP is on
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
#include "lwip/memp.h"
|
||||
|
||||
#include "lwip/tcp.h"
|
||||
|
||||
#if LWIP_TCP
|
||||
|
||||
/* Incremented every coarse grained timer shot
|
||||
(typically every 500 ms, determined by TCP_COARSE_TIMEOUT). */
|
||||
@@ -1168,6 +1168,7 @@ tcp_pcbs_sane(void)
|
||||
return 1;
|
||||
}
|
||||
#endif /* TCP_DEBUG */
|
||||
#endif /* LWIP_TCP */
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
#include "lwip/stats.h"
|
||||
|
||||
#include "arch/perf.h"
|
||||
|
||||
#if LWIP_TCP
|
||||
/* These variables are global to all functions involved in the input
|
||||
processing of TCP segments. They are set by the tcp_input()
|
||||
function. */
|
||||
@@ -1135,5 +1135,6 @@ tcp_parseopt(struct tcp_pcb *pcb)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* LWIP_TCP */
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
#include "lwip/stats.h"
|
||||
|
||||
|
||||
#if LWIP_TCP
|
||||
#define MIN(x,y) (x) < (y)? (x): (y)
|
||||
|
||||
|
||||
@@ -580,7 +580,7 @@ tcp_rexmit(struct tcp_pcb *pcb)
|
||||
tcp_output(pcb);
|
||||
|
||||
}
|
||||
|
||||
#endif /* LWIP_TCP */
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
/*static*/ struct udp_pcb *udp_pcbs = NULL;
|
||||
|
||||
static struct udp_pcb *pcb_cache = NULL;
|
||||
#endif /* LWIP_UDP */
|
||||
|
||||
#if UDP_DEBUG
|
||||
int udp_debug_print(struct udp_hdr *udphdr);
|
||||
@@ -68,12 +67,9 @@ int udp_debug_print(struct udp_hdr *udphdr);
|
||||
void
|
||||
udp_init(void)
|
||||
{
|
||||
#if LWIP_UDP
|
||||
udp_pcbs = pcb_cache = NULL;
|
||||
#endif /* LWIP_UDP */
|
||||
}
|
||||
|
||||
#if LWIP_UDP
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* udp_lookup:
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user