libosmogb 1.9.0.196-9975
Osmocom Gb library
gprs_bssgp_bss.h File Reference

GPRS BSSGP protocol implementation as per 3GPP TS 08.18. More...

Go to the source code of this file.

Functions

uint8_t * bssgp_msgb_tlli_put (struct msgb *msg, uint32_t tlli)
 
uint8_t * bssgp_msgb_ra_put (struct msgb *msg, const struct gprs_ra_id *ra_id)
 
int bssgp_tx_bvc_ptp_reset (uint16_t nsei, enum gprs_bssgp_cause cause)
 Initiate reset procedure for all PTP BVC on a given NSEI. More...
 
int bssgp_tx_suspend (uint16_t nsei, uint32_t tlli, const struct gprs_ra_id *ra_id)
 GMM-SUSPEND.req (Chapter 10.3.6) More...
 
int bssgp_tx_resume (uint16_t nsei, uint32_t tlli, const struct gprs_ra_id *ra_id, uint8_t suspend_ref)
 GMM-RESUME.req (Chapter 10.3.9) More...
 
int bssgp_tx_ra_capa_upd (struct bssgp_bvc_ctx *bctx, uint32_t tlli, uint8_t tag)
 Transmit RA-CAPABILITY-UPDATE (10.3.3) More...
 
int bssgp_tx_radio_status_tlli (struct bssgp_bvc_ctx *bctx, uint8_t cause, uint32_t tlli)
 Transmit RADIO-STATUS for TLLI (10.3.5) More...
 
int bssgp_tx_radio_status_tmsi (struct bssgp_bvc_ctx *bctx, uint8_t cause, uint32_t tmsi)
 Transmit RADIO-STATUS for TMSI (10.3.5) More...
 
int bssgp_tx_radio_status_imsi (struct bssgp_bvc_ctx *bctx, uint8_t cause, const char *imsi)
 Transmit RADIO-STATUS for IMSI (10.3.5) More...
 
int bssgp_tx_flush_ll_ack (struct bssgp_bvc_ctx *bctx, uint32_t tlli, uint8_t action, uint16_t bvci_new, uint32_t num_octets)
 Transmit FLUSH-LL-ACK (Chapter 10.4.2) More...
 
int bssgp_tx_llc_discarded (struct bssgp_bvc_ctx *bctx, uint32_t tlli, uint8_t num_frames, uint32_t num_octets)
 Transmit LLC-DISCARDED (Chapter 10.4.3) More...
 
int bssgp_tx_bvc_block (struct bssgp_bvc_ctx *bctx, uint8_t cause)
 Transmit a BVC-BLOCK message (Chapter 10.4.8) More...
 
int bssgp_tx_bvc_unblock (struct bssgp_bvc_ctx *bctx)
 Transmit a BVC-UNBLOCK message (Chapter 10.4.10) More...
 
int bssgp_tx_bvc_reset (struct bssgp_bvc_ctx *bctx, uint16_t bvci, uint8_t cause)
 
int bssgp_tx_bvc_reset2 (struct bssgp_bvc_ctx *bctx, uint16_t bvci, uint8_t cause, bool add_cell_id)
 Transmit a BVC-RESET message (Chapter 10.4.12) More...
 
int bssgp_tx_ul_ud (struct bssgp_bvc_ctx *bctx, uint32_t tlli, const uint8_t *qos_profile, struct msgb *llc_pdu)
 RL-UL-UNITDATA.req (Chapter 10.2.2) More...
 
int bssgp_rx_paging (struct bssgp_paging_info *pinfo, struct msgb *msg)
 
int bssgp_tx_fc_bvc (struct bssgp_bvc_ctx *bctx, uint8_t tag, uint32_t bucket_size, uint32_t bucket_leak_rate, uint32_t bmax_default_ms, uint32_t r_default_ms, uint8_t *bucket_full_ratio, uint32_t *queue_delay_ms)
 Transmit a FLOW_CONTROL-BVC (Chapter 10.4.4) More...
 
int bssgp_tx_fc_ms (struct bssgp_bvc_ctx *bctx, uint32_t tlli, uint8_t tag, uint32_t ms_bucket_size, uint32_t bucket_leak_rate, uint8_t *bucket_full_ratio)
 Transmit a FLOW_CONTROL-MS (Chapter 10.4.6) More...
 

Detailed Description

GPRS BSSGP protocol implementation as per 3GPP TS 08.18.

Function Documentation

◆ bssgp_msgb_ra_put()

◆ bssgp_msgb_tlli_put()

◆ bssgp_rx_paging()

◆ bssgp_tx_bvc_block()

◆ bssgp_tx_bvc_ptp_reset()

int bssgp_tx_bvc_ptp_reset ( uint16_t  nsei,
enum gprs_bssgp_cause  cause 
)

Initiate reset procedure for all PTP BVC on a given NSEI.

This function initiates reset procedure for all PTP BVC with a given cause.

Parameters
[in]nseiNSEI to which PTP BVC should belong to
[in]causeCause of BVC RESET
Returns
0 on success, negative error code otherwise

References bssgp_bvc_ctxts, bssgp_cause_str(), bssgp_tx_bvc_reset(), bssgp_bvc_ctx::bvci, BVCI_SIGNALLING, cause, DLBSSGP, list, llist_for_each_entry, LOGL_DEBUG, LOGP, bssgp_bvc_ctx::nsei, and nsei.

◆ bssgp_tx_bvc_reset()

int bssgp_tx_bvc_reset ( struct bssgp_bvc_ctx bctx,
uint16_t  bvci,
uint8_t  cause 
)

◆ bssgp_tx_bvc_reset2()

