eiwd

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

pmksa.h (1824B)


      1 /*
      2  *
      3  *  Wireless daemon for Linux
      4  *
      5  *  Copyright (C) 2023  Cruise, LLC. 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 pmksa {
     24 	uint64_t expiration;
     25 	uint8_t spa[6];
     26 	uint8_t aa[6];
     27 	uint8_t ssid[32];
     28 	size_t ssid_len;
     29 	uint32_t akm;
     30 	uint8_t pmkid[16];
     31 	uint8_t pmk[64];
     32 	size_t pmk_len;
     33 };
     34 
     35 typedef void (*pmksa_cache_add_func_t)(const struct pmksa *pmksa);
     36 typedef void (*pmksa_cache_remove_func_t)(const struct pmksa *pmksa);
     37 typedef void (*pmksa_cache_flush_func_t)(void);
     38 
     39 struct pmksa **__pmksa_cache_get_all(uint32_t *out_n_entries);
     40 
     41 struct pmksa *pmksa_cache_get(const uint8_t spa[static 6],
     42 				const uint8_t aa[static 6],
     43 				const uint8_t *ssid, size_t ssid_len,
     44 				uint32_t akm);
     45 int pmksa_cache_put(struct pmksa *pmksa);
     46 int pmksa_cache_expire(uint64_t cutoff);
     47 int pmksa_cache_flush(void);
     48 int pmksa_cache_free(struct pmksa *pmksa);
     49 
     50 uint64_t pmksa_lifetime(void);
     51 void __pmksa_set_config(const struct l_settings *config);
     52 
     53 void __pmksa_set_driver_callbacks(pmksa_cache_add_func_t add,
     54 					pmksa_cache_remove_func_t remove,
     55 					pmksa_cache_flush_func_t flush);