libosmogb 1.9.0.196-9975
Osmocom Gb library
bssgp_bvc_fsm.h File Reference
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  bssgp_bvc_fsm_ops
 

Enumerations

enum  bssp_ptp_bvc_fsm_state {
  BSSGP_BVCFSM_S_NULL ,
  BSSGP_BVCFSM_S_BLOCKED ,
  BSSGP_BVCFSM_S_WAIT_RESET_ACK ,
  BSSGP_BVCFSM_S_UNBLOCKED
}
 
enum  bssgp_ptp_bvc_fsm_event {
  BSSGP_BVCFSM_E_RX_BLOCK ,
  BSSGP_BVCFSM_E_RX_BLOCK_ACK ,
  BSSGP_BVCFSM_E_RX_UNBLOCK ,
  BSSGP_BVCFSM_E_RX_UNBLOCK_ACK ,
  BSSGP_BVCFSM_E_RX_RESET ,
  BSSGP_BVCFSM_E_RX_RESET_ACK ,
  BSSGP_BVCFSM_E_RX_FC_BVC ,
  BSSGP_BVCFSM_E_RX_FC_BVC_ACK ,
  BSSGP_BVCFSM_E_REQ_BLOCK ,
  BSSGP_BVCFSM_E_REQ_UNBLOCK ,
  BSSGP_BVCFSM_E_REQ_RESET ,
  BSSGP_BVCFSM_E_REQ_FC_BVC
}
 

Functions

struct osmo_fsm_instbssgp_bvc_fsm_alloc_sig_bss (void *ctx, struct gprs_ns2_inst *nsi, uint16_t nsei, uint32_t features)
 Allocate a SIGNALING-BVC FSM for the BSS role (facing a remote SGSN). More...
 
struct osmo_fsm_instbssgp_bvc_fsm_alloc_ptp_bss (void *ctx, struct gprs_ns2_inst *nsi, uint16_t nsei, uint16_t bvci, const struct gprs_ra_id *ra_id, uint16_t cell_id)
 Allocate a PTP-BVC FSM for the BSS role (facing a remote SGSN). More...
 
struct osmo_fsm_instbssgp_bvc_fsm_alloc_sig_sgsn (void *ctx, struct gprs_ns2_inst *nsi, uint16_t nsei, uint32_t features)
 Allocate a SIGNALING-BVC FSM for the SGSN role (facing a remote BSS). More...
 
struct osmo_fsm_instbssgp_bvc_fsm_alloc_ptp_sgsn (void *ctx, struct gprs_ns2_inst *nsi, uint16_t nsei, uint16_t bvci)
 Allocate a PTP-BVC FSM for the SGSN role (facing a remote BSS). More...
 
void bssgp_bvc_fsm_set_ops (struct osmo_fsm_inst *fi, const struct bssgp_bvc_fsm_ops *ops, void *ops_priv)
 Set the 'operations' callbacks + private data. More...
 
bool bssgp_bvc_fsm_is_unblocked (struct osmo_fsm_inst *fi)
 Return if the given BVC FSM is in UNBLOCKED state. More...
 
uint8_t bssgp_bvc_fsm_get_block_cause (struct osmo_fsm_inst *fi)
 Determine the cause value why given BVC FSM is blocked. More...
 
uint32_t bssgp_bvc_fsm_get_features_advertised (struct osmo_fsm_inst *fi)
 Return the advertised features / extended features. More...
 
uint32_t bssgp_bvc_fsm_get_features_received (struct osmo_fsm_inst *fi)
 Return the received features / extended features. More...
 
uint32_t bssgp_bvc_fsm_get_features_negotiated (struct osmo_fsm_inst *fi)
 Return the negotiated features / extended features. More...
 
void bssgp_bvc_fsm_set_max_pdu_len (struct osmo_fsm_inst *fi, uint16_t max_pdu_len)
 Set the maximum size of a BSSGP PDU. More...
 
