xref: /freebsd/contrib/wpa/src/pae/ieee802_1x_cp.h (revision 09a53ad8f1318c5daae6cfb19d97f4f6459f0013)
1 /*
2  * IEEE Std 802.1X-2010 Controlled Port of PAE state machine - CP state machine
3  * Copyright (c) 2013, Qualcomm Atheros, Inc.
4  *
5  * This software may be distributed under the terms of the BSD license.
6  * See README for more details.
7  */
8 
9 #ifndef IEEE802_1X_CP_H
10 #define IEEE802_1X_CP_H
11 
12 #include "common/defs.h"
13 #include "common/ieee802_1x_defs.h"
14 
15 struct ieee802_1x_cp_sm;
16 struct ieee802_1x_kay;
17 struct ieee802_1x_mka_ki;
18 
19 struct ieee802_1x_cp_conf {
20 	Boolean protect;
21 	Boolean replay_protect;
22 	enum validate_frames validate;
23 	u32 replay_window;
24 };
25 
26 
27 struct ieee802_1x_cp_sm *
28 ieee802_1x_cp_sm_init(struct ieee802_1x_kay *kay,
29 		      struct ieee802_1x_cp_conf *pcp_conf);
30 void ieee802_1x_cp_sm_deinit(struct ieee802_1x_cp_sm *sm);
31 void ieee802_1x_cp_sm_step(void *cp_ctx);
32 void ieee802_1x_cp_connect_pending(void *cp_ctx);
33 void ieee802_1x_cp_connect_unauthenticated(void *cp_ctx);
34 void ieee802_1x_cp_connect_authenticated(void *cp_ctx);
35 void ieee802_1x_cp_connect_secure(void *cp_ctx);
36 void ieee802_1x_cp_signal_chgdserver(void *cp_ctx);
37 void ieee802_1x_cp_set_electedself(void *cp_ctx, Boolean status);
38 void ieee802_1x_cp_set_authorizationdata(void *cp_ctx, u8 *pdata, int len);
39 void ieee802_1x_cp_set_ciphersuite(void *cp_ctx, void *pid);
40 void ieee802_1x_cp_set_offset(void *cp_ctx, enum confidentiality_offset offset);
41 void ieee802_1x_cp_signal_newsak(void *cp_ctx);
42 void ieee802_1x_cp_set_distributedki(void *cp_ctx,
43 				     const struct ieee802_1x_mka_ki *dki);
44 void ieee802_1x_cp_set_distributedan(void *cp_ctx, u8 an);
45 void ieee802_1x_cp_set_usingreceivesas(void *cp_ctx, Boolean status);
46 void ieee802_1x_cp_set_allreceiving(void *cp_ctx, Boolean status);
47 void ieee802_1x_cp_set_servertransmitting(void *cp_ctx, Boolean status);
48 void ieee802_1x_cp_set_usingtransmitas(void *cp_ctx, Boolean status);
49 
50 #endif /* IEEE802_1X_CP_H */
51