• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/bind9-45.101/bind9/lib/dns/

Lines Matching refs:acl

29 #include <dns/acl.h>
40 dns_acl_t *acl;
48 acl = isc_mem_get(mctx, sizeof(*acl));
49 if (acl == NULL)
51 acl->mctx = mctx;
52 acl->name = NULL;
54 result = isc_refcount_init(&acl->refcount, 1);
56 isc_mem_put(mctx, acl, sizeof(*acl));
60 result = dns_iptable_create(mctx, &acl->iptable);
62 isc_mem_put(mctx, acl, sizeof(*acl));
66 acl->elements = NULL;
67 acl->alloc = 0;
68 acl->length = 0;
69 acl->has_negatives = ISC_FALSE;
71 ISC_LINK_INIT(acl, nextincache);
75 acl->magic = DNS_ACL_MAGIC;
77 acl->elements = isc_mem_get(mctx, n * sizeof(dns_aclelement_t));
78 if (acl->elements == NULL) {
82 acl->alloc = n;
83 memset(acl->elements, 0, n * sizeof(dns_aclelement_t));
84 *target = acl;
88 dns_acl_detach(&acl);
101 dns_acl_t *acl = NULL;
103 result = dns_acl_create(mctx, 0, &acl);
107 result = dns_iptable_addprefix(acl->iptable, NULL, 0, ISC_TF(!neg));
109 dns_acl_detach(&acl);
113 *target = acl;
134 * If pos is ISC_TRUE, test whether acl is set to "{ any; }"
135 * If pos is ISC_FALSE, test whether acl is set to "{ none; }"
138 dns_acl_isanyornone(dns_acl_t *acl, isc_boolean_t pos)
141 if (acl == NULL ||
142 acl->iptable == NULL ||
143 acl->iptable->radix == NULL ||
144 acl->iptable->radix->head == NULL ||
145 acl->iptable->radix->head->prefix == NULL)
148 if (acl->length != 0 || acl->node_count != 1)
151 if (acl->iptable->radix->head->prefix->bitlen == 0 &&
152 acl->iptable->radix->head->data[0] != NULL &&
153 acl->iptable->radix->head->data[0] ==
154 acl->iptable->radix->head->data[1] &&
155 *(isc_boolean_t *) (acl->iptable->radix->head->data[0]) == pos)
162 * Test whether acl is set to "{ any; }"
165 dns_acl_isany(dns_acl_t *acl)
167 return (dns_acl_isanyornone(acl, ISC_TRUE));
171 * Test whether acl is set to "{ none; }"
174 dns_acl_isnone(dns_acl_t *acl)
176 return (dns_acl_isanyornone(acl, ISC_FALSE));
188 const dns_acl_t *acl,
223 result = isc_radix_search(acl->iptable->radix, &node, &pfx);
235 for (i = 0; i < acl->length; i++) {
236 dns_aclelement_t *e = &acl->elements[i];
320 /* Duplicate nested acl. */
336 /* reverse sense of positives if this is a negative acl */
475 dns_acl_t *acl = *aclp;
478 REQUIRE(DNS_ACL_VALID(acl));
480 isc_refcount_decrement(&acl->refcount, &refs);
482 destroy(acl);
535 * Return ISC_TRUE iff the acl 'a' is considered insecure, that is,