Home | History | Annotate | Download | only in android-clat

Lines Matching refs:ip6

89 #define IPV6_PSEUDOHEADER(ip6, protocol, tlen)                       \
90 ip6[8], ip6[9], ip6[10], ip6[11], /* Source address */ \
91 ip6[12], ip6[13], ip6[14], ip6[15], \
92 ip6[16], ip6[17], ip6[18], ip6[19], \
93 ip6[20], ip6[21], ip6[22], ip6[23], \
94 ip6[24], ip6[25], ip6[26], ip6[27], /* Destination address */ \
95 ip6[28], ip6[29], ip6[30], ip6[31], \
96 ip6[32], ip6[33], ip6[34], ip6[35], \
97 ip6[36], ip6[37], ip6[38], ip6[39], \
184 int is_ipv6_fragment(struct ip6_hdr *ip6, size_t len) {
185 if (ip6->ip6_nxt != IPPROTO_FRAGMENT) {
188 struct ip6_frag *frag = (struct ip6_frag *) (ip6 + 1);
189 return len >= sizeof(*ip6) + sizeof(*frag) &&
225 struct ip6_hdr *ip6 = (struct ip6_hdr *) packet;
226 ASSERT_GE(len, sizeof(*ip6)) << msg << ": IPv6 packet shorter than IPv6 header\n";
227 EXPECT_EQ(len - sizeof(*ip6), htons(ip6->ip6_plen)) << msg << ": Incorrect IPv6 length\n";
229 if (ip6->ip6_nxt == IPPROTO_FRAGMENT) {
230 struct ip6_frag *frag = (struct ip6_frag *) (ip6 + 1);
231 ASSERT_GE(len, sizeof(*ip6) + sizeof(*frag))
236 if (!is_ipv6_fragment(ip6, len)) {
237 payload_length = len - sizeof(*ip6) - sizeof(*frag);
241 protocol = ip6->ip6_nxt;
242 payload = ip6 + 1;
243 payload_length = len - sizeof(*ip6);
248 pseudo_checksum = ipv6_pseudo_header_checksum(ip6, payload_length, protocol);
289 struct ip6_hdr *ip6 = NULL;
323 ASSERT_EQ(pos, ipv6_fragment_offset(frag) * 8 + ((i != 0) ? sizeof(*ip6): 0))
329 ip6 = (struct ip6_hdr *) reassembled;
364 if (ip6) {
365 ip6->ip6_nxt = protocol;
366 ip6->ip6_plen = htons(total_length - sizeof(*ip6));
367 ASSERT_FALSE(is_ipv6_fragment(ip6, ip6->ip6_plen))
408 struct ip6_hdr *ip6 = (struct ip6_hdr *) packet;
409 udp = (struct udphdr *) (ip6 + 1);
410 pseudo_checksum = ipv6_pseudo_header_checksum(ip6, ntohs(udp->len), IPPROTO_UDP);
520 struct ip6_hdr *ip6;
535 ip6 = (struct ip6_hdr *) packet;
536 protocol = ip6->ip6_nxt;
537 payload = ip6 + 1;
819 uint8_t ip6[] = { IPV6_UDP_HEADER };
821 uint32_t ipv6_pseudo_sum = ipv6_pseudo_header_checksum((struct ip6_hdr *) ip6, UDP_LEN,
931 struct ip6_hdr *ip6 = (struct ip6_hdr *) udp_ipv6;
932 memcpy(&ip6->ip6_src, &Global_Clatd_Config.ipv6_local_subnet, sizeof(ip6->ip6_src));