Lines Matching defs:ctx
107 struct ifaddrs_ctx* ctx = pctx;
122 for (ifs0 = ctx->hash[ifa->ifa_index % IFADDRS_HASH_SIZE]; ifs0; ifs0 = ifs0->hash_next)
161 ifs->hash_next = ctx->hash[bucket];
162 ctx->hash[bucket] = ifs;
207 if (!ctx->first)
208 ctx->first = ifs;
209 if (ctx->last)
210 ctx->last->ifa.ifa_next = &ifs->ifa;
211 ctx->last = ifs;
219 struct ifaddrs_ctx _ctx, *ctx = &_ctx;
221 memset(ctx, 0, sizeof *ctx);
222 r = __rtnetlink_enumerate(AF_UNSPEC, AF_UNSPEC, netlink_msg_to_ifaddr, ctx);
224 *ifap = &ctx->first->ifa;
226 freeifaddrs(&ctx->first->ifa);