From b534e5c0851647c4d50fd013fbd5a344a60c414f Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 11 Sep 2015 00:15:16 +0200 Subject: introduce ue_context management We keep one 'ue_context' structure for every UE that we see a UE REGISTER REQUEST for. --- src/hnbgw.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/hnbgw.h') 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); -- cgit v1.2.3