Lines Matching refs:ifp
337 struct interface *ifp, *ifs, *ifl; in discover_interfaces() local
373 for (ifp = ifs; ifp; ifp = ifp->next) in discover_interfaces()
374 if (strcmp(ifp->name, ifa->ifa_name) == 0) in discover_interfaces()
376 if (ifp) in discover_interfaces()
414 if ((ifp = init_interface(p)) == NULL) in discover_interfaces()
418 if (!(ifp->flags & IFF_UP) in discover_interfaces()
420 && carrier_status(ifp) != -1 in discover_interfaces()
424 if (up_interface(ifp) == 0) in discover_interfaces()
427 syslog(LOG_ERR, "%s: up_interface: %m", ifp->name); in discover_interfaces()
432 if (ifp->flags & IFF_LOOPBACK) { in discover_interfaces()
434 free_interface(ifp); in discover_interfaces()
443 strlcpy(iflr.iflr_name, ifp->name, in discover_interfaces()
452 free_interface(ifp); in discover_interfaces()
463 ifp->family = ARPHRD_ETHER; in discover_interfaces()
466 ifp->family = ARPHRD_IEEE1394; in discover_interfaces()
470 ifp->family = ARPHRD_INFINIBAND; in discover_interfaces()
474 ifp->hwlen = sdl->sdl_alen; in discover_interfaces()
478 memcpy(ifp->hwaddr, CLLADDR(sdl), ifp->hwlen); in discover_interfaces()
481 ifp->family = sdl_type = sll->sll_hatype; in discover_interfaces()
482 ifp->hwlen = sll->sll_halen; in discover_interfaces()
483 if (ifp->hwlen != 0) in discover_interfaces()
484 memcpy(ifp->hwaddr, sll->sll_addr, ifp->hwlen); in discover_interfaces()
489 if (!(ifp->flags & IFF_POINTOPOINT) && in discover_interfaces()
490 ifp->family != ARPHRD_ETHER) in discover_interfaces()
493 free_interface(ifp); in discover_interfaces()
496 switch (ifp->family) { in discover_interfaces()
505 ifp->name, sdl_type); in discover_interfaces()
506 ifp->family = ARPHRD_ETHER; in discover_interfaces()
512 if (if_init(ifp) == -1) { in discover_interfaces()
514 free_interface(ifp); in discover_interfaces()
519 ifl->next = ifp; in discover_interfaces()
521 ifs = ifp; in discover_interfaces()
522 ifl = ifp; in discover_interfaces()