\doxysection{gsm48\+\_\+rest\+\_\+octets.\+h}
\label{gsm48__rest__octets_8h_source}\index{include/osmocom/gsm/gsm48\_rest\_octets.h@{include/osmocom/gsm/gsm48\_rest\_octets.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 <stdbool.h>}}
\DoxyCodeLine{4 \textcolor{preprocessor}{\#include <osmocom/gsm/sysinfo.h>}}
\DoxyCodeLine{5 \textcolor{preprocessor}{\#include <osmocom/gsm/protocol/gsm\_44\_060.h>}}
\DoxyCodeLine{6 }
\DoxyCodeLine{7 \textcolor{comment}{/* 16 is the max. number of SI2quater messages according to 3GPP TS 44.018 Table 10.5.2.33b.1:}}
\DoxyCodeLine{8 \textcolor{comment}{   4-\/bit index is used (2\#1111 = 10\#15) */}}
\DoxyCodeLine{9 \textcolor{preprocessor}{\#define SI2Q\_MAX\_NUM 16}}
\DoxyCodeLine{10 \textcolor{comment}{/* length in bits (for single SI2quater message) */}}
\DoxyCodeLine{11 \textcolor{preprocessor}{\#define SI2Q\_MAX\_LEN 160}}
\DoxyCodeLine{12 \textcolor{preprocessor}{\#define SI2Q\_MIN\_LEN 18}}
\DoxyCodeLine{13 }
\DoxyCodeLine{14 \textcolor{comment}{/* generate SI1 rest octets */}}
\DoxyCodeLine{15 \textcolor{keywordtype}{int} osmo\_gsm48\_rest\_octets\_si1\_encode(uint8\_t *data, uint8\_t *nch\_pos, \textcolor{keywordtype}{int} is1800\_net);}
\DoxyCodeLine{16 \textcolor{keywordtype}{int} osmo\_gsm48\_si1ro\_nch\_pos\_decode(uint8\_t value, uint8\_t *num\_blocks, uint8\_t *first\_block);}
\DoxyCodeLine{17 \textcolor{keywordtype}{int} osmo\_gsm48\_si1ro\_nch\_pos\_encode(uint8\_t num\_blocks, uint8\_t first\_block);}
\DoxyCodeLine{18 }
\DoxyCodeLine{19 \textcolor{keywordtype}{int} osmo\_gsm48\_rest\_octets\_si2quater\_encode(uint8\_t *data, uint8\_t si2q\_index, uint8\_t si2q\_count,}
\DoxyCodeLine{20                                             \textcolor{keyword}{const} uint16\_t *uarfcn\_list, \textcolor{keywordtype}{size\_t} *u\_offset,}
\DoxyCodeLine{21                                             \textcolor{keywordtype}{size\_t} uarfcn\_length, uint16\_t *scramble\_list,}
\DoxyCodeLine{22                                             \textcolor{keyword}{struct} osmo\_earfcn\_si2q *si2quater\_neigh\_list,}
\DoxyCodeLine{23                                             \textcolor{keywordtype}{size\_t} *e\_offset);}
\DoxyCodeLine{24 }
\DoxyCodeLine{25 \textcolor{keyword}{struct }osmo\_gsm48\_si\_pch\_nch\_info \{}
\DoxyCodeLine{26         \textcolor{keywordtype}{bool} present;}
\DoxyCodeLine{27         \textcolor{keywordtype}{bool} paging\_channel\_restructuring;}
\DoxyCodeLine{28         uint8\_t nln\_sacch;}
\DoxyCodeLine{29         \textcolor{keywordtype}{bool} call\_priority\_present;}
\DoxyCodeLine{30         uint8\_t call\_priority;}
\DoxyCodeLine{31         \textcolor{keywordtype}{bool} nln\_status\_sacch;}
\DoxyCodeLine{32 \};}
\DoxyCodeLine{33 }
\DoxyCodeLine{34 \textcolor{keyword}{struct }osmo\_gsm48\_si\_vbs\_vgcs\_options \{}
\DoxyCodeLine{35         \textcolor{keywordtype}{bool} present;}
\DoxyCodeLine{36         \textcolor{keywordtype}{bool} inband\_notifications;}
\DoxyCodeLine{37         \textcolor{keywordtype}{bool} inband\_pagings;}
\DoxyCodeLine{38 \};}
\DoxyCodeLine{39 }
\DoxyCodeLine{40 \textcolor{keyword}{struct }osmo\_gsm48\_si\_dtm\_support \{}
\DoxyCodeLine{41         \textcolor{keywordtype}{bool} present;}
\DoxyCodeLine{42         uint8\_t rac;}
\DoxyCodeLine{43         uint8\_t max\_lapdm;}
\DoxyCodeLine{44 \};}
\DoxyCodeLine{45 }
\DoxyCodeLine{46 \textcolor{keyword}{struct }osmo\_gsm48\_si\_gprs\_ms\_txpwr\_max\_ccch \{}
\DoxyCodeLine{47         \textcolor{keywordtype}{bool} present;}
\DoxyCodeLine{48         uint8\_t max\_txpwr;}
\DoxyCodeLine{49 \};}
\DoxyCodeLine{50 }
\DoxyCodeLine{51 \textcolor{keyword}{struct }osmo\_gsm48\_si6\_ro\_info \{}
\DoxyCodeLine{52         \textcolor{keyword}{struct }osmo\_gsm48\_si\_pch\_nch\_info pch\_nch\_info;}
\DoxyCodeLine{53         \textcolor{keyword}{struct }osmo\_gsm48\_si\_vbs\_vgcs\_options vbs\_vgcs\_options;}
\DoxyCodeLine{54         \textcolor{keyword}{struct }osmo\_gsm48\_si\_dtm\_support dtm\_support;}
\DoxyCodeLine{55         \textcolor{keywordtype}{bool} band\_indicator\_1900;}
\DoxyCodeLine{56         \textcolor{keyword}{struct }osmo\_gsm48\_si\_gprs\_ms\_txpwr\_max\_ccch gprs\_ms\_txpwr\_max\_ccch;}
\DoxyCodeLine{57         \textcolor{comment}{/* MBMS: not supported in Osmocom */}}
\DoxyCodeLine{58         \textcolor{comment}{/* AMR config (group channel): not supported in Osmocom */}}
\DoxyCodeLine{59 \};}
\DoxyCodeLine{60 }
\DoxyCodeLine{61 \textcolor{keywordtype}{int} osmo\_gsm48\_rest\_octets\_si6\_encode(uint8\_t *data, \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_gsm48\_si6\_ro\_info *in);}
\DoxyCodeLine{62 }
\DoxyCodeLine{63 \textcolor{keyword}{struct }osmo\_gsm48\_si\_selection\_params \{}
\DoxyCodeLine{64         uint16\_t penalty\_time:5,}
\DoxyCodeLine{65                   temp\_offs:3,}
\DoxyCodeLine{66                   cell\_resel\_off:6,}
\DoxyCodeLine{67                   cbq:1,}
\DoxyCodeLine{68                   present:1;}
\DoxyCodeLine{69 \};}
\DoxyCodeLine{70 }
\DoxyCodeLine{71 \textcolor{keyword}{struct }osmo\_gsm48\_si\_power\_offset \{}
\DoxyCodeLine{72         uint8\_t power\_offset:2,}
\DoxyCodeLine{73                  present:1;}
\DoxyCodeLine{74 \};}
\DoxyCodeLine{75 }
\DoxyCodeLine{76 \textcolor{keyword}{struct }osmo\_gsm48\_si3\_gprs\_ind \{}
\DoxyCodeLine{77         uint8\_t si13\_position:1,}
\DoxyCodeLine{78                  ra\_colour:3,}
\DoxyCodeLine{79                  present:1;}
\DoxyCodeLine{80 \};}
\DoxyCodeLine{81 }
\DoxyCodeLine{82 \textcolor{keyword}{struct }osmo\_gsm48\_lsa\_params \{}
\DoxyCodeLine{83         uint32\_t prio\_thr:3,}
\DoxyCodeLine{84                  lsa\_offset:3,}
\DoxyCodeLine{85                  mcc:12,}
\DoxyCodeLine{86                  mnc:12;}
\DoxyCodeLine{87         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} present;}
\DoxyCodeLine{88 \};}
\DoxyCodeLine{89 }
\DoxyCodeLine{90 \textcolor{keyword}{struct }osmo\_gsm48\_si\_ro\_info \{}
\DoxyCodeLine{91         \textcolor{keyword}{struct }osmo\_gsm48\_si\_selection\_params selection\_params;}
\DoxyCodeLine{92         \textcolor{keyword}{struct }osmo\_gsm48\_si\_power\_offset power\_offset;}
\DoxyCodeLine{93         \textcolor{keywordtype}{bool} si2ter\_indicator;}
\DoxyCodeLine{94         \textcolor{keywordtype}{bool} early\_cm\_ctrl;}
\DoxyCodeLine{95         \textcolor{keyword}{struct }\{}
\DoxyCodeLine{96                 uint8\_t where:3,}
\DoxyCodeLine{97                          present:1;}
\DoxyCodeLine{98         \} scheduling;}
\DoxyCodeLine{99         \textcolor{keyword}{struct }osmo\_gsm48\_si3\_gprs\_ind gprs\_ind;}
\DoxyCodeLine{100         \textcolor{comment}{/* SI 3 specific */}}
\DoxyCodeLine{101         \textcolor{keywordtype}{bool} early\_cm\_restrict\_3g;}
\DoxyCodeLine{102         \textcolor{keywordtype}{bool} si2quater\_indicator;}
\DoxyCodeLine{103         \textcolor{comment}{/* SI 4 specific */}}
\DoxyCodeLine{104         \textcolor{keyword}{struct }osmo\_gsm48\_lsa\_params lsa\_params;}
\DoxyCodeLine{105         uint16\_t cell\_id;}
\DoxyCodeLine{106         uint8\_t break\_ind;     \textcolor{comment}{/* do we have SI7 + SI8 ? */}}
\DoxyCodeLine{107 \};}
\DoxyCodeLine{108 }
\DoxyCodeLine{109 \textcolor{comment}{/* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */}}
\DoxyCodeLine{110 \textcolor{keywordtype}{int} osmo\_gsm48\_rest\_octets\_si3\_encode(uint8\_t *data, \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_gsm48\_si\_ro\_info *si3);}
\DoxyCodeLine{111 }
\DoxyCodeLine{112 \textcolor{comment}{/* Generate SI4 Rest Octets (Chapter 10.5.2.35) */}}
\DoxyCodeLine{113 \textcolor{keywordtype}{int} osmo\_gsm48\_rest\_octets\_si4\_encode(uint8\_t *data, \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_gsm48\_si\_ro\_info *si4, \textcolor{keywordtype}{int} len);}
\DoxyCodeLine{114 }
\DoxyCodeLine{115 \textcolor{keyword}{struct }osmo\_gsm48\_si13\_info \{}
\DoxyCodeLine{116         \textcolor{keyword}{struct }osmo\_gprs\_cell\_options cell\_opts;}
\DoxyCodeLine{117         \textcolor{keyword}{struct }osmo\_gprs\_power\_ctrl\_pars pwr\_ctrl\_pars;}
\DoxyCodeLine{118         uint8\_t bcch\_change\_mark;}
\DoxyCodeLine{119         uint8\_t si\_change\_field;}
\DoxyCodeLine{120         uint8\_t rac;}
\DoxyCodeLine{121         uint8\_t spgc\_ccch\_sup;}
\DoxyCodeLine{122         uint8\_t net\_ctrl\_ord;}
\DoxyCodeLine{123         uint8\_t prio\_acc\_thr;}
\DoxyCodeLine{124 \};}
\DoxyCodeLine{125 }
\DoxyCodeLine{126 \textcolor{comment}{/* Parse/Generate SI13 Rest Octests (Chapter 10.5.2.37b) */}}
\DoxyCodeLine{127 \textcolor{keywordtype}{int} osmo\_gsm48\_rest\_octets\_si13\_decode(\textcolor{keyword}{struct} osmo\_gsm48\_si13\_info *si13, \textcolor{keyword}{const} uint8\_t *data);}
\DoxyCodeLine{128 \textcolor{keywordtype}{int} osmo\_gsm48\_rest\_octets\_si13\_encode(uint8\_t *data, \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_gsm48\_si13\_info *si13);}
\DoxyCodeLine{129 }
\DoxyCodeLine{130 \textcolor{comment}{/* Parse SI3 Rest Octets */}}
\DoxyCodeLine{131 \textcolor{keywordtype}{void} osmo\_gsm48\_rest\_octets\_si3\_decode(\textcolor{keyword}{struct} osmo\_gsm48\_si\_ro\_info *si3, \textcolor{keyword}{const} uint8\_t *data);}
\DoxyCodeLine{132 }
\DoxyCodeLine{133 \textcolor{comment}{/* Parse SI4 Rest Octets */}}
\DoxyCodeLine{134 \textcolor{keywordtype}{void} osmo\_gsm48\_rest\_octets\_si4\_decode(\textcolor{keyword}{struct} osmo\_gsm48\_si\_ro\_info *si4, \textcolor{keyword}{const} uint8\_t *data, \textcolor{keywordtype}{int} len);}

\end{DoxyCode}
