Change typedef of uip_ipaddr_t from a vector type to a union.

typedef union uip_ip4addr_t {
  u16_t u16[2];
  u8_t  u8[4];
} uip_ip4addr_t;

typedef uip_ip4addr_t uip_ipaddr_t;

This implies that one must consistently pass pointers to
uip_ipaddr_t:s and not mix and match pointers with
uip_ipaddr_t:s as was done earlier.
This commit is contained in:
bg- 2006-08-09 16:13:39 +00:00
parent 2fe1ccf8c5
commit fb94d50410
30 changed files with 253 additions and 270 deletions

View file

@ -57,7 +57,7 @@
*
* This file is part of the uIP TCP/IP stack.
*
* $Id: resolv.c,v 1.1 2006/06/17 22:41:18 adamdunkels Exp $
* $Id: resolv.c,v 1.2 2006/08/09 16:13:39 bg- Exp $
*
*/
@ -356,7 +356,7 @@ PROCESS_THREAD(resolv_process, ev, data)
uip_udp_remove(resolv_conn);
}
resolv_conn = udp_new((u16_t *)data, HTONS(53), NULL);
resolv_conn = udp_new((uip_ipaddr_t *)data, HTONS(53), NULL);
} else if(ev == tcpip_event) {
if(uip_udp_conn->rport == HTONS(53)) {
@ -459,7 +459,7 @@ resolv_getserver(void)
if(resolv_conn == NULL) {
return NULL;
}
return resolv_conn->ripaddr;
return resolv_conn->ripaddr.u16;
}
/*-----------------------------------------------------------------------------------*/
/**