diff options
Diffstat (limited to 'nuttx/include/net/uip/uip.h')
-rw-r--r-- | nuttx/include/net/uip/uip.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/nuttx/include/net/uip/uip.h b/nuttx/include/net/uip/uip.h index fae05836c..dfc0bf337 100644 --- a/nuttx/include/net/uip/uip.h +++ b/nuttx/include/net/uip/uip.h @@ -889,10 +889,9 @@ extern void uip_udpdisable(struct uip_udp_conn *conn); */ #ifndef CONFIG_NET_IPv6 -#define uip_ipaddr_cmp(addr1, addr2) (((uint16 *)addr1)[0] == ((uint16 *)addr2)[0] && \ - ((uint16 *)addr1)[1] == ((uint16 *)addr2)[1]) +# define uip_ipaddr_cmp(addr1, addr2) (addr1 == addr2) #else /* !CONFIG_NET_IPv6 */ -#define uip_ipaddr_cmp(addr1, addr2) (memcmp(addr1, addr2, sizeof(uip_ip6addr_t)) == 0) +# define uip_ipaddr_cmp(addr1, addr2) (memcmp(&addr1, &addr2, sizeof(uip_ip6addr_t)) == 0) #endif /* !CONFIG_NET_IPv6 */ /* Compare two IP addresses with netmasks @@ -1013,4 +1012,12 @@ extern void uip_udpdisable(struct uip_udp_conn *conn); #define uip_ipaddr4(addr) (htons(((uint16 *)(addr))[1]) & 0xff) +/* Print out a uIP log message. + * + * This function must be implemented by the module that uses uIP, and + * is called by uIP whenever a log message is generated. + */ + +extern void uip_log(char *msg); + #endif /* __NET_UIP_UIP_H */ |