\doxysection{gprs\+\_\+bssgp\+\_\+rim.\+h}
\label{gprs__bssgp__rim_8h_source}\index{include/osmocom/gprs/gprs\_bssgp\_rim.h@{include/osmocom/gprs/gprs\_bssgp\_rim.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 }
\DoxyCodeLine{3 \textcolor{comment}{/*}}
\DoxyCodeLine{4 \textcolor{comment}{ * (C) 2020-\/2021 by sysmocom -\/ s.f.m.c. GmbH}}
\DoxyCodeLine{5 \textcolor{comment}{ * Author: Philipp Maier <pmaier@sysmocom.de>}}
\DoxyCodeLine{6 \textcolor{comment}{ *}}
\DoxyCodeLine{7 \textcolor{comment}{ * All Rights Reserved}}
\DoxyCodeLine{8 \textcolor{comment}{ *}}
\DoxyCodeLine{9 \textcolor{comment}{ * SPDX-\/License-\/Identifier: GPL-\/2.0+}}
\DoxyCodeLine{10 \textcolor{comment}{ *}}
\DoxyCodeLine{11 \textcolor{comment}{ * This program is free software; you can redistribute it and/or modify}}
\DoxyCodeLine{12 \textcolor{comment}{ * it under the terms of the GNU General Public License as published by}}
\DoxyCodeLine{13 \textcolor{comment}{ * the Free Software Foundation; either version 2 of the License, or}}
\DoxyCodeLine{14 \textcolor{comment}{ * (at your option) any later version.}}
\DoxyCodeLine{15 \textcolor{comment}{ *}}
\DoxyCodeLine{16 \textcolor{comment}{ * This program is distributed in the hope that it will be useful,}}
\DoxyCodeLine{17 \textcolor{comment}{ * but WITHOUT ANY WARRANTY; without even the implied warranty of}}
\DoxyCodeLine{18 \textcolor{comment}{ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the}}
\DoxyCodeLine{19 \textcolor{comment}{ * GNU General Public License for more details.}}
\DoxyCodeLine{20 \textcolor{comment}{ *}}
\DoxyCodeLine{21 \textcolor{comment}{ * You should have received a copy of the GNU General Public License}}
\DoxyCodeLine{22 \textcolor{comment}{ * along with this program.  If not, see <http://www.gnu.org/licenses/>.}}
\DoxyCodeLine{23 \textcolor{comment}{ *}}
\DoxyCodeLine{24 \textcolor{comment}{ */}}
\DoxyCodeLine{25 }
\DoxyCodeLine{26 \textcolor{preprocessor}{\#pragma once}}
\DoxyCodeLine{27 }
\DoxyCodeLine{28 \textcolor{preprocessor}{\#include <osmocom/gsm/gsm48.h>}}
\DoxyCodeLine{29 \textcolor{preprocessor}{\#include <osmocom/gprs/protocol/gsm\_08\_18.h>}}
\DoxyCodeLine{30 \textcolor{preprocessor}{\#include <osmocom/gprs/protocol/gsm\_24\_301.h>}}
\DoxyCodeLine{31 }
\DoxyCodeLine{32 \textcolor{keyword}{enum} bssgp\_rim\_routing\_info\_discr \{}
\DoxyCodeLine{33         BSSGP\_RIM\_ROUTING\_INFO\_GERAN,}
\DoxyCodeLine{34         BSSGP\_RIM\_ROUTING\_INFO\_UTRAN,}
\DoxyCodeLine{35         BSSGP\_RIM\_ROUTING\_INFO\_EUTRAN,}
\DoxyCodeLine{36 \};}
\DoxyCodeLine{37 }
\DoxyCodeLine{38 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string bssgp\_rim\_routing\_info\_discr\_strs[];}
\DoxyCodeLine{39 }
\DoxyCodeLine{41 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *bssgp\_rim\_routing\_info\_discr\_str(\textcolor{keyword}{enum} bssgp\_rim\_routing\_info\_discr val)}
\DoxyCodeLine{42 \{ \textcolor{keywordflow}{return} get\_value\_string(bssgp\_rim\_routing\_info\_discr\_strs, val); \}}
\DoxyCodeLine{43 }
\DoxyCodeLine{45 \textcolor{keyword}{struct }bssgp\_rim\_routing\_info \{}
\DoxyCodeLine{46         \textcolor{keyword}{enum} bssgp\_rim\_routing\_info\_discr discr;}
\DoxyCodeLine{47         \textcolor{keyword}{union }\{}
\DoxyCodeLine{48                 \textcolor{keyword}{struct }\{}
\DoxyCodeLine{49                         \textcolor{keyword}{struct }gprs\_ra\_id raid;}
\DoxyCodeLine{50                         uint16\_t cid;}
\DoxyCodeLine{51                 \} geran;}
\DoxyCodeLine{52                 \textcolor{keyword}{struct }\{}
\DoxyCodeLine{53                         \textcolor{keyword}{struct }gprs\_ra\_id raid;}
\DoxyCodeLine{54                         uint16\_t rncid;}
\DoxyCodeLine{55                 \} utran;}
\DoxyCodeLine{56                 \textcolor{keyword}{struct }\{}
\DoxyCodeLine{57                         \textcolor{keyword}{struct }osmo\_eutran\_tai tai;}
\DoxyCodeLine{58                         \textcolor{comment}{/* See also 3GPP TS 36.413 9.2.1.37 and 3GPP TS 36.401 */}}
\DoxyCodeLine{59                         uint8\_t global\_enb\_id[8];}
\DoxyCodeLine{60                         uint8\_t global\_enb\_id\_len;}
\DoxyCodeLine{61                 \} eutran;}
\DoxyCodeLine{62         \};}
\DoxyCodeLine{63 \};}
\DoxyCodeLine{64 }
\DoxyCodeLine{65 \textcolor{comment}{/* The encoded result of the rim routing information is, depending on the}}
\DoxyCodeLine{66 \textcolor{comment}{ * address type (discr) of variable length. */}}
\DoxyCodeLine{67 \textcolor{preprocessor}{\#define BSSGP\_RIM\_ROUTING\_INFO\_MAXLEN 14}}
\DoxyCodeLine{68 }
\DoxyCodeLine{69 \textcolor{keywordtype}{char} *bssgp\_rim\_ri\_name\_buf(\textcolor{keywordtype}{char} *buf, \textcolor{keywordtype}{size\_t} buf\_len, \textcolor{keyword}{const} \textcolor{keyword}{struct} bssgp\_rim\_routing\_info *ri);}
\DoxyCodeLine{70 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *bssgp\_rim\_ri\_name(\textcolor{keyword}{const} \textcolor{keyword}{struct} bssgp\_rim\_routing\_info *ri);}
\DoxyCodeLine{71 \textcolor{keywordtype}{int} bssgp\_parse\_rim\_ri(\textcolor{keyword}{struct} bssgp\_rim\_routing\_info *ri, \textcolor{keyword}{const} uint8\_t *buf, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} len);}
\DoxyCodeLine{72 \textcolor{keywordtype}{int} bssgp\_parse\_rim\_ra(\textcolor{keyword}{struct} bssgp\_rim\_routing\_info *ri, \textcolor{keyword}{const} uint8\_t *buf, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} len, uint8\_t discr);}
\DoxyCodeLine{73 \textcolor{keywordtype}{int} bssgp\_create\_rim\_ri(uint8\_t *buf, \textcolor{keyword}{const} \textcolor{keyword}{struct} bssgp\_rim\_routing\_info *ri);}
\DoxyCodeLine{74 }
\DoxyCodeLine{75 \textcolor{comment}{/* 3GPP TS 48.018, table 11.3.63.1.1: RAN-\/INFORMATION-\/REQUEST Application Container coding for NACC */}}
\DoxyCodeLine{76 \textcolor{keyword}{struct }bssgp\_ran\_inf\_req\_app\_cont\_nacc \{}
\DoxyCodeLine{77         \textcolor{keyword}{struct }osmo\_cell\_global\_id\_ps reprt\_cell;}
\DoxyCodeLine{78 \};}
\DoxyCodeLine{79 }
\DoxyCodeLine{80 \textcolor{keywordtype}{int} bssgp\_dec\_ran\_inf\_req\_app\_cont\_nacc(\textcolor{keyword}{struct} bssgp\_ran\_inf\_req\_app\_cont\_nacc *cont, \textcolor{keyword}{const} uint8\_t *buf, \textcolor{keywordtype}{size\_t} len);}
\DoxyCodeLine{81 \textcolor{keywordtype}{int} bssgp\_enc\_ran\_inf\_req\_app\_cont\_nacc(uint8\_t *buf, \textcolor{keywordtype}{size\_t} len, \textcolor{keyword}{const} \textcolor{keyword}{struct} bssgp\_ran\_inf\_req\_app\_cont\_nacc *cont);}
\DoxyCodeLine{82 }
\DoxyCodeLine{83 \textcolor{comment}{/* Length of NACC system information, see also: 3GPP TS 48.018 11.3.63.2.1 */}}
\DoxyCodeLine{84 \textcolor{preprocessor}{\#define BSSGP\_RIM\_SI\_LEN 21}}
\DoxyCodeLine{85 \textcolor{preprocessor}{\#define BSSGP\_RIM\_PSI\_LEN 22}}
\DoxyCodeLine{86 }
\DoxyCodeLine{87 \textcolor{comment}{/* 3GPP TS 48.018, table 11.3.63.2.1.a: RAN-\/INFORMATION Application Container coding for NACC */}}
\DoxyCodeLine{88 \textcolor{keyword}{struct }bssgp\_ran\_inf\_app\_cont\_nacc \{}
\DoxyCodeLine{89         \textcolor{keyword}{struct }osmo\_cell\_global\_id\_ps reprt\_cell;}
\DoxyCodeLine{90         \textcolor{keywordtype}{bool} type\_psi;}
\DoxyCodeLine{91         uint8\_t num\_si;}
\DoxyCodeLine{92 }
\DoxyCodeLine{93         \textcolor{comment}{/* Pointer to system information messages */}}
\DoxyCodeLine{94         \textcolor{keyword}{const} uint8\_t *si[127];}
\DoxyCodeLine{95 \};}
\DoxyCodeLine{96 }
\DoxyCodeLine{97 \textcolor{keywordtype}{int} bssgp\_dec\_ran\_inf\_app\_cont\_nacc(\textcolor{keyword}{struct} bssgp\_ran\_inf\_app\_cont\_nacc *cont, \textcolor{keyword}{const} uint8\_t *buf, \textcolor{keywordtype}{size\_t} len);}
\DoxyCodeLine{98 \textcolor{keywordtype}{int} bssgp\_enc\_ran\_inf\_app\_cont\_nacc(uint8\_t *buf, \textcolor{keywordtype}{size\_t} len, \textcolor{keyword}{const} \textcolor{keyword}{struct} bssgp\_ran\_inf\_app\_cont\_nacc *cont);}
\DoxyCodeLine{99 }
\DoxyCodeLine{100 \textcolor{comment}{/* 3GPP TS 48.018, table 11.3.64.1.b, NACC Cause coding */}}
\DoxyCodeLine{101 \textcolor{keyword}{enum} bssgp\_nacc\_cause \{}
\DoxyCodeLine{102         BSSGP\_NACC\_CAUSE\_UNSPEC,}
\DoxyCodeLine{103         BSSGP\_NACC\_CAUSE\_SYNTAX\_ERR,}
\DoxyCodeLine{104         BSSGP\_NACC\_CAUSE\_RPRT\_CELL\_MISSMTCH,}
\DoxyCodeLine{105         BSSGP\_NACC\_CAUSE\_SIPSI\_TYPE\_ERR,}
\DoxyCodeLine{106         BSSGP\_NACC\_CAUSE\_SIPSI\_LEN\_ERR,}
\DoxyCodeLine{107         BSSGP\_NACC\_CAUSE\_SIPSI\_SET\_ERR,}
\DoxyCodeLine{108 \};}
\DoxyCodeLine{109 }
\DoxyCodeLine{110 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string bssgp\_nacc\_cause\_strs[];}
\DoxyCodeLine{111 }
\DoxyCodeLine{113 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *bssgp\_nacc\_cause\_str(\textcolor{keyword}{enum} bssgp\_nacc\_cause val)}
\DoxyCodeLine{114 \{ \textcolor{keywordflow}{return} get\_value\_string(bssgp\_nacc\_cause\_strs, val); \}}
\DoxyCodeLine{115 }
\DoxyCodeLine{116 \textcolor{comment}{/* 3GPP TS 48.018, table 11.3.64.1.a, Application Error Container coding for NACC */}}
\DoxyCodeLine{117 \textcolor{keyword}{struct }bssgp\_app\_err\_cont\_nacc \{}
\DoxyCodeLine{118         \textcolor{keyword}{enum} bssgp\_nacc\_cause nacc\_cause;}
\DoxyCodeLine{119 }
\DoxyCodeLine{120         \textcolor{comment}{/* Pointer to errornous application container */}}
\DoxyCodeLine{121         \textcolor{keyword}{const} uint8\_t *err\_app\_cont;}
\DoxyCodeLine{122         \textcolor{keywordtype}{size\_t} err\_app\_cont\_len;}
\DoxyCodeLine{123 \};}
\DoxyCodeLine{124 }
\DoxyCodeLine{125 \textcolor{keywordtype}{int} bssgp\_dec\_app\_err\_cont\_nacc(\textcolor{keyword}{struct} bssgp\_app\_err\_cont\_nacc *cont, \textcolor{keyword}{const} uint8\_t *buf, \textcolor{keywordtype}{size\_t} len);}
\DoxyCodeLine{126 \textcolor{keywordtype}{int} bssgp\_enc\_app\_err\_cont\_nacc(uint8\_t *buf, \textcolor{keywordtype}{size\_t} len, \textcolor{keyword}{const} \textcolor{keyword}{struct} bssgp\_app\_err\_cont\_nacc *cont);}
\DoxyCodeLine{127 }
\DoxyCodeLine{128 \textcolor{comment}{/* 3GPP TS 48.018, table 11.3.61.b: RIM Application Identity coding */}}
\DoxyCodeLine{129 \textcolor{keyword}{enum} bssgp\_ran\_inf\_app\_id \{}
\DoxyCodeLine{130         BSSGP\_RAN\_INF\_APP\_ID\_NACC = 1,}
\DoxyCodeLine{131         BSSGP\_RAN\_INF\_APP\_ID\_SI3 = 2,}
\DoxyCodeLine{132         BSSGP\_RAN\_INF\_APP\_ID\_MBMS = 3,}
\DoxyCodeLine{133         BSSGP\_RAN\_INF\_APP\_ID\_SON = 4,}
\DoxyCodeLine{134         BSSGP\_RAN\_INF\_APP\_ID\_UTRA\_SI = 5,}
\DoxyCodeLine{135 \};}
\DoxyCodeLine{136 }
\DoxyCodeLine{137 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string bssgp\_ran\_inf\_app\_id\_strs[];}
\DoxyCodeLine{138 }
\DoxyCodeLine{140 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *bssgp\_ran\_inf\_app\_id\_str(\textcolor{keyword}{enum} bssgp\_ran\_inf\_app\_id val)}
\DoxyCodeLine{141 \{ \textcolor{keywordflow}{return} get\_value\_string(bssgp\_ran\_inf\_app\_id\_strs, val); \}}
\DoxyCodeLine{142 }
\DoxyCodeLine{143 \textcolor{comment}{/* 3GPP TS 48.018, table 11.3.62a.1.b: RAN-\/INFORMATION-\/REQUEST RIM Container Contents */}}
\DoxyCodeLine{144 \textcolor{keyword}{struct }bssgp\_ran\_inf\_req\_rim\_cont \{}
\DoxyCodeLine{145         \textcolor{keyword}{enum} bssgp\_ran\_inf\_app\_id app\_id;}
\DoxyCodeLine{146         uint32\_t seq\_num;}
\DoxyCodeLine{147         \textcolor{keyword}{struct }bssgp\_rim\_pdu\_ind pdu\_ind;}
\DoxyCodeLine{148         uint8\_t prot\_ver;}
\DoxyCodeLine{149 }
\DoxyCodeLine{150         \textcolor{comment}{/* Nested application container */}}
\DoxyCodeLine{151         \textcolor{keyword}{union }\{}
\DoxyCodeLine{152                 \textcolor{keyword}{struct }bssgp\_ran\_inf\_req\_app\_cont\_nacc app\_cont\_nacc;}
\DoxyCodeLine{153                 \textcolor{comment}{/* TODO: add containers for Si3, MBMS, SON, UTRA-\/SI */}}
\DoxyCodeLine{154         \} u;}
\DoxyCodeLine{155 }
\DoxyCodeLine{156         \textcolor{comment}{/* Pointer to SON-\/transfer application identity, only present if app\_id is indicating "{}son-\/transfer"{},}}
\DoxyCodeLine{157 \textcolor{comment}{         * see also 3GPP TS 48.018, section 11.3.108 and 3GPP TS 36.413 annex B.1.1 */}}
\DoxyCodeLine{158         \textcolor{keyword}{const} uint8\_t *son\_trans\_app\_id;}
\DoxyCodeLine{159         \textcolor{keywordtype}{size\_t} son\_trans\_app\_id\_len;}
\DoxyCodeLine{160 \};}
\DoxyCodeLine{161 }
\DoxyCodeLine{162 \textcolor{keywordtype}{int} bssgp\_dec\_ran\_inf\_req\_rim\_cont(\textcolor{keyword}{struct} bssgp\_ran\_inf\_req\_rim\_cont *cont, \textcolor{keyword}{const} uint8\_t *buf, \textcolor{keywordtype}{size\_t} len);}
\DoxyCodeLine{163 \textcolor{keywordtype}{int} bssgp\_enc\_ran\_inf\_req\_rim\_cont(uint8\_t *buf, \textcolor{keywordtype}{size\_t} len, \textcolor{keyword}{const} \textcolor{keyword}{struct} bssgp\_ran\_inf\_req\_rim\_cont *cont);}
\DoxyCodeLine{164 }
\DoxyCodeLine{165 \textcolor{comment}{/* 3GPP TS 48.018, table 11.3.62a.2.b: RAN-\/INFORMATION RIM Container Contents */}}
\DoxyCodeLine{166 \textcolor{keyword}{struct }bssgp\_ran\_inf\_rim\_cont \{}
\DoxyCodeLine{167         \textcolor{keyword}{enum} bssgp\_ran\_inf\_app\_id app\_id;}
\DoxyCodeLine{168         uint32\_t seq\_num;}
\DoxyCodeLine{169         \textcolor{keyword}{struct }bssgp\_rim\_pdu\_ind pdu\_ind;}
\DoxyCodeLine{170         uint8\_t prot\_ver;}
\DoxyCodeLine{171         \textcolor{keywordtype}{bool} app\_err;}
\DoxyCodeLine{172 }
\DoxyCodeLine{173         \textcolor{comment}{/* Nested application container */}}
\DoxyCodeLine{174         \textcolor{keyword}{union }\{}
\DoxyCodeLine{175                 \textcolor{keyword}{struct }bssgp\_ran\_inf\_app\_cont\_nacc app\_cont\_nacc;}
\DoxyCodeLine{176                 \textcolor{keyword}{struct }bssgp\_app\_err\_cont\_nacc app\_err\_cont\_nacc;}
\DoxyCodeLine{177                 \textcolor{comment}{/* TODO: add containers for Si3, MBMS, SON, UTRA-\/SI */}}
\DoxyCodeLine{178         \} u;}
\DoxyCodeLine{179 }
\DoxyCodeLine{180         \textcolor{comment}{/* Pointer to SON-\/transfer application identity, only present if app\_id is indicating "{}son-\/transfer"{},}}
\DoxyCodeLine{181 \textcolor{comment}{         * see also 3GPP TS 48.018, section 11.3.108 and 3GPP TS 36.413 annex B.1.1 */}}
\DoxyCodeLine{182         \textcolor{keyword}{const} uint8\_t *son\_trans\_app\_id;}
\DoxyCodeLine{183         \textcolor{keywordtype}{size\_t} son\_trans\_app\_id\_len;}
\DoxyCodeLine{184 \};}
\DoxyCodeLine{185 }
\DoxyCodeLine{186 \textcolor{keywordtype}{int} bssgp\_dec\_ran\_inf\_rim\_cont(\textcolor{keyword}{struct} bssgp\_ran\_inf\_rim\_cont *cont, \textcolor{keyword}{const} uint8\_t *buf, \textcolor{keywordtype}{size\_t} len);}
\DoxyCodeLine{187 \textcolor{keywordtype}{int} bssgp\_enc\_ran\_inf\_rim\_cont(uint8\_t *buf, \textcolor{keywordtype}{size\_t} len, \textcolor{keyword}{const} \textcolor{keyword}{struct} bssgp\_ran\_inf\_rim\_cont *cont);}
\DoxyCodeLine{188 }
\DoxyCodeLine{189 \textcolor{comment}{/* 3GPP TS 48.018, table 11.3.62a.3.b: RAN-\/INFORMATION-\/ACK RIM Container Contents */}}
\DoxyCodeLine{190 \textcolor{keyword}{struct }bssgp\_ran\_inf\_ack\_rim\_cont \{}
\DoxyCodeLine{191         \textcolor{keyword}{enum} bssgp\_ran\_inf\_app\_id app\_id;}
\DoxyCodeLine{192         uint32\_t seq\_num;}
\DoxyCodeLine{193         uint8\_t prot\_ver;}
\DoxyCodeLine{194 }
\DoxyCodeLine{195         \textcolor{comment}{/* Pointer to SON-\/transfer application identity, only present if app\_id is indicating "{}son-\/transfer"{},}}
\DoxyCodeLine{196 \textcolor{comment}{         * see also 3GPP TS 48.018, section 11.3.108 and 3GPP TS 36.413 annex B.1.1 */}}
\DoxyCodeLine{197         \textcolor{keyword}{const} uint8\_t *son\_trans\_app\_id;}
\DoxyCodeLine{198         \textcolor{keywordtype}{size\_t} son\_trans\_app\_id\_len;}
\DoxyCodeLine{199 \};}
\DoxyCodeLine{200 }
\DoxyCodeLine{201 \textcolor{keywordtype}{int} bssgp\_dec\_ran\_inf\_ack\_rim\_cont(\textcolor{keyword}{struct} bssgp\_ran\_inf\_ack\_rim\_cont *cont, \textcolor{keyword}{const} uint8\_t *buf, \textcolor{keywordtype}{size\_t} len);}
\DoxyCodeLine{202 \textcolor{keywordtype}{int} bssgp\_enc\_ran\_inf\_ack\_rim\_cont(uint8\_t *buf, \textcolor{keywordtype}{size\_t} len, \textcolor{keyword}{const} \textcolor{keyword}{struct} bssgp\_ran\_inf\_ack\_rim\_cont *cont);}
\DoxyCodeLine{203 }
\DoxyCodeLine{204 \textcolor{comment}{/* 3GPP TS 48.018, table 11.3.62a.4.b: RAN-\/INFORMATION-\/ERROR RIM Container Contents */}}
\DoxyCodeLine{205 \textcolor{keyword}{struct }bssgp\_ran\_inf\_err\_rim\_cont \{}
\DoxyCodeLine{206         \textcolor{keyword}{enum} bssgp\_ran\_inf\_app\_id app\_id;}
\DoxyCodeLine{207         uint8\_t cause;}
\DoxyCodeLine{208         uint8\_t prot\_ver;}
\DoxyCodeLine{209 }
\DoxyCodeLine{210         \textcolor{comment}{/* Pointer to (encoded) errornous PDU,}}
\DoxyCodeLine{211 \textcolor{comment}{         * see also: 3GPP TS 48.018, section 11.3.24 */}}
\DoxyCodeLine{212         \textcolor{keyword}{const} uint8\_t *err\_pdu;}
\DoxyCodeLine{213         \textcolor{keywordtype}{size\_t} err\_pdu\_len;}
\DoxyCodeLine{214 }
\DoxyCodeLine{215         \textcolor{comment}{/* Pointer to SON-\/transfer application identity, only present if app\_id is indicating "{}son-\/transfer"{},}}
\DoxyCodeLine{216 \textcolor{comment}{         * see also 3GPP TS 48.018, section 11.3.108 and 3GPP TS 36.413 annex B.1.1 */}}
\DoxyCodeLine{217         \textcolor{keyword}{const} uint8\_t *son\_trans\_app\_id;}
\DoxyCodeLine{218         \textcolor{keywordtype}{size\_t} son\_trans\_app\_id\_len;}
\DoxyCodeLine{219 \};}
\DoxyCodeLine{220 }
\DoxyCodeLine{221 \textcolor{keywordtype}{int} bssgp\_dec\_ran\_inf\_err\_rim\_cont(\textcolor{keyword}{struct} bssgp\_ran\_inf\_err\_rim\_cont *cont, \textcolor{keyword}{const} uint8\_t *buf, \textcolor{keywordtype}{size\_t} len);}
\DoxyCodeLine{222 \textcolor{keywordtype}{int} bssgp\_enc\_ran\_inf\_err\_rim\_cont(uint8\_t *buf, \textcolor{keywordtype}{size\_t} len, \textcolor{keyword}{const} \textcolor{keyword}{struct} bssgp\_ran\_inf\_err\_rim\_cont *cont);}
\DoxyCodeLine{223 }
\DoxyCodeLine{224 \textcolor{comment}{/* 3GPP TS 48.018, table 11.3.62a.5.b: RAN-\/INFORMATION-\/APPLICATION-\/ERROR RIM Container Contents */}}
\DoxyCodeLine{225 \textcolor{keyword}{struct }bssgp\_ran\_inf\_app\_err\_rim\_cont \{}
\DoxyCodeLine{226         \textcolor{keyword}{enum} bssgp\_ran\_inf\_app\_id app\_id;}
\DoxyCodeLine{227         uint32\_t seq\_num;}
\DoxyCodeLine{228         \textcolor{keyword}{struct }bssgp\_rim\_pdu\_ind pdu\_ind;}
\DoxyCodeLine{229         uint8\_t prot\_ver;}
\DoxyCodeLine{230 }
\DoxyCodeLine{231         \textcolor{comment}{/* Nested application container */}}
\DoxyCodeLine{232         \textcolor{keyword}{union }\{}
\DoxyCodeLine{233                 \textcolor{keyword}{struct }bssgp\_app\_err\_cont\_nacc app\_err\_cont\_nacc;}
\DoxyCodeLine{234                 \textcolor{comment}{/* TODO: add containers for Si3, MBMS, SON, UTRA-\/SI */}}
\DoxyCodeLine{235         \} u;}
\DoxyCodeLine{236 \};}
\DoxyCodeLine{237 }
\DoxyCodeLine{238 \textcolor{keywordtype}{int} bssgp\_dec\_ran\_inf\_app\_err\_rim\_cont(\textcolor{keyword}{struct} bssgp\_ran\_inf\_app\_err\_rim\_cont *cont, \textcolor{keyword}{const} uint8\_t *buf, \textcolor{keywordtype}{size\_t} len);}
\DoxyCodeLine{239 \textcolor{keywordtype}{int} bssgp\_enc\_ran\_inf\_app\_err\_rim\_cont(uint8\_t *buf, \textcolor{keywordtype}{size\_t} len, \textcolor{keyword}{const} \textcolor{keyword}{struct} bssgp\_ran\_inf\_app\_err\_rim\_cont *cont);}
\DoxyCodeLine{240 }
\DoxyCodeLine{241 \textcolor{comment}{/* Chapter 10.6.1: RAN-\/INFORMATION-\/REQUEST */}}
\DoxyCodeLine{242 \textcolor{keyword}{struct }bssgp\_ran\_information\_pdu \{}
\DoxyCodeLine{243         \textcolor{keyword}{struct }bssgp\_rim\_routing\_info routing\_info\_dest;}
\DoxyCodeLine{244         \textcolor{keyword}{struct }bssgp\_rim\_routing\_info routing\_info\_src;}
\DoxyCodeLine{245 }
\DoxyCodeLine{246         \textcolor{comment}{/* Encoded variant of the RIM container */}}
\DoxyCodeLine{247         uint8\_t rim\_cont\_iei;}
\DoxyCodeLine{248         \textcolor{keyword}{const} uint8\_t *rim\_cont;}
\DoxyCodeLine{249         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} rim\_cont\_len;}
\DoxyCodeLine{250 }
\DoxyCodeLine{251         \textcolor{comment}{/* Decoded variant of the RIM container */}}
\DoxyCodeLine{252         \textcolor{keywordtype}{bool} decoded\_present;}
\DoxyCodeLine{253         \textcolor{keyword}{union }\{}
\DoxyCodeLine{254                 \textcolor{keyword}{struct }bssgp\_ran\_inf\_req\_rim\_cont req\_rim\_cont;}
\DoxyCodeLine{255                 \textcolor{keyword}{struct }bssgp\_ran\_inf\_rim\_cont rim\_cont;}
\DoxyCodeLine{256                 \textcolor{keyword}{struct }bssgp\_ran\_inf\_ack\_rim\_cont ack\_rim\_cont;}
\DoxyCodeLine{257                 \textcolor{keyword}{struct }bssgp\_ran\_inf\_err\_rim\_cont err\_rim\_cont;}
\DoxyCodeLine{258                 \textcolor{keyword}{struct }bssgp\_ran\_inf\_app\_err\_rim\_cont app\_err\_rim\_cont;}
\DoxyCodeLine{259         \} decoded;}
\DoxyCodeLine{260 }
\DoxyCodeLine{261         \textcolor{comment}{/* When receiving a PDU from BSSGP the encoded variant of the RIM}}
\DoxyCodeLine{262 \textcolor{comment}{         * container will always be present. The decoded variant will be}}
\DoxyCodeLine{263 \textcolor{comment}{         * present in addition whenever BSSGP was able to decode the container.}}
\DoxyCodeLine{264 \textcolor{comment}{         *}}
\DoxyCodeLine{265 \textcolor{comment}{         * When sending a PDU to BSSGP, then the decoded variant is used when}}
\DoxyCodeLine{266 \textcolor{comment}{         * it is available. The encoded variant (if present) will be ignored}}
\DoxyCodeLine{267 \textcolor{comment}{         * then. */}}
\DoxyCodeLine{268 \};}
\DoxyCodeLine{269 }
\DoxyCodeLine{270 \textcolor{keywordtype}{int} bssgp\_parse\_rim\_pdu(\textcolor{keyword}{struct} bssgp\_ran\_information\_pdu *pdu, \textcolor{keyword}{const} \textcolor{keyword}{struct} msgb *msg);}
\DoxyCodeLine{271 \textcolor{keyword}{struct }msgb *bssgp\_encode\_rim\_pdu(\textcolor{keyword}{const} \textcolor{keyword}{struct} bssgp\_ran\_information\_pdu *pdu);}
\DoxyCodeLine{272 }
\DoxyCodeLine{273 \textcolor{keywordtype}{int} bssgp\_tx\_rim(\textcolor{keyword}{const} \textcolor{keyword}{struct} bssgp\_ran\_information\_pdu *pdu, uint16\_t nsei);}
\DoxyCodeLine{274 \textcolor{keywordtype}{int} bssgp\_tx\_rim\_encoded(\textcolor{keyword}{struct} msgb *msg, uint16\_t nsei);}

\end{DoxyCode}
