aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2023-01-05 19:00:49 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2023-01-05 19:00:56 +0100
commit4bd6f663a78148ce144bf0b728e4344e2546dc0d (patch)
treef0213fa110cbed2f9e24607cfab7701384d62470
parent52c9b8e5935a0b4f967be4f81e73af75eb87aecf (diff)
sndcp: Standarize unitdata function naming
Use sndcp_<sap>_type>_<op> so that it's easier to distinguish and identify them. Change-Id: Ib8825570a8f61d0a28d631f86f5244e70d3194aa
-rw-r--r--include/osmocom/sgsn/gprs_sndcp.h9
-rw-r--r--src/sgsn/gprs_llc.c2
-rw-r--r--src/sgsn/gprs_sndcp.c10
-rw-r--r--src/sgsn/sgsn_libgtp.c2
4 files changed, 12 insertions, 11 deletions
diff --git a/include/osmocom/sgsn/gprs_sndcp.h b/include/osmocom/sgsn/gprs_sndcp.h
index ba0b8f960..b4a0af8d3 100644
--- a/include/osmocom/sgsn/gprs_sndcp.h
+++ b/include/osmocom/sgsn/gprs_sndcp.h
@@ -82,16 +82,17 @@ int sndcp_sn_xid_conf(struct gprs_llc_xid_field *xid_field_conf,
void gprs_sndcp_sm_deactivate_ind_by_llme(const struct gprs_llc_llme *llme);
/* Called by SNDCP when it has received/re-assembled a N-PDU */
-int sndcp_sn_ud_ind(struct gprs_sndcp_entity *sne, struct msgb *msg,
+int sndcp_sn_unitdata_ind(struct gprs_sndcp_entity *sne, struct msgb *msg,
uint32_t npdu_len, uint8_t *npdu);
+int sndcp_sn_unitdata_req(struct msgb *msg, struct gprs_llc_lle *lle, uint8_t nsapi,
+ void *mmcontext);
/* Entry point for the SNSM-ACTIVATE.indication */
int sndcp_sm_activate_ind(struct gprs_llc_lle *lle, uint8_t nsapi);
/* Entry point for the SNSM-DEACTIVATE.indication */
int sndcp_sm_deactivate_ind(const struct gprs_llc_lle *lle, uint8_t nsapi);
-int sndcp_unitdata_req(struct msgb *msg, struct gprs_llc_lle *lle, uint8_t nsapi,
- void *mmcontext);
-int sndcp_llunitdata_ind(struct msgb *msg, struct gprs_llc_lle *lle,
+
+int sndcp_ll_unitdata_ind(struct msgb *msg, struct gprs_llc_lle *lle,
uint8_t *hdr, uint16_t len);
#endif /* INT_SNDCP_H */
diff --git a/src/sgsn/gprs_llc.c b/src/sgsn/gprs_llc.c
index 612dbca1b..302e01861 100644
--- a/src/sgsn/gprs_llc.c
+++ b/src/sgsn/gprs_llc.c
@@ -1030,7 +1030,7 @@ int gprs_llc_rcvmsg(struct msgb *msg, struct tlv_parsed *tv)
case GPRS_SAPI_SNDCP9:
case GPRS_SAPI_SNDCP11:
/* send LL_DATA_IND/LL_UNITDATA_IND to SNDCP */
- rc = sndcp_llunitdata_ind(msg, lle, llhp.data, llhp.data_len);
+ rc = sndcp_ll_unitdata_ind(msg, lle, llhp.data, llhp.data_len);
break;
case GPRS_SAPI_SMS:
/* FIXME */
diff --git a/src/sgsn/gprs_sndcp.c b/src/sgsn/gprs_sndcp.c
index 8ee752e8d..6707c2863 100644
--- a/src/sgsn/gprs_sndcp.c
+++ b/src/sgsn/gprs_sndcp.c
@@ -399,7 +399,7 @@ static int defrag_segments(struct gprs_sndcp_entity *sne)
}
/* Hand off packet to SGSN (SNDCP SN-UNITDATA.ind), which will forward it to GGSN (GTP): */
- rc = sndcp_sn_ud_ind(sne, msg, npdu_len, expnd);
+ rc = sndcp_sn_unitdata_ind(sne, msg, npdu_len, expnd);
ret_free:
/* we must free the memory we allocated above; ownership is not transferred
@@ -684,7 +684,7 @@ static int sndcp_send_ud_frag(struct sndcp_frag_state *fs,
}
/* Request transmission of a SN-PDU over specified LLC Entity + SAPI */
-int sndcp_unitdata_req(struct msgb *msg, struct gprs_llc_lle *lle, uint8_t nsapi,
+int sndcp_sn_unitdata_req(struct msgb *msg, struct gprs_llc_lle *lle, uint8_t nsapi,
void *mmcontext)
{
struct gprs_sndcp_entity *sne;
@@ -794,7 +794,7 @@ int sndcp_unitdata_req(struct msgb *msg, struct gprs_llc_lle *lle, uint8_t nsapi
}
/* Section 5.1.2.17 LL-UNITDATA.ind */
-int sndcp_llunitdata_ind(struct msgb *msg, struct gprs_llc_lle *lle,
+int sndcp_ll_unitdata_ind(struct msgb *msg, struct gprs_llc_lle *lle,
uint8_t *hdr, uint16_t len)
{
struct gprs_sndcp_entity *sne;
@@ -878,7 +878,7 @@ int sndcp_llunitdata_ind(struct msgb *msg, struct gprs_llc_lle *lle,
}
/* Hand off packet to gtp */
- rc = sndcp_sn_ud_ind(sne, msg, npdu_len, expnd);
+ rc = sndcp_sn_unitdata_ind(sne, msg, npdu_len, expnd);
ret_free:
if (any_pcomp_or_dcomp_active(sgsn))
@@ -890,7 +890,7 @@ ret_free:
/* 5.1.1.4 SN-UNITDATA.indication
* Called by SNDCP when it has received/re-assembled a N-PDU
*/
-int sndcp_sn_ud_ind(struct gprs_sndcp_entity *sne,
+int sndcp_sn_unitdata_ind(struct gprs_sndcp_entity *sne,
struct msgb *msg, uint32_t npdu_len, uint8_t *npdu)
{
/* Hand it off N-PDU to the correct GTP tunnel + GGSN: */
diff --git a/src/sgsn/sgsn_libgtp.c b/src/sgsn/sgsn_libgtp.c
index f76180a27..f848e57fa 100644
--- a/src/sgsn/sgsn_libgtp.c
+++ b/src/sgsn/sgsn_libgtp.c
@@ -804,7 +804,7 @@ static int cb_data_ind(struct pdp_t *lib, void *packet, unsigned int len)
/* It is easier to have a global count */
pdp->cdr_bytes_out += len;
- return sndcp_unitdata_req(msg, &mm->gb.llme->lle[pdp->sapi],
+ return sndcp_sn_unitdata_req(msg, &mm->gb.llme->lle[pdp->sapi],
pdp->nsapi, mm);
}