aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_ms_storage.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-12 17:54:33 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-20 11:36:12 +0200
commit536708617505a017b6b263a32f592471913ec464 (patch)
treef28edb7214a6bfac7d9386b50ea456c6eb9898f5 /src/gprs_ms_storage.h
parentdfef28de887eba43747bca52584f8310450e243a (diff)
ms: Add MS storage class
Currently the MS objects are contained in the TBF objects only. To allow for an extended life time after the TBF objects have been freed and to find them based on TLLI, a container for the MS objects is needed. This commit adds the container class and also adds the corresponding m_list member to GprsMs. Further integration into the PCU code is not yet done. Ticket: #1674 Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/gprs_ms_storage.h')
-rw-r--r--src/gprs_ms_storage.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/gprs_ms_storage.h b/src/gprs_ms_storage.h
new file mode 100644
index 00000000..1eef28fc
--- /dev/null
+++ b/src/gprs_ms_storage.h
@@ -0,0 +1,41 @@
+/* gprs_ms_storage.h
+ *
+ * Copyright (C) 2015 by Sysmocom s.f.m.c. GmbH
+ * Author: Jacob Erlbeck <jerlbeck@sysmocom.de>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#pragma once
+
+#include "gprs_ms.h"
+#include "cxx_linuxlist.h"
+#include <stdint.h>
+#include <stddef.h>
+
+class GprsMsStorage : public GprsMs::Callback {
+public:
+ GprsMsStorage();
+ ~GprsMsStorage();
+
+ virtual void ms_idle(class GprsMs *);
+ virtual void ms_active(class GprsMs *);
+
+ GprsMs *get_ms(uint32_t tlli, uint32_t old_tlli = 0, const char *imsi = 0) const;
+ GprsMs *get_or_create_ms(uint32_t tlli, uint32_t old_tlli = 0, const char *imsi = 0);
+
+private:
+ LListHead<GprsMs> m_list;
+};