Updated for new for new uIPv6 APIs. Also fixed compiler warning.
This commit is contained in:
parent
9638789d9d
commit
4c26783948
2 changed files with 6 additions and 2 deletions
|
@ -85,7 +85,7 @@ print_local_addresses(void)
|
||||||
uint8_t state;
|
uint8_t state;
|
||||||
|
|
||||||
PRINTF("Client IPv6 addresses: ");
|
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;
|
state = uip_ds6_if.addr_list[i].state;
|
||||||
if(uip_ds6_if.addr_list[i].isused &&
|
if(uip_ds6_if.addr_list[i].isused &&
|
||||||
(state == ADDR_TENTATIVE || state == ADDR_PREFERRED)) {
|
(state == ADDR_TENTATIVE || state == ADDR_PREFERRED)) {
|
||||||
|
@ -95,6 +95,7 @@ print_local_addresses(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
#if UIP_CONF_ROUTER
|
||||||
static void
|
static void
|
||||||
set_global_address(void)
|
set_global_address(void)
|
||||||
{
|
{
|
||||||
|
@ -104,6 +105,7 @@ set_global_address(void)
|
||||||
uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
|
uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
|
||||||
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);
|
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);
|
||||||
}
|
}
|
||||||
|
#endif /* UIP_CONF_ROUTER */
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
set_connection_address(uip_ipaddr_t *ipaddr)
|
set_connection_address(uip_ipaddr_t *ipaddr)
|
||||||
|
|
|
@ -84,7 +84,7 @@ print_local_addresses(void)
|
||||||
uint8_t state;
|
uint8_t state;
|
||||||
|
|
||||||
PRINTF("Server IPv6 addresses: ");
|
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;
|
state = uip_ds6_if.addr_list[i].state;
|
||||||
if(uip_ds6_if.addr_list[i].isused &&
|
if(uip_ds6_if.addr_list[i].isused &&
|
||||||
(state == ADDR_TENTATIVE || state == ADDR_PREFERRED)) {
|
(state == ADDR_TENTATIVE || state == ADDR_PREFERRED)) {
|
||||||
|
@ -96,7 +96,9 @@ print_local_addresses(void)
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
PROCESS_THREAD(udp_server_process, ev, data)
|
PROCESS_THREAD(udp_server_process, ev, data)
|
||||||
{
|
{
|
||||||
|
#if UIP_CONF_ROUTER
|
||||||
uip_ipaddr_t ipaddr;
|
uip_ipaddr_t ipaddr;
|
||||||
|
#endif /* UIP_CONF_ROUTER */
|
||||||
|
|
||||||
PROCESS_BEGIN();
|
PROCESS_BEGIN();
|
||||||
PRINTF("UDP server started\n");
|
PRINTF("UDP server started\n");
|
||||||
|
|
Loading…
Reference in a new issue