Lines Matching refs:ip6

110 #include <netinet/ip6.h>
186 static int ip6opts_match __P((struct ip6_hdr **ip6, struct ip6_fw *f,
193 static void ip6fw_report __P((struct ip6_fw *f, struct ip6_hdr *ip6,
276 is_icmp6_query(struct ip6_hdr *ip6, int off)
281 icmp6 = (struct icmp6_hdr *)((caddr_t)ip6 + off);
299 struct ip6_hdr *ip6 = *pip6;
306 *nxt = ip6->ip6_nxt;
308 len = ntohs(ip6->ip6_plen) + sizeof(struct ip6_hdr);
310 ip6e = (struct ip6_ext *)((caddr_t) ip6 + *off);
319 ip6f = (struct ip6_frag *) ((caddr_t)ip6 + *off);
417 ip6fw_report(struct ip6_fw *f, struct ip6_hdr *ip6,
421 struct tcphdr *const tcp6 = (struct tcphdr *) ((caddr_t) ip6+ off);
422 struct udphdr *const udp = (struct udphdr *) ((caddr_t) ip6+ off);
423 struct icmp6_hdr *const icmp6 = (struct icmp6_hdr *) ((caddr_t) ip6+ off);
477 ip6_sprintf(&ip6->ip6_src));
484 ip6_sprintf(&ip6->ip6_dst));
491 ip6_sprintf(&ip6->ip6_src));
498 ip6_sprintf(&ip6->ip6_dst));
510 ip6_sprintf(&ip6->ip6_src));
512 ip6_sprintf(&ip6->ip6_dst));
516 ip6_sprintf(&ip6->ip6_src));
518 ip6_sprintf(&ip6->ip6_dst));
563 struct ip6_hdr *ip6 = *pip6;
566 int off = sizeof(struct ip6_hdr), nxt = ip6->ip6_nxt;
616 (!IN6_ARE_ADDR_MASKEQUAL(&ip6->ip6_src,&f->fw_smsk,&f->fw_src)))
621 (!IN6_ARE_ADDR_MASKEQUAL(&ip6->ip6_dst,&f->fw_dmsk,&f->fw_dst)))
647 if (!ip6opts_match(&ip6, f, m, &off, &nxt, &offset))
667 *pip6 = ip6 = mtod(*m, struct ip6_hdr *); \
693 tcp6 = (struct tcphdr *) ((caddr_t)ip6 + off);
719 udp = (struct udphdr *) ((caddr_t)ip6 + off);
741 icmp = (struct icmp6_hdr *) ((caddr_t)ip6 + off);
750 ip6fw_report(NULL, ip6, rif, oif, off, nxt);
768 f->fw_bcnt += ntohs(ip6->ip6_plen);
773 ip6fw_report(f, ip6, rif, oif, off, nxt);
831 && (nxt != IPPROTO_ICMPV6 || is_icmp6_query(ip6, off))
833 && !IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) {
838 (struct tcphdr *) ((caddr_t)ip6 + off);
840 struct ip6_hdr ip6;
849 ti.ip6 = *ip6;
853 ti.ip6.ip6_nxt = IPPROTO_TCP;
863 } else if (ip6->ip6_plen) {
864 ack += ntohs(ip6->ip6_plen) + sizeof(*ip6)
874 bcopy(&ti, ip6, sizeof(ti));
875 tcp_respond(NULL, ip6, (struct tcphdr *)(ip6 + 1),