libosmogb 1.13.1.1-afb4 Osmocom Gb library

Data Structures | Macros | Functions | Variables
bssgp_bvc_fsm.c File Reference
`#include <string.h>`
`#include <stdio.h>`
`#include <osmocom/core/fsm.h>`
`#include <osmocom/core/logging.h>`
`#include <osmocom/core/utils.h>`
`#include <osmocom/core/tdef.h>`
`#include <osmocom/gsm/gsm48.h>`
`#include <osmocom/gsm/tlv.h>`
`#include <osmocom/gprs/gprs_msgb.h>`
`#include <osmocom/gprs/gprs_bssgp.h>`
`#include <osmocom/gprs/gprs_bssgp2.h>`
`#include <osmocom/gprs/bssgp_bvc_fsm.h>`
`#include "common_vty.h"`

## Data Structures
struct | bvc_fsm_priv

## Macros
#define | S(x) (1 << (x))
#define | T1 1
#define | T2 2
#define | T1_SECS osmo_tdef_get(bssgp_bvc_fsm_tdefs, 1, OSMO_TDEF_S, 5)
#define | T2_SECS osmo_tdef_get(bssgp_bvc_fsm_tdefs, 2, OSMO_TDEF_S, 10)

## Functions
static int | fi_tx_ptp (struct osmo_fsm_inst *fi, struct msgb *msg)
static int | fi_tx_sig (struct osmo_fsm_inst *fi, struct msgb *msg)
static void | _tx_bvc_reset (struct osmo_fsm_inst *fi, uint8_t cause)
static void | _tx_bvc_reset_ack (struct osmo_fsm_inst *fi)
static void | _tx_status (struct osmo_fsm_inst *fi, enum gprs_bssgp_cause cause, const struct msgb *rx)
static void | update_negotiated_features (struct osmo_fsm_inst *fi, const struct tlv_parsed *tp)
static void | _onenter_tail (struct osmo_fsm_inst *fi, uint32_t prev_state)
static void | bssgp_bvc_fsm_null (struct osmo_fsm_inst *fi, uint32_t event, void *data)
static void | bssgp_bvc_fsm_blocked_onenter (struct osmo_fsm_inst *fi, uint32_t prev_state)
static void | bssgp_bvc_fsm_blocked (struct osmo_fsm_inst *fi, uint32_t event, void *data)
static void | bssgp_bvc_fsm_wait_reset_ack (struct osmo_fsm_inst *fi, uint32_t event, void *data)
static void | bssgp_bvc_fsm_unblocked (struct osmo_fsm_inst *fi, uint32_t event, void *data)
static void | bssgp_bvc_fsm_allstate (struct osmo_fsm_inst *fi, uint32_t event, void *data)
static int | bssgp_bvc_fsm_timer_cb (struct osmo_fsm_inst *fi)
static struct osmo_fsm_inst * | _bvc_fsm_alloc (void *ctx, struct gprs_ns2_inst *nsi, bool role_sgsn, uint16_t nsei, uint16_t bvci)
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). More...
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). More...
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). More...
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). 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...
static | __attribute__ ((constructor))

## Variables
struct osmo_tdef | bssgp_bvc_fsm_tdefs []
static struct osmo_fsm | bssgp_bvc_fsm
static const struct value_string | ptp_bvc_event_names []
static const struct osmo_fsm_state | bssgp_bvc_fsm_states []

## Macro Definition Documentation

## ◆ S

#define S | ( |  | x | ) | (1 << (x))

## ◆ T1

#define T1 1

## ◆ T1_SECS

#define T1_SECS osmo_tdef_get(bssgp_bvc_fsm_tdefs, 1, OSMO_TDEF_S, 5)

## ◆ T2

#define T2 2

## ◆ T2_SECS

#define T2_SECS osmo_tdef_get(bssgp_bvc_fsm_tdefs, 2, OSMO_TDEF_S, 10)

## Function Documentation

## ◆ __attribute__()

static __attribute__ | ( | (constructor) |  | ) |
| static

References bssgp_bvc_fsm, OSMO_ASSERT, and osmo_fsm_register().

## ◆ _bvc_fsm_alloc()

