• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/netpfil/ipfw/

Lines Matching defs:iif

65 static void handle_ifdetach(struct ip_fw_chain *ch, struct ipfw_iface *iif,
67 static void handle_ifattach(struct ip_fw_chain *ch, struct ipfw_iface *iif,
96 struct ipfw_iface *iif;
112 iif = (struct ipfw_iface*)ipfw_objhash_lookup_name(ii, 0,
114 if (iif != NULL) {
116 handle_ifattach(ch, iif, ifp->if_index);
118 handle_ifdetach(ch, iif, ifp->if_index);
296 struct ipfw_iface *iif, *tmp;
298 if (strlen(name) >= sizeof(iif->ifname))
315 iif = (struct ipfw_iface *)ipfw_objhash_lookup_name(ii, 0, name);
317 if (iif != NULL) {
318 iif->no.refcnt++;
319 ic->iface = iif;
327 iif = malloc(sizeof(struct ipfw_iface), M_IPFW, M_WAITOK | M_ZERO);
328 TAILQ_INIT(&iif->consumers);
329 iif->no.name = iif->ifname;
330 strlcpy(iif->ifname, name, sizeof(iif->ifname));
338 iif->no.refcnt = 1;
347 free(iif, M_IPFW);
351 iif->ifindex = ipfw_kiflookup(name);
352 if (iif->ifindex != 0)
353 iif->resolved = 1;
355 ipfw_objhash_add(ii, &iif->no);
356 ic->iface = iif;
364 * Adds @ic to the list of iif interface consumers.
371 struct ipfw_iface *iif;
376 iif = ic->iface;
378 TAILQ_INSERT_TAIL(&iif->consumers, ic, next);
379 if (iif->resolved != 0)
380 ic->cb(ch, ic->cbdata, iif->ifindex);
390 struct ipfw_iface *iif;
394 iif = ic->iface;
395 TAILQ_REMOVE(&iif->consumers, ic, next);
405 struct ipfw_iface *iif;
409 iif = ic->iface;
412 iif->no.refcnt--;
420 handle_ifattach(struct ip_fw_chain *ch, struct ipfw_iface *iif,
427 iif->gencnt++;
428 iif->resolved = 1;
429 iif->ifindex = ifindex;
432 TAILQ_FOREACH(ic, &iif->consumers, next)
433 ic->cb(ch, ic->cbdata, iif->ifindex);
441 handle_ifdetach(struct ip_fw_chain *ch, struct ipfw_iface *iif,
449 TAILQ_FOREACH(ic, &iif->consumers, next)
453 iif->gencnt++;
454 iif->resolved = 0;
455 iif->ifindex = 0;
469 struct ipfw_iface *iif;
476 iif = (struct ipfw_iface *)no;
478 strlcpy(i->ifname, iif->ifname, sizeof(i->ifname));
479 if (iif->resolved)
481 i->ifindex = iif->ifindex;
482 i->refcnt = iif->no.refcnt;
483 i->gencnt = iif->gencnt;