Lines Matching full:ipv6
62 struct ipv6hdr *ipv6; member
101 ctx->ipv6 = (struct ipv6hdr *)(ctx->eth + 1); in tcp_load_headers()
103 if (ctx->ipv6 + 1 > ctx->data_end) in tcp_load_headers()
106 if (ctx->ipv6->version != 6) in tcp_load_headers()
109 if (ctx->ipv6->nexthdr != NEXTHDR_TCP) in tcp_load_headers()
112 ctx->tcp = (struct tcphdr *)(ctx->ipv6 + 1); in tcp_load_headers()
145 ctx->ipv6 = NULL; in tcp_reload_headers()
149 ctx->ipv6 = (struct ipv6hdr *)(ctx->eth + 1); in tcp_reload_headers()
150 ctx->tcp = (struct tcphdr *)(ctx->ipv6 + 1); in tcp_reload_headers()
169 return csum_ipv6_magic(&ctx->ipv6->saddr, &ctx->ipv6->daddr, in tcp_v6_csum()
193 } else if (ctx->ipv6) { in tcp_validate_header()
294 (ctx->ipv6 && ctx->attrs.mss != MSS_LOCAL_IPV6)) in tcp_validate_sysctl()
329 } else if (ctx->ipv6) { in tcp_prepare_cookie()
336 first = (u64)ctx->ipv6->saddr.in6_u.u6_addr8[0] << 32 | in tcp_prepare_cookie()
337 ctx->ipv6->daddr.in6_u.u6_addr32[0]; in tcp_prepare_cookie()
443 } else if (ctx->ipv6) { in tcp_handle_syn()
444 swap(ctx->ipv6->saddr, ctx->ipv6->daddr); in tcp_handle_syn()
447 *(__be32 *)ctx->ipv6 = bpf_htonl(0x60000000); in tcp_handle_syn()
448 ctx->ipv6->payload_len = bpf_htons((long)ctx->ptr32 - (long)ctx->tcp); in tcp_handle_syn()
449 ctx->ipv6->hop_limit = 64; in tcp_handle_syn()
472 else if (ctx->ipv6) in tcp_validate_cookie()
473 first = (u64)ctx->ipv6->saddr.in6_u.u6_addr8[0] << 32 | in tcp_validate_cookie()
474 ctx->ipv6->daddr.in6_u.u6_addr32[0]; in tcp_validate_cookie()
519 } else if (ctx->ipv6) { in tcp_handle_ack()
520 __builtin_memcpy(tuple.ipv6.saddr, &ctx->ipv6->saddr, sizeof(tuple.ipv6.saddr)); in tcp_handle_ack()
521 __builtin_memcpy(tuple.ipv6.daddr, &ctx->ipv6->daddr, sizeof(tuple.ipv6.daddr)); in tcp_handle_ack()
522 tuple.ipv6.sport = ctx->tcp->source; in tcp_handle_ack()
523 tuple.ipv6.dport = ctx->tcp->dest; in tcp_handle_ack()
524 tuple_size = sizeof(tuple.ipv6); in tcp_handle_ack()