/* takes in current header and pointer to the header */
/* if another header exists, sets hdrptr to the next header
- and returns the new header value, else returns 0 */
+ and returns the new header value, else returns IPPROTO_NONE */
static u_int8_t ip6_nexthdr(u_int8_t currenthdr, u_int8_t **hdrptr)
{
- u_int8_t hdrlen, nexthdr = 0;
+ u_int8_t hdrlen, nexthdr = IPPROTO_NONE;
switch(currenthdr){
case IPPROTO_AH:
break;
}
return nexthdr;
-
}
/* One level of recursion won't kill us */
fragment = 0;
hdrptr = (u_int8_t *)(ipv6h + 1);
- while (currenthdr) {
+ while (currenthdr != IPPROTO_NONE) {
if ((currenthdr == IPPROTO_TCP) ||
(currenthdr == IPPROTO_UDP) ||
(currenthdr == IPPROTO_ICMPV6))
}
break;
}
- /* Max length: 10 "PROTO 255 " */
+ /* Max length: 10 "PROTO=255 " */
default:
printk("PROTO=%u ", currenthdr);
}