Cleaned up some of the comments and output strings.
This commit is contained in:
parent
afbb82030e
commit
0a202d3952
3 changed files with 15 additions and 15 deletions
|
@ -987,7 +987,7 @@ rpl_add_dag(uip_ipaddr_t *from, rpl_dio_t *dio)
|
||||||
instance->dio_redundancy != dio->dag_redund ||
|
instance->dio_redundancy != dio->dag_redund ||
|
||||||
instance->default_lifetime != dio->default_lifetime ||
|
instance->default_lifetime != dio->default_lifetime ||
|
||||||
instance->lifetime_unit != dio->lifetime_unit) {
|
instance->lifetime_unit != dio->lifetime_unit) {
|
||||||
PRINTF("RPL: DIO for DAG instance %u uncompatible with previos DIO\n",
|
PRINTF("RPL: DIO for DAG instance %u incompatible with previous DIO\n",
|
||||||
dio->instance_id);
|
dio->instance_id);
|
||||||
rpl_remove_parent(p);
|
rpl_remove_parent(p);
|
||||||
dag->used = 0;
|
dag->used = 0;
|
||||||
|
@ -1171,7 +1171,7 @@ rpl_process_dio(uip_ipaddr_t *from, rpl_dio_t *dio)
|
||||||
RPL_LOLLIPOP_INCREMENT(dag->version);
|
RPL_LOLLIPOP_INCREMENT(dag->version);
|
||||||
rpl_reset_dio_timer(instance);
|
rpl_reset_dio_timer(instance);
|
||||||
} else {
|
} else {
|
||||||
PRINTF("RPL: Global Repair\n");
|
PRINTF("RPL: Global repair\n");
|
||||||
if(dio->prefix_info.length != 0) {
|
if(dio->prefix_info.length != 0) {
|
||||||
if(dio->prefix_info.flags & UIP_ND6_RA_FLAG_AUTONOMOUS) {
|
if(dio->prefix_info.flags & UIP_ND6_RA_FLAG_AUTONOMOUS) {
|
||||||
PRINTF("RPL : Prefix announced in DIO\n");
|
PRINTF("RPL : Prefix announced in DIO\n");
|
||||||
|
|
|
@ -176,12 +176,14 @@ dis_output(uip_ipaddr_t *addr)
|
||||||
unsigned char *buffer;
|
unsigned char *buffer;
|
||||||
uip_ipaddr_t tmpaddr;
|
uip_ipaddr_t tmpaddr;
|
||||||
|
|
||||||
/* DAG Information Solicitation - 2 bytes reserved */
|
/*
|
||||||
/* 0 1 2 */
|
* DAG Information Solicitation - 2 bytes reserved
|
||||||
/* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 */
|
* 0 1 2
|
||||||
/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
|
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
|
||||||
/* | Flags | Reserved | Option(s)... */
|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||||
/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
|
* | Flags | Reserved | Option(s)...
|
||||||
|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||||
|
*/
|
||||||
|
|
||||||
buffer = UIP_ICMP_PAYLOAD;
|
buffer = UIP_ICMP_PAYLOAD;
|
||||||
buffer[0] = buffer[1] = 0;
|
buffer[0] = buffer[1] = 0;
|
||||||
|
@ -241,7 +243,7 @@ dio_input(void)
|
||||||
PRINTLLADDR((uip_lladdr_t *)packetbuf_addr(PACKETBUF_ADDR_SENDER));
|
PRINTLLADDR((uip_lladdr_t *)packetbuf_addr(PACKETBUF_ADDR_SENDER));
|
||||||
PRINTF("\n");
|
PRINTF("\n");
|
||||||
} else {
|
} else {
|
||||||
PRINTF("RPL: Out of Memory, dropping DIO from ");
|
PRINTF("RPL: Out of memory, dropping DIO from ");
|
||||||
PRINT6ADDR(&from);
|
PRINT6ADDR(&from);
|
||||||
PRINTF(", ");
|
PRINTF(", ");
|
||||||
PRINTLLADDR((uip_lladdr_t *)packetbuf_addr(PACKETBUF_ADDR_SENDER));
|
PRINTLLADDR((uip_lladdr_t *)packetbuf_addr(PACKETBUF_ADDR_SENDER));
|
||||||
|
@ -383,7 +385,7 @@ dio_input(void)
|
||||||
break;
|
break;
|
||||||
case RPL_OPTION_PREFIX_INFO:
|
case RPL_OPTION_PREFIX_INFO:
|
||||||
if(len != 32) {
|
if(len != 32) {
|
||||||
PRINTF("RPL: DAG prefix info not ok, len != 32\n");
|
PRINTF("RPL: Invalid DAG prefix info, len != 32\n");
|
||||||
RPL_STAT(rpl_stats.malformed_msgs++);
|
RPL_STAT(rpl_stats.malformed_msgs++);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -420,7 +422,7 @@ dio_output(rpl_instance_t *instance, uip_ipaddr_t *uc_addr)
|
||||||
#endif /* !RPL_LEAF_ONLY */
|
#endif /* !RPL_LEAF_ONLY */
|
||||||
|
|
||||||
#if RPL_LEAF_ONLY
|
#if RPL_LEAF_ONLY
|
||||||
/* In leaf mode, we send DIO message only as unicasts in response to
|
/* In leaf mode, we only send DIO messages as unicasts in response to
|
||||||
unicast DIS messages. */
|
unicast DIS messages. */
|
||||||
if(uc_addr == NULL) {
|
if(uc_addr == NULL) {
|
||||||
PRINTF("RPL: LEAF ONLY have multicast addr: skip dio_output\n");
|
PRINTF("RPL: LEAF ONLY have multicast addr: skip dio_output\n");
|
||||||
|
@ -624,8 +626,6 @@ dao_input(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
pos += 16;
|
pos += 16;
|
||||||
} else {
|
|
||||||
/* Perhaps, there are verification to do but ... */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
learned_from = uip_is_addr_mcast(&dao_sender_addr) ?
|
learned_from = uip_is_addr_mcast(&dao_sender_addr) ?
|
||||||
|
|
|
@ -104,7 +104,7 @@ calculate_path_metric(rpl_parent_t *p)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
reset(rpl_dag_t *sag)
|
reset(rpl_dag_t *dag)
|
||||||
{
|
{
|
||||||
PRINTF("RPL: Reset MRHOF\n");
|
PRINTF("RPL: Reset MRHOF\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue