Home | History | Annotate | Download | only in dev

Lines Matching refs:ifp

104 	struct ifnet *ifp = &sc->sc_ec.ec_if;
129 strlcpy(ifp->if_xname, device_xname(self), IFNAMSIZ);
130 ifp->if_softc = sc;
131 ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
132 ifp->if_ioctl = veth_ioctl;
133 ifp->if_watchdog = veth_watchdog;
134 ifp->if_start = veth_start;
135 ifp->if_init = veth_init;
136 ifp->if_stop = veth_stop;
137 IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN);
140 if_initialize(ifp);
141 ether_ifattach(ifp, sc->sc_eaddr);
142 if_register(ifp);
177 veth_init(struct ifnet *ifp)
179 vethprintf("%s: %s flags=%x\n", __func__, ifp->if_xname, ifp->if_flags);
181 veth_stop(ifp, 0);
183 ifp->if_flags |= IFF_RUNNING;
201 struct ifnet *ifp = &sc->sc_ec.ec_if;
220 if_statinc(ifp, if_ierrors);
227 if_statinc(ifp, if_ierrors);
232 m_set_rcvif(m, ifp);
237 if_input(ifp, m);
246 struct ifnet *ifp = &sc->sc_ec.ec_if;
250 veth_start(ifp);
255 veth_start(struct ifnet *ifp)
257 struct veth_softc *sc = ifp->if_softc;
261 vethprintf("%s: %s flags=%x\n", __func__, ifp->if_xname, ifp->if_flags);
263 if ((ifp->if_flags & IFF_RUNNING) == 0)
267 IFQ_POLL(&ifp->if_snd, m0);
276 IFQ_DEQUEUE(&ifp->if_snd, m0);
277 bpf_mtap(ifp, m0, BPF_D_OUT);
286 if_statinc(ifp, if_opackets);
288 if_statinc(ifp, if_oerrors);
294 veth_stop(struct ifnet *ifp, int disable)
296 vethprintf("%s: %s flags=%x\n", __func__, ifp->if_xname, ifp->if_flags);
297 ifp->if_timer = 0;
298 ifp->if_flags &= ~IFF_RUNNING;
302 veth_watchdog(struct ifnet *ifp)
304 vethprintf("%s: %s flags=%x\n", __func__, ifp->if_xname, ifp->if_flags);
305 if_statinc(ifp, if_oerrors);
306 veth_init(ifp);
310 veth_ioctl(struct ifnet *ifp, u_long cmd, void *data)
314 vethprintf("%s: %s flags=%x\n", __func__, ifp->if_xname, ifp->if_flags);
321 if ((error = ether_ioctl(ifp, cmd, data)) == ENETRESET) {
322 if (ifp->if_flags & IFF_RUNNING) {
323 veth_init(ifp);
329 error = ether_ioctl(ifp, cmd, data);
338 veth_ifmedia_change(struct ifnet *ifp)
340 vethprintf("%s: %s flags=%x\n", __func__, ifp->if_xname, ifp->if_flags);
345 veth_ifmedia_status(struct ifnet *ifp, struct ifmediareq *req)
347 vethprintf("%s: %s flags=%x\n", __func__, ifp->if_xname, ifp->if_flags);