├── .gitignore ├── wpa_supplicant-2.10 ├── src │ ├── eap_peer │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── mschapv2.h │ │ ├── tncc.h │ │ ├── ikev2.h │ │ ├── eap_fast_pac.h │ │ ├── eap_teap_pac.h │ │ └── eap_proxy.h │ ├── l2_packet │ │ └── Makefile │ ├── eapol_auth │ │ └── Makefile │ ├── eapol_supp │ │ └── Makefile │ ├── fst │ │ ├── Makefile │ │ ├── fst_ctrl_iface.h │ │ └── fst_internal.h │ ├── pae │ │ ├── Makefile │ │ ├── ieee802_1x_key.h │ │ └── ieee802_1x_cp.h │ ├── objs.mk │ ├── eap_server │ │ ├── Makefile │ │ ├── tncs.h │ │ └── ikev2.h │ ├── radius │ │ └── Makefile │ ├── drivers │ │ ├── Makefile │ │ ├── rfkill.h │ │ ├── netlink.h │ │ ├── linux_ioctl.h │ │ ├── linux_wext.h │ │ ├── linux_defines.h │ │ ├── driver_wired_common.h │ │ └── drivers.c │ ├── rsn_supp │ │ ├── Makefile │ │ └── wpa_ie.h │ ├── p2p │ │ └── Makefile │ ├── utils │ │ ├── crc32.h │ │ ├── platform.h │ │ ├── uuid.h │ │ ├── module_tests.h │ │ ├── browser.h │ │ ├── Makefile │ │ ├── bitfield.h │ │ ├── edit.h │ │ ├── base64.h │ │ ├── ip_addr.h │ │ ├── ext_password_i.h │ │ ├── ext_password.h │ │ ├── config.h │ │ ├── ip_addr.c │ │ ├── includes.h │ │ ├── pcsc_funcs.h │ │ └── build_config.h │ ├── common │ │ ├── Makefile │ │ ├── version.h │ │ ├── qca-vendor-attr.h │ │ ├── linux_bridge.h │ │ ├── dragonfly.h │ │ ├── linux_vlan.h │ │ ├── ocv.h │ │ ├── wpa_helpers.h │ │ ├── ctrl_iface_common.h │ │ ├── cli.h │ │ ├── gas_server.h │ │ └── gas.h │ ├── eap_common │ │ ├── Makefile │ │ ├── chap.h │ │ ├── eap_peap_common.h │ │ ├── chap.c │ │ ├── eap_wsc_common.h │ │ ├── eap_wsc_common.c │ │ ├── eap_ikev2_common.h │ │ └── eap_common.h │ ├── ap │ │ ├── authsrv.h │ │ ├── bss_load.h │ │ ├── wpa_auth_glue.h │ │ ├── wpa_auth_ie.h │ │ ├── tkip_countermeasures.h │ │ ├── fils_hlp.h │ │ ├── dhcp_snoop.h │ │ ├── wmm.h │ │ ├── vlan.h │ │ ├── taxonomy.h │ │ ├── acs.h │ │ ├── vlan.c │ │ ├── hs20.h │ │ ├── ndisc_snoop.h │ │ ├── p2p_hostapd.h │ │ ├── eth_p_oui.h │ │ ├── vlan_util.h │ │ ├── ap_mlme.h │ │ ├── neighbor_db.h │ │ ├── wnm_ap.h │ │ ├── vlan_init.h │ │ ├── Makefile │ │ ├── accounting.h │ │ ├── ieee802_11_auth.h │ │ ├── rrm.h │ │ ├── mbo_ap.h │ │ ├── wpa_auth_kay.h │ │ ├── gas_query_ap.h │ │ ├── beacon.h │ │ ├── airtime_policy.h │ │ ├── preauth_auth.h │ │ ├── dfs.h │ │ └── x_snoop.h │ ├── Makefile │ ├── tls │ │ ├── pkcs5.h │ │ ├── pkcs8.h │ │ ├── Makefile │ │ ├── rsa.h │ │ ├── pkcs1.h │ │ ├── bignum.h │ │ └── tlsv1_cred.h │ ├── crypto │ │ ├── tls_openssl.h │ │ ├── crypto_none.c │ │ ├── md5.h │ │ ├── md5_i.h │ │ ├── aes.h │ │ ├── dh_group5.h │ │ ├── aes_siv.h │ │ ├── sha384_i.h │ │ ├── sha1_i.h │ │ ├── sha256_i.h │ │ ├── sha512_i.h │ │ ├── des_i.h │ │ ├── dh_groups.h │ │ ├── aes-encblock.c │ │ ├── random.h │ │ ├── dh_group5.c │ │ ├── sha512.h │ │ ├── milenage.h │ │ ├── sha1.h │ │ ├── sha256.h │ │ ├── sha384.h │ │ ├── rc4.c │ │ ├── Makefile │ │ └── fips_prf_internal.c │ ├── wps │ │ ├── Makefile │ │ ├── http.h │ │ ├── upnp_xml.h │ │ ├── http_server.h │ │ ├── http_client.h │ │ └── wps_upnp.h │ └── lib.rules ├── wpa_supplicant │ ├── eap_proxy_dummy.mk │ ├── eap_proxy_dummy.mak │ ├── dbus │ │ ├── .gitignore │ │ ├── fi.w1.wpa_supplicant1.service.in │ │ ├── dbus_common.h │ │ ├── dbus-wpa_supplicant.conf │ │ ├── dbus_common_i.h │ │ └── Makefile │ ├── wpa_gui-qt4 │ │ ├── lang │ │ │ └── .gitignore │ │ ├── icons │ │ │ ├── .gitignore │ │ │ └── Makefile │ │ ├── .gitignore │ │ ├── wpa_gui.desktop │ │ ├── icons.qrc │ │ ├── icons_png.qrc │ │ ├── scanresultsitem.cpp │ │ ├── scanresultsitem.h │ │ ├── stringquery.h │ │ ├── signalbar.h │ │ ├── stringquery.cpp │ │ ├── wpamsg.h │ │ ├── addinterface.h │ │ ├── userdatarequest.h │ │ ├── scanresults.h │ │ ├── peers.ui │ │ ├── signalbar.cpp │ │ ├── eventhistory.h │ │ ├── networkconfig.h │ │ └── main.cpp │ ├── doc │ │ └── docbook │ │ │ ├── .gitignore │ │ │ └── Makefile │ ├── examples │ │ ├── plaintext.conf │ │ ├── wep.conf │ │ ├── wpa-psk-tkip.conf │ │ ├── ieee8021x.conf │ │ ├── wpa2-eap-ccmp.conf │ │ ├── 60_wpa_supplicant │ │ ├── openCryptoki.conf │ │ └── wps-ap-cli │ ├── wpa_supplicant_template.conf │ ├── .gitignore │ ├── binder │ │ ├── .clang-format │ │ ├── iface.cpp │ │ ├── binder_constants.cpp │ │ ├── binder_i.h │ │ ├── binder_constants.h │ │ ├── iface.h │ │ └── binder.h │ ├── systemd │ │ ├── wpa_supplicant.service.in │ │ ├── wpa_supplicant.service.arg.in │ │ ├── wpa_supplicant-wired.service.arg.in │ │ └── wpa_supplicant-nl80211.service.arg.in │ ├── wpa_supplicant_conf.sh │ ├── libwpa_test.c │ ├── wifi_display.h │ ├── main_none.c │ ├── wpas_glue.h │ ├── bssid_ignore.h │ ├── win_example.reg │ ├── wpas_kay.h │ ├── wpa_supplicant_conf.mk │ ├── interworking.h │ ├── config_none.c │ ├── offchannel.h │ ├── autoscan.h │ ├── mesh_rsn.h │ ├── mesh_mpm.h │ ├── mesh.h │ ├── gas_query.h │ └── utils │ │ └── log2pcap.py ├── hs20 │ └── client │ │ ├── .gitignore │ │ ├── devinfo.xml │ │ └── devdetail.xml └── COPYING ├── split.sh └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | wpa_supplicant-2.10/ -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/eap_peer/.gitignore: -------------------------------------------------------------------------------- 1 | *.so 2 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/eap_proxy_dummy.mk: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/eap_proxy_dummy.mak: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/dbus/.gitignore: -------------------------------------------------------------------------------- 1 | libwpadbus.a 2 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/wpa_gui-qt4/lang/.gitignore: -------------------------------------------------------------------------------- 1 | *.qm 2 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/wpa_gui-qt4/icons/.gitignore: -------------------------------------------------------------------------------- 1 | hicolor 2 | pixmaps 3 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/hs20/client/.gitignore: -------------------------------------------------------------------------------- 1 | hs20-osu-client 2 | SP 3 | osu-ca.pem 4 | spp.xsd 5 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/wpa_gui-qt4/.gitignore: -------------------------------------------------------------------------------- 1 | .moc 2 | .obj 3 | .ui 4 | qrc_icons.cpp 5 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/l2_packet/Makefile: -------------------------------------------------------------------------------- 1 | LIB_OBJS = l2_packet_linux.o 2 | 3 | include ../lib.rules 4 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/eapol_auth/Makefile: -------------------------------------------------------------------------------- 1 | LIB_OBJS = eapol_auth_sm.o eapol_auth_dump.o 2 | include ../lib.rules 3 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/eapol_supp/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS += -DIEEE8021X_EAPOL 2 | 3 | LIB_OBJS = eapol_supp_sm.o 4 | 5 | include ../lib.rules 6 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/doc/docbook/.gitignore: -------------------------------------------------------------------------------- 1 | manpage.links 2 | manpage.refs 3 | manpage.log 4 | *.8 5 | *.5 6 | *.html 7 | *.pdf 8 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/eap_peer/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS += -DIEEE8021X_EAPOL 2 | 3 | LIB_OBJS= \ 4 | eap.o \ 5 | eap_methods.o 6 | 7 | include ../lib.rules 8 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/fst/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | @echo Nothing to be made. 3 | 4 | clean: 5 | rm -f *~ *.o *.d 6 | 7 | install: 8 | @echo Nothing to be made. 9 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/pae/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | @echo Nothing to be made. 3 | 4 | clean: 5 | rm -f *~ *.o *.d 6 | 7 | install: 8 | @echo Nothing to be made. 9 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/objs.mk: -------------------------------------------------------------------------------- 1 | $(_OBJS_VAR) := $(call BUILDOBJ,$($(_OBJS_VAR))) 2 | -include $(filter-out %.a,$($(_OBJS_VAR):%.o=%.d)) 3 | _DIRS += $(dir $($(_OBJS_VAR))) 4 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/eap_server/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS += -DCONFIG_HS20 2 | 3 | LIB_OBJS= \ 4 | eap_server.o \ 5 | eap_server_identity.o \ 6 | eap_server_methods.o 7 | 8 | include ../lib.rules 9 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/radius/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS += -DCONFIG_IPV6 2 | 3 | LIB_OBJS= \ 4 | radius.o \ 5 | radius_client.o \ 6 | radius_das.o \ 7 | radius_server.o 8 | 9 | include ../lib.rules 10 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.in: -------------------------------------------------------------------------------- 1 | [D-BUS Service] 2 | Name=fi.w1.wpa_supplicant1 3 | Exec=@BINDIR@/wpa_supplicant -u 4 | User=root 5 | SystemdService=wpa_supplicant.service 6 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/examples/plaintext.conf: -------------------------------------------------------------------------------- 1 | # Plaintext (no encryption) network 2 | 3 | ctrl_interface=/var/run/wpa_supplicant 4 | 5 | network={ 6 | ssid="example open network" 7 | key_mgmt=NONE 8 | } 9 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/wpa_supplicant_template.conf: -------------------------------------------------------------------------------- 1 | ##### wpa_supplicant configuration file template ##### 2 | update_config=1 3 | eapol_version=1 4 | ap_scan=1 5 | fast_reauth=1 6 | pmf=1 7 | p2p_add_cli_chan=1 8 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/drivers/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | @echo Nothing to be made. 3 | 4 | clean: 5 | rm -f *~ *.o *.d *.gcno *.gcda *.gcov 6 | rm -f build.wpa_supplicant build.hostapd 7 | 8 | install: 9 | @echo Nothing to be made. 10 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/hs20/client/devinfo.xml: -------------------------------------------------------------------------------- 1 | 2 | urn:Example:HS20-station:123456 3 | Manufacturer 4 | HS20-station 5 | 1.2 6 | en 7 | 8 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/examples/wep.conf: -------------------------------------------------------------------------------- 1 | # Static WEP keys 2 | 3 | ctrl_interface=/var/run/wpa_supplicant 4 | 5 | network={ 6 | ssid="example wep network" 7 | key_mgmt=NONE 8 | wep_key0="abcde" 9 | wep_key1=0102030405 10 | wep_tx_keyidx=0 11 | } 12 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/examples/wpa-psk-tkip.conf: -------------------------------------------------------------------------------- 1 | # WPA-PSK/TKIP 2 | 3 | ctrl_interface=/var/run/wpa_supplicant 4 | 5 | network={ 6 | ssid="example wpa-psk network" 7 | key_mgmt=WPA-PSK 8 | proto=WPA 9 | pairwise=TKIP 10 | group=TKIP 11 | psk="secret passphrase" 12 | } 13 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/rsn_supp/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS += -DCONFIG_IEEE80211R 2 | CFLAGS += -DCONFIG_TDLS 3 | CFLAGS += -DCONFIG_WNM 4 | CFLAGS += -DIEEE8021X_EAPOL 5 | 6 | LIB_OBJS= \ 7 | pmksa_cache.o \ 8 | wpa_ft.o \ 9 | tdls.o \ 10 | preauth.o \ 11 | wpa.o \ 12 | wpa_ie.o 13 | 14 | include ../lib.rules 15 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/.gitignore: -------------------------------------------------------------------------------- 1 | .config 2 | *.service 3 | eapol_test 4 | nfc_pw_token 5 | preauth_test 6 | wpa_cli 7 | wpa_passphrase 8 | wpa_supplicant 9 | wpa_priv 10 | wpa_gui/Makefile 11 | wpa_gui/wpa_gui 12 | wpa_gui-qt4/Makefile 13 | wpa_gui-qt4/wpa_gui 14 | libwpa_test1 15 | libwpa_test2 16 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/binder/.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: LLVM 2 | IndentWidth: 8 3 | UseTab: Always 4 | BreakBeforeBraces: Mozilla 5 | AllowShortIfStatementsOnASingleLine: false 6 | IndentCaseLabels: false 7 | AccessModifierOffset: -8 8 | AlignAfterOpenBracket: AlwaysBreak 9 | SortIncludes: false 10 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/wpa_gui-qt4/wpa_gui.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Name=wpa_gui 4 | Comment=Graphical user interface for wpa_supplicant 5 | Exec=wpa_gui 6 | Icon=wpa_gui 7 | GenericName=wpa_supplicant user interface 8 | Terminal=false 9 | Type=Application 10 | Categories=Qt;Network; 11 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/p2p/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS += -DCONFIG_WIFI_DISPLAY 2 | CFLAGS += -DCONFIG_WPS_NFC 3 | 4 | LIB_OBJS= \ 5 | p2p_build.o \ 6 | p2p.o \ 7 | p2p_dev_disc.o \ 8 | p2p_go_neg.o \ 9 | p2p_group.o \ 10 | p2p_invitation.o \ 11 | p2p_parse.o \ 12 | p2p_pd.o \ 13 | p2p_sd.o \ 14 | p2p_utils.o 15 | 16 | include ../lib.rules 17 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/examples/ieee8021x.conf: -------------------------------------------------------------------------------- 1 | # IEEE 802.1X with dynamic WEP keys using EAP-PEAP/MSCHAPv2 2 | 3 | ctrl_interface=/var/run/wpa_supplicant 4 | 5 | network={ 6 | ssid="example 802.1x network" 7 | key_mgmt=IEEE8021X 8 | eap=PEAP 9 | phase2="auth=MSCHAPV2" 10 | identity="user name" 11 | password="password" 12 | ca_cert="/etc/cert/ca.pem" 13 | } 14 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/systemd/wpa_supplicant.service.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=WPA supplicant 3 | Before=network.target 4 | After=dbus.service 5 | Wants=network.target 6 | 7 | [Service] 8 | Type=dbus 9 | BusName=fi.w1.wpa_supplicant1 10 | ExecStart=@BINDIR@/wpa_supplicant -u 11 | 12 | [Install] 13 | WantedBy=multi-user.target 14 | Alias=dbus-fi.w1.wpa_supplicant1.service 15 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/utils/crc32.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 32-bit CRC for FCS calculation 3 | * Copyright (c) 2010, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef CRC32_H 10 | #define CRC32_H 11 | 12 | u32 crc32(const u8 *frame, size_t frame_len); 13 | 14 | #endif /* CRC32_H */ 15 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/common/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS += -DCONFIG_IEEE80211R 2 | CFLAGS += -DCONFIG_HS20 3 | CFLAGS += -DCONFIG_SAE 4 | CFLAGS += -DCONFIG_SUITE 5 | CFLAGS += -DCONFIG_SUITEB 6 | CFLAGS += -DCONFIG_PTKSA_CACHE 7 | 8 | LIB_OBJS= \ 9 | gas.o \ 10 | hw_features_common.o \ 11 | ieee802_11_common.o \ 12 | sae.o \ 13 | ptksa_cache.o \ 14 | wpa_common.o 15 | 16 | include ../lib.rules 17 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/wpa_gui-qt4/icons.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | icons/wpa_gui.svg 4 | icons/ap.svg 5 | icons/laptop.svg 6 | icons/group.svg 7 | icons/invitation.svg 8 | 9 | 10 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/examples/wpa2-eap-ccmp.conf: -------------------------------------------------------------------------------- 1 | # WPA2-EAP/CCMP using EAP-TLS 2 | 3 | ctrl_interface=/var/run/wpa_supplicant 4 | 5 | network={ 6 | ssid="example wpa2-eap network" 7 | key_mgmt=WPA-EAP 8 | proto=WPA2 9 | pairwise=CCMP 10 | group=CCMP 11 | eap=TLS 12 | ca_cert="/etc/cert/ca.pem" 13 | private_key="/etc/cert/user.p12" 14 | private_key_passwd="PKCS#12 passhrase" 15 | } 16 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/examples/60_wpa_supplicant: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # /etc/pm/sleep.d/60_wpa_supplicant 4 | # Action script to notify wpa_supplicant of pm-action events. 5 | 6 | PATH=/sbin:/usr/sbin:/bin:/usr/bin 7 | 8 | WPACLI=wpa_cli 9 | 10 | case "$1" in 11 | suspend|hibernate) 12 | $WPACLI suspend 13 | ;; 14 | resume|thaw) 15 | $WPACLI resume 16 | ;; 17 | esac 18 | 19 | exit 0 20 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/common/version.h: -------------------------------------------------------------------------------- 1 | #ifndef VERSION_H 2 | #define VERSION_H 3 | 4 | #ifndef VERSION_STR_POSTFIX 5 | #define VERSION_STR_POSTFIX "" 6 | #endif /* VERSION_STR_POSTFIX */ 7 | 8 | #ifndef GIT_VERSION_STR_POSTFIX 9 | #define GIT_VERSION_STR_POSTFIX "" 10 | #endif /* GIT_VERSION_STR_POSTFIX */ 11 | 12 | #define VERSION_STR "2.10" VERSION_STR_POSTFIX GIT_VERSION_STR_POSTFIX 13 | 14 | #endif /* VERSION_H */ 15 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/eap_common/Makefile: -------------------------------------------------------------------------------- 1 | LIB_OBJS= \ 2 | chap.o \ 3 | eap_common.o \ 4 | eap_eke_common.o \ 5 | eap_eke_common.o \ 6 | eap_fast_common.o \ 7 | eap_gpsk_common.o \ 8 | eap_ikev2_common.o \ 9 | eap_pax_common.o \ 10 | eap_peap_common.o \ 11 | eap_psk_common.o \ 12 | eap_pwd_common.o \ 13 | eap_sake_common.o \ 14 | eap_sim_common.o \ 15 | eap_wsc_common.o \ 16 | ikev2_common.o 17 | 18 | include ../lib.rules 19 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/authsrv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Authentication server setup 3 | * Copyright (c) 2002-2009, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef AUTHSRV_H 10 | #define AUTHSRV_H 11 | 12 | int authsrv_init(struct hostapd_data *hapd); 13 | void authsrv_deinit(struct hostapd_data *hapd); 14 | 15 | #endif /* AUTHSRV_H */ 16 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/Makefile: -------------------------------------------------------------------------------- 1 | SUBDIRS=ap common crypto drivers eapol_auth eapol_supp eap_common eap_peer eap_server l2_packet p2p pae radius rsn_supp tls utils wps 2 | SUBDIRS += fst 3 | 4 | all: 5 | for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d; done 6 | 7 | clean: 8 | $(Q)for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d clean; done 9 | $(Q)rm -f *~ 10 | 11 | install: 12 | for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d install; done 13 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/bss_load.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BSS load update 3 | * Copyright (c) 2014, Qualcomm Atheros, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef BSS_LOAD_UPDATE_H 10 | #define BSS_LOAD_UPDATE_H 11 | 12 | 13 | int bss_load_update_init(struct hostapd_data *hapd); 14 | void bss_load_update_deinit(struct hostapd_data *hapd); 15 | 16 | 17 | #endif /* BSS_LOAD_UPDATE_H */ 18 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/wpa_gui-qt4/icons_png.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | icons/hicolor/16x16/apps/wpa_gui.png 4 | icons/hicolor/32x32/apps/ap.png 5 | icons/hicolor/32x32/apps/laptop.png 6 | icons/hicolor/32x32/apps/group.png 7 | icons/hicolor/32x32/apps/invitation.png 8 | 9 | 10 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/eap_common/chap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * CHAP-MD5 (RFC 1994) 3 | * Copyright (c) 2007-2009, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef CHAP_H 10 | #define CHAP_H 11 | 12 | #define CHAP_MD5_LEN 16 13 | 14 | int chap_md5(u8 id, const u8 *secret, size_t secret_len, const u8 *challenge, 15 | size_t challenge_len, u8 *response); 16 | 17 | #endif /* CHAP_H */ 18 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/tls/pkcs5.h: -------------------------------------------------------------------------------- 1 | /* 2 | * PKCS #5 (Password-based Encryption) 3 | * Copyright (c) 2009, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef PKCS5_H 10 | #define PKCS5_H 11 | 12 | u8 * pkcs5_decrypt(const u8 *enc_alg, size_t enc_alg_len, 13 | const u8 *enc_data, size_t enc_data_len, 14 | const char *passwd, size_t *data_len); 15 | 16 | #endif /* PKCS5_H */ 17 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/tls/pkcs8.h: -------------------------------------------------------------------------------- 1 | /* 2 | * PKCS #8 (Private-key information syntax) 3 | * Copyright (c) 2006-2009, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef PKCS8_H 10 | #define PKCS8_H 11 | 12 | struct crypto_private_key * pkcs8_key_import(const u8 *buf, size_t len); 13 | struct crypto_private_key * 14 | pkcs8_enc_key_import(const u8 *buf, size_t len, const char *passwd); 15 | 16 | #endif /* PKCS8_H */ 17 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/eap_common/eap_peap_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * EAP-PEAP common routines 3 | * Copyright (c) 2008-2011, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef EAP_PEAP_COMMON_H 10 | #define EAP_PEAP_COMMON_H 11 | 12 | int peap_prfplus(int version, const u8 *key, size_t key_len, 13 | const char *label, const u8 *seed, size_t seed_len, 14 | u8 *buf, size_t buf_len); 15 | 16 | #endif /* EAP_PEAP_COMMON_H */ 17 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/utils/platform.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Platform definitions for Radiotap parser 3 | * Copyright (c) 2021, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef PLATFORM_H 10 | #define PLATFORM_H 11 | 12 | #include "includes.h" 13 | #include "common.h" 14 | 15 | #define get_unaligned_le16(p) WPA_GET_LE16((void *) (p)) 16 | #define get_unaligned_le32(p) WPA_GET_LE32((void *) (p)) 17 | 18 | #endif /* PLATFORM_H */ 19 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/binder/iface.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * binder interface for wpa_supplicant daemon 3 | * Copyright (c) 2004-2016, Jouni Malinen 4 | * Copyright (c) 2004-2016, Roshan Pius 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #include "iface.h" 11 | 12 | namespace wpa_supplicant_binder { 13 | 14 | Iface::Iface(struct wpa_supplicant *wpa_s) : wpa_s_(wpa_s) {} 15 | 16 | } /* namespace wpa_supplicant_binder */ 17 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/systemd/wpa_supplicant.service.arg.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=WPA supplicant daemon (interface-specific version) 3 | Requires=sys-subsystem-net-devices-%i.device 4 | After=sys-subsystem-net-devices-%i.device 5 | Before=network.target 6 | Wants=network.target 7 | 8 | # NetworkManager users will probably want the dbus version instead. 9 | 10 | [Service] 11 | Type=simple 12 | ExecStart=@BINDIR@/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-%I.conf -i%I 13 | 14 | [Install] 15 | WantedBy=multi-user.target 16 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/wpa_auth_glue.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd / WPA authenticator glue code 3 | * Copyright (c) 2002-2009, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef WPA_AUTH_GLUE_H 10 | #define WPA_AUTH_GLUE_H 11 | 12 | int hostapd_setup_wpa(struct hostapd_data *hapd); 13 | void hostapd_reconfig_wpa(struct hostapd_data *hapd); 14 | void hostapd_deinit_wpa(struct hostapd_data *hapd); 15 | 16 | #endif /* WPA_AUTH_GLUE_H */ 17 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/wpa_auth_ie.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd - WPA/RSN IE and KDE definitions 3 | * Copyright (c) 2004-2007, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef WPA_AUTH_IE_H 10 | #define WPA_AUTH_IE_H 11 | 12 | u8 * wpa_add_kde(u8 *pos, u32 kde, const u8 *data, size_t data_len, 13 | const u8 *data2, size_t data2_len); 14 | int wpa_auth_gen_wpa_ie(struct wpa_authenticator *wpa_auth); 15 | 16 | #endif /* WPA_AUTH_IE_H */ 17 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/utils/uuid.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Universally Unique IDentifier (UUID) 3 | * Copyright (c) 2008, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef UUID_H 10 | #define UUID_H 11 | 12 | #define UUID_LEN 16 13 | 14 | int uuid_str2bin(const char *str, u8 *bin); 15 | int uuid_bin2str(const u8 *bin, char *str, size_t max_len); 16 | int is_nil_uuid(const u8 *uuid); 17 | int uuid_random(u8 *uuid); 18 | 19 | #endif /* UUID_H */ 20 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/tkip_countermeasures.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd / TKIP countermeasures 3 | * Copyright (c) 2002-2012, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef TKIP_COUNTERMEASURES_H 10 | #define TKIP_COUNTERMEASURES_H 11 | 12 | int michael_mic_failure(struct hostapd_data *hapd, const u8 *addr, int local); 13 | void ieee80211_tkip_countermeasures_deinit(struct hostapd_data *hapd); 14 | 15 | #endif /* TKIP_COUNTERMEASURES_H */ 16 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/utils/module_tests.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Module tests 3 | * Copyright (c) 2014-2015, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef MODULE_TESTS_H 10 | #define MODULE_TESTS_H 11 | 12 | int wpas_module_tests(void); 13 | int hapd_module_tests(void); 14 | 15 | int utils_module_tests(void); 16 | int wps_module_tests(void); 17 | int common_module_tests(void); 18 | int crypto_module_tests(void); 19 | 20 | #endif /* MODULE_TESTS_H */ 21 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/wpa_supplicant_conf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (C) 2010 The Android Open Source Project 4 | # 5 | # This software may be distributed under the terms of the BSD license. 6 | # See README for more details. 7 | # 8 | 9 | # Generate a wpa_supplicant.conf from the template. 10 | # $1: the template file name 11 | if [ -n "$WIFI_DRIVER_SOCKET_IFACE" ] 12 | then 13 | sed -e 's/#.*$//' -e 's/[ \t]*$//' -e '/^$/d' < $1 | sed -e "s/wlan0/$WIFI_DRIVER_SOCKET_IFACE/" 14 | else 15 | sed -e 's/#.*$//' -e 's/[ \t]*$//' -e '/^$/d' < $1 16 | fi 17 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/rsn_supp/wpa_ie.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_supplicant - WPA/RSN IE and KDE definitions 3 | * Copyright (c) 2004-2007, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef WPA_IE_H 10 | #define WPA_IE_H 11 | 12 | struct wpa_sm; 13 | 14 | int wpa_gen_wpa_ie(struct wpa_sm *sm, u8 *wpa_ie, size_t wpa_ie_len); 15 | int wpa_gen_rsnxe(struct wpa_sm *sm, u8 *rsnxe, size_t rsnxe_len); 16 | u16 rsn_supp_capab(struct wpa_sm *sm); 17 | 18 | #endif /* WPA_IE_H */ 19 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/tls/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH 2 | CFLAGS += -DCONFIG_CRYPTO_INTERNAL 3 | CFLAGS += -DCONFIG_TLSV11 4 | CFLAGS += -DCONFIG_TLSV12 5 | 6 | LIB_OBJS= \ 7 | asn1.o \ 8 | bignum.o \ 9 | pkcs1.o \ 10 | pkcs5.o \ 11 | pkcs8.o \ 12 | rsa.o \ 13 | tlsv1_client.o \ 14 | tlsv1_client_read.o \ 15 | tlsv1_client_write.o \ 16 | tlsv1_client_ocsp.o \ 17 | tlsv1_common.o \ 18 | tlsv1_cred.o \ 19 | tlsv1_record.o \ 20 | tlsv1_server.o \ 21 | tlsv1_server_read.o \ 22 | tlsv1_server_write.o \ 23 | x509v3.o 24 | 25 | include ../lib.rules 26 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/systemd/wpa_supplicant-wired.service.arg.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=WPA supplicant daemon (interface- and wired driver-specific version) 3 | Requires=sys-subsystem-net-devices-%i.device 4 | After=sys-subsystem-net-devices-%i.device 5 | Before=network.target 6 | Wants=network.target 7 | 8 | # NetworkManager users will probably want the dbus version instead. 9 | 10 | [Service] 11 | Type=simple 12 | ExecStart=@BINDIR@/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-wired-%I.conf -Dwired -i%I 13 | 14 | [Install] 15 | WantedBy=multi-user.target 16 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/systemd/wpa_supplicant-nl80211.service.arg.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=WPA supplicant daemon (interface- and nl80211 driver-specific version) 3 | Requires=sys-subsystem-net-devices-%i.device 4 | After=sys-subsystem-net-devices-%i.device 5 | Before=network.target 6 | Wants=network.target 7 | 8 | # NetworkManager users will probably want the dbus version instead. 9 | 10 | [Service] 11 | Type=simple 12 | ExecStart=@BINDIR@/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-nl80211-%I.conf -Dnl80211 -i%I 13 | 14 | [Install] 15 | WantedBy=multi-user.target 16 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/crypto/tls_openssl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SSL/TLS interface functions for OpenSSL 3 | * Copyright (c) 2004-2015, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef TLS_OPENSSL_H 10 | #define TLS_OPENSSL_H 11 | 12 | enum ocsp_result { 13 | OCSP_GOOD, OCSP_REVOKED, OCSP_NO_RESPONSE, OCSP_INVALID 14 | }; 15 | 16 | enum ocsp_result check_ocsp_resp(SSL_CTX *ssl_ctx, SSL *ssl, X509 *cert, 17 | X509 *issuer, X509 *issuer_issuer); 18 | 19 | #endif /* TLS_OPENSSL_H */ 20 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/crypto/crypto_none.c: -------------------------------------------------------------------------------- 1 | /* 2 | * WPA Supplicant / Empty template functions for crypto wrapper 3 | * Copyright (c) 2005, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include "includes.h" 10 | 11 | #include "common.h" 12 | #include "crypto.h" 13 | 14 | 15 | int md4_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) 16 | { 17 | return 0; 18 | } 19 | 20 | 21 | int des_encrypt(const u8 *clear, const u8 *key, u8 *cypher) 22 | { 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/utils/browser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Hotspot 2.0 client - Web browser 3 | * Copyright (c) 2013, Qualcomm Atheros, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef BROWSER_H 10 | #define BROWSER_H 11 | 12 | #ifdef CONFIG_NO_BROWSER 13 | static inline int hs20_web_browser(const char *url, int ignore_tls) 14 | { 15 | return -1; 16 | } 17 | #else /* CONFIG_NO_BROWSER */ 18 | int hs20_web_browser(const char *url, int ignore_tls); 19 | #endif /* CONFIG_NO_BROWSER */ 20 | 21 | #endif /* BROWSER_H */ 22 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/crypto/md5.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MD5 hash implementation and interface functions 3 | * Copyright (c) 2003-2009, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef MD5_H 10 | #define MD5_H 11 | 12 | #define MD5_MAC_LEN 16 13 | 14 | int hmac_md5_vector(const u8 *key, size_t key_len, size_t num_elem, 15 | const u8 *addr[], const size_t *len, u8 *mac); 16 | int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len, 17 | u8 *mac); 18 | 19 | #endif /* MD5_H */ 20 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/wps/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS += -DCONFIG_P2P 2 | CFLAGS += -DCONFIG_WPS_OOB 3 | CFLAGS += -DCONFIG_WPS_NFC 4 | 5 | LIB_OBJS= \ 6 | http_client.o \ 7 | httpread.o \ 8 | http_server.o \ 9 | ndef.o \ 10 | upnp_xml.o \ 11 | wps_attr_build.o \ 12 | wps_attr_parse.o \ 13 | wps_attr_process.o \ 14 | wps.o \ 15 | wps_common.o \ 16 | wps_dev_attr.o \ 17 | wps_enrollee.o \ 18 | wps_er.o \ 19 | wps_er_ssdp.o \ 20 | wps_module_tests.o \ 21 | wps_registrar.o \ 22 | wps_upnp_ap.o \ 23 | wps_upnp.o \ 24 | wps_upnp_event.o \ 25 | wps_upnp_ssdp.o \ 26 | wps_upnp_web.o 27 | 28 | include ../lib.rules 29 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/binder/binder_constants.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * binder interface for wpa_supplicant daemon 3 | * Copyright (c) 2004-2016, Jouni Malinen 4 | * Copyright (c) 2004-2016, Roshan Pius 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #include "binder_constants.h" 11 | 12 | namespace wpa_supplicant_binder { 13 | namespace binder_constants { 14 | 15 | const char kServiceName[] = "wpa_supplicant"; 16 | 17 | } /* namespace binder_constants */ 18 | } /* namespace wpa_supplicant_binder */ 19 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/utils/Makefile: -------------------------------------------------------------------------------- 1 | #CFLAGS += -DWPA_TRACE 2 | CFLAGS += -DCONFIG_IPV6 3 | CFLAGS += -DCONFIG_DEBUG_FILE 4 | 5 | LIB_OBJS= \ 6 | base64.o \ 7 | bitfield.o \ 8 | common.o \ 9 | config.o \ 10 | crc32.o \ 11 | ip_addr.o \ 12 | json.o \ 13 | radiotap.o \ 14 | trace.o \ 15 | uuid.o \ 16 | wpa_debug.o \ 17 | wpabuf.o 18 | 19 | # Pick correct OS wrapper implementation 20 | LIB_OBJS += os_unix.o 21 | 22 | # Pick correct event loop implementation 23 | LIB_OBJS += eloop.o 24 | 25 | # Pick correct edit implementation 26 | LIB_OBJS += edit.o 27 | 28 | #LIB_OBJS += pcsc_funcs.o 29 | 30 | include ../lib.rules 31 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/wpa_gui-qt4/scanresultsitem.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_gui - ScanResultsItem class 3 | * Copyright (c) 2015, Adrian Nowicki 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include "scanresultsitem.h" 10 | 11 | bool ScanResultsItem::operator< (const QTreeWidgetItem &other) const 12 | { 13 | int sortCol = treeWidget()->sortColumn(); 14 | if (sortCol == 2 || sortCol == 3) { 15 | return text(sortCol).toInt() < other.text(sortCol).toInt(); 16 | } 17 | return text(sortCol) < other.text(sortCol); 18 | } 19 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/crypto/md5_i.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MD5 internal definitions 3 | * Copyright (c) 2003-2005, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef MD5_I_H 10 | #define MD5_I_H 11 | 12 | struct MD5Context { 13 | u32 buf[4]; 14 | u32 bits[2]; 15 | u8 in[64]; 16 | }; 17 | 18 | void MD5Init(struct MD5Context *context); 19 | void MD5Update(struct MD5Context *context, unsigned char const *buf, 20 | unsigned len); 21 | void MD5Final(unsigned char digest[16], struct MD5Context *context); 22 | 23 | #endif /* MD5_I_H */ 24 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/wpa_gui-qt4/scanresultsitem.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_gui - ScanResultsItem class 3 | * Copyright (c) 2015, Adrian Nowicki 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef SCANRESULTSITEM_H 10 | #define SCANRESULTSITEM_H 11 | 12 | #include 13 | 14 | class ScanResultsItem : public QTreeWidgetItem 15 | { 16 | public: 17 | ScanResultsItem(QTreeWidget *tree) : QTreeWidgetItem(tree) {} 18 | bool operator< (const QTreeWidgetItem &other) const; 19 | }; 20 | 21 | #endif /* SCANRESULTSITEM_H */ 22 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/wpa_gui-qt4/stringquery.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_gui - StringQuery class 3 | * Copyright (c) 2009, Atheros Communications 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef STRINGQUERY_H 10 | #define STRINGQUERY_H 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | class StringQuery : public QDialog 17 | { 18 | Q_OBJECT 19 | 20 | public: 21 | StringQuery(QString label); 22 | QString get_string(); 23 | 24 | private: 25 | QLineEdit *edit; 26 | }; 27 | 28 | #endif /* STRINGQUERY_H */ 29 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/crypto/aes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AES functions 3 | * Copyright (c) 2003-2006, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef AES_H 10 | #define AES_H 11 | 12 | #define AES_BLOCK_SIZE 16 13 | 14 | void * aes_encrypt_init(const u8 *key, size_t len); 15 | int aes_encrypt(void *ctx, const u8 *plain, u8 *crypt); 16 | void aes_encrypt_deinit(void *ctx); 17 | void * aes_decrypt_init(const u8 *key, size_t len); 18 | int aes_decrypt(void *ctx, const u8 *crypt, u8 *plain); 19 | void aes_decrypt_deinit(void *ctx); 20 | 21 | #endif /* AES_H */ 22 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/crypto/dh_group5.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Diffie-Hellman group 5 operations 3 | * Copyright (c) 2009, 2012, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef DH_GROUP5_H 10 | #define DH_GROUP5_H 11 | 12 | void * dh5_init(struct wpabuf **priv, struct wpabuf **publ); 13 | void * dh5_init_fixed(const struct wpabuf *priv, const struct wpabuf *publ); 14 | struct wpabuf * dh5_derive_shared(void *ctx, const struct wpabuf *peer_public, 15 | const struct wpabuf *own_private); 16 | void dh5_free(void *ctx); 17 | 18 | #endif /* DH_GROUP5_H */ 19 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/utils/bitfield.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitfield 3 | * Copyright (c) 2013, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef BITFIELD_H 10 | #define BITFIELD_H 11 | 12 | struct bitfield; 13 | 14 | struct bitfield * bitfield_alloc(size_t max_bits); 15 | void bitfield_free(struct bitfield *bf); 16 | void bitfield_set(struct bitfield *bf, size_t bit); 17 | void bitfield_clear(struct bitfield *bf, size_t bit); 18 | int bitfield_is_set(struct bitfield *bf, size_t bit); 19 | int bitfield_get_first_zero(struct bitfield *bf); 20 | 21 | #endif /* BITFIELD_H */ 22 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/crypto/aes_siv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AES SIV (RFC 5297) 3 | * Copyright (c) 2013 Cozybit, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef AES_SIV_H 10 | #define AES_SIV_H 11 | 12 | int aes_siv_encrypt(const u8 *key, size_t key_len, 13 | const u8 *pw, size_t pwlen, 14 | size_t num_elem, const u8 *addr[], const size_t *len, 15 | u8 *out); 16 | int aes_siv_decrypt(const u8 *key, size_t key_len, 17 | const u8 *iv_crypt, size_t iv_c_len, 18 | size_t num_elem, const u8 *addr[], const size_t *len, 19 | u8 *out); 20 | 21 | #endif /* AES_SIV_H */ 22 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/fils_hlp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FILS HLP request processing 3 | * Copyright (c) 2017, Qualcomm Atheros, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef FILS_HLP_H 10 | #define FILS_HLP_H 11 | 12 | int fils_process_hlp(struct hostapd_data *hapd, struct sta_info *sta, 13 | const u8 *pos, int left); 14 | 15 | #ifdef CONFIG_FILS 16 | 17 | void fils_hlp_deinit(struct hostapd_data *hapd); 18 | 19 | #else /* CONFIG_FILS */ 20 | 21 | static inline void fils_hlp_deinit(struct hostapd_data *hapd) 22 | { 23 | } 24 | 25 | #endif /* CONFIG_FILS */ 26 | 27 | #endif /* FILS_HLP_H */ 28 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/binder/binder_i.h: -------------------------------------------------------------------------------- 1 | /* 2 | * binder interface for wpa_supplicant daemon 3 | * Copyright (c) 2004-2016, Jouni Malinen 4 | * Copyright (c) 2004-2016, Roshan Pius 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #ifndef BINDER_I_H 11 | #define BINDER_I_H 12 | 13 | #ifdef _cplusplus 14 | extern "C" { 15 | #endif // _cplusplus 16 | 17 | struct wpas_binder_priv 18 | { 19 | int binder_fd; 20 | struct wpa_global *global; 21 | void *binder_manager; 22 | }; 23 | 24 | #ifdef _cplusplus 25 | } 26 | #endif /* _cplusplus */ 27 | 28 | #endif /* BINDER_I_H */ 29 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/crypto/sha384_i.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SHA-384 internal definitions 3 | * Copyright (c) 2015, Pali Rohár 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef SHA384_I_H 10 | #define SHA384_I_H 11 | 12 | #include "sha512_i.h" 13 | 14 | #define SHA384_BLOCK_SIZE SHA512_BLOCK_SIZE 15 | 16 | #define sha384_state sha512_state 17 | 18 | void sha384_init(struct sha384_state *md); 19 | int sha384_process(struct sha384_state *md, const unsigned char *in, 20 | unsigned long inlen); 21 | int sha384_done(struct sha384_state *md, unsigned char *out); 22 | 23 | #endif /* SHA384_I_H */ 24 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/crypto/sha1_i.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SHA1 internal definitions 3 | * Copyright (c) 2003-2005, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef SHA1_I_H 10 | #define SHA1_I_H 11 | 12 | struct SHA1Context { 13 | u32 state[5]; 14 | u32 count[2]; 15 | unsigned char buffer[64]; 16 | }; 17 | 18 | void SHA1Init(struct SHA1Context *context); 19 | void SHA1Update(struct SHA1Context *context, const void *data, u32 len); 20 | void SHA1Final(unsigned char digest[20], struct SHA1Context *context); 21 | void SHA1Transform(u32 state[5], const unsigned char buffer[64]); 22 | 23 | #endif /* SHA1_I_H */ 24 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/dbus/dbus_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_supplicant D-Bus control interface - common definitions 3 | * Copyright (c) 2006, Dan Williams and Red Hat, Inc. 4 | * Copyright (c) 2009, Witold Sowa 5 | * Copyright (c) 2009, Jouni Malinen 6 | * 7 | * This software may be distributed under the terms of the BSD license. 8 | * See README for more details. 9 | */ 10 | 11 | #ifndef DBUS_COMMON_H 12 | #define DBUS_COMMON_H 13 | 14 | struct wpas_dbus_priv; 15 | struct wpa_global; 16 | 17 | struct wpas_dbus_priv * wpas_dbus_init(struct wpa_global *global); 18 | void wpas_dbus_deinit(struct wpas_dbus_priv *priv); 19 | 20 | #endif /* DBUS_COMMON_H */ 21 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/crypto/sha256_i.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SHA-256 internal definitions 3 | * Copyright (c) 2003-2011, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef SHA256_I_H 10 | #define SHA256_I_H 11 | 12 | #define SHA256_BLOCK_SIZE 64 13 | 14 | struct sha256_state { 15 | u64 length; 16 | u32 state[8], curlen; 17 | u8 buf[SHA256_BLOCK_SIZE]; 18 | }; 19 | 20 | void sha256_init(struct sha256_state *md); 21 | int sha256_process(struct sha256_state *md, const unsigned char *in, 22 | unsigned long inlen); 23 | int sha256_done(struct sha256_state *md, unsigned char *out); 24 | 25 | #endif /* SHA256_I_H */ 26 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/drivers/rfkill.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Linux rfkill helper functions for driver wrappers 3 | * Copyright (c) 2010, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef RFKILL_H 10 | #define RFKILL_H 11 | 12 | struct rfkill_data; 13 | 14 | struct rfkill_config { 15 | void *ctx; 16 | char ifname[IFNAMSIZ]; 17 | void (*blocked_cb)(void *ctx); 18 | void (*unblocked_cb)(void *ctx); 19 | }; 20 | 21 | struct rfkill_data * rfkill_init(struct rfkill_config *cfg); 22 | void rfkill_deinit(struct rfkill_data *rfkill); 23 | int rfkill_is_blocked(struct rfkill_data *rfkill); 24 | 25 | #endif /* RFKILL_H */ 26 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/crypto/sha512_i.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SHA-512 internal definitions 3 | * Copyright (c) 2015, Pali Rohár 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef SHA512_I_H 10 | #define SHA512_I_H 11 | 12 | #define SHA512_BLOCK_SIZE 128 13 | 14 | struct sha512_state { 15 | u64 length, state[8]; 16 | u32 curlen; 17 | u8 buf[SHA512_BLOCK_SIZE]; 18 | }; 19 | 20 | void sha512_init(struct sha512_state *md); 21 | int sha512_process(struct sha512_state *md, const unsigned char *in, 22 | unsigned long inlen); 23 | int sha512_done(struct sha512_state *md, unsigned char *out); 24 | 25 | #endif /* SHA512_I_H */ 26 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/utils/edit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Command line editing and history 3 | * Copyright (c) 2010, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef EDIT_H 10 | #define EDIT_H 11 | 12 | int edit_init(void (*cmd_cb)(void *ctx, char *cmd), 13 | void (*eof_cb)(void *ctx), 14 | char ** (*completion_cb)(void *ctx, const char *cmd, int pos), 15 | void *ctx, const char *history_file, const char *ps); 16 | void edit_deinit(const char *history_file, 17 | int (*filter_cb)(void *ctx, const char *cmd)); 18 | void edit_clear_line(void); 19 | void edit_redraw(void); 20 | 21 | #endif /* EDIT_H */ 22 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/wpa_gui-qt4/signalbar.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_gui - SignalBar class 3 | * Copyright (c) 2011, Kel Modderman 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef SIGNALBAR_H 10 | #define SIGNALBAR_H 11 | 12 | #include 13 | #include 14 | 15 | class SignalBar : public QStyledItemDelegate 16 | { 17 | Q_OBJECT 18 | 19 | public: 20 | SignalBar(QObject *parent = 0); 21 | ~SignalBar(); 22 | 23 | virtual void paint(QPainter *painter, 24 | const QStyleOptionViewItem &option, 25 | const QModelIndex &index) const ; 26 | }; 27 | 28 | #endif /* SIGNALBAR_H */ 29 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/utils/base64.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Base64 encoding/decoding (RFC1341) 3 | * Copyright (c) 2005, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef BASE64_H 10 | #define BASE64_H 11 | 12 | char * base64_encode(const void *src, size_t len, size_t *out_len); 13 | char * base64_encode_no_lf(const void *src, size_t len, size_t *out_len); 14 | unsigned char * base64_decode(const char *src, size_t len, size_t *out_len); 15 | char * base64_url_encode(const void *src, size_t len, size_t *out_len); 16 | unsigned char * base64_url_decode(const char *src, size_t len, size_t *out_len); 17 | 18 | #endif /* BASE64_H */ 19 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/binder/binder_constants.h: -------------------------------------------------------------------------------- 1 | /* 2 | * binder interface for wpa_supplicant daemon 3 | * Copyright (c) 2004-2016, Jouni Malinen 4 | * Copyright (c) 2004-2016, Roshan Pius 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #ifndef WPA_SUPPLICANT_BINDER_BINDER_CONSTANTS_H 11 | #define WPA_SUPPLICANT_BINDER_BINDER_CONSTANTS_H 12 | 13 | namespace wpa_supplicant_binder { 14 | namespace binder_constants { 15 | 16 | extern const char kServiceName[]; 17 | 18 | } /* namespace binder_constants */ 19 | } /* namespace wpa_supplicant_binder */ 20 | 21 | #endif /* WPA_SUPPLICANT_BINDER_BINDER_CONSTANTS_H */ 22 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/dhcp_snoop.h: -------------------------------------------------------------------------------- 1 | /* 2 | * DHCP snooping for Proxy ARP 3 | * Copyright (c) 2014, Qualcomm Atheros, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef DHCP_SNOOP_H 10 | #define DHCP_SNOOP_H 11 | 12 | #ifdef CONFIG_PROXYARP 13 | 14 | int dhcp_snoop_init(struct hostapd_data *hapd); 15 | void dhcp_snoop_deinit(struct hostapd_data *hapd); 16 | 17 | #else /* CONFIG_PROXYARP */ 18 | 19 | static inline int dhcp_snoop_init(struct hostapd_data *hapd) 20 | { 21 | return 0; 22 | } 23 | 24 | static inline void dhcp_snoop_deinit(struct hostapd_data *hapd) 25 | { 26 | } 27 | 28 | #endif /* CONFIG_PROXYARP */ 29 | 30 | #endif /* DHCP_SNOOP_H */ 31 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/utils/ip_addr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * IP address processing 3 | * Copyright (c) 2003-2006, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef IP_ADDR_H 10 | #define IP_ADDR_H 11 | 12 | struct hostapd_ip_addr { 13 | int af; /* AF_INET / AF_INET6 */ 14 | union { 15 | struct in_addr v4; 16 | #ifdef CONFIG_IPV6 17 | struct in6_addr v6; 18 | #endif /* CONFIG_IPV6 */ 19 | u8 max_len[16]; 20 | } u; 21 | }; 22 | 23 | const char * hostapd_ip_txt(const struct hostapd_ip_addr *addr, char *buf, 24 | size_t buflen); 25 | int hostapd_parse_ip_addr(const char *txt, struct hostapd_ip_addr *addr); 26 | 27 | #endif /* IP_ADDR_H */ 28 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/eap_common/chap.c: -------------------------------------------------------------------------------- 1 | /* 2 | * CHAP-MD5 (RFC 1994) 3 | * Copyright (c) 2007-2009, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include "includes.h" 10 | 11 | #include "common.h" 12 | #include "crypto/crypto.h" 13 | #include "chap.h" 14 | 15 | int chap_md5(u8 id, const u8 *secret, size_t secret_len, const u8 *challenge, 16 | size_t challenge_len, u8 *response) 17 | { 18 | const u8 *addr[3]; 19 | size_t len[3]; 20 | 21 | addr[0] = &id; 22 | len[0] = 1; 23 | addr[1] = secret; 24 | len[1] = secret_len; 25 | addr[2] = challenge; 26 | len[2] = challenge_len; 27 | return md5_vector(3, addr, len, response); 28 | } 29 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/wmm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd / WMM (Wi-Fi Multimedia) 3 | * Copyright 2002-2003, Instant802 Networks, Inc. 4 | * Copyright 2005-2006, Devicescape Software, Inc. 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #ifndef WME_H 11 | #define WME_H 12 | 13 | struct ieee80211_mgmt; 14 | struct wmm_tspec_element; 15 | 16 | u8 * hostapd_eid_wmm(struct hostapd_data *hapd, u8 *eid); 17 | int hostapd_eid_wmm_valid(struct hostapd_data *hapd, const u8 *eid, 18 | size_t len); 19 | void hostapd_wmm_action(struct hostapd_data *hapd, 20 | const struct ieee80211_mgmt *mgmt, size_t len); 21 | int wmm_process_tspec(struct wmm_tspec_element *tspec); 22 | 23 | #endif /* WME_H */ 24 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/doc/docbook/Makefile: -------------------------------------------------------------------------------- 1 | all: man html pdf 2 | 3 | FILES += wpa_background 4 | FILES += wpa_cli 5 | FILES += wpa_gui 6 | FILES += wpa_passphrase 7 | FILES += wpa_priv 8 | FILES += wpa_supplicant.conf 9 | FILES += wpa_supplicant 10 | FILES += eapol_test 11 | 12 | man: 13 | for i in $(FILES); do docbook2man $$i.sgml; done 14 | 15 | html: 16 | for i in $(FILES); do docbook2html $$i.sgml && \ 17 | mv index.html $$i.html; done 18 | 19 | pdf: 20 | for i in $(FILES); do docbook2pdf $$i.sgml; done 21 | 22 | 23 | clean: 24 | rm -f wpa_background.8 wpa_cli.8 wpa_gui.8 wpa_passphrase.8 wpa_priv.8 wpa_supplicant.8 eapol_test.8 25 | rm -f wpa_supplicant.conf.5 26 | rm -f manpage.links manpage.refs 27 | rm -f $(FILES:%=%.pdf) 28 | rm -f $(FILES:%=%.html) 29 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/libwpa_test.c: -------------------------------------------------------------------------------- 1 | /* 2 | * libwpa_test - Test program for libwpa_client.* library linking 3 | * Copyright (c) 2015, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include "includes.h" 10 | 11 | #include "common/wpa_ctrl.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | struct wpa_ctrl *ctrl; 16 | 17 | ctrl = wpa_ctrl_open("foo"); 18 | if (!ctrl) 19 | return -1; 20 | if (wpa_ctrl_attach(ctrl) == 0) 21 | wpa_ctrl_detach(ctrl); 22 | if (wpa_ctrl_pending(ctrl)) { 23 | char buf[10]; 24 | size_t len; 25 | 26 | len = sizeof(buf); 27 | wpa_ctrl_recv(ctrl, buf, &len); 28 | } 29 | wpa_ctrl_close(ctrl); 30 | 31 | return 0; 32 | } 33 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/wpa_gui-qt4/stringquery.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_gui - StringQuery class 3 | * Copyright (c) 2009, Atheros Communications 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include 10 | #include 11 | 12 | #include "stringquery.h" 13 | 14 | 15 | StringQuery::StringQuery(QString label) 16 | { 17 | edit = new QLineEdit; 18 | edit->setFocus(); 19 | QGridLayout *layout = new QGridLayout; 20 | layout->addWidget(new QLabel(label), 0, 0); 21 | layout->addWidget(edit, 0, 1); 22 | setLayout(layout); 23 | 24 | connect(edit, SIGNAL(returnPressed()), this, SLOT(accept())); 25 | } 26 | 27 | 28 | QString StringQuery::get_string() 29 | { 30 | return edit->text(); 31 | } 32 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/eap_common/eap_wsc_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * EAP-WSC definitions for Wi-Fi Protected Setup 3 | * Copyright (c) 2007, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef EAP_WSC_COMMON_H 10 | #define EAP_WSC_COMMON_H 11 | 12 | #define EAP_VENDOR_TYPE_WSC 1 13 | 14 | #define WSC_FLAGS_MF 0x01 15 | #define WSC_FLAGS_LF 0x02 16 | 17 | #define WSC_ID_REGISTRAR "WFA-SimpleConfig-Registrar-1-0" 18 | #define WSC_ID_REGISTRAR_LEN 30 19 | #define WSC_ID_ENROLLEE "WFA-SimpleConfig-Enrollee-1-0" 20 | #define WSC_ID_ENROLLEE_LEN 29 21 | 22 | #define WSC_FRAGMENT_SIZE 1400 23 | 24 | 25 | struct wpabuf * eap_wsc_build_frag_ack(u8 id, u8 code); 26 | 27 | #endif /* EAP_WSC_COMMON_H */ 28 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/lib.rules: -------------------------------------------------------------------------------- 1 | _LIBMK := $(lastword $(wordlist 1,$(shell expr $(words $(MAKEFILE_LIST)) - 1),$(MAKEFILE_LIST))) 2 | _LIBNAME := $(notdir $(patsubst %/,%,$(dir $(abspath $(_LIBMK))))) 3 | ALL := $(OUT)lib$(_LIBNAME).a 4 | LIB_RULES := $(lastword $(MAKEFILE_LIST)) 5 | include $(dir $(LIB_RULES))build.rules 6 | 7 | ifdef TEST_FUZZ 8 | CFLAGS += -DCONFIG_NO_RANDOM_POOL 9 | CFLAGS += -DTEST_FUZZ 10 | endif 11 | 12 | CFLAGS += $(FUZZ_CFLAGS) 13 | CFLAGS += -I.. -I../utils 14 | 15 | _OBJS_VAR := LIB_OBJS 16 | include ../objs.mk 17 | 18 | $(ALL): $(LIB_OBJS) 19 | @$(E) " AR $(notdir $@)" 20 | $(Q)$(AR) crT $@ $? 21 | 22 | install-default: 23 | @echo Nothing to be made. 24 | 25 | %: %-default 26 | @true 27 | 28 | clean: common-clean 29 | $(Q)rm -f *~ *.o *.d *.gcno *.gcda *.gcov $(ALL) 30 | -------------------------------------------------------------------------------- /split.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Take a word list file (one word per line) and partition 4 | # it across a user defined number of bins (files). New 5 | # files will be put in current directory 6 | 7 | if [[ $# != 2 ]] 8 | then 9 | echo "uasge: split.sh <# equal parts> " 10 | exit 1 11 | fi 12 | 13 | num_of_files=$1 14 | word_list=$2 15 | 16 | if [[ "$num_of_files" -lt 1 ]] 17 | then 18 | echo "<# equal parts> must be greater than 0." 19 | exit 1 20 | fi 21 | 22 | total_lines=$(wc -l <${word_list}) 23 | ((lines_per_file = (total_lines + num_of_files - 1) / num_of_files)) 24 | 25 | split --lines=${lines_per_file} -a 3 ${word_list} $(basename $word_list.) 26 | if [[ $? -ne 0 ]] 27 | then 28 | echo "Error encountered. Exiting." 29 | exit 1 30 | fi 31 | 32 | wc -l $(basename $word_list).* 33 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/crypto/des_i.h: -------------------------------------------------------------------------------- 1 | /* 2 | * DES and 3DES-EDE ciphers 3 | * Copyright (c) 2006-2009, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef DES_I_H 10 | #define DES_I_H 11 | 12 | struct des3_key_s { 13 | u32 ek[3][32]; 14 | u32 dk[3][32]; 15 | }; 16 | 17 | void des_key_setup(const u8 *key, u32 *ek, u32 *dk); 18 | void des_block_encrypt(const u8 *plain, const u32 *ek, u8 *crypt); 19 | void des_block_decrypt(const u8 *crypt, const u32 *dk, u8 *plain); 20 | 21 | void des3_key_setup(const u8 *key, struct des3_key_s *dkey); 22 | void des3_encrypt(const u8 *plain, const struct des3_key_s *key, u8 *crypt); 23 | void des3_decrypt(const u8 *crypt, const struct des3_key_s *key, u8 *plain); 24 | 25 | #endif /* DES_I_H */ 26 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/wps/http.h: -------------------------------------------------------------------------------- 1 | /* 2 | * HTTP for WPS 3 | * Copyright (c) 2000-2003 Intel Corporation 4 | * Copyright (c) 2006-2007 Sony Corporation 5 | * Copyright (c) 2008-2009 Atheros Communications 6 | * Copyright (c) 2009, Jouni Malinen 7 | * 8 | * See wps_upnp.c for more details on licensing and code history. 9 | */ 10 | 11 | #ifndef HTTP_H 12 | #define HTTP_H 13 | 14 | enum http_reply_code { 15 | HTTP_OK = 200, 16 | HTTP_BAD_REQUEST = 400, 17 | UPNP_INVALID_ACTION = 401, 18 | UPNP_INVALID_ARGS = 402, 19 | HTTP_NOT_FOUND = 404, 20 | HTTP_PRECONDITION_FAILED = 412, 21 | HTTP_INTERNAL_SERVER_ERROR = 500, 22 | HTTP_UNIMPLEMENTED = 501, 23 | UPNP_ACTION_FAILED = 501, 24 | UPNP_ARG_VALUE_INVALID = 600, 25 | UPNP_ARG_VALUE_OUT_OF_RANGE = 601, 26 | UPNP_OUT_OF_MEMORY = 603 27 | }; 28 | 29 | #endif /* HTTP_H */ 30 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/common/qca-vendor-attr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Qualcomm Atheros vendor specific attribute definitions 3 | * Copyright (c) 2014, Qualcomm Atheros, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef QCA_VENDOR_ATTR_H 10 | #define QCA_VENDOR_ATTR_H 11 | 12 | /* 13 | * This file defines some of the attributes used with Qualcomm Atheros OUI 14 | * 00:13:74 in a way that is not suitable for qca-vendor.h, e.g., due to 15 | * compiler dependencies. 16 | */ 17 | 18 | struct qca_avoid_freq_range { 19 | u32 start_freq; 20 | u32 end_freq; 21 | } __attribute__ ((packed)); 22 | 23 | struct qca_avoid_freq_list { 24 | u32 count; 25 | struct qca_avoid_freq_range range[0]; 26 | } __attribute__ ((packed)); 27 | 28 | #endif /* QCA_VENDOR_ATTR_H */ 29 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/crypto/dh_groups.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Diffie-Hellman groups 3 | * Copyright (c) 2007, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef DH_GROUPS_H 10 | #define DH_GROUPS_H 11 | 12 | struct dh_group { 13 | int id; 14 | const u8 *generator; 15 | size_t generator_len; 16 | const u8 *prime; 17 | size_t prime_len; 18 | const u8 *order; 19 | size_t order_len; 20 | unsigned int safe_prime:1; 21 | }; 22 | 23 | const struct dh_group * dh_groups_get(int id); 24 | struct wpabuf * dh_init(const struct dh_group *dh, struct wpabuf **priv); 25 | struct wpabuf * dh_derive_shared(const struct wpabuf *peer_public, 26 | const struct wpabuf *own_private, 27 | const struct dh_group *dh); 28 | 29 | #endif /* DH_GROUPS_H */ 30 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/dbus/dbus-wpa_supplicant.conf: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/vlan.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd / VLAN definition 3 | * Copyright (c) 2015, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef VLAN_H 10 | #define VLAN_H 11 | 12 | #define MAX_NUM_TAGGED_VLAN 32 13 | 14 | struct vlan_description { 15 | int notempty; /* 0 : no vlan information present, 1: else */ 16 | int untagged; /* >0 802.1q vid */ 17 | int tagged[MAX_NUM_TAGGED_VLAN]; /* first k items, ascending order */ 18 | }; 19 | 20 | #ifndef CONFIG_NO_VLAN 21 | int vlan_compare(struct vlan_description *a, struct vlan_description *b); 22 | #else /* CONFIG_NO_VLAN */ 23 | static inline int 24 | vlan_compare(struct vlan_description *a, struct vlan_description *b) 25 | { 26 | return 0; 27 | } 28 | #endif /* CONFIG_NO_VLAN */ 29 | 30 | #endif /* VLAN_H */ 31 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/crypto/aes-encblock.c: -------------------------------------------------------------------------------- 1 | /* 2 | * AES encrypt_block 3 | * 4 | * Copyright (c) 2003-2007, Jouni Malinen 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #include "includes.h" 11 | 12 | #include "common.h" 13 | #include "aes.h" 14 | #include "aes_wrap.h" 15 | 16 | /** 17 | * aes_128_encrypt_block - Perform one AES 128-bit block operation 18 | * @key: Key for AES 19 | * @in: Input data (16 bytes) 20 | * @out: Output of the AES block operation (16 bytes) 21 | * Returns: 0 on success, -1 on failure 22 | */ 23 | int aes_128_encrypt_block(const u8 *key, const u8 *in, u8 *out) 24 | { 25 | void *ctx; 26 | ctx = aes_encrypt_init(key, 16); 27 | if (ctx == NULL) 28 | return -1; 29 | aes_encrypt(ctx, in, out); 30 | aes_encrypt_deinit(ctx); 31 | return 0; 32 | } 33 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/drivers/netlink.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Netlink helper functions for driver wrappers 3 | * Copyright (c) 2002-2009, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef NETLINK_H 10 | #define NETLINK_H 11 | 12 | struct netlink_data; 13 | struct ifinfomsg; 14 | 15 | struct netlink_config { 16 | void *ctx; 17 | void (*newlink_cb)(void *ctx, struct ifinfomsg *ifi, u8 *buf, 18 | size_t len); 19 | void (*dellink_cb)(void *ctx, struct ifinfomsg *ifi, u8 *buf, 20 | size_t len); 21 | }; 22 | 23 | struct netlink_data * netlink_init(struct netlink_config *cfg); 24 | void netlink_deinit(struct netlink_data *netlink); 25 | int netlink_send_oper_ifla(struct netlink_data *netlink, int ifindex, 26 | int linkmode, int operstate); 27 | 28 | #endif /* NETLINK_H */ 29 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/taxonomy.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd / Station client taxonomy 3 | * Copyright (c) 2015 Google, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef TAXONOMY_H 10 | #define TAXONOMY_H 11 | 12 | void taxonomy_sta_info_probe_req(const struct hostapd_data *hapd, 13 | struct sta_info *sta, 14 | const u8 *ie, size_t ie_len); 15 | void taxonomy_hostapd_sta_info_probe_req(const struct hostapd_data *hapd, 16 | struct hostapd_sta_info *sta, 17 | const u8 *ie, size_t ie_len); 18 | void taxonomy_sta_info_assoc_req(const struct hostapd_data *hapd, 19 | struct sta_info *sta, 20 | const u8 *ie, size_t ie_len); 21 | int retrieve_sta_taxonomy(const struct hostapd_data *hapd, 22 | struct sta_info *sta, char *buf, size_t buflen); 23 | 24 | #endif /* TAXONOMY_H */ 25 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/tls/rsa.h: -------------------------------------------------------------------------------- 1 | /* 2 | * RSA 3 | * Copyright (c) 2006, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef RSA_H 10 | #define RSA_H 11 | 12 | struct crypto_rsa_key; 13 | 14 | struct crypto_rsa_key * 15 | crypto_rsa_import_public_key(const u8 *buf, size_t len); 16 | struct crypto_rsa_key * 17 | crypto_rsa_import_public_key_parts(const u8 *n, size_t n_len, 18 | const u8 *e, size_t e_len); 19 | struct crypto_rsa_key * 20 | crypto_rsa_import_private_key(const u8 *buf, size_t len); 21 | size_t crypto_rsa_get_modulus_len(struct crypto_rsa_key *key); 22 | int crypto_rsa_exptmod(const u8 *in, size_t inlen, u8 *out, size_t *outlen, 23 | struct crypto_rsa_key *key, int use_private); 24 | void crypto_rsa_free(struct crypto_rsa_key *key); 25 | 26 | #endif /* RSA_H */ 27 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/acs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ACS - Automatic Channel Selection module 3 | * Copyright (c) 2011, Atheros Communications 4 | * Copyright (c) 2013, Qualcomm Atheros, Inc. 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #ifndef ACS_H 11 | #define ACS_H 12 | 13 | #ifdef CONFIG_ACS 14 | 15 | enum hostapd_chan_status acs_init(struct hostapd_iface *iface); 16 | void acs_cleanup(struct hostapd_iface *iface); 17 | 18 | #else /* CONFIG_ACS */ 19 | 20 | static inline enum hostapd_chan_status acs_init(struct hostapd_iface *iface) 21 | { 22 | wpa_printf(MSG_ERROR, "ACS was disabled on your build, rebuild hostapd with CONFIG_ACS=y or set channel"); 23 | return HOSTAPD_CHAN_INVALID; 24 | } 25 | 26 | static inline void acs_cleanup(struct hostapd_iface *iface) 27 | { 28 | } 29 | 30 | #endif /* CONFIG_ACS */ 31 | 32 | #endif /* ACS_H */ 33 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/wpa_gui-qt4/wpamsg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_gui - WpaMsg class for storing event messages 3 | * Copyright (c) 2005-2006, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef WPAMSG_H 10 | #define WPAMSG_H 11 | 12 | #include 13 | #include 14 | 15 | class WpaMsg { 16 | public: 17 | WpaMsg(const QString &_msg, int _priority = 2) 18 | : msg(_msg), priority(_priority) 19 | { 20 | timestamp = QDateTime::currentDateTime(); 21 | } 22 | 23 | QString getMsg() const { return msg; } 24 | int getPriority() const { return priority; } 25 | QDateTime getTimestamp() const { return timestamp; } 26 | 27 | private: 28 | QString msg; 29 | int priority; 30 | QDateTime timestamp; 31 | }; 32 | 33 | typedef QLinkedList WpaMsgList; 34 | 35 | #endif /* WPAMSG_H */ 36 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/vlan.c: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd / VLAN definition 3 | * Copyright (c) 2016, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include "utils/includes.h" 10 | 11 | #include "utils/common.h" 12 | #include "ap/vlan.h" 13 | 14 | /* compare the two arguments, NULL is treated as empty 15 | * return zero iff they are equal 16 | */ 17 | int vlan_compare(struct vlan_description *a, struct vlan_description *b) 18 | { 19 | int i; 20 | const int a_empty = !a || !a->notempty; 21 | const int b_empty = !b || !b->notempty; 22 | 23 | if (a_empty && b_empty) 24 | return 0; 25 | if (a_empty || b_empty) 26 | return 1; 27 | if (a->untagged != b->untagged) 28 | return 1; 29 | for (i = 0; i < MAX_NUM_TAGGED_VLAN; i++) { 30 | if (a->tagged[i] != b->tagged[i]) 31 | return 1; 32 | } 33 | return 0; 34 | } 35 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/wps/upnp_xml.h: -------------------------------------------------------------------------------- 1 | /* 2 | * UPnP XML helper routines 3 | * Copyright (c) 2000-2003 Intel Corporation 4 | * Copyright (c) 2006-2007 Sony Corporation 5 | * Copyright (c) 2008-2009 Atheros Communications 6 | * Copyright (c) 2009, Jouni Malinen 7 | * 8 | * See wps_upnp.c for more details on licensing and code history. 9 | */ 10 | 11 | #ifndef UPNP_XML_H 12 | #define UPNP_XML_H 13 | 14 | #include "http.h" 15 | 16 | void xml_data_encode(struct wpabuf *buf, const char *data, int len); 17 | void xml_add_tagged_data(struct wpabuf *buf, const char *tag, 18 | const char *data); 19 | int xml_next_tag(const char *in, const char **out, 20 | const char **out_tagname, const char **end); 21 | char * xml_get_first_item(const char *doc, const char *item); 22 | struct wpabuf * xml_get_base64_item(const char *data, const char *name, 23 | enum http_reply_code *ret); 24 | 25 | #endif /* UPNP_XML_H */ 26 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/wpa_gui-qt4/addinterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_gui - AddInterface class 3 | * Copyright (c) 2008, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef ADDINTERFACE_H 10 | #define ADDINTERFACE_H 11 | 12 | #include 13 | 14 | #include 15 | #include 16 | #include 17 | 18 | class WpaGui; 19 | 20 | class AddInterface : public QDialog 21 | { 22 | Q_OBJECT 23 | 24 | public: 25 | AddInterface(WpaGui *_wpagui, QWidget *parent = 0); 26 | 27 | public slots: 28 | virtual void interfaceSelected(QTreeWidgetItem *sel); 29 | 30 | private: 31 | void addInterfaces(); 32 | bool addRegistryInterface(const QString &ifname); 33 | 34 | QVBoxLayout *vboxLayout; 35 | QTreeWidget *interfaceWidget; 36 | WpaGui *wpagui; 37 | }; 38 | 39 | #endif /* ADDINTERFACE_H */ 40 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/eap_common/eap_wsc_common.c: -------------------------------------------------------------------------------- 1 | /* 2 | * EAP-WSC common routines for Wi-Fi Protected Setup 3 | * Copyright (c) 2007, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include "includes.h" 10 | 11 | #include "common.h" 12 | #include "eap_defs.h" 13 | #include "eap_common.h" 14 | #include "wps/wps.h" 15 | #include "eap_wsc_common.h" 16 | 17 | struct wpabuf * eap_wsc_build_frag_ack(u8 id, u8 code) 18 | { 19 | struct wpabuf *msg; 20 | 21 | msg = eap_msg_alloc(EAP_VENDOR_WFA, EAP_VENDOR_TYPE_WSC, 2, code, id); 22 | if (msg == NULL) { 23 | wpa_printf(MSG_ERROR, "EAP-WSC: Failed to allocate memory for " 24 | "FRAG_ACK"); 25 | return NULL; 26 | } 27 | 28 | wpa_printf(MSG_DEBUG, "EAP-WSC: Send WSC/FRAG_ACK"); 29 | wpabuf_put_u8(msg, WSC_FRAG_ACK); /* Op-Code */ 30 | wpabuf_put_u8(msg, 0); /* Flags */ 31 | 32 | return msg; 33 | } 34 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/hs20.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Hotspot 2.0 AP ANQP processing 3 | * Copyright (c) 2011-2013, Qualcomm Atheros, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef HS20_H 10 | #define HS20_H 11 | 12 | struct hostapd_data; 13 | 14 | u8 * hostapd_eid_hs20_indication(struct hostapd_data *hapd, u8 *eid); 15 | u8 * hostapd_eid_osen(struct hostapd_data *hapd, u8 *eid); 16 | int hs20_send_wnm_notification(struct hostapd_data *hapd, const u8 *addr, 17 | u8 osu_method, const char *url); 18 | int hs20_send_wnm_notification_deauth_req(struct hostapd_data *hapd, 19 | const u8 *addr, 20 | const struct wpabuf *payload); 21 | int hs20_send_wnm_notification_t_c(struct hostapd_data *hapd, 22 | const u8 *addr, const char *url); 23 | void hs20_t_c_filtering(struct hostapd_data *hapd, struct sta_info *sta, 24 | int enabled); 25 | 26 | #endif /* HS20_H */ 27 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/eap_peer/mschapv2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MSCHAPV2 (RFC 2759) 3 | * Copyright (c) 2004-2008, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef MSCHAPV2_H 10 | #define MSCHAPV2_H 11 | 12 | #define MSCHAPV2_CHAL_LEN 16 13 | #define MSCHAPV2_NT_RESPONSE_LEN 24 14 | #define MSCHAPV2_AUTH_RESPONSE_LEN 20 15 | #define MSCHAPV2_MASTER_KEY_LEN 16 16 | 17 | const u8 * mschapv2_remove_domain(const u8 *username, size_t *len); 18 | int mschapv2_derive_response(const u8 *username, size_t username_len, 19 | const u8 *password, size_t password_len, 20 | int pwhash, 21 | const u8 *auth_challenge, 22 | const u8 *peer_challenge, 23 | u8 *nt_response, u8 *auth_response, 24 | u8 *master_key); 25 | int mschapv2_verify_auth_response(const u8 *auth_response, 26 | const u8 *buf, size_t buf_len); 27 | 28 | #endif /* MSCHAPV2_H */ 29 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/eap_common/eap_ikev2_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * EAP-IKEv2 definitions 3 | * Copyright (c) 2007, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef EAP_IKEV2_COMMON_H 10 | #define EAP_IKEV2_COMMON_H 11 | 12 | #define IKEV2_FLAGS_LENGTH_INCLUDED 0x80 13 | #define IKEV2_FLAGS_MORE_FRAGMENTS 0x40 14 | #define IKEV2_FLAGS_ICV_INCLUDED 0x20 15 | 16 | #define IKEV2_FRAGMENT_SIZE 1400 17 | 18 | struct ikev2_keys; 19 | 20 | int eap_ikev2_derive_keymat(int prf, struct ikev2_keys *keys, 21 | const u8 *i_nonce, size_t i_nonce_len, 22 | const u8 *r_nonce, size_t r_nonce_len, 23 | u8 *keymat); 24 | struct wpabuf * eap_ikev2_build_frag_ack(u8 id, u8 code); 25 | int eap_ikev2_validate_icv(int integ_alg, struct ikev2_keys *keys, 26 | int initiator, const struct wpabuf *msg, 27 | const u8 *pos, const u8 *end); 28 | 29 | #endif /* EAP_IKEV2_COMMON_H */ 30 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/crypto/random.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Random number generator 3 | * Copyright (c) 2010-2011, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef RANDOM_H 10 | #define RANDOM_H 11 | 12 | #ifdef CONFIG_NO_RANDOM_POOL 13 | #define random_init(e) do { } while (0) 14 | #define random_deinit() do { } while (0) 15 | #define random_add_randomness(b, l) do { } while (0) 16 | #define random_get_bytes(b, l) os_get_random((b), (l)) 17 | #define random_pool_ready() 1 18 | #define random_mark_pool_ready() do { } while (0) 19 | #else /* CONFIG_NO_RANDOM_POOL */ 20 | void random_init(const char *entropy_file); 21 | void random_deinit(void); 22 | void random_add_randomness(const void *buf, size_t len); 23 | int random_get_bytes(void *buf, size_t len); 24 | int random_pool_ready(void); 25 | void random_mark_pool_ready(void); 26 | #endif /* CONFIG_NO_RANDOM_POOL */ 27 | 28 | #endif /* RANDOM_H */ 29 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/wpa_gui-qt4/userdatarequest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_gui - UserDataRequest class 3 | * Copyright (c) 2005-2006, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef USERDATAREQUEST_H 10 | #define USERDATAREQUEST_H 11 | 12 | #include 13 | #include "ui_userdatarequest.h" 14 | 15 | class WpaGui; 16 | 17 | class UserDataRequest : public QDialog, public Ui::UserDataRequest 18 | { 19 | Q_OBJECT 20 | 21 | public: 22 | UserDataRequest(QWidget *parent = 0, const char *name = 0, 23 | bool modal = false, Qt::WindowFlags fl = 0); 24 | ~UserDataRequest(); 25 | 26 | int setParams(WpaGui *_wpagui, const char *reqMsg); 27 | 28 | public slots: 29 | virtual void sendReply(); 30 | 31 | protected slots: 32 | virtual void languageChange(); 33 | 34 | private: 35 | WpaGui *wpagui; 36 | int networkid; 37 | QString field; 38 | }; 39 | 40 | #endif /* USERDATAREQUEST_H */ 41 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/tls/pkcs1.h: -------------------------------------------------------------------------------- 1 | /* 2 | * PKCS #1 (RSA Encryption) 3 | * Copyright (c) 2006-2009, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef PKCS1_H 10 | #define PKCS1_H 11 | 12 | struct crypto_public_key; 13 | struct asn1_oid; 14 | 15 | int pkcs1_encrypt(int block_type, struct crypto_rsa_key *key, 16 | int use_private, const u8 *in, size_t inlen, 17 | u8 *out, size_t *outlen); 18 | int pkcs1_v15_private_key_decrypt(struct crypto_rsa_key *key, 19 | const u8 *in, size_t inlen, 20 | u8 *out, size_t *outlen); 21 | int pkcs1_decrypt_public_key(struct crypto_rsa_key *key, 22 | const u8 *crypt, size_t crypt_len, 23 | u8 *plain, size_t *plain_len); 24 | int pkcs1_v15_sig_ver(struct crypto_public_key *pk, 25 | const u8 *s, size_t s_len, 26 | const struct asn1_oid *hash_alg, 27 | const u8 *hash, size_t hash_len); 28 | 29 | #endif /* PKCS1_H */ 30 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/crypto/dh_group5.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Diffie-Hellman group 5 operations 3 | * Copyright (c) 2009, 2012, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include "includes.h" 10 | 11 | #include "common.h" 12 | #include "dh_groups.h" 13 | #include "dh_group5.h" 14 | 15 | 16 | void * dh5_init(struct wpabuf **priv, struct wpabuf **publ) 17 | { 18 | wpabuf_free(*publ); 19 | *publ = dh_init(dh_groups_get(5), priv); 20 | if (*publ == NULL) 21 | return NULL; 22 | return (void *) 1; 23 | } 24 | 25 | 26 | void * dh5_init_fixed(const struct wpabuf *priv, const struct wpabuf *publ) 27 | { 28 | return (void *) 1; 29 | } 30 | 31 | 32 | struct wpabuf * dh5_derive_shared(void *ctx, const struct wpabuf *peer_public, 33 | const struct wpabuf *own_private) 34 | { 35 | return dh_derive_shared(peer_public, own_private, dh_groups_get(5)); 36 | } 37 | 38 | 39 | void dh5_free(void *ctx) 40 | { 41 | } 42 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/utils/ext_password_i.h: -------------------------------------------------------------------------------- 1 | /* 2 | * External password backend - internal definitions 3 | * Copyright (c) 2012, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef EXT_PASSWORD_I_H 10 | #define EXT_PASSWORD_I_H 11 | 12 | #include "ext_password.h" 13 | 14 | struct ext_password_backend { 15 | const char *name; 16 | void * (*init)(const char *params); 17 | void (*deinit)(void *ctx); 18 | struct wpabuf * (*get)(void *ctx, const char *name); 19 | }; 20 | 21 | struct wpabuf * ext_password_alloc(size_t len); 22 | 23 | /* Available ext_password backends */ 24 | 25 | #ifdef CONFIG_EXT_PASSWORD_TEST 26 | extern const struct ext_password_backend ext_password_test; 27 | #endif /* CONFIG_EXT_PASSWORD_TEST */ 28 | 29 | #ifdef CONFIG_EXT_PASSWORD_FILE 30 | extern const struct ext_password_backend ext_password_file; 31 | #endif /* CONFIG_EXT_PASSWORD_FILE */ 32 | 33 | #endif /* EXT_PASSWORD_I_H */ 34 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/ndisc_snoop.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Neighbor Discovery snooping for Proxy ARP 3 | * Copyright (c) 2014, Qualcomm Atheros, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef NDISC_SNOOP_H 10 | #define NDISC_SNOOP_H 11 | 12 | #if defined(CONFIG_PROXYARP) && defined(CONFIG_IPV6) 13 | 14 | int ndisc_snoop_init(struct hostapd_data *hapd); 15 | void ndisc_snoop_deinit(struct hostapd_data *hapd); 16 | void sta_ip6addr_del(struct hostapd_data *hapd, struct sta_info *sta); 17 | 18 | #else /* CONFIG_PROXYARP && CONFIG_IPV6 */ 19 | 20 | static inline int ndisc_snoop_init(struct hostapd_data *hapd) 21 | { 22 | return 0; 23 | } 24 | 25 | static inline void ndisc_snoop_deinit(struct hostapd_data *hapd) 26 | { 27 | } 28 | 29 | static inline void sta_ip6addr_del(struct hostapd_data *hapd, 30 | struct sta_info *sta) 31 | { 32 | } 33 | 34 | #endif /* CONFIG_PROXYARP && CONFIG_IPV6 */ 35 | 36 | #endif /* NDISC_SNOOP_H */ 37 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/drivers/linux_ioctl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Linux ioctl helper functions for driver wrappers 3 | * Copyright (c) 2002-2010, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef LINUX_IOCTL_H 10 | #define LINUX_IOCTL_H 11 | 12 | int linux_set_iface_flags(int sock, const char *ifname, int dev_up); 13 | int linux_iface_up(int sock, const char *ifname); 14 | int linux_get_ifhwaddr(int sock, const char *ifname, u8 *addr); 15 | int linux_set_ifhwaddr(int sock, const char *ifname, const u8 *addr); 16 | int linux_br_add(int sock, const char *brname); 17 | int linux_br_del(int sock, const char *brname); 18 | int linux_br_add_if(int sock, const char *brname, const char *ifname); 19 | int linux_br_del_if(int sock, const char *brname, const char *ifname); 20 | int linux_br_get(char *brname, const char *ifname); 21 | int linux_master_get(char *master_ifname, const char *ifname); 22 | 23 | #endif /* LINUX_IOCTL_H */ 24 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/utils/ext_password.h: -------------------------------------------------------------------------------- 1 | /* 2 | * External password backend 3 | * Copyright (c) 2012, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef EXT_PASSWORD_H 10 | #define EXT_PASSWORD_H 11 | 12 | struct ext_password_data; 13 | 14 | #ifdef CONFIG_EXT_PASSWORD 15 | 16 | struct ext_password_data * ext_password_init(const char *backend, 17 | const char *params); 18 | void ext_password_deinit(struct ext_password_data *data); 19 | 20 | struct wpabuf * ext_password_get(struct ext_password_data *data, 21 | const char *name); 22 | void ext_password_free(struct wpabuf *pw); 23 | 24 | #else /* CONFIG_EXT_PASSWORD */ 25 | 26 | #define ext_password_init(b, p) ((void *) 1) 27 | #define ext_password_deinit(d) do { } while (0) 28 | #define ext_password_get(d, n) (NULL) 29 | #define ext_password_free(p) do { } while (0) 30 | 31 | #endif /* CONFIG_EXT_PASSWORD */ 32 | 33 | #endif /* EXT_PASSWORD_H */ 34 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/wpa_gui-qt4/scanresults.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_gui - ScanResults class 3 | * Copyright (c) 2005-2006, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef SCANRESULTS_H 10 | #define SCANRESULTS_H 11 | 12 | #include 13 | #include "ui_scanresults.h" 14 | 15 | class WpaGui; 16 | 17 | class ScanResults : public QDialog, public Ui::ScanResults 18 | { 19 | Q_OBJECT 20 | 21 | public: 22 | ScanResults(QWidget *parent = 0, const char *name = 0, 23 | bool modal = false, Qt::WindowFlags fl = 0); 24 | ~ScanResults(); 25 | 26 | public slots: 27 | virtual void setWpaGui(WpaGui *_wpagui); 28 | virtual void updateResults(); 29 | virtual void scanRequest(); 30 | virtual void getResults(); 31 | virtual void bssSelected(QTreeWidgetItem *sel); 32 | 33 | protected slots: 34 | virtual void languageChange(); 35 | 36 | private: 37 | WpaGui *wpagui; 38 | }; 39 | 40 | #endif /* SCANRESULTS_H */ 41 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/wifi_display.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_supplicant - Wi-Fi Display 3 | * Copyright (c) 2011, Atheros Communications, Inc. 4 | * Copyright (c) 2011-2012, Qualcomm Atheros, Inc. 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #ifndef WIFI_DISPLAY_H 11 | #define WIFI_DISPLAY_H 12 | 13 | int wifi_display_init(struct wpa_global *global); 14 | void wifi_display_deinit(struct wpa_global *global); 15 | void wifi_display_enable(struct wpa_global *global, int enabled); 16 | struct wpabuf *wifi_display_get_wfd_ie(struct wpa_global *global); 17 | int wifi_display_subelem_set(struct wpa_global *global, char *cmd); 18 | int wifi_display_subelem_set_from_ies(struct wpa_global *global, 19 | struct wpabuf *ie); 20 | int wifi_display_subelem_get(struct wpa_global *global, char *cmd, 21 | char *buf, size_t buflen); 22 | char * wifi_display_subelem_hex(const struct wpabuf *wfd_subelems, u8 id); 23 | 24 | #endif /* WIFI_DISPLAY_H */ 25 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/dbus/dbus_common_i.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_supplicant D-Bus control interface - internal definitions 3 | * Copyright (c) 2006, Dan Williams and Red Hat, Inc. 4 | * Copyright (c) 2009, Witold Sowa 5 | * Copyright (c) 2009, Jouni Malinen 6 | * 7 | * This software may be distributed under the terms of the BSD license. 8 | * See README for more details. 9 | */ 10 | 11 | #ifndef DBUS_COMMON_I_H 12 | #define DBUS_COMMON_I_H 13 | 14 | #include 15 | 16 | struct wpa_dbus_property_desc; 17 | 18 | struct wpas_dbus_priv { 19 | DBusConnection *con; 20 | int should_dispatch; 21 | struct wpa_global *global; 22 | u32 next_objid; 23 | int dbus_new_initialized; 24 | 25 | #if defined(CONFIG_CTRL_IFACE_DBUS_NEW) 26 | struct wpa_dbus_property_desc *all_interface_properties; 27 | int globals_start; 28 | #if defined(CONFIG_AP) 29 | int dbus_noc_refcnt; 30 | #endif /* CONFIG_AP */ 31 | #endif /* CONFIG_CTRL_IFACE_DBUS_NEW */ 32 | }; 33 | 34 | #endif /* DBUS_COMMON_I_H */ 35 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/main_none.c: -------------------------------------------------------------------------------- 1 | /* 2 | * WPA Supplicant / Example program entrypoint 3 | * Copyright (c) 2003-2005, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include "includes.h" 10 | 11 | #include "common.h" 12 | #include "wpa_supplicant_i.h" 13 | 14 | int main(int argc, char *argv[]) 15 | { 16 | struct wpa_interface iface; 17 | int exitcode = 0; 18 | struct wpa_params params; 19 | struct wpa_global *global; 20 | 21 | memset(¶ms, 0, sizeof(params)); 22 | params.wpa_debug_level = MSG_INFO; 23 | 24 | global = wpa_supplicant_init(¶ms); 25 | if (global == NULL) 26 | return -1; 27 | 28 | memset(&iface, 0, sizeof(iface)); 29 | /* TODO: set interface parameters */ 30 | 31 | if (wpa_supplicant_add_iface(global, &iface, NULL) == NULL) 32 | exitcode = -1; 33 | 34 | if (exitcode == 0) 35 | exitcode = wpa_supplicant_run(global); 36 | 37 | wpa_supplicant_deinit(global); 38 | 39 | return exitcode; 40 | } 41 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/COPYING: -------------------------------------------------------------------------------- 1 | wpa_supplicant and hostapd 2 | -------------------------- 3 | 4 | Copyright (c) 2002-2022, Jouni Malinen and contributors 5 | All Rights Reserved. 6 | 7 | 8 | See the README file for the current license terms. 9 | 10 | This software was previously distributed under BSD/GPL v2 dual license 11 | terms that allowed either of those license alternatives to be 12 | selected. As of February 11, 2012, the project has chosen to use only 13 | the BSD license option for future distribution. As such, the GPL v2 14 | license option is no longer used. It should be noted that the BSD 15 | license option (the one with advertisement clause removed) is compatible 16 | with GPL and as such, does not prevent use of this software in projects 17 | that use GPL. 18 | 19 | Some of the files may still include pointers to GPL version 2 license 20 | terms. However, such copyright and license notifications are maintained 21 | only for attribution purposes and any distribution of this software 22 | after February 11, 2012 is no longer under the GPL v2 option. 23 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/p2p_hostapd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd / P2P integration 3 | * Copyright (c) 2009-2010, Atheros Communications 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef P2P_HOSTAPD_H 10 | #define P2P_HOSTAPD_H 11 | 12 | #ifdef CONFIG_P2P 13 | 14 | int hostapd_p2p_get_mib_sta(struct hostapd_data *hapd, struct sta_info *sta, 15 | char *buf, size_t buflen); 16 | int hostapd_p2p_set_noa(struct hostapd_data *hapd, u8 count, int start, 17 | int duration); 18 | void hostapd_p2p_non_p2p_sta_connected(struct hostapd_data *hapd); 19 | void hostapd_p2p_non_p2p_sta_disconnected(struct hostapd_data *hapd); 20 | 21 | 22 | #else /* CONFIG_P2P */ 23 | 24 | static inline int hostapd_p2p_get_mib_sta(struct hostapd_data *hapd, 25 | struct sta_info *sta, 26 | char *buf, size_t buflen) 27 | { 28 | return 0; 29 | } 30 | 31 | #endif /* CONFIG_P2P */ 32 | 33 | u8 * hostapd_eid_p2p_manage(struct hostapd_data *hapd, u8 *eid); 34 | 35 | #endif /* P2P_HOSTAPD_H */ 36 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/common/linux_bridge.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Linux bridge configuration kernel interface 3 | * Copyright (c) 2016, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef LINUX_BRIDGE_H 10 | #define LINUX_BRIDGE_H 11 | 12 | /* This ioctl is defined in linux/sockios.h */ 13 | 14 | #ifndef SIOCBRADDBR 15 | #define SIOCBRADDBR 0x89a0 16 | #endif 17 | #ifndef SIOCBRDELBR 18 | #define SIOCBRDELBR 0x89a1 19 | #endif 20 | #ifndef SIOCBRADDIF 21 | #define SIOCBRADDIF 0x89a2 22 | #endif 23 | #ifndef SIOCBRDELIF 24 | #define SIOCBRDELIF 0x89a3 25 | #endif 26 | 27 | /* This interface is defined in linux/if_bridge.h */ 28 | 29 | #define BRCTL_GET_VERSION 0 30 | #define BRCTL_GET_BRIDGES 1 31 | #define BRCTL_ADD_BRIDGE 2 32 | #define BRCTL_DEL_BRIDGE 3 33 | #define BRCTL_ADD_IF 4 34 | #define BRCTL_DEL_IF 5 35 | #define BRCTL_GET_BRIDGE_INFO 6 36 | #define BRCTL_GET_PORT_LIST 7 37 | #define BRCTL_SET_BRIDGE_FORWARD_DELAY 8 38 | 39 | #endif /* LINUX_BRIDGE_H */ 40 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/crypto/sha512.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SHA512 hash implementation and interface functions 3 | * Copyright (c) 2015-2017, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef SHA512_H 10 | #define SHA512_H 11 | 12 | #define SHA512_MAC_LEN 64 13 | 14 | int hmac_sha512_vector(const u8 *key, size_t key_len, size_t num_elem, 15 | const u8 *addr[], const size_t *len, u8 *mac); 16 | int hmac_sha512(const u8 *key, size_t key_len, const u8 *data, 17 | size_t data_len, u8 *mac); 18 | int sha512_prf(const u8 *key, size_t key_len, const char *label, 19 | const u8 *data, size_t data_len, u8 *buf, size_t buf_len); 20 | int sha512_prf_bits(const u8 *key, size_t key_len, const char *label, 21 | const u8 *data, size_t data_len, u8 *buf, 22 | size_t buf_len_bits); 23 | int hmac_sha512_kdf(const u8 *secret, size_t secret_len, 24 | const char *label, const u8 *seed, size_t seed_len, 25 | u8 *out, size_t outlen); 26 | 27 | #endif /* SHA512_H */ 28 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/eth_p_oui.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd / IEEE 802 OUI Extended Ethertype 3 | * Copyright (c) 2016, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef ETH_P_OUI_H 10 | #define ETH_P_OUI_H 11 | 12 | struct eth_p_oui_ctx; 13 | struct hostapd_data; 14 | 15 | /* rx_callback only gets payload after OUI passed as buf */ 16 | struct eth_p_oui_ctx * 17 | eth_p_oui_register(struct hostapd_data *hapd, const char *ifname, u8 oui_suffix, 18 | void (*rx_callback)(void *ctx, const u8 *src_addr, 19 | const u8 *dst_addr, u8 oui_suffix, 20 | const u8 *buf, size_t len), 21 | void *rx_callback_ctx); 22 | void eth_p_oui_unregister(struct eth_p_oui_ctx *eth_p_oui); 23 | int eth_p_oui_send(struct eth_p_oui_ctx *ctx, const u8 *src_addr, 24 | const u8 *dst_addr, const u8 *buf, size_t len); 25 | void eth_p_oui_deliver(struct eth_p_oui_ctx *ctx, const u8 *src_addr, 26 | const u8 *dst_addr, const u8 *buf, size_t len); 27 | 28 | #endif /* ETH_P_OUI_H */ 29 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/eap_common/eap_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * EAP common peer/server definitions 3 | * Copyright (c) 2004-2014, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef EAP_COMMON_H 10 | #define EAP_COMMON_H 11 | 12 | #include "wpabuf.h" 13 | 14 | struct erp_tlvs { 15 | const u8 *keyname; 16 | const u8 *domain; 17 | 18 | u8 keyname_len; 19 | u8 domain_len; 20 | }; 21 | 22 | int eap_hdr_len_valid(const struct wpabuf *msg, size_t min_payload); 23 | const u8 * eap_hdr_validate(int vendor, enum eap_type eap_type, 24 | const struct wpabuf *msg, size_t *plen); 25 | struct wpabuf * eap_msg_alloc(int vendor, enum eap_type type, 26 | size_t payload_len, u8 code, u8 identifier); 27 | void eap_update_len(struct wpabuf *msg); 28 | u8 eap_get_id(const struct wpabuf *msg); 29 | enum eap_type eap_get_type(const struct wpabuf *msg); 30 | int erp_parse_tlvs(const u8 *pos, const u8 *end, struct erp_tlvs *tlvs, 31 | int stop_at_keyname); 32 | 33 | #endif /* EAP_COMMON_H */ 34 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/drivers/linux_wext.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Driver interaction with generic Linux Wireless Extensions 3 | * Copyright (c) 2003-2011, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef LINUX_WEXT_H 10 | #define LINUX_WEXT_H 11 | 12 | #ifndef ANDROID 13 | 14 | /* 15 | * Avoid including other kernel header to avoid conflicts with C library 16 | * headers. 17 | */ 18 | #define _LINUX_TYPES_H 19 | #define _LINUX_SOCKET_H 20 | #define _LINUX_IF_H 21 | 22 | #include 23 | #include 24 | typedef uint32_t __u32; 25 | typedef int32_t __s32; 26 | typedef uint16_t __u16; 27 | typedef int16_t __s16; 28 | typedef uint8_t __u8; 29 | #ifndef __user 30 | #define __user 31 | #endif /* __user */ 32 | 33 | #endif /* ANDROID */ 34 | 35 | #include 36 | 37 | #ifndef IW_ENCODE_ALG_PMK 38 | #define IW_ENCODE_ALG_PMK 4 39 | #endif 40 | 41 | #ifndef IW_ENC_CAPA_4WAY_HANDSHAKE 42 | #define IW_ENC_CAPA_4WAY_HANDSHAKE 0x00000010 43 | #endif 44 | 45 | #endif /* LINUX_WEXT_H */ 46 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/utils/config.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Configuration parsing 3 | * Copyright (c) 2003-2019, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef UTILS_CONFIG_H 10 | #define UTILS_CONFIG_H 11 | 12 | /** 13 | * wpa_config_get_line - Read the next configuration file line 14 | * @s: Buffer for the line 15 | * @size: The buffer length 16 | * @stream: File stream to read from 17 | * @line: Pointer to a variable storing the file line number 18 | * @_pos: Buffer for the pointer to the beginning of data on the text line or 19 | * %NULL if not needed (returned value used instead) 20 | * Returns: Pointer to the beginning of data on the text line or %NULL if no 21 | * more text lines are available. 22 | * 23 | * This function reads the next non-empty line from the configuration file and 24 | * removes comments. The returned string is guaranteed to be null-terminated. 25 | */ 26 | char * wpa_config_get_line(char *s, int size, FILE *stream, int *line, 27 | char **_pos); 28 | 29 | #endif /* UTILS_CONFIG_H */ 30 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/vlan_util.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd / VLAN netlink/ioctl api 3 | * Copyright (c) 2012, Michael Braun 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef VLAN_UTIL_H 10 | #define VLAN_UTIL_H 11 | 12 | struct hostapd_data; 13 | struct hostapd_vlan; 14 | struct full_dynamic_vlan; 15 | 16 | int vlan_add(const char *if_name, int vid, const char *vlan_if_name); 17 | int vlan_rem(const char *if_name); 18 | int vlan_set_name_type(unsigned int name_type); 19 | 20 | int ifconfig_helper(const char *if_name, int up); 21 | int ifconfig_up(const char *if_name); 22 | int iface_exists(const char *ifname); 23 | int vlan_if_remove(struct hostapd_data *hapd, struct hostapd_vlan *vlan); 24 | 25 | struct full_dynamic_vlan * 26 | full_dynamic_vlan_init(struct hostapd_data *hapd); 27 | void full_dynamic_vlan_deinit(struct full_dynamic_vlan *priv); 28 | void vlan_newlink(const char *ifname, struct hostapd_data *hapd); 29 | void vlan_dellink(const char *ifname, struct hostapd_data *hapd); 30 | 31 | #endif /* VLAN_UTIL_H */ 32 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/crypto/milenage.h: -------------------------------------------------------------------------------- 1 | /* 2 | * UMTS AKA - Milenage algorithm (3GPP TS 35.205, .206, .207, .208) 3 | * Copyright (c) 2006-2007 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef MILENAGE_H 10 | #define MILENAGE_H 11 | 12 | void milenage_generate(const u8 *opc, const u8 *amf, const u8 *k, 13 | const u8 *sqn, const u8 *_rand, u8 *autn, u8 *ik, 14 | u8 *ck, u8 *res, size_t *res_len); 15 | int milenage_auts(const u8 *opc, const u8 *k, const u8 *_rand, const u8 *auts, 16 | u8 *sqn); 17 | int gsm_milenage(const u8 *opc, const u8 *k, const u8 *_rand, u8 *sres, 18 | u8 *kc); 19 | int milenage_check(const u8 *opc, const u8 *k, const u8 *sqn, const u8 *_rand, 20 | const u8 *autn, u8 *ik, u8 *ck, u8 *res, size_t *res_len, 21 | u8 *auts); 22 | int milenage_f1(const u8 *opc, const u8 *k, const u8 *_rand, 23 | const u8 *sqn, const u8 *amf, u8 *mac_a, u8 *mac_s); 24 | int milenage_f2345(const u8 *opc, const u8 *k, const u8 *_rand, 25 | u8 *res, u8 *ck, u8 *ik, u8 *ak, u8 *akstar); 26 | 27 | #endif /* MILENAGE_H */ 28 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/wpas_glue.h: -------------------------------------------------------------------------------- 1 | /* 2 | * WPA Supplicant - Glue code to setup EAPOL and RSN modules 3 | * Copyright (c) 2003-2008, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef WPAS_GLUE_H 10 | #define WPAS_GLUE_H 11 | 12 | enum wpa_ctrl_req_type; 13 | 14 | int wpa_supplicant_init_eapol(struct wpa_supplicant *wpa_s); 15 | int wpa_supplicant_init_wpa(struct wpa_supplicant *wpa_s); 16 | void wpa_supplicant_rsn_supp_set_config(struct wpa_supplicant *wpa_s, 17 | struct wpa_ssid *ssid); 18 | int wpa_ether_send(struct wpa_supplicant *wpa_s, const u8 *dest, 19 | u16 proto, const u8 *buf, size_t len); 20 | 21 | const char * wpa_supplicant_ctrl_req_to_string(enum wpa_ctrl_req_type field, 22 | const char *default_txt, 23 | const char **txt); 24 | 25 | enum wpa_ctrl_req_type wpa_supplicant_ctrl_req_from_string(const char *field); 26 | 27 | void wpas_send_ctrl_req(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid, 28 | const char *field_name, const char *txt); 29 | 30 | #endif /* WPAS_GLUE_H */ 31 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/ap_mlme.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd / IEEE 802.11 MLME 3 | * Copyright 2003, Jouni Malinen 4 | * Copyright 2003-2004, Instant802 Networks, Inc. 5 | * Copyright 2005-2006, Devicescape Software, Inc. 6 | * 7 | * This software may be distributed under the terms of the BSD license. 8 | * See README for more details. 9 | */ 10 | 11 | #ifndef MLME_H 12 | #define MLME_H 13 | 14 | void mlme_authenticate_indication(struct hostapd_data *hapd, 15 | struct sta_info *sta); 16 | 17 | void mlme_deauthenticate_indication(struct hostapd_data *hapd, 18 | struct sta_info *sta, u16 reason_code); 19 | 20 | void mlme_associate_indication(struct hostapd_data *hapd, 21 | struct sta_info *sta); 22 | 23 | void mlme_reassociate_indication(struct hostapd_data *hapd, 24 | struct sta_info *sta); 25 | 26 | void mlme_disassociate_indication(struct hostapd_data *hapd, 27 | struct sta_info *sta, u16 reason_code); 28 | 29 | void mlme_michaelmicfailure_indication(struct hostapd_data *hapd, 30 | const u8 *addr); 31 | 32 | void mlme_deletekeys_request(struct hostapd_data *hapd, struct sta_info *sta); 33 | 34 | #endif /* MLME_H */ 35 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/eap_peer/tncc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * EAP-TNC - TNCC (IF-IMC and IF-TNCCS) 3 | * Copyright (c) 2007, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef TNCC_H 10 | #define TNCC_H 11 | 12 | struct tncc_data; 13 | 14 | struct tncc_data * tncc_init(void); 15 | void tncc_deinit(struct tncc_data *tncc); 16 | void tncc_init_connection(struct tncc_data *tncc); 17 | size_t tncc_total_send_len(struct tncc_data *tncc); 18 | u8 * tncc_copy_send_buf(struct tncc_data *tncc, u8 *pos); 19 | char * tncc_if_tnccs_start(struct tncc_data *tncc); 20 | char * tncc_if_tnccs_end(void); 21 | 22 | enum tncc_process_res { 23 | TNCCS_PROCESS_ERROR = -1, 24 | TNCCS_PROCESS_OK_NO_RECOMMENDATION = 0, 25 | TNCCS_RECOMMENDATION_ERROR, 26 | TNCCS_RECOMMENDATION_ALLOW, 27 | TNCCS_RECOMMENDATION_NONE, 28 | TNCCS_RECOMMENDATION_ISOLATE 29 | }; 30 | 31 | enum tncc_process_res tncc_process_if_tnccs(struct tncc_data *tncc, 32 | const u8 *msg, size_t len); 33 | 34 | struct wpabuf * tncc_process_soh_request(int ver, const u8 *data, size_t len); 35 | 36 | #endif /* TNCC_H */ 37 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/neighbor_db.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd / Neighboring APs DB 3 | * Copyright(c) 2013 - 2016 Intel Mobile Communications GmbH. 4 | * Copyright(c) 2011 - 2016 Intel Corporation. All rights reserved. 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #ifndef NEIGHBOR_DB_H 11 | #define NEIGHBOR_DB_H 12 | 13 | struct hostapd_neighbor_entry * 14 | hostapd_neighbor_get(struct hostapd_data *hapd, const u8 *bssid, 15 | const struct wpa_ssid_value *ssid); 16 | int hostapd_neighbor_show(struct hostapd_data *hapd, char *buf, size_t buflen); 17 | int hostapd_neighbor_set(struct hostapd_data *hapd, const u8 *bssid, 18 | const struct wpa_ssid_value *ssid, 19 | const struct wpabuf *nr, const struct wpabuf *lci, 20 | const struct wpabuf *civic, int stationary, 21 | u8 bss_parameters); 22 | void hostapd_neighbor_set_own_report(struct hostapd_data *hapd); 23 | int hostapd_neighbor_remove(struct hostapd_data *hapd, const u8 *bssid, 24 | const struct wpa_ssid_value *ssid); 25 | void hostapd_free_neighbor_db(struct hostapd_data *hapd); 26 | 27 | #endif /* NEIGHBOR_DB_H */ 28 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/crypto/sha1.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SHA1 hash implementation and interface functions 3 | * Copyright (c) 2003-2009, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef SHA1_H 10 | #define SHA1_H 11 | 12 | #define SHA1_MAC_LEN 20 13 | 14 | int hmac_sha1_vector(const u8 *key, size_t key_len, size_t num_elem, 15 | const u8 *addr[], const size_t *len, u8 *mac); 16 | int hmac_sha1(const u8 *key, size_t key_len, const u8 *data, size_t data_len, 17 | u8 *mac); 18 | int sha1_prf(const u8 *key, size_t key_len, const char *label, 19 | const u8 *data, size_t data_len, u8 *buf, size_t buf_len); 20 | int sha1_t_prf(const u8 *key, size_t key_len, const char *label, 21 | const u8 *seed, size_t seed_len, u8 *buf, size_t buf_len); 22 | int __must_check tls_prf_sha1_md5(const u8 *secret, size_t secret_len, 23 | const char *label, const u8 *seed, 24 | size_t seed_len, u8 *out, size_t outlen); 25 | int pbkdf2_sha1(const char *passphrase, const u8 *ssid, size_t ssid_len, 26 | int iterations, u8 *buf, size_t buflen); 27 | #endif /* SHA1_H */ 28 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/pae/ieee802_1x_key.h: -------------------------------------------------------------------------------- 1 | /* 2 | * IEEE 802.1X-2010 Key Hierarchy 3 | * Copyright (c) 2013, Qualcomm Atheros, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef IEEE802_1X_KEY_H 10 | #define IEEE802_1X_KEY_H 11 | 12 | int ieee802_1x_cak_aes_cmac(const u8 *msk, size_t msk_bytes, const u8 *mac1, 13 | const u8 *mac2, u8 *cak, size_t cak_bytes); 14 | int ieee802_1x_ckn_aes_cmac(const u8 *msk, size_t msk_bytes, const u8 *mac1, 15 | const u8 *mac2, const u8 *sid, 16 | size_t sid_bytes, u8 *ckn); 17 | int ieee802_1x_kek_aes_cmac(const u8 *cak, size_t cak_bytes, const u8 *ckn, 18 | size_t ckn_bytes, u8 *kek, size_t kek_bytes); 19 | int ieee802_1x_ick_aes_cmac(const u8 *cak, size_t cak_bytes, const u8 *ckn, 20 | size_t ckn_bytes, u8 *ick, size_t ick_bytes); 21 | int ieee802_1x_icv_aes_cmac(const u8 *ick, size_t ick_bytes, const u8 *msg, 22 | size_t msg_bytes, u8 *icv); 23 | int ieee802_1x_sak_aes_cmac(const u8 *cak, size_t cak_bytes, const u8 *ctx, 24 | size_t ctx_bytes, u8 *sak, size_t sak_bytes); 25 | 26 | #endif /* IEEE802_1X_KEY_H */ 27 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/bssid_ignore.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_supplicant - List of temporarily ignored BSSIDs 3 | * Copyright (c) 2003-2021, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef BSSID_IGNORE_H 10 | #define BSSID_IGNORE_H 11 | 12 | struct wpa_bssid_ignore { 13 | struct wpa_bssid_ignore *next; 14 | u8 bssid[ETH_ALEN]; 15 | int count; 16 | /* Time of the most recent trigger to ignore this BSSID. */ 17 | struct os_reltime start; 18 | /* 19 | * Number of seconds after start that the entey will be considered 20 | * valid. 21 | */ 22 | int timeout_secs; 23 | }; 24 | 25 | struct wpa_bssid_ignore * wpa_bssid_ignore_get(struct wpa_supplicant *wpa_s, 26 | const u8 *bssid); 27 | int wpa_bssid_ignore_add(struct wpa_supplicant *wpa_s, const u8 *bssid); 28 | int wpa_bssid_ignore_del(struct wpa_supplicant *wpa_s, const u8 *bssid); 29 | int wpa_bssid_ignore_is_listed(struct wpa_supplicant *wpa_s, const u8 *bssid); 30 | void wpa_bssid_ignore_clear(struct wpa_supplicant *wpa_s); 31 | void wpa_bssid_ignore_update(struct wpa_supplicant *wpa_s); 32 | 33 | #endif /* BSSID_IGNORE_H */ 34 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/wpa_gui-qt4/peers.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Peers 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 300 11 | 12 | 13 | 14 | Peers 15 | 16 | 17 | 18 | 19 | 20 | 21 | 0 22 | 0 23 | 24 | 25 | 26 | true 27 | 28 | 29 | QAbstractItemView::NoEditTriggers 30 | 31 | 32 | QListView::IconMode 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/common/dragonfly.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Shared Dragonfly functionality 3 | * Copyright (c) 2012-2016, Jouni Malinen 4 | * Copyright (c) 2019, The Linux Foundation 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #ifndef DRAGONFLY_H 11 | #define DRAGONFLY_H 12 | 13 | #define DRAGONFLY_MAX_ECC_PRIME_LEN 66 14 | 15 | struct crypto_bignum; 16 | struct crypto_ec; 17 | 18 | int dragonfly_suitable_group(int group, int ecc_only); 19 | unsigned int dragonfly_min_pwe_loop_iter(int group); 20 | int dragonfly_get_random_qr_qnr(const struct crypto_bignum *prime, 21 | struct crypto_bignum **qr, 22 | struct crypto_bignum **qnr); 23 | int dragonfly_is_quadratic_residue_blind(struct crypto_ec *ec, 24 | const u8 *qr, const u8 *qnr, 25 | const struct crypto_bignum *val); 26 | int dragonfly_generate_scalar(const struct crypto_bignum *order, 27 | struct crypto_bignum *_rand, 28 | struct crypto_bignum *_mask, 29 | struct crypto_bignum *scalar); 30 | int dragonfly_sqrt(struct crypto_ec *ec, const struct crypto_bignum *val, 31 | struct crypto_bignum *res); 32 | 33 | #endif /* DRAGONFLY_H */ 34 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/drivers/linux_defines.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Linux defines for values that are not yet included in common C libraries 3 | * Copyright (c) 2014, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef LINUX_DEFINES_H 10 | #define LINUX_DEFINES_H 11 | 12 | #ifndef SO_WIFI_STATUS 13 | # if defined(__sparc__) 14 | # define SO_WIFI_STATUS 0x0025 15 | # elif defined(__parisc__) 16 | # define SO_WIFI_STATUS 0x4022 17 | # else 18 | # define SO_WIFI_STATUS 41 19 | # endif 20 | 21 | # define SCM_WIFI_STATUS SO_WIFI_STATUS 22 | #endif 23 | 24 | #ifndef SO_EE_ORIGIN_TXSTATUS 25 | #define SO_EE_ORIGIN_TXSTATUS 4 26 | #endif 27 | 28 | #ifndef PACKET_TX_TIMESTAMP 29 | #define PACKET_TX_TIMESTAMP 16 30 | #endif 31 | 32 | #ifndef IFF_LOWER_UP 33 | #define IFF_LOWER_UP 0x10000 /* driver signals L1 up */ 34 | #endif 35 | #ifndef IFF_DORMANT 36 | #define IFF_DORMANT 0x20000 /* driver signals dormant */ 37 | #endif 38 | 39 | #ifndef IF_OPER_DORMANT 40 | #define IF_OPER_DORMANT 5 41 | #endif 42 | #ifndef IF_OPER_UP 43 | #define IF_OPER_UP 6 44 | #endif 45 | 46 | #endif /* LINUX_DEFINES_H */ 47 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/crypto/sha256.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SHA256 hash implementation and interface functions 3 | * Copyright (c) 2003-2016, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef SHA256_H 10 | #define SHA256_H 11 | 12 | #define SHA256_MAC_LEN 32 13 | 14 | int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem, 15 | const u8 *addr[], const size_t *len, u8 *mac); 16 | int hmac_sha256(const u8 *key, size_t key_len, const u8 *data, 17 | size_t data_len, u8 *mac); 18 | int sha256_prf(const u8 *key, size_t key_len, const char *label, 19 | const u8 *data, size_t data_len, u8 *buf, size_t buf_len); 20 | int sha256_prf_bits(const u8 *key, size_t key_len, const char *label, 21 | const u8 *data, size_t data_len, u8 *buf, 22 | size_t buf_len_bits); 23 | int tls_prf_sha256(const u8 *secret, size_t secret_len, 24 | const char *label, const u8 *seed, size_t seed_len, 25 | u8 *out, size_t outlen); 26 | int hmac_sha256_kdf(const u8 *secret, size_t secret_len, 27 | const char *label, const u8 *seed, size_t seed_len, 28 | u8 *out, size_t outlen); 29 | 30 | #endif /* SHA256_H */ 31 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/crypto/sha384.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SHA384 hash implementation and interface functions 3 | * Copyright (c) 2015-2017, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef SHA384_H 10 | #define SHA384_H 11 | 12 | #define SHA384_MAC_LEN 48 13 | 14 | int hmac_sha384_vector(const u8 *key, size_t key_len, size_t num_elem, 15 | const u8 *addr[], const size_t *len, u8 *mac); 16 | int hmac_sha384(const u8 *key, size_t key_len, const u8 *data, 17 | size_t data_len, u8 *mac); 18 | int sha384_prf(const u8 *key, size_t key_len, const char *label, 19 | const u8 *data, size_t data_len, u8 *buf, size_t buf_len); 20 | int sha384_prf_bits(const u8 *key, size_t key_len, const char *label, 21 | const u8 *data, size_t data_len, u8 *buf, 22 | size_t buf_len_bits); 23 | int tls_prf_sha384(const u8 *secret, size_t secret_len, 24 | const char *label, const u8 *seed, size_t seed_len, 25 | u8 *out, size_t outlen); 26 | int hmac_sha384_kdf(const u8 *secret, size_t secret_len, 27 | const char *label, const u8 *seed, size_t seed_len, 28 | u8 *out, size_t outlen); 29 | 30 | #endif /* SHA384_H */ 31 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/binder/iface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * binder interface for wpa_supplicant daemon 3 | * Copyright (c) 2004-2016, Jouni Malinen 4 | * Copyright (c) 2004-2016, Roshan Pius 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #ifndef WPA_SUPPLICANT_BINDER_IFACE_H 11 | #define WPA_SUPPLICANT_BINDER_IFACE_H 12 | 13 | #include "fi/w1/wpa_supplicant/BnIface.h" 14 | 15 | extern "C" { 16 | #include "utils/common.h" 17 | #include "utils/includes.h" 18 | #include "../wpa_supplicant_i.h" 19 | } 20 | 21 | namespace wpa_supplicant_binder { 22 | 23 | /** 24 | * Implementation of Iface binder object. Each unique binder 25 | * object is used for control operations on a specific interface 26 | * controlled by wpa_supplicant. 27 | */ 28 | class Iface : public fi::w1::wpa_supplicant::BnIface 29 | { 30 | public: 31 | Iface(struct wpa_supplicant *wpa_s); 32 | virtual ~Iface() = default; 33 | 34 | private: 35 | /* Raw pointer to the structure maintained by the core for this 36 | * interface. */ 37 | struct wpa_supplicant *wpa_s_; 38 | }; 39 | 40 | } /* namespace wpa_supplicant_binder */ 41 | 42 | #endif /* WPA_SUPPLICANT_BINDER_IFACE_H */ 43 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/wnm_ap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * IEEE 802.11v WNM related functions and structures 3 | * Copyright (c) 2011-2014, Qualcomm Atheros, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef WNM_AP_H 10 | #define WNM_AP_H 11 | 12 | struct sta_info; 13 | 14 | int ieee802_11_rx_wnm_action_ap(struct hostapd_data *hapd, 15 | const struct ieee80211_mgmt *mgmt, size_t len); 16 | int wnm_send_disassoc_imminent(struct hostapd_data *hapd, 17 | struct sta_info *sta, int disassoc_timer); 18 | int wnm_send_ess_disassoc_imminent(struct hostapd_data *hapd, 19 | struct sta_info *sta, const char *url, 20 | int disassoc_timer); 21 | int wnm_send_bss_tm_req(struct hostapd_data *hapd, struct sta_info *sta, 22 | u8 req_mode, int disassoc_timer, u8 valid_int, 23 | const u8 *bss_term_dur, u8 dialog_token, 24 | const char *url, const u8 *nei_rep, size_t nei_rep_len, 25 | const u8 *mbo_attrs, size_t mbo_len); 26 | void ap_sta_reset_steer_flag_timer(void *eloop_ctx, void *timeout_ctx); 27 | int wnm_send_coloc_intf_req(struct hostapd_data *hapd, struct sta_info *sta, 28 | unsigned int auto_report, unsigned int timeout); 29 | 30 | #endif /* WNM_AP_H */ 31 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/drivers/driver_wired_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Common definitions for Wired Ethernet driver interfaces 3 | * Copyright (c) 2005-2009, Jouni Malinen 4 | * Copyright (c) 2004, Gunter Burchardt 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #ifndef DRIVER_WIRED_COMMON_H 11 | #define DRIVER_WIRED_COMMON_H 12 | 13 | struct driver_wired_common_data { 14 | char ifname[IFNAMSIZ + 1]; 15 | void *ctx; 16 | 17 | int sock; /* raw packet socket for driver access */ 18 | int pf_sock; 19 | int membership, multi, iff_allmulti, iff_up; 20 | }; 21 | 22 | static const u8 pae_group_addr[ETH_ALEN] = 23 | { 0x01, 0x80, 0xc2, 0x00, 0x00, 0x03 }; 24 | 25 | int wired_multicast_membership(int sock, int ifindex, const u8 *addr, int add); 26 | int driver_wired_get_ssid(void *priv, u8 *ssid); 27 | int driver_wired_get_bssid(void *priv, u8 *bssid); 28 | int driver_wired_get_capa(void *priv, struct wpa_driver_capa *capa); 29 | 30 | int driver_wired_init_common(struct driver_wired_common_data *common, 31 | const char *ifname, void *ctx); 32 | void driver_wired_deinit_common(struct driver_wired_common_data *common); 33 | 34 | #endif /* DRIVER_WIRED_COMMON_H */ 35 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/crypto/rc4.c: -------------------------------------------------------------------------------- 1 | /* 2 | * RC4 stream cipher 3 | * Copyright (c) 2002-2005, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include "includes.h" 10 | 11 | #include "common.h" 12 | #include "crypto.h" 13 | 14 | #define S_SWAP(a,b) do { u8 t = S[a]; S[a] = S[b]; S[b] = t; } while(0) 15 | 16 | int rc4_skip(const u8 *key, size_t keylen, size_t skip, 17 | u8 *data, size_t data_len) 18 | { 19 | u32 i, j, k; 20 | u8 S[256], *pos; 21 | size_t kpos; 22 | 23 | /* Setup RC4 state */ 24 | for (i = 0; i < 256; i++) 25 | S[i] = i; 26 | j = 0; 27 | kpos = 0; 28 | for (i = 0; i < 256; i++) { 29 | j = (j + S[i] + key[kpos]) & 0xff; 30 | kpos++; 31 | if (kpos >= keylen) 32 | kpos = 0; 33 | S_SWAP(i, j); 34 | } 35 | 36 | /* Skip the start of the stream */ 37 | i = j = 0; 38 | for (k = 0; k < skip; k++) { 39 | i = (i + 1) & 0xff; 40 | j = (j + S[i]) & 0xff; 41 | S_SWAP(i, j); 42 | } 43 | 44 | /* Apply RC4 to data */ 45 | pos = data; 46 | for (k = 0; k < data_len; k++) { 47 | i = (i + 1) & 0xff; 48 | j = (j + S[i]) & 0xff; 49 | S_SWAP(i, j); 50 | *pos++ ^= S[(S[i] + S[j]) & 0xff]; 51 | } 52 | 53 | return 0; 54 | } 55 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/tls/bignum.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Big number math 3 | * Copyright (c) 2006, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef BIGNUM_H 10 | #define BIGNUM_H 11 | 12 | struct bignum; 13 | 14 | struct bignum * bignum_init(void); 15 | void bignum_deinit(struct bignum *n); 16 | size_t bignum_get_unsigned_bin_len(struct bignum *n); 17 | int bignum_get_unsigned_bin(const struct bignum *n, u8 *buf, size_t *len); 18 | int bignum_set_unsigned_bin(struct bignum *n, const u8 *buf, size_t len); 19 | int bignum_cmp(const struct bignum *a, const struct bignum *b); 20 | int bignum_cmp_d(const struct bignum *a, unsigned long b); 21 | int bignum_add(const struct bignum *a, const struct bignum *b, 22 | struct bignum *c); 23 | int bignum_sub(const struct bignum *a, const struct bignum *b, 24 | struct bignum *c); 25 | int bignum_mul(const struct bignum *a, const struct bignum *b, 26 | struct bignum *c); 27 | int bignum_mulmod(const struct bignum *a, const struct bignum *b, 28 | const struct bignum *c, struct bignum *d); 29 | int bignum_exptmod(const struct bignum *a, const struct bignum *b, 30 | const struct bignum *c, struct bignum *d); 31 | 32 | #endif /* BIGNUM_H */ 33 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/utils/ip_addr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * IP address processing 3 | * Copyright (c) 2003-2006, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include "includes.h" 10 | 11 | #include "common.h" 12 | #include "ip_addr.h" 13 | 14 | const char * hostapd_ip_txt(const struct hostapd_ip_addr *addr, char *buf, 15 | size_t buflen) 16 | { 17 | if (buflen == 0 || addr == NULL) 18 | return NULL; 19 | 20 | if (addr->af == AF_INET) { 21 | os_strlcpy(buf, inet_ntoa(addr->u.v4), buflen); 22 | } else { 23 | buf[0] = '\0'; 24 | } 25 | #ifdef CONFIG_IPV6 26 | if (addr->af == AF_INET6) { 27 | if (inet_ntop(AF_INET6, &addr->u.v6, buf, buflen) == NULL) 28 | buf[0] = '\0'; 29 | } 30 | #endif /* CONFIG_IPV6 */ 31 | 32 | return buf; 33 | } 34 | 35 | 36 | int hostapd_parse_ip_addr(const char *txt, struct hostapd_ip_addr *addr) 37 | { 38 | #ifndef CONFIG_NATIVE_WINDOWS 39 | if (inet_aton(txt, &addr->u.v4)) { 40 | addr->af = AF_INET; 41 | return 0; 42 | } 43 | 44 | #ifdef CONFIG_IPV6 45 | if (inet_pton(AF_INET6, txt, &addr->u.v6) > 0) { 46 | addr->af = AF_INET6; 47 | return 0; 48 | } 49 | #endif /* CONFIG_IPV6 */ 50 | #endif /* CONFIG_NATIVE_WINDOWS */ 51 | 52 | return -1; 53 | } 54 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/vlan_init.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd / VLAN initialization 3 | * Copyright 2003, Instant802 Networks, Inc. 4 | * Copyright 2005, Devicescape Software, Inc. 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #ifndef VLAN_INIT_H 11 | #define VLAN_INIT_H 12 | 13 | #ifndef CONFIG_NO_VLAN 14 | int vlan_init(struct hostapd_data *hapd); 15 | void vlan_deinit(struct hostapd_data *hapd); 16 | struct hostapd_vlan * vlan_add_dynamic(struct hostapd_data *hapd, 17 | struct hostapd_vlan *vlan, 18 | int vlan_id, 19 | struct vlan_description *vlan_desc); 20 | int vlan_remove_dynamic(struct hostapd_data *hapd, int vlan_id); 21 | #else /* CONFIG_NO_VLAN */ 22 | static inline int vlan_init(struct hostapd_data *hapd) 23 | { 24 | return 0; 25 | } 26 | 27 | static inline void vlan_deinit(struct hostapd_data *hapd) 28 | { 29 | } 30 | 31 | static inline struct hostapd_vlan * 32 | vlan_add_dynamic(struct hostapd_data *hapd, struct hostapd_vlan *vlan, 33 | int vlan_id, struct vlan_description *vlan_desc) 34 | { 35 | return NULL; 36 | } 37 | 38 | static inline int vlan_remove_dynamic(struct hostapd_data *hapd, int vlan_id) 39 | { 40 | return -1; 41 | } 42 | #endif /* CONFIG_NO_VLAN */ 43 | 44 | #endif /* VLAN_INIT_H */ 45 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/wps/http_server.h: -------------------------------------------------------------------------------- 1 | /* 2 | * http_server - HTTP server 3 | * Copyright (c) 2009, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef HTTP_SERVER_H 10 | #define HTTP_SERVER_H 11 | 12 | struct http_server; 13 | struct http_request; 14 | 15 | void http_request_deinit(struct http_request *req); 16 | void http_request_send(struct http_request *req, struct wpabuf *resp); 17 | void http_request_send_and_deinit(struct http_request *req, 18 | struct wpabuf *resp); 19 | enum httpread_hdr_type http_request_get_type(struct http_request *req); 20 | char * http_request_get_uri(struct http_request *req); 21 | char * http_request_get_hdr(struct http_request *req); 22 | char * http_request_get_data(struct http_request *req); 23 | char * http_request_get_hdr_line(struct http_request *req, const char *tag); 24 | struct sockaddr_in * http_request_get_cli_addr(struct http_request *req); 25 | 26 | struct http_server * http_server_init(struct in_addr *addr, int port, 27 | void (*cb)(void *ctx, 28 | struct http_request *req), 29 | void *cb_ctx); 30 | void http_server_deinit(struct http_server *srv); 31 | int http_server_get_port(struct http_server *srv); 32 | 33 | #endif /* HTTP_SERVER_H */ 34 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS += -DHOSTAPD 2 | CFLAGS += -DNEED_AP_MLME 3 | CFLAGS += -DCONFIG_ETH_P_OUI 4 | CFLAGS += -DCONFIG_HS20 5 | CFLAGS += -DCONFIG_INTERWORKING 6 | CFLAGS += -DCONFIG_IEEE80211R 7 | CFLAGS += -DCONFIG_IEEE80211R_AP 8 | CFLAGS += -DCONFIG_WPS 9 | CFLAGS += -DCONFIG_PROXYARP 10 | CFLAGS += -DCONFIG_IPV6 11 | CFLAGS += -DCONFIG_AIRTIME_POLICY 12 | 13 | LIB_OBJS= \ 14 | accounting.o \ 15 | ap_config.o \ 16 | ap_drv_ops.o \ 17 | ap_list.o \ 18 | ap_mlme.o \ 19 | airtime_policy.o \ 20 | authsrv.o \ 21 | beacon.o \ 22 | bss_load.o \ 23 | ctrl_iface_ap.o \ 24 | dfs.o \ 25 | dhcp_snoop.o \ 26 | drv_callbacks.o \ 27 | eap_user_db.o \ 28 | eth_p_oui.o \ 29 | gas_serv.o \ 30 | hostapd.o \ 31 | hs20.o \ 32 | hw_features.o \ 33 | ieee802_11_auth.o \ 34 | ieee802_11.o \ 35 | ieee802_11_ht.o \ 36 | ieee802_11_shared.o \ 37 | ieee802_11_vht.o \ 38 | ieee802_1x.o \ 39 | neighbor_db.o \ 40 | ndisc_snoop.o \ 41 | p2p_hostapd.o \ 42 | pmksa_cache_auth.o \ 43 | preauth_auth.o \ 44 | rrm.o \ 45 | sta_info.o \ 46 | tkip_countermeasures.o \ 47 | utils.o \ 48 | vlan.o \ 49 | vlan_ifconfig.o \ 50 | vlan_init.o \ 51 | wmm.o \ 52 | wnm_ap.o \ 53 | wpa_auth.o \ 54 | wpa_auth_ft.o \ 55 | wpa_auth_glue.o \ 56 | wpa_auth_ie.o \ 57 | wps_hostapd.o \ 58 | x_snoop.o 59 | 60 | include ../lib.rules 61 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/utils/includes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_supplicant/hostapd - Default include files 3 | * Copyright (c) 2005-2006, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | * 8 | * This header file is included into all C files so that commonly used header 9 | * files can be selected with OS specific ifdef blocks in one place instead of 10 | * having to have OS/C library specific selection in many files. 11 | */ 12 | 13 | #ifndef INCLUDES_H 14 | #define INCLUDES_H 15 | 16 | /* Include possible build time configuration before including anything else */ 17 | #include "build_config.h" 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #ifndef _WIN32_WCE 26 | #include 27 | #include 28 | #include 29 | #endif /* _WIN32_WCE */ 30 | #include 31 | 32 | #ifndef _MSC_VER 33 | #include 34 | #endif /* _MSC_VER */ 35 | 36 | #ifndef CONFIG_NATIVE_WINDOWS 37 | #include 38 | #include 39 | #include 40 | #ifndef __vxworks 41 | #include 42 | #include 43 | #endif /* __vxworks */ 44 | #endif /* CONFIG_NATIVE_WINDOWS */ 45 | 46 | #endif /* INCLUDES_H */ 47 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/accounting.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd / RADIUS Accounting 3 | * Copyright (c) 2002-2005, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef ACCOUNTING_H 10 | #define ACCOUNTING_H 11 | 12 | #ifdef CONFIG_NO_ACCOUNTING 13 | static inline int accounting_sta_get_id(struct hostapd_data *hapd, 14 | struct sta_info *sta) 15 | { 16 | return 0; 17 | } 18 | 19 | static inline void accounting_sta_start(struct hostapd_data *hapd, 20 | struct sta_info *sta) 21 | { 22 | } 23 | 24 | static inline void accounting_sta_stop(struct hostapd_data *hapd, 25 | struct sta_info *sta) 26 | { 27 | } 28 | 29 | static inline int accounting_init(struct hostapd_data *hapd) 30 | { 31 | return 0; 32 | } 33 | 34 | static inline void accounting_deinit(struct hostapd_data *hapd) 35 | { 36 | } 37 | #else /* CONFIG_NO_ACCOUNTING */ 38 | int accounting_sta_get_id(struct hostapd_data *hapd, struct sta_info *sta); 39 | void accounting_sta_start(struct hostapd_data *hapd, struct sta_info *sta); 40 | void accounting_sta_stop(struct hostapd_data *hapd, struct sta_info *sta); 41 | int accounting_init(struct hostapd_data *hapd); 42 | void accounting_deinit(struct hostapd_data *hapd); 43 | #endif /* CONFIG_NO_ACCOUNTING */ 44 | 45 | #endif /* ACCOUNTING_H */ 46 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/examples/openCryptoki.conf: -------------------------------------------------------------------------------- 1 | # EAP-TLS using private key and certificates via OpenSSL PKCS#11 engine and 2 | # openCryptoki (e.g., with TPM token) 3 | 4 | # This example uses following PKCS#11 objects: 5 | # $ pkcs11-tool --module /usr/lib/opencryptoki/libopencryptoki.so -O -l 6 | # Please enter User PIN: 7 | # Private Key Object; RSA 8 | # label: rsakey 9 | # ID: 04 10 | # Usage: decrypt, sign, unwrap 11 | # Certificate Object, type = X.509 cert 12 | # label: ca 13 | # ID: 01 14 | # Certificate Object, type = X.509 cert 15 | # label: cert 16 | # ID: 04 17 | 18 | # Configure OpenSSL to load the PKCS#11 engine and openCryptoki module 19 | pkcs11_engine_path=/usr/lib/engines/engine_pkcs11.so 20 | pkcs11_module_path=/usr/lib/opencryptoki/libopencryptoki.so 21 | 22 | network={ 23 | ssid="test network" 24 | key_mgmt=WPA-EAP 25 | eap=TLS 26 | identity="User" 27 | 28 | # use OpenSSL PKCS#11 engine for this network 29 | engine=1 30 | engine_id="pkcs11" 31 | 32 | # select the private key and certificates based on ID (see pkcs11-tool 33 | # output above) 34 | key_id="4" 35 | cert_id="4" 36 | ca_cert_id="1" 37 | 38 | # set the PIN code; leave this out to configure the PIN to be requested 39 | # interactively when needed (e.g., via wpa_gui or wpa_cli) 40 | pin="123456" 41 | } 42 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/wpa_gui-qt4/icons/Makefile: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | NAMES := wpa_gui ap laptop group invitation 4 | SIZES := 16x16 22x22 32x32 48x48 64x64 128x128 5 | ICONS := $(addsuffix .png, $(foreach name, $(NAMES), $(foreach size, $(SIZES), $(size)/$(name)))) 6 | ICONS += $(addsuffix .xpm, $(NAMES)) 7 | 8 | ifeq (1, $(shell which inkscape; echo $$?)) 9 | $(error "No inkscape in PATH, it is required for exporting icons.") 10 | else 11 | ifeq (0, $(shell inkscape --without-gui 2>&1 > /dev/null; echo $$?)) 12 | # Inkscape < 1.0 13 | INKSCAPE_GUI_FLAG := --without-gui 14 | INKSCAPE_OUTPUT_FLAG := --export-png 15 | else 16 | # Inkscape >= 1.0 17 | INKSCAPE_GUI_FLAG := 18 | INKSCAPE_OUTPUT_FLAG := --export-filename 19 | endif 20 | endif 21 | 22 | all: $(ICONS) 23 | 24 | %.png: 25 | mkdir -p hicolor/$(word 1, $(subst /, ,$(@)))/apps/ 26 | inkscape $(subst .png,.svg, $(word 2, $(subst /, , $(@)))) $(INKSCAPE_GUI_FLAG) \ 27 | --export-width=$(word 1, $(subst x, , $(@))) \ 28 | --export-height=$(word 2, $(subst x, , $(subst /, , $(@)))) \ 29 | $(INKSCAPE_OUTPUT_FLAG)=hicolor/$(word 1, $(subst /, ,$(@)))/apps/$(word 2, $(subst /, , $@)) 30 | 31 | %.xpm: 32 | mkdir -p pixmaps/ 33 | convert hicolor/16x16/apps/$(@:.xpm=.png) pixmaps/$(@:.xpm=-16.xpm) 34 | convert hicolor/32x32/apps/$(@:.xpm=.png) pixmaps/$@ 35 | 36 | clean: 37 | $(RM) -r pixmaps hicolor 38 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/wps/http_client.h: -------------------------------------------------------------------------------- 1 | /* 2 | * http_client - HTTP client 3 | * Copyright (c) 2009, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef HTTP_CLIENT_H 10 | #define HTTP_CLIENT_H 11 | 12 | struct http_client; 13 | 14 | enum http_client_event { 15 | HTTP_CLIENT_FAILED, 16 | HTTP_CLIENT_TIMEOUT, 17 | HTTP_CLIENT_OK, 18 | HTTP_CLIENT_INVALID_REPLY, 19 | }; 20 | 21 | char * http_client_url_parse(const char *url, struct sockaddr_in *dst, 22 | char **path); 23 | struct http_client * http_client_addr(struct sockaddr_in *dst, 24 | struct wpabuf *req, size_t max_response, 25 | void (*cb)(void *ctx, 26 | struct http_client *c, 27 | enum http_client_event event), 28 | void *cb_ctx); 29 | struct http_client * http_client_url(const char *url, 30 | struct wpabuf *req, size_t max_response, 31 | void (*cb)(void *ctx, 32 | struct http_client *c, 33 | enum http_client_event event), 34 | void *cb_ctx); 35 | void http_client_free(struct http_client *c); 36 | struct wpabuf * http_client_get_body(struct http_client *c); 37 | char * http_client_get_hdr_line(struct http_client *c, const char *tag); 38 | char * http_link_update(char *url, const char *base); 39 | 40 | #endif /* HTTP_CLIENT_H */ 41 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/ieee802_11_auth.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd / IEEE 802.11 authentication (ACL) 3 | * Copyright (c) 2003-2005, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef IEEE802_11_AUTH_H 10 | #define IEEE802_11_AUTH_H 11 | 12 | enum { 13 | HOSTAPD_ACL_REJECT = 0, 14 | HOSTAPD_ACL_ACCEPT = 1, 15 | HOSTAPD_ACL_PENDING = 2, 16 | HOSTAPD_ACL_ACCEPT_TIMEOUT = 3 17 | }; 18 | 19 | struct radius_sta { 20 | u32 session_timeout; 21 | u32 acct_interim_interval; 22 | struct vlan_description vlan_id; 23 | struct hostapd_sta_wpa_psk_short *psk; 24 | char *identity; 25 | char *radius_cui; 26 | }; 27 | 28 | int hostapd_check_acl(struct hostapd_data *hapd, const u8 *addr, 29 | struct vlan_description *vlan_id); 30 | int hostapd_allowed_address(struct hostapd_data *hapd, const u8 *addr, 31 | const u8 *msg, size_t len, struct radius_sta *out, 32 | int is_probe_req); 33 | int hostapd_acl_init(struct hostapd_data *hapd); 34 | void hostapd_acl_deinit(struct hostapd_data *hapd); 35 | void hostapd_free_psk_list(struct hostapd_sta_wpa_psk_short *psk); 36 | void hostapd_acl_expire(struct hostapd_data *hapd); 37 | void hostapd_copy_psk_list(struct hostapd_sta_wpa_psk_short **psk, 38 | struct hostapd_sta_wpa_psk_short *src); 39 | 40 | #endif /* IEEE802_11_AUTH_H */ 41 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/rrm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd / Radio Measurement (RRM) 3 | * Copyright(c) 2013 - 2016 Intel Mobile Communications GmbH. 4 | * Copyright(c) 2011 - 2016 Intel Corporation. All rights reserved. 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #ifndef RRM_H 11 | #define RRM_H 12 | 13 | /* 14 | * Max measure request length is 255, -6 of the body we have 249 for the 15 | * neighbor report elements. Each neighbor report element is at least 2 + 13 16 | * bytes, so we can't have more than 16 responders in the request. 17 | */ 18 | #define RRM_RANGE_REQ_MAX_RESPONDERS 16 19 | 20 | void hostapd_handle_radio_measurement(struct hostapd_data *hapd, 21 | const u8 *buf, size_t len); 22 | int hostapd_send_lci_req(struct hostapd_data *hapd, const u8 *addr); 23 | int hostapd_send_range_req(struct hostapd_data *hapd, const u8 *addr, 24 | u16 random_interval, u8 min_ap, 25 | const u8 *responders, unsigned int n_responders); 26 | void hostapd_clean_rrm(struct hostapd_data *hapd); 27 | int hostapd_send_beacon_req(struct hostapd_data *hapd, const u8 *addr, 28 | u8 req_mode, const struct wpabuf *req); 29 | void hostapd_rrm_beacon_req_tx_status(struct hostapd_data *hapd, 30 | const struct ieee80211_mgmt *mgmt, 31 | size_t len, int ok); 32 | 33 | #endif /* RRM_H */ 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 2-Clause License 2 | 3 | Copyright (c) 2020, blunderbuss 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/win_example.reg: -------------------------------------------------------------------------------- 1 | REGEDIT4 2 | 3 | [HKEY_LOCAL_MACHINE\SOFTWARE\wpa_supplicant] 4 | "debug_level"=dword:00000000 5 | "debug_show_keys"=dword:00000001 6 | "debug_timestamp"=dword:00000000 7 | "debug_use_file"=dword:00000000 8 | 9 | [HKEY_LOCAL_MACHINE\SOFTWARE\wpa_supplicant\configs] 10 | 11 | [HKEY_LOCAL_MACHINE\SOFTWARE\wpa_supplicant\configs\test] 12 | "ap_scan"=dword:00000002 13 | "update_config"=dword:00000001 14 | "uuid"="12345678-9abc-def0-1234-56789abcdef0" 15 | "device_name"="Wireless Client" 16 | "manufacturer"="Company" 17 | "model_name"="cmodel" 18 | "serial_number"="12345" 19 | "device_type"="1-0050F204-1" 20 | "os_version"="01020300" 21 | 22 | [HKEY_LOCAL_MACHINE\SOFTWARE\wpa_supplicant\configs\test\blobs] 23 | "testblob"=hex:01,02,03,04,05 24 | 25 | [HKEY_LOCAL_MACHINE\SOFTWARE\wpa_supplicant\configs\test\networks] 26 | 27 | [HKEY_LOCAL_MACHINE\SOFTWARE\wpa_supplicant\configs\test\networks\0000] 28 | "ssid"="\"example network\"" 29 | "key_mgmt"="WPA-PSK" 30 | "psk"="\"secret password\"" 31 | "pairwise"="CCMP" 32 | "group"="CCMP" 33 | "proto"="WPA" 34 | 35 | [HKEY_LOCAL_MACHINE\SOFTWARE\wpa_supplicant\interfaces] 36 | 37 | [HKEY_LOCAL_MACHINE\SOFTWARE\wpa_supplicant\interfaces\0000] 38 | "adapter"="{A7627643-C310-49E5-BD89-7E77709C04AB}" 39 | "config"="test" 40 | "ctrl_interface"="" 41 | "skip_on_error"=dword:00000000 42 | 43 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/wpas_kay.h: -------------------------------------------------------------------------------- 1 | /* 2 | * IEEE 802.1X-2010 KaY Interface 3 | * Copyright (c) 2013-2014, Qualcomm Atheros, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef WPAS_KAY_H 10 | #define WPAS_KAY_H 11 | 12 | #ifdef CONFIG_MACSEC 13 | 14 | int ieee802_1x_alloc_kay_sm(struct wpa_supplicant *wpa_s, 15 | struct wpa_ssid *ssid); 16 | void * ieee802_1x_notify_create_actor(struct wpa_supplicant *wpa_s, 17 | const u8 *peer_addr); 18 | void ieee802_1x_dealloc_kay_sm(struct wpa_supplicant *wpa_s); 19 | 20 | void * ieee802_1x_create_preshared_mka(struct wpa_supplicant *wpa_s, 21 | struct wpa_ssid *ssid); 22 | 23 | #else /* CONFIG_MACSEC */ 24 | 25 | static inline int ieee802_1x_alloc_kay_sm(struct wpa_supplicant *wpa_s, 26 | struct wpa_ssid *ssid) 27 | { 28 | return 0; 29 | } 30 | 31 | static inline void * 32 | ieee802_1x_notify_create_actor(struct wpa_supplicant *wpa_s, 33 | const u8 *peer_addr) 34 | { 35 | return NULL; 36 | } 37 | 38 | static inline void ieee802_1x_dealloc_kay_sm(struct wpa_supplicant *wpa_s) 39 | { 40 | } 41 | 42 | static inline void * 43 | ieee802_1x_create_preshared_mka(struct wpa_supplicant *wpa_s, 44 | struct wpa_ssid *ssid) 45 | { 46 | return 0; 47 | } 48 | 49 | #endif /* CONFIG_MACSEC */ 50 | 51 | #endif /* WPAS_KAY_H */ 52 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/dbus/Makefile: -------------------------------------------------------------------------------- 1 | all: libwpadbus.a 2 | 3 | clean: 4 | rm -f *~ *.o *.d *.gcno *.gcda *.gcov 5 | rm -f libwpadbus.a 6 | 7 | install: 8 | @echo Nothing to be made. 9 | 10 | ifndef CC 11 | CC=gcc 12 | endif 13 | 14 | ifndef CFLAGS 15 | CFLAGS = -MMD -O2 -Wall -g 16 | endif 17 | 18 | PKG_CONFIG ?= pkg-config 19 | CFLAGS += -I../../src -I../../src/utils 20 | 21 | 22 | Q=@ 23 | E=echo 24 | ifeq ($(V), 1) 25 | Q= 26 | E=true 27 | endif 28 | 29 | %.o: %.c 30 | $(Q)$(CC) -c -o $@ $(CFLAGS) $< 31 | @$(E) " CC " $< 32 | 33 | 34 | ifdef CONFIG_WPS 35 | CFLAGS += -DCONFIG_WPS 36 | endif 37 | 38 | CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_NEW 39 | 40 | ifndef DBUS_LIBS 41 | DBUS_LIBS := $(shell $(PKG_CONFIG) --libs dbus-1) 42 | endif 43 | ifndef DBUS_INCLUDE 44 | DBUS_INCLUDE := $(shell $(PKG_CONFIG) --cflags dbus-1) 45 | endif 46 | ifdef CONFIG_CTRL_IFACE_DBUS_INTRO 47 | CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_INTRO 48 | DBUS_INCLUDE += $(shell xml2-config --cflags) 49 | DBUS_LIBS += $(shell xml2-config --libs) 50 | endif 51 | 52 | CFLAGS += $(DBUS_INCLUDE) 53 | 54 | LIB_OBJS= \ 55 | dbus_common.o \ 56 | dbus_new.o \ 57 | dbus_new_handlers.o \ 58 | dbus_new_helpers.o \ 59 | dbus_new_introspect.o \ 60 | dbus_dict_helpers.o 61 | 62 | ifdef CONFIG_WPS 63 | LIB_OBJS += dbus_new_handlers_wps.o 64 | endif 65 | 66 | libwpadbus.a: $(LIB_OBJS) 67 | $(AR) crT $@ $? 68 | 69 | -include $(OBJS:%.o=%.d) 70 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/common/linux_vlan.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Linux VLAN configuration kernel interface 3 | * Copyright (c) 2016, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef LINUX_VLAN_H 10 | #define LINUX_VLAN_H 11 | 12 | /* This ioctl is defined in linux/sockios.h */ 13 | 14 | #ifndef SIOCSIFVLAN 15 | #define SIOCSIFVLAN 0x8983 16 | #endif /* SIOCSIFVLAN */ 17 | 18 | /* This interface is defined in linux/if_vlan.h */ 19 | 20 | #define ADD_VLAN_CMD 0 21 | #define DEL_VLAN_CMD 1 22 | #define SET_VLAN_INGRESS_PRIORITY_CMD 2 23 | #define SET_VLAN_EGRESS_PRIORITY_CMD 3 24 | #define GET_VLAN_INGRESS_PRIORITY_CMD 4 25 | #define GET_VLAN_EGRESS_PRIORITY_CMD 5 26 | #define SET_VLAN_NAME_TYPE_CMD 6 27 | #define SET_VLAN_FLAG_CMD 7 28 | #define GET_VLAN_REALDEV_NAME_CMD 8 29 | #define GET_VLAN_VID_CMD 9 30 | 31 | #define VLAN_NAME_TYPE_PLUS_VID 0 32 | #define VLAN_NAME_TYPE_RAW_PLUS_VID 1 33 | #define VLAN_NAME_TYPE_PLUS_VID_NO_PAD 2 34 | #define VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD 3 35 | 36 | struct vlan_ioctl_args { 37 | int cmd; 38 | char device1[24]; 39 | 40 | union { 41 | char device2[24]; 42 | int VID; 43 | unsigned int skb_priority; 44 | unsigned int name_type; 45 | unsigned int bind_type; 46 | unsigned int flag; 47 | } u; 48 | 49 | short vlan_qos; 50 | }; 51 | 52 | #endif /* LINUX_VLAN_H */ 53 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/crypto/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS += -DCONFIG_CRYPTO_INTERNAL 2 | CFLAGS += -DCONFIG_TLS_INTERNAL_CLIENT 3 | CFLAGS += -DCONFIG_TLS_INTERNAL_SERVER 4 | #CFLAGS += -DALL_DH_GROUPS 5 | CFLAGS += -DCONFIG_SHA256 6 | CFLAGS += -DCONFIG_SHA384 7 | CFLAGS += -DCONFIG_HMAC_SHA384_KDF 8 | CFLAGS += -DCONFIG_INTERNAL_SHA384 9 | 10 | LIB_OBJS= \ 11 | aes-cbc.o \ 12 | aes-ccm.o \ 13 | aes-ctr.o \ 14 | aes-eax.o \ 15 | aes-encblock.o \ 16 | aes-gcm.o \ 17 | aes-internal.o \ 18 | aes-internal-dec.o \ 19 | aes-internal-enc.o \ 20 | aes-omac1.o \ 21 | aes-siv.o \ 22 | aes-unwrap.o \ 23 | aes-wrap.o \ 24 | des-internal.o \ 25 | dh_group5.o \ 26 | dh_groups.o \ 27 | md4-internal.o \ 28 | md5.o \ 29 | md5-internal.o \ 30 | milenage.o \ 31 | ms_funcs.o \ 32 | rc4.o \ 33 | sha1.o \ 34 | sha1-internal.o \ 35 | sha1-pbkdf2.o \ 36 | sha1-prf.o \ 37 | sha1-tlsprf.o \ 38 | sha1-tprf.o \ 39 | sha256.o \ 40 | sha256-prf.o \ 41 | sha256-tlsprf.o \ 42 | sha256-internal.o \ 43 | sha384.o \ 44 | sha384-prf.o \ 45 | sha384-internal.o \ 46 | sha512.o \ 47 | sha512-prf.o \ 48 | sha512-internal.o 49 | 50 | LIB_OBJS += crypto_internal.o 51 | LIB_OBJS += crypto_internal-cipher.o 52 | LIB_OBJS += crypto_internal-modexp.o 53 | LIB_OBJS += crypto_internal-rsa.o 54 | LIB_OBJS += tls_internal.o 55 | LIB_OBJS += fips_prf_internal.o 56 | ifndef TEST_FUZZ 57 | LIB_OBJS += random.o 58 | endif 59 | 60 | include ../lib.rules 61 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/eap_server/tncs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * EAP-TNC - TNCS (IF-IMV, IF-TNCCS, and IF-TNCCS-SOH) 3 | * Copyright (c) 2007-2008, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef TNCS_H 10 | #define TNCS_H 11 | 12 | struct tncs_data; 13 | 14 | struct tncs_data * tncs_init(void); 15 | void tncs_deinit(struct tncs_data *tncs); 16 | void tncs_init_connection(struct tncs_data *tncs); 17 | size_t tncs_total_send_len(struct tncs_data *tncs); 18 | u8 * tncs_copy_send_buf(struct tncs_data *tncs, u8 *pos); 19 | char * tncs_if_tnccs_start(struct tncs_data *tncs); 20 | char * tncs_if_tnccs_end(void); 21 | 22 | enum tncs_process_res { 23 | TNCCS_PROCESS_ERROR = -1, 24 | TNCCS_PROCESS_OK_NO_RECOMMENDATION = 0, 25 | TNCCS_RECOMMENDATION_ERROR, 26 | TNCCS_RECOMMENDATION_ALLOW, 27 | TNCCS_RECOMMENDATION_NONE, 28 | TNCCS_RECOMMENDATION_ISOLATE, 29 | TNCCS_RECOMMENDATION_NO_ACCESS, 30 | TNCCS_RECOMMENDATION_NO_RECOMMENDATION 31 | }; 32 | 33 | enum tncs_process_res tncs_process_if_tnccs(struct tncs_data *tncs, 34 | const u8 *msg, size_t len); 35 | 36 | int tncs_global_init(void); 37 | void tncs_global_deinit(void); 38 | 39 | struct wpabuf * tncs_build_soh_request(void); 40 | struct wpabuf * tncs_process_soh(const u8 *soh_tlv, size_t soh_tlv_len, 41 | int *failure); 42 | 43 | #endif /* TNCS_H */ 44 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/fst/fst_ctrl_iface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FST module - internal Control interface definitions 3 | * Copyright (c) 2014, Qualcomm Atheros, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef FST_CTRL_IFACE_H 10 | #define FST_CTRL_IFACE_H 11 | 12 | #include "fst/fst_ctrl_aux.h" 13 | 14 | #ifdef CONFIG_FST 15 | 16 | /* receiver */ 17 | int fst_ctrl_iface_mb_info(const u8 *addr, char *buf, size_t buflen); 18 | 19 | int fst_ctrl_iface_receive(const char *txtaddr, char *buf, size_t buflen); 20 | 21 | extern const struct fst_ctrl *fst_ctrl_cli; 22 | 23 | #else /* CONFIG_FST */ 24 | 25 | static inline int 26 | fst_ctrl_iface_mb_info(const u8 *addr, char *buf, size_t buflen) 27 | { 28 | return 0; 29 | } 30 | 31 | #endif /* CONFIG_FST */ 32 | 33 | int fst_read_next_int_param(const char *params, bool *valid, char **endp); 34 | int fst_read_next_text_param(const char *params, char *buf, size_t buflen, 35 | char **endp); 36 | int fst_read_peer_addr(const char *mac, u8 *peer_addr); 37 | 38 | struct fst_iface_cfg; 39 | 40 | int fst_parse_attach_command(const char *cmd, char *ifname, size_t ifname_size, 41 | struct fst_iface_cfg *cfg); 42 | int fst_parse_detach_command(const char *cmd, char *ifname, size_t ifname_size); 43 | int fst_iface_detach(const char *ifname); 44 | 45 | #endif /* CTRL_IFACE_FST_H */ 46 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/mbo_ap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MBO related functions and structures 3 | * Copyright (c) 2016, Qualcomm Atheros, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef MBO_AP_H 10 | #define MBO_AP_H 11 | 12 | struct hostapd_data; 13 | struct sta_info; 14 | struct ieee802_11_elems; 15 | 16 | #ifdef CONFIG_MBO 17 | 18 | void mbo_ap_check_sta_assoc(struct hostapd_data *hapd, struct sta_info *sta, 19 | struct ieee802_11_elems *elems); 20 | int mbo_ap_get_info(struct sta_info *sta, char *buf, size_t buflen); 21 | void mbo_ap_wnm_notification_req(struct hostapd_data *hapd, const u8 *addr, 22 | const u8 *buf, size_t len); 23 | void mbo_ap_sta_free(struct sta_info *sta); 24 | 25 | #else /* CONFIG_MBO */ 26 | 27 | static inline void mbo_ap_check_sta_assoc(struct hostapd_data *hapd, 28 | struct sta_info *sta, 29 | struct ieee802_11_elems *elems) 30 | { 31 | } 32 | 33 | static inline int mbo_ap_get_info(struct sta_info *sta, char *buf, 34 | size_t buflen) 35 | { 36 | return 0; 37 | } 38 | 39 | static inline void mbo_ap_wnm_notification_req(struct hostapd_data *hapd, 40 | const u8 *addr, 41 | const u8 *buf, size_t len) 42 | { 43 | } 44 | 45 | static inline void mbo_ap_sta_free(struct sta_info *sta) 46 | { 47 | } 48 | 49 | #endif /* CONFIG_MBO */ 50 | 51 | #endif /* MBO_AP_H */ 52 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/wpa_auth_kay.h: -------------------------------------------------------------------------------- 1 | /* 2 | * IEEE 802.1X-2010 KaY Interface 3 | * Copyright (c) 2019, The Linux Foundation 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef WPA_AUTH_KAY_H 10 | #define WPA_AUTH_KAY_H 11 | 12 | #ifdef CONFIG_MACSEC 13 | 14 | int ieee802_1x_alloc_kay_sm_hapd(struct hostapd_data *hapd, 15 | struct sta_info *sta); 16 | void * ieee802_1x_notify_create_actor_hapd(struct hostapd_data *hapd, 17 | struct sta_info *sta); 18 | void ieee802_1x_dealloc_kay_sm_hapd(struct hostapd_data *hapd); 19 | 20 | void * ieee802_1x_create_preshared_mka_hapd(struct hostapd_data *hapd, 21 | struct sta_info *sta); 22 | 23 | #else /* CONFIG_MACSEC */ 24 | 25 | static inline int ieee802_1x_alloc_kay_sm_hapd(struct hostapd_data *hapd, 26 | struct sta_info *sta) 27 | { 28 | return 0; 29 | } 30 | 31 | static inline void * 32 | ieee802_1x_notify_create_actor_hapd(struct hostapd_data *hapd, 33 | struct sta_info *sta) 34 | { 35 | return NULL; 36 | } 37 | 38 | static inline void ieee802_1x_dealloc_kay_sm_hapd(struct hostapd_data *hapd) 39 | { 40 | } 41 | 42 | static inline void * 43 | ieee802_1x_create_preshared_mka_hapd(struct hostapd_data *hapd, 44 | struct sta_info *sta) 45 | { 46 | return NULL; 47 | } 48 | 49 | #endif /* CONFIG_MACSEC */ 50 | 51 | #endif /* WPA_AUTH_KAY_H */ 52 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/hs20/client/devdetail.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 13 8 | 9 | 10 | 21 11 | MS-CHAP-V2 12 | 13 | 14 | 18 15 | 16 | 17 | 23 18 | 19 | 20 | 50 21 | 22 | 23 | false 24 | 020102030405 25 | 310026000000000 26 | imei:490123456789012 27 | http://localhost:12345/ 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 0 38 | 0 39 | 0 40 | 41 | MobilePhone 42 | Manufacturer 43 | 1.0 44 | 1.0 45 | 1.0 46 | false 47 | 48 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/wpa_gui-qt4/signalbar.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_gui - SignalBar class 3 | * Copyright (c) 2011, Kel Modderman 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include 10 | #include 11 | 12 | #include "signalbar.h" 13 | 14 | 15 | SignalBar::SignalBar(QObject *parent) 16 | : QStyledItemDelegate(parent) 17 | { 18 | } 19 | 20 | 21 | SignalBar::~SignalBar() 22 | { 23 | } 24 | 25 | 26 | void SignalBar::paint(QPainter *painter, 27 | const QStyleOptionViewItem &option, 28 | const QModelIndex &index) const 29 | { 30 | QStyleOptionProgressBar opts; 31 | int signal; 32 | 33 | if (index.column() != 3) { 34 | QStyledItemDelegate::paint(painter, option, index); 35 | return; 36 | } 37 | 38 | if (index.data().toInt() > 0) 39 | signal = 0 - (256 - index.data().toInt()); 40 | else 41 | signal = index.data().toInt(); 42 | 43 | opts.minimum = -95; 44 | opts.maximum = -35; 45 | if (signal < opts.minimum) 46 | opts.progress = opts.minimum; 47 | else if (signal > opts.maximum) 48 | opts.progress = opts.maximum; 49 | else 50 | opts.progress = signal; 51 | 52 | opts.text = QString::number(signal) + " dBm"; 53 | opts.textVisible = true; 54 | opts.rect = option.rect; 55 | 56 | QApplication::style()->drawControl(QStyle::CE_ProgressBar, 57 | &opts, painter); 58 | } 59 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/common/ocv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Operating Channel Validation (OCV) 3 | * Copyright (c) 2018, Mathy Vanhoef 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef OCV_H 10 | #define OCV_H 11 | 12 | struct wpa_channel_info; 13 | 14 | struct oci_info { 15 | /* Values in the OCI element */ 16 | u8 op_class; 17 | u8 channel; 18 | u8 seg1_idx; 19 | 20 | /* Derived values for easier verification */ 21 | int freq; 22 | int sec_channel; 23 | int chanwidth; 24 | }; 25 | 26 | #define OCV_OCI_LEN 3 27 | #define OCV_OCI_EXTENDED_LEN (3 + OCV_OCI_LEN) 28 | #define OCV_OCI_KDE_LEN (2 + RSN_SELECTOR_LEN + OCV_OCI_LEN) 29 | 30 | enum oci_verify_result { 31 | OCI_SUCCESS, OCI_NOT_FOUND, OCI_INVALID_LENGTH, OCI_PARSE_ERROR, 32 | OCI_PRIMARY_FREQ_MISMATCH, OCI_CHANNEL_WIDTH_MISMATCH, 33 | OCI_SECONDARY_FREQ_MISMATCH, OCI_SEG_1_INDEX_MISMATCH 34 | }; 35 | 36 | extern char ocv_errorstr[256]; 37 | 38 | int ocv_derive_all_parameters(struct oci_info *oci); 39 | int ocv_insert_oci(struct wpa_channel_info *ci, u8 **argpos); 40 | int ocv_insert_oci_kde(struct wpa_channel_info *ci, u8 **argpos); 41 | int ocv_insert_extended_oci(struct wpa_channel_info *ci, u8 *pos); 42 | enum oci_verify_result 43 | ocv_verify_tx_params(const u8 *oci_ie, size_t oci_ie_len, 44 | struct wpa_channel_info *ci, int tx_chanwidth, 45 | int tx_seg1_idx); 46 | 47 | #endif /* OCV_H */ 48 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/wpa_supplicant_conf.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2010 The Android Open Source Project 3 | # 4 | # This software may be distributed under the terms of the BSD license. 5 | # See README for more details. 6 | # 7 | 8 | # Include this makefile to generate your hardware specific wpa_supplicant.conf 9 | # Requires: WIFI_DRIVER_SOCKET_IFACE 10 | 11 | LOCAL_PATH := $(call my-dir) 12 | 13 | ######################## 14 | include $(CLEAR_VARS) 15 | 16 | LOCAL_MODULE := wpa_supplicant.conf 17 | LOCAL_MODULE_CLASS := ETC 18 | LOCAL_MODULE_TAGS := optional 19 | LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/wifi 20 | 21 | include $(BUILD_SYSTEM)/base_rules.mk 22 | 23 | WPA_SUPPLICANT_CONF_TEMPLATE := $(LOCAL_PATH)/wpa_supplicant_template.conf 24 | WPA_SUPPLICANT_CONF_SCRIPT := $(LOCAL_PATH)/wpa_supplicant_conf.sh 25 | $(LOCAL_BUILT_MODULE): PRIVATE_WIFI_DRIVER_SOCKET_IFACE := $(WIFI_DRIVER_SOCKET_IFACE) 26 | $(LOCAL_BUILT_MODULE): PRIVATE_WPA_SUPPLICANT_CONF_TEMPLATE := $(WPA_SUPPLICANT_CONF_TEMPLATE) 27 | $(LOCAL_BUILT_MODULE): PRIVATE_WPA_SUPPLICANT_CONF_SCRIPT := $(WPA_SUPPLICANT_CONF_SCRIPT) 28 | $(LOCAL_BUILT_MODULE) : $(WPA_SUPPLICANT_CONF_TEMPLATE) $(WPA_SUPPLICANT_CONF_SCRIPT) 29 | @echo Target wpa_supplicant.conf: $@ 30 | @mkdir -p $(dir $@) 31 | $(hide) WIFI_DRIVER_SOCKET_IFACE="$(PRIVATE_WIFI_DRIVER_SOCKET_IFACE)" \ 32 | bash $(PRIVATE_WPA_SUPPLICANT_CONF_SCRIPT) $(PRIVATE_WPA_SUPPLICANT_CONF_TEMPLATE) > $@ 33 | 34 | ######################## 35 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/gas_query_ap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generic advertisement service (GAS) query 3 | * Copyright (c) 2009, Atheros Communications 4 | * Copyright (c) 2011-2017, Qualcomm Atheros 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #ifndef GAS_QUERY_AP_H 11 | #define GAS_QUERY_AP_H 12 | 13 | struct gas_query_ap; 14 | 15 | struct gas_query_ap * gas_query_ap_init(struct hostapd_data *hapd, 16 | void *msg_ctx); 17 | void gas_query_ap_deinit(struct gas_query_ap *gas); 18 | int gas_query_ap_rx(struct gas_query_ap *gas, const u8 *sa, u8 categ, 19 | const u8 *data, size_t len, int freq); 20 | 21 | /** 22 | * enum gas_query_ap_result - GAS query result 23 | */ 24 | enum gas_query_ap_result { 25 | GAS_QUERY_AP_SUCCESS, 26 | GAS_QUERY_AP_FAILURE, 27 | GAS_QUERY_AP_TIMEOUT, 28 | GAS_QUERY_AP_PEER_ERROR, 29 | GAS_QUERY_AP_INTERNAL_ERROR, 30 | GAS_QUERY_AP_DELETED_AT_DEINIT 31 | }; 32 | 33 | int gas_query_ap_req(struct gas_query_ap *gas, const u8 *dst, int freq, 34 | struct wpabuf *req, 35 | void (*cb)(void *ctx, const u8 *dst, u8 dialog_token, 36 | enum gas_query_ap_result result, 37 | const struct wpabuf *adv_proto, 38 | const struct wpabuf *resp, u16 status_code), 39 | void *ctx); 40 | void gas_query_ap_tx_status(struct gas_query_ap *gas, const u8 *dst, 41 | const u8 *data, size_t data_len, int ok); 42 | 43 | #endif /* GAS_QUERY_AP_H */ 44 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/beacon.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd / IEEE 802.11 Management: Beacon and Probe Request/Response 3 | * Copyright (c) 2002-2004, Instant802 Networks, Inc. 4 | * Copyright (c) 2005-2006, Devicescape Software, Inc. 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #ifndef BEACON_H 11 | #define BEACON_H 12 | 13 | struct ieee80211_mgmt; 14 | 15 | void handle_probe_req(struct hostapd_data *hapd, 16 | const struct ieee80211_mgmt *mgmt, size_t len, 17 | int ssi_signal); 18 | int ieee802_11_set_beacon(struct hostapd_data *hapd); 19 | int ieee802_11_set_beacons(struct hostapd_iface *iface); 20 | int ieee802_11_update_beacons(struct hostapd_iface *iface); 21 | int ieee802_11_build_ap_params(struct hostapd_data *hapd, 22 | struct wpa_driver_ap_params *params); 23 | void ieee802_11_free_ap_params(struct wpa_driver_ap_params *params); 24 | void sta_track_add(struct hostapd_iface *iface, const u8 *addr, int ssi_signal); 25 | void sta_track_del(struct hostapd_sta_info *info); 26 | void sta_track_expire(struct hostapd_iface *iface, int force); 27 | struct hostapd_data * 28 | sta_track_seen_on(struct hostapd_iface *iface, const u8 *addr, 29 | const char *ifname); 30 | void sta_track_claim_taxonomy_info(struct hostapd_iface *iface, const u8 *addr, 31 | struct wpabuf **probe_ie_taxonomy); 32 | 33 | const u8 * hostapd_wpa_ie(struct hostapd_data *hapd, u8 eid); 34 | 35 | #endif /* BEACON_H */ 36 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/common/wpa_helpers.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_supplicant ctrl_iface helpers 3 | * Copyright (c) 2010-2011, Atheros Communications, Inc. 4 | * Copyright (c) 2011-2012, Qualcomm Atheros, Inc. 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #ifndef WPA_HELPERS_H 11 | #define WPA_HELPERS_H 12 | 13 | int wpa_command(const char *ifname, const char *cmd); 14 | int wpa_command_resp(const char *ifname, const char *cmd, 15 | char *resp, size_t resp_size); 16 | int get_wpa_status(const char *ifname, const char *field, char *obuf, 17 | size_t obuf_size); 18 | 19 | struct wpa_ctrl * open_wpa_mon(const char *ifname); 20 | int wait_ip_addr(const char *ifname, int timeout); 21 | int get_wpa_cli_event(struct wpa_ctrl *mon, 22 | const char *event, char *buf, size_t buf_size); 23 | int get_wpa_cli_event2(struct wpa_ctrl *mon, 24 | const char *event, const char *event2, 25 | char *buf, size_t buf_size); 26 | 27 | int add_network(const char *ifname); 28 | int set_network(const char *ifname, int id, const char *field, 29 | const char *value); 30 | int set_network_quoted(const char *ifname, int id, const char *field, 31 | const char *value); 32 | int add_cred(const char *ifname); 33 | int set_cred(const char *ifname, int id, const char *field, const char *value); 34 | int set_cred_quoted(const char *ifname, int id, const char *field, 35 | const char *value); 36 | 37 | #endif /* WPA_HELPERS_H */ 38 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/common/ctrl_iface_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Common hostapd/wpa_supplicant ctrl iface code. 3 | * Copyright (c) 2002-2013, Jouni Malinen 4 | * Copyright (c) 2015, Qualcomm Atheros, Inc. 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | #ifndef CONTROL_IFACE_COMMON_H 10 | #define CONTROL_IFACE_COMMON_H 11 | 12 | #include "utils/list.h" 13 | 14 | /* Events enable bits (wpa_ctrl_dst::events) */ 15 | #define WPA_EVENT_RX_PROBE_REQUEST BIT(0) 16 | 17 | /** 18 | * struct wpa_ctrl_dst - Data structure of control interface monitors 19 | * 20 | * This structure is used to store information about registered control 21 | * interface monitors into struct wpa_supplicant. 22 | */ 23 | struct wpa_ctrl_dst { 24 | struct dl_list list; 25 | struct sockaddr_storage addr; 26 | socklen_t addrlen; 27 | int debug_level; 28 | int errors; 29 | u32 events; /* WPA_EVENT_* bitmap */ 30 | }; 31 | 32 | void sockaddr_print(int level, const char *msg, struct sockaddr_storage *sock, 33 | socklen_t socklen); 34 | 35 | int ctrl_iface_attach(struct dl_list *ctrl_dst, struct sockaddr_storage *from, 36 | socklen_t fromlen, const char *input); 37 | int ctrl_iface_detach(struct dl_list *ctrl_dst, struct sockaddr_storage *from, 38 | socklen_t fromlen); 39 | int ctrl_iface_level(struct dl_list *ctrl_dst, struct sockaddr_storage *from, 40 | socklen_t fromlen, const char *level); 41 | 42 | #endif /* CONTROL_IFACE_COMMON_H */ 43 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/airtime_policy.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Airtime policy configuration 3 | * Copyright (c) 2018-2019, Toke Høiland-Jørgensen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef AIRTIME_POLICY_H 10 | #define AIRTIME_POLICY_H 11 | 12 | struct hostapd_iface; 13 | 14 | #ifdef CONFIG_AIRTIME_POLICY 15 | 16 | #define AIRTIME_DEFAULT_UPDATE_INTERVAL 200 /* ms */ 17 | #define AIRTIME_BACKLOG_EXPIRY_FACTOR 2500 /* 2.5 intervals + convert to usec */ 18 | 19 | /* scale quantum so this becomes the effective quantum after applying the max 20 | * weight, but never go below min or above max */ 21 | #define AIRTIME_QUANTUM_MIN 8 /* usec */ 22 | #define AIRTIME_QUANTUM_MAX 256 /* usec */ 23 | #define AIRTIME_QUANTUM_TARGET 1024 /* usec */ 24 | 25 | int airtime_policy_new_sta(struct hostapd_data *hapd, struct sta_info *sta); 26 | int airtime_policy_update_init(struct hostapd_iface *iface); 27 | void airtime_policy_update_deinit(struct hostapd_iface *iface); 28 | 29 | #else /* CONFIG_AIRTIME_POLICY */ 30 | 31 | static inline int airtime_policy_new_sta(struct hostapd_data *hapd, 32 | struct sta_info *sta) 33 | { 34 | return -1; 35 | } 36 | 37 | static inline int airtime_policy_update_init(struct hostapd_iface *iface) 38 | { 39 | return -1; 40 | } 41 | 42 | static inline void airtime_policy_update_deinit(struct hostapd_iface *iface) 43 | { 44 | } 45 | 46 | #endif /* CONFIG_AIRTIME_POLICY */ 47 | 48 | #endif /* AIRTIME_POLICY_H */ 49 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/preauth_auth.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd - Authenticator for IEEE 802.11i RSN pre-authentication 3 | * Copyright (c) 2004-2005, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef PREAUTH_H 10 | #define PREAUTH_H 11 | 12 | #ifdef CONFIG_RSN_PREAUTH 13 | 14 | int rsn_preauth_iface_init(struct hostapd_data *hapd); 15 | void rsn_preauth_iface_deinit(struct hostapd_data *hapd); 16 | void rsn_preauth_finished(struct hostapd_data *hapd, struct sta_info *sta, 17 | int success); 18 | void rsn_preauth_send(struct hostapd_data *hapd, struct sta_info *sta, 19 | u8 *buf, size_t len); 20 | void rsn_preauth_free_station(struct hostapd_data *hapd, struct sta_info *sta); 21 | 22 | #else /* CONFIG_RSN_PREAUTH */ 23 | 24 | static inline int rsn_preauth_iface_init(struct hostapd_data *hapd) 25 | { 26 | return 0; 27 | } 28 | 29 | static inline void rsn_preauth_iface_deinit(struct hostapd_data *hapd) 30 | { 31 | } 32 | 33 | static inline void rsn_preauth_finished(struct hostapd_data *hapd, 34 | struct sta_info *sta, 35 | int success) 36 | { 37 | } 38 | 39 | static inline void rsn_preauth_send(struct hostapd_data *hapd, 40 | struct sta_info *sta, 41 | u8 *buf, size_t len) 42 | { 43 | } 44 | 45 | static inline void rsn_preauth_free_station(struct hostapd_data *hapd, 46 | struct sta_info *sta) 47 | { 48 | } 49 | 50 | #endif /* CONFIG_RSN_PREAUTH */ 51 | 52 | #endif /* PREAUTH_H */ 53 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/interworking.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Interworking (IEEE 802.11u) 3 | * Copyright (c) 2011-2012, Qualcomm Atheros 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef INTERWORKING_H 10 | #define INTERWORKING_H 11 | 12 | enum gas_query_result; 13 | 14 | int anqp_send_req(struct wpa_supplicant *wpa_s, const u8 *dst, int freq, 15 | u16 info_ids[], size_t num_ids, u32 subtypes, 16 | u32 mbo_subtypes); 17 | void anqp_resp_cb(void *ctx, const u8 *dst, u8 dialog_token, 18 | enum gas_query_result result, 19 | const struct wpabuf *adv_proto, 20 | const struct wpabuf *resp, u16 status_code); 21 | int gas_send_request(struct wpa_supplicant *wpa_s, const u8 *dst, 22 | const struct wpabuf *adv_proto, 23 | const struct wpabuf *query); 24 | int interworking_fetch_anqp(struct wpa_supplicant *wpa_s); 25 | void interworking_stop_fetch_anqp(struct wpa_supplicant *wpa_s); 26 | int interworking_select(struct wpa_supplicant *wpa_s, int auto_select, 27 | int *freqs); 28 | int interworking_connect(struct wpa_supplicant *wpa_s, struct wpa_bss *bss, 29 | int only_add); 30 | void interworking_start_fetch_anqp(struct wpa_supplicant *wpa_s); 31 | int interworking_home_sp_cred(struct wpa_supplicant *wpa_s, 32 | struct wpa_cred *cred, 33 | struct wpabuf *domain_names); 34 | int domain_name_list_contains(struct wpabuf *domain_names, 35 | const char *domain, int exact_match); 36 | 37 | #endif /* INTERWORKING_H */ 38 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/config_none.c: -------------------------------------------------------------------------------- 1 | /* 2 | * WPA Supplicant / Configuration backend: empty starting point 3 | * Copyright (c) 2003-2005, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | * 8 | * This file implements stub example of a configuration backend. None of the 9 | * functions are actually implemented so this can be used as a simple 10 | * compilation test or a starting point for a new configuration backend. 11 | */ 12 | 13 | #include "includes.h" 14 | 15 | #include "common.h" 16 | #include "config.h" 17 | #include "base64.h" 18 | 19 | 20 | struct wpa_config * wpa_config_read(const char *name, struct wpa_config *cfgp) 21 | { 22 | struct wpa_config *config; 23 | 24 | if (name == NULL) 25 | return NULL; 26 | if (cfgp) 27 | config = cfgp; 28 | else 29 | config = wpa_config_alloc_empty(NULL, NULL); 30 | if (config == NULL) 31 | return NULL; 32 | /* TODO: fill in configuration data */ 33 | return config; 34 | } 35 | 36 | 37 | int wpa_config_write(const char *name, struct wpa_config *config) 38 | { 39 | struct wpa_ssid *ssid; 40 | struct wpa_config_blob *blob; 41 | 42 | wpa_printf(MSG_DEBUG, "Writing configuration file '%s'", name); 43 | 44 | /* TODO: write global config parameters */ 45 | 46 | 47 | for (ssid = config->ssid; ssid; ssid = ssid->next) { 48 | /* TODO: write networks */ 49 | } 50 | 51 | for (blob = config->blobs; blob; blob = blob->next) { 52 | /* TODO: write blobs */ 53 | } 54 | 55 | return 0; 56 | } 57 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/common/cli.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Common hostapd/wpa_supplicant command line interface functionality 3 | * Copyright (c) 2004-2016, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef CLI_H 10 | #define CLI_H 11 | 12 | #include "utils/list.h" 13 | 14 | extern const char *const cli_license; 15 | extern const char *const cli_full_license; 16 | 17 | struct cli_txt_entry { 18 | struct dl_list list; 19 | char *txt; 20 | }; 21 | 22 | void cli_txt_list_free(struct cli_txt_entry *e); 23 | void cli_txt_list_flush(struct dl_list *list); 24 | 25 | struct cli_txt_entry * 26 | cli_txt_list_get(struct dl_list *txt_list, const char *txt); 27 | 28 | void cli_txt_list_del(struct dl_list *txt_list, const char *txt); 29 | void cli_txt_list_del_addr(struct dl_list *txt_list, const char *txt); 30 | void cli_txt_list_del_word(struct dl_list *txt_list, const char *txt, 31 | int separator); 32 | 33 | int cli_txt_list_add(struct dl_list *txt_list, const char *txt); 34 | int cli_txt_list_add_addr(struct dl_list *txt_list, const char *txt); 35 | int cli_txt_list_add_word(struct dl_list *txt_list, const char *txt, 36 | int separator); 37 | 38 | char ** cli_txt_list_array(struct dl_list *txt_list); 39 | 40 | int get_cmd_arg_num(const char *str, int pos); 41 | int write_cmd(char *buf, size_t buflen, const char *cmd, int argc, 42 | char *argv[]); 43 | 44 | #define max_args 10 45 | int tokenize_cmd(char *cmd, char *argv[]); 46 | 47 | #endif /* CLI_H */ 48 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/binder/binder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * binder interface for wpa_supplicant daemon 3 | * Copyright (c) 2004-2016, Jouni Malinen 4 | * Copyright (c) 2004-2016, Roshan Pius 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #ifndef WPA_SUPPLICANT_BINDER_BINDER_H 11 | #define WPA_SUPPLICANT_BINDER_BINDER_H 12 | 13 | #ifdef _cplusplus 14 | extern "C" { 15 | #endif /* _cplusplus */ 16 | 17 | /** 18 | * This is the binder RPC interface entry point to the wpa_supplicant core. 19 | * This initializes the binder driver & BinderManager instance and then forwards 20 | * all the notifications from the supplicant core to the BinderManager. 21 | */ 22 | struct wpas_binder_priv; 23 | struct wpa_global; 24 | 25 | struct wpas_binder_priv *wpas_binder_init(struct wpa_global *global); 26 | void wpas_binder_deinit(struct wpas_binder_priv *priv); 27 | 28 | #ifdef CONFIG_CTRL_IFACE_BINDER 29 | int wpas_binder_register_interface(struct wpa_supplicant *wpa_s); 30 | int wpas_binder_unregister_interface(struct wpa_supplicant *wpa_s); 31 | #else /* CONFIG_CTRL_IFACE_BINDER */ 32 | static inline int wpas_binder_register_interface(struct wpa_supplicant *wpa_s) 33 | { 34 | return 0; 35 | } 36 | static inline int wpas_binder_unregister_interface(struct wpa_supplicant *wpa_s) 37 | { 38 | return 0; 39 | } 40 | #endif /* CONFIG_CTRL_IFACE_BINDER */ 41 | 42 | #ifdef _cplusplus 43 | } 44 | #endif /* _cplusplus */ 45 | 46 | #endif /* WPA_SUPPLICANT_BINDER_BINDER_H */ 47 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/offchannel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_supplicant - Off-channel Action frame TX/RX 3 | * Copyright (c) 2009-2010, Atheros Communications 4 | * Copyright (c) 2011, Qualcomm Atheros 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #ifndef OFFCHANNEL_H 11 | #define OFFCHANNEL_H 12 | 13 | int offchannel_send_action(struct wpa_supplicant *wpa_s, unsigned int freq, 14 | const u8 *dst, const u8 *src, const u8 *bssid, 15 | const u8 *buf, size_t len, unsigned int wait_time, 16 | void (*tx_cb)(struct wpa_supplicant *wpa_s, 17 | unsigned int freq, const u8 *dst, 18 | const u8 *src, const u8 *bssid, 19 | const u8 *data, size_t data_len, 20 | enum offchannel_send_action_result 21 | result), 22 | int no_cck); 23 | void offchannel_send_action_done(struct wpa_supplicant *wpa_s); 24 | void offchannel_remain_on_channel_cb(struct wpa_supplicant *wpa_s, 25 | unsigned int freq, unsigned int duration); 26 | void offchannel_cancel_remain_on_channel_cb(struct wpa_supplicant *wpa_s, 27 | unsigned int freq); 28 | void offchannel_deinit(struct wpa_supplicant *wpa_s); 29 | void offchannel_send_action_tx_status( 30 | struct wpa_supplicant *wpa_s, const u8 *dst, const u8 *data, 31 | size_t data_len, enum offchannel_send_action_result result); 32 | const void * offchannel_pending_action_tx(struct wpa_supplicant *wpa_s); 33 | void offchannel_clear_pending_action_tx(struct wpa_supplicant *wpa_s); 34 | 35 | #endif /* OFFCHANNEL_H */ 36 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/dfs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * DFS - Dynamic Frequency Selection 3 | * Copyright (c) 2002-2013, Jouni Malinen 4 | * Copyright (c) 2013-2017, Qualcomm Atheros, Inc. 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | #ifndef DFS_H 10 | #define DFS_H 11 | 12 | int hostapd_handle_dfs(struct hostapd_iface *iface); 13 | 14 | int hostapd_dfs_complete_cac(struct hostapd_iface *iface, int success, int freq, 15 | int ht_enabled, int chan_offset, int chan_width, 16 | int cf1, int cf2); 17 | int hostapd_dfs_pre_cac_expired(struct hostapd_iface *iface, int freq, 18 | int ht_enabled, int chan_offset, int chan_width, 19 | int cf1, int cf2); 20 | int hostapd_dfs_radar_detected(struct hostapd_iface *iface, int freq, 21 | int ht_enabled, 22 | int chan_offset, int chan_width, 23 | int cf1, int cf2); 24 | int hostapd_dfs_nop_finished(struct hostapd_iface *iface, int freq, 25 | int ht_enabled, 26 | int chan_offset, int chan_width, int cf1, int cf2); 27 | int hostapd_is_dfs_required(struct hostapd_iface *iface); 28 | int hostapd_is_dfs_chan_available(struct hostapd_iface *iface); 29 | int hostapd_dfs_start_cac(struct hostapd_iface *iface, int freq, 30 | int ht_enabled, int chan_offset, int chan_width, 31 | int cf1, int cf2); 32 | int hostapd_handle_dfs_offload(struct hostapd_iface *iface); 33 | int hostapd_is_dfs_overlap(struct hostapd_iface *iface, enum chan_width width, 34 | int center_freq); 35 | 36 | #endif /* DFS_H */ 37 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/examples/wps-ap-cli: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | CLI=wpa_cli 4 | 5 | pbc() 6 | { 7 | echo "Starting PBC mode" 8 | echo "Push button on the station within two minutes" 9 | if ! $CLI wps_pbc | grep -q OK; then 10 | echo "Failed to enable PBC mode" 11 | fi 12 | } 13 | 14 | enter_pin() 15 | { 16 | echo "Enter a PIN from a station to be enrolled to the network." 17 | printf "Enrollee PIN: " 18 | read pin 19 | cpin=`$CLI wps_check_pin "$pin" | tail -1` 20 | if [ "$cpin" = "FAIL-CHECKSUM" ]; then 21 | echo "Checksum digit is not valid" 22 | printf "Do you want to use this PIN (y/n)? " 23 | read resp 24 | case "$resp" in 25 | y*) 26 | cpin=`echo "$pin" | sed "s/[^1234567890]//g"` 27 | ;; 28 | *) 29 | return 1 30 | ;; 31 | esac 32 | fi 33 | if [ "$cpin" = "FAIL" ]; then 34 | echo "Invalid PIN: $pin" 35 | return 1 36 | fi 37 | echo "Enabling Enrollee PIN: $cpin" 38 | $CLI wps_pin any "$cpin" 39 | } 40 | 41 | show_config() 42 | { 43 | $CLI status wps 44 | } 45 | 46 | main_menu() 47 | { 48 | echo "WPS AP" 49 | echo "------" 50 | echo "1: Push button (activate PBC)" 51 | echo "2: Enter Enrollee PIN" 52 | echo "3: Show current configuration" 53 | echo "0: Exit wps-ap-cli" 54 | 55 | printf "Command: " 56 | read cmd 57 | 58 | case "$cmd" in 59 | 1) 60 | pbc 61 | ;; 62 | 2) 63 | enter_pin 64 | ;; 65 | 3) 66 | show_config 67 | ;; 68 | 0) 69 | exit 0 70 | ;; 71 | *) 72 | echo "Unknown command: $cmd" 73 | ;; 74 | esac 75 | 76 | echo 77 | main_menu 78 | } 79 | 80 | 81 | main_menu 82 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/ap/x_snoop.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generic Snooping for Proxy ARP 3 | * Copyright (c) 2014, Qualcomm Atheros, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef X_SNOOP_H 10 | #define X_SNOOP_H 11 | 12 | #include "l2_packet/l2_packet.h" 13 | 14 | #ifdef CONFIG_PROXYARP 15 | 16 | int x_snoop_init(struct hostapd_data *hapd); 17 | struct l2_packet_data * 18 | x_snoop_get_l2_packet(struct hostapd_data *hapd, 19 | void (*handler)(void *ctx, const u8 *src_addr, 20 | const u8 *buf, size_t len), 21 | enum l2_packet_filter_type type); 22 | void x_snoop_mcast_to_ucast_convert_send(struct hostapd_data *hapd, 23 | struct sta_info *sta, u8 *buf, 24 | size_t len); 25 | void x_snoop_deinit(struct hostapd_data *hapd); 26 | 27 | #else /* CONFIG_PROXYARP */ 28 | 29 | static inline int x_snoop_init(struct hostapd_data *hapd) 30 | { 31 | return 0; 32 | } 33 | 34 | static inline struct l2_packet_data * 35 | x_snoop_get_l2_packet(struct hostapd_data *hapd, 36 | void (*handler)(void *ctx, const u8 *src_addr, 37 | const u8 *buf, size_t len), 38 | enum l2_packet_filter_type type) 39 | { 40 | return NULL; 41 | } 42 | 43 | static inline void 44 | x_snoop_mcast_to_ucast_convert_send(struct hostapd_data *hapd, 45 | struct sta_info *sta, void *buf, 46 | size_t len) 47 | { 48 | } 49 | 50 | static inline void x_snoop_deinit(struct hostapd_data *hapd) 51 | { 52 | } 53 | 54 | #endif /* CONFIG_PROXYARP */ 55 | 56 | #endif /* X_SNOOP_H */ 57 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/wpa_gui-qt4/eventhistory.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_gui - EventHistory class 3 | * Copyright (c) 2005-2006, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef EVENTHISTORY_H 10 | #define EVENTHISTORY_H 11 | 12 | #include 13 | #include "ui_eventhistory.h" 14 | 15 | 16 | class EventListModel : public QAbstractTableModel 17 | { 18 | Q_OBJECT 19 | 20 | public: 21 | EventListModel(QObject *parent = 0) 22 | : QAbstractTableModel(parent) {} 23 | 24 | int rowCount(const QModelIndex &parent = QModelIndex()) const; 25 | int columnCount(const QModelIndex &parent = QModelIndex()) const; 26 | QVariant data(const QModelIndex &index, int role) const; 27 | QVariant headerData(int section, Qt::Orientation orientation, 28 | int role = Qt::DisplayRole) const; 29 | void addEvent(QString time, QString msg); 30 | 31 | private: 32 | QStringList timeList; 33 | QStringList msgList; 34 | }; 35 | 36 | 37 | class EventHistory : public QDialog, public Ui::EventHistory 38 | { 39 | Q_OBJECT 40 | 41 | public: 42 | EventHistory(QWidget *parent = 0, const char *name = 0, 43 | bool modal = false, Qt::WindowFlags fl = 0); 44 | ~EventHistory(); 45 | 46 | public slots: 47 | virtual void addEvents(WpaMsgList msgs); 48 | virtual void addEvent(WpaMsg msg); 49 | 50 | protected slots: 51 | virtual void languageChange(); 52 | 53 | private: 54 | EventListModel *elm; 55 | }; 56 | 57 | #endif /* EVENTHISTORY_H */ 58 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/wps/wps_upnp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * UPnP WPS Device 3 | * Copyright (c) 2000-2003 Intel Corporation 4 | * Copyright (c) 2006-2007 Sony Corporation 5 | * Copyright (c) 2008-2009 Atheros Communications 6 | * Copyright (c) 2009, Jouni Malinen 7 | * 8 | * See wps_upnp.c for more details on licensing and code history. 9 | */ 10 | 11 | #ifndef WPS_UPNP_H 12 | #define WPS_UPNP_H 13 | 14 | #include "utils/list.h" 15 | 16 | struct upnp_wps_device_sm; 17 | struct wps_context; 18 | struct wps_data; 19 | 20 | struct upnp_wps_peer { 21 | struct dl_list list; 22 | struct wps_data *wps; 23 | }; 24 | 25 | enum upnp_wps_wlanevent_type { 26 | UPNP_WPS_WLANEVENT_TYPE_PROBE = 1, 27 | UPNP_WPS_WLANEVENT_TYPE_EAP = 2 28 | }; 29 | 30 | struct upnp_wps_device_ctx { 31 | int (*rx_req_put_wlan_response)( 32 | void *priv, enum upnp_wps_wlanevent_type ev_type, 33 | const u8 *mac_addr, const struct wpabuf *msg, 34 | enum wps_msg_type msg_type); 35 | 36 | char *ap_pin; 37 | }; 38 | 39 | struct upnp_wps_device_sm * 40 | upnp_wps_device_init(struct upnp_wps_device_ctx *ctx, struct wps_context *wps, 41 | void *priv, char *net_if); 42 | void upnp_wps_device_deinit(struct upnp_wps_device_sm *sm, void *priv); 43 | 44 | int upnp_wps_device_send_wlan_event(struct upnp_wps_device_sm *sm, 45 | const u8 from_mac_addr[ETH_ALEN], 46 | enum upnp_wps_wlanevent_type ev_type, 47 | const struct wpabuf *msg); 48 | int upnp_wps_subscribers(struct upnp_wps_device_sm *sm); 49 | int upnp_wps_set_ap_pin(struct upnp_wps_device_sm *sm, const char *ap_pin); 50 | 51 | #endif /* WPS_UPNP_H */ 52 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/fst/fst_internal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FST module - auxiliary definitions 3 | * Copyright (c) 2014, Qualcomm Atheros, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef FST_INTERNAL_H 10 | #define FST_INTERNAL_H 11 | 12 | #include "utils/includes.h" 13 | #include "utils/common.h" 14 | #include "common/defs.h" 15 | #include "common/ieee802_11_defs.h" 16 | #include "fst/fst_iface.h" 17 | #include "fst/fst_group.h" 18 | #include "fst/fst_session.h" 19 | 20 | #define fst_printf(level, format, ...) \ 21 | wpa_printf((level), "FST: " format, ##__VA_ARGS__) 22 | 23 | #define fst_printf_group(group, level, format, ...) \ 24 | wpa_printf((level), "FST: %s: " format, \ 25 | fst_group_get_id(group), ##__VA_ARGS__) 26 | 27 | #define fst_printf_iface(iface, level, format, ...) \ 28 | fst_printf_group(fst_iface_get_group(iface), (level), "%s: " format, \ 29 | fst_iface_get_name(iface), ##__VA_ARGS__) 30 | 31 | enum mb_band_id fst_hw_mode_to_band(enum hostapd_hw_mode mode); 32 | 33 | struct fst_ctrl_handle { 34 | struct fst_ctrl ctrl; 35 | struct dl_list global_ctrls_lentry; 36 | }; 37 | 38 | extern struct dl_list fst_global_ctrls_list; 39 | 40 | #define foreach_fst_ctrl_call(clb, ...) \ 41 | do { \ 42 | struct fst_ctrl_handle *__fst_ctrl_h; \ 43 | dl_list_for_each(__fst_ctrl_h, &fst_global_ctrls_list, \ 44 | struct fst_ctrl_handle, global_ctrls_lentry) \ 45 | if (__fst_ctrl_h->ctrl.clb) \ 46 | __fst_ctrl_h->ctrl.clb(__VA_ARGS__);\ 47 | } while (0) 48 | 49 | #endif /* FST_INTERNAL_H */ 50 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/wpa_gui-qt4/networkconfig.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_gui - NetworkConfig class 3 | * Copyright (c) 2005-2006, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef NETWORKCONFIG_H 10 | #define NETWORKCONFIG_H 11 | 12 | #include 13 | #include "ui_networkconfig.h" 14 | 15 | class WpaGui; 16 | 17 | class NetworkConfig : public QDialog, public Ui::NetworkConfig 18 | { 19 | Q_OBJECT 20 | 21 | public: 22 | NetworkConfig(QWidget *parent = 0, const char *name = 0, 23 | bool modal = false, Qt::WindowFlags fl = 0); 24 | ~NetworkConfig(); 25 | 26 | virtual void paramsFromScanResults(QTreeWidgetItem *sel); 27 | virtual void setWpaGui(WpaGui *_wpagui); 28 | virtual int setNetworkParam(int id, const char *field, 29 | const char *value, bool quote); 30 | virtual void paramsFromConfig(int network_id); 31 | virtual void newNetwork(); 32 | 33 | public slots: 34 | virtual void authChanged(int sel); 35 | virtual void addNetwork(); 36 | virtual void encrChanged(const QString &sel); 37 | virtual void writeWepKey(int network_id, QLineEdit *edit, int id); 38 | virtual void removeNetwork(); 39 | virtual void eapChanged(int sel); 40 | virtual void useWps(); 41 | 42 | protected slots: 43 | virtual void languageChange(); 44 | 45 | private: 46 | WpaGui *wpagui; 47 | int edit_network_id; 48 | bool new_network; 49 | QString bssid; 50 | 51 | virtual void wepEnabled(bool enabled); 52 | virtual void getEapCapa(); 53 | }; 54 | 55 | #endif /* NETWORKCONFIG_H */ 56 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/tls/tlsv1_cred.h: -------------------------------------------------------------------------------- 1 | /* 2 | * TLSv1 credentials 3 | * Copyright (c) 2006-2007, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef TLSV1_CRED_H 10 | #define TLSV1_CRED_H 11 | 12 | struct tlsv1_credentials { 13 | struct x509_certificate *trusted_certs; 14 | struct x509_certificate *cert; 15 | struct crypto_private_key *key; 16 | 17 | unsigned int cert_probe:1; 18 | unsigned int ca_cert_verify:1; 19 | unsigned int server_cert_only:1; 20 | u8 srv_cert_hash[32]; 21 | 22 | /* Diffie-Hellman parameters */ 23 | u8 *dh_p; /* prime */ 24 | size_t dh_p_len; 25 | u8 *dh_g; /* generator */ 26 | size_t dh_g_len; 27 | 28 | char *ocsp_stapling_response; 29 | char *ocsp_stapling_response_multi; 30 | }; 31 | 32 | 33 | struct tlsv1_credentials * tlsv1_cred_alloc(void); 34 | void tlsv1_cred_free(struct tlsv1_credentials *cred); 35 | int tlsv1_set_ca_cert(struct tlsv1_credentials *cred, const char *cert, 36 | const u8 *cert_blob, size_t cert_blob_len, 37 | const char *path); 38 | int tlsv1_set_cert(struct tlsv1_credentials *cred, const char *cert, 39 | const u8 *cert_blob, size_t cert_blob_len); 40 | int tlsv1_set_private_key(struct tlsv1_credentials *cred, 41 | const char *private_key, 42 | const char *private_key_passwd, 43 | const u8 *private_key_blob, 44 | size_t private_key_blob_len); 45 | int tlsv1_set_dhparams(struct tlsv1_credentials *cred, const char *dh_file, 46 | const u8 *dh_blob, size_t dh_blob_len); 47 | 48 | #endif /* TLSV1_CRED_H */ 49 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/utils/pcsc_funcs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * WPA Supplicant / PC/SC smartcard interface for USIM, GSM SIM 3 | * Copyright (c) 2004-2006, 2012, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef PCSC_FUNCS_H 10 | #define PCSC_FUNCS_H 11 | 12 | #ifdef PCSC_FUNCS 13 | struct scard_data * scard_init(const char *reader); 14 | void scard_deinit(struct scard_data *scard); 15 | 16 | int scard_set_pin(struct scard_data *scard, const char *pin); 17 | int scard_get_imsi(struct scard_data *scard, char *imsi, size_t *len); 18 | int scard_get_mnc_len(struct scard_data *scard); 19 | int scard_gsm_auth(struct scard_data *scard, const unsigned char *_rand, 20 | unsigned char *sres, unsigned char *kc); 21 | int scard_umts_auth(struct scard_data *scard, const unsigned char *_rand, 22 | const unsigned char *autn, 23 | unsigned char *res, size_t *res_len, 24 | unsigned char *ik, unsigned char *ck, unsigned char *auts); 25 | int scard_get_pin_retry_counter(struct scard_data *scard); 26 | int scard_supports_umts(struct scard_data *scard); 27 | 28 | #else /* PCSC_FUNCS */ 29 | 30 | #define scard_init(r) NULL 31 | #define scard_deinit(s) do { } while (0) 32 | #define scard_set_pin(s, p) -1 33 | #define scard_get_imsi(s, i, l) -1 34 | #define scard_get_mnc_len(s) -1 35 | #define scard_gsm_auth(s, r, s2, k) -1 36 | #define scard_umts_auth(s, r, a, r2, rl, i, c, a2) -1 37 | #define scard_get_pin_retry_counter(s) -1 38 | #define scard_supports_umts(s) 0 39 | 40 | #endif /* PCSC_FUNCS */ 41 | 42 | #endif /* PCSC_FUNCS_H */ 43 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/drivers/drivers.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Driver interface list 3 | * Copyright (c) 2004-2005, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include "utils/includes.h" 10 | #include "utils/common.h" 11 | #include "driver.h" 12 | 13 | 14 | const struct wpa_driver_ops *const wpa_drivers[] = 15 | { 16 | #ifdef CONFIG_DRIVER_NL80211 17 | &wpa_driver_nl80211_ops, 18 | #endif /* CONFIG_DRIVER_NL80211 */ 19 | #ifdef CONFIG_DRIVER_WEXT 20 | &wpa_driver_wext_ops, 21 | #endif /* CONFIG_DRIVER_WEXT */ 22 | #ifdef CONFIG_DRIVER_HOSTAP 23 | &wpa_driver_hostap_ops, 24 | #endif /* CONFIG_DRIVER_HOSTAP */ 25 | #ifdef CONFIG_DRIVER_BSD 26 | &wpa_driver_bsd_ops, 27 | #endif /* CONFIG_DRIVER_BSD */ 28 | #ifdef CONFIG_DRIVER_OPENBSD 29 | &wpa_driver_openbsd_ops, 30 | #endif /* CONFIG_DRIVER_OPENBSD */ 31 | #ifdef CONFIG_DRIVER_NDIS 32 | &wpa_driver_ndis_ops, 33 | #endif /* CONFIG_DRIVER_NDIS */ 34 | #ifdef CONFIG_DRIVER_WIRED 35 | &wpa_driver_wired_ops, 36 | #endif /* CONFIG_DRIVER_WIRED */ 37 | #ifdef CONFIG_DRIVER_MACSEC_LINUX 38 | &wpa_driver_macsec_linux_ops, 39 | #endif /* CONFIG_DRIVER_MACSEC_LINUX */ 40 | #ifdef CONFIG_DRIVER_MACSEC_QCA 41 | &wpa_driver_macsec_qca_ops, 42 | #endif /* CONFIG_DRIVER_MACSEC_QCA */ 43 | #ifdef CONFIG_DRIVER_ROBOSWITCH 44 | &wpa_driver_roboswitch_ops, 45 | #endif /* CONFIG_DRIVER_ROBOSWITCH */ 46 | #ifdef CONFIG_DRIVER_ATHEROS 47 | &wpa_driver_atheros_ops, 48 | #endif /* CONFIG_DRIVER_ATHEROS */ 49 | #ifdef CONFIG_DRIVER_NONE 50 | &wpa_driver_none_ops, 51 | #endif /* CONFIG_DRIVER_NONE */ 52 | NULL 53 | }; 54 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/utils/build_config.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_supplicant/hostapd - Build time configuration defines 3 | * Copyright (c) 2005-2006, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | * 8 | * This header file can be used to define configuration defines that were 9 | * originally defined in Makefile. This is mainly meant for IDE use or for 10 | * systems that do not have suitable 'make' tool. In these cases, it may be 11 | * easier to have a single place for defining all the needed C pre-processor 12 | * defines. 13 | */ 14 | 15 | #ifndef BUILD_CONFIG_H 16 | #define BUILD_CONFIG_H 17 | 18 | /* Insert configuration defines, e.g., #define EAP_MD5, here, if needed. */ 19 | 20 | #ifdef CONFIG_WIN32_DEFAULTS 21 | #define CONFIG_NATIVE_WINDOWS 22 | #define CONFIG_ANSI_C_EXTRA 23 | #define CONFIG_WINPCAP 24 | #define IEEE8021X_EAPOL 25 | #define PKCS12_FUNCS 26 | #define PCSC_FUNCS 27 | #define CONFIG_CTRL_IFACE 28 | #define CONFIG_CTRL_IFACE_NAMED_PIPE 29 | #define CONFIG_DRIVER_NDIS 30 | #define CONFIG_NDIS_EVENTS_INTEGRATED 31 | #define CONFIG_DEBUG_FILE 32 | #define EAP_MD5 33 | #define EAP_TLS 34 | #define EAP_MSCHAPv2 35 | #define EAP_PEAP 36 | #define EAP_TTLS 37 | #define EAP_GTC 38 | #define EAP_OTP 39 | #define EAP_LEAP 40 | #define EAP_TNC 41 | #define _CRT_SECURE_NO_DEPRECATE 42 | 43 | #ifdef USE_INTERNAL_CRYPTO 44 | #define CONFIG_TLS_INTERNAL_CLIENT 45 | #define CONFIG_INTERNAL_LIBTOMMATH 46 | #define CONFIG_CRYPTO_INTERNAL 47 | #endif /* USE_INTERNAL_CRYPTO */ 48 | #endif /* CONFIG_WIN32_DEFAULTS */ 49 | 50 | #endif /* BUILD_CONFIG_H */ 51 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/eap_peer/ikev2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * IKEv2 responder (RFC 4306) for EAP-IKEV2 3 | * Copyright (c) 2007, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef IKEV2_H 10 | #define IKEV2_H 11 | 12 | #include "eap_common/ikev2_common.h" 13 | 14 | struct ikev2_proposal_data { 15 | u8 proposal_num; 16 | int integ; 17 | int prf; 18 | int encr; 19 | int dh; 20 | }; 21 | 22 | 23 | struct ikev2_responder_data { 24 | enum { SA_INIT, SA_AUTH, CHILD_SA, NOTIFY, IKEV2_DONE, IKEV2_FAILED } 25 | state; 26 | u8 i_spi[IKEV2_SPI_LEN]; 27 | u8 r_spi[IKEV2_SPI_LEN]; 28 | u8 i_nonce[IKEV2_NONCE_MAX_LEN]; 29 | size_t i_nonce_len; 30 | u8 r_nonce[IKEV2_NONCE_MAX_LEN]; 31 | size_t r_nonce_len; 32 | struct wpabuf *i_dh_public; 33 | struct wpabuf *r_dh_private; 34 | struct ikev2_proposal_data proposal; 35 | const struct dh_group *dh; 36 | struct ikev2_keys keys; 37 | u8 *IDi; 38 | size_t IDi_len; 39 | u8 IDi_type; 40 | u8 *IDr; 41 | size_t IDr_len; 42 | struct wpabuf *r_sign_msg; 43 | struct wpabuf *i_sign_msg; 44 | u8 *shared_secret; 45 | size_t shared_secret_len; 46 | enum { PEER_AUTH_CERT, PEER_AUTH_SECRET } peer_auth; 47 | u8 *key_pad; 48 | size_t key_pad_len; 49 | u16 error_type; 50 | enum { LAST_MSG_SA_INIT, LAST_MSG_SA_AUTH } last_msg; 51 | }; 52 | 53 | 54 | void ikev2_responder_deinit(struct ikev2_responder_data *data); 55 | int ikev2_responder_process(struct ikev2_responder_data *data, 56 | const struct wpabuf *buf); 57 | struct wpabuf * ikev2_responder_build(struct ikev2_responder_data *data); 58 | 59 | #endif /* IKEV2_H */ 60 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/autoscan.h: -------------------------------------------------------------------------------- 1 | /* 2 | * WPA Supplicant - auto scan 3 | * Copyright (c) 2012, Intel Corporation. All rights reserved. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef AUTOSCAN_H 10 | #define AUTOSCAN_H 11 | 12 | struct wpa_supplicant; 13 | 14 | struct autoscan_ops { 15 | const char *name; 16 | 17 | void * (*init)(struct wpa_supplicant *wpa_s, const char *params); 18 | void (*deinit)(void *priv); 19 | 20 | int (*notify_scan)(void *priv, struct wpa_scan_results *scan_res); 21 | }; 22 | 23 | #ifdef CONFIG_AUTOSCAN 24 | 25 | int autoscan_init(struct wpa_supplicant *wpa_s, int req_scan); 26 | void autoscan_deinit(struct wpa_supplicant *wpa_s); 27 | int autoscan_notify_scan(struct wpa_supplicant *wpa_s, 28 | struct wpa_scan_results *scan_res); 29 | 30 | /* Available autoscan modules */ 31 | 32 | #ifdef CONFIG_AUTOSCAN_EXPONENTIAL 33 | extern const struct autoscan_ops autoscan_exponential_ops; 34 | #endif /* CONFIG_AUTOSCAN_EXPONENTIAL */ 35 | 36 | #ifdef CONFIG_AUTOSCAN_PERIODIC 37 | extern const struct autoscan_ops autoscan_periodic_ops; 38 | #endif /* CONFIG_AUTOSCAN_PERIODIC */ 39 | 40 | #else /* CONFIG_AUTOSCAN */ 41 | 42 | static inline int autoscan_init(struct wpa_supplicant *wpa_s, int req_scan) 43 | { 44 | return 0; 45 | } 46 | 47 | static inline void autoscan_deinit(struct wpa_supplicant *wpa_s) 48 | { 49 | } 50 | 51 | static inline int autoscan_notify_scan(struct wpa_supplicant *wpa_s, 52 | struct wpa_scan_results *scan_res) 53 | { 54 | return 0; 55 | } 56 | 57 | #endif /* CONFIG_AUTOSCAN */ 58 | 59 | #endif /* AUTOSCAN_H */ 60 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/eap_peer/eap_fast_pac.h: -------------------------------------------------------------------------------- 1 | /* 2 | * EAP peer method: EAP-FAST PAC file processing 3 | * Copyright (c) 2004-2007, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef EAP_FAST_PAC_H 10 | #define EAP_FAST_PAC_H 11 | 12 | #include "eap_common/eap_fast_common.h" 13 | 14 | struct eap_fast_pac { 15 | struct eap_fast_pac *next; 16 | 17 | u8 pac_key[EAP_FAST_PAC_KEY_LEN]; 18 | u8 *pac_opaque; 19 | size_t pac_opaque_len; 20 | u8 *pac_info; 21 | size_t pac_info_len; 22 | u8 *a_id; 23 | size_t a_id_len; 24 | u8 *i_id; 25 | size_t i_id_len; 26 | u8 *a_id_info; 27 | size_t a_id_info_len; 28 | u16 pac_type; 29 | }; 30 | 31 | 32 | void eap_fast_free_pac(struct eap_fast_pac *pac); 33 | struct eap_fast_pac * eap_fast_get_pac(struct eap_fast_pac *pac_root, 34 | const u8 *a_id, size_t a_id_len, 35 | u16 pac_type); 36 | int eap_fast_add_pac(struct eap_fast_pac **pac_root, 37 | struct eap_fast_pac **pac_current, 38 | struct eap_fast_pac *entry); 39 | int eap_fast_load_pac(struct eap_sm *sm, struct eap_fast_pac **pac_root, 40 | const char *pac_file); 41 | int eap_fast_save_pac(struct eap_sm *sm, struct eap_fast_pac *pac_root, 42 | const char *pac_file); 43 | size_t eap_fast_pac_list_truncate(struct eap_fast_pac *pac_root, 44 | size_t max_len); 45 | int eap_fast_load_pac_bin(struct eap_sm *sm, struct eap_fast_pac **pac_root, 46 | const char *pac_file); 47 | int eap_fast_save_pac_bin(struct eap_sm *sm, struct eap_fast_pac *pac_root, 48 | const char *pac_file); 49 | 50 | #endif /* EAP_FAST_PAC_H */ 51 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/eap_peer/eap_teap_pac.h: -------------------------------------------------------------------------------- 1 | /* 2 | * EAP peer method: EAP-TEAP PAC file processing 3 | * Copyright (c) 2004-2019, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef EAP_TEAP_PAC_H 10 | #define EAP_TEAP_PAC_H 11 | 12 | #include "eap_common/eap_teap_common.h" 13 | 14 | struct eap_teap_pac { 15 | struct eap_teap_pac *next; 16 | 17 | u8 pac_key[EAP_TEAP_PAC_KEY_LEN]; 18 | u8 *pac_opaque; 19 | size_t pac_opaque_len; 20 | u8 *pac_info; 21 | size_t pac_info_len; 22 | u8 *a_id; 23 | size_t a_id_len; 24 | u8 *i_id; 25 | size_t i_id_len; 26 | u8 *a_id_info; 27 | size_t a_id_info_len; 28 | u16 pac_type; 29 | }; 30 | 31 | 32 | void eap_teap_free_pac(struct eap_teap_pac *pac); 33 | struct eap_teap_pac * eap_teap_get_pac(struct eap_teap_pac *pac_root, 34 | const u8 *a_id, size_t a_id_len, 35 | u16 pac_type); 36 | int eap_teap_add_pac(struct eap_teap_pac **pac_root, 37 | struct eap_teap_pac **pac_current, 38 | struct eap_teap_pac *entry); 39 | int eap_teap_load_pac(struct eap_sm *sm, struct eap_teap_pac **pac_root, 40 | const char *pac_file); 41 | int eap_teap_save_pac(struct eap_sm *sm, struct eap_teap_pac *pac_root, 42 | const char *pac_file); 43 | size_t eap_teap_pac_list_truncate(struct eap_teap_pac *pac_root, 44 | size_t max_len); 45 | int eap_teap_load_pac_bin(struct eap_sm *sm, struct eap_teap_pac **pac_root, 46 | const char *pac_file); 47 | int eap_teap_save_pac_bin(struct eap_sm *sm, struct eap_teap_pac *pac_root, 48 | const char *pac_file); 49 | 50 | #endif /* EAP_TEAP_PAC_H */ 51 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/mesh_rsn.h: -------------------------------------------------------------------------------- 1 | /* 2 | * WPA Supplicant - Mesh RSN routines 3 | * Copyright (c) 2013-2014, cozybit, Inc. All rights reserved. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef MESH_RSN_H 10 | #define MESH_RSN_H 11 | 12 | struct mesh_rsn { 13 | struct wpa_supplicant *wpa_s; 14 | struct wpa_authenticator *auth; 15 | unsigned int pairwise_cipher; 16 | unsigned int group_cipher; 17 | u8 mgtk[WPA_TK_MAX_LEN]; 18 | size_t mgtk_len; 19 | u8 mgtk_key_id; 20 | unsigned int mgmt_group_cipher; 21 | u8 igtk_key_id; 22 | u8 igtk[WPA_TK_MAX_LEN]; 23 | size_t igtk_len; 24 | #ifdef CONFIG_SAE 25 | struct wpabuf *sae_token; 26 | int sae_group_index; 27 | #endif /* CONFIG_SAE */ 28 | }; 29 | 30 | struct mesh_rsn * mesh_rsn_auth_init(struct wpa_supplicant *wpa_s, 31 | struct mesh_conf *conf); 32 | int mesh_rsn_auth_sae_sta(struct wpa_supplicant *wpa_s, struct sta_info *sta); 33 | int mesh_rsn_derive_mtk(struct wpa_supplicant *wpa_s, struct sta_info *sta); 34 | void mesh_rsn_get_pmkid(struct mesh_rsn *rsn, struct sta_info *sta, u8 *pmkid); 35 | void mesh_rsn_init_ampe_sta(struct wpa_supplicant *wpa_s, 36 | struct sta_info *sta); 37 | int mesh_rsn_protect_frame(struct mesh_rsn *rsn, struct sta_info *sta, 38 | const u8 *cat, struct wpabuf *buf); 39 | int mesh_rsn_process_ampe(struct wpa_supplicant *wpa_s, struct sta_info *sta, 40 | struct ieee802_11_elems *elems, const u8 *cat, 41 | const u8 *chosen_pmk, 42 | const u8 *start, size_t elems_len); 43 | void mesh_auth_timer(void *eloop_ctx, void *user_data); 44 | 45 | #endif /* MESH_RSN_H */ 46 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/common/gas_server.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generic advertisement service (GAS) server 3 | * Copyright (c) 2017, Qualcomm Atheros, Inc. 4 | * Copyright (c) 2020, The Linux Foundation 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #ifndef GAS_SERVER_H 11 | #define GAS_SERVER_H 12 | 13 | #ifdef CONFIG_GAS_SERVER 14 | 15 | struct gas_server; 16 | 17 | struct gas_server * gas_server_init(void *ctx, 18 | void (*tx)(void *ctx, int freq, 19 | const u8 *da, 20 | struct wpabuf *buf, 21 | unsigned int wait_time)); 22 | void gas_server_deinit(struct gas_server *gas); 23 | int gas_server_register(struct gas_server *gas, 24 | const u8 *adv_proto_id, u8 adv_proto_id_len, 25 | struct wpabuf * 26 | (*req_cb)(void *ctx, void *resp_ctx, const u8 *sa, 27 | const u8 *query, size_t query_len, 28 | u16 *comeback_delay), 29 | void (*status_cb)(void *ctx, struct wpabuf *resp, 30 | int ok), 31 | void *ctx); 32 | int gas_server_rx(struct gas_server *gas, const u8 *da, const u8 *sa, 33 | const u8 *bssid, u8 categ, const u8 *data, size_t len, 34 | int freq); 35 | void gas_server_tx_status(struct gas_server *gas, const u8 *dst, const u8 *data, 36 | size_t data_len, int ack); 37 | int gas_server_set_resp(struct gas_server *gas, void *resp_ctx, 38 | struct wpabuf *resp); 39 | bool gas_server_response_sent(struct gas_server *gas, void *resp_ctx); 40 | 41 | #else /* CONFIG_GAS_SERVER */ 42 | 43 | static inline void gas_server_deinit(struct gas_server *gas) 44 | { 45 | } 46 | 47 | #endif /* CONFIG_GAS_SERVER */ 48 | 49 | #endif /* GAS_SERVER_H */ 50 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/common/gas.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generic advertisement service (GAS) (IEEE 802.11u) 3 | * Copyright (c) 2009, Atheros Communications 4 | * Copyright (c) 2011-2012, Qualcomm Atheros 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #ifndef GAS_H 11 | #define GAS_H 12 | 13 | struct wpabuf * gas_build_initial_req(u8 dialog_token, size_t size); 14 | struct wpabuf * gas_build_comeback_req(u8 dialog_token); 15 | struct wpabuf * gas_build_initial_resp(u8 dialog_token, u16 status_code, 16 | u16 comeback_delay, size_t size); 17 | struct wpabuf * 18 | gas_build_comeback_resp(u8 dialog_token, u16 status_code, u8 frag_id, u8 more, 19 | u16 comeback_delay, size_t size); 20 | struct wpabuf * gas_anqp_build_initial_req(u8 dialog_token, size_t size); 21 | struct wpabuf * gas_anqp_build_initial_resp(u8 dialog_token, u16 status_code, 22 | u16 comeback_delay, size_t size); 23 | struct wpabuf * gas_anqp_build_initial_resp_buf(u8 dialog_token, 24 | u16 status_code, 25 | u16 comeback_delay, 26 | struct wpabuf *payload); 27 | struct wpabuf * gas_anqp_build_comeback_resp(u8 dialog_token, u16 status_code, 28 | u8 frag_id, u8 more, 29 | u16 comeback_delay, size_t size); 30 | struct wpabuf * gas_anqp_build_comeback_resp_buf(u8 dialog_token, 31 | u16 status_code, 32 | u8 frag_id, u8 more, 33 | u16 comeback_delay, 34 | struct wpabuf *payload); 35 | void gas_anqp_set_len(struct wpabuf *buf); 36 | 37 | u8 * gas_anqp_add_element(struct wpabuf *buf, u16 info_id); 38 | void gas_anqp_set_element_len(struct wpabuf *buf, u8 *len_pos); 39 | 40 | #endif /* GAS_H */ 41 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/mesh_mpm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * WPA Supplicant - Basic mesh peer management 3 | * Copyright (c) 2013-2014, cozybit, Inc. All rights reserved. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef MESH_MPM_H 10 | #define MESH_MPM_H 11 | 12 | /* notify MPM of new mesh peer to be inserted in MPM and driver */ 13 | void wpa_mesh_new_mesh_peer(struct wpa_supplicant *wpa_s, const u8 *addr, 14 | struct ieee802_11_elems *elems); 15 | void mesh_mpm_deinit(struct wpa_supplicant *wpa_s, struct hostapd_iface *ifmsh); 16 | void mesh_mpm_auth_peer(struct wpa_supplicant *wpa_s, const u8 *addr); 17 | void mesh_mpm_free_sta(struct hostapd_data *hapd, struct sta_info *sta); 18 | void wpa_mesh_set_plink_state(struct wpa_supplicant *wpa_s, 19 | struct sta_info *sta, 20 | enum mesh_plink_state state); 21 | int mesh_mpm_close_peer(struct wpa_supplicant *wpa_s, const u8 *addr); 22 | int mesh_mpm_connect_peer(struct wpa_supplicant *wpa_s, const u8 *addr, 23 | int duration); 24 | 25 | #ifdef CONFIG_MESH 26 | 27 | void mesh_mpm_action_rx(struct wpa_supplicant *wpa_s, 28 | const struct ieee80211_mgmt *mgmt, size_t len); 29 | void mesh_mpm_mgmt_rx(struct wpa_supplicant *wpa_s, struct rx_mgmt *rx_mgmt); 30 | 31 | #else /* CONFIG_MESH */ 32 | 33 | static inline void mesh_mpm_action_rx(struct wpa_supplicant *wpa_s, 34 | const struct ieee80211_mgmt *mgmt, 35 | size_t len) 36 | { 37 | } 38 | 39 | static inline void mesh_mpm_mgmt_rx(struct wpa_supplicant *wpa_s, 40 | struct rx_mgmt *rx_mgmt) 41 | { 42 | } 43 | 44 | #endif /* CONFIG_MESH */ 45 | 46 | #endif /* MESH_MPM_H */ 47 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/mesh.h: -------------------------------------------------------------------------------- 1 | /* 2 | * WPA Supplicant - Basic mesh mode routines 3 | * Copyright (c) 2013-2014, cozybit, Inc. All rights reserved. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef MESH_H 10 | #define MESH_H 11 | 12 | int wpa_supplicant_join_mesh(struct wpa_supplicant *wpa_s, 13 | struct wpa_ssid *ssid); 14 | int wpa_supplicant_leave_mesh(struct wpa_supplicant *wpa_s, 15 | bool need_deinit); 16 | void wpa_supplicant_mesh_iface_deinit(struct wpa_supplicant *wpa_s, 17 | struct hostapd_iface *ifmsh, 18 | bool also_clear_hostapd); 19 | int wpas_mesh_scan_result_text(const u8 *ies, size_t ies_len, char *buf, 20 | char *end); 21 | int wpas_mesh_add_interface(struct wpa_supplicant *wpa_s, char *ifname, 22 | size_t len); 23 | int wpas_mesh_peer_remove(struct wpa_supplicant *wpa_s, const u8 *addr); 24 | int wpas_mesh_peer_add(struct wpa_supplicant *wpa_s, const u8 *addr, 25 | int duration); 26 | 27 | #ifdef CONFIG_MESH 28 | 29 | void wpa_mesh_notify_peer(struct wpa_supplicant *wpa_s, const u8 *addr, 30 | const u8 *ies, size_t ie_len); 31 | void wpa_supplicant_mesh_add_scan_ie(struct wpa_supplicant *wpa_s, 32 | struct wpabuf **extra_ie); 33 | 34 | #else /* CONFIG_MESH */ 35 | 36 | static inline void wpa_mesh_notify_peer(struct wpa_supplicant *wpa_s, 37 | const u8 *addr, 38 | const u8 *ies, size_t ie_len) 39 | { 40 | } 41 | 42 | static inline void wpa_supplicant_mesh_add_scan_ie(struct wpa_supplicant *wpa_s, 43 | struct wpabuf **extra_ie) 44 | { 45 | } 46 | 47 | #endif /* CONFIG_MESH */ 48 | 49 | #endif /* MESH_H */ 50 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/eap_server/ikev2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * IKEv2 initiator (RFC 4306) for EAP-IKEV2 3 | * Copyright (c) 2007, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef IKEV2_H 10 | #define IKEV2_H 11 | 12 | #include "eap_common/ikev2_common.h" 13 | 14 | struct ikev2_proposal_data { 15 | u8 proposal_num; 16 | int integ; 17 | int prf; 18 | int encr; 19 | int dh; 20 | }; 21 | 22 | 23 | struct ikev2_initiator_data { 24 | enum { SA_INIT, SA_AUTH, CHILD_SA, IKEV2_DONE } state; 25 | u8 i_spi[IKEV2_SPI_LEN]; 26 | u8 r_spi[IKEV2_SPI_LEN]; 27 | u8 i_nonce[IKEV2_NONCE_MAX_LEN]; 28 | size_t i_nonce_len; 29 | u8 r_nonce[IKEV2_NONCE_MAX_LEN]; 30 | size_t r_nonce_len; 31 | struct wpabuf *r_dh_public; 32 | struct wpabuf *i_dh_private; 33 | struct ikev2_proposal_data proposal; 34 | const struct dh_group *dh; 35 | struct ikev2_keys keys; 36 | u8 *IDi; 37 | size_t IDi_len; 38 | u8 *IDr; 39 | size_t IDr_len; 40 | u8 IDr_type; 41 | struct wpabuf *r_sign_msg; 42 | struct wpabuf *i_sign_msg; 43 | u8 *shared_secret; 44 | size_t shared_secret_len; 45 | enum { PEER_AUTH_CERT, PEER_AUTH_SECRET } peer_auth; 46 | u8 *key_pad; 47 | size_t key_pad_len; 48 | 49 | const u8 * (*get_shared_secret)(void *ctx, const u8 *IDr, 50 | size_t IDr_len, size_t *secret_len); 51 | void *cb_ctx; 52 | int unknown_user; 53 | }; 54 | 55 | 56 | void ikev2_initiator_deinit(struct ikev2_initiator_data *data); 57 | int ikev2_initiator_process(struct ikev2_initiator_data *data, 58 | const struct wpabuf *buf); 59 | struct wpabuf * ikev2_initiator_build(struct ikev2_initiator_data *data); 60 | 61 | #endif /* IKEV2_H */ 62 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/eap_peer/eap_proxy.h: -------------------------------------------------------------------------------- 1 | /* 2 | * EAP proxy definitions 3 | * Copyright (c) 2011-2013 Qualcomm Atheros, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef EAP_PROXY_H 10 | #define EAP_PROXY_H 11 | 12 | struct eap_proxy_sm; 13 | struct eapol_callbacks; 14 | struct eap_sm; 15 | struct eap_peer_config; 16 | 17 | enum eap_proxy_status { 18 | EAP_PROXY_FAILURE = 0x00, 19 | EAP_PROXY_SUCCESS 20 | }; 21 | 22 | struct eap_proxy_sm * 23 | eap_proxy_init(void *eapol_ctx, const struct eapol_callbacks *eapol_cb, 24 | void *msg_ctx); 25 | 26 | void eap_proxy_deinit(struct eap_proxy_sm *eap_proxy); 27 | 28 | int eap_proxy_key_available(struct eap_proxy_sm *sm); 29 | 30 | const u8 * eap_proxy_get_eapKeyData(struct eap_proxy_sm *sm, size_t *len); 31 | 32 | struct wpabuf * eap_proxy_get_eapRespData(struct eap_proxy_sm *sm); 33 | 34 | int eap_proxy_sm_step(struct eap_proxy_sm *sm, struct eap_sm *eap_sm); 35 | 36 | enum eap_proxy_status 37 | eap_proxy_packet_update(struct eap_proxy_sm *eap_proxy, u8 *eapReqData, 38 | int eapReqDataLen); 39 | 40 | int eap_proxy_sm_get_status(struct eap_proxy_sm *sm, char *buf, size_t buflen, 41 | int verbose); 42 | 43 | int eap_proxy_get_imsi(struct eap_proxy_sm *eap_proxy, int sim_num, 44 | char *imsi_buf, size_t *imsi_len); 45 | 46 | int eap_proxy_notify_config(struct eap_proxy_sm *sm, 47 | struct eap_peer_config *config); 48 | 49 | u8 * eap_proxy_get_eap_session_id(struct eap_proxy_sm *sm, size_t *len); 50 | 51 | u8 * eap_proxy_get_emsk(struct eap_proxy_sm *sm, size_t *len); 52 | 53 | void eap_proxy_sm_abort(struct eap_proxy_sm *sm); 54 | 55 | #endif /* EAP_PROXY_H */ 56 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/gas_query.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generic advertisement service (GAS) query 3 | * Copyright (c) 2009, Atheros Communications 4 | * Copyright (c) 2011, Qualcomm Atheros 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #ifndef GAS_QUERY_H 11 | #define GAS_QUERY_H 12 | 13 | struct gas_query; 14 | 15 | #ifdef CONFIG_GAS 16 | 17 | struct gas_query * gas_query_init(struct wpa_supplicant *wpa_s); 18 | void gas_query_deinit(struct gas_query *gas); 19 | int gas_query_rx(struct gas_query *gas, const u8 *da, const u8 *sa, 20 | const u8 *bssid, u8 categ, const u8 *data, size_t len, 21 | int freq); 22 | 23 | /** 24 | * enum gas_query_result - GAS query result 25 | */ 26 | enum gas_query_result { 27 | GAS_QUERY_SUCCESS, 28 | GAS_QUERY_FAILURE, 29 | GAS_QUERY_TIMEOUT, 30 | GAS_QUERY_PEER_ERROR, 31 | GAS_QUERY_INTERNAL_ERROR, 32 | GAS_QUERY_STOPPED, 33 | GAS_QUERY_DELETED_AT_DEINIT 34 | }; 35 | 36 | int gas_query_req(struct gas_query *gas, const u8 *dst, int freq, 37 | int wildcard_bssid, int maintain_addr, struct wpabuf *req, 38 | void (*cb)(void *ctx, const u8 *dst, u8 dialog_token, 39 | enum gas_query_result result, 40 | const struct wpabuf *adv_proto, 41 | const struct wpabuf *resp, u16 status_code), 42 | void *ctx); 43 | int gas_query_stop(struct gas_query *gas, u8 dialog_token); 44 | 45 | #else /* CONFIG_GAS */ 46 | 47 | static inline struct gas_query * gas_query_init(struct wpa_supplicant *wpa_s) 48 | { 49 | return (void *) 1; 50 | } 51 | 52 | static inline void gas_query_deinit(struct gas_query *gas) 53 | { 54 | } 55 | 56 | #endif /* CONFIG_GAS */ 57 | 58 | 59 | #endif /* GAS_QUERY_H */ 60 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/crypto/fips_prf_internal.c: -------------------------------------------------------------------------------- 1 | /* 2 | * FIPS 186-2 PRF for internal crypto implementation 3 | * Copyright (c) 2006-2007, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include "includes.h" 10 | 11 | #include "common.h" 12 | #include "sha1.h" 13 | #include "sha1_i.h" 14 | #include "crypto.h" 15 | 16 | 17 | int fips186_2_prf(const u8 *seed, size_t seed_len, u8 *x, size_t xlen) 18 | { 19 | u8 xkey[64]; 20 | u32 t[5], _t[5]; 21 | int i, j, m, k; 22 | u8 *xpos = x; 23 | u32 carry; 24 | 25 | if (seed_len < sizeof(xkey)) 26 | os_memset(xkey + seed_len, 0, sizeof(xkey) - seed_len); 27 | else 28 | seed_len = sizeof(xkey); 29 | 30 | /* FIPS 186-2 + change notice 1 */ 31 | 32 | os_memcpy(xkey, seed, seed_len); 33 | t[0] = 0x67452301; 34 | t[1] = 0xEFCDAB89; 35 | t[2] = 0x98BADCFE; 36 | t[3] = 0x10325476; 37 | t[4] = 0xC3D2E1F0; 38 | 39 | m = xlen / 40; 40 | for (j = 0; j < m; j++) { 41 | /* XSEED_j = 0 */ 42 | for (i = 0; i < 2; i++) { 43 | /* XVAL = (XKEY + XSEED_j) mod 2^b */ 44 | 45 | /* w_i = G(t, XVAL) */ 46 | os_memcpy(_t, t, 20); 47 | SHA1Transform(_t, xkey); 48 | _t[0] = host_to_be32(_t[0]); 49 | _t[1] = host_to_be32(_t[1]); 50 | _t[2] = host_to_be32(_t[2]); 51 | _t[3] = host_to_be32(_t[3]); 52 | _t[4] = host_to_be32(_t[4]); 53 | os_memcpy(xpos, _t, 20); 54 | 55 | /* XKEY = (1 + XKEY + w_i) mod 2^b */ 56 | carry = 1; 57 | for (k = 19; k >= 0; k--) { 58 | carry += xkey[k] + xpos[k]; 59 | xkey[k] = carry & 0xff; 60 | carry >>= 8; 61 | } 62 | 63 | xpos += SHA1_MAC_LEN; 64 | } 65 | /* x_j = w_0|w_1 */ 66 | } 67 | 68 | return 0; 69 | } 70 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/wpa_gui-qt4/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_gui - Application startup 3 | * Copyright (c) 2005-2006, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifdef CONFIG_NATIVE_WINDOWS 10 | #include 11 | #endif /* CONFIG_NATIVE_WINDOWS */ 12 | #include 13 | #include 14 | #include 15 | #include "wpagui.h" 16 | 17 | WpaGuiApp::WpaGuiApp(int &argc, char **argv) : 18 | QApplication(argc, argv), 19 | argc(argc), 20 | argv(argv) 21 | { 22 | w = NULL; 23 | } 24 | 25 | #if !defined(QT_NO_SESSIONMANAGER) && QT_VERSION < 0x050000 26 | void WpaGuiApp::saveState(QSessionManager &manager) 27 | { 28 | QApplication::saveState(manager); 29 | w->saveState(); 30 | } 31 | #endif 32 | 33 | 34 | int main(int argc, char *argv[]) 35 | { 36 | WpaGuiApp app(argc, argv); 37 | QTranslator translator; 38 | QString locale; 39 | QString resourceDir; 40 | int ret; 41 | 42 | locale = QLocale::system().name(); 43 | resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath); 44 | if (!translator.load("wpa_gui_" + locale, resourceDir)) 45 | translator.load("wpa_gui_" + locale, "lang"); 46 | app.installTranslator(&translator); 47 | 48 | WpaGui w(&app); 49 | 50 | #ifdef CONFIG_NATIVE_WINDOWS 51 | WSADATA wsaData; 52 | if (WSAStartup(MAKEWORD(2, 0), &wsaData)) { 53 | /* printf("Could not find a usable WinSock.dll\n"); */ 54 | return -1; 55 | } 56 | #endif /* CONFIG_NATIVE_WINDOWS */ 57 | 58 | app.w = &w; 59 | 60 | ret = app.exec(); 61 | 62 | #ifdef CONFIG_NATIVE_WINDOWS 63 | WSACleanup(); 64 | #endif /* CONFIG_NATIVE_WINDOWS */ 65 | 66 | return ret; 67 | } 68 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/src/pae/ieee802_1x_cp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * IEEE Std 802.1X-2010 Controlled Port of PAE state machine - CP state machine 3 | * Copyright (c) 2013, Qualcomm Atheros, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef IEEE802_1X_CP_H 10 | #define IEEE802_1X_CP_H 11 | 12 | #include "common/defs.h" 13 | #include "common/ieee802_1x_defs.h" 14 | 15 | struct ieee802_1x_cp_sm; 16 | struct ieee802_1x_kay; 17 | struct ieee802_1x_mka_ki; 18 | 19 | struct ieee802_1x_cp_sm * ieee802_1x_cp_sm_init(struct ieee802_1x_kay *kay); 20 | void ieee802_1x_cp_sm_deinit(struct ieee802_1x_cp_sm *sm); 21 | void ieee802_1x_cp_sm_step(void *cp_ctx); 22 | void ieee802_1x_cp_connect_pending(void *cp_ctx); 23 | void ieee802_1x_cp_connect_unauthenticated(void *cp_ctx); 24 | void ieee802_1x_cp_connect_authenticated(void *cp_ctx); 25 | void ieee802_1x_cp_connect_secure(void *cp_ctx); 26 | void ieee802_1x_cp_signal_chgdserver(void *cp_ctx); 27 | void ieee802_1x_cp_set_electedself(void *cp_ctx, bool status); 28 | void ieee802_1x_cp_set_ciphersuite(void *cp_ctx, u64 cs); 29 | void ieee802_1x_cp_set_offset(void *cp_ctx, enum confidentiality_offset offset); 30 | void ieee802_1x_cp_signal_newsak(void *cp_ctx); 31 | void ieee802_1x_cp_set_distributedki(void *cp_ctx, 32 | const struct ieee802_1x_mka_ki *dki); 33 | void ieee802_1x_cp_set_distributedan(void *cp_ctx, u8 an); 34 | void ieee802_1x_cp_set_usingreceivesas(void *cp_ctx, bool status); 35 | void ieee802_1x_cp_set_allreceiving(void *cp_ctx, bool status); 36 | void ieee802_1x_cp_set_servertransmitting(void *cp_ctx, bool status); 37 | void ieee802_1x_cp_set_usingtransmitas(void *cp_ctx, bool status); 38 | 39 | #endif /* IEEE802_1X_CP_H */ 40 | -------------------------------------------------------------------------------- /wpa_supplicant-2.10/wpa_supplicant/utils/log2pcap.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # Copyright (c) 2012, Intel Corporation 4 | # 5 | # Author: Johannes Berg 6 | # 7 | # This software may be distributed under the terms of the BSD license. 8 | # See README for more details. 9 | 10 | import sys, struct, re 11 | 12 | def write_pcap_header(pcap_file): 13 | pcap_file.write( 14 | struct.pack(' " % sys.argv[0]) 32 | sys.exit(2) 33 | 34 | input_file = open(input, 'r') 35 | pcap_file = open(pcap, 'w') 36 | frame_re = re.compile(r'(([0-9]+.[0-9]{6}):\s*)?nl80211: MLME event frame - hexdump\(len=[0-9]*\):((\s*[0-9a-fA-F]{2})*)') 37 | 38 | write_pcap_header(pcap_file) 39 | 40 | for line in input_file: 41 | m = frame_re.match(line) 42 | if m is None: 43 | continue 44 | if m.group(2): 45 | ts = float(m.group(2)) 46 | else: 47 | ts = 0 48 | hexdata = m.group(3) 49 | hexdata = hexdata.split() 50 | data = ''.join([chr(int(x, 16)) for x in hexdata]) 51 | pcap_addpacket(pcap_file, ts, data) 52 | 53 | input_file.close() 54 | pcap_file.close() 55 | --------------------------------------------------------------------------------