diff --git a/Makefile.dep b/Makefile.dep index 9854b0ee87..4afce6fbeb 100644 --- a/Makefile.dep +++ b/Makefile.dep @@ -111,6 +111,9 @@ ifneq (,$(filter ieee802154,$(USEMODULE))) ifneq (,$(filter gnrc_ipv6_router_default, $(USEMODULE))) USEMODULE += gnrc_sixlowpan_router_default endif + ifneq (,$(filter lwip%, $(USEMODULE))) + USEMODULE += lwip_sixlowpan + endif endif ifneq (,$(filter gnrc_sixlowpan_default,$(USEMODULE))) @@ -354,10 +357,42 @@ ifneq (,$(filter posix_semaphore,$(USEMODULE))) USEMODULE += xtimer endif +ifneq (,$(filter lwip_sixlowpan,$(USEMODULE))) + USEMODULE += lwip_ipv6_autoconfig +endif + +ifneq (,$(filter lwip_ipv6_autoconfig,$(USEMODULE))) + USEMODULE += lwip_ipv6 +endif + +ifneq (,$(filter lwip_ipv6,$(USEMODULE))) + USEMODULE += random +endif + +ifneq (,$(filter lwip_udplite,$(USEMODULE))) + USEMODULE += lwip_udp +endif + +ifneq (,$(filter lwip_%,$(USEMODULE))) + USEMODULE += lwip +endif + ifneq (,$(filter lwip,$(USEMODULE))) USEPKG += lwip + USEMODULE += lwip_api USEMODULE += lwip_contrib USEMODULE += lwip_core + USEMODULE += lwip_netif + ifeq (,$(filter lwip_ipv4 lwip_ipv6,$(USEMODULE))) + USEMODULE += lwip_ipv4 + endif + ifeq (,$(filter lwip_tcp lwip_udp lwip_udplite,$(USEMODULE))) + USEMODULE += lwip_raw + endif +endif + +ifneq (,$(filter lwip_ppp,$(USEMODULE))) + USEMODULE += lwip_polarssl endif ifneq (,$(filter lwip_contrib,$(USEMODULE))) diff --git a/Makefile.pseudomodules b/Makefile.pseudomodules index ffd345d638..ee4ad6ec2c 100644 --- a/Makefile.pseudomodules +++ b/Makefile.pseudomodules @@ -16,6 +16,19 @@ PSEUDOMODULES += gnrc_sixlowpan_iphc_nhc PSEUDOMODULES += gnrc_pktbuf PSEUDOMODULES += log PSEUDOMODULES += log_printfnoformat +PSEUDOMODULES += lwip_arp +PSEUDOMODULES += lwip_autoip +PSEUDOMODULES += lwip_conn +PSEUDOMODULES += lwip_dhcp +PSEUDOMODULES += lwip_ethernet +PSEUDOMODULES += lwip_igmp +PSEUDOMODULES += lwip_ipv6_autoconfig +PSEUDOMODULES += lwip_raw +PSEUDOMODULES += lwip_sixlowpan +PSEUDOMODULES += lwip_stats +PSEUDOMODULES += lwip_tcp +PSEUDOMODULES += lwip_udp +PSEUDOMODULES += lwip_udplite PSEUDOMODULES += netdev_default PSEUDOMODULES += newlib PSEUDOMODULES += newlib_nano diff --git a/pkg/lwip/include/lwipopts.h b/pkg/lwip/include/lwipopts.h index 5d9d9dfac1..5e29634c34 100644 --- a/pkg/lwip/include/lwipopts.h +++ b/pkg/lwip/include/lwipopts.h @@ -32,6 +32,103 @@ extern "C" { * @see lwIP documentation * @{ */ +#ifdef MODULE_LWIP_ARP +#define LWIP_ARP (1) +#else /* MODULE_LWIP_ARP */ +#define LWIP_ARP (0) +#endif /* MODULE_LWIP_ARP */ + +#ifdef MODULE_LWIP_AUTOIP +#define LWIP_AUTOIP (1) +#else /* MODULE_LWIP_AUTOIP */ +#define LWIP_AUTOIP (0) +#endif /* MODULE_LWIP_AUTOIP */ + +#ifdef MODULE_LWIP_DHCP +#define LWIP_DHCP (1) +#else /* MODULE_LWIP_DHCP */ +#define LWIP_DHCP (0) +#endif /* MODULE_LWIP_DHCP */ + +#ifdef MODULE_LWIP_ETHERNET +#define LWIP_ETHERNET (1) +#else /* MODULE_LWIP_IPV4 */ +#define LWIP_ETHERNET (0) +#endif /* MODULE_LWIP_IPV4 */ + +#ifdef MODULE_LWIP_IGMP +#define LWIP_IGMP (1) +#else /* MODULE_LWIP_IGMP */ +#define LWIP_IGMP (0) +#endif /* MODULE_LWIP_IGMP */ + +#ifdef MODULE_LWIP_IPV4 +#define LWIP_IPV4 (1) +#else /* MODULE_LWIP_IPV4 */ +#define LWIP_IPV4 (0) +#endif /* MODULE_LWIP_IPV4 */ + +#ifdef MODULE_LWIP_IPV6_AUTOCONFIG +#define LWIP_IPV6_AUTOCONFIG (1) +#else /* MODULE_LWIP_IPV6_AUTOCONFIG */ +#define LWIP_IPV6_AUTOCONFIG (0) +#endif /* MODULE_LWIP_IPV6_AUTOCONFIG */ + +#ifdef MODULE_LWIP_IPV6 +#define LWIP_IPV6 (1) +#else /* MODULE_LWIP_IPV6 */ +#define LWIP_IPV6 (0) +#endif /* MODULE_LWIP_IPV6 */ + + +#ifdef MODULE_LWIP_NETIF_PPP +#define PPP_SUPPORT (1) +#else /* MODULE_LWIP_NETIF_PPP */ +#define PPP_SUPPORT (0) +#endif /* MODULE_LWIP_NETIF_PPP */ + +#ifdef MODULE_LWIP_RAW +#define LWIP_RAW (1) +#else /* MODULE_LWIP_RAW */ +#define LWIP_RAW (0) +#endif /* MODULE_LWIP_RAW */ + +#ifdef MODULE_LWIP_SIXLOWPAN +#define LWIP_6LOWPAN (1) +#else /* MODULE_LWIP_STATS */ +#define LWIP_6LOWPAN (0) +#endif /* MODULE_LWIP_STATS */ + +#ifdef MODULE_LWIP_STATS +#define LWIP_STATS (1) +#else /* MODULE_LWIP_STATS */ +#define LWIP_STATS (0) +#endif /* MODULE_LWIP_STATS */ + +#ifdef MODULE_LWIP_TCP +#define LWIP_TCP (1) +#else /* MODULE_LWIP_TCP */ +#define LWIP_TCP (0) +#endif /* MODULE_LWIP_TCP */ + +#ifdef MODULE_LWIP_UDP +#define LWIP_UDP (1) +#else /* MODULE_LWIP_UDP */ +#define LWIP_UDP (0) +#endif /* MODULE_LWIP_UDP */ + +#ifdef MODULE_LWIP_UDPLITE +#define LWIP_UDPLITE (1) +#else /* MODULE_LWIP_UDPLITE */ +#define LWIP_UDPLITE (0) +#endif /* MODULE_LWIP_UDPLITE */ + +#ifdef MODULE_LWIP_CONN +#define LWIP_NETCONN (1) +#else +#define LWIP_NETCONN (0) +#endif + #define LWIP_SOCKET (0) #define MEMP_MEM_MALLOC (1) #define NETIF_MAX_HWADDR_LEN (GNRC_NETIF_HDR_L2ADDR_MAX_LEN)