Lines Matching refs:ifindex
230 static void test_in_addr_ifindex_to_string_one(int f, const char *a, int ifindex, const char *b) { in test_in_addr_ifindex_to_string_one() argument
236 assert_se(in_addr_ifindex_to_string(f, &ua, ifindex, &r) >= 0); in test_in_addr_ifindex_to_string_one()
243 assert_se(ifindex2 == ifindex || ifindex2 == 0); in test_in_addr_ifindex_to_string_one()
259 int family, ifindex; in TEST() local
264 assert_se(in_addr_ifindex_from_string_auto("fe80::17", &family, &ua, &ifindex) >= 0); in TEST()
266 assert_se(ifindex == 0); in TEST()
268 assert_se(in_addr_ifindex_from_string_auto("fe80::18%19", &family, &ua, &ifindex) >= 0); in TEST()
270 assert_se(ifindex == 19); in TEST()
272 assert_se(in_addr_ifindex_from_string_auto("fe80::18%lo", &family, &ua, &ifindex) >= 0); in TEST()
274 assert_se(ifindex == LOOPBACK_IFINDEX); in TEST()
276 …dr_ifindex_from_string_auto("fe80::19%thisinterfacecantexist", &family, &ua, &ifindex) == -ENODEV); in TEST()
280 int family, ifindex; in test_in_addr_ifindex_name_from_string_auto_one() local
284 … assert_se(in_addr_ifindex_name_from_string_auto(a, &family, &ua, &ifindex, &server_name) >= 0); in test_in_addr_ifindex_name_from_string_auto_one()
295 …ddr_port_ifindex_name_from_string_auto_one(const char *str, int family, uint16_t port, int ifindex, in test_in_addr_port_ifindex_name_from_string_auto_one() argument
309 assert_se(ifindex == i); in test_in_addr_port_ifindex_name_from_string_auto_one()
321 assert_se(ifindex == i); in test_in_addr_port_ifindex_name_from_string_auto_one()
327 if (ifindex > 0) in test_in_addr_port_ifindex_name_from_string_auto_one()
346 assert_se(ifindex == i); in test_in_addr_port_ifindex_name_from_string_auto_one()