Lines Matching refs:ifp
308 struct ifnet *ifp = NULL;
531 ifp = rt->rt_ifp;
532 if (ifp) {
533 ifnet_lock_shared(ifp);
534 ifa2 = ifp->if_addrhead.tqh_first;
536 ifnet_lock_done(ifp);
538 rtm->rtm_index = ifp->if_index;
692 struct ifnet *ifp = 0;
701 * New gateway could require new ifaddr, ifp; flags may also
702 * be different; ifp may be specified by ll sockaddr when
706 (ifp = ifa->ifa_ifp) && (Ifaaddr || Gate)) {
708 ifa = ifaof_ifpforaddr(Ifaaddr ? Ifaaddr : Gate, ifp);
714 if (Ifpaddr && (ifp = if_withname(Ifpaddr)) ) {
716 ifa = ifaof_ifpforaddr(Gate, ifp);
718 ifnet_lock_shared(ifp);
719 ifa = TAILQ_FIRST(&ifp->if_addrhead);
721 ifnet_lock_done(ifp);
725 ifp = ifa->ifa_ifp;
729 ifp = ifa->ifa_ifp;
738 rt->rt_ifp = ifp;
745 rt->rt_rmx.rmx_mtu = ifp->if_mtu;
992 struct ifnet *ifp)
1005 ifm->ifm_index = ifp->if_index;
1006 ifm->ifm_flags = (u_short)ifp->if_flags;
1007 if_data_internal_to_if_data(ifp, &ifp->if_data, &ifm->ifm_data);
1031 struct ifnet *ifp = ifa->ifa_ifp;
1043 ifpaddr = ifp->if_addrhead.tqh_first->ifa_addr;
1049 ifam->ifam_index = ifp->if_index;
1066 rtm->rtm_index = ifp->if_index;
1086 struct ifnet *ifp = ifma->ifma_ifp;
1094 if (ifp && ifp->if_addrhead.tqh_first)
1095 ifpaddr = ifp->if_addrhead.tqh_first->ifa_addr;
1106 ifmam->ifmam_index = ifp ? ifp->if_index : 0;
1175 struct ifnet *ifp;
1182 TAILQ_FOREACH(ifp, &ifnet_head, if_link) {
1185 if (w->w_arg && w->w_arg != ifp->if_index)
1187 ifnet_lock_shared(ifp);
1188 ifa = ifp->if_addrhead.tqh_first;
1196 ifm->ifm_index = ifp->if_index;
1197 ifm->ifm_flags = (u_short)ifp->if_flags;
1198 if_data_internal_to_if_data(ifp, &ifp->if_data, &ifm->ifm_data);
1202 ifnet_lock_done(ifp);
1226 ifnet_lock_done(ifp);
1238 struct ifnet *ifp;
1245 TAILQ_FOREACH(ifp, &ifnet_head, if_link) {
1248 if (w->w_arg && w->w_arg != ifp->if_index)
1250 ifnet_lock_shared(ifp);
1251 ifa = ifp->if_addrhead.tqh_first;
1260 ifm->ifm_flags = (u_short)ifp->if_flags;
1261 ifm->ifm_index = ifp->if_index;
1262 ifm->ifm_snd_len = ifp->if_snd.ifq_len;
1263 ifm->ifm_snd_maxlen = ifp->if_snd.ifq_maxlen;
1264 ifm->ifm_snd_drops = ifp->if_snd.ifq_drops;
1265 ifm->ifm_timer = ifp->if_timer;
1266 if_data_internal_to_if_data64(ifp, &ifp->if_data, &ifm->ifm_data);
1269 ifnet_lock_done(ifp);
1294 ifnet_lock_done(ifp);
1300 for (ifma = ifp->if_multiaddrs.lh_first; ifma;
1306 if (ifp->if_addrhead.tqh_first)
1307 ifpaddr = ifp->if_addrhead.tqh_first->ifa_addr;
1325 ifnet_lock_done(ifp);