diff options
| author | Bernard Xiong <[email protected]> | 2019-07-05 17:09:57 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-07-05 17:09:57 +0800 |
| commit | 3eb3a736de5af22d817d040f29c0be711e5a8c0a (patch) | |
| tree | 5b243f8a1d1ff7071b1e4ecdad232e42f988766f /components/net | |
| parent | b70791d9dc0b32577317e2994e4d51c4a0c882ea (diff) | |
| parent | 52d1c50efe063a0a06e69abbc15d969249d06a74 (diff) | |
Merge pull request #2831 from Lawlieta/develop
[net][lwip][dhcpd] Fix dhcp server compile error in lwIP 2.1.0
Diffstat (limited to 'components/net')
| -rw-r--r-- | components/net/lwip-1.4.1/src/netif/ethernetif.c | 5 | ||||
| -rw-r--r-- | components/net/lwip-2.0.2/src/netif/ethernetif.c | 5 | ||||
| -rwxr-xr-x | components/net/lwip-2.1.0/src/netif/ethernetif.c | 5 | ||||
| -rw-r--r-- | components/net/lwip_dhcpd/SConscript | 2 | ||||
| -rw-r--r-- | components/net/lwip_dhcpd/dhcp_server_raw.c | 4 |
5 files changed, 14 insertions, 7 deletions
diff --git a/components/net/lwip-1.4.1/src/netif/ethernetif.c b/components/net/lwip-1.4.1/src/netif/ethernetif.c index ebf27b86e6..e240413c59 100644 --- a/components/net/lwip-1.4.1/src/netif/ethernetif.c +++ b/components/net/lwip-1.4.1/src/netif/ethernetif.c @@ -686,8 +686,6 @@ int eth_system_device_init(void) } INIT_PREV_EXPORT(eth_system_device_init); -#ifdef RT_USING_FINSH -#include <finsh.h> void set_if(char* netif_name, char* ip_addr, char* gw_addr, char* nm_addr) { struct ip_addr *ip; @@ -733,6 +731,9 @@ void set_if(char* netif_name, char* ip_addr, char* gw_addr, char* nm_addr) netif_set_netmask(netif, ip); } } + +#ifdef RT_USING_FINSH +#include <finsh.h> FINSH_FUNCTION_EXPORT(set_if, set network interface address); #if LWIP_DNS diff --git a/components/net/lwip-2.0.2/src/netif/ethernetif.c b/components/net/lwip-2.0.2/src/netif/ethernetif.c index 1bcc874f62..f118ad0d64 100644 --- a/components/net/lwip-2.0.2/src/netif/ethernetif.c +++ b/components/net/lwip-2.0.2/src/netif/ethernetif.c @@ -715,8 +715,6 @@ int eth_system_device_init_private(void) return (int)result; } -#ifdef RT_USING_FINSH -#include <finsh.h> void set_if(char* netif_name, char* ip_addr, char* gw_addr, char* nm_addr) { ip4_addr_t *ip; @@ -762,6 +760,9 @@ void set_if(char* netif_name, char* ip_addr, char* gw_addr, char* nm_addr) netif_set_netmask(netif, ip); } } + +#ifdef RT_USING_FINSH +#include <finsh.h> FINSH_FUNCTION_EXPORT(set_if, set network interface address); #if LWIP_DNS diff --git a/components/net/lwip-2.1.0/src/netif/ethernetif.c b/components/net/lwip-2.1.0/src/netif/ethernetif.c index c79db6700d..4e623cbfd3 100755 --- a/components/net/lwip-2.1.0/src/netif/ethernetif.c +++ b/components/net/lwip-2.1.0/src/netif/ethernetif.c @@ -720,8 +720,6 @@ int eth_system_device_init_private(void) return (int)result; } -#ifdef RT_USING_FINSH -#include <finsh.h> void set_if(char* netif_name, char* ip_addr, char* gw_addr, char* nm_addr) { ip4_addr_t *ip; @@ -767,6 +765,9 @@ void set_if(char* netif_name, char* ip_addr, char* gw_addr, char* nm_addr) netif_set_netmask(netif, ip); } } + +#ifdef RT_USING_FINSH +#include <finsh.h> FINSH_FUNCTION_EXPORT(set_if, set network interface address); #if LWIP_DNS diff --git a/components/net/lwip_dhcpd/SConscript b/components/net/lwip_dhcpd/SConscript index f7513cb0e3..16c673036a 100644 --- a/components/net/lwip_dhcpd/SConscript +++ b/components/net/lwip_dhcpd/SConscript @@ -2,7 +2,7 @@ from building import * cwd = GetCurrentDir() -if GetDepend('RT_USING_LWIP202'): +if GetDepend('RT_USING_LWIP202') or GetDepend('RT_USING_LWIP210') : src = ['dhcp_server_raw.c'] else: src = ['dhcp_server.c'] diff --git a/components/net/lwip_dhcpd/dhcp_server_raw.c b/components/net/lwip_dhcpd/dhcp_server_raw.c index 6b359eea4e..5df61a0236 100644 --- a/components/net/lwip_dhcpd/dhcp_server_raw.c +++ b/components/net/lwip_dhcpd/dhcp_server_raw.c @@ -97,6 +97,10 @@ #define LWIP_NETIF_LOCK(...) #define LWIP_NETIF_UNLOCK(...) +#ifndef DHCP_SERVER_PORT +#define DHCP_SERVER_PORT 67 +#endif + /** * The dhcp client node struct. */ |
