eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

wsc.h (1906B)


      1 /*
      2  *
      3  *  Wireless daemon for Linux
      4  *
      5  *  Copyright (C) 2019  Intel Corporation. All rights reserved.
      6  *
      7  *  This library is free software; you can redistribute it and/or
      8  *  modify it under the terms of the GNU Lesser General Public
      9  *  License as published by the Free Software Foundation; either
     10  *  version 2.1 of the License, or (at your option) any later version.
     11  *
     12  *  This library is distributed in the hope that it will be useful,
     13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
     14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     15  *  Lesser General Public License for more details.
     16  *
     17  *  You should have received a copy of the GNU Lesser General Public
     18  *  License along with this library; if not, write to the Free Software
     19  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
     20  *
     21  */
     22 
     23 struct wsc_credentials_info {
     24 	char ssid[SSID_MAX_SIZE + 1];
     25 	enum security security;
     26 	union {
     27 		uint8_t psk[32];
     28 		char passphrase[64];
     29 	};
     30 	uint8_t addr[6];
     31 	bool has_passphrase;
     32 };
     33 
     34 struct wsc_enrollee;
     35 
     36 typedef void (*wsc_done_cb_t)(int err, struct wsc_credentials_info *creds,
     37 				unsigned int n_creds, void *user_data);
     38 
     39 struct wsc_enrollee *wsc_enrollee_new(struct netdev *netdev,
     40 					struct scan_bss *target,
     41 					const char *pin,
     42 					struct iovec *ies, unsigned int ies_num,
     43 					wsc_done_cb_t done_cb, void *user_data);
     44 void wsc_enrollee_cancel(struct wsc_enrollee *wsce, bool defer_cb);
     45 void wsc_enrollee_free(struct wsc_enrollee *wsce);
     46 
     47 struct wsc_dbus {
     48 	struct l_dbus_message *pending_connect;
     49 	struct l_dbus_message *pending_cancel;
     50 
     51 	const char *(*get_path)(struct wsc_dbus *wsc);
     52 	void (*connect)(struct wsc_dbus *wsc, const char *pin);
     53 	void (*cancel)(struct wsc_dbus *wsc);
     54 	void (*remove)(struct wsc_dbus *wsc);
     55 };
     56 
     57 bool wsc_dbus_add_interface(struct wsc_dbus *wsc);
     58 void wsc_dbus_remove_interface(struct wsc_dbus *wsc);