Updated for new for new uIPv6 APIs. Also fixed compiler warning.

This commit is contained in:
nifi 2010-04-20 22:32:19 +00:00
parent 9638789d9d
commit 4c26783948
2 changed files with 6 additions and 2 deletions

View file

@ -85,7 +85,7 @@ print_local_addresses(void)
uint8_t state;
PRINTF("Client IPv6 addresses: ");
for(i = 0; i < UIP_CONF_NETIF_MAX_ADDRESSES; i++) {
for(i = 0; i < UIP_DS6_ADDR_NB; i++) {
state = uip_ds6_if.addr_list[i].state;
if(uip_ds6_if.addr_list[i].isused &&
(state == ADDR_TENTATIVE || state == ADDR_PREFERRED)) {
@ -95,6 +95,7 @@ print_local_addresses(void)
}
}
/*---------------------------------------------------------------------------*/
#if UIP_CONF_ROUTER
static void
set_global_address(void)
{
@ -104,6 +105,7 @@ set_global_address(void)
uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);
}
#endif /* UIP_CONF_ROUTER */
/*---------------------------------------------------------------------------*/
static void
set_connection_address(uip_ipaddr_t *ipaddr)

View file

@ -84,7 +84,7 @@ print_local_addresses(void)
uint8_t state;
PRINTF("Server IPv6 addresses: ");
for(i = 0; i < UIP_CONF_NETIF_MAX_ADDRESSES; i++) {
for(i = 0; i < UIP_DS6_ADDR_NB; i++) {
state = uip_ds6_if.addr_list[i].state;
if(uip_ds6_if.addr_list[i].isused &&
(state == ADDR_TENTATIVE || state == ADDR_PREFERRED)) {
@ -96,7 +96,9 @@ print_local_addresses(void)
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(udp_server_process, ev, data)
{
#if UIP_CONF_ROUTER
uip_ipaddr_t ipaddr;
#endif /* UIP_CONF_ROUTER */
PROCESS_BEGIN();
PRINTF("UDP server started\n");