Lines Matching refs:frag_hdr
178 size_t maybe_fill_frag_header(struct ip6_frag *frag_hdr, struct ip6_hdr *ip6_targ, in maybe_fill_frag_header() argument
187 frag_hdr->ip6f_nxt = ip6_targ->ip6_nxt; in maybe_fill_frag_header()
188 frag_hdr->ip6f_reserved = 0; in maybe_fill_frag_header()
190 frag_hdr->ip6f_offlg = htons(frag_off << 3); in maybe_fill_frag_header()
192 frag_hdr->ip6f_offlg |= IP6F_MORE_FRAG; in maybe_fill_frag_header()
194 frag_hdr->ip6f_ident = htonl(ntohs(old_header->id)); in maybe_fill_frag_header()
197 return sizeof(*frag_hdr); in maybe_fill_frag_header()
207 uint8_t parse_frag_header(const struct ip6_frag *frag_hdr, struct iphdr *ip_targ) { in parse_frag_header() argument
208 uint16_t frag_off = (ntohs(frag_hdr->ip6f_offlg & IP6F_OFF_MASK) >> 3); in parse_frag_header()
209 if (frag_hdr->ip6f_offlg & IP6F_MORE_FRAG) { in parse_frag_header()
213 ip_targ->id = htons(ntohl(frag_hdr->ip6f_ident) & 0xffff); in parse_frag_header()
214 ip_targ->protocol = frag_hdr->ip6f_nxt; in parse_frag_header()
215 return frag_hdr->ip6f_nxt; in parse_frag_header()