Lines Matching defs:handler
41 struct gas_server_handler *handler;
65 response->handler->status_cb(response->handler->ctx,
85 gas_server_send_resp(struct gas_server *gas, struct gas_server_handler *handler,
90 size_t hdr_len = 24 + 2 + 5 + 3 + handler->adv_proto_id_len + 2;
104 response->handler = handler;
119 handler->adv_proto_id_len +
128 wpabuf_put_u8(resp, 1 + handler->adv_proto_id_len); /* Length */
131 wpabuf_put_data(resp, handler->adv_proto_id, handler->adv_proto_id_len);
163 struct gas_server_handler *handler;
210 dl_list_for_each(handler, &gas->handlers, struct gas_server_handler,
212 if (adv_proto_len < 1 + handler->adv_proto_id_len ||
213 os_memcmp(adv_proto + 1, handler->adv_proto_id,
214 handler->adv_proto_id_len) != 0)
218 "GAS: Calling handler for the requested Advertisement Protocol ID");
219 resp = handler->req_cb(handler->ctx, sa, query_req,
221 wpa_hexdump_buf(MSG_MSGDUMP, "GAS: Response from the handler",
223 gas_server_send_resp(gas, handler, sa, freq, dialog_token,
229 "GAS: No registered handler for the requested Advertisement Protocol ID");
237 struct gas_server_handler *handler = response->handler;
238 struct gas_server *gas = handler->gas;
240 size_t hdr_len = 24 + 2 + 6 + 3 + handler->adv_proto_id_len + 2;
257 handler->adv_proto_id_len +
266 wpabuf_put_u8(resp, 1 + handler->adv_proto_id_len); /* Length */
269 wpabuf_put_data(resp, handler->adv_proto_id, handler->adv_proto_id_len);
371 response->handler->status_cb(response->handler->ctx,
435 struct gas_server_handler *handler, *tmp;
441 dl_list_for_each_safe(handler, tmp, &gas->handlers,
443 dl_list_del(&handler->list);
444 os_free(handler);
466 struct gas_server_handler *handler;
470 handler = os_zalloc(sizeof(*handler));
471 if (!handler)
474 os_memcpy(handler->adv_proto_id, adv_proto_id, adv_proto_id_len);
475 handler->adv_proto_id_len = adv_proto_id_len;
476 handler->req_cb = req_cb;
477 handler->status_cb = status_cb;
478 handler->ctx = ctx;
479 handler->gas = gas;
480 dl_list_add(&gas->handlers, &handler->list);