Home
last modified time | relevance | path

Searched refs:frag_hdr (Results 1 – 4 of 4) sorted by relevance

/external/android-clat/
Dipv6.c81 struct ip6_frag *frag_hdr = NULL; in ipv6_packet() local
128 frag_hdr = (struct ip6_frag *) next_header; in ipv6_packet()
129 if (len_left < sizeof(*frag_hdr)) { in ipv6_packet()
134 next_header += sizeof(*frag_hdr); in ipv6_packet()
135 len_left -= sizeof(*frag_hdr); in ipv6_packet()
137 protocol = parse_frag_header(frag_hdr, ip_targ); in ipv6_packet()
155 if (frag_hdr && (frag_hdr->ip6f_offlg & IP6F_OFF_MASK)) { in ipv6_packet()
Dtranslate.c178 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()
[all …]
Dtranslate.h59 size_t maybe_fill_frag_header(struct ip6_frag *frag_hdr, struct ip6_hdr *ip6_targ,
61 uint8_t parse_frag_header(const struct ip6_frag *frag_hdr, struct iphdr *ip_targ);
64 size_t maybe_fill_frag_header(struct ip6_frag *frag_hdr, struct ip6_hdr *ip6_targ,
66 uint8_t parse_frag_header(const struct ip6_frag *frag_hdr, struct iphdr *ip_targ);
Dipv4.c60 struct ip6_frag *frag_hdr; in ipv4_packet() local
118 frag_hdr = (struct ip6_frag *) out[pos + 1].iov_base; in ipv4_packet()
119 frag_hdr_len = maybe_fill_frag_header(frag_hdr, ip6_targ, header); in ipv4_packet()
122 if (frag_hdr_len && frag_hdr->ip6f_offlg & IP6F_OFF_MASK) { in ipv4_packet()