aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/auth.h
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-12-23 18:07:49 +0100
committerHarald Welte <laforge@gnumonks.org>2010-12-23 18:09:51 +0100
commit86dda0876289bf1c93642f0e9fb53b63992a1c82 (patch)
treed9aae945f831d29e2bc1b410096b07c46b7deee1 /openbsc/include/openbsc/auth.h
parent2862dcac586972725155526f03f5e6b01cd36645 (diff)
Authentication: use ENUM instead of magic numbers
This improves readability of the code...
Diffstat (limited to 'openbsc/include/openbsc/auth.h')
-rw-r--r--openbsc/include/openbsc/auth.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/auth.h b/openbsc/include/openbsc/auth.h
index 0e5cad630..2364fb3d2 100644
--- a/openbsc/include/openbsc/auth.h
+++ b/openbsc/include/openbsc/auth.h
@@ -4,6 +4,13 @@
struct gsm_auth_tuple;
struct gsm_subscriber;
+enum auth_action {
+ AUTH_NOT_AVAIL = 0, /* No auth tuple available */
+ AUTH_DO_AUTH_THAN_CIPH = 1, /* Firsth authenticate, then cipher */
+ AUTH_DO_CIPH = 2, /* Only ciphering */
+ AUTH_DO_AUTH = 3, /* Only authentication, no ciphering */
+};
+
int auth_get_tuple_for_subscr(struct gsm_auth_tuple *atuple,
struct gsm_subscriber *subscr, int key_seq);