Moved INADDR_* defines to inet.h; removing dependency from inet.h to ip_addr.h

This commit is contained in:
goldsimon 2009-02-10 20:44:51 +00:00
parent 10c3ce08af
commit 19884f40b8
3 changed files with 5 additions and 8 deletions

View File

@ -34,8 +34,6 @@
#include "lwip/opt.h" #include "lwip/opt.h"
#include "lwip/ip_addr.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -45,6 +43,11 @@ struct in_addr {
u32_t s_addr; u32_t s_addr;
}; };
#define INADDR_NONE ((u32_t)0xffffffffUL) /* 255.255.255.255 */
#define INADDR_LOOPBACK ((u32_t)0x7f000001UL) /* 127.0.0.1 */
#define INADDR_ANY ((u32_t)0x00000000UL) /* 0.0.0.0 */
#define INADDR_BROADCAST ((u32_t)0xffffffffUL) /* 255.255.255.255 */
u32_t inet_addr(const char *cp); u32_t inet_addr(const char *cp);
int inet_aton(const char *cp, struct in_addr *addr); int inet_aton(const char *cp, struct in_addr *addr);
char *inet_ntoa(struct in_addr addr); /* returns ptr to static buffer; not reentrant! */ char *inet_ntoa(struct in_addr addr); /* returns ptr to static buffer; not reentrant! */

View File

@ -77,9 +77,6 @@ extern const struct ip_addr ip_addr_broadcast;
#define IP_ADDR_ANY ((struct ip_addr *)&ip_addr_any) #define IP_ADDR_ANY ((struct ip_addr *)&ip_addr_any)
#define IP_ADDR_BROADCAST ((struct ip_addr *)&ip_addr_broadcast) #define IP_ADDR_BROADCAST ((struct ip_addr *)&ip_addr_broadcast)
#define INADDR_NONE ((u32_t)0xffffffffUL) /* 255.255.255.255 */
#define INADDR_LOOPBACK ((u32_t)0x7f000001UL) /* 127.0.0.1 */
/* Definitions of the bits in an Internet address integer. /* Definitions of the bits in an Internet address integer.
On subnets, host and network parts are found according to On subnets, host and network parts are found according to

View File

@ -124,9 +124,6 @@ struct linger {
#define IPPROTO_UDP 17 #define IPPROTO_UDP 17
#define IPPROTO_UDPLITE 136 #define IPPROTO_UDPLITE 136
#define INADDR_ANY 0
#define INADDR_BROADCAST 0xffffffff
/* Flags we can use with send and recv. */ /* Flags we can use with send and recv. */
#define MSG_PEEK 0x01 /* Peeks at an incoming message */ #define MSG_PEEK 0x01 /* Peeks at an incoming message */
#define MSG_WAITALL 0x02 /* Unimplemented: Requests that the function block until the full amount of data requested can be returned */ #define MSG_WAITALL 0x02 /* Unimplemented: Requests that the function block until the full amount of data requested can be returned */