\doxysection{cbsp.\+h}
\label{cbsp_8h_source}\index{include/osmocom/gsm/cbsp.h@{include/osmocom/gsm/cbsp.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 \textcolor{preprocessor}{\#pragma once}}
\DoxyCodeLine{2 }
\DoxyCodeLine{3 \textcolor{preprocessor}{\#include <stdint.h>}}
\DoxyCodeLine{4 \textcolor{preprocessor}{\#include <osmocom/core/linuxlist.h>}}
\DoxyCodeLine{5 \textcolor{preprocessor}{\#include <osmocom/gsm/protocol/gsm\_48\_049.h>}}
\DoxyCodeLine{6 \textcolor{preprocessor}{\#include <osmocom/gsm/gsm0808\_utils.h>}}
\DoxyCodeLine{7 }
\DoxyCodeLine{8 \textcolor{comment}{/* Definitions for parsed / abstract representation of messages in the}}
\DoxyCodeLine{9 \textcolor{comment}{ * CBSP (Cell Broadcast Service Protocol, 3GPP TS 48.049).  Data here is *not* formatted}}
\DoxyCodeLine{10 \textcolor{comment}{ * like the on-\/the-\/wire format.  Any similarities are coincidential ;) */}}
\DoxyCodeLine{11 }
\DoxyCodeLine{12 \textcolor{comment}{/* Copyright (C) 2019  Harald Welte <laforge@gnumonks.org>}}
\DoxyCodeLine{13 \textcolor{comment}{ *}}
\DoxyCodeLine{14 \textcolor{comment}{ * All Rights Reserved}}
\DoxyCodeLine{15 \textcolor{comment}{ *}}
\DoxyCodeLine{16 \textcolor{comment}{ * SPDX-\/License-\/Identifier: GPL-\/2.0+}}
\DoxyCodeLine{17 \textcolor{comment}{ *}}
\DoxyCodeLine{18 \textcolor{comment}{ * This program is free software; you can redistribute it and/or modify}}
\DoxyCodeLine{19 \textcolor{comment}{ * it under the terms of the GNU General Public License as published by}}
\DoxyCodeLine{20 \textcolor{comment}{ * the Free Software Foundation; either version 2 of the License, or}}
\DoxyCodeLine{21 \textcolor{comment}{ * (at your option) any later version.}}
\DoxyCodeLine{22 \textcolor{comment}{ *}}
\DoxyCodeLine{23 \textcolor{comment}{ * This program is distributed in the hope that it will be useful,}}
\DoxyCodeLine{24 \textcolor{comment}{ * but WITHOUT ANY WARRANTY; without even the implied warranty of}}
\DoxyCodeLine{25 \textcolor{comment}{ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the}}
\DoxyCodeLine{26 \textcolor{comment}{ * GNU General Public License for more details.}}
\DoxyCodeLine{27 \textcolor{comment}{ */}}
\DoxyCodeLine{28 }
\DoxyCodeLine{29 \textcolor{comment}{/* Decoded 8.2.3 Message Content */}}
\DoxyCodeLine{30 \textcolor{keyword}{struct }osmo\_cbsp\_content \{}
\DoxyCodeLine{31         \textcolor{keyword}{struct }llist\_head list;}
\DoxyCodeLine{32         uint8\_t user\_len;}
\DoxyCodeLine{33         uint8\_t data[82];}
\DoxyCodeLine{34 \};}
\DoxyCodeLine{35 }
\DoxyCodeLine{36 \textcolor{comment}{/* Decoded Entry in a 8.2.6 Cell List */}}
\DoxyCodeLine{37 \textcolor{keyword}{struct }osmo\_cbsp\_cell\_ent \{}
\DoxyCodeLine{38         \textcolor{keyword}{struct }llist\_head list;           \textcolor{comment}{/* entry in osmo\_cbsp\_cell\_list.list */}}
\DoxyCodeLine{39         \textcolor{keyword}{union }gsm0808\_cell\_id\_u cell\_id;}
\DoxyCodeLine{40 \};}
\DoxyCodeLine{41 \textcolor{keyword}{struct }osmo\_cbsp\_cell\_list \{}
\DoxyCodeLine{42         \textcolor{keyword}{enum} CELL\_IDENT id\_discr;}
\DoxyCodeLine{43         \textcolor{keyword}{struct }llist\_head list;           \textcolor{comment}{/* list of osmo\_cbsp\_cell\_ent */}}
\DoxyCodeLine{44 \};}
\DoxyCodeLine{45 }
\DoxyCodeLine{46 \textcolor{comment}{/* Decoded Entry in a 8.2.10 Completed List */}}
\DoxyCodeLine{47 \textcolor{keyword}{struct }osmo\_cbsp\_num\_compl\_ent \{}
\DoxyCodeLine{48         \textcolor{keyword}{struct }llist\_head list;           \textcolor{comment}{/* entry in osmo\_cbsp\_num\_compl\_list.list */}}
\DoxyCodeLine{49         \textcolor{keyword}{union }gsm0808\_cell\_id\_u cell\_id;}
\DoxyCodeLine{50         uint16\_t num\_compl;}
\DoxyCodeLine{51         uint8\_t num\_bcast\_info;}
\DoxyCodeLine{52 \};}
\DoxyCodeLine{53 \textcolor{keyword}{struct }osmo\_cbsp\_num\_compl\_list \{}
\DoxyCodeLine{54         \textcolor{keyword}{enum} CELL\_IDENT id\_discr;}
\DoxyCodeLine{55         \textcolor{keyword}{struct }llist\_head list;           \textcolor{comment}{/* list of osmo\_cbsp\_num\_compl\_ent */}}
\DoxyCodeLine{56 \};}
\DoxyCodeLine{57 }
\DoxyCodeLine{58 \textcolor{comment}{/* Decoded Entry in a 8.2.12 Radio Resource Loading List */}}
\DoxyCodeLine{59 \textcolor{keyword}{struct }osmo\_cbsp\_loading\_ent \{}
\DoxyCodeLine{60         \textcolor{keyword}{struct }llist\_head list;           \textcolor{comment}{/* entry in osmo\_cbsp\_loading\_list */}}
\DoxyCodeLine{61         \textcolor{keyword}{union }gsm0808\_cell\_id\_u cell\_id;}
\DoxyCodeLine{62         uint8\_t load[2];}
\DoxyCodeLine{63 \};}
\DoxyCodeLine{64 \textcolor{keyword}{struct }osmo\_cbsp\_loading\_list \{}
\DoxyCodeLine{65         \textcolor{keyword}{enum} CELL\_IDENT id\_discr;}
\DoxyCodeLine{66         \textcolor{keyword}{struct }llist\_head list;           \textcolor{comment}{/* list of osmo\_cbsp\_loading\_ent */}}
\DoxyCodeLine{67 \};}
\DoxyCodeLine{68 }
\DoxyCodeLine{69 \textcolor{comment}{/* Decoded Entry in a 8.2.11 Failure List */}}
\DoxyCodeLine{70 \textcolor{keyword}{struct }osmo\_cbsp\_fail\_ent \{}
\DoxyCodeLine{71         \textcolor{keyword}{struct }llist\_head list;           \textcolor{comment}{/* entry in a fail\_list below */}}
\DoxyCodeLine{72         \textcolor{keyword}{enum} CELL\_IDENT id\_discr;}
\DoxyCodeLine{73         \textcolor{keyword}{union }gsm0808\_cell\_id\_u cell\_id;}
\DoxyCodeLine{74         uint8\_t cause;                     \textcolor{comment}{/* enum osmo\_cbsp\_cause */}}
\DoxyCodeLine{75 \};}
\DoxyCodeLine{76 }
\DoxyCodeLine{77 }
\DoxyCodeLine{78 \textcolor{comment}{/* 8.1.3.1 */}}
\DoxyCodeLine{79 \textcolor{keyword}{struct }osmo\_cbsp\_write\_replace \{}
\DoxyCodeLine{80         uint16\_t msg\_id;          \textcolor{comment}{/* 8.2.16 M */}}
\DoxyCodeLine{81         uint16\_t new\_serial\_nr;            \textcolor{comment}{/* 8.2.5 M */}}
\DoxyCodeLine{82         uint16\_t *old\_serial\_nr;   \textcolor{comment}{/* 8.2.4 */}}
\DoxyCodeLine{83         \textcolor{keyword}{struct }osmo\_cbsp\_cell\_list cell\_list;}
\DoxyCodeLine{84 }
\DoxyCodeLine{85         \textcolor{keywordtype}{bool} is\_cbs;}
\DoxyCodeLine{86         \textcolor{keyword}{union }\{}
\DoxyCodeLine{87                 \textcolor{keyword}{struct }\{}
\DoxyCodeLine{88                         \textcolor{keyword}{enum} cbsp\_channel\_ind channel\_ind;}
\DoxyCodeLine{89                         \textcolor{keyword}{enum} cbsp\_category category;}
\DoxyCodeLine{90                         uint16\_t rep\_period;}
\DoxyCodeLine{91                         uint16\_t num\_bcast\_req;}
\DoxyCodeLine{92                         \textcolor{comment}{/* num\_of\_pages implicit as llist\_count(msg\_content) */}}
\DoxyCodeLine{93                         uint8\_t dcs;}
\DoxyCodeLine{94                         \textcolor{keyword}{struct }llist\_head msg\_content;}
\DoxyCodeLine{95                 \} cbs;}
\DoxyCodeLine{96                 \textcolor{keyword}{struct }\{}
\DoxyCodeLine{97                         uint8\_t indicator;}
\DoxyCodeLine{98                         uint16\_t warning\_type;}
\DoxyCodeLine{99                         uint8\_t warning\_sec\_info[50];}
\DoxyCodeLine{100                         uint32\_t warning\_period;  \textcolor{comment}{/* in seconds; 0xffffffff = unlimited */}}
\DoxyCodeLine{101                 \} emergency;}
\DoxyCodeLine{102         \} u;}
\DoxyCodeLine{103 \};}
\DoxyCodeLine{104 }
\DoxyCodeLine{105 \textcolor{comment}{/* 8.1.3.2 */}}
\DoxyCodeLine{106 \textcolor{keyword}{struct }osmo\_cbsp\_write\_replace\_complete \{}
\DoxyCodeLine{107         uint16\_t msg\_id;}
\DoxyCodeLine{108         uint16\_t new\_serial\_nr;}
\DoxyCodeLine{109         uint16\_t *old\_serial\_nr;}
\DoxyCodeLine{110         \textcolor{keyword}{struct }osmo\_cbsp\_num\_compl\_list num\_compl\_list;}
\DoxyCodeLine{111         \textcolor{keyword}{struct }osmo\_cbsp\_cell\_list cell\_list;}
\DoxyCodeLine{112         \textcolor{keyword}{enum} cbsp\_channel\_ind *channel\_ind;}
\DoxyCodeLine{113 \};}
\DoxyCodeLine{114 }
\DoxyCodeLine{115 \textcolor{comment}{/* 8.1.3.3 */}}
\DoxyCodeLine{116 \textcolor{keyword}{struct }osmo\_cbsp\_write\_replace\_failure \{}
\DoxyCodeLine{117         uint16\_t msg\_id;}
\DoxyCodeLine{118         uint16\_t new\_serial\_nr;}
\DoxyCodeLine{119         uint16\_t *old\_serial\_nr;}
\DoxyCodeLine{120         \textcolor{keyword}{struct }llist\_head fail\_list;         \textcolor{comment}{/* list of osmo\_cbsp\_fail\_ent */}}
\DoxyCodeLine{121         \textcolor{keyword}{struct }osmo\_cbsp\_num\_compl\_list num\_compl\_list;}
\DoxyCodeLine{122         \textcolor{keyword}{struct }osmo\_cbsp\_cell\_list cell\_list;}
\DoxyCodeLine{123         \textcolor{keyword}{enum} cbsp\_channel\_ind *channel\_ind;}
\DoxyCodeLine{124 \};}
\DoxyCodeLine{125 }
\DoxyCodeLine{126 \textcolor{comment}{/* 8.1.3.4 */}}
\DoxyCodeLine{127 \textcolor{keyword}{struct }osmo\_cbsp\_kill \{}
\DoxyCodeLine{128         uint16\_t msg\_id;}
\DoxyCodeLine{129         uint16\_t old\_serial\_nr;}
\DoxyCodeLine{130         \textcolor{keyword}{struct }osmo\_cbsp\_cell\_list cell\_list;}
\DoxyCodeLine{131         \textcolor{keyword}{enum} cbsp\_channel\_ind *channel\_ind;}
\DoxyCodeLine{132 \};}
\DoxyCodeLine{133 }
\DoxyCodeLine{134 \textcolor{comment}{/* 8.1.3.5 */}}
\DoxyCodeLine{135 \textcolor{keyword}{struct }osmo\_cbsp\_kill\_complete \{}
\DoxyCodeLine{136         uint16\_t msg\_id;}
\DoxyCodeLine{137         uint16\_t old\_serial\_nr;}
\DoxyCodeLine{138         \textcolor{keyword}{struct }osmo\_cbsp\_num\_compl\_list num\_compl\_list;}
\DoxyCodeLine{139         \textcolor{keyword}{struct }osmo\_cbsp\_cell\_list cell\_list;}
\DoxyCodeLine{140         \textcolor{keyword}{enum} cbsp\_channel\_ind *channel\_ind;}
\DoxyCodeLine{141 \};}
\DoxyCodeLine{142 }
\DoxyCodeLine{143 \textcolor{comment}{/* 8.1.3.6 */}}
\DoxyCodeLine{144 \textcolor{keyword}{struct }osmo\_cbsp\_kill\_failure \{}
\DoxyCodeLine{145         uint16\_t msg\_id;}
\DoxyCodeLine{146         uint16\_t old\_serial\_nr;}
\DoxyCodeLine{147         \textcolor{keyword}{struct }llist\_head fail\_list;         \textcolor{comment}{/* list of osmo\_cbsp\_fail\_ent */}}
\DoxyCodeLine{148         \textcolor{keyword}{struct }osmo\_cbsp\_num\_compl\_list num\_compl\_list;}
\DoxyCodeLine{149         \textcolor{keyword}{struct }osmo\_cbsp\_cell\_list cell\_list;}
\DoxyCodeLine{150         \textcolor{keyword}{enum} cbsp\_channel\_ind *channel\_ind;}
\DoxyCodeLine{151 \};}
\DoxyCodeLine{152 }
\DoxyCodeLine{153 \textcolor{comment}{/* 8.1.3.7 */}}
\DoxyCodeLine{154 \textcolor{keyword}{struct }osmo\_cbsp\_load\_query \{}
\DoxyCodeLine{155         \textcolor{keyword}{struct }osmo\_cbsp\_cell\_list cell\_list;}
\DoxyCodeLine{156         \textcolor{keyword}{enum} cbsp\_channel\_ind channel\_ind;}
\DoxyCodeLine{157 \};}
\DoxyCodeLine{158 }
\DoxyCodeLine{159 \textcolor{comment}{/* 8.1.3.8 */}}
\DoxyCodeLine{160 \textcolor{keyword}{struct }osmo\_cbsp\_load\_query\_complete \{}
\DoxyCodeLine{161         \textcolor{keyword}{struct }osmo\_cbsp\_loading\_list loading\_list;}
\DoxyCodeLine{162         \textcolor{keyword}{enum} cbsp\_channel\_ind channel\_ind;}
\DoxyCodeLine{163 \};}
\DoxyCodeLine{164 }
\DoxyCodeLine{165 \textcolor{comment}{/* 8.1.3.9 */}}
\DoxyCodeLine{166 \textcolor{keyword}{struct }osmo\_cbsp\_load\_query\_failure \{}
\DoxyCodeLine{167         \textcolor{keyword}{struct }llist\_head fail\_list;         \textcolor{comment}{/* list of osmo\_cbsp\_fail\_ent */}}
\DoxyCodeLine{168         \textcolor{keyword}{enum} cbsp\_channel\_ind channel\_ind;}
\DoxyCodeLine{169         \textcolor{keyword}{struct }osmo\_cbsp\_loading\_list loading\_list;}
\DoxyCodeLine{170 \};}
\DoxyCodeLine{171 }
\DoxyCodeLine{172 \textcolor{comment}{/* 8.1.3.10 */}}
\DoxyCodeLine{173 \textcolor{keyword}{struct }osmo\_cbsp\_msg\_status\_query \{}
\DoxyCodeLine{174         uint16\_t msg\_id;}
\DoxyCodeLine{175         uint16\_t old\_serial\_nr;}
\DoxyCodeLine{176         \textcolor{keyword}{struct }osmo\_cbsp\_cell\_list cell\_list;}
\DoxyCodeLine{177         \textcolor{keyword}{enum} cbsp\_channel\_ind channel\_ind;}
\DoxyCodeLine{178 \};}
\DoxyCodeLine{179 }
\DoxyCodeLine{180 \textcolor{comment}{/* 8.1.3.11 */}}
\DoxyCodeLine{181 \textcolor{keyword}{struct }osmo\_cbsp\_msg\_status\_query\_complete \{}
\DoxyCodeLine{182         uint16\_t msg\_id;}
\DoxyCodeLine{183         uint16\_t old\_serial\_nr;}
\DoxyCodeLine{184         \textcolor{keyword}{struct }osmo\_cbsp\_num\_compl\_list num\_compl\_list;}
\DoxyCodeLine{185         \textcolor{keyword}{enum} cbsp\_channel\_ind channel\_ind;}
\DoxyCodeLine{186 \};}
\DoxyCodeLine{187 }
\DoxyCodeLine{188 \textcolor{comment}{/* 8.1.3.12 */}}
\DoxyCodeLine{189 \textcolor{keyword}{struct }osmo\_cbsp\_msg\_status\_query\_failure \{}
\DoxyCodeLine{190         uint16\_t msg\_id;}
\DoxyCodeLine{191         uint16\_t old\_serial\_nr;}
\DoxyCodeLine{192         \textcolor{keyword}{struct }llist\_head fail\_list;         \textcolor{comment}{/* list of osmo\_cbsp\_fail\_ent */}}
\DoxyCodeLine{193         \textcolor{keyword}{enum} cbsp\_channel\_ind channel\_ind;}
\DoxyCodeLine{194         \textcolor{keyword}{struct }osmo\_cbsp\_num\_compl\_list num\_compl\_list;}
\DoxyCodeLine{195 \};}
\DoxyCodeLine{196 }
\DoxyCodeLine{197 \textcolor{comment}{/* 8.1.3.16 */}}
\DoxyCodeLine{198 \textcolor{keyword}{struct }osmo\_cbsp\_reset \{}
\DoxyCodeLine{199         \textcolor{keyword}{struct }osmo\_cbsp\_cell\_list cell\_list;}
\DoxyCodeLine{200 \};}
\DoxyCodeLine{201 }
\DoxyCodeLine{202 \textcolor{comment}{/* 8.1.3.17 */}}
\DoxyCodeLine{203 \textcolor{keyword}{struct }osmo\_cbsp\_reset\_complete \{}
\DoxyCodeLine{204         \textcolor{keyword}{struct }osmo\_cbsp\_cell\_list cell\_list;}
\DoxyCodeLine{205 \};}
\DoxyCodeLine{206 }
\DoxyCodeLine{207 \textcolor{comment}{/* 8.1.3.18 */}}
\DoxyCodeLine{208 \textcolor{keyword}{struct }osmo\_cbsp\_reset\_failure \{}
\DoxyCodeLine{209         \textcolor{keyword}{struct }llist\_head fail\_list;         \textcolor{comment}{/* list of osmo\_cbsp\_fail\_ent */}}
\DoxyCodeLine{210         \textcolor{keyword}{struct }osmo\_cbsp\_cell\_list cell\_list;}
\DoxyCodeLine{211 \};}
\DoxyCodeLine{212 }
\DoxyCodeLine{213 \textcolor{comment}{/* 8.1.3.18a */}}
\DoxyCodeLine{214 \textcolor{keyword}{struct }osmo\_cbsp\_keep\_alive \{}
\DoxyCodeLine{215         uint8\_t repetition\_period;}
\DoxyCodeLine{216 \};}
\DoxyCodeLine{217 }
\DoxyCodeLine{218 \textcolor{comment}{/* 8.1.3.18b */}}
\DoxyCodeLine{219 \textcolor{keyword}{struct }osmo\_cbsp\_keep\_alive\_complete \{}
\DoxyCodeLine{220 \};}
\DoxyCodeLine{221 }
\DoxyCodeLine{222 \textcolor{comment}{/* 8.1.3.19 */}}
\DoxyCodeLine{223 \textcolor{keyword}{struct }osmo\_cbsp\_restart \{}
\DoxyCodeLine{224         \textcolor{keyword}{struct }osmo\_cbsp\_cell\_list cell\_list;}
\DoxyCodeLine{225         uint8\_t bcast\_msg\_type;}
\DoxyCodeLine{226         uint8\_t recovery\_ind;}
\DoxyCodeLine{227 \};}
\DoxyCodeLine{228 }
\DoxyCodeLine{229 \textcolor{comment}{/* 8.1.3.20 */}}
\DoxyCodeLine{230 \textcolor{keyword}{struct }osmo\_cbsp\_failure \{}
\DoxyCodeLine{231         \textcolor{keyword}{struct }llist\_head fail\_list;         \textcolor{comment}{/* list of osmo\_cbsp\_fail\_ent */}}
\DoxyCodeLine{232         uint8\_t bcast\_msg\_type;}
\DoxyCodeLine{233 \};}
\DoxyCodeLine{234 }
\DoxyCodeLine{235 \textcolor{comment}{/* 8.1.3.21 */}}
\DoxyCodeLine{236 \textcolor{keyword}{struct }osmo\_cbsp\_error\_ind \{}
\DoxyCodeLine{237         \textcolor{keyword}{enum} cbsp\_cell\_id\_cause cause;}
\DoxyCodeLine{238         uint16\_t *msg\_id;}
\DoxyCodeLine{239         uint16\_t *new\_serial\_nr;}
\DoxyCodeLine{240         uint16\_t *old\_serial\_nr;}
\DoxyCodeLine{241         \textcolor{keyword}{enum} cbsp\_channel\_ind *channel\_ind;}
\DoxyCodeLine{242 \};}
\DoxyCodeLine{243 }
\DoxyCodeLine{244 \textcolor{comment}{/* 8.2.13 Cause */}}
\DoxyCodeLine{245 \textcolor{keyword}{enum} osmo\_cbsp\_cause \{}
\DoxyCodeLine{246         OSMO\_CBSP\_CAUSE\_PARAM\_NOT\_RECOGNISED = 0,}
\DoxyCodeLine{247         OSMO\_CBSP\_CAUSE\_PARAM\_VALUE\_INVALID,}
\DoxyCodeLine{248         OSMO\_CBSP\_CAUSE\_MSG\_REF\_NOT\_IDENTIFIED,}
\DoxyCodeLine{249         OSMO\_CBSP\_CAUSE\_CELL\_ID\_NOT\_VALID,}
\DoxyCodeLine{250         OSMO\_CBSP\_CAUSE\_UNRECOGNISED\_MESSAGE,}
\DoxyCodeLine{251         OSMO\_CBSP\_CAUSE\_MISSING\_MANDATORY\_ELEMENT,}
\DoxyCodeLine{252         OSMO\_CBSP\_CAUSE\_BSC\_CAPACITY\_EXCEEDED,}
\DoxyCodeLine{253         OSMO\_CBSP\_CAUSE\_CELL\_MEMORY\_EXCEEDED,}
\DoxyCodeLine{254         OSMO\_CBSP\_CAUSE\_BSC\_MEMORY\_EXCEEDED,}
\DoxyCodeLine{255         OSMO\_CBSP\_CAUSE\_CELL\_BROADCAST\_NOT\_SUPPORTED,}
\DoxyCodeLine{256         OSMO\_CBSP\_CAUSE\_CELL\_BROADCAST\_NOT\_OPERATIONAL,}
\DoxyCodeLine{257         OSMO\_CBSP\_CAUSE\_INCOMPATIBLE\_DRX\_PARAM,}
\DoxyCodeLine{258         OSMO\_CBSP\_CAUSE\_EXT\_CHAN\_NOT\_SUPPORTED,}
\DoxyCodeLine{259         OSMO\_CBSP\_CAUSE\_MSG\_REF\_ALREADY\_USED,}
\DoxyCodeLine{260         OSMO\_CBSP\_CAUSE\_UNSPECIFIED\_ERROR,}
\DoxyCodeLine{261         OSMO\_CBSP\_CAUSE\_LAI\_OR\_LAC\_NOT\_VALID,}
\DoxyCodeLine{262 \};}
\DoxyCodeLine{263 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string osmo\_cbsp\_cause\_names[];}
\DoxyCodeLine{264 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *osmo\_cbsp\_cause\_name(\textcolor{keyword}{enum} osmo\_cbsp\_cause cause)}
\DoxyCodeLine{265 \{}
\DoxyCodeLine{266         \textcolor{keywordflow}{return} get\_value\_string(osmo\_cbsp\_cause\_names, cause);}
\DoxyCodeLine{267 \}}
\DoxyCodeLine{268 }
\DoxyCodeLine{269 \textcolor{comment}{/* decoded CBSP message */}}
\DoxyCodeLine{270 \textcolor{keyword}{struct }osmo\_cbsp\_decoded \{}
\DoxyCodeLine{271         \textcolor{keyword}{enum} cbsp\_msg\_type msg\_type;}
\DoxyCodeLine{272         \textcolor{keyword}{union }\{}
\DoxyCodeLine{273                 \textcolor{keyword}{struct }osmo\_cbsp\_write\_replace write\_replace;}
\DoxyCodeLine{274                 \textcolor{keyword}{struct }osmo\_cbsp\_write\_replace\_complete write\_replace\_compl;}
\DoxyCodeLine{275                 \textcolor{keyword}{struct }osmo\_cbsp\_write\_replace\_failure write\_replace\_fail;}
\DoxyCodeLine{276 }
\DoxyCodeLine{277                 \textcolor{keyword}{struct }osmo\_cbsp\_kill kill;}
\DoxyCodeLine{278                 \textcolor{keyword}{struct }osmo\_cbsp\_kill\_complete kill\_compl;}
\DoxyCodeLine{279                 \textcolor{keyword}{struct }osmo\_cbsp\_kill\_failure kill\_fail;}
\DoxyCodeLine{280 }
\DoxyCodeLine{281                 \textcolor{keyword}{struct }osmo\_cbsp\_load\_query load\_query;}
\DoxyCodeLine{282                 \textcolor{keyword}{struct }osmo\_cbsp\_load\_query\_complete load\_query\_compl;}
\DoxyCodeLine{283                 \textcolor{keyword}{struct }osmo\_cbsp\_load\_query\_failure load\_query\_fail;}
\DoxyCodeLine{284 }
\DoxyCodeLine{285                 \textcolor{keyword}{struct }osmo\_cbsp\_msg\_status\_query msg\_status\_query;}
\DoxyCodeLine{286                 \textcolor{keyword}{struct }osmo\_cbsp\_msg\_status\_query\_complete msg\_status\_query\_compl;}
\DoxyCodeLine{287                 \textcolor{keyword}{struct }osmo\_cbsp\_msg\_status\_query\_failure msg\_status\_query\_fail;}
\DoxyCodeLine{288 }
\DoxyCodeLine{289                 \textcolor{comment}{/* TODO: set DRX */}}
\DoxyCodeLine{290 }
\DoxyCodeLine{291                 \textcolor{keyword}{struct }osmo\_cbsp\_reset reset;}
\DoxyCodeLine{292                 \textcolor{keyword}{struct }osmo\_cbsp\_reset\_complete reset\_compl;}
\DoxyCodeLine{293                 \textcolor{keyword}{struct }osmo\_cbsp\_reset\_failure reset\_fail;}
\DoxyCodeLine{294 }
\DoxyCodeLine{295                 \textcolor{keyword}{struct }osmo\_cbsp\_restart restart;}
\DoxyCodeLine{296 }
\DoxyCodeLine{297                 \textcolor{keyword}{struct }osmo\_cbsp\_failure failure;}
\DoxyCodeLine{298 }
\DoxyCodeLine{299                 \textcolor{keyword}{struct }osmo\_cbsp\_error\_ind error\_ind;}
\DoxyCodeLine{300 }
\DoxyCodeLine{301                 \textcolor{keyword}{struct }osmo\_cbsp\_keep\_alive keep\_alive;}
\DoxyCodeLine{302                 \textcolor{keyword}{struct }osmo\_cbsp\_keep\_alive\_complete keep\_alive\_compl;}
\DoxyCodeLine{303         \} u;}
\DoxyCodeLine{304 \};}
\DoxyCodeLine{305 }
\DoxyCodeLine{306 \textcolor{keyword}{extern} \_\_thread \textcolor{keyword}{const} \textcolor{keywordtype}{char} *osmo\_cbsp\_errstr;}
\DoxyCodeLine{307 }
\DoxyCodeLine{308 \textcolor{keyword}{struct }msgb *osmo\_cbsp\_msgb\_alloc(\textcolor{keywordtype}{void} *ctx, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name);}
\DoxyCodeLine{309 \textcolor{keyword}{struct }msgb *osmo\_cbsp\_encode(\textcolor{keywordtype}{void} *ctx, \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_cbsp\_decoded *in);}
\DoxyCodeLine{310 \textcolor{keyword}{struct }osmo\_cbsp\_decoded *osmo\_cbsp\_decode(\textcolor{keywordtype}{void} *ctx, \textcolor{keyword}{struct} msgb *in);}
\DoxyCodeLine{311 \textcolor{keywordtype}{void} osmo\_cbsp\_init\_struct(\textcolor{keyword}{struct} osmo\_cbsp\_decoded *cbsp, \textcolor{keyword}{enum} cbsp\_msg\_type msg\_type);}
\DoxyCodeLine{312 \textcolor{keyword}{struct }osmo\_cbsp\_decoded *osmo\_cbsp\_decoded\_alloc(\textcolor{keywordtype}{void} *ctx,  \textcolor{keyword}{enum} cbsp\_msg\_type msg\_type);}
\DoxyCodeLine{313 }
\DoxyCodeLine{314 \textcolor{keywordtype}{int} osmo\_cbsp\_recv\_buffered(\textcolor{keywordtype}{void} *ctx, \textcolor{keywordtype}{int} fd, \textcolor{keyword}{struct} msgb **rmsg, \textcolor{keyword}{struct} msgb **tmp\_msg);}
\DoxyCodeLine{315 \textcolor{keywordtype}{int} osmo\_cbsp\_segmentation\_cb(\textcolor{keyword}{struct} msgb *msg);}

\end{DoxyCode}
