mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-24 23:25:58 +00:00
ip_addr_any and _broadcast are type-declared as being const.
This commit is contained in:
parent
0eb3d92782
commit
f6a8994521
@ -33,8 +33,8 @@
|
|||||||
#include "lwip/ip_addr.h"
|
#include "lwip/ip_addr.h"
|
||||||
#include "lwip/inet.h"
|
#include "lwip/inet.h"
|
||||||
|
|
||||||
struct ip_addr ip_addr_any = { 0x00000000UL };
|
const struct ip_addr ip_addr_any = { 0x00000000UL };
|
||||||
struct ip_addr ip_addr_broadcast = { 0xffffffffUL };
|
const struct ip_addr ip_addr_broadcast = { 0xffffffffUL };
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -34,6 +34,9 @@
|
|||||||
|
|
||||||
#include "lwip/arch.h"
|
#include "lwip/arch.h"
|
||||||
|
|
||||||
|
/** IP_ADDR_ can be used as a fixed IP address
|
||||||
|
* for the wildcard and the broadcast address
|
||||||
|
*/
|
||||||
#define IP_ADDR_ANY (&ip_addr_any)
|
#define IP_ADDR_ANY (&ip_addr_any)
|
||||||
#define IP_ADDR_BROADCAST (&ip_addr_broadcast)
|
#define IP_ADDR_BROADCAST (&ip_addr_broadcast)
|
||||||
|
|
||||||
@ -49,8 +52,8 @@ PACK_STRUCT_END
|
|||||||
# include "arch/epstruct.h"
|
# include "arch/epstruct.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern struct ip_addr ip_addr_any;
|
extern const struct ip_addr ip_addr_any;
|
||||||
extern struct ip_addr ip_addr_broadcast;
|
extern const struct ip_addr ip_addr_broadcast;
|
||||||
|
|
||||||
#define IP4_ADDR(ipaddr, a,b,c,d) (ipaddr)->addr = htonl(((u32_t)(a & 0xff) << 24) | ((u32_t)(b & 0xff) << 16) | \
|
#define IP4_ADDR(ipaddr, a,b,c,d) (ipaddr)->addr = htonl(((u32_t)(a & 0xff) << 24) | ((u32_t)(b & 0xff) << 16) | \
|
||||||
((u32_t)(c & 0xff) << 8) | (u32_t)(d & 0xff))
|
((u32_t)(c & 0xff) << 8) | (u32_t)(d & 0xff))
|
||||||
|
Loading…
Reference in New Issue
Block a user