Lines Matching defs:as

63 	 * NB: ACL_POLICY_RADIUS must be the same value as
100 struct aclstate *as;
102 as = (struct aclstate *) malloc(sizeof(struct aclstate),
104 if (as == NULL)
106 ACL_LOCK_INIT(as, "acl");
107 TAILQ_INIT(&as->as_list);
108 as->as_policy = ACL_POLICY_OPEN;
109 as->as_vap = vap;
110 vap->iv_as = as;
118 struct aclstate *as = vap->iv_as;
125 ACL_LOCK_DESTROY(as);
126 free(as, M_80211_ACL);
130 _find_acl(struct aclstate *as, const uint8_t *macaddr)
136 LIST_FOREACH(acl, &as->as_hash[hash], acl_hash) {
144 _acl_free(struct aclstate *as, struct acl *acl)
146 ACL_LOCK_ASSERT(as);
148 TAILQ_REMOVE(&as->as_list, acl, acl_list);
151 as->as_nacls--;
157 struct aclstate *as = vap->iv_as;
159 switch (as->as_policy) {
164 return _find_acl(as, wh->i_addr2) != NULL;
166 return _find_acl(as, wh->i_addr2) == NULL;
174 struct aclstate *as = vap->iv_as;
186 ACL_LOCK(as);
188 LIST_FOREACH(acl, &as->as_hash[hash], acl_hash) {
190 ACL_UNLOCK(as);
199 TAILQ_INSERT_TAIL(&as->as_list, new, acl_list);
200 LIST_INSERT_HEAD(&as->as_hash[hash], new, acl_hash);
201 as->as_nacls++;
202 ACL_UNLOCK(as);
212 struct aclstate *as = vap->iv_as;
215 ACL_LOCK(as);
216 acl = _find_acl(as, mac);
218 _acl_free(as, acl);
219 ACL_UNLOCK(as);
231 struct aclstate *as = vap->iv_as;
236 ACL_LOCK(as);
237 while ((acl = TAILQ_FIRST(&as->as_list)) != NULL)
238 _acl_free(as, acl);
239 ACL_UNLOCK(as);
247 struct aclstate *as = vap->iv_as;
254 as->as_policy = ACL_POLICY_OPEN;
257 as->as_policy = ACL_POLICY_ALLOW;
260 as->as_policy = ACL_POLICY_DENY;
263 as->as_policy = ACL_POLICY_RADIUS;
274 struct aclstate *as = vap->iv_as;
276 return as->as_policy;
289 struct aclstate *as = vap->iv_as;
297 ireq->i_val = as->as_policy;
300 space = as->as_nacls * IEEE80211_ADDR_LEN;
310 ACL_LOCK(as);
311 TAILQ_FOREACH(acl, &as->as_list, acl_list) {
315 ACL_UNLOCK(as);