static struct osmo_fsm_inst * _bvc_fsm_alloc | ( | void * | ctx,
|  | struct gprs_ns2_inst * | nsi,
|  | bool | role_sgsn,
|  | uint16_t | nsei,
|  | uint16_t | bvci
| ) |  |
| static

References bssgp_bvc_fsm, bvci, bvc_fsm_priv::bvci, LOGL_INFO, bvc_fsm_priv::max_pdu_len, nsei, bvc_fsm_priv::nsei, bvc_fsm_priv::nsi, osmo_fsm_inst_alloc(), osmo_fsm_inst_free(), osmo_fsm_inst::priv, and bvc_fsm_priv::role_sgsn.

Referenced by bssgp_bvc_fsm_alloc_ptp_bss(), bssgp_bvc_fsm_alloc_ptp_sgsn(), bssgp_bvc_fsm_alloc_sig_bss(), and bssgp_bvc_fsm_alloc_sig_sgsn().

## ◆ _onenter_tail()

static void _onenter_tail | ( | struct osmo_fsm_inst * | fi,
|  | uint32_t | prev_state
| ) |  |
| static

References bvc_fsm_priv::bvci, bvc_fsm_priv::nsei, bvc_fsm_priv::ops, bvc_fsm_priv::ops_priv, osmo_fsm_inst::priv, osmo_fsm_inst::state, and bssgp_bvc_fsm_ops::state_chg_notification.

Referenced by bssgp_bvc_fsm_blocked_onenter().

## ◆ _tx_bvc_reset()

static void _tx_bvc_reset | ( | struct osmo_fsm_inst * | fi,
|  | uint8_t | cause
| ) |  |
| static

References bvc_fsm_priv::advertised, bssgp2_enc_bvc_reset(), bssgp_bvc_fsm, bvc_fsm_priv::bvci, cause, bvc_fsm_priv::cell_id, bvc_fsm_priv::features, fi_tx_sig(), osmo_fsm_inst::fsm, OSMO_ASSERT, osmo_fsm_inst::priv, bvc_fsm_priv::ra_id, and bvc_fsm_priv::role_sgsn.

Referenced by bssgp_bvc_fsm_allstate(), and bssgp_bvc_fsm_timer_cb().

## ◆ _tx_bvc_reset_ack()

static void _tx_bvc_reset_ack | ( | struct osmo_fsm_inst * | fi | ) |
| static

References bvc_fsm_priv::advertised, bssgp2_enc_bvc_reset_ack(), bssgp_bvc_fsm, bvc_fsm_priv::bvci, bvc_fsm_priv::cell_id, bvc_fsm_priv::features, fi_tx_sig(), osmo_fsm_inst::fsm, OSMO_ASSERT, osmo_fsm_inst::priv, bvc_fsm_priv::ra_id, and bvc_fsm_priv::role_sgsn.

Referenced by bssgp_bvc_fsm_allstate(), and bssgp_bvc_fsm_timer_cb().

## ◆ _tx_status()

static void _tx_status | ( | struct osmo_fsm_inst * | fi,
|  | enum gprs_bssgp_cause | cause,
|  | const struct msgb * | rx
| ) |  |
| static

References bssgp2_enc_status(), BSSGP_CAUSE_BVCI_BLOCKED, BSSGP_CAUSE_UNKNOWN_BVCI, bvci, bvc_fsm_priv::bvci, cause, fi_tx_ptp(), fi_tx_sig(), bvc_fsm_priv::max_pdu_len, msgb_bvci, and osmo_fsm_inst::priv.

Referenced by bssgp_bvc_fsm_blocked(), and bssgp_bvc_fsm_unblocked().

