Lines Matching refs:ifs
153 static int frzerostats __P((caddr_t, ipf_stack_t *ifs));
176 int iplattach(ifs)
177 ipf_stack_t *ifs;
179 ifs->ifs_fr_running = 1;
184 int ipldetach(ifs)
185 ipf_stack_t *ifs;
187 ifs->ifs_fr_running = -1;
192 static int frzerostats(data, ifs)
194 ipf_stack_t *ifs;
199 fr_getstat(&fio, ifs);
204 bzero((char *)ifs->ifs_frstats, sizeof(*ifs->ifs_frstats) * 2);
221 ipf_stack_t *ifs;
227 ifs = get_ifs();
232 if (ifs->ifs_fr_running > 0)
233 error = fr_nat_ioctl(data, cmd, mode, uid, NULL, ifs);
240 if (ifs->ifs_fr_running > 0)
241 error = fr_state_ioctl(data, cmd, mode, uid, NULL, ifs);
248 if (ifs->ifs_fr_running > 0) {
255 ifs->ifs_fr_active, 1, ifs);
259 NULL, ifs);
268 if (ifs->ifs_fr_running > 0)
278 if (ifs->ifs_fr_running > 0)
287 if (ifs->ifs_fr_running > 0)
289 NULL, ifs);
300 error = COPYOUT(&ifs->ifs_iplused[IPL_LOGIPF], (caddr_t)data,
301 sizeof(ifs->ifs_iplused[IPL_LOGIPF]));
312 error = iplattach(ifs);
314 error = ipldetach(ifs);
325 error = fr_ipftune(cmd, (void *)data, ifs);
331 error = COPYIN(data, &ifs->ifs_fr_flags,
332 sizeof(ifs->ifs_fr_flags));
335 error = COPYOUT(&ifs->ifs_fr_flags, data,
336 sizeof(ifs->ifs_fr_flags));
349 ifs->ifs_fr_active, 1, ifs);
358 1 - ifs->ifs_fr_active, 1, ifs);
364 *(u_int *)data = ifs->ifs_fr_active;
365 ifs->ifs_fr_active = 1 - ifs->ifs_fr_active;
369 fr_getstat(&fio, ifs);
376 error = frzerostats(data, ifs);
384 tmp = frflush(unit, 4, tmp, ifs);
396 tmp = frflush(unit, 6, tmp, ifs);
405 ifs->ifs_fr_state_lock = tmp;
406 ifs->ifs_fr_nat_lock = tmp;
407 ifs->ifs_fr_frag_lock = tmp;
408 ifs->ifs_fr_auth_lock = tmp;
417 *(int *)data = ipflog_clear(unit, ifs);
421 error = fr_outobj(data, fr_fragstats(ifs), IPFOBJ_FRAGSTAT);
427 frsync(IPFSYNC_RESYNC, IPFSYNC_RESYNC, NULL, NULL, ifs);
439 void fr_forgetifp(ifp, ifs)
441 ipf_stack_t *ifs;
445 WRITE_ENTER(&ifs->ifs_ipf_mutex);
446 for (f = ifs->ifs_ipacct[0][ifs->ifs_fr_active]; (f != NULL);
450 for (f = ifs->ifs_ipacct[1][ifs->ifs_fr_active]; (f != NULL);
454 for (f = ifs->ifs_ipfilter[0][ifs->ifs_fr_active]; (f != NULL);
458 for (f = ifs->ifs_ipfilter[1][ifs->ifs_fr_active]; (f != NULL);
463 for (f = ifs->ifs_ipacct6[0][ifs->ifs_fr_active]; (f != NULL);
467 for (f = ifs->ifs_ipacct6[1][ifs->ifs_fr_active]; (f != NULL);
471 for (f = ifs->ifs_ipfilter6[0][ifs->ifs_fr_active]; (f != NULL);
475 for (f = ifs->ifs_ipfilter6[1][ifs->ifs_fr_active]; (f != NULL);
480 RWLOCK_EXIT(&ifs->ifs_ipf_mutex);
481 fr_natifpsync(IPFSYNC_OLDIFP, 4, ifp, NULL, ifs);
482 fr_natifpsync(IPFSYNC_OLDIFP, 6, ifp, NULL, ifs);
486 void fr_resolvedest(fdp, v, ifs)
489 ipf_stack_t *ifs;
494 fdp->fd_ifp = GETIFP(fdp->fd_ifname, v, ifs);
608 struct ifnet *get_unit(name, v, ifs)
611 ipf_stack_t *ifs;
811 void frsync(command, version, nic, data, ifs)
815 ipf_stack_t *ifs;
928 ipf_stack_t *ifs = fin->fin_ifs;
930 MUTEX_ENTER(&ifs->ifs_ipf_rw);
932 MUTEX_EXIT(&ifs->ifs_ipf_rw);
989 int fr_ifpaddr(v, atype, ifptr, inp, inpmask, ifs)
993 ipf_stack_t *ifs;