commit cbbc247aa2f7fb990cd3e9a767c52470c3ad811a
parent b715022ce61ad2ed2d8788a71f6dcfe65ec6ac5d
Author: Andrew Zaborowski <andrew.zaborowski@intel.com>
Date: Thu, 5 Dec 2019 04:22:40 +0100
wsc: Declare the credentials structure in wsc.h
Diffstat:
3 files changed, 35 insertions(+), 11 deletions(-)
diff --git 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
@@ -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
@@ -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;
+};