Lines Matching refs:family

33 				int family, int sotype, int mapfd)  in test_insert_invalid()  argument
51 int family, int sotype, int mapfd) in test_insert_opened() argument
57 s = xsocket(family, sotype, 0); in test_insert_opened()
73 int family, int sotype, int mapfd) in test_insert_bound() argument
81 init_addr_loopback(family, &addr, &len); in test_insert_bound()
83 s = xsocket(family, sotype, 0); in test_insert_bound()
101 int family, int sotype, int mapfd) in test_insert() argument
107 s = socket_loopback(family, sotype); in test_insert()
118 int family, int sotype, int mapfd) in test_delete_after_insert() argument
124 s = socket_loopback(family, sotype); in test_delete_after_insert()
136 int family, int sotype, int mapfd) in test_delete_after_close() argument
142 s = socket_loopback(family, sotype); in test_delete_after_close()
160 int family, int sotype, int mapfd) in test_lookup_after_insert() argument
167 s = socket_loopback(family, sotype); in test_lookup_after_insert()
189 int family, int sotype, int mapfd) in test_lookup_after_delete() argument
195 s = socket_loopback(family, sotype); in test_lookup_after_delete()
213 int family, int sotype, int mapfd) in test_lookup_32_bit_value() argument
218 s = socket_loopback(family, sotype); in test_lookup_32_bit_value()
244 int family, int sotype, int mapfd) in test_update_existing() argument
250 s1 = socket_loopback(family, sotype); in test_update_existing()
254 s2 = socket_loopback(family, sotype); in test_update_existing()
272 static void do_destroy_orphan_child(int family, int sotype, int mapfd) in do_destroy_orphan_child() argument
280 s = socket_loopback(family, sotype); in do_destroy_orphan_child()
293 c = xsocket(family, sotype, 0); in do_destroy_orphan_child()
304 int family, int sotype, int mapfd) in test_destroy_orphan_child() argument
323 do_destroy_orphan_child(family, sotype, mapfd); in test_destroy_orphan_child()
334 int family, int sotype, int mapfd) in test_clone_after_delete() argument
342 s = socket_loopback(family, sotype); in test_clone_after_delete()
356 c = xsocket(family, sotype, 0); in test_clone_after_delete()
371 int family, int sotype, int mapfd) in test_accept_after_delete() argument
379 s = socket_loopback(family, sotype | SOCK_NONBLOCK); in test_accept_after_delete()
393 c = xsocket(family, sotype, 0); in test_accept_after_delete()
426 int family, int sotype, int mapfd) in test_accept_before_delete() argument
434 s = socket_loopback(family, sotype | SOCK_NONBLOCK); in test_accept_before_delete()
448 c = xsocket(family, sotype, 0); in test_accept_before_delete()
487 int family, socktype; in connect_accept_thread() local
498 len = sizeof(family); in connect_accept_thread()
499 err = xgetsockopt(s, SOL_SOCKET, SO_DOMAIN, &family, &len); in connect_accept_thread()
511 c = xsocket(family, socktype, 0); in connect_accept_thread()
536 int family, int sotype, int mapfd) in test_syn_recv_insert_delete() argument
546 s = socket_loopback(family, sotype | SOCK_NONBLOCK); in test_syn_recv_insert_delete()
600 int family, int socktype, int mapfd) in test_race_insert_listen() argument
609 s = xsocket(family, socktype, 0); in test_race_insert_listen()
674 static void redir_to_connected(int family, int sotype, int sock_mapfd, in redir_to_connected() argument
686 s = socket_loopback(family, sotype | SOCK_NONBLOCK); in redir_to_connected()
690 err = create_socket_pairs(s, family, sotype, &c0, &c1, &p0, &p1); in redir_to_connected()
728 struct bpf_map *inner_map, int family, in test_skb_redir_to_connected() argument
744 redir_to_connected(family, sotype, sock_map, verdict_map, in test_skb_redir_to_connected()
753 struct bpf_map *inner_map, int family, in test_msg_redir_to_connected() argument
765 redir_to_connected(family, sotype, sock_map, verdict_map, REDIR_EGRESS); in test_msg_redir_to_connected()
770 static void redir_to_listening(int family, int sotype, int sock_mapfd, in redir_to_listening() argument
782 s = socket_loopback(family, sotype | SOCK_NONBLOCK); in redir_to_listening()
791 c = xsocket(family, sotype, 0); in redir_to_listening()
830 struct bpf_map *inner_map, int family, in test_skb_redir_to_listening() argument
846 redir_to_listening(family, sotype, sock_map, verdict_map, in test_skb_redir_to_listening()
855 struct bpf_map *inner_map, int family, in test_msg_redir_to_listening() argument
867 redir_to_listening(family, sotype, sock_map, verdict_map, REDIR_EGRESS); in test_msg_redir_to_listening()
872 static void redir_partial(int family, int sotype, int sock_map, int parser_map) in redir_partial() argument
884 s = socket_loopback(family, sotype | SOCK_NONBLOCK); in redir_partial()
888 err = create_socket_pairs(s, family, sotype, &c0, &c1, &p0, &p1); in redir_partial()
919 struct bpf_map *inner_map, int family, in test_skb_redir_partial() argument
936 redir_partial(family, sotype, sock_map, parser_map); in test_skb_redir_partial()
943 static void test_reuseport_select_listening(int family, int sotype, in test_reuseport_select_listening() argument
956 s = socket_loopback_reuseport(family, sotype | SOCK_NONBLOCK, in test_reuseport_select_listening()
972 c = xsocket(family, sotype, 0); in test_reuseport_select_listening()
1012 static void test_reuseport_select_connected(int family, int sotype, in test_reuseport_select_connected() argument
1025 s = socket_loopback_reuseport(family, sotype, reuseport_prog); in test_reuseport_select_connected()
1041 c0 = xsocket(family, sotype, 0); in test_reuseport_select_connected()
1054 p0 = xsocket(family, sotype, 0); in test_reuseport_select_connected()
1075 c1 = xsocket(family, sotype, 0); in test_reuseport_select_connected()
1118 static void test_reuseport_mixed_groups(int family, int sotype, int sock_map, in test_reuseport_mixed_groups() argument
1130 s1 = socket_loopback_reuseport(family, sotype, reuseport_prog); in test_reuseport_mixed_groups()
1134 s2 = socket_loopback_reuseport(family, sotype, reuseport_prog); in test_reuseport_mixed_groups()
1148 c = xsocket(family, sotype, 0); in test_reuseport_mixed_groups()
1204 static const char *family_str(sa_family_t family) in family_str() argument
1206 switch (family) { in family_str()
1251 int family, int sotype) in test_ops() argument
1255 int family, int sotype, int mapfd); in test_ops()
1287 family_name = family_str(family); in test_ops()
1302 t->fn(skel, family, sotype, map_fd); in test_ops()
1308 int family, int sotype) in test_redir() argument
1312 struct bpf_map *map, int family, int sotype); in test_redir()
1325 family_name = family_str(family); in test_redir()
1335 t->fn(skel, map, family, sotype); in test_redir()
1580 struct bpf_map *map, int family, int sotype) in test_reuseport() argument
1583 void (*fn)(int family, int sotype, int socket_map, in test_reuseport()
1597 family_name = family_str(family); in test_reuseport()
1615 t->fn(family, sotype, socket_map, verdict_map, reuseport_prog); in test_reuseport()
1619 static int inet_socketpair(int family, int type, int *s, int *c) in inet_socketpair() argument
1626 p0 = socket_loopback(family, type | SOCK_NONBLOCK); in inet_socketpair()
1635 c0 = xsocket(family, type | SOCK_NONBLOCK, 0); in inet_socketpair()
1661 static void udp_redir_to_connected(int family, int sock_mapfd, int verd_mapfd, in udp_redir_to_connected() argument
1673 err = inet_socketpair(family, SOCK_DGRAM, &p0, &c0); in udp_redir_to_connected()
1676 err = inet_socketpair(family, SOCK_DGRAM, &p1, &c1); in udp_redir_to_connected()
1714 struct bpf_map *inner_map, int family) in udp_skb_redir_to_connected() argument
1726 udp_redir_to_connected(family, sock_map, verdict_map, REDIR_EGRESS); in udp_skb_redir_to_connected()
1728 udp_redir_to_connected(family, sock_map, verdict_map, REDIR_INGRESS); in udp_skb_redir_to_connected()
1734 int family) in test_udp_redir() argument
1739 family_name = family_str(family); in test_udp_redir()
1744 udp_skb_redir_to_connected(skel, map, family); in test_udp_redir()
1747 static void inet_unix_redir_to_connected(int family, int type, int sock_mapfd, in inet_unix_redir_to_connected() argument
1764 err = inet_socketpair(family, SOCK_DGRAM, &p1, &c1); in inet_unix_redir_to_connected()
1802 struct bpf_map *inner_map, int family) in inet_unix_skb_redir_to_connected() argument
1814 inet_unix_redir_to_connected(family, SOCK_DGRAM, sock_map, verdict_map, in inet_unix_skb_redir_to_connected()
1816 inet_unix_redir_to_connected(family, SOCK_STREAM, sock_map, verdict_map, in inet_unix_skb_redir_to_connected()
1819 inet_unix_redir_to_connected(family, SOCK_DGRAM, sock_map, verdict_map, in inet_unix_skb_redir_to_connected()
1821 inet_unix_redir_to_connected(family, SOCK_STREAM, sock_map, verdict_map, in inet_unix_skb_redir_to_connected()
1827 static void unix_inet_redir_to_connected(int family, int type, int sock_mapfd, in unix_inet_redir_to_connected() argument
1840 err = inet_socketpair(family, SOCK_DGRAM, &p0, &c0); in unix_inet_redir_to_connected()
1883 struct bpf_map *inner_map, int family) in unix_inet_skb_redir_to_connected() argument
1895 unix_inet_redir_to_connected(family, SOCK_DGRAM, sock_map, verdict_map, in unix_inet_skb_redir_to_connected()
1897 unix_inet_redir_to_connected(family, SOCK_STREAM, sock_map, verdict_map, in unix_inet_skb_redir_to_connected()
1900 unix_inet_redir_to_connected(family, SOCK_DGRAM, sock_map, verdict_map, in unix_inet_skb_redir_to_connected()
1902 unix_inet_redir_to_connected(family, SOCK_STREAM, sock_map, verdict_map, in unix_inet_skb_redir_to_connected()
1909 int family) in test_udp_unix_redir() argument
1914 family_name = family_str(family); in test_udp_unix_redir()
1919 inet_unix_skb_redir_to_connected(skel, map, family); in test_udp_unix_redir()
1920 unix_inet_skb_redir_to_connected(skel, map, family); in test_udp_unix_redir()
1924 int family) in run_tests() argument
1926 test_ops(skel, map, family, SOCK_STREAM); in run_tests()
1927 test_ops(skel, map, family, SOCK_DGRAM); in run_tests()
1928 test_redir(skel, map, family, SOCK_STREAM); in run_tests()
1929 test_reuseport(skel, map, family, SOCK_STREAM); in run_tests()
1930 test_reuseport(skel, map, family, SOCK_DGRAM); in run_tests()
1931 test_udp_redir(skel, map, family); in run_tests()
1932 test_udp_unix_redir(skel, map, family); in run_tests()