Home
last modified time | relevance | path

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

/external/selinux/libsepol/cil/test/unit/
Dtest_cil_post.c407 struct cil_nodecon *bnodecon; in test_cil_post_nodecon_compare_aipv4_bipv6() local
408 cil_nodecon_init(&bnodecon); in test_cil_post_nodecon_compare_aipv4_bipv6()
409 cil_ipaddr_init(&bnodecon->addr); in test_cil_post_nodecon_compare_aipv4_bipv6()
410 cil_ipaddr_init(&bnodecon->mask); in test_cil_post_nodecon_compare_aipv4_bipv6()
416 bnodecon->addr->ip.v4.s_addr = 100; in test_cil_post_nodecon_compare_aipv4_bipv6()
417 bnodecon->mask->ip.v4.s_addr = 100; in test_cil_post_nodecon_compare_aipv4_bipv6()
418 bnodecon->addr->family = AF_INET6; 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()
430 struct cil_nodecon *bnodecon; in test_cil_post_nodecon_compare_aipv6_bipv4() local
431 cil_nodecon_init(&bnodecon); in test_cil_post_nodecon_compare_aipv6_bipv4()
[all …]
/external/selinux/libsepol/cil/src/
Dcil_post.c326 struct cil_nodecon *bnodecon; in cil_post_nodecon_compare() local
328 bnodecon = *(struct cil_nodecon**)b; in cil_post_nodecon_compare()
331 if (anodecon->addr->family != bnodecon->addr->family) { 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()