int bssgp_tx_bvc_reset2 ( struct bssgp_bvc_ctx bctx,
uint16_t  bvci,
uint8_t  cause,
bool  add_cell_id 
)

Transmit a BVC-RESET message (Chapter 10.4.12)

References bssgp_tx_bvc_reset_nsei_bvci(), bvci, cause, bssgp_bvc_ctx::cell_id, bssgp_bvc_ctx::nsei, and bssgp_bvc_ctx::ra_id.

Referenced by bssgp_tx_bvc_reset().

◆ bssgp_tx_bvc_unblock()

◆ bssgp_tx_fc_bvc()

int bssgp_tx_fc_bvc ( struct bssgp_bvc_ctx bctx,
uint8_t  tag,
uint32_t  bucket_size,
uint32_t  bucket_leak_rate,
uint32_t  bmax_default_ms,
uint32_t  r_default_ms,
uint8_t *  bucket_full_ratio,
uint32_t *  queue_delay_ms 
)

Transmit a FLOW_CONTROL-BVC (Chapter 10.4.4)

Parameters
[in]bctxBVC Context
[in]tagAdditional tag to identify acknowledge
[in]bucket_sizeMaximum bucket size in octets
[in]bucket_leak_rateBucket leak rate in octets/sec
[in]bmax_default_msMaximum bucket size default for MS
[in]r_default_msBucket leak rate default for MS in octets/sec
[in]bucket_full_ratioRatio (in percent) of queue filling
[in]queue_delay_msAverage queuing delay in milliseconds

References BSSGP_IE_BMAX_DEFAULT_MS, BSSGP_IE_BUCKET_FULL_RATIO, BSSGP_IE_BUCKET_LEAK_RATE, BSSGP_IE_BVC_BUCKET_SIZE, BSSGP_IE_BVC_MEASUREMENT, BSSGP_IE_R_DEFAULT_MS, BSSGP_IE_TAG, bssgp_msgb_alloc(), bssgp_ns_send, bssgp_ns_send_data, BSSGP_PDUT_FLOW_CONTROL_BVC, bssgp_bvc_ctx::bvci, msg, msgb_bvci, msgb_nsei, msgb_put(), msgb_tvlv_put(), bssgp_bvc_ctx::nsei, osmo_htons, and bssgp_normal_hdr::pdu_type.

◆ bssgp_tx_fc_ms()

int bssgp_tx_fc_ms ( struct bssgp_bvc_ctx bctx,
uint32_t  tlli,
uint8_t  tag,
uint32_t  ms_bucket_size,
uint32_t  bucket_leak_rate,
uint8_t *  bucket_full_ratio 
)

Transmit a FLOW_CONTROL-MS (Chapter 10.4.6)

Parameters
[in]bctxBVC Context
[in]tlliTLLI to identify MS
[in]tagAdditional tag to identify acknowledge
[in]ms_bucket_sizeMaximum bucket size in octets
[in]bucket_leak_rateBucket leak rate in octets/sec
[in]bucket_full_ratioRatio (in percent) of queue filling

References BSSGP_IE_BUCKET_FULL_RATIO, BSSGP_IE_BUCKET_LEAK_RATE, BSSGP_IE_MS_BUCKET_SIZE, BSSGP_IE_TAG, bssgp_msgb_alloc(), bssgp_msgb_tlli_put(), bssgp_ns_send, bssgp_ns_send_data, BSSGP_PDUT_FLOW_CONTROL_MS, bssgp_bvc_ctx::bvci, msg, msgb_bvci, msgb_nsei, msgb_put(), msgb_tvlv_put(), bssgp_bvc_ctx::nsei, bssgp_normal_hdr::pdu_type, and tlli.

◆ bssgp_tx_flush_ll_ack()

int bssgp_tx_flush_ll_ack ( struct bssgp_bvc_ctx bctx,
uint32_t  tlli,
uint8_t  action,
uint16_t  bvci_new,
uint32_t  num_octets 
)

◆ bssgp_tx_llc_discarded()

◆ bssgp_tx_ra_capa_upd()

int bssgp_tx_ra_capa_upd ( struct bssgp_bvc_ctx bctx,
uint32_t  tlli,
uint8_t  tag 
)

◆ bssgp_tx_radio_status_imsi()

int bssgp_tx_radio_status_imsi ( struct bssgp_bvc_ctx bctx,
uint8_t  cause,
const char *  imsi 
)

◆ bssgp_tx_radio_status_tlli()

int bssgp_tx_radio_status_tlli ( struct bssgp_bvc_ctx bctx,
uint8_t  cause,
uint32_t  tlli 
)

Transmit RADIO-STATUS for TLLI (10.3.5)

References bssgp_msgb_tlli_put(), cause, common_tx_radio_status(), common_tx_radio_status2(), DLBSSGP, LOGL_NOTICE, LOGPC, msg, and tlli.

◆ bssgp_tx_radio_status_tmsi()

int bssgp_tx_radio_status_tmsi ( struct bssgp_bvc_ctx bctx,
uint8_t  cause,
uint32_t  tmsi 
)

◆ bssgp_tx_resume()

int bssgp_tx_resume ( uint16_t  nsei,
uint32_t  tlli,
const struct gprs_ra_id ra_id,
uint8_t  suspend_ref 
)

◆ bssgp_tx_suspend()

int bssgp_tx_suspend ( uint16_t  nsei,
uint32_t  tlli,
const struct gprs_ra_id ra_id 
)

◆ bssgp_tx_ul_ud()

int bssgp_tx_ul_ud ( struct bssgp_bvc_ctx bctx,
uint32_t  tlli,
const uint8_t *  qos_profile,
struct msgb llc_pdu 
)