Improve readability of DAO output variables
This commit is contained in:
parent
0bd26d83c8
commit
a05d635512
1 changed files with 8 additions and 7 deletions
|
@ -707,7 +707,7 @@ dao_input(void)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
dao_output(rpl_parent_t *n, uint8_t lifetime)
|
||||
dao_output(rpl_parent_t *parent, uint8_t lifetime)
|
||||
{
|
||||
/* Destination Advertisement Object */
|
||||
uip_ipaddr_t prefix;
|
||||
|
@ -717,11 +717,12 @@ dao_output(rpl_parent_t *n, uint8_t lifetime)
|
|||
return;
|
||||
}
|
||||
|
||||
dao_output_target(n, &prefix, lifetime);
|
||||
/* Sending a DAO with own prefix as target */
|
||||
dao_output_target(parent, &prefix, lifetime);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
dao_output_target(rpl_parent_t *n, uip_ipaddr_t *prefix, uint8_t lifetime)
|
||||
dao_output_target(rpl_parent_t *parent, uip_ipaddr_t *prefix, uint8_t lifetime)
|
||||
{
|
||||
rpl_dag_t *dag;
|
||||
rpl_instance_t *instance;
|
||||
|
@ -731,11 +732,11 @@ dao_output_target(rpl_parent_t *n, uip_ipaddr_t *prefix, uint8_t lifetime)
|
|||
|
||||
/* Destination Advertisement Object */
|
||||
|
||||
dag = n->dag;
|
||||
dag = parent->dag;
|
||||
instance = dag->instance;
|
||||
|
||||
#ifdef RPL_DEBUG_DAO_OUTPUT
|
||||
RPL_DEBUG_DAO_OUTPUT(n);
|
||||
RPL_DEBUG_DAO_OUTPUT(parent);
|
||||
#endif
|
||||
|
||||
buffer = UIP_ICMP_PAYLOAD;
|
||||
|
@ -779,10 +780,10 @@ dao_output_target(rpl_parent_t *n, uip_ipaddr_t *prefix, uint8_t lifetime)
|
|||
PRINTF("RPL: Sending DAO with prefix ");
|
||||
PRINT6ADDR(prefix);
|
||||
PRINTF(" to ");
|
||||
PRINT6ADDR(&n->addr);
|
||||
PRINT6ADDR(&parent->addr);
|
||||
PRINTF("\n");
|
||||
|
||||
uip_icmp6_send(&n->addr, ICMP6_RPL, RPL_CODE_DAO, pos);
|
||||
uip_icmp6_send(&parent->addr, ICMP6_RPL, RPL_CODE_DAO, pos);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue