Lines Matching full:family

47 	sa_family_t family;  member
138 static void sa46_init_loopback(union sa46 *sa, sa_family_t family) in sa46_init_loopback() argument
141 sa->family = family; in sa46_init_loopback()
142 if (sa->family == AF_INET6) in sa46_init_loopback()
148 static void sa46_init_inany(union sa46 *sa, sa_family_t family) in sa46_init_inany() argument
151 sa->family = family; in sa46_init_inany()
152 if (sa->family == AF_INET6) in sa46_init_inany()
227 static void check_data(int type, sa_family_t family, const struct cmd *cmd, in check_data() argument
253 if (family == AF_INET6) { in check_data()
364 static int send_data(int type, sa_family_t family, void *data, size_t len, in send_data() argument
370 fd = socket(family, type, 0); in send_data()
373 sa46_init_loopback(&cli_sa, family); in send_data()
380 "sendto()", "family:%u err:%d errno:%d expected:%d\n", in send_data()
381 family, err, errno, expected); in send_data()
386 static void do_test(int type, sa_family_t family, struct cmd *cmd, in do_test() argument
394 cli_fd = send_data(type, family, cmd, cmd ? sizeof(*cmd) : 0, in do_test()
402 "nev:%d expected:%d type:%d family:%d data:(%d, %d)\n", in do_test()
403 nev, expected, type, family, in do_test()
407 check_data(type, family, cmd, cli_fd); in do_test()
444 static void test_err_inner_map(int type, sa_family_t family) in test_err_inner_map() argument
452 do_test(type, family, &cmd, DROP_ERR_INNER_MAP); in test_err_inner_map()
455 static void test_err_skb_data(int type, sa_family_t family) in test_err_skb_data() argument
458 do_test(type, family, NULL, DROP_ERR_SKB_DATA); in test_err_skb_data()
461 static void test_err_sk_select_port(int type, sa_family_t family) in test_err_sk_select_port() argument
469 do_test(type, family, &cmd, DROP_ERR_SK_SELECT_REUSEPORT); in test_err_sk_select_port()
472 static void test_pass(int type, sa_family_t family) in test_pass() argument
481 do_test(type, family, &cmd, PASS); in test_pass()
485 static void test_syncookie(int type, sa_family_t family) in test_syncookie() argument
510 do_test(type, family, &cmd, PASS); in test_syncookie()
520 static void test_pass_on_err(int type, sa_family_t family) in test_pass_on_err() argument
528 do_test(type, family, &cmd, PASS_ERR_SK_SELECT_REUSEPORT); in test_pass_on_err()
531 static void test_detach_bpf(int type, sa_family_t family) in test_detach_bpf() argument
558 cli_fd = send_data(type, family, &cmd, sizeof(cmd), PASS); in test_detach_bpf()
563 "nev:%d expected:1 type:%d family:%d data:(0, 0)\n", in test_detach_bpf()
564 nev, type, family); in test_detach_bpf()
584 static void prepare_sk_fds(int type, sa_family_t family, bool inany) in prepare_sk_fds() argument
592 sa46_init_inany(&srv_sa, family); in prepare_sk_fds()
594 sa46_init_loopback(&srv_sa, family); in prepare_sk_fds()
602 sk_fds[i] = socket(family, type, 0); in prepare_sk_fds()
658 static void setup_per_test(int type, sa_family_t family, bool inany, in setup_per_test() argument
663 prepare_sk_fds(type, family, inany); in setup_per_test()
742 static const char *family_str(sa_family_t family) in family_str() argument
744 switch (family) { in family_str()
768 static void test_config(int sotype, sa_family_t family, bool inany) in test_config() argument
771 void (*fn)(int sotype, sa_family_t family); in test_config()
796 family_str(family), sotype_str(sotype), in test_config()
811 setup_per_test(sotype, family, inany, t->no_inner_map); in test_config()
812 t->fn(sotype, family); in test_config()
826 sa_family_t family; in test_all() member
839 test_config(c->sotype, c->family, c->inany); in test_all()