This library is deprecated.

Dependents:   HTTPClientStreamingExample HTTPClientExample HTTPServerExample HTTPServerHelloWorld ... more

Revision:
5:bc7df6da7589
Parent:
0:422060928e37
--- a/LPC1768/lwip/include/ipv4/lwip/inet.h	Fri Jul 09 14:34:26 2010 +0000
+++ b/LPC1768/lwip/include/ipv4/lwip/inet.h	Thu Aug 05 15:09:22 2010 +0000
@@ -40,7 +40,7 @@
 extern "C" {
 #endif
 
-/** For compatibility with BSD code */
+/*  For compatibility with BSD code */
 struct in_addr {
   u32_t s_addr;
 };
@@ -91,6 +91,8 @@
 
 #define inet_addr_from_ipaddr(target_inaddr, source_ipaddr) ((target_inaddr)->s_addr = ip4_addr_get_u32(source_ipaddr))
 #define inet_addr_to_ipaddr(target_ipaddr, source_inaddr)   (ip4_addr_set_u32(target_ipaddr, (source_inaddr)->s_addr))
+/* ATTENTION: the next define only works because both s_addr and ip_addr_t are an u32_t effectively! */
+#define inet_addr_to_ipaddr_p(target_ipaddr_p, source_inaddr)   ((target_ipaddr_p) = (ip_addr_t*)&((source_inaddr)->s_addr))
 
 /* directly map this to the lwip internal functions */
 #define inet_addr(cp)         ipaddr_addr(cp)