Lines Matching refs:ifp
85 static struct ndrv_cb *ndrv_find_inbound(struct ifnet *ifp, u_long protocol_family);
128 struct ifnet *ifp = np->nd_if;
146 * ifp directly.
148 result = ifnet_output_raw(ifp, np->nd_proto_family, m);
158 ifnet_t ifp,
180 np = ndrv_find_inbound(ifp, proto_family);
187 m = m_prepend(m, ifnet_hdrlen(ifp), M_NOWAIT);
190 bcopy(frame_header, m->m_data, ifnet_hdrlen(ifp));
293 ndrv_event(struct ifnet *ifp, __unused protocol_family_t protocol,
302 ndrv_handle_ifp_detach(ifnet_family(ifp), ifnet_unit(ifp));
320 struct ifnet *ifp;
348 TAILQ_FOREACH(ifp, &ifnet_head, if_link) {
349 if (name_cmp(ifp, dname) == 0)
354 if (ifp == NULL)
358 if (ifnet_family(ifp) != APPLE_IF_FAM_PPP)
368 result = ifnet_attach_protocol(ifp, PF_NDRV, &ndrv_proto);
379 np->nd_if = ifp;
380 np->nd_family = ifnet_family(ifp);
381 np->nd_unit = ifnet_unit(ifp);
535 struct ifnet * ifp;
542 ifp = np->nd_if;
545 if (ifp != NULL) {
550 ifnet_detach_protocol(ifp, proto_family);
565 ifnet_detach_protocol(ifp, PF_NDRV);
616 * device names (ifp).
618 static int name_cmp(struct ifnet *ifp, char *q)
624 len = strlen(ifnet_name(ifp));
625 strncpy(r, ifnet_name(ifp), IFNAMSIZ);
627 (void)sprint_d(ifnet_unit(ifp), r, IFNAMSIZ-(r-buf));
809 ndrv_find_inbound(struct ifnet *ifp, u_long protocol)
817 np->nd_if == ifp) {
838 struct ifnet *ifp = NULL;
848 ifp = np->nd_if;
855 /* Disavow all knowledge of the ifp */
870 if (ifp) {
871 ifnet_detach_protocol(ifp, PF_NDRV);