Lines Matching refs:ipv4
44 get_tuple(struct __sk_buff *skb, bool *ipv4, bool *tcp) in get_tuple() argument
68 *ipv4 = true; in get_tuple()
77 *ipv4 = false; in get_tuple()
91 handle_udp(struct __sk_buff *skb, struct bpf_sock_tuple *tuple, bool ipv4) in handle_udp() argument
100 tuple_len = ipv4 ? sizeof(tuple->ipv4) : sizeof(tuple->ipv6); in handle_udp()
108 dport = ipv4 ? tuple->ipv4.dport : tuple->ipv6.dport; in handle_udp()
123 handle_tcp(struct __sk_buff *skb, struct bpf_sock_tuple *tuple, bool ipv4) in handle_tcp() argument
132 tuple_len = ipv4 ? sizeof(tuple->ipv4) : sizeof(tuple->ipv6); in handle_tcp()
143 dport = ipv4 ? tuple->ipv4.dport : tuple->ipv6.dport; in handle_tcp()
166 bool ipv4 = false; in bpf_sk_assign_test() local
171 tuple = get_tuple(skb, &ipv4, &tcp); in bpf_sk_assign_test()
181 ret = handle_tcp(skb, tuple, ipv4); in bpf_sk_assign_test()
183 ret = handle_udp(skb, tuple, ipv4); in bpf_sk_assign_test()