libosmogb
1.7.0.61-0d9b6.202211030053
Osmocom Gb library
|
Definition: gprs_bssgp.h:64
@ BSSGP_CTR_PKTS_IN
Definition: gprs_bssgp.h:147
@ BSSGP_IE_BUCKET_FULL_RATIO
Definition: gsm_08_18.h:162
@ BSSGP_CTR_PKTS_OUT
Definition: gprs_bssgp.h:148
int osmo_gettimeofday(struct timeval *tv, struct timezone *tz)
#define GSM_IMSI_LENGTH
Definition: gprs_bssgp_bss.c:39
@ BSSGP_CTR_STATUS
Definition: gprs_bssgp.h:153
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
uint8_t bucket_full_ratio
Definition: gprs_bssgp2.h:19
int bssgp_tx_bvc_reset_nsei_bvci(uint16_t nsei, uint16_t bvci, enum gprs_bssgp_cause cause, const struct gprs_ra_id *ra_id, uint16_t cell_id)
Transmit a BVC-RESET message with a given nsei and bvci (Chapter 10.4.12)
Definition: gprs_bssgp.c:149
static int _bssgp_tx_dl_ud(struct bssgp_flow_control *fc, struct msgb *msg, uint32_t llc_pdu_len, void *priv)
Definition: gprs_bssgp.c:846
int bssgp_tx_suspend_nack(uint16_t nsei, uint32_t tlli, const struct gprs_ra_id *ra_id, uint8_t *cause)
Definition: gprs_bssgp.c:289
static uint16_t tlvp_val16be(const struct tlv_parsed *tp, int pos)
@ BSSGP_PDUT_STATUS
Definition: gsm_08_18.h:60
@ BSSGP_IE_LLC_FRAMES_DISCARDED
Definition: gsm_08_18.h:133
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_PDUT_SGSN_INVOKE_TRACE
Definition: gsm_08_18.h:59
@ BSSGP_CAUSE_INV_MAND_INF
Definition: gsm_08_18.h:281
@ BSSGP_PDUT_SUSPEND
Definition: gsm_08_18.h:32
const char * osmo_rai_name(const struct gprs_ra_id *rai)
@ BSSGP_PAGING_BSS_AREA
all cells in BSS
Definition: gprs_bssgp.h:199
static int fc_queue_timer_cfg(struct bssgp_flow_control *fc)
Definition: gprs_bssgp.c:755
struct osmo_prim_hdr oph
Definition: gprs_bssgp.h:65
static int bssgp_rx_bvc_block(struct msgb *msg, struct tlv_parsed *tp)
Definition: gprs_bssgp.c:423
struct bssgp_flow_control * fc
Definition: gprs_bssgp.h:172
struct bssgp_lv ms_ra_cap
Definition: gprs_bssgp.h:175
static uint8_t * msgb_tvlv_put_16be(struct msgb *msg, uint8_t tag, uint16_t val)
@ BSSGP_CTR_BLOCKED
Definition: gprs_bssgp.h:151
An instance of the NS protocol stack.
Definition: gprs_ns2_internal.h:148
@ PRIM_NM_STATUS
Definition: gprs_bssgp.h:59
struct msgb * msg
Definition: gprs_bssgp.c:697
@ BSSGP_IE_ALIGNMENT
Definition: gsm_08_18.h:118
int bssgp_tx_resume_ack(uint16_t nsei, uint32_t tlli, const struct gprs_ra_id *ra_id)
Definition: gprs_bssgp.c:311
#define msgb_llch(__x)
Definition: gprs_msgb.h:29
@ BSSGP_PDUT_BVC_BLOCK
Definition: gsm_08_18.h:44
void rate_ctr_add(struct rate_ctr *ctr, int inc)
enum bssgp_paging_mode mode
CS or PS paging.
Definition: gprs_bssgp.h:207
uint32_t bmax_default_ms
default maximum size of per-MS bucket in octets
Definition: gprs_bssgp.h:124
static int bssgp_rx_llc_disc(struct msgb *msg, struct tlv_parsed *tp, struct bssgp_bvc_ctx *ctx)
Definition: gprs_bssgp.c:617
uint8_t pdu_type
NS PDU type.
Definition: gsm_08_16.h:2
struct bssgp_flow_control * fc
Definition: gprs_bssgp.h:122
struct osmo_prim_hdr oph
Definition: gprs_ns2.h:110
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)
Definition: gprs_bssgp_bss.c:76
@ BSSGP_PDUT_SUSPEND_NACK
Definition: gsm_08_18.h:34
void rate_ctr_group_free(struct rate_ctr_group *grp)
struct tlv_parsed * tp
Definition: gprs_bssgp.h:71
#define DEBUGP(ss, fmt, args...)
struct bssgp_bvc_ctx * btsctx_by_raid_cid(const struct gprs_ra_id *raid, uint16_t cid)
Definition: gprs_bssgp.c:85
static int common_tx_radio_status2(struct msgb *msg, uint8_t cause)
Definition: gprs_bssgp_bss.c:139
static void osmo_prim_init(struct osmo_prim_hdr *oph, unsigned int sap, unsigned int primitive, enum osmo_prim_operation operation, struct msgb *msg)
static unsigned char * msgb_put(struct msgb *msgb, unsigned int len)
int bssgp_tx_paging(uint16_t nsei, uint16_t ns_bvci, struct bssgp_paging_info *pinfo)
Definition: gprs_bssgp.c:1337
@ PRIM_NM_BVC_BLOCK
Definition: gprs_bssgp.h:57
@ BSSGP_IE_BVC_MEASUREMENT
Definition: gsm_08_18.h:124
const char * bssgp_cause_str(enum gprs_bssgp_cause cause)
Definition: gprs_bssgp_util.c:484
struct msgb * bssgp2_enc_fc_ms(const struct bssgp2_flow_ctrl *fc, enum bssgp_fc_granularity *gran)
Encode a FLOW-CONTROL-MS PDU as per TS 48.018 Section 10.4.6.
Definition: gprs_bssgp2.c:436
bool bucket_full_ratio_present
Definition: gprs_bssgp2.h:20
uint8_t data[0]
variable-length payload
Definition: gsm_08_16.h:3
void * priv
Definition: gprs_bssgp.c:701
#define TLVP_PRES_LEN(tp, tag, min_len)
static const struct rate_ctr_group_desc bssgp_ctrg_desc
Definition: gprs_bssgp.c:63
uint32_t r_default_ms
default bucket leak rate of per-MS bucket in octests/s
Definition: gprs_bssgp.h:126
uint16_t bvci
Definition: gprs_bssgp.h:69
static int bssgp_fc_needs_queueing(struct bssgp_flow_control *fc, uint32_t pdu_len)
Definition: gprs_bssgp.c:810
@ BSSGP_IE_EXT_FEATURE_BITMAP
Definition: gsm_08_18.h:205
int bssgp_tx_bvc_reset(struct bssgp_bvc_ctx *bctx, uint16_t bvci, uint8_t cause)
Definition: gprs_bssgp_bss.c:300
void bssgp_bvc_ctx_free(struct bssgp_bvc_ctx *ctx)
Definition: gprs_bssgp.c:242
@ BSSGP_IE_ROUTEING_AREA
Definition: gsm_08_18.h:145
uint32_t queue_depth
current length of queue (msgs)
Definition: gprs_bssgp.h:95
Definition: gprs_bssgp2.h:12
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
@ BSSGP_PAGING_CS
Definition: gprs_bssgp.h:194
#define llist_for_each_entry_safe(pos, n, head, member)
uint32_t max_queue_depth
how many packets to queue (mgs)
Definition: gprs_bssgp.h:94
char * imsi
Definition: gprs_bssgp.h:171
struct gprs_ra_id * ra_id
Definition: gprs_bssgp.h:72
@ BSSGP_PDUT_BVC_BLOCK_ACK
Definition: gsm_08_18.h:45
@ BSSGP_PDUT_UL_UNITDATA
Definition: gsm_08_18.h:20
@ BSSGP_IE_MS_BUCKET_SIZE
Definition: gsm_08_18.h:136
int bssgp_rx_paging(struct bssgp_paging_info *pinfo, struct msgb *msg)
Definition: gprs_bssgp_bss.c:476
struct llist_head bssgp_bvc_ctxts
@ BSSGP_IE_LLC_PDU
Definition: gsm_08_18.h:132
@ BSSGP_CAUSE_PROTO_ERR_UNSPEC
Definition: gsm_08_18.h:287
void gsm48_parse_ra(struct gprs_ra_id *raid, const uint8_t *buf)
@ BSSGP_PDUT_DL_UNITDATA
Definition: gsm_08_18.h:19
uint32_t * tlli
Definition: gprs_bssgp.h:170
union osmo_gprs_ns2_prim::@20 u
static void fc_timer_cb(void *data)
Definition: gprs_bssgp.c:707
uint8_t * v
Definition: gprs_bssgp.h:166
@ BSSGP_IE_CAUSE
Definition: gsm_08_18.h:125
#define INIT_LLIST_HEAD(ptr)
@ BSSGP_IE_LOCATION_AREA
Definition: gsm_08_18.h:134
@ BSSGP_PDUT_RAN_INFO_ERROR
Definition: gsm_08_18.h:91
@ BSSGP_PAGING_BVCI
one cell
Definition: gprs_bssgp.h:202
int gprs_ns_sendmsg(struct gprs_ns_inst *nsi, struct msgb *msg)
High-level function for transmitting a NS-UNITDATA messsage.
Definition: gprs_ns.c:1079
uint16_t bvci
BVCI.
Definition: gprs_bssgp.h:210
@ BSSGP_PAGING_ROUTEING_AREA
all cells in RA
Definition: gprs_bssgp.h:201
@ PRIM_NM_BVC_RESET
Definition: gprs_bssgp.h:56
#define msgb_tlli(__x)
Definition: gprs_msgb.h:22
#define timersub(a, b, result)
@ BSSGP_CAUSE_BVCI_BLOCKED
Definition: gsm_08_18.h:276
static int fc_enqueue(struct bssgp_flow_control *fc, struct msgb *msg, uint32_t llc_pdu_len, void *priv)
Definition: gprs_bssgp.c:784
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)
Definition: gprs_bssgp_bss.c:203
int gsm48_generate_mid_from_imsi(uint8_t *buf, const char *imsi)
uint32_t bucket_leak_rate
leak rate of the bucket (octets/sec)
Definition: gprs_bssgp.h:88
@ BSSGP_PDUT_PAGING_CS
Definition: gsm_08_18.h:28
static int tx_bvc_reset_nsei_bvci(enum bssgp_pdu_type pdu, uint16_t nsei, uint16_t bvci, enum gprs_bssgp_cause cause, const struct gprs_ra_id *ra_id, uint16_t cell_id)
Definition: gprs_bssgp.c:106
uint8_t pdu_type
BSSGP PDU type.
Definition: gsm_08_18.h:104
struct llist_head list
Definition: gprs_bssgp.c:695
uint8_t tag
Definition: gprs_bssgp2.h:13
int bssgp_tx_dl_ud(struct msgb *msg, uint16_t pdu_lifetime, struct bssgp_dl_ud_par *dup)
Definition: gprs_bssgp.c:1232
uint16_t msgb_length(const struct msgb *msg)
uint16_t cell_id
Cell ID of the remote BTS.
Definition: gprs_bssgp.h:111
static void llist_del(struct llist_head *entry)
@ BSSGP_IE_DRX_PARAMS
Definition: gsm_08_18.h:128
uint8_t pdu_type
BSSGP PDU type.
Definition: gsm_08_18.h:112
uint16_t nsei
Definition: gprs_bssgp.h:116
@ BSSGP_PAGING_PS
Definition: gprs_bssgp.h:193
static uint32_t tlvp_val32be(const struct tlv_parsed *tp, int pos)
@ PRIM_BSSGP_GMM_RESUME
Definition: gprs_bssgp.h:51
@ PRIM_NM_LLC_DISCARDED
Definition: gprs_bssgp.h:55
@ BSSGP_PDUT_BVC_RESET_ACK
Definition: gsm_08_18.h:47
Definition: gprs_bssgp.c:693
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
int bssgp_tx_resume_nack(uint16_t nsei, uint32_t tlli, const struct gprs_ra_id *ra_id, uint8_t *cause)
Definition: gprs_bssgp.c:329
@ BSSGP_IE_FLUSH_ACTION
Definition: gsm_08_18.h:130
uint16_t bssgp_parse_cell_id(struct gprs_ra_id *raid, const uint8_t *buf)
Definition: gprs_bssgp.c:349
static uint16_t TVLV_GROSS_LEN(uint16_t len)
int bssgp_tx_bvc_block(struct bssgp_bvc_ctx *bctx, uint8_t cause)
Transmit a BVC-BLOCK message (Chapter 10.4.8)
Definition: gprs_bssgp_bss.c:253
void gsm48_encode_ra(struct gsm48_ra_id *out, const struct gprs_ra_id *raid)
int log_set_context(uint8_t ctx_nr, void *value)
static unsigned char * msgb_push(struct msgb *msgb, unsigned int len)
int bssgp_fc_in(struct bssgp_flow_control *fc, struct msgb *msg, uint32_t llc_pdu_len, void *priv)
Definition: gprs_bssgp.c:855
@ BSSGP_PDUT_CREATE_BSS_PFC_ACK
Definition: gsm_08_18.h:65
static int bssgp_rx_fc_bvc(struct msgb *msg, struct tlv_parsed *tp, struct bssgp_bvc_ctx *bctx)
Definition: gprs_bssgp.c:916
@ BSSGP_CAUSE_UNKNOWN_BVCI
Definition: gsm_08_18.h:272
BSSGP User-Data header (Section 10.2.1 and 10.2.2)
Definition: gsm_08_18.h:103
static void rate_ctr_inc(struct rate_ctr *ctr)
@ GPRS_NS2_PRIM_UNIT_DATA
Definition: gprs_ns2.h:53
uint32_t state
Definition: gprs_bssgp.h:118
int bssgp_fc_ms_init(struct bssgp_flow_control *fc_ms, uint16_t bvci, uint16_t nsei, uint32_t max_queue_depth)
Definition: gprs_bssgp.c:900
#define BVCI_PTM
Definition: gsm_08_18.h:11
static int bssgp_tlv_parse(struct tlv_parsed *tp, const uint8_t *buf, int len)
Definition: gprs_bssgp.h:186
uint16_t bvci
Definition: gprs_ns2.h:113
int bssgp_create_cell_id(uint8_t *buf, const struct gprs_ra_id *raid, uint16_t cid)
Definition: gprs_bssgp.c:357
struct timeval time_last_pdu
timestamp of last PDU sent
Definition: gprs_bssgp.h:91
uint8_t data[0]
Definition: gsm_08_18.h:107
struct msgb * bssgp_msgb_alloc(void)
Definition: gprs_bssgp_util.c:494
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
@ BSSGP_PDUT_RA_CAPABILITY
Definition: gsm_08_18.h:21
Definition: gprs_bssgp.h:169
Definition: gprs_ns2.h:109
uint16_t nsei
Identifiers of a BTS, equal to 'struct bssgp_bts_ctx'.
Definition: gprs_msgb.h:9
static int _gprs_ns_sendmsg(void *ctx, struct msgb *msg)
Definition: gprs_bssgp.c:78
@ BSSGP_PDUT_LLC_DISCARD
Definition: gsm_08_18.h:56
uint16_t nsei
Definition: gprs_ns2.h:112
uint8_t * bssgp_msgb_ra_put(struct msgb *msg, const struct gprs_ra_id *ra_id)
Definition: gprs_bssgp_bss.c:47
static int bssgp_rx_resume(struct msgb *msg, struct tlv_parsed *tp)
Definition: gprs_bssgp.c:573
uint64_t bucket_size_max
Definition: gprs_bssgp2.h:15
@ BSSGP_IE_FLOW_CTRL_GRANULARITY
Definition: gsm_08_18.h:226
void msgb_free(struct msgb *m)
int bssgp_rx_rim(struct msgb *msg, struct tlv_parsed *tp, uint16_t bvci)
Definition: gprs_bssgp_rim.c:1183
#define msgb_nsei(__x)
Definition: gprs_msgb.h:23
@ BSSGP_PDUT_FLUSH_LL_ACK
Definition: gsm_08_18.h:55
@ BSSGP_FC_GRAN_100
Definition: gsm_08_18.h:348
void bssgp_set_bssgp_callback(bssgp_bvc_send ns_send, void *data)
Definition: gprs_bssgp.c:203
struct osmo_gprs_ns2_prim::@20::@21 unitdata
@ BSSGP_PDUT_RA_CAPA_UPDATE_ACK
Definition: gsm_08_18.h:30
gprs_bssgp_cause
Cause coding (Section 11.3.8 / Table 11.10)
Definition: gsm_08_18.h:266
void bssgp_fc_init(struct bssgp_flow_control *fc, uint32_t bucket_size_max, uint32_t bucket_leak_rate, uint32_t max_queue_depth, int(*out_cb)(struct bssgp_flow_control *fc, struct msgb *msg, uint32_t llc_pdu_len, void *priv))
Definition: gprs_bssgp.c:884
@ BSSGP_PAGING_LOCATION_AREA
all cells in LA
Definition: gprs_bssgp.h:200
@ BSSGP_IE_PDU_IN_ERROR
Definition: gsm_08_18.h:139
@ BSSGP_PDUT_FLOW_CONTROL_MS_ACK
Definition: gsm_08_18.h:53
@ BSSGP_PDUT_BVC_UNBLOCK
Definition: gsm_08_18.h:48
struct bssgp_bvc_ctx * btsctx_by_bvci_nsei(uint16_t bvci, uint16_t nsei)
Definition: gprs_bssgp.c:192
int(* out_cb)(struct bssgp_flow_control *fc, struct msgb *msg, uint32_t llc_pdu_len, void *priv)
callback to be called at output of flow control
Definition: gprs_bssgp.h:100
struct msgb * bssgp2_enc_fc_ms_ack(uint32_t tlli, uint8_t tag)
Encode a FLOW-CONTROL-BVC-ACK PDU as per TS 48.018 Section 10.4.7.
Definition: gprs_bssgp2.c:471
uint8_t * bssgp_msgb_ra_put(struct msgb *msg, const struct gprs_ra_id *ra_id)
Definition: gprs_bssgp_bss.c:47
int bssgp_rx_status(struct msgb *msg, struct tlv_parsed *tp, uint16_t bvci, struct bssgp_bvc_ctx *bctx)
Definition: gprs_bssgp.c:652
int bssgp_rcvmsg(struct msgb *msg)
Definition: gprs_bssgp.c:1157
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
@ BSSGP_CTR_BYTES_OUT
Definition: gprs_bssgp.h:150
bssgp_fc_granularity
Definition: gsm_08_18.h:347
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
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)
Definition: gprs_bssgp_bss.c:148
int bssgp_prim_cb(struct osmo_prim_hdr *oph, void *ctx)
int bssgp_tx_bvc_reset_ack_nsei_bvci(uint16_t nsei, uint16_t bvci, const struct gprs_ra_id *ra_id, uint16_t cell_id)
Transmit a BVC-RESET-ACK message with a given nsei and bvci (Chapter 10.4.12)
Definition: gprs_bssgp.c:161
@ BSSGP_IE_SUSPEND_REF_NR
Definition: gsm_08_18.h:147
struct llist_head list
Definition: gprs_bssgp.h:108
void osmo_timer_schedule(struct osmo_timer_list *timer, int seconds, int microseconds)
static int bssgp_rx_ptp(struct msgb *msg, struct tlv_parsed *tp, struct bssgp_bvc_ctx *bctx)
Definition: gprs_bssgp.c:967
bssgp_bvc_send bssgp_ns_send
Definition: gprs_bssgp.c:50
struct rate_ctr_group * ctrg
Definition: gprs_bssgp.h:120
struct bssgp2_flow_ctrl::@2::@4 ms
FC-MS specifi members.
@ BSSGP_CTR_DISCARDED
Definition: gprs_bssgp.h:152
Definition: gprs_bssgp.h:107
@ BSSGP_PDUT_RAN_INFO
Definition: gsm_08_18.h:88
static int bssgp_rx_ul_ud(struct msgb *msg, struct tlv_parsed *tp, struct bssgp_bvc_ctx *ctx)
Definition: gprs_bssgp.c:499
@ BSSGP_FC_GRAN_1000
Definition: gsm_08_18.h:349
uint64_t bucket_leak_rate
bucket leak rate in bytes per second
Definition: gprs_bssgp2.h:17
uint8_t qos_profile[3]
Definition: gprs_bssgp.h:176
@ BSSGP_PDUT_RAN_INFO_ACK
Definition: gsm_08_18.h:90
@ BSSGP_PDUT_DOWNLOAD_BSS_PFC
Definition: gsm_08_18.h:63
uint32_t tlli
Identifier of a MS (inside BTS), equal to 'struct sgsn_mm_ctx'.
Definition: gprs_msgb.h:13
#define BVCI_SIGNALLING
Fixed BVCI definitions (Section 5.4.1)
Definition: gsm_08_18.h:10
uint32_t tlli
Temporary Link-Local Identifier.
Definition: gsm_08_18.h:105
@ BSSGP_PDUT_FLOW_CONTROL_BVC_ACK
Definition: gsm_08_18.h:51
struct rate_ctr_group * rate_ctr_group_alloc(void *ctx, const struct rate_ctr_group_desc *desc, unsigned int idx)
int bssgp_tx_status(uint8_t cause, uint16_t *bvci, struct msgb *orig_msg)
Definition: gprs_bssgp_util.c:555
@ BSSGP_IE_TLLI
Definition: gsm_08_18.h:149
@ BSSGP_PDUT_RAN_INFO_APP_ERROR
Definition: gsm_08_18.h:92
int bssgp_tx_ra_capa_upd(struct bssgp_bvc_ctx *bctx, uint32_t tlli, uint8_t tag)
Transmit RA-CAPABILITY-UPDATE (10.3.3)
Definition: gprs_bssgp_bss.c:98
@ BSSGP_PDUT_RESUME_ACK
Definition: gsm_08_18.h:36
struct bssgp_bvc_ctx * btsctx_alloc(uint16_t bvci, uint16_t nsei)
Definition: gprs_bssgp.c:209
struct osmo_timer_list timer
timer-based dequeueing
Definition: gprs_bssgp.h:97
@ BSSGP_PDUT_PAGING_PS
Definition: gsm_08_18.h:27
#define msgb_bcid(__x)
Definition: gprs_msgb.h:28
uint32_t bucket_counter
number of tokens in the bucket
Definition: gprs_bssgp.h:90
@ BSSGP_PDUT_RESUME
Definition: gsm_08_18.h:35
uint16_t drx_params
DRX parameters.
Definition: gprs_bssgp.h:213
static int bssgp_rx_bvc_unblock(struct msgb *msg, struct tlv_parsed *tp)
Definition: gprs_bssgp.c:461
int gsm48_mi_to_string(char *string, int str_len, const uint8_t *mi, int mi_len)
struct rate_ctr * rate_ctr_group_get_ctr(struct rate_ctr_group *grp, unsigned int idx)
bool is_sgsn
BSS or SGSN.
Definition: gprs_bssgp.h:129
#define TLVP_PRESENT(x, y)
@ BSSGP_PDUT_RAN_INFO_REQ
Definition: gsm_08_18.h:89
struct bssgp2_flow_ctrl::@2::@3 bvc
FC-BVC specifi members.
#define msgb_bssgp_len(__x)
Definition: gprs_msgb.h:27
@ BSSGP_PDUT_SUSPEND_ACK
Definition: gsm_08_18.h:33
enum bssgp_paging_scope scope
bssgp_paging_scope
Definition: gprs_bssgp.h:208
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
uint32_t llc_pdu_len
Definition: gprs_bssgp.c:699
static const unsigned int bssgp_fc_gran_tbl[]
Definition: gprs_bssgp2.c:253
#define GSM48_MID_MAX_SIZE
uint32_t bucket_size_max
maximum size of the bucket (octets)
Definition: gprs_bssgp.h:87
@ BSSGP_IE_TMSI
Definition: gsm_08_18.h:150
void osmo_timer_setup(struct osmo_timer_list *timer, void(*cb)(void *data), void *data)
@ BSSGP_CAUSE_PDU_INCOMP_FEAT
Definition: gsm_08_18.h:288
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
int bssgp_create_cell_id(uint8_t *buf, const struct gprs_ra_id *raid, uint16_t cid)
Definition: gprs_bssgp.c:357
uint32_t * ptmsi
P-TMSI, if any.
Definition: gprs_bssgp.h:212
struct gprs_ra_id raid
RA Identifier.
Definition: gprs_bssgp.h:209
uint8_t data[0]
optional/conditional IEs as TLVs
Definition: gsm_08_18.h:113
int bssgp_tx_suspend(uint16_t nsei, uint32_t tlli, const struct gprs_ra_id *ra_id)
GMM-SUSPEND.req (Chapter 10.3.6)
Definition: gprs_bssgp_bss.c:56
static uint8_t * msgb_tvlv_put_32be(struct msgb *msg, uint8_t tag, uint32_t val)
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)
Definition: gprs_bssgp_bss.c:162
struct gprs_ra_id ra_id
parsed RA ID of the remote BTS
Definition: gprs_bssgp.h:110
BSSGP flow control (SGSN side) According to Section 8.2.
Definition: gprs_bssgp.h:86
@ BSSGP_IE_BMAX_DEFAULT_MS
Definition: gsm_08_18.h:119
const char * group_name_prefix
static int bssgp_tx_fc_bvc_ack(uint16_t nsei, uint8_t tag, uint16_t ns_bvci)
Definition: gprs_bssgp.c:254
#define llist_for_each_entry(pos, head, member)
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)
Definition: gprs_bssgp_bss.c:394
@ BSSGP_IE_MS_RADIO_ACCESS_CAP
Definition: gsm_08_18.h:137
@ PRIM_NM_BVC_UNBLOCK
Definition: gprs_bssgp.h:58
uint16_t bvci
Definition: gprs_msgb.h:10
@ BSSGP_PDUT_BVC_RESET
Definition: gsm_08_18.h:46
static void llist_add(struct llist_head *_new, struct llist_head *head)
@ BSSGP_PDUT_BVC_UNBLOCK_ACK
Definition: gsm_08_18.h:49
const char * msgb_hexdump(const struct msgb *msg)
struct gprs_ns_inst * bssgp_nsi
Definition: gprs_bssgp_util.c:37
BSSGP paging information.
Definition: gprs_bssgp.h:206
@ BSSGP_PDUT_FLOW_CONTROL_MS
Definition: gsm_08_18.h:52
@ BSSGP_FC_GRAN_100000
Definition: gsm_08_18.h:351
@ BSSGP_PDUT_FLUSH_LL
Definition: gsm_08_18.h:54
static int bssgp_rx_bvc_reset(struct msgb *msg, struct tlv_parsed *tp, uint16_t ns_bvci)
Definition: gprs_bssgp.c:369
static void llist_add_tail(struct llist_head *_new, struct llist_head *head)
@ BSSGP_IE_BVC_BUCKET_SIZE
Definition: gsm_08_18.h:123
@ BSSGP_PDUT_FLOW_CONTROL_BVC
Definition: gsm_08_18.h:50
int bssgp_tx_bvc_unblock(struct bssgp_bvc_ctx *bctx)
Transmit a BVC-UNBLOCK message (Chapter 10.4.10)
Definition: gprs_bssgp_bss.c:274
@ BSSGP_PDUT_CREATE_BSS_PFC_NACK
Definition: gsm_08_18.h:66
@ BSSGP_IE_BUCKET_LEAK_RATE
Definition: gsm_08_18.h:121
union bssgp2_flow_ctrl::@2 u
void bssgp_set_log_ss(int ss)
Definition: gprs_bssgp.c:1406
int bssgp2_dec_fc_ms(struct bssgp2_flow_ctrl *fc, struct tlv_parsed *tp)
Decode a FLOW-CONTROL-MS PDU as per TS 48.018 Section 10.4.6.
Definition: gprs_bssgp2.c:404
void osmo_timer_del(struct osmo_timer_list *timer)
static uint8_t * msgb_tvlv_put(struct msgb *msg, uint8_t tag, uint16_t len, const uint8_t *val)
#define llist_entry(ptr, type, member)
struct msgb * bssgp2_enc_flush_ll(uint32_t tlli, uint16_t old_bvci, const uint16_t *new_bvci, const uint16_t *nsei)
Encode BSSGP FLUSH-LL PDU as per TS 48.018 Section 10.4.1.
Definition: gprs_bssgp2.c:358
int gprs_ns2_recv_prim(struct gprs_ns2_inst *nsi, struct osmo_prim_hdr *oph)
Receive a primitive from the NS User (Gb).
Definition: gprs_ns2.c:486
@ BSSGP_IE_CELL_ID
Definition: gsm_08_18.h:126
void * bssgp_ns_send_data
Definition: gprs_bssgp.c:51
bssgp_bvc_send bssgp_ns_send
Definition: gprs_bssgp.c:50
uint8_t qos_profile[3]
QoS profile.
Definition: gsm_08_18.h:4
void bssgp_fc_flush_queue(struct bssgp_flow_control *fc)
Flush the queue of the bssgp_flow_control.
Definition: gprs_bssgp.c:1417
void * bssgp_tall_ctx
Definition: gprs_bssgp.c:46
int bssgp_tx_bvc_reset(struct bssgp_bvc_ctx *bctx, uint16_t bvci, uint8_t cause)
Definition: gprs_bssgp_bss.c:300
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)
Definition: gprs_bssgp_bss.c:293
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:384
bssgp_pdu_type
BSSGP PDU types (Section 11.3.26 / Table 11.27)
Definition: gsm_08_18.h:17
char * imsi
IMSI, if any.
Definition: gprs_bssgp.h:211
uint32_t tlli
Definition: gprs_bssgp.h:70
LLIST_HEAD(bssgp_bvc_ctxts)
uint8_t * bssgp_msgb_tlli_put(struct msgb *msg, uint32_t tlli)
Definition: gprs_bssgp_bss.c:41
@ BSSGP_IE_IMSI
Definition: gsm_08_18.h:131
#define LOGP(ss, level, fmt, args...)
@ BSSGP_IE_QOS_PROFILE
Definition: gsm_08_18.h:142
#define BSSGP_PDUT_RA_CAPA_UDPATE
Definition: gsm_08_18.h:14
#define msgb_bvci(__x)
Definition: gprs_msgb.h:24
static int llist_empty(const struct llist_head *head)
@ BSSGP_IE_R_DEFAULT_MS
Definition: gsm_08_18.h:146
union osmo_bssgp_prim::@0 u
uint8_t qos_profile[3]
QoS profile.
Definition: gsm_08_18.h:106
@ BSSGP_IE_NUM_OCT_AFF
Definition: gsm_08_18.h:155
@ BSSGP_IE_BSS_AREA_ID
Definition: gsm_08_18.h:120
@ BSSGP_PDUT_RESUME_NACK
Definition: gsm_08_18.h:37
BSSGP normal header.
Definition: gsm_08_18.h:111
void * bssgp_ns_send_data
Definition: gprs_bssgp.c:51
@ BSSGP_CTR_BYTES_IN
Definition: gprs_bssgp.h:149
@ BSSGP_IE_BVCI
Definition: gsm_08_18.h:122
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
uint8_t qos[3]
QoS parameters.
Definition: gprs_bssgp.h:214
@ BSSGP_CAUSE_MISSING_MAND_IE
Definition: gsm_08_18.h:282
@ BSSGP_PDUT_MODIFY_BSS_PFC
Definition: gsm_08_18.h:67
@ BSSGP_PDUT_RADIO_STATUS
Definition: gsm_08_18.h:31
#define msgb_bssgph(__x)
Definition: gprs_msgb.h:26
struct llist_head queue
linked list of msgb's
Definition: gprs_bssgp.h:96
static int bssgp_rx_sign(struct msgb *msg, struct tlv_parsed *tp, struct bssgp_bvc_ctx *bctx)
Definition: gprs_bssgp.c:1051
uint16_t bvci
Definition: gprs_bssgp.h:115
@ PRIM_BSSGP_UL_UD
Definition: gprs_bssgp.h:47
@ BSSGP_PDUT_DELETE_BSS_PFC_ACK
Definition: gsm_08_18.h:70
uint16_t nsei
Definition: gprs_bssgp.h:68
@ PRIM_BSSGP_GMM_SUSPEND
Definition: gprs_bssgp.h:50
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)
Definition: gprs_bssgp_bss.c:177
uint16_t drx_parms
Definition: gprs_bssgp.h:173
@ BSSGP_IE_PDU_LIFETIME
Definition: gsm_08_18.h:140
static const struct rate_ctr_desc bssgp_ctr_description[]
Definition: gprs_bssgp.c:53
#define LOGPC(ss, level, fmt, args...)
int(* bssgp_bvc_send)(void *ctx, struct msgb *msg)
Definition: gprs_bssgp.h:31
uint8_t * bssgp_msgb_tlli_put(struct msgb *msg, uint32_t tlli)
Definition: gprs_bssgp_bss.c:41
@ BSSGP_IE_TAG
Definition: gsm_08_18.h:148
@ BSSGP_FC_GRAN_10000
Definition: gsm_08_18.h:350
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)
Definition: gprs_bssgp_bss.c:227
static struct msgb * common_tx_radio_status(struct bssgp_bvc_ctx *bctx)
Definition: gprs_bssgp_bss.c:120
static uint8_t * msgb_tvlv_push(struct msgb *msg, uint8_t tag, uint16_t len, const uint8_t *val)
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)
Definition: gprs_bssgp_bss.c:435
static int bssgp_rx_suspend(struct msgb *msg, struct tlv_parsed *tp)
Definition: gprs_bssgp.c:533
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.
Definition: gprs_bssgp.c:173
struct osmo_bssgp_prim::@0::@1 resume
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)
Definition: gprs_bssgp_bss.c:324
int bssgp_tx_bvc_reset_nsei_bvci(uint16_t nsei, uint16_t bvci, enum gprs_bssgp_cause cause, const struct gprs_ra_id *ra_id, uint16_t cell_id)
Transmit a BVC-RESET message with a given nsei and bvci (Chapter 10.4.12)
Definition: gprs_bssgp.c:149
@ BSSGP_IE_FEATURE_BITMAP
Definition: gsm_08_18.h:161
uint16_t len
Definition: gprs_bssgp.h:165
const char * bssgp_pdu_str(enum bssgp_pdu_type pdu)
Definition: gprs_bssgp_util.c:489
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
#define BVC_S_BLOCKED
Definition: gprs_bssgp.h:104
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
int bssgp_tx_suspend_ack(uint16_t nsei, uint32_t tlli, const struct gprs_ra_id *ra_id, uint8_t suspend_ref)
Definition: gprs_bssgp.c:270
void bssgp_flush_all_queues()
Flush the queues of all BSSGP contexts.
Definition: gprs_bssgp.c:1431