2 * Copyright (C) 2008-2011 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
17 * @defgroup simaka_hooks simaka_hooks
18 * @{ @ingroup libsimaka
21 #ifndef SIMAKA_HOOKS_H_
22 #define SIMAKA_HOOKS_H_
24 typedef struct simaka_hooks_t simaka_hooks_t
;
26 #include "simaka_message.h"
29 * Additional hooks invoked during EAP-SIM/AKA message processing.
31 struct simaka_hooks_t
{
34 * SIM/AKA message parsing.
36 * As a SIM/AKA optionally contains encrypted attributes, the hook
37 * might get invoked twice, once before and once after decryption.
39 * @param message SIM/AKA message
40 * @param inbound TRUE for incoming messages, FALSE for outgoing
41 * @param decrypted TRUE if AT_ENCR_DATA has been decrypted
43 void (*message
)(simaka_hooks_t
*this, simaka_message_t
*message
,
44 bool inbound
, bool decrypted
);
47 * SIM/AKA encryption/authentication key hooks.
49 * @param k_encr derived SIM/AKA encryption key k_encr
50 * @param k_auth derived SIM/AKA authentication key k_auth
52 void (*keys
)(simaka_hooks_t
*this, chunk_t k_encr
, chunk_t k_auth
);
55 #endif /** SIMAKA_HOOKS_H_ @}*/