aboutsummaryrefslogtreecommitdiffstats
path: root/src/hnbgw.h
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-09-11 00:15:16 +0200
committerHarald Welte <laforge@gnumonks.org>2015-09-11 00:15:54 +0200
commitb534e5c0851647c4d50fd013fbd5a344a60c414f (patch)
tree5d7f8f56b02bc5d429109aec8a930b8870031c1e /src/hnbgw.h
parente2e5d4dd53749549e058335e69014f5b85d8cc7f (diff)
introduce ue_context management
We keep one 'ue_context' structure for every UE that we see a UE REGISTER REQUEST for.
Diffstat (limited to 'src/hnbgw.h')
-rw-r--r--src/hnbgw.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/hnbgw.h b/src/hnbgw.h
index 17ce562..e88baa7 100644
--- a/src/hnbgw.h
+++ b/src/hnbgw.h
@@ -60,6 +60,7 @@ struct ue_context {
struct llist_head list;
/*! Unique Context ID for this UE */
uint32_t context_id;
+ char imsi[16+1];
/*! UE is serviced via this HNB */
struct hnb_context *hnb;
};
@@ -76,6 +77,13 @@ struct hnb_gw {
/*! SCTP listen socket for incoming connections */
struct osmo_fd listen_fd;
struct llist_head hnb_list;
+ struct llist_head ue_list;
+ uint32_t next_ue_ctx_id;
};
extern struct hnb_gw g_hnb_gw;
+
+struct ue_context *ue_context_by_id(uint32_t id);
+struct ue_context *ue_context_by_imsi(const char *imsi);
+struct ue_context *ue_context_alloc(struct hnb_context *hnb, const char *imsi);
+void ue_context_free(struct ue_context *ue);