Lines Matching refs:ip6
78 const struct ipv6hdr* const ip6 = is_ethernet ? (void*)(eth + 1) : data; in nat64() local
81 if (data + l2_header_size + sizeof(*ip6) > data_end) return TC_ACT_PIPE; in nat64()
87 if (ip6->version != 6) return TC_ACT_PIPE; in nat64()
96 if (ntohs(ip6->payload_len) > 0xFFFF - sizeof(struct iphdr)) return TC_ACT_PIPE; in nat64()
102 ip6->saddr.in6_u.u6_addr32[0], in nat64()
103 ip6->saddr.in6_u.u6_addr32[1], in nat64()
104 ip6->saddr.in6_u.u6_addr32[2], in nat64()
106 .local6 = ip6->daddr, in nat64()
113 __u8 proto = ip6->nexthdr; in nat64()
116 __u16 tot_len = ntohs(ip6->payload_len) + sizeof(struct iphdr); // cannot overflow, see above in nat64()
123 if (data + l2_header_size + sizeof(*ip6) + sizeof(struct frag_hdr) > data_end) in nat64()
125 const struct frag_hdr *frag = (const struct frag_hdr *)(ip6 + 1); in nat64()
167 .tos = (ip6->priority << 4) + (ip6->flow_lbl[0] >> 4), // u8 in nat64()
171 .ttl = ip6->hop_limit, // u8 in nat64()
174 .saddr = ip6->saddr.in6_u.u6_addr32[3], // be32 in nat64()
191 for (int i = 0; i < sizeof(*ip6) / sizeof(__u16); ++i) { in nat64()
192 sum6 += ~((__u16*)ip6)[i]; // note the bitwise negation in nat64()
375 struct ipv6hdr ip6 = { variable
385 ip6.daddr.in6_u.u6_addr32[3] = ip4->daddr;
390 for (int i = 0; i < sizeof(ip6) / sizeof(__u16); ++i) {
391 sum6 += ((__u16*)&ip6)[i];
418 if (data + sizeof(ip6) > data_end) return TC_ACT_SHOT;
421 *(struct ipv6hdr*)data = ip6;