Lines Matching refs:frag_hdr
179 size_t maybe_fill_frag_header(struct ip6_frag *frag_hdr, struct ip6_hdr *ip6_targ, in maybe_fill_frag_header() argument
188 frag_hdr->ip6f_nxt = ip6_targ->ip6_nxt; in maybe_fill_frag_header()
189 frag_hdr->ip6f_reserved = 0; in maybe_fill_frag_header()
191 frag_hdr->ip6f_offlg = htons(frag_off << 3); in maybe_fill_frag_header()
193 frag_hdr->ip6f_offlg |= IP6F_MORE_FRAG; in maybe_fill_frag_header()
195 frag_hdr->ip6f_ident = htonl(ntohs(old_header->id)); in maybe_fill_frag_header()
198 return sizeof(*frag_hdr); in maybe_fill_frag_header()
208 uint8_t parse_frag_header(const struct ip6_frag *frag_hdr, struct iphdr *ip_targ) { in parse_frag_header() argument
209 uint16_t frag_off = (ntohs(frag_hdr->ip6f_offlg & IP6F_OFF_MASK) >> 3); in parse_frag_header()
210 if (frag_hdr->ip6f_offlg & IP6F_MORE_FRAG) { in parse_frag_header()
214 ip_targ->id = htons(ntohl(frag_hdr->ip6f_ident) & 0xffff); in parse_frag_header()
215 ip_targ->protocol = frag_hdr->ip6f_nxt; in parse_frag_header()
216 return frag_hdr->ip6f_nxt; in parse_frag_header()