Skip to content

Commit f78b4d3

Browse files
authored
Merge pull request #807 from uyjulian/tcpip_cfg_cond
Make tcpip.h preprocessor definitions conditional
2 parents dc136c5 + 9b1c82b commit f78b4d3

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

common/include/tcpip.h

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,21 +78,51 @@
7878

7979
/*** Taken from src/include/lwip/opt.h. If changes were made to lwipopts.h, please update this section.
8080
Some settings affect the fields present in structures like struct netif! ****/
81+
#ifndef MEMP_NUM_UDP_PCB
8182
#define MEMP_NUM_UDP_PCB 4
83+
#endif
84+
#ifndef MEMP_NUM_TCP_PCB
8285
#define MEMP_NUM_TCP_PCB 5
86+
#endif
87+
#ifndef MEMP_NUM_NETCONN
8388
#define MEMP_NUM_NETCONN (MEMP_NUM_TCP_PCB + MEMP_NUM_UDP_PCB)
89+
#endif
90+
#ifndef LWIP_NETIF_STATUS_CALLBACK
8491
#define LWIP_NETIF_STATUS_CALLBACK 0
92+
#endif
93+
#ifndef LWIP_NETIF_LINK_CALLBACK
8594
#define LWIP_NETIF_LINK_CALLBACK 0
95+
#endif
96+
#ifndef LWIP_AUTOIP
8697
#define LWIP_AUTOIP 0
98+
#endif
99+
#ifndef LWIP_NETIF_HOSTNAME
87100
#define LWIP_NETIF_HOSTNAME 0
101+
#endif
102+
#ifndef LWIP_SNMP
88103
#define LWIP_SNMP 0
104+
#endif
105+
#ifndef LWIP_IGMP
89106
#define LWIP_IGMP 0
107+
#endif
108+
#ifndef LWIP_NETIF_HWADDRHINT
90109
#define LWIP_NETIF_HWADDRHINT 0
110+
#endif
111+
#ifndef LWIP_LOOPBACK_MAX_PBUFS
91112
#define LWIP_LOOPBACK_MAX_PBUFS 0
113+
#endif
114+
#ifndef LWIP_NUM_NETIF_CLIENT_DATA
92115
#define LWIP_NUM_NETIF_CLIENT_DATA 0
116+
#endif
117+
#ifndef LWIP_SOCKET_OFFSET
93118
#define LWIP_SOCKET_OFFSET 0
119+
#endif
120+
#ifndef LWIP_IPV6_SEND_ROUTER_SOLICIT
94121
#define LWIP_IPV6_SEND_ROUTER_SOLICIT 1
122+
#endif
123+
#ifndef DNS_MAX_SERVERS
95124
#define DNS_MAX_SERVERS 2
125+
#endif
96126

97127
/*
98128
* Copyright (c) 2001-2003 Swedish Institute of Computer Science.

0 commit comments

Comments
 (0)