Lines Matching refs:ifp
206 if_init(struct interface *ifp) in if_init() argument
218 snprintf(path, sizeof(path), PROC_PROMOTE, ifp->name); in if_init()
228 if_conf(struct interface *ifp) in if_conf() argument
234 snprintf(path, sizeof(path), SYS_LAYER2, ifp->name); in if_conf()
239 ifp->options->options |= DHCPCD_BROADCAST; in if_conf()
321 get_netlink(struct dhcpcd_ctx *ctx, struct interface *ifp, int fd, int flags, in get_netlink() argument
381 r = callback(ctx, ifp, nlm); in get_netlink()
523 link_route(struct dhcpcd_ctx *ctx, __unused struct interface *ifp, in link_route() argument
579 link_addr(struct dhcpcd_ctx *ctx, struct interface *ifp, struct nlmsghdr *nlm) in link_addr() argument
600 if ((ifp = if_findindex(ctx->ifaces, ifa->ifa_index)) == NULL) { in link_addr()
616 if (ifp->flags & IFF_POINTOPOINT) { in link_addr()
628 ipv4_handleifa(ctx, nlm->nlmsg_type, NULL, ifp->name, in link_addr()
644 ipv6_handleifa(ctx, nlm->nlmsg_type, NULL, ifp->name, in link_addr()
674 struct interface *ifp; in handle_rename() local
676 TAILQ_FOREACH(ifp, ctx->ifaces, next) { in handle_rename()
677 if (ifp->index == ifindex && strcmp(ifp->name, ifname)) { in handle_rename()
678 dhcpcd_handleinterface(ctx, -1, ifp->name); in handle_rename()
690 link_neigh(struct dhcpcd_ctx *ctx, __unused struct interface *ifp, in link_neigh() argument
734 link_netlink(struct dhcpcd_ctx *ctx, struct interface *ifp, in link_netlink() argument
743 r = link_route(ctx, ifp, nlm); in link_netlink()
746 r = link_addr(ctx, ifp, nlm); in link_netlink()
750 r = link_neigh(ctx, ifp, nlm); in link_netlink()
807 if ((ifp = if_find(ctx->ifaces, ifn)) == NULL) { in link_netlink()
839 send_netlink(struct dhcpcd_ctx *ctx, struct interface *ifp, in send_netlink() argument
865 r = get_netlink(ctx, ifp, s, 0, callback); in send_netlink()
1010 _gnl_getfamily(__unused struct dhcpcd_ctx *ctx, __unused struct interface *ifp, in _gnl_getfamily() argument
1045 _if_getssid(__unused struct dhcpcd_ctx *ctx, struct interface *ifp, in _if_getssid() argument
1056 ifp->ssid_len = 0; in _if_getssid()
1060 ifp->ssid_len = NLA_LEN(tb[NL80211_ATTR_SSID]); in _if_getssid()
1061 if (ifp->ssid_len > sizeof(ifp->ssid)) { in _if_getssid()
1063 ifp->ssid_len = 0; in _if_getssid()
1066 memcpy(ifp->ssid, NLA_DATA(tb[NL80211_ATTR_SSID]), ifp->ssid_len); in _if_getssid()
1069 ifp->ssid[ifp->ssid_len] = '\0'; in _if_getssid()
1070 return (int)ifp->ssid_len; in _if_getssid()
1074 if_getssid_nl80211(struct interface *ifp) in if_getssid_nl80211() argument
1080 family = gnl_getfamily(ifp->ctx, "nl80211"); in if_getssid_nl80211()
1088 nla_put_32(&nlm.hdr, sizeof(nlm), NL80211_ATTR_IFINDEX, ifp->index); in if_getssid_nl80211()
1090 return send_netlink(ifp->ctx, ifp, in if_getssid_nl80211()
1096 if_getssid(struct interface *ifp) in if_getssid() argument
1100 r = if_getssid_wext(ifp->name, ifp->ssid); in if_getssid()
1102 ifp->ssid_len = (unsigned int)r; in if_getssid()
1105 r = if_getssid_nl80211(ifp); in if_getssid()
1128 if_openrawsocket(struct interface *ifp, uint16_t protocol) in if_openrawsocket() argument
1185 su.sll.sll_ifindex = (int)ifp->index; in if_openrawsocket()
1196 if_sendrawpacket(const struct interface *ifp, uint16_t protocol, in if_sendrawpacket() argument
1210 su.sll.sll_ifindex = (int)ifp->index; in if_sendrawpacket()
1211 su.sll.sll_hatype = htons(ifp->family); in if_sendrawpacket()
1212 su.sll.sll_halen = (unsigned char)ifp->hwlen; in if_sendrawpacket()
1213 if (ifp->family == ARPHRD_INFINIBAND) in if_sendrawpacket()
1218 memcpy(&su.sll.sll_addr, dest_hw_addr, ifp->hwlen); in if_sendrawpacket()
1220 memset(&su.sll.sll_addr, 0xff, ifp->hwlen); in if_sendrawpacket()
1222 state = D_CSTATE(ifp); in if_sendrawpacket()
1232 if_readrawpacket(struct interface *ifp, uint16_t protocol, in if_readrawpacket() argument
1258 state = D_STATE(ifp); in if_readrawpacket()
1391 _if_initrt(struct dhcpcd_ctx *ctx, __unused struct interface *ifp, in _if_initrt() argument
1402 if_initrt(struct interface *ifp) in if_initrt() argument
1406 ipv4_freerts(ifp->ctx->ipv4_kroutes); in if_initrt()
1415 add_attr_32(&nlm.hdr, sizeof(nlm), RTA_OIF, ifp->index); in if_initrt()
1417 return send_netlink(ifp->ctx, ifp, in if_initrt()
1423 __unused const struct interface *ifp) in if_addrflags() argument
1593 _if_initrt6(struct dhcpcd_ctx *ctx, __unused struct interface *ifp, in _if_initrt6() argument
1604 if_initrt6(struct interface *ifp) in if_initrt6() argument
1608 ipv6_freerts(&ifp->ctx->ipv6->kroutes); in if_initrt6()
1617 add_attr_32(&nlm.hdr, sizeof(nlm), RTA_OIF, ifp->index); in if_initrt6()
1619 return send_netlink(ifp->ctx, ifp, in if_initrt6()
1624 if_addrflags6(const struct in6_addr *addr, const struct interface *ifp) in if_addrflags6() argument
1649 if (strcmp(name, ifp->name) == 0 && in if_addrflags6()
1728 if_checkipv6(struct dhcpcd_ctx *ctx, const struct interface *ifp, int own) in if_checkipv6() argument
1734 if (ifp == NULL) in if_checkipv6()
1737 if (if_disable_autolinklocal(ctx, (int)ifp->index) == -1) in if_checkipv6()
1739 "%s: if_disable_autolinklocal: %m", ifp->name); in if_checkipv6()
1741 if (ifp) in if_checkipv6()
1742 ifname = ifp->name; in if_checkipv6()