2 * Copyright (C) 2008 Martin Willi
3 * Hochschule fuer Technik Rapperswil
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 * @defgroup eap_sim_file_triplets eap_sim_file_triplets
20 * @{ @ingroup eap_sim_file
23 #ifndef EAP_SIM_FILE_TRIPLETS_H_
24 #define EAP_SIM_FILE_TRIPLETS_H_
26 #include <utils/enumerator.h>
27 #include <utils/identification.h>
44 typedef struct eap_sim_file_triplets_t eap_sim_file_triplets_t
;
47 * Reads triplets from a triplets.dat file.
49 * The file is in freeradius triplet file syntax:
50 * http://www.freeradius.org/radiusd/doc/rlm_sim_triplets
52 struct eap_sim_file_triplets_t
{
55 * Create an enumerator over the file's triplets.
57 * @return enumerator over (identity, rand, sres, kc)
59 enumerator_t
* (*create_enumerator
)(eap_sim_file_triplets_t
*this);
62 * Destroy a eap_sim_file_triplets_t.
64 void (*destroy
)(eap_sim_file_triplets_t
*this);
68 * Create a eap_sim_file_triplets instance.
70 * @param file triplet file to read from
72 eap_sim_file_triplets_t
*eap_sim_file_triplets_create(char *file
);
74 #endif /* EAP_SIM_FILE_TRIPLETS_ @}*/