laforge has uploaded this change for review.
cosmetic: Rename hnbgw_rx_ranap and frienst to *_rx_ranap_udt_ul
Those functions have always been handling only unit-data in uplink
direction, so let's reflect that in the function name to prevent
anyone assuming they processs connection-oriented RANAP and/or
the downlink direction.
Change-Id: I29e8176ac19b2e7390e5950b8d0944c8961e491f
---
M include/osmocom/hnbgw/hnbgw_ranap.h
M src/osmo-hnbgw/hnbgw_ranap.c
M src/osmo-hnbgw/hnbgw_rua.c
M src/osmo-hnbgw/hnbgw_vty.c
4 files changed, 32 insertions(+), 19 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/06/36206/1
diff --git a/include/osmocom/hnbgw/hnbgw_ranap.h b/include/osmocom/hnbgw/hnbgw_ranap.h
index a5d7380..50504e6 100644
--- a/include/osmocom/hnbgw/hnbgw_ranap.h
+++ b/include/osmocom/hnbgw/hnbgw_ranap.h
@@ -2,5 +2,5 @@
#include <osmocom/hnbgw/hnbgw.h>
-int hnbgw_ranap_rx(struct msgb *msg, uint8_t *data, size_t len);
+int hnbgw_ranap_rx_udt_ul(struct msgb *msg, uint8_t *data, size_t len);
int hnbgw_ranap_init(void);
diff --git a/src/osmo-hnbgw/hnbgw_ranap.c b/src/osmo-hnbgw/hnbgw_ranap.c
index 2977730..7fb7dcb 100644
--- a/src/osmo-hnbgw/hnbgw_ranap.c
+++ b/src/osmo-hnbgw/hnbgw_ranap.c
@@ -35,8 +35,7 @@
#include <osmocom/ranap/ranap_ies_defs.h>
#include <osmocom/ranap/ranap_msg_factory.h>
-static int ranap_tx_reset_ack(struct hnb_context *hnb,
- RANAP_CN_DomainIndicator_t domain)
+static int ranap_tx_udt_dl_reset_ack(struct hnb_context *hnb, RANAP_CN_DomainIndicator_t domain)
{
struct msgb *msg;
int rc;
@@ -52,7 +51,7 @@
return rc;
}
-static int ranap_rx_init_reset(struct hnb_context *hnb, ANY_t *in)
+static int ranap_rx_udt_ul_init_reset(struct hnb_context *hnb, ANY_t *in)
{
RANAP_ResetIEs_t ies;
int rc, is_ps = 0;
@@ -70,12 +69,12 @@
/* FIXME: Actually we have to wait for some guard time? */
/* FIXME: Reset all resources related to this HNB/RNC */
- ranap_tx_reset_ack(hnb, ies.cN_DomainIndicator);
+ ranap_tx_udt_dl_reset_ack(hnb, ies.cN_DomainIndicator);
return 0;
}
-static int ranap_rx_error_ind(struct hnb_context *hnb, ANY_t *in)
+static int ranap_rx_udt_ul_error_ind(struct hnb_context *hnb, ANY_t *in)
{
RANAP_ErrorIndicationIEs_t ies;
int rc;
@@ -97,7 +96,7 @@
return 0;
}
-static int ranap_rx_initiating_msg(struct hnb_context *hnb, RANAP_InitiatingMessage_t *imsg)
+static int ranap_rx_udt_ul_initiating_msg(struct hnb_context *hnb, RANAP_InitiatingMessage_t *imsg)
{
int rc = 0;
@@ -111,12 +110,12 @@
switch (imsg->procedureCode) {
case RANAP_ProcedureCode_id_Reset:
/* Reset request */
- rc = ranap_rx_init_reset(hnb, &imsg->value);
+ rc = ranap_rx_udt_ul_init_reset(hnb, &imsg->value);
break;
case RANAP_ProcedureCode_id_OverloadControl: /* Overload ind */
break;
case RANAP_ProcedureCode_id_ErrorIndication: /* Error ind */
- rc = ranap_rx_error_ind(hnb, &imsg->value);
+ rc = ranap_rx_udt_ul_error_ind(hnb, &imsg->value);
break;
case RANAP_ProcedureCode_id_ResetResource: /* request */
case RANAP_ProcedureCode_id_InformationTransfer:
@@ -134,7 +133,7 @@
return rc;
}
-static int ranap_rx_successful_msg(struct hnb_context *hnb, RANAP_SuccessfulOutcome_t *imsg)
+static int ranap_rx_udt_ul_successful_msg(struct hnb_context *hnb, RANAP_SuccessfulOutcome_t *imsg)
{
/* according tot the spec, we can primarily receive Overload,
* Reset, Reset ACK, Error Indication, reset Resource, Reset
@@ -164,16 +163,16 @@
-static int _hnbgw_ranap_rx(struct hnb_context *hnb, RANAP_RANAP_PDU_t *pdu)
+static int _hnbgw_ranap_rx_udt_ul(struct hnb_context *hnb, RANAP_RANAP_PDU_t *pdu)
{
int rc = 0;
switch (pdu->present) {
case RANAP_RANAP_PDU_PR_initiatingMessage:
- rc = ranap_rx_initiating_msg(hnb, &pdu->choice.initiatingMessage);
+ rc = ranap_rx_udt_ul_initiating_msg(hnb, &pdu->choice.initiatingMessage);
break;
case RANAP_RANAP_PDU_PR_successfulOutcome:
- rc = ranap_rx_successful_msg(hnb, &pdu->choice.successfulOutcome);
+ rc = ranap_rx_udt_ul_successful_msg(hnb, &pdu->choice.successfulOutcome);
break;
case RANAP_RANAP_PDU_PR_unsuccessfulOutcome:
LOGHNB(hnb, DRANAP, LOGL_NOTICE, "Received unsupported RANAP "
@@ -189,8 +188,8 @@
return rc;
}
-
-int hnbgw_ranap_rx(struct msgb *msg, uint8_t *data, size_t len)
+/* receive a RNAAP Unit-Data message in uplink direction */
+int hnbgw_ranap_rx_udt_ul(struct msgb *msg, uint8_t *data, size_t len)
{
RANAP_RANAP_PDU_t _pdu, *pdu = &_pdu;
struct hnb_context *hnb = msg->dst;
@@ -205,7 +204,7 @@
return -1;
}
- rc = _hnbgw_ranap_rx(hnb, pdu);
+ rc = _hnbgw_ranap_rx_udt_ul(hnb, pdu);
return rc;
}
diff --git a/src/osmo-hnbgw/hnbgw_rua.c b/src/osmo-hnbgw/hnbgw_rua.c
index f07c186..ae518c0 100644
--- a/src/osmo-hnbgw/hnbgw_rua.c
+++ b/src/osmo-hnbgw/hnbgw_rua.c
@@ -218,7 +218,7 @@
/* dispatch a RUA connection-oriented message received from a HNB to a context mapping's RUA FSM, so that it is
* forwarded to the CN via SCCP connection-oriented messages.
- * Connectionless messages are handled in hnbgw_ranap_rx() instead, not here. */
+ * Connectionless messages are handled in hnbgw_ranap_rx_udt_ul() instead, not here. */
static int rua_to_scu(struct hnb_context *hnb,
RUA_CN_DomainIndicator_t cN_DomainIndicator,
enum RUA_ProcedureCode rua_procedure,
@@ -484,7 +484,7 @@
* Information Transfer and Uplink Information Trnansfer that we
* can ignore. In either case, it is RANAP that we need to
* decode... */
- rc = hnbgw_ranap_rx(msg, ies.ranaP_Message.buf, ies.ranaP_Message.size);
+ rc = hnbgw_ranap_rx_udt_ul(msg, ies.ranaP_Message.buf, ies.ranaP_Message.size);
rua_free_connectionlesstransferies(&ies);
return rc;
diff --git a/src/osmo-hnbgw/hnbgw_vty.c b/src/osmo-hnbgw/hnbgw_vty.c
index 3cd0ee8..9295b07 100644
--- a/src/osmo-hnbgw/hnbgw_vty.c
+++ b/src/osmo-hnbgw/hnbgw_vty.c
@@ -208,7 +208,7 @@
vty_out(vty, "HNB ");
vty_out_ofd_addr(vty, hnb->conn? osmo_stream_srv_get_ofd(hnb->conn) : NULL);
vty_out(vty, " \"%s\"%s", hnb->identity_info, VTY_NEWLINE);
- vty_out(vty, " MCC %u MNC %u LAC %u RAC %u SAC %u CID %u SCTP-stream:HNBAP=%u,RUA=%u%s",
+ vty_out(vty, " MCC %03u MNC %u LAC %u RAC %u SAC %u CID %u SCTP-stream:HNBAP=%u,RUA=%u%s",
hnb->id.mcc, hnb->id.mnc, hnb->id.lac, hnb->id.rac, hnb->id.sac, hnb->id.cid,
hnb->hnbap_stream, hnb->rua_stream, VTY_NEWLINE);
To view, visit change 36206. To unsubscribe, or for help writing mail filters, visit settings.