Oliver Smith | d3c7591 | 2021-07-09 16:37:16 +0200 | [diff] [blame] | 1 | /* |
| 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 |
| 28 | extern "C" { |
| 29 | #endif |
| 30 | |
| 31 | struct bts_pch_timer { |
| 32 | struct llist_head entry; |
| 33 | struct gprs_rlcmac_bts *bts; |
| 34 | struct osmo_timer_list T3113; |
Pau Espin Pedrol | 13961c9 | 2021-11-08 17:38:47 +0100 | [diff] [blame] | 35 | uint32_t ptmsi; /* GSM_RESERVED_TMSI if not available */ |
Oliver Smith | d3c7591 | 2021-07-09 16:37:16 +0200 | [diff] [blame] | 36 | char imsi[OSMO_IMSI_BUF_SIZE]; |
| 37 | }; |
| 38 | |
Pau Espin Pedrol | 13961c9 | 2021-11-08 17:38:47 +0100 | [diff] [blame] | 39 | struct GprsMs; |
| 40 | |
| 41 | void bts_pch_timer_start(struct gprs_rlcmac_bts *bts, const struct osmo_mobile_identity *mi_paging, |
| 42 | const char *imsi); |
| 43 | void bts_pch_timer_stop(struct gprs_rlcmac_bts *bts, const struct GprsMs *ms); |
Oliver Smith | 3f79470 | 2021-08-23 14:19:21 +0200 | [diff] [blame] | 44 | void bts_pch_timer_stop_all(struct gprs_rlcmac_bts *bts); |
Pau Espin Pedrol | ef8a730 | 2021-11-08 19:19:25 +0100 | [diff] [blame] | 45 | struct bts_pch_timer *bts_pch_timer_get_by_imsi(struct gprs_rlcmac_bts *bts, const char *imsi); |
Oliver Smith | d3c7591 | 2021-07-09 16:37:16 +0200 | [diff] [blame] | 46 | |
| 47 | #ifdef __cplusplus |
| 48 | } |
| 49 | #endif |