pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/30887 )


Change subject: sndcp: Standarize unitdata function naming
......................................................................

sndcp: Standarize unitdata function naming

Use sndcp_<sap>_type>_<op> so that it's easier to distinguish and
identify them.

Change-Id: Ib8825570a8f61d0a28d631f86f5244e70d3194aa
---
M include/osmocom/sgsn/gprs_sndcp.h
M src/sgsn/gprs_llc.c
M src/sgsn/gprs_sndcp.c
M src/sgsn/sgsn_libgtp.c
4 files changed, 12 insertions(+), 11 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/87/30887/1

diff --git a/include/osmocom/sgsn/gprs_sndcp.h 
b/include/osmocom/sgsn/gprs_sndcp.h
index ba0b8f9..b4a0af8 100644
--- a/include/osmocom/sgsn/gprs_sndcp.h
+++ b/include/osmocom/sgsn/gprs_sndcp.h
@@ -82,16 +82,17 @@
 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 612dbca..302e018 100644
--- a/src/sgsn/gprs_llc.c
+++ b/src/sgsn/gprs_llc.c
@@ -1030,7 +1030,7 @@
                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 8ee752e..6707c28 100644
--- a/src/sgsn/gprs_sndcp.c
+++ b/src/sgsn/gprs_sndcp.c
@@ -399,7 +399,7 @@
        }
 
        /* 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 @@
 }

 /* 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 @@
 }

 /* 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 @@
        }

        /* 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 @@
 /* 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 f76180a..f848e57 100644
--- a/src/sgsn/sgsn_libgtp.c
+++ b/src/sgsn/sgsn_libgtp.c
@@ -804,7 +804,7 @@
        /* 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);
 }


--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/30887
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Ib8825570a8f61d0a28d631f86f5244e70d3194aa
Gerrit-Change-Number: 30887
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to