Lines Matching refs:ifp
275 struct ifnet *ifp,
296 if (!ifp)
298 return in_lifaddr_ioctl(so, cmd, data, ifp, p);
307 if (ifp) {
311 if (iap->ia_ifp == ifp) {
334 if (ifp == 0) {
342 if (ifp == 0) {
351 if (ia->ia_ifp == ifp &&
364 if ((ifp->if_flags & IFF_POINTOPOINT)
388 if (ifp == 0) {
418 ifnet_lock_exclusive(ifp);
419 if (ifp->if_flags & IFF_BROADCAST) {
423 ia->ia_ifp = ifp;
424 if (!(ifp->if_flags & IFF_LOOPBACK))
426 if_attach_ifa(ifp, ifa);
427 ifnet_lock_done(ifp);
436 if ((error = proto_plumb(PF_INET, ifp))) {
439 ifp->if_name, ifp->if_unit, ifp->if_type, error);
452 if (ifp == 0) {
483 ifnet_lock_exclusive(ifp);
485 ifp->if_eflags |= IFEF_AUTOCONFIGURING;
487 ifp->if_eflags &= ~IFEF_AUTOCONFIGURING;
488 ifnet_lock_done(ifp);
493 ifnet_lock_exclusive(ifp);
495 ifp->if_eflags |= IFEF_ARPLL;
497 ifp->if_eflags &= ~IFEF_ARPLL;
498 ifnet_lock_done(ifp);
506 if ((ifp->if_flags & IFF_BROADCAST) == 0) {
514 if ((ifp->if_flags & IFF_POINTOPOINT) == 0) {
526 if ((ifp->if_flags & IFF_POINTOPOINT) == 0) {
532 error = ifnet_ioctl(ifp, PF_INET, SIOCSIFDSTADDR, ia);
559 strncpy(&in_event_data.link_data.if_name[0], ifp->if_name, IFNAMSIZ);
560 in_event_data.link_data.if_family = ifp->if_family;
561 in_event_data.link_data.if_unit = (unsigned long) ifp->if_unit;
580 if ((ifp->if_flags & IFF_BROADCAST) == 0) {
604 strncpy(&in_event_data.link_data.if_name[0], ifp->if_name, IFNAMSIZ);
605 in_event_data.link_data.if_family = ifp->if_family;
606 in_event_data.link_data.if_unit = (unsigned long) ifp->if_unit;
617 error = in_ifinit(ifp, ia, (struct sockaddr_in *) &ifr->ifr_addr, 1);
621 error = proto_plumb(PF_INET, ifp);
626 ifnet_lock_shared(ifp);
627 TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link)
630 ifnet_lock_done(ifp);
636 error = proto_unplumb(PF_INET, ifp);
663 strncpy(&in_event_data.link_data.if_name[0], ifp->if_name, IFNAMSIZ);
664 in_event_data.link_data.if_family = ifp->if_family;
665 in_event_data.link_data.if_unit = (unsigned long) ifp->if_unit;
688 in_ifscrub(ifp, ia, 0);
694 if ((ifp->if_flags & IFF_POINTOPOINT) &&
696 in_ifscrub(ifp, ia, 0);
702 error = in_ifinit(ifp, ia, &ifra->ifra_addr, 0);
704 if ((ifp->if_flags & IFF_BROADCAST) &&
734 strncpy(&in_event_data.link_data.if_name[0], ifp->if_name, IFNAMSIZ);
735 in_event_data.link_data.if_family = ifp->if_family;
736 in_event_data.link_data.if_unit = (unsigned long) ifp->if_unit;
747 error = ifnet_ioctl(ifp, PF_INET, SIOCDIFADDR, ia);
773 strncpy(&in_event_data.link_data.if_name[0], ifp->if_name, IFNAMSIZ);
774 in_event_data.link_data.if_family = ifp->if_family;
775 in_event_data.link_data.if_unit = (unsigned long) ifp->if_unit;
786 in_ifscrub(ifp, ia, 1);
789 ifnet_lock_exclusive(ifp);
790 if_detach_ifa(ifp, ifa);
797 if (ifp->if_flags & IFF_MULTICAST) {
801 TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link)
807 IN_LOOKUP_MULTI(addr, ifp, inm);
809 ifnet_lock_done(ifp);
813 ifnet_lock_done(ifp);
823 ifa = ifa_ifpgetprimary(ifp, AF_INET);
825 error = ifnet_ioctl(ifp, PF_INET, SIOCSIFADDR, ifa);
954 struct ifnet *ifp,
961 if (!data || !ifp) {
1017 return in_control(so, SIOCAIFADDR, (caddr_t)&ifra, ifp, p);
1056 ifnet_lock_shared(ifp);
1057 TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
1067 ifnet_lock_done(ifp);
1076 if ((ifp->if_flags & IFF_POINTOPOINT) != 0) {
1098 if ((ifp->if_flags & IFF_POINTOPOINT) != 0) {
1106 ifp, p);
1119 struct ifnet *ifp,
1128 if (ifp->if_flags & (IFF_LOOPBACK|IFF_POINTOPOINT))
1143 struct ifnet *ifp,
1164 ifa0 = ifa_ifpgetprimary(ifp, AF_INET);
1166 error = ifnet_ioctl(ifp, PF_INET, cmd, ia);
1177 error = ifnet_ioctl(ifp, PF_INET, SIOCSIFADDR, ifa0);
1191 in_ifscrub(ifp, ia, 0);
1216 ia->ia_ifa.ifa_metric = ifp->if_metric;
1217 if (ifp->if_flags & IFF_BROADCAST) {
1222 } else if (ifp->if_flags & IFF_LOOPBACK) {
1225 } else if (ifp->if_flags & IFF_POINTOPOINT) {
1240 if (ifp->if_flags & IFF_MULTICAST) {
1245 ifnet_lock_shared(ifp);
1246 IN_LOOKUP_MULTI(addr, ifp, inm);
1247 ifnet_lock_done(ifp);
1249 in_addmulti(&addr, ifp);
1261 struct ifnet *ifp)
1269 if ((ifp->if_flags & IFF_BROADCAST) == 0)
1277 ifnet_lock_shared(ifp);
1278 TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
1280 ifnet_lock_done(ifp);
1296 ifnet_lock_done(ifp);
1300 ifnet_lock_done(ifp);
1328 struct ifnet *ifp)
1344 error = if_addmulti(ifp, (struct sockaddr *)&sin, &ifma);
1364 inm->inm_ifp = ifp;
1394 ifp->if_name, ifp->if_unit);