eiwd

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

erp.h (1787B)


      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 erp_state;
     24 struct erp_cache_entry;
     25 
     26 enum erp_result {
     27 	ERP_RESULT_SUCCESS,
     28 	ERP_RESULT_FAIL,
     29 };
     30 
     31 typedef void (*erp_tx_packet_func_t)(const uint8_t *erp_data, size_t len,
     32 					void *user_data);
     33 
     34 struct erp_state *erp_new(struct erp_cache_entry *cache,
     35 				erp_tx_packet_func_t tx_packet,
     36 				void *user_data);
     37 void erp_free(struct erp_state *erp);
     38 
     39 bool erp_start(struct erp_state *erp);
     40 int erp_rx_packet(struct erp_state *erp, const uint8_t *erp_data, size_t len);
     41 
     42 const void *erp_get_rmsk(struct erp_state *erp, size_t *rmsk_len);
     43 
     44 void erp_cache_add(const char *id, const void *session_id, size_t session_len,
     45 			const void *emsk, size_t emsk_len,
     46 			const uint8_t *ssid, size_t ssid_len);
     47 
     48 void erp_cache_remove(const char *id);
     49 
     50 struct erp_cache_entry *erp_cache_get(const char *ssid);
     51 void erp_cache_put(struct erp_cache_entry *cache);
     52 
     53 const char *erp_cache_entry_get_identity(struct erp_cache_entry *cache);