laforge has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-hnbgw/+/36207?usp=email )
Change subject: rename hnbgw_peek_l3 to hnbgw_peek_l3_ul as it's uplink only
......................................................................
rename hnbgw_peek_l3 to hnbgw_peek_l3_ul as it's uplink only
Let's not make the functions appear more generic than they are: They
all explicitly only support uplink so far.
Change-Id: I7db0d933a8f17f8c410141f43dab12b8c19fc8ae
---
M include/osmocom/hnbgw/hnbgw.h
M src/osmo-hnbgw/hnbgw_l3.c
M src/osmo-hnbgw/hnbgw_rua.c
3 files changed, 22 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/07/36207/1
diff --git a/include/osmocom/hnbgw/hnbgw.h b/include/osmocom/hnbgw/hnbgw.h
index 98cdc34..58b0903 100644
--- a/include/osmocom/hnbgw/hnbgw.h
+++ b/include/osmocom/hnbgw/hnbgw.h
@@ -430,4 +430,4 @@
struct msgb *hnbgw_ranap_msg_alloc(const char *name);
-int hnbgw_peek_l3(struct hnbgw_context_map *map, struct msgb *ranap_msg);
+int hnbgw_peek_l3_ul(struct hnbgw_context_map *map, struct msgb *ranap_msg);
diff --git a/src/osmo-hnbgw/hnbgw_l3.c b/src/osmo-hnbgw/hnbgw_l3.c
index a6b48ce..1fd3398 100644
--- a/src/osmo-hnbgw/hnbgw_l3.c
+++ b/src/osmo-hnbgw/hnbgw_l3.c
@@ -156,8 +156,8 @@
return 0;
}
-static int peek_l3_nas(struct hnbgw_context_map *map, const uint8_t *nas_pdu, size_t
len,
- const struct osmo_plmn_id *local_plmn)
+static int peek_l3_ul_nas(struct hnbgw_context_map *map, const uint8_t *nas_pdu, size_t
len,
+ const struct osmo_plmn_id *local_plmn)
{
const struct gsm48_hdr *gh;
int8_t pdisc;
@@ -277,7 +277,7 @@
return 0;
}
-static int peek_l3_initial_ue(struct hnbgw_context_map *map, const
RANAP_InitialUE_MessageIEs_t *ies)
+static int peek_l3_ul_initial_ue(struct hnbgw_context_map *map, const
RANAP_InitialUE_MessageIEs_t *ies)
{
struct osmo_plmn_id local_plmn;
@@ -293,12 +293,12 @@
osmo_plmn_from_bcd(ies->lai.pLMNidentity.buf, &local_plmn);
}
- return peek_l3_nas(map, ies->nas_pdu.buf, ies->nas_pdu.size, &local_plmn);
+ return peek_l3_ul_nas(map, ies->nas_pdu.buf, ies->nas_pdu.size, &local_plmn);
}
-/* Extract a Layer 3 message (NAS PDU) from the RANAP message, and put the info obtained
in map->l3. This is relevant
- * for CN pooling, to decide which CN link to map the RUA context to. */
-int hnbgw_peek_l3(struct hnbgw_context_map *map, struct msgb *ranap_msg)
+/* Extract a Layer 3 message (NAS PDU) from the uplink RANAP message, and put the info
obtained in map->l3.
+ * This is relevant for CN pooling, to decide which CN link to map the RUA context to.
*/
+int hnbgw_peek_l3_ul(struct hnbgw_context_map *map, struct msgb *ranap_msg)
{
ranap_message *message = hnbgw_decode_ranap_co(ranap_msg);
if (!message) {
@@ -308,7 +308,7 @@
switch (message->procedureCode) {
case RANAP_ProcedureCode_id_InitialUE_Message:
- return peek_l3_initial_ue(map, &message->msg.initialUE_MessageIEs);
+ return peek_l3_ul_initial_ue(map, &message->msg.initialUE_MessageIEs);
default:
LOGP(DCN, LOGL_ERROR, "unexpected RANAP PDU in RUA Connect message: %s\n",
get_value_string(ranap_procedure_code_vals, message->procedureCode));
diff --git a/src/osmo-hnbgw/hnbgw_rua.c b/src/osmo-hnbgw/hnbgw_rua.c
index ae518c0..5576fa4 100644
--- a/src/osmo-hnbgw/hnbgw_rua.c
+++ b/src/osmo-hnbgw/hnbgw_rua.c
@@ -194,7 +194,7 @@
map = context_map_alloc(hnb, rua_ctx_id, is_ps);
OSMO_ASSERT(map);
- if (hnbgw_peek_l3(map, ranap_msg))
+ if (hnbgw_peek_l3_ul(map, ranap_msg))
LOGP(DCN, LOGL_NOTICE, "Failed to extract Mobile Identity from RUA Connect
message's RANAP payload\n");
/* map->l3 now contains all the interesting information from the NAS PDU, if any.
* If no useful information could be decoded, still continue to select a hopefully
adequate link by round robin.
--
To view, visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/36207?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I7db0d933a8f17f8c410141f43dab12b8c19fc8ae
Gerrit-Change-Number: 36207
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange