• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/wpa/src/common/

Lines Matching refs:dpp

33 #include "dpp.h"
4228 else if (bin_str_eq(type, len, "sae-dpp") ||
4229 bin_str_eq(type, len, "dpp+sae"))
4231 else if (bin_str_eq(type, len, "psk-sae-dpp") ||
4232 bin_str_eq(type, len, "dpp+psk+sae"))
4234 else if (bin_str_eq(type, len, "dpp"))
4411 dpp_configurator_get_id(struct dpp_global *dpp, unsigned int id)
4415 if (!dpp)
4418 dl_list_for_each(conf, &dpp->configurator,
4427 int dpp_set_configurator(struct dpp_global *dpp, void *msg_ctx,
4441 auth->conf = dpp_configurator_get_id(dpp, atoi(pos));
5797 return "dpp";
5805 return "dpp+sae";
5807 return "dpp+psk+sae";
5822 if (os_strcmp(akm, "dpp") == 0)
5824 if (os_strcmp(akm, "dpp+sae") == 0)
5826 if (os_strcmp(akm, "dpp+psk+sae") == 0)
8347 static unsigned int dpp_next_id(struct dpp_global *dpp)
8352 dl_list_for_each(bi, &dpp->bootstrap, struct dpp_bootstrap_info, list) {
8360 static int dpp_bootstrap_del(struct dpp_global *dpp, unsigned int id)
8365 if (!dpp)
8368 dl_list_for_each_safe(bi, tmp, &dpp->bootstrap,
8383 struct dpp_bootstrap_info * dpp_add_qr_code(struct dpp_global *dpp,
8388 if (!dpp)
8395 bi->id = dpp_next_id(dpp);
8396 dl_list_add(&dpp->bootstrap, &bi->list);
8401 int dpp_bootstrap_gen(struct dpp_global *dpp, const char *cmd)
8411 if (!dpp)
8468 bi->id = dpp_next_id(dpp);
8469 dl_list_add(&dpp->bootstrap, &bi->list);
8486 dpp_bootstrap_get_id(struct dpp_global *dpp, unsigned int id)
8490 if (!dpp)
8493 dl_list_for_each(bi, &dpp->bootstrap, struct dpp_bootstrap_info, list) {
8501 int dpp_bootstrap_remove(struct dpp_global *dpp, const char *id)
8513 return dpp_bootstrap_del(dpp, id_val);
8518 dpp_pkex_finish(struct dpp_global *dpp, struct dpp_pkex *pkex, const u8 *peer,
8526 bi->id = dpp_next_id(dpp);
8539 dl_list_add(&dpp->bootstrap, &bi->list);
8544 const char * dpp_bootstrap_get_uri(struct dpp_global *dpp, unsigned int id)
8548 bi = dpp_bootstrap_get_id(dpp, id);
8555 int dpp_bootstrap_info(struct dpp_global *dpp, int id,
8561 bi = dpp_bootstrap_get_id(dpp, id);
8581 void dpp_bootstrap_find_pair(struct dpp_global *dpp, const u8 *i_bootstrap,
8590 if (!dpp)
8593 dl_list_for_each(bi, &dpp->bootstrap, struct dpp_bootstrap_info, list) {
8617 static unsigned int dpp_next_configurator_id(struct dpp_global *dpp)
8622 dl_list_for_each(conf, &dpp->configurator, struct dpp_configurator,
8631 int dpp_configurator_add(struct dpp_global *dpp, const char *cmd)
8655 conf->id = dpp_next_configurator_id(dpp);
8656 dl_list_add(&dpp->configurator, &conf->list);
8668 static int dpp_configurator_del(struct dpp_global *dpp, unsigned int id)
8673 if (!dpp)
8676 dl_list_for_each_safe(conf, tmp, &dpp->configurator,
8691 int dpp_configurator_remove(struct dpp_global *dpp, const char *id)
8703 return dpp_configurator_del(dpp, id_val);
8707 int dpp_configurator_get_key_id(struct dpp_global *dpp, unsigned int id,
8712 conf = dpp_configurator_get_id(dpp, id);
8745 static void dpp_tcp_init_flush(struct dpp_global *dpp)
8749 dl_list_for_each_safe(conn, tmp, &dpp->tcp_init, struct dpp_connection,
8766 static void dpp_relay_flush_controllers(struct dpp_global *dpp)
8770 if (!dpp)
8773 dl_list_for_each_safe(ctrl, tmp, &dpp->controllers,
8785 struct dpp_global *dpp;
8787 dpp = os_zalloc(sizeof(*dpp));
8788 if (!dpp)
8790 dpp->msg_ctx = config->msg_ctx;
8792 dpp->cb_ctx = config->cb_ctx;
8793 dpp->process_conf_obj = config->process_conf_obj;
8796 dl_list_init(&dpp->bootstrap);
8797 dl_list_init(&dpp->configurator);
8799 dl_list_init(&dpp->controllers);
8800 dl_list_init(&dpp->tcp_init);
8803 return dpp;
8807 void dpp_global_clear(struct dpp_global *dpp)
8809 if (!dpp)
8812 dpp_bootstrap_del(dpp, 0);
8813 dpp_configurator_del(dpp, 0);
8815 dpp_tcp_init_flush(dpp);
8816 dpp_relay_flush_controllers(dpp);
8817 dpp_controller_stop(dpp);
8822 void dpp_global_deinit(struct dpp_global *dpp)
8824 dpp_global_clear(dpp);
8825 os_free(dpp);
8837 int dpp_relay_add_controller(struct dpp_global *dpp,
8842 if (!dpp)
8849 ctrl->global = dpp;
8855 dl_list_add(&dpp->controllers, &ctrl->list);
8861 dpp_relay_controller_get(struct dpp_global *dpp, const u8 *pkhash)
8865 if (!dpp)
8868 dl_list_for_each(ctrl, &dpp->controllers, struct dpp_relay_controller,
9184 int dpp_relay_rx_action(struct dpp_global *dpp, const u8 *src, const u8 *hdr,
9197 dl_list_for_each(ctrl, &dpp->controllers,
9211 ctrl = dpp_relay_controller_get(dpp, r_bootstrap);
9232 int dpp_relay_rx_gas_req(struct dpp_global *dpp, const u8 *src, const u8 *data,
9242 dl_list_for_each(ctrl, &dpp->controllers,
9908 int dpp_tcp_init(struct dpp_global *dpp, struct dpp_authentication *auth,
9931 conn->global = dpp;
9972 dl_list_add(&dpp->tcp_init, &conn->list);
9980 int dpp_controller_start(struct dpp_global *dpp,
9988 if (!dpp || dpp->controller)
9994 ctrl->global = dpp;
10039 dpp->controller = ctrl;
10048 void dpp_controller_stop(struct dpp_global *dpp)
10050 if (dpp) {
10051 dpp_controller_free(dpp->controller);
10052 dpp->controller = NULL;