Use rpl headers.
This commit is contained in:
parent
7c808081d6
commit
5c0100c979
@ -78,17 +78,16 @@ void uip_log(char *msg);
|
||||
#ifdef UIP_FALLBACK_INTERFACE
|
||||
extern struct uip_fallback_interface UIP_FALLBACK_INTERFACE;
|
||||
#endif
|
||||
|
||||
#if UIP_CONF_IPV6_RPL
|
||||
void rpl_init(void);
|
||||
int rpl_update_header_final(uip_ipaddr_t *addr);
|
||||
#endif /* UIP_CONF_IPV6_RPL */
|
||||
#include "rpl/rpl.h"
|
||||
#endif
|
||||
|
||||
process_event_t tcpip_event;
|
||||
#if UIP_CONF_ICMP6
|
||||
process_event_t tcpip_icmp6_event;
|
||||
#endif /* UIP_CONF_ICMP6 */
|
||||
|
||||
/*static struct tcpip_event_args ev_args;*/
|
||||
|
||||
/*periodic check of active connections*/
|
||||
static struct etimer periodic;
|
||||
|
||||
@ -601,15 +600,13 @@ tcpip_ipv6_output(void)
|
||||
}
|
||||
/* end of next hop determination */
|
||||
#if UIP_CONF_IPV6_RPL
|
||||
if (rpl_update_header_final(nexthop)) {
|
||||
if(rpl_update_header_final(nexthop)) {
|
||||
uip_len = 0;
|
||||
return;
|
||||
}
|
||||
#endif /* UIP_CONF_IPV6_RPL */
|
||||
if((nbr = uip_ds6_nbr_lookup(nexthop)) == NULL) {
|
||||
// printf("add1 %d\n", nexthop->u8[15]);
|
||||
if((nbr = uip_ds6_nbr_add(nexthop, NULL, 0, NBR_INCOMPLETE)) == NULL) {
|
||||
// printf("add n\n");
|
||||
uip_len = 0;
|
||||
return;
|
||||
} else {
|
||||
|
@ -95,9 +95,7 @@
|
||||
#endif
|
||||
|
||||
#if UIP_CONF_IPV6_RPL
|
||||
void uip_rpl_input(void);
|
||||
void rpl_update_header_empty(void);
|
||||
int rpl_verify_header(int uip_ext_opt_offset);
|
||||
#include "rpl/rpl.h"
|
||||
#endif /* UIP_CONF_IPV6_RPL */
|
||||
|
||||
#if UIP_LOGGING == 1
|
||||
@ -854,7 +852,7 @@ ext_hdr_options_process(void)
|
||||
#if UIP_CONF_IPV6_RPL
|
||||
case UIP_EXT_HDR_OPT_RPL:
|
||||
PRINTF("Processing RPL option\n");
|
||||
if (rpl_verify_header(uip_ext_opt_offset)) {
|
||||
if(rpl_verify_header(uip_ext_opt_offset)) {
|
||||
PRINTF("RPL Option Error : Dropping Packet");
|
||||
return 1;
|
||||
}
|
||||
@ -1120,7 +1118,7 @@ uip_process(u8_t flag)
|
||||
uip_next_hdr = &UIP_IP_BUF->proto;
|
||||
uip_ext_len = 0;
|
||||
uip_ext_bitmap = 0;
|
||||
if (*uip_next_hdr == UIP_PROTO_HBHO) {
|
||||
if(*uip_next_hdr == UIP_PROTO_HBHO) {
|
||||
#if UIP_CONF_IPV6_CHECKS
|
||||
uip_ext_bitmap |= UIP_EXT_HDR_BITMAP_HBHO;
|
||||
#endif /*UIP_CONF_IPV6_CHECKS*/
|
||||
|
Loading…
Reference in New Issue
Block a user