|
|
|
@ -43,24 +43,24 @@ static uint8_t rpl_send_buffer[BUFFER_SIZE];
|
|
|
|
|
|
|
|
|
|
/* SEND BUFFERS */
|
|
|
|
|
static icmpv6_hdr_t *icmp_send_buf;
|
|
|
|
|
static struct rpl_dis_t *rpl_send_dis_buf;
|
|
|
|
|
static struct rpl_dao_ack_t *rpl_send_dao_ack_buf;
|
|
|
|
|
static rpl_dis_t *rpl_send_dis_buf;
|
|
|
|
|
static rpl_dao_ack_t *rpl_send_dao_ack_buf;
|
|
|
|
|
static ipv6_hdr_t *ipv6_send_buf;
|
|
|
|
|
static struct rpl_dio_t *rpl_send_dio_buf;
|
|
|
|
|
static struct rpl_dao_t *rpl_send_dao_buf;
|
|
|
|
|
static rpl_dio_t *rpl_send_dio_buf;
|
|
|
|
|
static rpl_dao_t *rpl_send_dao_buf;
|
|
|
|
|
static rpl_opt_dodag_conf_t *rpl_send_opt_dodag_conf_buf;
|
|
|
|
|
static rpl_opt_target_t *rpl_send_opt_target_buf;
|
|
|
|
|
static rpl_opt_transit_t *rpl_send_opt_transit_buf;
|
|
|
|
|
|
|
|
|
|
/* RECEIVE BUFFERS */
|
|
|
|
|
static ipv6_hdr_t *ipv6_buf;
|
|
|
|
|
static struct rpl_dio_t *rpl_dio_buf;
|
|
|
|
|
static struct rpl_dao_t *rpl_dao_buf;
|
|
|
|
|
static struct rpl_dao_ack_t *rpl_dao_ack_buf;
|
|
|
|
|
static rpl_dio_t *rpl_dio_buf;
|
|
|
|
|
static rpl_dao_t *rpl_dao_buf;
|
|
|
|
|
static rpl_dao_ack_t *rpl_dao_ack_buf;
|
|
|
|
|
static rpl_opt_dodag_conf_t *rpl_opt_dodag_conf_buf;
|
|
|
|
|
static rpl_opt_target_t *rpl_opt_target_buf;
|
|
|
|
|
static rpl_opt_transit_t *rpl_opt_transit_buf;
|
|
|
|
|
static struct rpl_dis_t *rpl_dis_buf;
|
|
|
|
|
static rpl_dis_t *rpl_dis_buf;
|
|
|
|
|
static rpl_opt_t *rpl_opt_buf;
|
|
|
|
|
static rpl_opt_solicited_t *rpl_opt_solicited_buf;
|
|
|
|
|
|
|
|
|
@ -70,14 +70,14 @@ static icmpv6_hdr_t *get_rpl_send_icmpv6_buf(uint8_t ext_len)
|
|
|
|
|
return ((icmpv6_hdr_t *) & (rpl_send_buffer[IPV6_HDR_LEN + ext_len]));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static struct rpl_dao_ack_t *get_rpl_send_dao_ack_buf(void)
|
|
|
|
|
static rpl_dao_ack_t *get_rpl_send_dao_ack_buf(void)
|
|
|
|
|
{
|
|
|
|
|
return ((struct rpl_dao_ack_t *) & (rpl_send_buffer[IPV6_HDR_LEN + ICMPV6_HDR_LEN]));
|
|
|
|
|
return ((rpl_dao_ack_t *) & (rpl_send_buffer[IPV6_HDR_LEN + ICMPV6_HDR_LEN]));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static struct rpl_dis_t *get_rpl_send_dis_buf(void)
|
|
|
|
|
static rpl_dis_t *get_rpl_send_dis_buf(void)
|
|
|
|
|
{
|
|
|
|
|
return ((struct rpl_dis_t *) & (rpl_send_buffer[IPV6_HDR_LEN + ICMPV6_HDR_LEN]));
|
|
|
|
|
return ((rpl_dis_t *) & (rpl_send_buffer[IPV6_HDR_LEN + ICMPV6_HDR_LEN]));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static ipv6_hdr_t *get_rpl_send_ipv6_buf(void)
|
|
|
|
@ -90,14 +90,14 @@ static uint8_t *get_rpl_send_payload_buf(uint8_t ext_len)
|
|
|
|
|
return &(rpl_send_buffer[IPV6_HDR_LEN + ext_len]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static struct rpl_dio_t *get_rpl_send_dio_buf(void)
|
|
|
|
|
static rpl_dio_t *get_rpl_send_dio_buf(void)
|
|
|
|
|
{
|
|
|
|
|
return ((struct rpl_dio_t *) & (rpl_send_buffer[IPV6_HDR_LEN + ICMPV6_HDR_LEN]));
|
|
|
|
|
return ((rpl_dio_t *) & (rpl_send_buffer[IPV6_HDR_LEN + ICMPV6_HDR_LEN]));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static struct rpl_dao_t *get_rpl_send_dao_buf(void)
|
|
|
|
|
static rpl_dao_t *get_rpl_send_dao_buf(void)
|
|
|
|
|
{
|
|
|
|
|
return ((struct rpl_dao_t *) & (rpl_send_buffer[IPV6_HDR_LEN + ICMPV6_HDR_LEN]));
|
|
|
|
|
return ((rpl_dao_t *) & (rpl_send_buffer[IPV6_HDR_LEN + ICMPV6_HDR_LEN]));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static rpl_opt_dodag_conf_t *get_rpl_send_opt_dodag_conf_buf(uint8_t rpl_msg_len)
|
|
|
|
@ -137,24 +137,24 @@ static rpl_opt_dodag_conf_t *get_rpl_opt_dodag_conf_buf(uint8_t rpl_msg_len)
|
|
|
|
|
return ((rpl_opt_dodag_conf_t *) & (rpl_buffer[IPV6_HDR_LEN + ICMPV6_HDR_LEN + rpl_msg_len]));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static struct rpl_dio_t *get_rpl_dio_buf(void)
|
|
|
|
|
static rpl_dio_t *get_rpl_dio_buf(void)
|
|
|
|
|
{
|
|
|
|
|
return ((struct rpl_dio_t *) & (rpl_buffer[IPV6_HDR_LEN + ICMPV6_HDR_LEN]));
|
|
|
|
|
return ((rpl_dio_t *) & (rpl_buffer[IPV6_HDR_LEN + ICMPV6_HDR_LEN]));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static struct rpl_dao_t *get_rpl_dao_buf(void)
|
|
|
|
|
static rpl_dao_t *get_rpl_dao_buf(void)
|
|
|
|
|
{
|
|
|
|
|
return ((struct rpl_dao_t *) & (rpl_buffer[IPV6_HDR_LEN + ICMPV6_HDR_LEN]));
|
|
|
|
|
return ((rpl_dao_t *) & (rpl_buffer[IPV6_HDR_LEN + ICMPV6_HDR_LEN]));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static struct rpl_dao_ack_t *get_rpl_dao_ack_buf(void)
|
|
|
|
|
static rpl_dao_ack_t *get_rpl_dao_ack_buf(void)
|
|
|
|
|
{
|
|
|
|
|
return ((struct rpl_dao_ack_t *) & (buffer[(LL_HDR_LEN + IPV6_HDR_LEN + ICMPV6_HDR_LEN)]));
|
|
|
|
|
return ((rpl_dao_ack_t *) & (buffer[(LL_HDR_LEN + IPV6_HDR_LEN + ICMPV6_HDR_LEN)]));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static struct rpl_dis_t *get_rpl_dis_buf(void)
|
|
|
|
|
static rpl_dis_t *get_rpl_dis_buf(void)
|
|
|
|
|
{
|
|
|
|
|
return ((struct rpl_dis_t *) & (rpl_buffer[IPV6_HDR_LEN + ICMPV6_HDR_LEN]));
|
|
|
|
|
return ((rpl_dis_t *) & (rpl_buffer[IPV6_HDR_LEN + ICMPV6_HDR_LEN]));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static rpl_opt_t *get_rpl_opt_buf(uint8_t rpl_msg_len)
|
|
|
|
|