Lines Matching refs:q6
287 struct ip6q *q6 = NULL; in frag6_input() local
460 for (q6 = ip6q.ip6q_next; q6 != &ip6q; q6 = q6->ip6q_next) { in frag6_input()
461 if (ip6f->ip6f_ident == q6->ip6q_ident && in frag6_input()
462 …in6_are_addr_equal_scoped(&ip6->ip6_src, &q6->ip6q_src, ip6_input_getsrcifscope(m), q6->ip6q_src_i… in frag6_input()
463 …in6_are_addr_equal_scoped(&ip6->ip6_dst, &q6->ip6q_dst, ip6_input_getdstifscope(m), q6->ip6q_dst_i… in frag6_input()
468 if (q6 == &ip6q) { in frag6_input()
478 q6 = ip6q_alloc(M_DONTWAIT); in frag6_input()
479 if (q6 == NULL) { in frag6_input()
483 frag6_insque(q6, &ip6q); in frag6_input()
487 q6->ip6q_down = q6->ip6q_up = (struct ip6asfrag *)q6; in frag6_input()
489 q6->ip6q_nxtp = (u_char *)nxtp; in frag6_input()
491 q6->ip6q_ident = ip6f->ip6f_ident; in frag6_input()
492 q6->ip6q_ttl = IPV6_FRAGTTL; in frag6_input()
493 q6->ip6q_src = ip6->ip6_src; in frag6_input()
494 q6->ip6q_dst = ip6->ip6_dst; in frag6_input()
495 …q6->ip6q_dst_ifscope = IN6_IS_SCOPE_EMBED(&q6->ip6q_dst) ? ip6_input_getdstifscope(m) : IFSCOPE_NO… in frag6_input()
496 …q6->ip6q_src_ifscope = IN6_IS_SCOPE_EMBED(&q6->ip6q_src) ? ip6_input_getsrcifscope(m) : IFSCOPE_NO… in frag6_input()
497 q6->ip6q_ecn = in frag6_input()
499 q6->ip6q_unfrglen = -1; /* The 1st fragment has not arrived. */ in frag6_input()
501 q6->ip6q_nfrag = 0; in frag6_input()
502 q6->ip6q_flags = 0; in frag6_input()
509 q6->ip6q_csum = csum; in frag6_input()
510 q6->ip6q_csum_flags = csum_flags; in frag6_input()
514 if (q6->ip6q_flags & IP6QF_DIRTY) { in frag6_input()
524 q6->ip6q_unfrglen = offset - sizeof(struct ip6_hdr) - in frag6_input()
526 q6->ip6q_nxt = ip6f->ip6f_nxt; in frag6_input()
535 if (q6->ip6q_unfrglen >= 0) { in frag6_input()
537 if (q6->ip6q_unfrglen + fragoff + frgpartlen > IPV6_MAXPACKET) { in frag6_input()
575 for (af6 = q6->ip6q_down; af6 != (struct ip6asfrag *)q6; in frag6_input()
579 if (q6->ip6q_unfrglen + af6->ip6af_off + af6->ip6af_frglen > in frag6_input()
596 ip6err->ip6_src = q6->ip6q_src; in frag6_input()
597 ip6err->ip6_dst = q6->ip6q_dst; in frag6_input()
598 ip6_output_setdstifscope(m, q6->ip6q_dst_ifscope, NULL); in frag6_input()
599 ip6_output_setsrcifscope(m, q6->ip6q_src_ifscope, NULL); in frag6_input()
621 af6 = (struct ip6asfrag *)q6; in frag6_input()
631 ecn0 = q6->ip6q_ecn; in frag6_input()
638 q6->ip6q_ecn = IPTOS_ECN_CE; in frag6_input()
649 for (af6 = q6->ip6q_down; af6 != (struct ip6asfrag *)q6; in frag6_input()
665 if (af6->ip6af_up != (struct ip6asfrag *)q6) { in frag6_input()
687 if (af6 != (struct ip6asfrag *)q6) { in frag6_input()
705 if (csum_flags != 0 && csum_flags == q6->ip6q_csum_flags) { in frag6_input()
706 q6->ip6q_csum += csum; in frag6_input()
707 } else if (q6->ip6q_csum_flags != 0) { in frag6_input()
708 q6->ip6q_csum_flags = 0; in frag6_input()
720 q6->ip6q_nfrag++; in frag6_input()
733 q6->ip6q_flags |= IP6QF_DIRTY; in frag6_input()
735 frag6_purgef(q6, &dfq6, NULL); in frag6_input()
769 for (af6 = q6->ip6q_down; af6 != (struct ip6asfrag *)q6; in frag6_input()
789 ip6af = q6->ip6q_down; in frag6_input()
793 while (af6 != (struct ip6asfrag *)q6) { in frag6_input()
810 if (q6->ip6q_csum_flags != 0) { in frag6_input()
811 csum = q6->ip6q_csum; in frag6_input()
817 m->m_pkthdr.csum_flags = q6->ip6q_csum_flags; in frag6_input()
830 ip6->ip6_src = q6->ip6q_src; in frag6_input()
831 ip6->ip6_dst = q6->ip6q_dst; in frag6_input()
832 ip6_output_setdstifscope(m, q6->ip6q_dst_ifscope, NULL); in frag6_input()
833 ip6_output_setsrcifscope(m, q6->ip6q_src_ifscope, NULL); in frag6_input()
834 if (q6->ip6q_ecn == IPTOS_ECN_CE) { in frag6_input()
838 nxt = q6->ip6q_nxt; in frag6_input()
840 *q6->ip6q_nxtp = (u_char)(nxt & 0xff); in frag6_input()
853 frag6_remque(q6); in frag6_input()
855 frag6_nfrags -= q6->ip6q_nfrag; in frag6_input()
856 ip6q_free(q6); in frag6_input()
871 frag6_remque(q6); in frag6_input()
873 frag6_nfrags -= q6->ip6q_nfrag; in frag6_input()
874 ip6q_free(q6); in frag6_input()
946 frag6_purgef(struct ip6q *q6, struct fq6_head *dfq6, struct fq6_head *diq6) in frag6_purgef() argument
953 for (af6 = q6->ip6q_down; af6 != (struct ip6asfrag *)q6; in frag6_purgef()
973 ip6->ip6_src = q6->ip6q_src; in frag6_purgef()
974 ip6->ip6_dst = q6->ip6q_dst; in frag6_purgef()
975 ip6_output_setdstifscope(m, q6->ip6q_dst_ifscope, NULL); in frag6_purgef()
976 ip6_output_setsrcifscope(m, q6->ip6q_src_ifscope, NULL); in frag6_purgef()
996 frag6_freef(struct ip6q *q6, struct fq6_head *dfq6, struct fq6_head *diq6) in frag6_freef() argument
998 frag6_purgef(q6, dfq6, diq6); in frag6_freef()
999 frag6_remque(q6); in frag6_freef()
1001 frag6_nfrags -= q6->ip6q_nfrag; in frag6_freef()
1002 ip6q_free(q6); in frag6_freef()
1063 struct ip6q *q6; in frag6_timeout() local
1076 q6 = ip6q.ip6q_next; in frag6_timeout()
1077 if (q6) { in frag6_timeout()
1078 while (q6 != &ip6q) { in frag6_timeout()
1079 --q6->ip6q_ttl; in frag6_timeout()
1080 q6 = q6->ip6q_next; in frag6_timeout()
1081 if (q6->ip6q_prev->ip6q_ttl == 0) { in frag6_timeout()
1088 diq6_tmp = (q6->ip6q_prev->ip6q_flags & IP6QF_DIRTY) ? in frag6_timeout()
1090 frag6_freef(q6->ip6q_prev, &dfq6, diq6_tmp); in frag6_timeout()
1181 struct ip6q *q6; in ip6q_alloc() local
1195 q6 = mtod(t, struct ip6q *); in ip6q_alloc()
1196 bzero(q6, sizeof(*q6)); in ip6q_alloc()
1198 q6 = NULL; in ip6q_alloc()
1200 return q6; in ip6q_alloc()
1204 ip6q_free(struct ip6q *q6) in ip6q_free() argument
1206 (void) m_free(dtom(q6)); in ip6q_free()