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

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* @(#)$Id: dhcpc.h,v 1.1 2006/06/17 22:41:18 adamdunkels Exp $
* @(#)$Id: dhcpc.h,v 1.2 2006/08/09 16:13:39 bg- Exp $
*/
#ifndef __DHCPC_H__
#define __DHCPC_H__
@ -45,10 +45,10 @@ struct dhcpc_state {
u8_t serverid[4];
u16_t lease_time[2];
u16_t ipaddr[2];
u16_t netmask[2];
u16_t dnsaddr[2];
u16_t default_router[2];
uip_ipaddr_t ipaddr;
uip_ipaddr_t netmask;
uip_ipaddr_t dnsaddr;
uip_ipaddr_t default_router;
};
void dhcpc_init(const void *mac_addr, int mac_len);