Lines Matching refs:res

118 	restrict_u *	res,
126 inet_ntop(AF_INET6, &res->u.v6.addr, as, sizeof as);
127 inet_ntop(AF_INET6, &res->u.v6.mask, ms, sizeof ms);
131 sia.s_addr = htonl(res->u.v4.addr);
132 sim.s_addr = htonl(res->u.v4.addr);
137 as, ms, res->count, res->ippeerlimit,
138 mflags_str(res->mflags),
139 rflags_str(res->rflags));
140 if (res->expire > 0) {
141 printf(" expire %u\n", res->expire);
154 restrict_u * res;
158 for (res = restrictlist4; res != NULL; res = res->link) {
159 dump_restrict(res, 0);
164 for (res = restrictlist6; res != NULL; res = res->link) {
165 dump_restrict(res, 1);
230 restrict_u* res;
233 UNLINK_HEAD_SLIST(res, resfree4, link);
234 if (res != NULL) {
235 return res;
239 res = (void *)((char *)rl + (count - 1) * cb);
241 LINK_SLIST(resfree4, res, link);
242 res = (void *)((char *)res - cb);
244 DEBUG_INSIST(rl == res);
246 return res;
256 restrict_u * res;
259 UNLINK_HEAD_SLIST(res, resfree6, link);
260 if (res != NULL) {
261 return res;
265 res = (void *)((char *)rl + (count - 1) * cb);
267 LINK_SLIST(resfree6, res, link);
268 res = (void *)((char *)res - cb);
270 DEBUG_INSIST(rl == res);
272 return res;
278 restrict_u * res,
288 if (RES_LIMITED & res->rflags) {
300 UNLINK_SLIST(unlinked, *rlisthead_ptr, res, link, restrict_u);
301 INSIST(unlinked == res);
302 zero_mem(res, sz);
303 LINK_SLIST(*flisthead_ptr, res, link);
334 restrict_u * res;
337 for (res = restrictlist4; res != NULL; res = next) {
338 next = res->link;
339 if (res->expire && res->expire <= current_time) {
340 free_res(res, v6); /* zeroes the contents */
342 if ( res->u.v4.addr == (addr & res->u.v4.mask)
343 && ( !(RESM_NTPONLY & res->mflags)
349 return res;
360 restrict_u * res;
364 for (res = restrictlist6; res != NULL; res = next) {
365 next = res->link;
366 if (res->expire && res->expire <= current_time) {
367 free_res(res, v6);
369 MASK_IPV6_ADDR(&masked, addr, &res->u.v6.mask);
370 if (ADDR6_EQ(&masked, &res->u.v6.addr)
371 && ( !(RESM_NTPONLY & res->mflags)
377 return res;
396 restrict_u *res;
408 for (res = rlist; res != NULL; res = res->link) {
409 if (res->mflags == pmatch->mflags &&
410 !memcmp(&res->u, &pmatch->u, cb)) {
414 return res;
616 restrict_u * res;
676 res = match_restrict_entry(&match, v6);
685 if (NULL != res) {
687 && !(RES_LIMITED & res->rflags)) {
691 res->rflags |= rflags;
692 res->expire = expire;
698 res = alloc_res6();
699 memcpy(res, &match, V6_SIZEOF_RESTRICT_U);
703 res = alloc_res4();
704 memcpy(res, &match, V4_SIZEOF_RESTRICT_U);
709 *plisthead, res,
710 (*pfn_sort)(res, L_S_S_CUR()),
727 if (NULL == res) {
733 if ( (RES_LIMITED & res->rflags)
737 res->rflags &= ~rflags;
747 if ( res != NULL
749 || !(RESM_INTERFACE & res->mflags))
750 && res != &restrict_def4
751 && res != &restrict_def6) {
753 free_res(res, v6);