ip_addr_any and _broadcast are type-declared as being const.

This commit is contained in:
likewise 2003-04-11 08:10:17 +00:00
parent 0eb3d92782
commit f6a8994521
2 changed files with 7 additions and 4 deletions

View File

@ -33,8 +33,8 @@
#include "lwip/ip_addr.h"
#include "lwip/inet.h"
struct ip_addr ip_addr_any = { 0x00000000UL };
struct ip_addr ip_addr_broadcast = { 0xffffffffUL };
const struct ip_addr ip_addr_any = { 0x00000000UL };
const struct ip_addr ip_addr_broadcast = { 0xffffffffUL };
/*-----------------------------------------------------------------------------------*/

View File

@ -34,6 +34,9 @@
#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_BROADCAST (&ip_addr_broadcast)
@ -49,8 +52,8 @@ PACK_STRUCT_END
# include "arch/epstruct.h"
#endif
extern struct ip_addr ip_addr_any;
extern struct ip_addr ip_addr_broadcast;
extern const struct ip_addr ip_addr_any;
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) | \
((u32_t)(c & 0xff) << 8) | (u32_t)(d & 0xff))