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:
parent
2fe1ccf8c5
commit
fb94d50410
30 changed files with 253 additions and 270 deletions
|
@ -41,7 +41,7 @@
|
|||
*
|
||||
* Author: Adam Dunkels <adam@sics.se>
|
||||
*
|
||||
* $Id: uip-fw.h,v 1.1 2006/06/17 22:41:19 adamdunkels Exp $
|
||||
* $Id: uip-fw.h,v 1.2 2006/08/09 16:13:40 bg- Exp $
|
||||
*/
|
||||
#ifndef __UIP_FW_H__
|
||||
#define __UIP_FW_H__
|
||||
|
@ -54,8 +54,8 @@
|
|||
struct uip_fw_netif {
|
||||
struct uip_fw_netif *next; /**< Pointer to the next interface when
|
||||
linked in a list. */
|
||||
u16_t ipaddr[2]; /**< The IP address of this interface. */
|
||||
u16_t netmask[2]; /**< The netmask of the interface. */
|
||||
uip_ipaddr_t ipaddr; /**< The IP address of this interface. */
|
||||
uip_ipaddr_t netmask; /**< The netmask of the interface. */
|
||||
u8_t (* output)(void);
|
||||
/**< A pointer to the function that
|
||||
sends a packet. */
|
||||
|
@ -79,8 +79,8 @@ struct uip_fw_netif {
|
|||
*/
|
||||
#define UIP_FW_NETIF(ip1,ip2,ip3,ip4, nm1,nm2,nm3,nm4, outputfunc) \
|
||||
NULL, \
|
||||
{HTONS((ip1 << 8) | ip2), HTONS((ip3 << 8) | ip4)}, \
|
||||
{HTONS((nm1 << 8) | nm2), HTONS((nm3 << 8) | nm4)}, \
|
||||
{ .u16 = {HTONS((ip1 << 8) | ip2), HTONS((ip3 << 8) | ip4)} }, \
|
||||
{ .u16 = {HTONS((nm1 << 8) | nm2), HTONS((nm3 << 8) | nm4)} }, \
|
||||
outputfunc
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue