Lines Matching defs:ifp
123 make_ifmibdata(struct ifnet *ifp, int *name, struct sysctl_req *req)
137 ifp->if_name, ifp->if_unit);
139 #define COPY(fld) ifmd.ifmd_##fld = ifp->if_##fld
142 if_data_internal_to_if_data64(ifp, &ifp->if_data, &ifmd.ifmd_data);
144 ifmd.ifmd_snd_len = ifp->if_snd.ifq_len;
145 ifmd.ifmd_snd_maxlen = ifp->if_snd.ifq_maxlen;
146 ifmd.ifmd_snd_drops = ifp->if_snd.ifq_drops;
157 #define DONTCOPY(fld) ifmd.ifmd_data.ifi_##fld = ifp->if_data.ifi_##fld
166 #define COPY(fld) ifp->if_##fld = ifmd.ifmd_##fld
168 ifp->if_snd.ifq_maxlen = ifmd.ifmd_snd_maxlen;
169 ifp->if_snd.ifq_drops = ifmd.ifmd_snd_drops;
175 error = SYSCTL_OUT(req, ifp->if_linkmib, ifp->if_linkmiblen);
180 error = SYSCTL_IN(req, ifp->if_linkmib, ifp->if_linkmiblen);
196 struct ifnet *ifp;
202 (ifp = ifindex2ifnet[name[0]]) == NULL)
205 ifnet_lock_shared(ifp);
207 error = make_ifmibdata(ifp, name, req);
209 ifnet_lock_done(ifp);
220 struct ifnet *ifp;
226 TAILQ_FOREACH(ifp, &ifnet_head, if_link) {
227 ifnet_lock_shared(ifp);
229 error = make_ifmibdata(ifp, name, req);
231 ifnet_lock_done(ifp);