Lines Matching refs:ctx
24 static void hostapd_logger_cb(void *ctx, const u8 *addr, unsigned int module, in hostapd_logger_cb() argument
51 struct radius_ctx *ctx = eloop_ctx; in start_example() local
56 ctx->radius_identifier = radius_client_get_id(ctx->radius); in start_example()
58 ctx->radius_identifier); in start_example()
75 ctx->conf.auth_server->shared_secret, in start_example()
76 ctx->conf.auth_server->shared_secret_len)) { in start_example()
83 (u8 *) &ctx->own_ip_addr, 4)) { in start_example()
89 if (radius_client_send(ctx->radius, msg, RADIUS_AUTH, NULL) < 0) in start_example()
96 struct radius_ctx ctx; in main() local
104 os_memset(&ctx, 0, sizeof(ctx)); in main()
105 inet_aton("127.0.0.1", &ctx.own_ip_addr); in main()
125 ctx.conf.auth_server = ctx.conf.auth_servers = srv; in main()
126 ctx.conf.num_auth_servers = 1; in main()
127 ctx.conf.msg_dumps = 1; in main()
129 ctx.radius = radius_client_init(&ctx, &ctx.conf); in main()
130 if (ctx.radius == NULL) { in main()
135 if (radius_client_register(ctx.radius, RADIUS_AUTH, receive_auth, in main()
136 &ctx) < 0) { in main()
141 eloop_register_timeout(0, 0, start_example, &ctx, NULL); in main()
145 radius_client_deinit(ctx.radius); in main()