Lines Matching defs:ifp

206 me_clone_destroy(struct ifnet *ifp)
211 sc = ifp->if_softc;
212 me_delete_tunnel(ifp);
216 bpfdetach(ifp);
217 if_detach(ifp);
218 ifp->if_softc = NULL;
221 if_free(ifp);
227 me_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
239 ifp->if_mtu = ifr->ifr_mtu;
242 ifp->if_flags |= IFF_UP;
249 sc = ifp->if_softc;
273 error = me_set_tunnel(ifp, src, dst);
276 me_delete_tunnel(ifp);
354 me_set_tunnel(struct ifnet *ifp, struct sockaddr_in *src,
361 sc = ifp->if_softc;
382 ifp->if_drv_flags |= IFF_DRV_RUNNING;
383 if_link_state_change(ifp, LINK_STATE_UP);
389 me_delete_tunnel(struct ifnet *ifp)
391 struct me_softc *sc = ifp->if_softc;
401 ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
402 if_link_state_change(ifp, LINK_STATE_DOWN);
422 struct ifnet *ifp;
431 ifp = ME2IFP(sc);
459 mac_ifnet_create_mbuf(ifp, m);
471 m->m_pkthdr.rcvif = ifp;
473 M_SETFIB(m, ifp->if_fib);
475 BPF_MTAP2(ifp, &hlen, sizeof(hlen), m);
476 if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1);
477 if_inc_counter(ifp, IFCOUNTER_IBYTES, m->m_pkthdr.len);
478 if ((ifp->if_flags & IFF_MONITOR) != 0)
484 if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
490 me_check_nesting(struct ifnet *ifp, struct mbuf *m)
498 if (*(struct ifnet **)(mtag + 1) == ifp) {
499 log(LOG_NOTICE, "%s: loop detected\n", ifp->if_xname);
507 ifp->if_xname, count);
513 *(struct ifnet **)(mtag + 1) = ifp;
519 me_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
526 error = mac_ifnet_check_transmit(ifp, m);
530 if ((ifp->if_flags & IFF_MONITOR) != 0 ||
531 (ifp->if_flags & IFF_UP) == 0) {
536 error = me_check_nesting(ifp, m);
549 BPF_MTAP2(ifp, &af, sizeof(af), m);
550 return (ifp->if_transmit(ifp, m));
553 if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
558 me_transmit(struct ifnet *ifp, struct mbuf *m)
566 sc = ifp->if_softc;
629 if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
631 if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
632 if_inc_counter(ifp, IFCOUNTER_OBYTES, plen);
638 me_qflush(struct ifnet *ifp __unused)