\doxysection{src/gsm/rsl.c File Reference}
\label{rsl_8c}\index{src/gsm/rsl.c@{src/gsm/rsl.c}}
{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$stdio.\+h$>$}\newline
{\ttfamily \#include $<$errno.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/tlv.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/rsl.\+h$>$}\newline
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ RSL\+\_\+\+ALLOC\+\_\+\+SIZE}~200
\begin{DoxyCompactList}\small\item\em Size for RSL \textbf{ msgb\+\_\+alloc}. \end{DoxyCompactList}\item 
\#define \textbf{ RSL\+\_\+\+ALLOC\+\_\+\+HEADROOM}~56
\begin{DoxyCompactList}\small\item\em Headroom size for RSL \textbf{ msgb\+\_\+alloc}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \textbf{ rsl\+\_\+init\+\_\+rll\+\_\+hdr} (struct \textbf{ abis\+\_\+rsl\+\_\+rll\+\_\+hdr} $\ast$dh, uint8\+\_\+t \textbf{ msg\+\_\+type})
\begin{DoxyCompactList}\small\item\em Initialize a RSL RLL header. \end{DoxyCompactList}\item 
void \textbf{ rsl\+\_\+init\+\_\+cchan\+\_\+hdr} (struct \textbf{ abis\+\_\+rsl\+\_\+cchan\+\_\+hdr} $\ast$ch, uint8\+\_\+t \textbf{ msg\+\_\+type})
\begin{DoxyCompactList}\small\item\em Initialize a RSL Common Channel header. \end{DoxyCompactList}\item 
uint8\+\_\+t \textbf{ rsl\+\_\+enc\+\_\+chan\+\_\+nr} (uint8\+\_\+t \textbf{ type}, uint8\+\_\+t subch, uint8\+\_\+t \textbf{ timeslot})
\begin{DoxyCompactList}\small\item\em Encode channel number as per Section 9.\+3.\+1. \end{DoxyCompactList}\item 
int \textbf{ rsl\+\_\+dec\+\_\+chan\+\_\+nr} (uint8\+\_\+t \textbf{ chan\+\_\+nr}, uint8\+\_\+t $\ast$\textbf{ type}, uint8\+\_\+t $\ast$subch, uint8\+\_\+t $\ast$\textbf{ timeslot})
\begin{DoxyCompactList}\small\item\em Decode RSL channel number. \end{DoxyCompactList}\item 
char $\ast$ \textbf{ rsl\+\_\+chan\+\_\+nr\+\_\+str\+\_\+buf} (char $\ast$buf, size\+\_\+t buf\+\_\+len, uint8\+\_\+t \textbf{ chan\+\_\+nr})
\begin{DoxyCompactList}\small\item\em Get human-\/readable string for RSL channel number, in caller-\/provided buffer. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ rsl\+\_\+chan\+\_\+nr\+\_\+str} (uint8\+\_\+t \textbf{ chan\+\_\+nr})
\begin{DoxyCompactList}\small\item\em Get human-\/readable string for RSL channel number, in static buffer. \end{DoxyCompactList}\item 
char $\ast$ \textbf{ rsl\+\_\+chan\+\_\+nr\+\_\+str\+\_\+c} (const void $\ast$ctx, uint8\+\_\+t \textbf{ chan\+\_\+nr})
\begin{DoxyCompactList}\small\item\em Get human-\/readable string for RSL channel number, in dynamically-\/allocated buffer. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ rsl\+\_\+err\+\_\+name} (uint8\+\_\+t err)
\begin{DoxyCompactList}\small\item\em Get human-\/readable name for RSL Error. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ rsl\+\_\+msg\+\_\+name} (uint8\+\_\+t \textbf{ msg\+\_\+type})
\begin{DoxyCompactList}\small\item\em Get human-\/readable string for RSL Message Type. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ rsl\+\_\+ipac\+\_\+msg\+\_\+name} (uint8\+\_\+t \textbf{ msg\+\_\+type})
\begin{DoxyCompactList}\small\item\em Get human-\/readable name of ip.\+access RSL msg type. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ rsl\+\_\+or\+\_\+ipac\+\_\+msg\+\_\+name} (uint8\+\_\+t \textbf{ msg\+\_\+type})
\begin{DoxyCompactList}\small\item\em Get human-\/readable name of standard or ip.\+access RSL msg type. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ rsl\+\_\+rlm\+\_\+cause\+\_\+name} (uint8\+\_\+t err)
\begin{DoxyCompactList}\small\item\em Get human-\/readable string for RLM cause. \end{DoxyCompactList}\item 
int \textbf{ rsl\+\_\+ccch\+\_\+conf\+\_\+to\+\_\+bs\+\_\+cc\+\_\+chans} (int ccch\+\_\+conf)
\item 
int \textbf{ rsl\+\_\+ccch\+\_\+conf\+\_\+to\+\_\+bs\+\_\+ccch\+\_\+sdcch\+\_\+comb} (int ccch\+\_\+conf)
\item 
void \textbf{ rsl\+\_\+rll\+\_\+push\+\_\+hdr} (struct \textbf{ msgb} $\ast$\textbf{ msg}, uint8\+\_\+t \textbf{ msg\+\_\+type}, uint8\+\_\+t \textbf{ chan\+\_\+nr}, uint8\+\_\+t \textbf{ link\+\_\+id}, int transparent)
\begin{DoxyCompactList}\small\item\em Push a RSL RLL header onto an existing msgb. \end{DoxyCompactList}\item 
void \textbf{ rsl\+\_\+rll\+\_\+push\+\_\+l3} (struct \textbf{ msgb} $\ast$\textbf{ msg}, uint8\+\_\+t \textbf{ msg\+\_\+type}, uint8\+\_\+t \textbf{ chan\+\_\+nr}, uint8\+\_\+t \textbf{ link\+\_\+id}, int transparent)
\begin{DoxyCompactList}\small\item\em Wrap msgb in L3 Info IE and push a RSL RLL header. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ rsl\+\_\+rll\+\_\+simple} (uint8\+\_\+t \textbf{ msg\+\_\+type}, uint8\+\_\+t \textbf{ chan\+\_\+nr}, uint8\+\_\+t \textbf{ link\+\_\+id}, int transparent)
\begin{DoxyCompactList}\small\item\em Create msgb with RSL RLL header. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
const struct \textbf{ tlv\+\_\+definition} \textbf{ rsl\+\_\+att\+\_\+tlvdef}
\item 
static const struct \textbf{ value\+\_\+string} \textbf{ rsl\+\_\+err\+\_\+vals} [$\,$]
\item 
static const struct \textbf{ value\+\_\+string} \textbf{ rsl\+\_\+msgt\+\_\+names} [$\,$]
\item 
static const struct \textbf{ value\+\_\+string} \textbf{ rsl\+\_\+ipac\+\_\+msgt\+\_\+names} [$\,$]
\begin{DoxyCompactList}\small\item\em ip.\+access specific \end{DoxyCompactList}\item 
static const struct \textbf{ value\+\_\+string} \textbf{ rsl\+\_\+rlm\+\_\+cause\+\_\+strs} [$\,$]
\item 
const struct \textbf{ tlv\+\_\+definition} \textbf{ rsl\+\_\+ipac\+\_\+eie\+\_\+tlvdef}
\begin{DoxyCompactList}\small\item\em TLV parser definitions for IPA embedded IEs. \end{DoxyCompactList}\item 
const struct \textbf{ value\+\_\+string} \textbf{ rsl\+\_\+act\+\_\+type\+\_\+names} [$\,$]
\begin{DoxyCompactList}\small\item\em String names of RSL Channel Activation Types. \end{DoxyCompactList}\end{DoxyCompactItemize}
