Lines Matching defs: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);
324 error = fr_ipftune(cmd, (void *)data, ifs);
330 error = COPYIN(data, &ifs->ifs_fr_flags,
331 sizeof(ifs->ifs_fr_flags));
334 error = COPYOUT(&ifs->ifs_fr_flags, data,
335 sizeof(ifs->ifs_fr_flags));
348 ifs->ifs_fr_active, 1, ifs);
357 1 - ifs->ifs_fr_active, 1, ifs);
363 *(u_int *)data = ifs->ifs_fr_active;
364 ifs->ifs_fr_active = 1 - ifs->ifs_fr_active;
368 fr_getstat(&fio, ifs);
375 error = frzerostats(data, ifs);
383 tmp = frflush(unit, 4, tmp, ifs);
395 tmp = frflush(unit, 6, tmp, ifs);
404 ifs->ifs_fr_state_lock = tmp;
405 ifs->ifs_fr_nat_lock = tmp;
406 ifs->ifs_fr_frag_lock = tmp;
407 ifs->ifs_fr_auth_lock = tmp;
416 *(int *)data = ipflog_clear(unit, ifs);
420 error = fr_outobj(data, fr_fragstats(ifs), IPFOBJ_FRAGSTAT);
426 frsync(IPFSYNC_RESYNC, IPFSYNC_RESYNC, NULL, NULL, ifs);
438 void fr_forgetifp(ifp, ifs)
440 ipf_stack_t *ifs;
444 WRITE_ENTER(&ifs->ifs_ipf_mutex);
445 for (f = ifs->ifs_ipacct[0][ifs->ifs_fr_active]; (f != NULL);
449 for (f = ifs->ifs_ipacct[1][ifs->ifs_fr_active]; (f != NULL);
453 for (f = ifs->ifs_ipfilter[0][ifs->ifs_fr_active]; (f != NULL);
457 for (f = ifs->ifs_ipfilter[1][ifs->ifs_fr_active]; (f != NULL);
462 for (f = ifs->ifs_ipacct6[0][ifs->ifs_fr_active]; (f != NULL);
466 for (f = ifs->ifs_ipacct6[1][ifs->ifs_fr_active]; (f != NULL);
470 for (f = ifs->ifs_ipfilter6[0][ifs->ifs_fr_active]; (f != NULL);
474 for (f = ifs->ifs_ipfilter6[1][ifs->ifs_fr_active]; (f != NULL);
479 RWLOCK_EXIT(&ifs->ifs_ipf_mutex);
480 fr_natifpsync(IPFSYNC_OLDIFP, 4, ifp, NULL, ifs);
481 fr_natifpsync(IPFSYNC_OLDIFP, 6, ifp, NULL, ifs);
485 void fr_resolvedest(fdp, v, ifs)
488 ipf_stack_t *ifs;
493 fdp->fd_ifp = GETIFP(fdp->fd_ifname, v, ifs);
607 struct ifnet *get_unit(name, v, ifs)
610 ipf_stack_t *ifs;
810 void frsync(command, version, nic, data, ifs)
814 ipf_stack_t *ifs;
927 ipf_stack_t *ifs = fin->fin_ifs;
929 MUTEX_ENTER(&ifs->ifs_ipf_rw);
931 MUTEX_EXIT(&ifs->ifs_ipf_rw);
988 int fr_ifpaddr(v, atype, ifptr, inp, inpmask, ifs)
992 ipf_stack_t *ifs;