#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
-#if INET6
#include <netinet/ip6.h>
-#endif
#include <netinet/tcp.h>
#include <netinet/udp.h>
return (u_int8_t)0; /* version mismatch! */
}
ds_field = ip->ip_tos;
- }
-#if INET6
- else if (t->pftag_flags & PF_TAG_HDR_INET6) {
+ } else if (t->pftag_flags & PF_TAG_HDR_INET6) {
struct ip6_hdr *ip6 = (struct ip6_hdr *)(void *)t->pftag_hdr;
u_int32_t flowlabel;
}
ds_field = (flowlabel >> 20) & 0xff;
}
-#endif
return ds_field;
}
sum += (sum >> 16); /* add carry */
ip->ip_sum = htons(~sum & 0xffff);
- }
-#if INET6
- else if (t->pftag_flags & PF_TAG_HDR_INET6) {
+ } else if (t->pftag_flags & PF_TAG_HDR_INET6) {
struct ip6_hdr *ip6 = (struct ip6_hdr *)t->pftag_hdr;
u_int32_t flowlabel;
flowlabel = (flowlabel & 0xf03fffff) | (dsfield << 20);
ip6->ip6_flow = htonl(flowlabel);
}
-#endif
}
/*
return 1;
}
break;
-#if INET6
case AF_INET6:
if (flags & CLASSQF_ECN6) { /* REDF_ECN6 == BLUEF_ECN6 */
struct ip6_hdr *ip6 = hdr;
return 1;
}
break;
-#endif /* INET6 */
}
/* not marked */