Eliminated RPL_CONF_ADJUST_LLH_LEN correction by using uip_l3_icmp_hdr_len instead of uip_l2_l3_icmp_hdr_len.

This commit is contained in:
Matthias Kovatsch 2012-03-08 00:48:04 +01:00
parent 7eac4393c2
commit 87cd18539b
3 changed files with 3 additions and 12 deletions

View File

@ -244,11 +244,7 @@ dio_input(void)
PRINTF("RPL: Neighbor already in neighbor cache\n");
}
buffer_length = uip_len - uip_l2_l3_icmp_hdr_len;
#if RPL_CONF_ADJUST_LLH_LEN
buffer_length += UIP_LLH_LEN; /* Add jackdaw, minimal-net ethernet header */
#endif
buffer_length = uip_len - uip_l3_icmp_hdr_len;
/* Process the DIO base option. */
i = 0;
@ -579,11 +575,8 @@ dao_input(void)
PRINTF("\n");
buffer = UIP_ICMP_PAYLOAD;
buffer_length = uip_len - uip_l2_l3_icmp_hdr_len;
buffer_length = uip_len - uip_l3_icmp_hdr_len;
#if RPL_CONF_ADJUST_LLH_LEN
buffer_length += UIP_LLH_LEN; /* Add jackdaw, minimal-net ethernet header */
#endif
pos = 0;
instance_id = buffer[pos++];
@ -801,7 +794,7 @@ dao_ack_input(void)
uint8_t status;
buffer = UIP_ICMP_PAYLOAD;
buffer_length = uip_len - uip_l2_l3_icmp_hdr_len;
buffer_length = uip_len - uip_l3_icmp_hdr_len;
instance_id = buffer[0];
sequence = buffer[2];

View File

@ -392,7 +392,6 @@ extern void mac_log_802_15_4_rx(const uint8_t* buffer, size_t total_len);
#define RF230_MAX_TX_POWER 15
#define RF230_MIN_RX_POWER 30
*/
#define RPL_CONF_ADJUST_LLH_LEN 1
#define UIP_CONF_ROUTER 1
#define UIP_CONF_ND6_SEND_RA 0
#define UIP_CONF_ND6_REACHABLE_TIME 600000

View File

@ -97,7 +97,6 @@ typedef unsigned short uip_stats_t;
* They should all attach to a minimal-net rpl border that uses the same primary interface.
* For multihop testing, configure intermediate notes as routers.
*/
#define RPL_CONF_ADJUST_LLH_LEN 1
#define HARD_CODED_ADDRESS "bbbb::10" //the prefix is ignored for a rpl node
#define UIP_CONF_ROUTER 0
#define UIP_CONF_ND6_SEND_RA 0