Lines Matching defs:ifp
152 if_linkaddr(struct sockaddr_dl *sdl, const struct interface *ifp)
159 sdl->sdl_index = (unsigned short)ifp->index;
221 if_getssid(struct interface *ifp)
225 r = if_getssid1(ifp->name, ifp->ssid);
227 ifp->ssid_len = (unsigned int)r;
294 if_openrawsocket(struct interface *ifp, uint16_t protocol)
321 state = D_STATE(ifp);
328 logger(ifp->ctx, LOG_ERR, "BPF version mismatch - recompile");
333 strlcpy(ifr.ifr_name, ifp->name, sizeof(ifr.ifr_name));
378 if_sendrawpacket(const struct interface *ifp, uint16_t protocol,
396 state = D_CSTATE(ifp);
407 if_readrawpacket(struct interface *ifp, uint16_t protocol,
416 state = D_STATE(ifp);
458 if_address(const struct interface *ifp, const struct in_addr *address,
469 strlcpy(ifra.ifra_name, ifp->name, sizeof(ifra.ifra_name));
684 if_initrt(struct interface *ifp)
692 ipv4_freerts(ifp->ctx->ipv4_kroutes);
713 if (if_copyrt(ifp->ctx, &rt, rtm) == 0)
714 ipv4_handlert(ifp->ctx, RTM_ADD, &rt);
722 if_addrflags(const struct in_addr *addr, const struct interface *ifp)
732 strlcpy(ifr.ifr_name, ifp->name, sizeof(ifr.ifr_name));
745 __unused const struct interface *ifp)
1042 if_initrt6(struct interface *ifp)
1050 ipv6_freerts(&ifp->ctx->ipv6->kroutes);
1071 if (if_copyrt6(ifp->ctx, &rt, rtm) == 0)
1072 ipv6_handlert(ifp->ctx, RTM_ADD, &rt);
1079 if_addrflags6(const struct in6_addr *addr, const struct interface *ifp)
1088 strlcpy(ifr6.ifr_name, ifp->name, sizeof(ifr6.ifr_name));
1091 ifa_scope(&ifr6.ifr_addr, ifp->index);
1158 struct interface *ifp;
1197 ifp = if_findindex(ctx->ifaces, ifm->ifm_index);
1198 if (ifp == NULL)
1219 (unsigned int)ifm->ifm_flags, ifp->name);
1274 ifp = if_findindex(ctx->ifaces, ifam->ifam_index);
1275 if (ifp == NULL)
1292 dhcpcd_handlehwaddr(ctx, ifp->name,
1303 ifa_flags = if_addrflags(&rt.dest, ifp);
1309 NULL, ifp->name,
1324 ifa_flags = if_addrflags6(&ia6, ifp);
1330 ifp->name, &ia6, ipv6_prefixlen(&net6),
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)
1457 strlcpy(nd.ifname, ifp->name, sizeof(nd.ifname));
1487 af_attach(int s, const struct interface *ifp, int af)
1491 strlcpy(ifar.ifar_name, ifp->name, sizeof(ifar.ifar_name));
1499 set_ifxflags(int s, const struct interface *ifp, int own)
1511 strlcpy(ifr.ifr_name, ifp->name, sizeof(ifr.ifr_name));
1529 const struct interface *ifp, int own)
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)
1685 r = _if_checkipv6(s, ctx, ifp, own);