diff --git a/Makefile.am b/Makefile.am index 1d572db5..8c69d9f4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -202,7 +202,7 @@ src_iwd_SOURCES = src/main.c linux/nl80211.h src/iwd.h src/missing.h \ src/agent.h src/agent.c \ src/storage.h src/storage.c \ src/network.h src/network.c \ - src/wsc.c \ + src/wsc.h src/wsc.c \ src/backtrace.h src/backtrace.c \ src/knownnetworks.h \ src/knownnetworks.c \ diff --git a/src/wsc.c b/src/wsc.c index 4e0e8e19..eb8489f3 100644 --- a/src/wsc.c +++ b/src/wsc.c @@ -45,6 +45,7 @@ #include "src/storage.h" #include "src/iwd.h" #include "src/network.h" +#include "src/wsc.h" #define WALK_TIME 120 @@ -61,16 +62,7 @@ struct wsc { uint32_t scan_id; struct scan_bss *target; uint32_t station_state_watch; - struct { - char ssid[33]; - enum security security; - union { - uint8_t psk[32]; - char passphrase[64]; - }; - uint8_t addr[6]; - bool has_passphrase; - } creds[3]; + struct wsc_credentials_info creds[3]; uint32_t n_creds; struct l_settings *eap_settings; diff --git a/src/wsc.h b/src/wsc.h new file mode 100644 index 00000000..b0e6f24a --- /dev/null +++ b/src/wsc.h @@ -0,0 +1,32 @@ +/* + * + * Wireless daemon for Linux + * + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +struct wsc_credentials_info { + char ssid[33]; + enum security security; + union { + uint8_t psk[32]; + char passphrase[64]; + }; + uint8_t addr[6]; + bool has_passphrase; +};