libosmogb
1.5.1
Osmocom Gb library
|
@ BSSGP_BVCFSM_E_RX_BLOCK_ACK
Definition: bssgp_bvc_fsm.h:21
struct msgb * bssgp2_enc_fc_bvc_ack(uint8_t tag)
Encode a FLOW-CONTROL-BVC-ACK PDU as per TS 48.018 Section 10.4.4.
Definition: gprs_bssgp2.c:355
int bssgp2_nsi_tx_sig(struct gprs_ns2_inst *nsi, uint16_t nsei, struct msgb *msg, uint32_t lsp)
transmit BSSGP PDU over NS (SIGNALING BVC)
Definition: gprs_bssgp2.c:66
struct gprs_ra_id ra_id
Definition: bssgp_bvc_fsm.c:147
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.
Definition: bssgp_bvc_fsm.c:832
int bssgp2_nsi_tx_ptp(struct gprs_ns2_inst *nsi, uint16_t nsei, uint16_t bvci, struct msgb *msg, uint32_t lsp)
transmit BSSGP PDU over NS (PTP BVC)
Definition: gprs_bssgp2.c:42
struct msgb * bssgp2_enc_bvc_block_ack(uint16_t bvci)
Encode BSSGP BVC-BLOCK-ACK PDU as per TS 48.018 Section 10.4.9.
Definition: gprs_bssgp2.c:91
static void _onenter_tail(struct osmo_fsm_inst *fi, uint32_t prev_state)
Definition: bssgp_bvc_fsm.c:271
static const struct osmo_fsm_state bssgp_bvc_fsm_states[]
Definition: bssgp_bvc_fsm.c:592
An instance of the NS protocol stack.
Definition: gprs_ns2_internal.h:119
@ BSSGP_BVCFSM_S_BLOCKED
Definition: bssgp_bvc_fsm.h:11
@ BSSGP_BVCFSM_S_WAIT_RESET_ACK
Definition: bssgp_bvc_fsm.h:12
static void _tx_bvc_reset(struct osmo_fsm_inst *fi, uint8_t cause)
Definition: bssgp_bvc_fsm.c:181
uint16_t max_pdu_len
Definition: bssgp_bvc_fsm.c:120
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).
Definition: bssgp_bvc_fsm.c:713
@ BSSGP_BVCFSM_S_NULL
Definition: bssgp_bvc_fsm.h:10
uint16_t bssgp_parse_cell_id(struct gprs_ra_id *raid, const uint8_t *buf)
Definition: gprs_bssgp.c:311
uint32_t advertised
Definition: bssgp_bvc_fsm.c:137
const char * bssgp_cause_str(enum gprs_bssgp_cause cause)
Definition: gprs_bssgp_util.c:484
uint8_t data[0]
variable-length payload
Definition: gsm_08_16.h:1
static void bssgp_bvc_fsm_blocked_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state)
Definition: bssgp_bvc_fsm.c:288
#define TLVP_PRES_LEN(tp, tag, min_len)
static int fi_tx_ptp(struct osmo_fsm_inst *fi, struct msgb *msg)
Definition: bssgp_bvc_fsm.c:156
uint32_t negotiated
Definition: bssgp_bvc_fsm.c:139
@ BSSGP_IE_EXT_FEATURE_BITMAP
Definition: gsm_08_18.h:205
static void bssgp_bvc_fsm_allstate(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: bssgp_bvc_fsm.c:510
Definition: gprs_bssgp2.h:12
struct osmo_fsm_inst * osmo_fsm_inst_alloc(struct osmo_fsm *fsm, void *ctx, void *priv, int log_level, const char *id)
@ BSSGP_BVCFSM_E_RX_FC_BVC_ACK
Definition: bssgp_bvc_fsm.h:27
uint32_t received
Definition: bssgp_bvc_fsm.c:138
struct msgb * bssgp2_enc_status(uint8_t cause, const uint16_t *bvci, const struct msgb *orig_msg, uint16_t max_pdu_len)
Encode BSSGP STATUS PDU as per TS 48.018 Section 10.4.14.
Definition: gprs_bssgp2.c:222
static void update_negotiated_features(struct osmo_fsm_inst *fi, const struct tlv_parsed *tp)
Definition: bssgp_bvc_fsm.c:250
@ BSSGP_IE_CAUSE
Definition: gsm_08_18.h:125
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)
Encode BSSGP BVC-RESET-ACK PDU as per TS 48.018 Section 10.4.13.
Definition: gprs_bssgp2.c:188
const char * osmo_tlv_prot_msg_name(const struct osmo_tlv_prot_def *pdef, uint8_t msg_type)
@ BSSGP_BVCFSM_E_RX_RESET
Definition: bssgp_bvc_fsm.h:24
void * filter_data[LOG_MAX_FILTERS+1]
@ BSSGP_CAUSE_BVCI_BLOCKED
Definition: gsm_08_18.h:276
void(* reset_notification)(uint16_t nsei, uint16_t bvci, const struct gprs_ra_id *ra_id, uint16_t cell_id, uint8_t cause, void *priv)
Definition: bssgp_bvc_fsm.h:40
uint8_t tag
Definition: gprs_bssgp2.h:13
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).
Definition: bssgp_bvc_fsm.c:690
const struct osmo_tlv_prot_def osmo_pdef_bssgp
Definition: gprs_bssgp_util.c:261
#define LOGPFSM(fi, fmt, args...)
uint8_t pdu_type
BSSGP PDU type.
Definition: gsm_08_18.h:112
void(* state_chg_notification)(uint16_t nsei, uint16_t bvci, int old_state, int new_state, void *priv)
Definition: bssgp_bvc_fsm.h:37
uint16_t nsei
Definition: bssgp_bvc_fsm.c:118
@ BSSGP_CAUSE_SEM_INCORR_PDU
Definition: gsm_08_18.h:280
struct bvc_fsm_priv::@25 features
@ BSSGP_CAUSE_UNKNOWN_BVCI
Definition: gsm_08_18.h:272
#define S(x)
Definition: bssgp_bvc_fsm.c:42
uint32_t bssgp_bvc_fsm_get_features_advertised(struct osmo_fsm_inst *fi)
Return the advertised features / extended features.
Definition: bssgp_bvc_fsm.c:804
Definition: bssgp_bvc_fsm.h:35
uint32_t bssgp_bvc_fsm_get_features_negotiated(struct osmo_fsm_inst *fi)
Return the negotiated features / extended features.
Definition: bssgp_bvc_fsm.c:822
void osmo_fsm_inst_free(struct osmo_fsm_inst *fi)
@ BSSGP_BVCFSM_E_RX_FC_BVC
Definition: bssgp_bvc_fsm.h:26
static const struct value_string ptp_bvc_event_names[]
Definition: bssgp_bvc_fsm.c:97
uint16_t nsei
Identifiers of a BTS, equal to 'struct bssgp_bts_ctx'.
Definition: gprs_msgb.h:7
uint8_t last_reset_cause
Definition: bssgp_bvc_fsm.c:133
static __attribute__((constructor))
Definition: bssgp_bvc_fsm.c:850
gprs_bssgp_cause
Cause coding (Section 11.3.8 / Table 11.10)
Definition: gsm_08_18.h:266
uint16_t bvci
Definition: bssgp_bvc_fsm.c:123
const struct bssgp_bvc_fsm_ops * ops
Definition: bssgp_bvc_fsm.c:151
static void _tx_bvc_reset_ack(struct osmo_fsm_inst *fi)
Definition: bssgp_bvc_fsm.c:206
uint8_t bssgp_bvc_fsm_get_block_cause(struct osmo_fsm_inst *fi)
Determine the cause value why given BVC FSM is blocked.
Definition: bssgp_bvc_fsm.c:795
bssgp_fc_granularity
Definition: gsm_08_18.h:347
struct msgb * bssgp2_enc_bvc_unblock_ack(uint16_t bvci)
Encode BSSGP BVC-UNBLOCK-ACK PDU as per TS 48.018 Section 10.4.11.
Definition: gprs_bssgp2.c:127
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.
Definition: bssgp_bvc_fsm.c:778
@ BSSGP_BVCFSM_E_RX_UNBLOCK_ACK
Definition: bssgp_bvc_fsm.h:23
uint16_t cell_id
Definition: bssgp_bvc_fsm.c:148
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...
Definition: bssgp_bvc_fsm.c:841
uint8_t block_cause
Definition: bssgp_bvc_fsm.c:130
struct gprs_ns2_inst * nsi
Definition: bssgp_bvc_fsm.c:115
void(* rx_fc_bvc)(uint16_t nsei, uint16_t bvci, const struct bssgp2_flow_ctrl *fc, void *priv)
Definition: bssgp_bvc_fsm.h:42
#define T2_SECS
Definition: bssgp_bvc_fsm.c:92
@ BSSGP_BVCFSM_E_RX_RESET_ACK
Definition: bssgp_bvc_fsm.h:25
#define T1_SECS
Definition: bssgp_bvc_fsm.c:91
#define msgb_bcid(__x)
Definition: gprs_msgb.h:28
struct osmo_tdef bssgp_bvc_fsm_tdefs[]
Definition: bssgp_bvc_fsm.c:45
@ BSSGP_BVCFSM_E_REQ_RESET
Definition: bssgp_bvc_fsm.h:31
struct msgb * bssgp2_enc_bvc_block(uint16_t bvci, enum gprs_bssgp_cause cause)
Encode BSSGP BVC-BLOCK PDU as per TS 48.018 Section 10.4.8.
Definition: gprs_bssgp2.c:72
@ BSSGP_BVCFSM_E_RX_UNBLOCK
Definition: bssgp_bvc_fsm.h:22
void * ops_priv
Definition: bssgp_bvc_fsm.c:153
#define osmo_fsm_inst_state_chg(fi, new_state, timeout_secs, T)
static void bssgp_bvc_fsm_wait_reset_ack(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: bssgp_bvc_fsm.c:373
uint16_t bvci
Definition: gprs_msgb.h:8
bool bssgp_bvc_fsm_is_unblocked(struct osmo_fsm_inst *fi)
Return if the given BVC FSM is in UNBLOCKED state.
Definition: bssgp_bvc_fsm.c:789
@ BSSGP_PDUT_BVC_UNBLOCK_ACK
Definition: gsm_08_18.h:49
@ BSSGP_BVCFSM_E_REQ_FC_BVC
Definition: bssgp_bvc_fsm.h:32
@ BSSGP_BVCFSM_E_RX_BLOCK
Definition: bssgp_bvc_fsm.h:20
int DNS
Definition: common_vty.c:66
static struct osmo_fsm bssgp_bvc_fsm
Definition: bssgp_bvc_fsm.c:95
#define T1
Definition: bssgp_bvc_fsm.c:85
struct msgb * bssgp2_enc_fc_bvc(const struct bssgp2_flow_ctrl *fc, enum bssgp_fc_granularity *gran)
Encode a FLOW-CONTROL-BVC PDU as per TS 48.018 Section 10.4.4.
Definition: gprs_bssgp2.c:310
#define BSSGP_XFEAT_GBIT
Definition: gsm_08_18.h:338
bool locally_blocked
Definition: bssgp_bvc_fsm.c:129
struct msgb * bssgp2_enc_bvc_unblock(uint16_t bvci)
Encode BSSGP BVC-UNBLOCK PDU as per TS 48.018 Section 10.4.10.
Definition: gprs_bssgp2.c:109
int osmo_fsm_register(struct osmo_fsm *fsm)
#define LOGPFSML(fi, level, fmt, args...)
uint32_t bssgp_bvc_fsm_get_features_received(struct osmo_fsm_inst *fi)
Return the received features / extended features.
Definition: bssgp_bvc_fsm.c:813
@ BSSGP_IE_CELL_ID
Definition: gsm_08_18.h:126
static void bssgp_bvc_fsm_blocked(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: bssgp_bvc_fsm.c:296
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).
Definition: bssgp_bvc_fsm.c:761
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).
Definition: bssgp_bvc_fsm.c:740
static struct osmo_fsm_inst * _bvc_fsm_alloc(void *ctx, struct gprs_ns2_inst *nsi, bool role_sgsn, uint16_t nsei, uint16_t bvci)
Definition: bssgp_bvc_fsm.c:654
struct msgb * bssgp2_enc_bvc_reset(uint16_t bvci, enum gprs_bssgp_cause cause, const struct gprs_ra_id *ra_id, uint16_t cell_id, const uint8_t *feat_bm, const uint8_t *ext_feat_bm)
Encode BSSGP BVC-RESET PDU as per TS 48.018 Section 10.4.12.
Definition: gprs_bssgp2.c:151
@ BSSGP_BVCFSM_S_UNBLOCKED
Definition: bssgp_bvc_fsm.h:13
#define msgb_bvci(__x)
Definition: gprs_msgb.h:24
static void bssgp_bvc_fsm_unblocked(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: bssgp_bvc_fsm.c:405
bool role_sgsn
Definition: bssgp_bvc_fsm.c:126
static void _tx_status(struct osmo_fsm_inst *fi, enum gprs_bssgp_cause cause, const struct msgb *rx)
Definition: bssgp_bvc_fsm.c:230
BSSGP normal header.
Definition: gsm_08_18.h:111
@ BSSGP_BVCFSM_E_REQ_BLOCK
Definition: bssgp_bvc_fsm.h:29
int bssgp_tx_simple_bvci(uint8_t pdu_type, uint16_t nsei, uint16_t bvci, uint16_t ns_bvci)
Definition: gprs_bssgp_util.c:536
static void bssgp_bvc_fsm_null(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: bssgp_bvc_fsm.c:282
int bssgp2_dec_fc_bvc(struct bssgp2_flow_ctrl *fc, const struct tlv_parsed *tp)
Decode a FLOW-CONTROL-BVC PDU as per TS 48.018 Section 10.4.4.
Definition: gprs_bssgp2.c:264
#define msgb_bssgph(__x)
Definition: gprs_msgb.h:26
static int bssgp_bvc_fsm_timer_cb(struct osmo_fsm_inst *fi)
Definition: bssgp_bvc_fsm.c:547
enum bssgp_fc_granularity fc_granularity
Definition: bssgp_bvc_fsm.c:141
void * ctx[LOG_MAX_CTX+1]
static int fi_tx_sig(struct osmo_fsm_inst *fi, struct msgb *msg)
Definition: bssgp_bvc_fsm.c:168
@ BSSGP_BVCFSM_E_REQ_UNBLOCK
Definition: bssgp_bvc_fsm.h:30
int DNS
Definition: common_vty.c:66
#define T2
Definition: bssgp_bvc_fsm.c:86
int gprs_log_filter_fn(const struct log_context *ctx, struct log_target *tar)
Definition: common_vty.c:40
Definition: bssgp_bvc_fsm.c:113
@ BSSGP_IE_FEATURE_BITMAP
Definition: gsm_08_18.h:161