003 File Manager
Current Path:
/usr/src/contrib/wpa/src/wps
usr
/
src
/
contrib
/
wpa
/
src
/
wps
/
📁
..
📄
http.h
(690 B)
📄
http_client.c
(8.01 KB)
📄
http_client.h
(1.17 KB)
📄
http_server.c
(6.36 KB)
📄
http_server.h
(1.14 KB)
📄
httpread.c
(22.74 KB)
📄
httpread.h
(4.04 KB)
📄
ndef.c
(4.83 KB)
📄
upnp_xml.c
(7.83 KB)
📄
upnp_xml.h
(797 B)
📄
wps.c
(17.54 KB)
📄
wps.h
(28.58 KB)
📄
wps_attr_build.c
(13.55 KB)
📄
wps_attr_parse.c
(15.66 KB)
📄
wps_attr_parse.h
(3.49 KB)
📄
wps_attr_process.c
(7.2 KB)
📄
wps_common.c
(20.99 KB)
📄
wps_defs.h
(10 KB)
📄
wps_dev_attr.c
(10.44 KB)
📄
wps_dev_attr.h
(1.81 KB)
📄
wps_enrollee.c
(40.81 KB)
📄
wps_er.c
(50.46 KB)
📄
wps_er.h
(2.52 KB)
📄
wps_er_ssdp.c
(4.9 KB)
📄
wps_i.h
(6.99 KB)
📄
wps_module_tests.c
(11.77 KB)
📄
wps_registrar.c
(101.36 KB)
📄
wps_upnp.c
(37.51 KB)
📄
wps_upnp.h
(1.33 KB)
📄
wps_upnp_ap.c
(2.36 KB)
📄
wps_upnp_event.c
(11.49 KB)
📄
wps_upnp_i.h
(6.67 KB)
📄
wps_upnp_ssdp.c
(25.47 KB)
📄
wps_upnp_web.c
(37.39 KB)
📄
wps_validate.c
(46.87 KB)
Editing: wps_upnp_ap.c
/* * Wi-Fi Protected Setup - UPnP AP functionality * Copyright (c) 2009, Jouni Malinen <j@w1.fi> * * This software may be distributed under the terms of the BSD license. * See README for more details. */ #include "includes.h" #include "common.h" #include "eloop.h" #include "uuid.h" #include "wps_i.h" #include "wps_upnp.h" #include "wps_upnp_i.h" static void upnp_er_set_selected_timeout(void *eloop_ctx, void *timeout_ctx) { struct subscription *s = eloop_ctx; struct wps_registrar *reg = timeout_ctx; wpa_printf(MSG_DEBUG, "WPS: SetSelectedRegistrar from ER timed out"); s->selected_registrar = 0; wps_registrar_selected_registrar_changed(reg, 0); } int upnp_er_set_selected_registrar(struct wps_registrar *reg, struct subscription *s, const struct wpabuf *msg) { struct wps_parse_attr attr; wpa_hexdump_buf(MSG_MSGDUMP, "WPS: SetSelectedRegistrar attributes", msg); if (wps_validate_upnp_set_selected_registrar(msg) < 0 || wps_parse_msg(msg, &attr) < 0) return -1; s->reg = reg; eloop_cancel_timeout(upnp_er_set_selected_timeout, s, reg); os_memset(s->authorized_macs, 0, sizeof(s->authorized_macs)); if (attr.selected_registrar == NULL || *attr.selected_registrar == 0) { wpa_printf(MSG_DEBUG, "WPS: SetSelectedRegistrar: Disable " "Selected Registrar"); s->selected_registrar = 0; } else { s->selected_registrar = 1; s->dev_password_id = attr.dev_password_id ? WPA_GET_BE16(attr.dev_password_id) : DEV_PW_DEFAULT; s->config_methods = attr.sel_reg_config_methods ? WPA_GET_BE16(attr.sel_reg_config_methods) : -1; if (attr.authorized_macs) { int count = attr.authorized_macs_len / ETH_ALEN; if (count > WPS_MAX_AUTHORIZED_MACS) count = WPS_MAX_AUTHORIZED_MACS; os_memcpy(s->authorized_macs, attr.authorized_macs, count * ETH_ALEN); } else if (!attr.version2) { wpa_printf(MSG_DEBUG, "WPS: Add broadcast " "AuthorizedMACs for WPS 1.0 ER"); os_memset(s->authorized_macs, 0xff, ETH_ALEN); } eloop_register_timeout(WPS_PBC_WALK_TIME, 0, upnp_er_set_selected_timeout, s, reg); } wps_registrar_selected_registrar_changed(reg, 0); return 0; } void upnp_er_remove_notification(struct wps_registrar *reg, struct subscription *s) { s->selected_registrar = 0; eloop_cancel_timeout(upnp_er_set_selected_timeout, s, reg); if (reg) wps_registrar_selected_registrar_changed(reg, 0); }
Upload File
Create Folder