blob: cc5dcb05c75a1759113eb48375a84d8bf3654de4 [file] [log] [blame]
Oliver Smithd3c75912021-07-09 16:37:16 +02001/*
2 * Copyright (C) 2021 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de>
3 * Author: Oliver Smith
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU Affero General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#pragma once
20
21#include <osmocom/core/linuxlist.h>
22#include <osmocom/core/timer.h>
23#include <osmocom/gsm/protocol/gsm_23_003.h>
24
25#include <bts.h>
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31struct bts_pch_timer {
32 struct llist_head entry;
33 struct gprs_rlcmac_bts *bts;
34 struct osmo_timer_list T3113;
Pau Espin Pedrol13961c92021-11-08 17:38:47 +010035 uint32_t ptmsi; /* GSM_RESERVED_TMSI if not available */
Oliver Smithd3c75912021-07-09 16:37:16 +020036 char imsi[OSMO_IMSI_BUF_SIZE];
37};
38
Pau Espin Pedrol13961c92021-11-08 17:38:47 +010039struct GprsMs;
40
41void bts_pch_timer_start(struct gprs_rlcmac_bts *bts, const struct osmo_mobile_identity *mi_paging,
42 const char *imsi);
43void bts_pch_timer_stop(struct gprs_rlcmac_bts *bts, const struct GprsMs *ms);
Oliver Smith3f794702021-08-23 14:19:21 +020044void bts_pch_timer_stop_all(struct gprs_rlcmac_bts *bts);
Pau Espin Pedrolef8a7302021-11-08 19:19:25 +010045struct bts_pch_timer *bts_pch_timer_get_by_imsi(struct gprs_rlcmac_bts *bts, const char *imsi);
Oliver Smithd3c75912021-07-09 16:37:16 +020046
47#ifdef __cplusplus
48}
49#endif