Lines Matching refs:ifp

115 #define GIF_MAXUNIT	0x7fff	/* ifp->if_unit is only 15 bits */
126 static errno_t gif_output(ifnet_t ifp, mbuf_t m);
127 static errno_t gif_input(ifnet_t ifp, protocol_family_t protocol_family,
129 static errno_t gif_ioctl(ifnet_t ifp, u_long cmd, void *data);
176 ifnet_t ifp,
182 *protocol_family = ((struct gif_softc*)ifnet_softc(ifp))->gif_proto;
189 ifnet_t ifp,
195 struct gif_softc* gif = ifnet_softc(ifp);
198 printf("gif_add_proto: request add_proto for gif%d\n", ifnet_unit(ifp));
207 ifnet_t ifp,
210 if (((struct gif_softc*)ifnet_softc(ifp))->gif_proto == protocol_family)
211 ((struct gif_softc*)ifnet_softc(ifp))->gif_proto = 0;
219 ifnet_t ifp,
228 stat = ifnet_attach_protocol(ifp, protocol_family, &reg);
276 ifnet_t ifp,
280 struct gif_softc *sc = ifnet_softc(ifp);
307 /* use the interface name as the unique id for ifp recycle */
390 gif_clone_destroy(struct ifnet *ifp)
395 struct gif_softc *sc = ifp->if_softc;
412 err = ifnet_set_flags(ifp, 0, IFF_UP);
417 err = ifnet_detach(ifp);
419 panic("gif_clone_destroy: ifnet_detach(%p) failed %d\n", ifp, err);
483 ifnet_t ifp,
486 struct gif_softc *sc = ifnet_softc(ifp);
496 if (!(ifnet_flags(ifp) & IFF_UP) ||
498 ifnet_touch_lastchange(ifp);
504 bpf_tap_out(ifp, 0, m, &sc->gif_proto, sizeof(sc->gif_proto));
514 error = in_gif_output(ifp, sc->gif_proto, m, NULL);
519 error = in6_gif_output(ifp, sc->gif_proto, m, NULL);
530 ifnet_stat_increment_out(ifp, 0, 0, 1);
533 ifnet_stat_increment_out(ifp, 1, m->m_pkthdr.len, 0);
545 ifnet_t ifp,
550 struct gif_softc *sc = ifnet_softc(ifp);
552 bpf_tap_in(ifp, 0, m, &sc->gif_proto, sizeof(sc->gif_proto));
567 ifnet_stat_increment_in(ifp, 0, 0, 1);
570 ifnet_stat_increment_in(ifp, 1, m->m_pkthdr.len, 0);
578 ifnet_t ifp,
582 struct gif_softc *sc = ifnet_softc(ifp);
612 ifnet_set_mtu(ifp, mtu);
778 ifnet_set_flags(ifp, IFF_RUNNING | IFF_UP, IFF_RUNNING | IFF_UP);