uint16_t bssgp_bvc_fsm_get_max_pdu_len (const struct osmo_fsm_inst *fi)
 Return the maximum size of a BSSGP PDU ! On the NS layer this corresponds to the size of an NS SDU in NS-UNITDATA (3GPP TS 48.016 Ch. More...
 

Enumeration Type Documentation

◆ bssgp_ptp_bvc_fsm_event

Enumerator
BSSGP_BVCFSM_E_RX_BLOCK 
BSSGP_BVCFSM_E_RX_BLOCK_ACK 
BSSGP_BVCFSM_E_RX_UNBLOCK 
BSSGP_BVCFSM_E_RX_UNBLOCK_ACK 
BSSGP_BVCFSM_E_RX_RESET 
BSSGP_BVCFSM_E_RX_RESET_ACK 
BSSGP_BVCFSM_E_RX_FC_BVC 
BSSGP_BVCFSM_E_RX_FC_BVC_ACK 
BSSGP_BVCFSM_E_REQ_BLOCK 
BSSGP_BVCFSM_E_REQ_UNBLOCK 
BSSGP_BVCFSM_E_REQ_RESET 
BSSGP_BVCFSM_E_REQ_FC_BVC 

◆ bssp_ptp_bvc_fsm_state

Enumerator
BSSGP_BVCFSM_S_NULL 
BSSGP_BVCFSM_S_BLOCKED 
BSSGP_BVCFSM_S_WAIT_RESET_ACK 
BSSGP_BVCFSM_S_UNBLOCKED 

Function Documentation

◆ bssgp_bvc_fsm_alloc_ptp_bss()

struct osmo_fsm_inst * bssgp_bvc_fsm_alloc_ptp_bss ( void *  ctx,
struct gprs_ns2_inst nsi,
uint16_t  nsei,
uint16_t  bvci,
const struct gprs_ra_id ra_id,
uint16_t  cell_id 
)

Allocate a PTP-BVC FSM for the BSS role (facing a remote SGSN).

Parameters
[in]ctxtalloc context from which to allocate
[in]nsiNS Instance on which this BVC operates
[in]nseiNS Entity Identifier on which this BVC operates
[in]bvciBVCI of this FSM
[in]ra_idRouting Area Identity of the cell (reported to SGSN)
[in]cell_idCell Identifier of the cell (reported to SGSN)
Returns
newly-allocated FSM Instance; NULL in case of error

References _bvc_fsm_alloc(), bvci, bvc_fsm_priv::cell_id, nsei, bvc_fsm_priv::nsi, OSMO_ASSERT, osmo_fsm_inst::priv, and bvc_fsm_priv::ra_id.

◆ bssgp_bvc_fsm_alloc_ptp_sgsn()

struct osmo_fsm_inst * bssgp_bvc_fsm_alloc_ptp_sgsn ( void *  ctx,
struct gprs_ns2_inst nsi,
uint16_t  nsei,
uint16_t  bvci 
)

Allocate a PTP-BVC FSM for the SGSN role (facing a remote BSS).

Parameters
[in]ctxtalloc context from which to allocate
[in]nsiNS Instance on which this BVC operates
[in]nseiNS Entity Identifier on which this BVC operates
[in]bvciBVCI of this FSM
Returns
newly-allocated FSM Instance; NULL in case of error

References _bvc_fsm_alloc(), bvci, nsei, and OSMO_ASSERT.

◆ bssgp_bvc_fsm_alloc_sig_bss()

struct osmo_fsm_inst * bssgp_bvc_fsm_alloc_sig_bss ( void *  ctx,
struct gprs_ns2_inst nsi,
uint16_t  nsei,
uint32_t  features 
)

Allocate a SIGNALING-BVC FSM for the BSS role (facing a remote SGSN).

Parameters
[in]ctxtalloc context from which to allocate
[in]nsiNS Instance on which this BVC operates
[in]nseiNS Entity Identifier on which this BVC operates
[in]featuresFeature [byte 0] and Extended Feature [byte 1] bitmap
Returns
newly-allocated FSM Instance; NULL in case of error

References _bvc_fsm_alloc(), bvc_fsm_priv::advertised, bvc_fsm_priv::features, nsei, and osmo_fsm_inst::priv.

◆ bssgp_bvc_fsm_alloc_sig_sgsn()

struct osmo_fsm_inst * bssgp_bvc_fsm_alloc_sig_sgsn ( void *  ctx,
struct gprs_ns2_inst nsi,
uint16_t  nsei,
uint32_t  features 
)

Allocate a SIGNALING-BVC FSM for the SGSN role (facing a remote BSS).

Parameters
[in]ctxtalloc context from which to allocate
[in]nsiNS Instance on which this BVC operates
[in]nseiNS Entity Identifier on which this BVC operates
[in]featuresFeature [byte 0] and Extended Feature [byte 1] bitmap
Returns
newly-allocated FSM Instance; NULL in case of error

References _bvc_fsm_alloc(), bvc_fsm_priv::advertised, bvc_fsm_priv::features, nsei, and osmo_fsm_inst::priv.

◆ bssgp_bvc_fsm_get_block_cause()

uint8_t bssgp_bvc_fsm_get_block_cause ( struct osmo_fsm_inst fi)

Determine the cause value why given BVC FSM is blocked.

References bvc_fsm_priv::block_cause, bssgp_bvc_fsm, osmo_fsm_inst::fsm, OSMO_ASSERT, and osmo_fsm_inst::priv.

◆ bssgp_bvc_fsm_get_features_advertised()

uint32_t bssgp_bvc_fsm_get_features_advertised ( struct osmo_fsm_inst fi)

Return the advertised features / extended features.

References bvc_fsm_priv::advertised, bssgp_bvc_fsm, bvc_fsm_priv::features, osmo_fsm_inst::fsm, OSMO_ASSERT, and osmo_fsm_inst::priv.

◆ bssgp_bvc_fsm_get_features_negotiated()

uint32_t bssgp_bvc_fsm_get_features_negotiated ( struct osmo_fsm_inst fi)

Return the negotiated features / extended features.

References bssgp_bvc_fsm, bvc_fsm_priv::features, osmo_fsm_inst::fsm, bvc_fsm_priv::negotiated, OSMO_ASSERT, and osmo_fsm_inst::priv.

◆ bssgp_bvc_fsm_get_features_received()

uint32_t bssgp_bvc_fsm_get_features_received ( struct osmo_fsm_inst fi)

Return the received features / extended features.

References bssgp_bvc_fsm, bvc_fsm_priv::features, osmo_fsm_inst::fsm, OSMO_ASSERT, osmo_fsm_inst::priv, and bvc_fsm_priv::received.

◆ bssgp_bvc_fsm_get_max_pdu_len()

uint16_t bssgp_bvc_fsm_get_max_pdu_len ( const struct osmo_fsm_inst fi)

Return the maximum size of a BSSGP PDU ! On the NS layer this corresponds to the size of an NS SDU in NS-UNITDATA (3GPP TS 48.016 Ch.

9.2.10)

References bssgp_bvc_fsm, osmo_fsm_inst::fsm, bvc_fsm_priv::max_pdu_len, OSMO_ASSERT, and osmo_fsm_inst::priv.

◆ bssgp_bvc_fsm_is_unblocked()

bool bssgp_bvc_fsm_is_unblocked ( struct osmo_fsm_inst fi)

Return if the given BVC FSM is in UNBLOCKED state.

References BSSGP_BVCFSM_S_UNBLOCKED, and osmo_fsm_inst::state.

◆ bssgp_bvc_fsm_set_max_pdu_len()

void bssgp_bvc_fsm_set_max_pdu_len ( struct osmo_fsm_inst fi,
uint16_t  max_pdu_len 
)

Set the maximum size of a BSSGP PDU.

! On the NS layer this corresponds to the size of an NS SDU in NS-UNITDATA (3GPP TS 48.016 Ch. 9.2.10)

References bssgp_bvc_fsm, osmo_fsm_inst::fsm, bvc_fsm_priv::max_pdu_len, OSMO_ASSERT, and osmo_fsm_inst::priv.

◆ bssgp_bvc_fsm_set_ops()

void bssgp_bvc_fsm_set_ops ( struct osmo_fsm_inst fi,
const struct bssgp_bvc_fsm_ops ops,
void *  ops_priv 
)

Set the 'operations' callbacks + private data.

Parameters
[in]fiFSM instance for which the data shall be set
[in]opsBSSGP BVC FSM operations (call-back functions) to register
[in]ops_privopaque/private data pointer passed through to call-backs

References bssgp_bvc_fsm, osmo_fsm_inst::fsm, bvc_fsm_priv::ops, bvc_fsm_priv::ops_priv, OSMO_ASSERT, and osmo_fsm_inst::priv.