Lines Matching refs:ifp
134 register struct ifnet *ifp;
138 ifp = &dummyif[i];
140 sprintf(ifp->if_xname, "dummy%d", i);
142 ifp->if_name = "dummy";
143 ifp->if_unit = i;
146 ifp->if_softc = NULL;
148 ifp->if_mtu = DUMMYMTU;
150 ifp->if_flags = /* IFF_LOOPBACK */ IFF_BROADCAST | IFF_MULTICAST;
151 ifp->if_ioctl = dummyioctl;
152 ifp->if_output = dummyoutput;
153 ifp->if_type = IFT_DUMMY;
154 ifp->if_hdrlen = 0;
155 ifp->if_addrlen = 0;
156 if_attach(ifp);
159 bpfattach(ifp, DLT_NULL, sizeof(u_int));
161 bpfattach(&ifp->if_bpf, ifp, DLT_NULL, sizeof(u_int));
168 dummyoutput(ifp, m, dst, rt)
169 struct ifnet *ifp;
186 if (ifp->if_bpf) {
190 bpf_tap_out(ifp, 0, m, &af, sizeof(af));
193 m->m_pkthdr.rcvif = ifp;
200 ifp->if_opackets++;
201 ifp->if_obytes += m->m_pkthdr.len;
203 ifp->if_ipackets++;
204 ifp->if_ibytes += m->m_pkthdr.len;
232 dummyioctl(ifp, cmd, data)
233 register struct ifnet *ifp;
244 ifnet_set_flags(ifp, IFF_UP | IFF_RUNNING, IFF_UP | IFF_RUNNING);
276 ifp->if_mtu = ifr->ifr_mtu;