mirror of https://gerrit.osmocom.org/libosmocore
gb: add bssgp2_enc_flush_ll encode FLUSH-LL
Change-Id: I76dc3b08a63cfd78c9f7657fb58c2ddfa9b4b7e2
This commit is contained in:
parent
70093f23ad
commit
5fd4c81c63
|
@ -59,6 +59,7 @@ struct msgb *bssgp2_enc_bvc_reset(uint16_t bvci, enum gprs_bssgp_cause cause,
|
||||||
struct msgb *bssgp2_enc_bvc_reset_ack(uint16_t bvci, const struct gprs_ra_id *ra_id, uint16_t cell_id,
|
struct msgb *bssgp2_enc_bvc_reset_ack(uint16_t bvci, const struct gprs_ra_id *ra_id, uint16_t cell_id,
|
||||||
const uint8_t *feat_bm, const uint8_t *ext_feat_bm);
|
const uint8_t *feat_bm, const uint8_t *ext_feat_bm);
|
||||||
|
|
||||||
|
struct msgb *bssgp2_enc_flush_ll(uint32_t tlli, uint16_t old_bvci, uint16_t *new_bvci, uint16_t *nsei);
|
||||||
struct msgb *bssgp2_enc_status(uint8_t cause, const uint16_t *bvci, const struct msgb *orig_msg, uint16_t max_pdu_len);
|
struct msgb *bssgp2_enc_status(uint8_t cause, const uint16_t *bvci, const struct msgb *orig_msg, uint16_t max_pdu_len);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -349,6 +349,35 @@ struct msgb *bssgp2_enc_fc_bvc(const struct bssgp2_flow_ctrl *fc, enum bssgp_fc_
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*! Encode BSSGP FLUSH-LL PDU as per TS 48.018 Section 10.4.1.
|
||||||
|
* \param[in] tlli - the TLLI of the MS
|
||||||
|
* \param[in] old_bvci BVCI
|
||||||
|
* \param[in] new_bvci2 optional BVCI - only encoded if non-NULL
|
||||||
|
* \param[in] nsei optional - only encoded if non-NULL
|
||||||
|
* \returns encoded PDU or NULL in case of error */
|
||||||
|
struct msgb *bssgp2_enc_flush_ll(uint32_t tlli, uint16_t old_bvci,
|
||||||
|
const uint16_t *new_bvci, const uint16_t *nsei)
|
||||||
|
{
|
||||||
|
struct msgb *msg = bssgp_msgb_alloc();
|
||||||
|
struct bssgp_normal_hdr *bgph;
|
||||||
|
|
||||||
|
if (!msg)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
bgph = (struct bssgp_normal_hdr *) msgb_put(msg, sizeof(*bgph));
|
||||||
|
bgph->pdu_type = BSSGP_PDUT_FLUSH_LL;
|
||||||
|
|
||||||
|
msgb_tvlv_put_32be(msg, BSSGP_IE_TLLI, tlli);
|
||||||
|
msgb_tvlv_put_16be(msg, BSSGP_IE_BVCI, old_bvci);
|
||||||
|
if (new_bvci)
|
||||||
|
msgb_tvlv_put_16be(msg, BSSGP_IE_BVCI, *new_bvci);
|
||||||
|
|
||||||
|
if (nsei)
|
||||||
|
msgb_tvlv_put_16be(msg, BSSGP_IE_BVCI, *nsei);
|
||||||
|
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
|
||||||
/*! Encode a FLOW-CONTROL-BVC-ACK PDU as per TS 48.018 Section 10.4.4.
|
/*! Encode a FLOW-CONTROL-BVC-ACK PDU as per TS 48.018 Section 10.4.4.
|
||||||
* \param[in] tag the tag IE value to encode
|
* \param[in] tag the tag IE value to encode
|
||||||
* \returns encoded PDU or NULL in case of error */
|
* \returns encoded PDU or NULL in case of error */
|
||||||
|
|
|
@ -85,6 +85,7 @@ bssgp2_enc_fc_bvc;
|
||||||
bssgp2_enc_fc_bvc_ack;
|
bssgp2_enc_fc_bvc_ack;
|
||||||
bssgp2_enc_fc_ms;
|
bssgp2_enc_fc_ms;
|
||||||
bssgp2_enc_fc_ms_ack;
|
bssgp2_enc_fc_ms_ack;
|
||||||
|
bssgp2_enc_flush_ll;
|
||||||
bssgp2_enc_status;
|
bssgp2_enc_status;
|
||||||
|
|
||||||
bssgp_bvc_fsm_alloc_sig_bss;
|
bssgp_bvc_fsm_alloc_sig_bss;
|
||||||
|
|
Loading…
Reference in New Issue