blob: 1f2cb4969560d99b81f09005a35604f4e77814be [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
30struct osmo_fsm vlr_auth_fsm;
31
32struct osmo_fsm_inst *auth_fsm_start(struct vlr_subscr *vsub,
33 uint32_t log_level,
34 struct osmo_fsm_inst *parent,
35 uint32_t parent_term_event,
36 bool is_r99,
37 bool is_utran);
Sylvain Munautda9f37e2019-03-14 11:02:36 +010038
39bool auth_try_reuse_tuple(struct vlr_subscr *vsub, uint8_t key_seq);