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