Home
last modified time | relevance | path

Searched refs:anodecon (Results 1 – 2 of 2) sorted by relevance

/external/selinux/libsepol/cil/test/unit/
Dtest_cil_post.c402 struct cil_nodecon *anodecon; in test_cil_post_nodecon_compare_aipv4_bipv6() local
403 cil_nodecon_init(&anodecon); in test_cil_post_nodecon_compare_aipv4_bipv6()
404 cil_ipaddr_init(&anodecon->addr); in test_cil_post_nodecon_compare_aipv4_bipv6()
405 cil_ipaddr_init(&anodecon->mask); in test_cil_post_nodecon_compare_aipv4_bipv6()
412 anodecon->addr->ip.v4.s_addr = 103; in test_cil_post_nodecon_compare_aipv4_bipv6()
413 anodecon->mask->ip.v4.s_addr = 100; in test_cil_post_nodecon_compare_aipv4_bipv6()
414 anodecon->addr->family = AF_INET; in test_cil_post_nodecon_compare_aipv4_bipv6()
420 int rc = cil_post_nodecon_compare(&anodecon, &bnodecon); in test_cil_post_nodecon_compare_aipv4_bipv6()
425 struct cil_nodecon *anodecon; in test_cil_post_nodecon_compare_aipv6_bipv4() local
426 cil_nodecon_init(&anodecon); in test_cil_post_nodecon_compare_aipv6_bipv4()
[all …]
/external/selinux/libsepol/cil/src/
Dcil_post.c325 struct cil_nodecon *anodecon; in cil_post_nodecon_compare() local
327 anodecon = *(struct cil_nodecon**)a; in cil_post_nodecon_compare()
331 if (anodecon->addr->family != bnodecon->addr->family) { in cil_post_nodecon_compare()
332 if (anodecon->addr->family == AF_INET) { in cil_post_nodecon_compare()
340 if (anodecon->addr->family == AF_INET) { in cil_post_nodecon_compare()
341 int rc = memcmp(&anodecon->mask->ip.v4, &bnodecon->mask->ip.v4, sizeof(anodecon->mask->ip.v4)); in cil_post_nodecon_compare()
345 return memcmp(&anodecon->addr->ip.v4, &bnodecon->addr->ip.v4, sizeof(anodecon->addr->ip.v4)); in cil_post_nodecon_compare()
347 int rc = memcmp(&anodecon->mask->ip.v6, &bnodecon->mask->ip.v6, sizeof(anodecon->mask->ip.v6)); in cil_post_nodecon_compare()
351 return memcmp(&anodecon->addr->ip.v6, &bnodecon->addr->ip.v6, sizeof(anodecon->addr->ip.v6)); in cil_post_nodecon_compare()