Lines Matching defs:ifp
196 static int bpf_setif(struct bpf_d *, ifnet_t ifp, u_int32_t dlt);
210 static int bpf_tap_callback(struct ifnet *ifp, struct mbuf *m);
464 /* Find the default bpf entry for this ifp */
494 struct ifnet *ifp;
496 ifp = d->bd_bif->bif_ifp;
513 dlil_set_bpf_tap(ifp, BPF_TAP_DISABLE, NULL);
515 bp->bif_tap(ifp, bp->bif_dlt, BPF_TAP_DISABLE);
518 if (bp->bif_ifp == ifp && bp->bif_dlist != 0)
521 ifp->if_bpf = NULL;
531 if (ifnet_set_promiscuous(ifp, 0)) {
827 struct ifnet *ifp;
845 ifp = d->bd_bif->bif_ifp;
860 if ((unsigned)datlen > ifp->if_mtu) {
866 if ((error = ifp_use(ifp, kIfNetUseCount_MustNotBeZero)) != 0) {
879 error = d->bd_bif->bif_send(ifp, d->bd_bif->bif_dlt, m);
881 error = dlil_output(ifp, 0, m, NULL, NULL, 1);
884 error = dlil_output(ifp, PF_INET, m, NULL, (struct sockaddr *)dst_buf, 0);
887 if (ifp_unuse(ifp) != 0)
888 ifp_use_reached_zero(ifp);
973 struct ifnet *ifp;
978 ifp = d->bd_bif->bif_ifp;
979 error = ifnet_ioctl(ifp, 0, cmd, addr);
1097 struct ifnet *const ifp = d->bd_bif->bif_ifp;
1101 "%s%d", ifp->if_name, ifp->if_unit);
1109 ifnet_t ifp;
1110 ifp = ifunit(((struct ifreq *)addr)->ifr_name);
1111 if (ifp == NULL)
1114 error = bpf_setif(d, ifp, 0);
1307 struct ifnet *ifp = bp->bif_ifp;
1309 if (ifp == 0 || ifp != theywant || (dlt != 0 && dlt != bp->bif_dlt))
1318 if ((ifp->if_flags & IFF_UP) == 0)
1356 struct ifnet *ifp;
1367 ifp = d->bd_bif->bif_ifp;
1371 if (bp->bif_ifp != ifp)
1395 struct ifnet *ifp;
1400 ifp = d->bd_bif->bif_ifp;
1402 if (bp->bif_ifp == ifp && bp->bif_dlt == dlt)
1504 ifnet_t ifp,
1526 if (ifp->if_bpf == NULL) {
1530 bp = ifp->if_bpf;
1531 for (bp = ifp->if_bpf; bp && bp->bif_ifp == ifp &&
1534 if (bp && bp->bif_ifp == ifp && bp->bif_dlist != NULL) {
1587 ifnet_t ifp,
1593 bpf_tap_imp(ifp, dlt, m, hdr, hlen, 1);
1598 ifnet_t ifp,
1604 bpf_tap_imp(ifp, dlt, m, hdr, hlen, 0);
1608 static int bpf_tap_callback(struct ifnet *ifp, struct mbuf *m)
1610 bpf_tap_imp(ifp, 0, m, NULL, 0, mbuf_pkthdr_rcvif(m) == NULL);
1732 bpfattach(struct ifnet *ifp, u_int dlt, u_int hdrlen)
1734 bpf_attach(ifp, dlt, hdrlen, NULL, NULL);
1739 ifnet_t ifp,
1759 for (bp_temp = bpf_iflist; bp_temp && (bp_temp->bif_ifp != ifp ||
1761 if (bp_temp->bif_ifp == ifp && bp_first == NULL)
1767 ifp->if_name, ifp->if_unit, dlt);
1774 bp_new->bif_ifp = ifp;
1780 /* No other entries for this ifp */
1799 ifnet_reference(ifp);
1805 printf("bpf: %s%d attached\n", ifp->if_name, ifp->if_unit);
1818 bpfdetach(struct ifnet *ifp)
1831 if (ifp != bp->bif_ifp) {
1850 ifnet_release(ifp);