Revision:
2:1f10f8ab527b
Parent:
0:0f5a52711275
Child:
3:e02ec42cf9c8
--- a/LPC2368/lwip/include/ipv4/lwip/inet.h	Mon Jul 19 16:27:52 2010 +0000
+++ b/LPC2368/lwip/include/ipv4/lwip/inet.h	Thu Jul 22 11:31:59 2010 +0000
@@ -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)