mirror of https://gerrit.osmocom.org/libosmocore
gprs_bssgp_rim: allow sending of encoded RIM messages
The API function bssgp_tx_rim() accepts decoded RIM PDU structs, encodes them and eventually sends them. However, there may be cases where the RIM PCU already exists in its encoded form. (This is in particular the case when the RIM PDU is forwarded from GTP to BSSGP) Lets add an API function bssgp_tx_rim_encoded to allow sending of already encoded RIM PDUs Related: OS#6095 Change-Id: Id4a793bbaf32d7b9d894dcc5be3faaf2f2d91d82
This commit is contained in:
parent
a0d84832be
commit
9e75544137
|
@ -270,3 +270,4 @@ int bssgp_parse_rim_pdu(struct bssgp_ran_information_pdu *pdu, const struct msgb
|
|||
struct msgb *bssgp_encode_rim_pdu(const struct bssgp_ran_information_pdu *pdu);
|
||||
|
||||
int bssgp_tx_rim(const struct bssgp_ran_information_pdu *pdu, uint16_t nsei);
|
||||
int bssgp_tx_rim_encoded(struct msgb *msg, uint16_t nsei);
|
||||
|
|
|
@ -1179,6 +1179,25 @@ int bssgp_tx_rim(const struct bssgp_ran_information_pdu *pdu, uint16_t nsei)
|
|||
return bssgp_ns_send(bssgp_ns_send_data, msg);
|
||||
}
|
||||
|
||||
/*! Send encoded RAN TRANSPARENT CONTAINER via BSSGP (3GPP TS 29.060, section 7.7.43).
|
||||
* \param[in] msg user provided memory for the encoded RAN TRANSPARENT CONTAINER to be sent.
|
||||
* (this function will take ownership of msg).
|
||||
* \param[in] nsei BSSGP network service entity identifier (NSEI).
|
||||
* \returns 0 on sccess, -EINVAL on error. */
|
||||
int bssgp_tx_rim_encoded(struct msgb *msg, uint16_t nsei)
|
||||
{
|
||||
struct bssgp_normal_hdr *bgph;
|
||||
|
||||
msgb_nsei(msg) = nsei;
|
||||
msgb_bvci(msg) = 0; /* Signalling */
|
||||
|
||||
bgph = (struct bssgp_normal_hdr *)msgb_bssgph(msg);
|
||||
DEBUGP(DLBSSGP, "BSSGP BVCI=0 NSEI=%u Tx RIM-PDU:%s\n",
|
||||
nsei, bssgp_pdu_str(bgph->pdu_type));
|
||||
|
||||
return bssgp_ns_send(bssgp_ns_send_data, msg);
|
||||
}
|
||||
|
||||
/* For internal use only (called from gprs_bssgp.c) */
|
||||
int bssgp_rx_rim(struct msgb *msg, struct tlv_parsed *tp, uint16_t bvci)
|
||||
{
|
||||
|
|
|
@ -56,6 +56,7 @@ bssgp_tx_resume;
|
|||
bssgp_tx_resume_ack;
|
||||
bssgp_tx_resume_nack;
|
||||
bssgp_tx_rim;
|
||||
bssgp_tx_rim_encoded;
|
||||
bssgp_tx_simple_bvci;
|
||||
bssgp_tx_status;
|
||||
bssgp_tx_suspend;
|
||||
|
|
Loading…
Reference in New Issue