Jacob Erlbeck | 5367086 | 2015-05-12 17:54:33 +0200 | [diff] [blame] | 1 | /* gprs_ms_storage.h |
| 2 | * |
| 3 | * Copyright (C) 2015 by Sysmocom s.f.m.c. GmbH |
| 4 | * Author: Jacob Erlbeck <jerlbeck@sysmocom.de> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License |
| 8 | * as published by the Free Software Foundation; either version 2 |
| 9 | * of the License, or (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
Jacob Erlbeck | 5367086 | 2015-05-12 17:54:33 +0200 | [diff] [blame] | 15 | */ |
| 16 | |
| 17 | #pragma once |
| 18 | |
| 19 | #include "gprs_ms.h" |
Jacob Erlbeck | 0e50ce6 | 2015-05-21 16:58:22 +0200 | [diff] [blame] | 20 | #include "tbf.h" |
Jacob Erlbeck | 5367086 | 2015-05-12 17:54:33 +0200 | [diff] [blame] | 21 | #include <stdint.h> |
| 22 | #include <stddef.h> |
| 23 | |
Pau Espin Pedrol | 2182e62 | 2021-01-14 16:48:38 +0100 | [diff] [blame] | 24 | struct gprs_rlcmac_bts; |
Jacob Erlbeck | 17214bb | 2015-06-02 14:06:12 +0200 | [diff] [blame] | 25 | |
Pau Espin Pedrol | 2182e62 | 2021-01-14 16:48:38 +0100 | [diff] [blame] | 26 | struct GprsMsStorage { |
Jacob Erlbeck | 5367086 | 2015-05-12 17:54:33 +0200 | [diff] [blame] | 27 | public: |
Pau Espin Pedrol | 2182e62 | 2021-01-14 16:48:38 +0100 | [diff] [blame] | 28 | GprsMsStorage(struct gprs_rlcmac_bts *bts); |
Jacob Erlbeck | 5367086 | 2015-05-12 17:54:33 +0200 | [diff] [blame] | 29 | ~GprsMsStorage(); |
| 30 | |
Jacob Erlbeck | c362df2 | 2016-01-20 22:02:19 +0100 | [diff] [blame] | 31 | void cleanup(); |
| 32 | |
Vadim Yanitskiy | cb98894 | 2020-11-08 13:27:35 +0700 | [diff] [blame] | 33 | GprsMs *get_ms(uint32_t tlli, uint32_t old_tlli = GSM_RESERVED_TMSI, const char *imsi = NULL) const; |
Jacob Erlbeck | cb1b494 | 2015-06-19 10:59:58 +0200 | [diff] [blame] | 34 | GprsMs *create_ms(); |
Jacob Erlbeck | 5367086 | 2015-05-12 17:54:33 +0200 | [diff] [blame] | 35 | |
Pau Espin Pedrol | da971ee | 2020-12-16 15:59:45 +0100 | [diff] [blame] | 36 | const struct llist_head* ms_list() const {return &m_list;} |
Jacob Erlbeck | 5367086 | 2015-05-12 17:54:33 +0200 | [diff] [blame] | 37 | private: |
Pau Espin Pedrol | 2182e62 | 2021-01-14 16:48:38 +0100 | [diff] [blame] | 38 | struct gprs_rlcmac_bts *m_bts; |
Pau Espin Pedrol | da971ee | 2020-12-16 15:59:45 +0100 | [diff] [blame] | 39 | struct llist_head m_list; /* list of struct GprsMs */ |
Jacob Erlbeck | 5367086 | 2015-05-12 17:54:33 +0200 | [diff] [blame] | 40 | }; |