libosmogb 1.9.0.196-9975
Osmocom Gb library
gprs_bssgp2.h
Go to the documentation of this file.
1#pragma once
2#include <stdint.h>
3
6
8struct gprs_ns2_inst;
9struct gprs_ra_id;
10struct msgb;
11
13 uint8_t tag;
14 /* maximum bucket size (Bmax) in bytes */
18 /* percentage how full the given bucket is */
21 union {
23 struct {
27 uint64_t r_default_ms;
28
30 uint32_t measurement;
32 } bvc;
34 struct {
36 uint32_t tlli;
37 } ms;
38 } u;
39};
40
41
42int bssgp2_nsi_tx_ptp(struct gprs_ns2_inst *nsi, uint16_t nsei, uint16_t bvci,
43 struct msgb *msg, uint32_t lsp);
44
45int bssgp2_nsi_tx_sig(struct gprs_ns2_inst *nsi, uint16_t nsei, struct msgb *msg, uint32_t lsp);
46
47struct msgb *bssgp2_enc_bvc_block(uint16_t bvci, enum gprs_bssgp_cause cause);
48
49struct msgb *bssgp2_enc_bvc_block_ack(uint16_t bvci);
50
51struct msgb *bssgp2_enc_bvc_unblock(uint16_t bvci);
52
53struct msgb *bssgp2_enc_bvc_unblock_ack(uint16_t bvci);
54
55struct msgb *bssgp2_enc_bvc_reset(uint16_t bvci, enum gprs_bssgp_cause cause,
56 const struct gprs_ra_id *ra_id, uint16_t cell_id,
57 const uint8_t *feat_bm, const uint8_t *ext_feat_bm);
58
59struct msgb *bssgp2_enc_bvc_reset_ack(uint16_t bvci, const struct gprs_ra_id *ra_id, uint16_t cell_id,
60 const uint8_t *feat_bm, const uint8_t *ext_feat_bm);
61
62struct msgb *bssgp2_enc_flush_ll(uint32_t tlli, uint16_t old_bvci,
63 const uint16_t *new_bvci, const uint16_t *nsei);
64struct msgb *bssgp2_enc_status(uint8_t cause, const uint16_t *bvci, const struct msgb *orig_msg, uint16_t max_pdu_len);
65
66
67int bssgp2_dec_fc_bvc(struct bssgp2_flow_ctrl *fc, const struct tlv_parsed *tp);
68struct msgb *bssgp2_enc_fc_bvc(const struct bssgp2_flow_ctrl *fc, enum bssgp_fc_granularity *gran);
69struct msgb *bssgp2_enc_fc_bvc_ack(uint8_t tag);
70int bssgp2_dec_fc_ms(struct bssgp2_flow_ctrl *fc, struct tlv_parsed *tp);
71struct msgb *bssgp2_enc_fc_ms(const struct bssgp2_flow_ctrl *fc, enum bssgp_fc_granularity *gran);
72struct msgb *bssgp2_enc_fc_ms_ack(uint32_t tlli, uint8_t tag);
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
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
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
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 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
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
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
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
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
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 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
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
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
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
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
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
uint32_t tlli
Identifier of a MS (inside BTS), equal to 'struct sgsn_mm_ctx'.
Definition: gprs_msgb.h:11
uint16_t bvci
Definition: gprs_msgb.h:8
uint16_t nsei
Identifiers of a BTS, equal to 'struct bssgp_bts_ctx'.
Definition: gprs_msgb.h:7
gprs_bssgp_cause
Cause coding (Section 11.3.8 / Table 11.10)
Definition: gsm_08_18.h:266
bssgp_fc_granularity
Definition: gsm_08_18.h:347
Definition: gprs_bssgp2.h:12
bool measurement_present
Definition: gprs_bssgp2.h:31
uint64_t bucket_size_max
Definition: gprs_bssgp2.h:15
bool bucket_full_ratio_present
Definition: gprs_bssgp2.h:20
uint32_t measurement
average milliseconds of queueing delay for a BVC
Definition: gprs_bssgp2.h:30
uint64_t bmax_default_ms
default maximum bucket size per MS in bytes
Definition: gprs_bssgp2.h:25
uint8_t tag
Definition: gprs_bssgp2.h:13
struct bssgp2_flow_ctrl::@2::@3 bvc
FC-BVC specifi members.
uint64_t bucket_leak_rate
bucket leak rate in bytes per second
Definition: gprs_bssgp2.h:17
uint8_t bucket_full_ratio
Definition: gprs_bssgp2.h:19
union bssgp2_flow_ctrl::@2 u
struct bssgp2_flow_ctrl::@2::@4 ms
FC-MS specifi members.
uint64_t r_default_ms
default bucket leak rate (R) for MS flow control bucket
Definition: gprs_bssgp2.h:27
uint32_t tlli
TLLI of the MS.
Definition: gprs_bssgp2.h:36
An instance of the NS protocol stack.
Definition: gprs_ns2_internal.h:166