## ◆ 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] | ctx | talloc context from which to allocate
  [in] | nsi | NS Instance on which this BVC operates
  [in] | nsei | NS Entity Identifier on which this BVC operates
  [in] | bvci | BVCI of this FSM
  [in] | ra_id | Routing Area Identity of the cell (reported to SGSN)
  [in] | cell_id | Cell 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] | ctx | talloc context from which to allocate
  [in] | nsi | NS Instance on which this BVC operates
  [in] | nsei | NS Entity Identifier on which this BVC operates
  [in] | bvci | BVCI 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] | ctx | talloc context from which to allocate
  [in] | nsi | NS Instance on which this BVC operates
  [in] | nsei | NS Entity Identifier on which this BVC operates
  [in] | features | Feature [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] | ctx | talloc context from which to allocate
  [in] | nsi | NS Instance on which this BVC operates
  [in] | nsei | NS Entity Identifier on which this BVC operates
  [in] | features | Feature [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_allstate()

static void bssgp_bvc_fsm_allstate | ( | struct osmo_fsm_inst * | fi,
|  | uint32_t | event,
|  | void * | data
| ) |  |
| static

References _tx_bvc_reset(), _tx_bvc_reset_ack(), BSSGP_BVCFSM_E_REQ_RESET, BSSGP_BVCFSM_E_RX_RESET, BSSGP_BVCFSM_S_UNBLOCKED, BSSGP_BVCFSM_S_WAIT_RESET_ACK, bssgp_cause_str(), BSSGP_IE_CAUSE, BSSGP_IE_CELL_ID, bssgp_parse_cell_id(), bvc_fsm_priv::bvci, cause, bvc_fsm_priv::cell_id, data, bvc_fsm_priv::last_reset_cause, bvc_fsm_priv::locally_blocked, LOGL_NOTICE, LOGPFSML, msgb_bcid, bvc_fsm_priv::nsei, bvc_fsm_priv::ops, bvc_fsm_priv::ops_priv, osmo_fsm_inst_state_chg, osmo_fsm_inst::priv, bvc_fsm_priv::ra_id, bssgp_bvc_fsm_ops::reset_notification, bvc_fsm_priv::role_sgsn, T2, T2_SECS, TLVP_VAL, and update_negotiated_features().

## ◆ bssgp_bvc_fsm_blocked()

static void bssgp_bvc_fsm_blocked | ( | struct osmo_fsm_inst * | fi,
|  | uint32_t | event,
|  | void * | data
| ) |  |
| static

References _tx_status(), bssgp2_enc_bvc_block_ack(), bssgp2_enc_bvc_unblock(), bssgp2_enc_bvc_unblock_ack(), BSSGP_BVCFSM_E_REQ_UNBLOCK, BSSGP_BVCFSM_E_RX_BLOCK, BSSGP_BVCFSM_E_RX_BLOCK_ACK, BSSGP_BVCFSM_E_RX_UNBLOCK, BSSGP_BVCFSM_S_BLOCKED, BSSGP_BVCFSM_S_UNBLOCKED, BSSGP_CAUSE_SEM_INCORR_PDU, bssgp_cause_str(), BSSGP_IE_CAUSE, bvc_fsm_priv::bvci, cause, data, fi_tx_sig(), bvc_fsm_priv::locally_blocked, LOGL_ERROR, LOGL_NOTICE, LOGPFSML, msgb_bcid, osmo_fsm_inst_state_chg, osmo_fsm_inst::priv, bvc_fsm_priv::role_sgsn, T1, T1_SECS, and TLVP_VAL.

## ◆ bssgp_bvc_fsm_blocked_onenter()

static void bssgp_bvc_fsm_blocked_onenter | ( | struct osmo_fsm_inst * | fi,
|  | uint32_t | prev_state
| ) |  |
| static

References _onenter_tail(), bvc_fsm_priv::bvci, OSMO_ASSERT, 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_null()

static void bssgp_bvc_fsm_null | ( | struct osmo_fsm_inst * | fi,
|  | uint32_t | event,
|  | void * | data
| ) |  |
| static

References OSMO_ASSERT.

## ◆ 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] | fi | FSM instance for which the data shall be set
  [in] | ops | BSSGP BVC FSM operations (call-back functions) to register
  [in] | ops_priv | opaque/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.

## ◆ bssgp_bvc_fsm_timer_cb()

static int bssgp_bvc_fsm_timer_cb | ( | struct osmo_fsm_inst * | fi | ) |
| static

References _tx_bvc_reset(), _tx_bvc_reset_ack(), bvc_fsm_priv::block_cause, bssgp2_enc_bvc_block(), bssgp2_enc_bvc_unblock(), BSSGP_BVCFSM_S_BLOCKED, BSSGP_BVCFSM_S_UNBLOCKED, BSSGP_BVCFSM_S_WAIT_RESET_ACK, bvc_fsm_priv::bvci, fi_tx_sig(), bvc_fsm_priv::last_reset_cause, OSMO_ASSERT, osmo_fsm_inst_state_chg, osmo_fsm_inst::priv, osmo_fsm_inst::state, osmo_fsm_inst::T, T1, T1_SECS, T2, and T2_SECS.

## ◆ bssgp_bvc_fsm_unblocked()

static void bssgp_bvc_fsm_unblocked | ( | struct osmo_fsm_inst * | fi,
|  | uint32_t | event,
|  | void * | data
| ) |  |
| static

References _tx_status(), bvc_fsm_priv::block_cause, bssgp2_dec_fc_bvc(), bssgp2_enc_bvc_block(), bssgp2_enc_bvc_block_ack(), bssgp2_enc_fc_bvc(), bssgp2_enc_fc_bvc_ack(), BSSGP_BVCFSM_E_REQ_BLOCK, BSSGP_BVCFSM_E_REQ_FC_BVC, BSSGP_BVCFSM_E_RX_BLOCK, BSSGP_BVCFSM_E_RX_FC_BVC, BSSGP_BVCFSM_E_RX_FC_BVC_ACK, BSSGP_BVCFSM_E_RX_UNBLOCK, BSSGP_BVCFSM_E_RX_UNBLOCK_ACK, BSSGP_BVCFSM_S_BLOCKED, BSSGP_BVCFSM_S_UNBLOCKED, BSSGP_CAUSE_SEM_INCORR_PDU, bssgp_cause_str(), BSSGP_IE_CAUSE, BSSGP_PDUT_BVC_UNBLOCK_ACK, bssgp_tx_simple_bvci(), BSSGP_XFEAT_GBIT, bvc_fsm_priv::bvci, data, bvc_fsm_priv::fc_granularity, bvc_fsm_priv::features, fi_tx_ptp(), fi_tx_sig(), bvc_fsm_priv::locally_blocked, LOGL_ERROR, LOGL_NOTICE, LOGPFSML, msgb_bcid, bvc_fsm_priv::negotiated, bvc_fsm_priv::nsei, bvc_fsm_priv::ops, bvc_fsm_priv::ops_priv, OSMO_ASSERT, osmo_fsm_inst_state_chg, osmo_fsm_inst::priv, bvc_fsm_priv::role_sgsn, bssgp_bvc_fsm_ops::rx_fc_bvc, T1, T1_SECS, bssgp2_flow_ctrl::tag, and TLVP_VAL.

## ◆ bssgp_bvc_fsm_wait_reset_ack()

static void bssgp_bvc_fsm_wait_reset_ack | ( | struct osmo_fsm_inst * | fi,
|  | uint32_t | event,
|  | void * | data
| ) |  |
| static

References bvc_fsm_priv::block_cause, bssgp2_enc_bvc_block(), BSSGP_BVCFSM_E_RX_RESET, BSSGP_BVCFSM_E_RX_RESET_ACK, BSSGP_BVCFSM_S_BLOCKED, BSSGP_BVCFSM_S_UNBLOCKED, BSSGP_IE_CELL_ID, bssgp_parse_cell_id(), bvc_fsm_priv::bvci, cause, bvc_fsm_priv::cell_id, data, fi_tx_sig(), bvc_fsm_priv::last_reset_cause, bvc_fsm_priv::locally_blocked, msgb_bcid, bvc_fsm_priv::nsei, bvc_fsm_priv::ops, bvc_fsm_priv::ops_priv, osmo_fsm_inst_state_chg, osmo_fsm_inst::priv, bvc_fsm_priv::ra_id, bssgp_bvc_fsm_ops::reset_ack_notification, bvc_fsm_priv::role_sgsn, T1, T1_SECS, TLVP_VAL, and update_negotiated_features().

## ◆ fi_tx_ptp()

static int fi_tx_ptp | ( | struct osmo_fsm_inst * | fi,
|  | struct msgb * | msg
| ) |  |
| static

References bssgp2_nsi_tx_ptp(), bssgp_bvc_fsm, bvc_fsm_priv::bvci, osmo_fsm_inst::fsm, LOGPFSM, msg, msgb_bssgph, bvc_fsm_priv::nsei, bvc_fsm_priv::nsi, OSMO_ASSERT, osmo_pdef_bssgp, osmo_tlv_prot_msg_name(), bssgp_normal_hdr::pdu_type, and osmo_fsm_inst::priv.

Referenced by _tx_status(), and bssgp_bvc_fsm_unblocked().

## ◆ fi_tx_sig()

static int fi_tx_sig | ( | struct osmo_fsm_inst * | fi,
|  | struct msgb * | msg
| ) |  |
| static

References bssgp2_nsi_tx_sig(), bssgp_bvc_fsm, osmo_fsm_inst::fsm, LOGPFSM, msg, msgb_bssgph, bvc_fsm_priv::nsei, bvc_fsm_priv::nsi, OSMO_ASSERT, osmo_pdef_bssgp, osmo_tlv_prot_msg_name(), bssgp_normal_hdr::pdu_type, and osmo_fsm_inst::priv.

Referenced by _tx_bvc_reset(), _tx_bvc_reset_ack(), _tx_status(), bssgp_bvc_fsm_blocked(), bssgp_bvc_fsm_timer_cb(), bssgp_bvc_fsm_unblocked(), and bssgp_bvc_fsm_wait_reset_ack().

## ◆ update_negotiated_features()

static void update_negotiated_features | ( | struct osmo_fsm_inst * | fi,
|  | const struct tlv_parsed * | tp
| ) |  |
| static

References bvc_fsm_priv::advertised, bssgp_bvc_fsm, BSSGP_IE_EXT_FEATURE_BITMAP, BSSGP_IE_FEATURE_BITMAP, bvc_fsm_priv::features, osmo_fsm_inst::fsm, LOGL_NOTICE, LOGPFSML, bvc_fsm_priv::negotiated, OSMO_ASSERT, osmo_fsm_inst::priv, bvc_fsm_priv::received, TLVP_PRES_LEN, and TLVP_VAL.

Referenced by bssgp_bvc_fsm_allstate(), and bssgp_bvc_fsm_wait_reset_ack().

## Variable Documentation

## ◆ bssgp_bvc_fsm

static struct osmo_fsm bssgp_bvc_fsm
| static

Initial value:
= {
.name = "BSSGP-BVC",
.states = bssgp_bvc_fsm_states,
.num_states = ARRAY_SIZE(bssgp_bvc_fsm_states),
.allstate_event_mask = S(BSSGP_BVCFSM_E_REQ_RESET) |
S(BSSGP_BVCFSM_E_RX_RESET),
.allstate_action = bssgp_bvc_fsm_allstate,
.timer_cb = bssgp_bvc_fsm_timer_cb,
.log_subsys = DLBSSGP,
.event_names = ptp_bvc_event_names,
}
bssgp_bvc_fsm_states
static const struct osmo_fsm_state bssgp_bvc_fsm_states[]
Definition: bssgp_bvc_fsm.c:596
bssgp_bvc_fsm_allstate
static void bssgp_bvc_fsm_allstate(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: bssgp_bvc_fsm.c:514
S
#define S(x)
Definition: bssgp_bvc_fsm.c:42
ptp_bvc_event_names
static const struct value_string ptp_bvc_event_names[]
Definition: bssgp_bvc_fsm.c:97
bssgp_bvc_fsm_timer_cb
static int bssgp_bvc_fsm_timer_cb(struct osmo_fsm_inst *fi)
Definition: bssgp_bvc_fsm.c:551
BSSGP_BVCFSM_E_REQ_RESET
@ BSSGP_BVCFSM_E_REQ_RESET
Definition: bssgp_bvc_fsm.h:31
BSSGP_BVCFSM_E_RX_RESET
@ BSSGP_BVCFSM_E_RX_RESET
Definition: bssgp_bvc_fsm.h:24
DLBSSGP
#define DLBSSGP
ARRAY_SIZE
#define ARRAY_SIZE(x)

Referenced by __attribute__(), _bvc_fsm_alloc(), _tx_bvc_reset(), _tx_bvc_reset_ack(), bssgp_bvc_fsm_get_block_cause(), bssgp_bvc_fsm_get_features_advertised(), bssgp_bvc_fsm_get_features_negotiated(), bssgp_bvc_fsm_get_features_received(), bssgp_bvc_fsm_get_max_pdu_len(), bssgp_bvc_fsm_set_max_pdu_len(), bssgp_bvc_fsm_set_ops(), fi_tx_ptp(), fi_tx_sig(), and update_negotiated_features().

## ◆ bssgp_bvc_fsm_states

const struct osmo_fsm_state bssgp_bvc_fsm_states[]
| static

## ◆ bssgp_bvc_fsm_tdefs

struct osmo_tdef bssgp_bvc_fsm_tdefs[]

## ◆ ptp_bvc_event_names

const struct value_string ptp_bvc_event_names[]
| static

Initial value:
= {
{ BSSGP_BVCFSM_E_RX_BLOCK, "RX-BVC-BLOCK" },
{ BSSGP_BVCFSM_E_RX_BLOCK_ACK, "RX-BVC-BLOCK-ACK" },
{ BSSGP_BVCFSM_E_RX_UNBLOCK, "RX-BVC-UNBLOCK" },
{ BSSGP_BVCFSM_E_RX_UNBLOCK_ACK, "RX-BVC-UNBLOCK-ACK" },
{ BSSGP_BVCFSM_E_RX_RESET, "RX-BVC-RESET" },
{ BSSGP_BVCFSM_E_RX_RESET_ACK, "RX-BVC-RESET-ACK" },
{ BSSGP_BVCFSM_E_RX_FC_BVC, "RX-FLOW-CONTROL-BVC" },
{ BSSGP_BVCFSM_E_RX_FC_BVC_ACK, "RX-FLOW-CONTROL-BVC-ACK" },
{ BSSGP_BVCFSM_E_REQ_BLOCK, "REQ-BLOCK" },
{ BSSGP_BVCFSM_E_REQ_UNBLOCK, "REQ-UNBLOCK" },
{ BSSGP_BVCFSM_E_REQ_RESET, "REQ-RESET" },
{ BSSGP_BVCFSM_E_REQ_FC_BVC, "REQ-FLOW-CONTROL-BVC" },
{ 0, NULL }
}
BSSGP_BVCFSM_E_RX_FC_BVC_ACK
@ BSSGP_BVCFSM_E_RX_FC_BVC_ACK
Definition: bssgp_bvc_fsm.h:27
BSSGP_BVCFSM_E_RX_BLOCK_ACK
@ BSSGP_BVCFSM_E_RX_BLOCK_ACK
Definition: bssgp_bvc_fsm.h:21
BSSGP_BVCFSM_E_REQ_FC_BVC
@ BSSGP_BVCFSM_E_REQ_FC_BVC
Definition: bssgp_bvc_fsm.h:32
BSSGP_BVCFSM_E_RX_UNBLOCK_ACK
@ BSSGP_BVCFSM_E_RX_UNBLOCK_ACK
Definition: bssgp_bvc_fsm.h:23
BSSGP_BVCFSM_E_RX_FC_BVC
@ BSSGP_BVCFSM_E_RX_FC_BVC
Definition: bssgp_bvc_fsm.h:26
BSSGP_BVCFSM_E_REQ_BLOCK
@ BSSGP_BVCFSM_E_REQ_BLOCK
Definition: bssgp_bvc_fsm.h:29
BSSGP_BVCFSM_E_REQ_UNBLOCK
@ BSSGP_BVCFSM_E_REQ_UNBLOCK
Definition: bssgp_bvc_fsm.h:30
BSSGP_BVCFSM_E_RX_BLOCK
@ BSSGP_BVCFSM_E_RX_BLOCK
Definition: bssgp_bvc_fsm.h:20
BSSGP_BVCFSM_E_RX_UNBLOCK
@ BSSGP_BVCFSM_E_RX_UNBLOCK
Definition: bssgp_bvc_fsm.h:22
BSSGP_BVCFSM_E_RX_RESET_ACK
@ BSSGP_BVCFSM_E_RX_RESET_ACK
Definition: bssgp_bvc_fsm.h:25