Lines Matching refs:ifp
152 if_linkaddr(struct sockaddr_dl *sdl, const struct interface *ifp) in if_linkaddr() argument
159 sdl->sdl_index = (unsigned short)ifp->index; in if_linkaddr()
221 if_getssid(struct interface *ifp) in if_getssid() argument
225 r = if_getssid1(ifp->name, ifp->ssid); in if_getssid()
227 ifp->ssid_len = (unsigned int)r; in if_getssid()
294 if_openrawsocket(struct interface *ifp, uint16_t protocol) in if_openrawsocket() argument
321 state = D_STATE(ifp); in if_openrawsocket()
328 logger(ifp->ctx, LOG_ERR, "BPF version mismatch - recompile"); in if_openrawsocket()
333 strlcpy(ifr.ifr_name, ifp->name, sizeof(ifr.ifr_name)); in if_openrawsocket()
378 if_sendrawpacket(const struct interface *ifp, uint16_t protocol, in if_sendrawpacket() argument
396 state = D_CSTATE(ifp); in if_sendrawpacket()
407 if_readrawpacket(struct interface *ifp, uint16_t protocol, in if_readrawpacket() argument
416 state = D_STATE(ifp); in if_readrawpacket()
458 if_address(const struct interface *ifp, const struct in_addr *address, in if_address() argument
469 strlcpy(ifra.ifra_name, ifp->name, sizeof(ifra.ifra_name)); in if_address()
684 if_initrt(struct interface *ifp) in if_initrt() argument
692 ipv4_freerts(ifp->ctx->ipv4_kroutes); in if_initrt()
713 if (if_copyrt(ifp->ctx, &rt, rtm) == 0) in if_initrt()
714 ipv4_handlert(ifp->ctx, RTM_ADD, &rt); in if_initrt()
722 if_addrflags(const struct in_addr *addr, const struct interface *ifp) in if_addrflags() argument
732 strlcpy(ifr.ifr_name, ifp->name, sizeof(ifr.ifr_name)); in if_addrflags()
745 __unused const struct interface *ifp) in if_addrflags() argument
1042 if_initrt6(struct interface *ifp) in if_initrt6() argument
1050 ipv6_freerts(&ifp->ctx->ipv6->kroutes); in if_initrt6()
1071 if (if_copyrt6(ifp->ctx, &rt, rtm) == 0) in if_initrt6()
1072 ipv6_handlert(ifp->ctx, RTM_ADD, &rt); in if_initrt6()
1079 if_addrflags6(const struct in6_addr *addr, const struct interface *ifp) in if_addrflags6() argument
1088 strlcpy(ifr6.ifr_name, ifp->name, sizeof(ifr6.ifr_name)); in if_addrflags6()
1091 ifa_scope(&ifr6.ifr_addr, ifp->index); in if_addrflags6()
1158 struct interface *ifp; in if_managelink() local
1197 ifp = if_findindex(ctx->ifaces, ifm->ifm_index); in if_managelink()
1198 if (ifp == NULL) in if_managelink()
1219 (unsigned int)ifm->ifm_flags, ifp->name); in if_managelink()
1274 ifp = if_findindex(ctx->ifaces, ifam->ifam_index); in if_managelink()
1275 if (ifp == NULL) in if_managelink()
1292 dhcpcd_handlehwaddr(ctx, ifp->name, in if_managelink()
1303 ifa_flags = if_addrflags(&rt.dest, ifp); in if_managelink()
1309 NULL, ifp->name, in if_managelink()
1324 ifa_flags = if_addrflags6(&ia6, ifp); in if_managelink()
1330 ifp->name, &ia6, ipv6_prefixlen(&net6), in if_managelink()
1447 #define del_if_nd6_flag(s, ifname, flag) if_nd6_flag((s), (ifp), (flag), -1)
1448 #define get_if_nd6_flag(s, ifname, flag) if_nd6_flag((s), (ifp), (flag), 0)
1449 #define set_if_nd6_flag(s, ifname, flag) if_nd6_flag((s), (ifp), (flag), 1)
1451 if_nd6_flag(int s, const struct interface *ifp, unsigned int flag, int set) in if_nd6_flag() argument
1457 strlcpy(nd.ifname, ifp->name, sizeof(nd.ifname)); in if_nd6_flag()
1487 af_attach(int s, const struct interface *ifp, int af) in af_attach() argument
1491 strlcpy(ifar.ifar_name, ifp->name, sizeof(ifar.ifar_name)); in af_attach()
1499 set_ifxflags(int s, const struct interface *ifp, int own) in set_ifxflags() argument
1511 strlcpy(ifr.ifr_name, ifp->name, sizeof(ifr.ifr_name)); in set_ifxflags()
1529 const struct interface *ifp, int own) argument
1533 if (ifp) {
1539 if (del_if_nd6_flag(s, ifp, ND6_IFF_IFDISABLED) == -1) {
1540 logger(ifp->ctx, LOG_ERR,
1542 ifp->name);
1548 if (set_if_nd6_flag(s, ifp, ND6_IFF_PERFORMNUD) == -1) {
1549 logger(ifp->ctx, LOG_ERR,
1551 ifp->name);
1560 all = get_if_nd6_flag(s, ifp, ND6_IFF_AUTO_LINKLOCAL);
1562 logger(ifp->ctx, LOG_ERR,
1565 ifp->name);
1567 logger(ifp->ctx, LOG_DEBUG,
1570 ifp->name);
1571 if (del_if_nd6_flag(s, ifp,
1574 logger(ifp->ctx, LOG_ERR,
1577 ifp->name);
1585 if (af_attach(s, ifp, AF_INET6) == -1) {
1586 logger(ifp->ctx, LOG_ERR,
1587 "%s: af_attach: %m", ifp->name);
1593 if (set_ifxflags(s, ifp, own) == -1) {
1594 logger(ifp->ctx, LOG_ERR,
1595 "%s: set_ifxflags: %m", ifp->name);
1601 override = get_if_nd6_flag(s, ifp, ND6_IFF_OVERRIDE_RTADV);
1603 logger(ifp->ctx, LOG_ERR,
1605 ifp->name);
1607 if (set_if_nd6_flag(s, ifp, ND6_IFF_OVERRIDE_RTADV)
1609 logger(ifp->ctx, LOG_ERR,
1612 ifp->name);
1619 ra = get_if_nd6_flag(s, ifp, ND6_IFF_ACCEPT_RTADV);
1621 logger(ifp->ctx, LOG_ERR,
1623 ifp->name);
1625 logger(ifp->ctx, LOG_DEBUG,
1627 ifp->name);
1628 if (del_if_nd6_flag(s, ifp, ND6_IFF_ACCEPT_RTADV)
1630 logger(ifp->ctx, LOG_ERR,
1633 ifp->name);
1637 logger(ifp->ctx, LOG_WARNING,
1638 "%s: IPv6 kernel autoconf disabled", ifp->name);
1654 logger(ifp->ctx, errno == ENOENT ? LOG_DEBUG : LOG_WARNING,
1657 logger(ifp->ctx, LOG_DEBUG, "disabling Kernel IPv6 RA support");
1659 logger(ifp->ctx, LOG_ERR, "IPV6CTL_ACCEPT_RTADV: %m");
1679 if_checkipv6(struct dhcpcd_ctx *ctx, const struct interface *ifp, int own) argument
1685 r = _if_checkipv6(s, ctx, ifp, own);