Sylvain Munaut | d04b9ed | 2010-06-14 20:52:04 +0200 | [diff] [blame] | 1 | #ifndef _AUTH_H |
| 2 | #define _AUTH_H |
| 3 | |
Neels Hofmeyr | 37984bd | 2016-03-30 11:22:24 +0200 | [diff] [blame] | 4 | #include <osmocom/core/utils.h> |
| 5 | |
Sylvain Munaut | d04b9ed | 2010-06-14 20:52:04 +0200 | [diff] [blame] | 6 | struct gsm_auth_tuple; |
Sylvain Munaut | d04b9ed | 2010-06-14 20:52:04 +0200 | [diff] [blame] | 7 | |
Harald Welte | 86dda08 | 2010-12-23 18:07:49 +0100 | [diff] [blame] | 8 | enum auth_action { |
Neels Hofmeyr | f9b212f | 2016-03-30 11:22:27 +0200 | [diff] [blame] | 9 | AUTH_ERROR = -1, /* Internal error */ |
Harald Welte | 86dda08 | 2010-12-23 18:07:49 +0100 | [diff] [blame] | 10 | AUTH_NOT_AVAIL = 0, /* No auth tuple available */ |
Neels Hofmeyr | d2fa7a5 | 2016-03-10 23:30:37 +0100 | [diff] [blame] | 11 | AUTH_DO_AUTH_THEN_CIPH = 1, /* Firsth authenticate, then cipher */ |
Harald Welte | 86dda08 | 2010-12-23 18:07:49 +0100 | [diff] [blame] | 12 | AUTH_DO_CIPH = 2, /* Only ciphering */ |
| 13 | AUTH_DO_AUTH = 3, /* Only authentication, no ciphering */ |
| 14 | }; |
| 15 | |
Neels Hofmeyr | 37984bd | 2016-03-30 11:22:24 +0200 | [diff] [blame] | 16 | extern const struct value_string auth_action_names[]; |
| 17 | static inline const char *auth_action_str(enum auth_action a) |
| 18 | { |
| 19 | return get_value_string(auth_action_names, a); |
| 20 | } |
| 21 | |
Sylvain Munaut | d04b9ed | 2010-06-14 20:52:04 +0200 | [diff] [blame] | 22 | #endif /* _AUTH_H */ |