Added native-border-router and slip-radio
This commit is contained in:
parent
65edc32de2
commit
8b83ffec67
37 changed files with 3176 additions and 104 deletions
|
@ -567,7 +567,7 @@ tcpip_ipv6_output(void)
|
|||
if(locrt == NULL) {
|
||||
if((nexthop = uip_ds6_defrt_choose()) == NULL) {
|
||||
#ifdef UIP_FALLBACK_INTERFACE
|
||||
printf("FALLBACK: removing ext hdrs & setting proto %d %d\n",
|
||||
PRINTF("FALLBACK: removing ext hdrs & setting proto %d %d\n",
|
||||
uip_ext_len, *((uint8_t *)UIP_IP_BUF + 40));
|
||||
if(uip_ext_len > 0) {
|
||||
uint8_t proto = *((uint8_t *)UIP_IP_BUF + 40);
|
||||
|
|
|
@ -60,10 +60,8 @@
|
|||
#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN])
|
||||
#define UIP_ICMP_BUF ((struct uip_icmp_hdr *)&uip_buf[uip_l2_l3_hdr_len])
|
||||
#define UIP_ICMP6_ERROR_BUF ((struct uip_icmp6_error *)&uip_buf[uip_l2_l3_icmp_hdr_len])
|
||||
#if UIP_CONF_IPV6_RPL
|
||||
#define UIP_EXT_BUF ((struct uip_ext_hdr *)&uip_buf[uip_l2_l3_hdr_len])
|
||||
#define UIP_FIRST_EXT_BUF ((struct uip_ext_hdr *)&uip_buf[UIP_LLIPH_LEN])
|
||||
#endif /* UIP_CONF_IPV6_RPL */
|
||||
|
||||
/** \brief temporary IP address */
|
||||
static uip_ipaddr_t tmp_ipaddr;
|
||||
|
|
|
@ -511,7 +511,14 @@ remove_ext_hdr(void)
|
|||
{
|
||||
/* Remove ext header before TCP/UDP processing. */
|
||||
if(uip_ext_len > 0) {
|
||||
PRINTF("Cutting ext-header before TCP send (%d)\n", uip_ext_len);
|
||||
PRINTF("Cutting ext-header before TCP send (extlen: %d, uiplen: %d)\n",
|
||||
uip_ext_len, uip_len);
|
||||
if(uip_len - UIP_IPH_LEN- uip_ext_len < 0) {
|
||||
PRINTF("ERROR: uip_len too short compared to ext len\n");
|
||||
uip_ext_len = 0;
|
||||
uip_len = 0;
|
||||
return;
|
||||
}
|
||||
memmove(((uint8_t *)UIP_TCP_BUF) - uip_ext_len, (uint8_t *)UIP_TCP_BUF,
|
||||
uip_len - UIP_IPH_LEN - uip_ext_len);
|
||||
|
||||
|
@ -1349,7 +1356,7 @@ uip_process(u8_t flag)
|
|||
|
||||
icmp6_input:
|
||||
/* This is IPv6 ICMPv6 processing code. */
|
||||
PRINTF("icmp6_input: length %d\n", uip_len);
|
||||
PRINTF("icmp6_input: length %d type: %d \n", uip_len, UIP_ICMP_BUF->type);
|
||||
|
||||
#if UIP_CONF_IPV6_CHECKS
|
||||
/* Compute and check the ICMP header checksum */
|
||||
|
@ -1357,6 +1364,7 @@ uip_process(u8_t flag)
|
|||
UIP_STAT(++uip_stat.icmp.drop);
|
||||
UIP_STAT(++uip_stat.icmp.chkerr);
|
||||
UIP_LOG("icmpv6: bad checksum.");
|
||||
PRINTF("icmpv6: bad checksum.");
|
||||
goto drop;
|
||||
}
|
||||
#endif /*UIP_CONF_IPV6_CHECKS*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue