Lines Matching refs:ctx
111 struct ifaddrs_ctx *ctx = pctx;
126 for (ifs0 = ctx->hash[ifa->ifa_index % IFADDRS_HASH_SIZE]; ifs0; ifs0 = ifs0->hash_next)
163 ifs->hash_next = ctx->hash[bucket];
164 ctx->hash[bucket] = ifs;
208 if (!ctx->first) ctx->first = &ifs->ifa;
209 if (ctx->last) ctx->last->ifa_next = &ifs->ifa;
210 ctx->last = &ifs->ifa;
271 struct ifaddrs_ctx _ctx, *ctx = &_ctx;
273 memset(ctx, 0, sizeof *ctx);
274 r = __rtnetlink_enumerate_new(AF_UNSPEC, AF_UNSPEC, netlink_msg_to_ifaddr, ctx, &getlink);
276 freeifaddrs(ctx->first);
280 get_ifName_via_ioctl(ctx);
281 get_ifFlag_via_ioctl(ctx);
284 *ifap = ctx->first;