blob: b314bbf1960cbdf6ef81b195f23aae98484a17ea [file] [log] [blame]
Sylvain Munautd04b9ed2010-06-14 20:52:04 +02001#ifndef _AUTH_H
2#define _AUTH_H
3
Neels Hofmeyr37984bd2016-03-30 11:22:24 +02004#include <osmocom/core/utils.h>
5
Sylvain Munautd04b9ed2010-06-14 20:52:04 +02006struct gsm_auth_tuple;
Sylvain Munautd04b9ed2010-06-14 20:52:04 +02007
Harald Welte86dda082010-12-23 18:07:49 +01008enum auth_action {
Neels Hofmeyrf9b212f2016-03-30 11:22:27 +02009 AUTH_ERROR = -1, /* Internal error */
Harald Welte86dda082010-12-23 18:07:49 +010010 AUTH_NOT_AVAIL = 0, /* No auth tuple available */
Neels Hofmeyrd2fa7a52016-03-10 23:30:37 +010011 AUTH_DO_AUTH_THEN_CIPH = 1, /* Firsth authenticate, then cipher */
Harald Welte86dda082010-12-23 18:07:49 +010012 AUTH_DO_CIPH = 2, /* Only ciphering */
13 AUTH_DO_AUTH = 3, /* Only authentication, no ciphering */
14};
15
Neels Hofmeyr37984bd2016-03-30 11:22:24 +020016extern const struct value_string auth_action_names[];
17static inline const char *auth_action_str(enum auth_action a)
18{
19 return get_value_string(auth_action_names, a);
20}
21
Sylvain Munautd04b9ed2010-06-14 20:52:04 +020022#endif /* _AUTH_H */