2 * Copyright (C) 2008 Martin Willi
4 * Copyright (C) secunet Security Networks AG
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 * @defgroup eap_sim_file_triplets eap_sim_file_triplets
19 * @{ @ingroup eap_sim_file
22 #ifndef EAP_SIM_FILE_TRIPLETS_H_
23 #define EAP_SIM_FILE_TRIPLETS_H_
25 #include <collections/enumerator.h>
27 typedef struct eap_sim_file_triplets_t eap_sim_file_triplets_t
;
30 * Reads triplets from a triplets.dat file.
32 * The file is in freeradius triplet file syntax:
33 * http://www.freeradius.org/radiusd/doc/rlm_sim_triplets
35 struct eap_sim_file_triplets_t
{
38 * Create an enumerator over the file's triplets.
40 * @return enumerator over (identity, rand, sres, kc)
42 enumerator_t
* (*create_enumerator
)(eap_sim_file_triplets_t
*this);
45 * Destroy a eap_sim_file_triplets_t.
47 void (*destroy
)(eap_sim_file_triplets_t
*this);
51 * Create a eap_sim_file_triplets instance.
53 * @param file triplet file to read from
55 eap_sim_file_triplets_t
*eap_sim_file_triplets_create(char *file
);
57 #endif /** EAP_SIM_FILE_TRIPLETS_H_ @}*/