Lines Matching refs:ipv4
43 get_tuple(struct __sk_buff *skb, bool *ipv4, bool *tcp) in get_tuple() argument
67 *ipv4 = true; in get_tuple()
76 *ipv4 = false; in get_tuple()
90 handle_udp(struct __sk_buff *skb, struct bpf_sock_tuple *tuple, bool ipv4) in handle_udp() argument
99 tuple_len = ipv4 ? sizeof(tuple->ipv4) : sizeof(tuple->ipv6); in handle_udp()
107 dport = ipv4 ? tuple->ipv4.dport : tuple->ipv6.dport; in handle_udp()
122 handle_tcp(struct __sk_buff *skb, struct bpf_sock_tuple *tuple, bool ipv4) in handle_tcp() argument
131 tuple_len = ipv4 ? sizeof(tuple->ipv4) : sizeof(tuple->ipv6); in handle_tcp()
142 dport = ipv4 ? tuple->ipv4.dport : tuple->ipv6.dport; in handle_tcp()
165 bool ipv4 = false; in bpf_sk_assign_test() local
170 tuple = get_tuple(skb, &ipv4, &tcp); in bpf_sk_assign_test()
180 ret = handle_tcp(skb, tuple, ipv4); in bpf_sk_assign_test()
182 ret = handle_udp(skb, tuple, ipv4); in bpf_sk_assign_test()