blob: 73ab53f3e84d9706ff45bfa937dea8765c4bd563 [file] [log] [blame]
Harald Welteb8b85a12016-06-17 00:06:42 +02001#pragma once
2
3#include <osmocom/core/utils.h>
4
5/* Parameters to VLR_AUTH_E_MS_AUTH_RESP */
6struct vlr_auth_resp_par {
7 bool is_r99;
8 bool is_utran;
9 const uint8_t *res;
10 unsigned int res_len;
11 const uint8_t *auts;
12};
13
Harald Welteb8b85a12016-06-17 00:06:42 +020014enum vlr_fsm_auth_event {
15 VLR_AUTH_E_START,
16 /* TS 23.018 OAS_VLR1(2): SendAuthInfo ACK from HLR */
17 VLR_AUTH_E_HLR_SAI_ACK,
18 /* TS 23.018 OAS_VLR1(2): SendAuthInfo NACK from HLR */
19 VLR_AUTH_E_HLR_SAI_NACK,
20 /* FIXME: merge with NACK? */
21 VLR_AUTH_E_HLR_SAI_ABORT,
22 /* Authentication Response from MS */
23 VLR_AUTH_E_MS_AUTH_RESP,
24 /* Authentication Failure from MS */
25 VLR_AUTH_E_MS_AUTH_FAIL,
26 /* Identity Response (IMSI) from MS */
27 VLR_AUTH_E_MS_ID_IMSI,
28};
29
Harald Welte61ec0292020-04-20 19:54:05 +020030extern struct osmo_fsm vlr_auth_fsm;
Harald Welteb8b85a12016-06-17 00:06:42 +020031
32struct osmo_fsm_inst *auth_fsm_start(struct vlr_subscr *vsub,
Harald Welteb8b85a12016-06-17 00:06:42 +020033 struct osmo_fsm_inst *parent,
34 uint32_t parent_term_event,
35 bool is_r99,
36 bool is_utran);
Sylvain Munautda9f37e2019-03-14 11:02:36 +010037
38bool auth_try_reuse_tuple(struct vlr_subscr *vsub, uint8_t key_seq);