libosmogb 1.13.1.1-afb4 Osmocom Gb library

gprs_bssgp_rim.h
Go to the documentation of this file.
1
3/*
4 * (C) 2020-2021 by sysmocom - s.f.m.c. GmbH
5 * Author: Philipp Maier <pmaier@sysmocom.de>
6 *
7 * All Rights Reserved
8 *
9 * SPDX-License-Identifier: GPL-2.0+
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program. If not, see <http://www.gnu.org/licenses/>.
23 *
24 */
25
26#pragma once
27
28#include <osmocom/gsm/gsm48.h>
29#include <osmocom/gprs/protocol/gsm_08_18.h>
30#include <osmocom/gprs/protocol/gsm_24_301.h>
31
32 enum bssgp_rim_routing_info_discr {
33 BSSGP_RIM_ROUTING_INFO_GERAN,
34 BSSGP_RIM_ROUTING_INFO_UTRAN,
35 BSSGP_RIM_ROUTING_INFO_EUTRAN,
36};
37
38 extern const struct value_string bssgp_rim_routing_info_discr_strs[];
39
41 static inline const char *bssgp_rim_routing_info_discr_str(enum bssgp_rim_routing_info_discr val)
42{ return get_value_string(bssgp_rim_routing_info_discr_strs, val); }
43
45 struct bssgp_rim_routing_info {
46 enum bssgp_rim_routing_info_discr discr;
47 union {
48 struct {
49 struct gprs_ra_id raid;
50 uint16_t cid;
51 } geran;
52 struct {
53 struct gprs_ra_id raid;
54 uint16_t rncid;
55 } utran;
56 struct {
57 struct osmo_eutran_tai tai;
58 /* See also 3GPP TS 36.413 9.2.1.37 and 3GPP TS 36.401 */
59 uint8_t global_enb_id[8];
60 uint8_t global_enb_id_len;
61 } eutran;
62 };
63};
64
65/* The encoded result of the rim routing information is, depending on the
66 * address type (discr) of variable length. */
67#define BSSGP_RIM_ROUTING_INFO_MAXLEN 14
68
69 char *bssgp_rim_ri_name_buf(char *buf, size_t buf_len, const struct bssgp_rim_routing_info *ri);
70 const char *bssgp_rim_ri_name(const struct bssgp_rim_routing_info *ri);
71 int bssgp_parse_rim_ri(struct bssgp_rim_routing_info *ri, const uint8_t *buf, unsigned int len);
72 int bssgp_parse_rim_ra(struct bssgp_rim_routing_info *ri, const uint8_t *buf, unsigned int len, uint8_t discr);
73 int bssgp_create_rim_ri(uint8_t *buf, const struct bssgp_rim_routing_info *ri);
74
75/* 3GPP TS 48.018, table 11.3.63.1.1: RAN-INFORMATION-REQUEST Application Container coding for NACC */
76 struct bssgp_ran_inf_req_app_cont_nacc {
77 struct osmo_cell_global_id_ps reprt_cell;
78};
79
80 int bssgp_dec_ran_inf_req_app_cont_nacc(struct bssgp_ran_inf_req_app_cont_nacc *cont, const uint8_t *buf, size_t len);
81 int bssgp_enc_ran_inf_req_app_cont_nacc(uint8_t *buf, size_t len, const struct bssgp_ran_inf_req_app_cont_nacc *cont);
82
83/* Length of NACC system information, see also: 3GPP TS 48.018 11.3.63.2.1 */
84#define BSSGP_RIM_SI_LEN 21
85#define BSSGP_RIM_PSI_LEN 22
86
87/* 3GPP TS 48.018, table 11.3.63.2.1.a: RAN-INFORMATION Application Container coding for NACC */
88 struct bssgp_ran_inf_app_cont_nacc {
89 struct osmo_cell_global_id_ps reprt_cell;
90 bool type_psi;
91 uint8_t num_si;
92
93 /* Pointer to system information messages */
94 const uint8_t *si[127];
95};
96
97 int bssgp_dec_ran_inf_app_cont_nacc(struct bssgp_ran_inf_app_cont_nacc *cont, const uint8_t *buf, size_t len);
98 int bssgp_enc_ran_inf_app_cont_nacc(uint8_t *buf, size_t len, const struct bssgp_ran_inf_app_cont_nacc *cont);
99
100/* 3GPP TS 48.018, table 11.3.64.1.b, NACC Cause coding */
101 enum bssgp_nacc_cause {
102 BSSGP_NACC_CAUSE_UNSPEC,
103 BSSGP_NACC_CAUSE_SYNTAX_ERR,
104 BSSGP_NACC_CAUSE_RPRT_CELL_MISSMTCH,
105 BSSGP_NACC_CAUSE_SIPSI_TYPE_ERR,
106 BSSGP_NACC_CAUSE_SIPSI_LEN_ERR,
107 BSSGP_NACC_CAUSE_SIPSI_SET_ERR,
108};
109
110 extern const struct value_string bssgp_nacc_cause_strs[];
111
113 static inline const char *bssgp_nacc_cause_str(enum bssgp_nacc_cause val)
114{ return get_value_string(bssgp_nacc_cause_strs, val); }
115
116/* 3GPP TS 48.018, table 11.3.64.1.a, Application Error Container coding for NACC */
117 struct bssgp_app_err_cont_nacc {
118 enum bssgp_nacc_cause nacc_cause;
119
120 /* Pointer to errornous application container */
121 const uint8_t *err_app_cont;
122 size_t err_app_cont_len;
123};
124
125 int bssgp_dec_app_err_cont_nacc(struct bssgp_app_err_cont_nacc *cont, const uint8_t *buf, size_t len);
126 int bssgp_enc_app_err_cont_nacc(uint8_t *buf, size_t len, const struct bssgp_app_err_cont_nacc *cont);
127
128/* 3GPP TS 48.018, table 11.3.61.b: RIM Application Identity coding */
129 enum bssgp_ran_inf_app_id {
130 BSSGP_RAN_INF_APP_ID_NACC = 1,
131 BSSGP_RAN_INF_APP_ID_SI3 = 2,
132 BSSGP_RAN_INF_APP_ID_MBMS = 3,
133 BSSGP_RAN_INF_APP_ID_SON = 4,
134 BSSGP_RAN_INF_APP_ID_UTRA_SI = 5,
135};
136
137 extern const struct value_string bssgp_ran_inf_app_id_strs[];
138
140 static inline const char *bssgp_ran_inf_app_id_str(enum bssgp_ran_inf_app_id val)
141{ return get_value_string(bssgp_ran_inf_app_id_strs, val); }
142
143/* 3GPP TS 48.018, table 11.3.62a.1.b: RAN-INFORMATION-REQUEST RIM Container Contents */
144 struct bssgp_ran_inf_req_rim_cont {
145 enum bssgp_ran_inf_app_id app_id;
146 uint32_t seq_num;
147 struct bssgp_rim_pdu_ind pdu_ind;
148 uint8_t prot_ver;
149
150 /* Nested application container */
151 union {
152 struct bssgp_ran_inf_req_app_cont_nacc app_cont_nacc;
153 /* TODO: add containers for Si3, MBMS, SON, UTRA-SI */
154 } u;
155
156 /* Pointer to SON-transfer application identity, only present if app_id is indicating "son-transfer",
157 * see also 3GPP TS 48.018, section 11.3.108 and 3GPP TS 36.413 annex B.1.1 */
158 const uint8_t *son_trans_app_id;
159 size_t son_trans_app_id_len;
160};
161
162 int bssgp_dec_ran_inf_req_rim_cont(struct bssgp_ran_inf_req_rim_cont *cont, const uint8_t *buf, size_t len);
163 int bssgp_enc_ran_inf_req_rim_cont(uint8_t *buf, size_t len, const struct bssgp_ran_inf_req_rim_cont *cont);
164
165/* 3GPP TS 48.018, table 11.3.62a.2.b: RAN-INFORMATION RIM Container Contents */
166 struct bssgp_ran_inf_rim_cont {
167 enum bssgp_ran_inf_app_id app_id;
168 uint32_t seq_num;
169 struct bssgp_rim_pdu_ind pdu_ind;
170 uint8_t prot_ver;
171 bool app_err;
172
173 /* Nested application container */
174 union {
175 struct bssgp_ran_inf_app_cont_nacc app_cont_nacc;
176 struct bssgp_app_err_cont_nacc app_err_cont_nacc;
177 /* TODO: add containers for Si3, MBMS, SON, UTRA-SI */
178 } u;
179
180 /* Pointer to SON-transfer application identity, only present if app_id is indicating "son-transfer",
181 * see also 3GPP TS 48.018, section 11.3.108 and 3GPP TS 36.413 annex B.1.1 */
182 const uint8_t *son_trans_app_id;
183 size_t son_trans_app_id_len;
184};
185
186 int bssgp_dec_ran_inf_rim_cont(struct bssgp_ran_inf_rim_cont *cont, const uint8_t *buf, size_t len);
187 int bssgp_enc_ran_inf_rim_cont(uint8_t *buf, size_t len, const struct bssgp_ran_inf_rim_cont *cont);
188
189/* 3GPP TS 48.018, table 11.3.62a.3.b: RAN-INFORMATION-ACK RIM Container Contents */
190 struct bssgp_ran_inf_ack_rim_cont {
191 enum bssgp_ran_inf_app_id app_id;
192 uint32_t seq_num;
193 uint8_t prot_ver;
194
195 /* Pointer to SON-transfer application identity, only present if app_id is indicating "son-transfer",
196 * see also 3GPP TS 48.018, section 11.3.108 and 3GPP TS 36.413 annex B.1.1 */
197 const uint8_t *son_trans_app_id;
198 size_t son_trans_app_id_len;
199};
200
201 int bssgp_dec_ran_inf_ack_rim_cont(struct bssgp_ran_inf_ack_rim_cont *cont, const uint8_t *buf, size_t len);
202 int bssgp_enc_ran_inf_ack_rim_cont(uint8_t *buf, size_t len, const struct bssgp_ran_inf_ack_rim_cont *cont);
203
204/* 3GPP TS 48.018, table 11.3.62a.4.b: RAN-INFORMATION-ERROR RIM Container Contents */
205 struct bssgp_ran_inf_err_rim_cont {
206 enum bssgp_ran_inf_app_id app_id;
207 uint8_t cause;
208 uint8_t prot_ver;
209
210 /* Pointer to (encoded) errornous PDU,
211 * see also: 3GPP TS 48.018, section 11.3.24 */
212 const uint8_t *err_pdu;
213 size_t err_pdu_len;
214
215 /* Pointer to SON-transfer application identity, only present if app_id is indicating "son-transfer",
216 * see also 3GPP TS 48.018, section 11.3.108 and 3GPP TS 36.413 annex B.1.1 */
217 const uint8_t *son_trans_app_id;
218 size_t son_trans_app_id_len;
219};
220
221 int bssgp_dec_ran_inf_err_rim_cont(struct bssgp_ran_inf_err_rim_cont *cont, const uint8_t *buf, size_t len);
222 int bssgp_enc_ran_inf_err_rim_cont(uint8_t *buf, size_t len, const struct bssgp_ran_inf_err_rim_cont *cont);
223
224/* 3GPP TS 48.018, table 11.3.62a.5.b: RAN-INFORMATION-APPLICATION-ERROR RIM Container Contents */
225 struct bssgp_ran_inf_app_err_rim_cont {
226 enum bssgp_ran_inf_app_id app_id;
227 uint32_t seq_num;
228 struct bssgp_rim_pdu_ind pdu_ind;
229 uint8_t prot_ver;
230
231 /* Nested application container */
232 union {
233 struct bssgp_app_err_cont_nacc app_err_cont_nacc;
234 /* TODO: add containers for Si3, MBMS, SON, UTRA-SI */
235 } u;
236};
237
238 int bssgp_dec_ran_inf_app_err_rim_cont(struct bssgp_ran_inf_app_err_rim_cont *cont, const uint8_t *buf, size_t len);
239 int bssgp_enc_ran_inf_app_err_rim_cont(uint8_t *buf, size_t len, const struct bssgp_ran_inf_app_err_rim_cont *cont);
240
241/* Chapter 10.6.1: RAN-INFORMATION-REQUEST */
242 struct bssgp_ran_information_pdu {
243 struct bssgp_rim_routing_info routing_info_dest;
244 struct bssgp_rim_routing_info routing_info_src;
245
246 /* Encoded variant of the RIM container */
247 uint8_t rim_cont_iei;
248 const uint8_t *rim_cont;
249 unsigned int rim_cont_len;
250
251 /* Decoded variant of the RIM container */
252 bool decoded_present;
253 union {
254 struct bssgp_ran_inf_req_rim_cont req_rim_cont;
255 struct bssgp_ran_inf_rim_cont rim_cont;
256 struct bssgp_ran_inf_ack_rim_cont ack_rim_cont;
257 struct bssgp_ran_inf_err_rim_cont err_rim_cont;
258 struct bssgp_ran_inf_app_err_rim_cont app_err_rim_cont;
259 } decoded;
260
261 /* When receiving a PDU from BSSGP the encoded variant of the RIM
262 * container will always be present. The decoded variant will be
263 * present in addition whenever BSSGP was able to decode the container.
264 *
265 * When sending a PDU to BSSGP, then the decoded variant is used when
266 * it is available. The encoded variant (if present) will be ignored
267 * then. */
268};
269
270 int bssgp_parse_rim_pdu(struct bssgp_ran_information_pdu *pdu, const struct msgb *msg);
271 struct msgb *bssgp_encode_rim_pdu(const struct bssgp_ran_information_pdu *pdu);
272
273 int bssgp_tx_rim(const struct bssgp_ran_information_pdu *pdu, uint16_t nsei);
274 int bssgp_tx_rim_encoded(struct msgb *msg, uint16_t nsei);
bssgp_enc_ran_inf_app_err_rim_cont
int bssgp_enc_ran_inf_app_err_rim_cont(uint8_t *buf, size_t len, const struct bssgp_ran_inf_app_err_rim_cont *cont)
Encode a RAN Information Application Error RIM Container (3GPP TS 48.018, table 11....
Definition: gprs_bssgp_rim.c:939
bssgp_ran_inf_app_id
bssgp_ran_inf_app_id
Definition: gprs_bssgp_rim.h:129
BSSGP_RAN_INF_APP_ID_MBMS
@ BSSGP_RAN_INF_APP_ID_MBMS
Definition: gprs_bssgp_rim.h:132
BSSGP_RAN_INF_APP_ID_UTRA_SI
@ BSSGP_RAN_INF_APP_ID_UTRA_SI
Definition: gprs_bssgp_rim.h:134
BSSGP_RAN_INF_APP_ID_SI3
@ BSSGP_RAN_INF_APP_ID_SI3
Definition: gprs_bssgp_rim.h:131
BSSGP_RAN_INF_APP_ID_SON
@ BSSGP_RAN_INF_APP_ID_SON
Definition: gprs_bssgp_rim.h:133
BSSGP_RAN_INF_APP_ID_NACC
@ BSSGP_RAN_INF_APP_ID_NACC
Definition: gprs_bssgp_rim.h:130
bssgp_rim_routing_info_discr_strs
const struct value_string bssgp_rim_routing_info_discr_strs[]
Definition: gprs_bssgp_rim.c:45
bssgp_tx_rim_encoded
int bssgp_tx_rim_encoded(struct msgb *msg, uint16_t nsei)
Send encoded RAN TRANSPARENT CONTAINER via BSSGP (3GPP TS 29.060, section 7.7.43).
Definition: gprs_bssgp_rim.c:1208
bssgp_create_rim_ri
int bssgp_create_rim_ri(uint8_t *buf, const struct bssgp_rim_routing_info *ri)
Encode a RIM Routing information IE (3GPP TS 48.018, chapter 11.3.70).
Definition: gprs_bssgp_rim.c:124
bssgp_enc_ran_inf_req_rim_cont
int bssgp_enc_ran_inf_req_rim_cont(uint8_t *buf, size_t len, const struct bssgp_ran_inf_req_rim_cont *cont)
Encode a RAN Information Request RIM Container (3GPP TS 48.018, table 11.3.62a.1.b).
Definition: gprs_bssgp_rim.c:565
bssgp_enc_ran_inf_err_rim_cont
int bssgp_enc_ran_inf_err_rim_cont(uint8_t *buf, size_t len, const struct bssgp_ran_inf_err_rim_cont *cont)
Encode a RAN Information Error RIM Container (3GPP TS 48.018, table 11.3.62a.4.b).
Definition: gprs_bssgp_rim.c:866
bssgp_parse_rim_ra
int bssgp_parse_rim_ra(struct bssgp_rim_routing_info *ri, const uint8_t *buf, unsigned int len, uint8_t discr)
Parse a RIM Routing address IE (3GPP TS 29.060, chapter 7.7.57 and 7.7.77).
Definition: gprs_bssgp_rim.c:57
bssgp_enc_ran_inf_rim_cont
int bssgp_enc_ran_inf_rim_cont(uint8_t *buf, size_t len, const struct bssgp_ran_inf_rim_cont *cont)
Encode a RAN Information RIM Container (3GPP TS 48.018, table 11.3.62a.2.b).
Definition: gprs_bssgp_rim.c:683
bssgp_dec_app_err_cont_nacc
int bssgp_dec_app_err_cont_nacc(struct bssgp_app_err_cont_nacc *cont, const uint8_t *buf, size_t len)
Decode a Application Error Container for NACC (3GPP TS 48.018, section 11.3.64.1).
Definition: gprs_bssgp_rim.c:379
bssgp_dec_ran_inf_ack_rim_cont
int bssgp_dec_ran_inf_ack_rim_cont(struct bssgp_ran_inf_ack_rim_cont *cont, const uint8_t *buf, size_t len)
Decode a RAN Information ACK RIM Container (3GPP TS 48.018, table 11.3.62a.3.b).
Definition: gprs_bssgp_rim.c:754
bssgp_rim_ri_name_buf
char * bssgp_rim_ri_name_buf(char *buf, size_t buf_len, const struct bssgp_rim_routing_info *ri)
Encode a RIM Routing information into a human readable string.
Definition: gprs_bssgp_rim.c:176
bssgp_enc_ran_inf_req_app_cont_nacc
int bssgp_enc_ran_inf_req_app_cont_nacc(uint8_t *buf, size_t len, const struct bssgp_ran_inf_req_app_cont_nacc *cont)
Encode a RAN Information Request Application Container for NACC (3GPP TS 48.018, section 11....
Definition: gprs_bssgp_rim.c:256
bssgp_parse_rim_pdu
int bssgp_parse_rim_pdu(struct bssgp_ran_information_pdu *pdu, const struct msgb *msg)
Parse a given message buffer into a rim-pdu struct.
Definition: gprs_bssgp_rim.c:979
bssgp_rim_ri_name
const char * bssgp_rim_ri_name(const struct bssgp_rim_routing_info *ri)
Encode a RIM Routing information into a human readable string.
Definition: gprs_bssgp_rim.c:227
bssgp_dec_ran_inf_req_rim_cont
int bssgp_dec_ran_inf_req_rim_cont(struct bssgp_ran_inf_req_rim_cont *cont, const uint8_t *buf, size_t len)
Decode a RAN Information Request RIM Container (3GPP TS 48.018, table 11.3.62a.1.b).
Definition: gprs_bssgp_rim.c:493
bssgp_dec_ran_inf_err_rim_cont
int bssgp_dec_ran_inf_err_rim_cont(struct bssgp_ran_inf_err_rim_cont *cont, const uint8_t *buf, size_t len)
Decode a RAN Information Error RIM Container (3GPP TS 48.018, table 11.3.62a.4.b).
Definition: gprs_bssgp_rim.c:821
bssgp_dec_ran_inf_app_cont_nacc
int bssgp_dec_ran_inf_app_cont_nacc(struct bssgp_ran_inf_app_cont_nacc *cont, const uint8_t *buf, size_t len)
Decode a RAN Information Application Container (3GPP TS 48.018, section 11.3.63.2....
Definition: gprs_bssgp_rim.c:275
bssgp_enc_app_err_cont_nacc
int bssgp_enc_app_err_cont_nacc(uint8_t *buf, size_t len, const struct bssgp_app_err_cont_nacc *cont)
Encode Application Error Container for NACC (3GPP TS 48.018, section 11.3.64.1).
Definition: gprs_bssgp_rim.c:403
bssgp_enc_ran_inf_ack_rim_cont
int bssgp_enc_ran_inf_ack_rim_cont(uint8_t *buf, size_t len, const struct bssgp_ran_inf_ack_rim_cont *cont)
Encode a RAN Information ACK RIM Container (3GPP TS 48.018, table 11.3.62a.3.b).
Definition: gprs_bssgp_rim.c:792
bssgp_ran_inf_app_id_strs
const struct value_string bssgp_ran_inf_app_id_strs[]
Definition: gprs_bssgp_rim.c:480
bssgp_enc_ran_inf_app_cont_nacc
int bssgp_enc_ran_inf_app_cont_nacc(uint8_t *buf, size_t len, const struct bssgp_ran_inf_app_cont_nacc *cont)
Encode a RAN Information Application Container (3GPP TS 48.018, section 11.3.63.2....
Definition: gprs_bssgp_rim.c:326
bssgp_nacc_cause_strs
const struct value_string bssgp_nacc_cause_strs[]
Definition: gprs_bssgp_rim.c:365
bssgp_tx_rim
int bssgp_tx_rim(const struct bssgp_ran_information_pdu *pdu, uint16_t nsei)
Send RIM RAN INFORMATION REQUEST via BSSGP (3GPP TS 48.018, section 10.6.1).
Definition: gprs_bssgp_rim.c:1176
bssgp_ran_inf_app_id_str
static const char * bssgp_ran_inf_app_id_str(enum bssgp_ran_inf_app_id val)
Obtain a human-readable string for RIM Application Identity code.
Definition: gprs_bssgp_rim.h:140
bssgp_nacc_cause
bssgp_nacc_cause
Definition: gprs_bssgp_rim.h:101
BSSGP_NACC_CAUSE_SIPSI_LEN_ERR
@ BSSGP_NACC_CAUSE_SIPSI_LEN_ERR
Definition: gprs_bssgp_rim.h:106
BSSGP_NACC_CAUSE_RPRT_CELL_MISSMTCH
@ BSSGP_NACC_CAUSE_RPRT_CELL_MISSMTCH
Definition: gprs_bssgp_rim.h:104
BSSGP_NACC_CAUSE_SYNTAX_ERR
@ BSSGP_NACC_CAUSE_SYNTAX_ERR
Definition: gprs_bssgp_rim.h:103
BSSGP_NACC_CAUSE_UNSPEC
@ BSSGP_NACC_CAUSE_UNSPEC
Definition: gprs_bssgp_rim.h:102
BSSGP_NACC_CAUSE_SIPSI_TYPE_ERR
@ BSSGP_NACC_CAUSE_SIPSI_TYPE_ERR
Definition: gprs_bssgp_rim.h:105
BSSGP_NACC_CAUSE_SIPSI_SET_ERR
@ BSSGP_NACC_CAUSE_SIPSI_SET_ERR
Definition: gprs_bssgp_rim.h:107
bssgp_dec_ran_inf_req_app_cont_nacc
int bssgp_dec_ran_inf_req_app_cont_nacc(struct bssgp_ran_inf_req_app_cont_nacc *cont, const uint8_t *buf, size_t len)
Decode a RAN Information Request Application Container for NACC (3GPP TS 48.018, section 11....
Definition: gprs_bssgp_rim.c:237
bssgp_parse_rim_ri
int bssgp_parse_rim_ri(struct bssgp_rim_routing_info *ri, const uint8_t *buf, unsigned int len)
Parse a RIM Routing information IE (3GPP TS 48.018, chapter 11.3.70).
Definition: gprs_bssgp_rim.c:103
bssgp_dec_ran_inf_app_err_rim_cont
int bssgp_dec_ran_inf_app_err_rim_cont(struct bssgp_ran_inf_app_err_rim_cont *cont, const uint8_t *buf, size_t len)
Decode a RAN Information Application Error RIM Container (3GPP TS 48.018, table 11....
Definition: gprs_bssgp_rim.c:899
bssgp_rim_routing_info_discr_str
static const char * bssgp_rim_routing_info_discr_str(enum bssgp_rim_routing_info_discr val)
Obtain a human-readable string for NACC Cause code.
Definition: gprs_bssgp_rim.h:41
bssgp_dec_ran_inf_rim_cont
int bssgp_dec_ran_inf_rim_cont(struct bssgp_ran_inf_rim_cont *cont, const uint8_t *buf, size_t len)
Decode a RAN Information RIM Container (3GPP TS 48.018, table 11.3.62a.2.b).
Definition: gprs_bssgp_rim.c:616
bssgp_rim_routing_info_discr
bssgp_rim_routing_info_discr
Definition: gprs_bssgp_rim.h:32
BSSGP_RIM_ROUTING_INFO_UTRAN
@ BSSGP_RIM_ROUTING_INFO_UTRAN
Definition: gprs_bssgp_rim.h:34
BSSGP_RIM_ROUTING_INFO_EUTRAN
@ BSSGP_RIM_ROUTING_INFO_EUTRAN
Definition: gprs_bssgp_rim.h:35
BSSGP_RIM_ROUTING_INFO_GERAN
@ BSSGP_RIM_ROUTING_INFO_GERAN
Definition: gprs_bssgp_rim.h:33
bssgp_nacc_cause_str
static const char * bssgp_nacc_cause_str(enum bssgp_nacc_cause val)
Obtain a human-readable string for NACC Cause code.
Definition: gprs_bssgp_rim.h:113
bssgp_encode_rim_pdu
struct msgb * bssgp_encode_rim_pdu(const struct bssgp_ran_information_pdu *pdu)
Encode a given rim-pdu struct into a message buffer.
Definition: gprs_bssgp_rim.c:1083
nsei
uint16_t nsei
Identifiers of a BTS, equal to 'struct bssgp_bts_ctx'.
Definition: gprs_msgb.h:7
len
static size_t len(const char *str)
get_value_string
const char * get_value_string(const struct value_string *vs, uint32_t val)
gsm48.h
gsm_08_18.h
gsm_24_301.h
bssgp_app_err_cont_nacc
Definition: gprs_bssgp_rim.h:117
bssgp_app_err_cont_nacc::err_app_cont
const uint8_t * err_app_cont
Definition: gprs_bssgp_rim.h:121
bssgp_app_err_cont_nacc::nacc_cause
enum bssgp_nacc_cause nacc_cause
Definition: gprs_bssgp_rim.h:118
bssgp_app_err_cont_nacc::err_app_cont_len
size_t err_app_cont_len
Definition: gprs_bssgp_rim.h:122
bssgp_ran_inf_ack_rim_cont
Definition: gprs_bssgp_rim.h:190
bssgp_ran_inf_ack_rim_cont::prot_ver
uint8_t prot_ver
Definition: gprs_bssgp_rim.h:193
bssgp_ran_inf_ack_rim_cont::son_trans_app_id_len
size_t son_trans_app_id_len
Definition: gprs_bssgp_rim.h:198
bssgp_ran_inf_ack_rim_cont::app_id
enum bssgp_ran_inf_app_id app_id
Definition: gprs_bssgp_rim.h:191
bssgp_ran_inf_ack_rim_cont::seq_num
uint32_t seq_num
Definition: gprs_bssgp_rim.h:192
bssgp_ran_inf_ack_rim_cont::son_trans_app_id
const uint8_t * son_trans_app_id
Definition: gprs_bssgp_rim.h:197
bssgp_ran_inf_app_cont_nacc
Definition: gprs_bssgp_rim.h:88
bssgp_ran_inf_app_cont_nacc::si
const uint8_t * si[127]
Definition: gprs_bssgp_rim.h:94
bssgp_ran_inf_app_cont_nacc::num_si
uint8_t num_si
Definition: gprs_bssgp_rim.h:91
bssgp_ran_inf_app_cont_nacc::type_psi
bool type_psi
Definition: gprs_bssgp_rim.h:90
bssgp_ran_inf_app_cont_nacc::reprt_cell
struct osmo_cell_global_id_ps reprt_cell
Definition: gprs_bssgp_rim.h:89
bssgp_ran_inf_app_err_rim_cont
Definition: gprs_bssgp_rim.h:225
bssgp_ran_inf_app_err_rim_cont::seq_num
uint32_t seq_num
Definition: gprs_bssgp_rim.h:227
bssgp_ran_inf_app_err_rim_cont::prot_ver
uint8_t prot_ver
Definition: gprs_bssgp_rim.h:229
bssgp_ran_inf_app_err_rim_cont::u
union bssgp_ran_inf_app_err_rim_cont::@12 u
bssgp_ran_inf_app_err_rim_cont::app_err_cont_nacc
struct bssgp_app_err_cont_nacc app_err_cont_nacc
Definition: gprs_bssgp_rim.h:233
bssgp_ran_inf_app_err_rim_cont::app_id
enum bssgp_ran_inf_app_id app_id
Definition: gprs_bssgp_rim.h:226
bssgp_ran_inf_app_err_rim_cont::pdu_ind
struct bssgp_rim_pdu_ind pdu_ind
Definition: gprs_bssgp_rim.h:228
bssgp_ran_inf_err_rim_cont
Definition: gprs_bssgp_rim.h:205
bssgp_ran_inf_err_rim_cont::err_pdu
const uint8_t * err_pdu
Definition: gprs_bssgp_rim.h:212
bssgp_ran_inf_err_rim_cont::son_trans_app_id
const uint8_t * son_trans_app_id
Definition: gprs_bssgp_rim.h:217
bssgp_ran_inf_err_rim_cont::err_pdu_len
size_t err_pdu_len
Definition: gprs_bssgp_rim.h:213
bssgp_ran_inf_err_rim_cont::app_id
enum bssgp_ran_inf_app_id app_id
Definition: gprs_bssgp_rim.h:206
bssgp_ran_inf_err_rim_cont::prot_ver
uint8_t prot_ver
Definition: gprs_bssgp_rim.h:208
bssgp_ran_inf_err_rim_cont::cause
uint8_t cause
Definition: gprs_bssgp_rim.h:207
bssgp_ran_inf_err_rim_cont::son_trans_app_id_len
size_t son_trans_app_id_len
Definition: gprs_bssgp_rim.h:218
bssgp_ran_inf_req_app_cont_nacc
Definition: gprs_bssgp_rim.h:76
bssgp_ran_inf_req_app_cont_nacc::reprt_cell
struct osmo_cell_global_id_ps reprt_cell
Definition: gprs_bssgp_rim.h:77
bssgp_ran_inf_req_rim_cont
Definition: gprs_bssgp_rim.h:144
bssgp_ran_inf_req_rim_cont::pdu_ind
struct bssgp_rim_pdu_ind pdu_ind
Definition: gprs_bssgp_rim.h:147
bssgp_ran_inf_req_rim_cont::son_trans_app_id_len
size_t son_trans_app_id_len
Definition: gprs_bssgp_rim.h:159
bssgp_ran_inf_req_rim_cont::u
union bssgp_ran_inf_req_rim_cont::@10 u
bssgp_ran_inf_req_rim_cont::son_trans_app_id
const uint8_t * son_trans_app_id
Definition: gprs_bssgp_rim.h:158
bssgp_ran_inf_req_rim_cont::prot_ver
uint8_t prot_ver
Definition: gprs_bssgp_rim.h:148
bssgp_ran_inf_req_rim_cont::app_id
enum bssgp_ran_inf_app_id app_id
Definition: gprs_bssgp_rim.h:145
bssgp_ran_inf_req_rim_cont::app_cont_nacc
struct bssgp_ran_inf_req_app_cont_nacc app_cont_nacc
Definition: gprs_bssgp_rim.h:152
bssgp_ran_inf_req_rim_cont::seq_num
uint32_t seq_num
Definition: gprs_bssgp_rim.h:146
bssgp_ran_inf_rim_cont
Definition: gprs_bssgp_rim.h:166
bssgp_ran_inf_rim_cont::prot_ver
uint8_t prot_ver
Definition: gprs_bssgp_rim.h:170
bssgp_ran_inf_rim_cont::pdu_ind
struct bssgp_rim_pdu_ind pdu_ind
Definition: gprs_bssgp_rim.h:169
bssgp_ran_inf_rim_cont::app_err_cont_nacc
struct bssgp_app_err_cont_nacc app_err_cont_nacc
Definition: gprs_bssgp_rim.h:176
bssgp_ran_inf_rim_cont::app_id
enum bssgp_ran_inf_app_id app_id
Definition: gprs_bssgp_rim.h:167
bssgp_ran_inf_rim_cont::u
union bssgp_ran_inf_rim_cont::@11 u
bssgp_ran_inf_rim_cont::app_err
bool app_err
Definition: gprs_bssgp_rim.h:171
bssgp_ran_inf_rim_cont::app_cont_nacc
struct bssgp_ran_inf_app_cont_nacc app_cont_nacc
Definition: gprs_bssgp_rim.h:175
bssgp_ran_inf_rim_cont::seq_num
uint32_t seq_num
Definition: gprs_bssgp_rim.h:168
bssgp_ran_inf_rim_cont::son_trans_app_id_len
size_t son_trans_app_id_len
Definition: gprs_bssgp_rim.h:183
bssgp_ran_inf_rim_cont::son_trans_app_id
const uint8_t * son_trans_app_id
Definition: gprs_bssgp_rim.h:182
bssgp_ran_information_pdu
Definition: gprs_bssgp_rim.h:242
bssgp_ran_information_pdu::rim_cont_iei
uint8_t rim_cont_iei
Definition: gprs_bssgp_rim.h:247
bssgp_ran_information_pdu::routing_info_src
struct bssgp_rim_routing_info routing_info_src
Definition: gprs_bssgp_rim.h:244
bssgp_ran_information_pdu::decoded_present
bool decoded_present
Definition: gprs_bssgp_rim.h:252
bssgp_ran_information_pdu::rim_cont_len
unsigned int rim_cont_len
Definition: gprs_bssgp_rim.h:249
bssgp_ran_information_pdu::app_err_rim_cont
struct bssgp_ran_inf_app_err_rim_cont app_err_rim_cont
Definition: gprs_bssgp_rim.h:258
bssgp_ran_information_pdu::routing_info_dest
struct bssgp_rim_routing_info routing_info_dest
Definition: gprs_bssgp_rim.h:243
bssgp_ran_information_pdu::rim_cont
const uint8_t * rim_cont
Definition: gprs_bssgp_rim.h:248
bssgp_ran_information_pdu::decoded
union bssgp_ran_information_pdu::@13 decoded
bssgp_ran_information_pdu::ack_rim_cont
struct bssgp_ran_inf_ack_rim_cont ack_rim_cont
Definition: gprs_bssgp_rim.h:256
bssgp_ran_information_pdu::err_rim_cont
struct bssgp_ran_inf_err_rim_cont err_rim_cont
Definition: gprs_bssgp_rim.h:257
bssgp_ran_information_pdu::req_rim_cont
struct bssgp_ran_inf_req_rim_cont req_rim_cont
Definition: gprs_bssgp_rim.h:254
bssgp_rim_pdu_ind
Definition: gsm_08_18.h:364
bssgp_rim_routing_info
BSSGP RIM Routing information, see also 3GPP TS 48.018, section 11.3.70.
Definition: gprs_bssgp_rim.h:45
bssgp_rim_routing_info::rncid
uint16_t rncid
Definition: gprs_bssgp_rim.h:54
bssgp_rim_routing_info::raid
struct gprs_ra_id raid
Definition: gprs_bssgp_rim.h:49
bssgp_rim_routing_info::discr
enum bssgp_rim_routing_info_discr discr
Definition: gprs_bssgp_rim.h:46
bssgp_rim_routing_info::global_enb_id_len
uint8_t global_enb_id_len
Definition: gprs_bssgp_rim.h:60
bssgp_rim_routing_info::global_enb_id
uint8_t global_enb_id[8]
Definition: gprs_bssgp_rim.h:59
bssgp_rim_routing_info::tai
struct osmo_eutran_tai tai
Definition: gprs_bssgp_rim.h:57
bssgp_rim_routing_info::cid
uint16_t cid
Definition: gprs_bssgp_rim.h:50
bssgp_rim_routing_info::geran
struct bssgp_rim_routing_info::@5::@7 geran
bssgp_rim_routing_info::eutran
struct bssgp_rim_routing_info::@5::@9 eutran
bssgp_rim_routing_info::utran
struct bssgp_rim_routing_info::@5::@8 utran
gprs_ra_id
msgb
osmo_cell_global_id_ps
osmo_eutran_tai
Tracking area TS 24.301, section 9.9.3.32.
Definition: gsm_24_301.h:10
value_string