Skip to content

Instantly share code, notes, and snippets.

@aguirrem
Last active December 30, 2015 04:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aguirrem/7776036 to your computer and use it in GitHub Desktop.
Save aguirrem/7776036 to your computer and use it in GitHub Desktop.
#define UIP_DATA_BUF ((uint8_t *)&uip_buf[uip_l2_l3_hdr_len + UIP_UDPH_LEN])
#define UIP_UDP_BUF ((struct uip_udp_hdr *)&uip_buf[uip_l2_l3_hdr_len])
#define UIP_EXT_BUF ((struct uip_ext_hdr *)&uip_buf[UIP_LLH_LEN + UIP_IPH_LEN])
#define UIP_EXT_BUF_NEXT ((uint8_t *)&uip_buf[UIP_LLH_LEN + UIP_IPH_LEN + HBHO_TOTAL_LEN])
#define UIP_EXT_OPT_FIRST ((struct hbho_mcast *)&uip_buf[UIP_LLH_LEN + UIP_IPH_LEN + 2])
#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_ICMP_PAYLOAD ((unsigned char *)&uip_buf[uip_l2_l3_icmp_hdr_len])
locslhptr = (struct sequence_list_header *)UIP_ICMP_PAYLOAD;
while(locslhptr <
(struct sequence_list_header *)((uint8_t *)UIP_ICMP_PAYLOAD +
(uip_len + UIP_LLH_LEN) - uip_l2_l3_icmp_hdr_len)) {
// VERBOSE_PRINTF("ROLL TM: ICMPv6 In, seq hdr @ %p\n", locslhptr);
PRINTF("ROLL TM: ICMPv6 In, seq hdr @ %p\n", locslhptr);
if((locslhptr->flags & SEQUENCE_LIST_RES) != 0) {
PRINTF("ROLL TM: ICMPv6 In, non-zero reserved bits\n");
goto drop;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment