\doxysection{rsl.\+h}
\label{rsl_8h_source}\index{include/osmocom/gsm/rsl.h@{include/osmocom/gsm/rsl.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/utils.h>}}
\DoxyCodeLine{5 \textcolor{preprocessor}{\#include <osmocom/core/msgb.h>}}
\DoxyCodeLine{6 \textcolor{preprocessor}{\#include <osmocom/gsm/protocol/gsm\_08\_58.h>}}
\DoxyCodeLine{7 }
\DoxyCodeLine{12 \textcolor{keywordtype}{void} rsl\_init\_rll\_hdr(\textcolor{keyword}{struct} abis\_rsl\_rll\_hdr *dh, uint8\_t msg\_type);}
\DoxyCodeLine{13 }
\DoxyCodeLine{14 \textcolor{keywordtype}{void} rsl\_init\_cchan\_hdr(\textcolor{keyword}{struct} abis\_rsl\_cchan\_hdr *ch, uint8\_t msg\_type);}
\DoxyCodeLine{15 }
\DoxyCodeLine{16 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }tlv\_definition rsl\_att\_tlvdef;}
\DoxyCodeLine{17 }
\DoxyCodeLine{19 \textcolor{preprocessor}{\#define rsl\_tlv\_parse(dec, buf, len)     \(\backslash\)}}
\DoxyCodeLine{20 \textcolor{preprocessor}{                        tlv\_parse(dec, \&rsl\_att\_tlvdef, buf, len, 0, 0)}}
\DoxyCodeLine{21 }
\DoxyCodeLine{22 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }tlv\_definition rsl\_ipac\_eie\_tlvdef;}
\DoxyCodeLine{23 }
\DoxyCodeLine{25 \textcolor{preprocessor}{\#define rsl\_ipac\_eie\_tlv\_parse(dec, buf, len)     \(\backslash\)}}
\DoxyCodeLine{26 \textcolor{preprocessor}{                        tlv\_parse(dec, \&rsl\_ipac\_eie\_tlvdef, buf, len, 0, 0)}}
\DoxyCodeLine{27 }
\DoxyCodeLine{28 \textcolor{comment}{/* encode channel number as per Section 9.3.1 */}}
\DoxyCodeLine{29 uint8\_t rsl\_enc\_chan\_nr(uint8\_t type, uint8\_t subch, uint8\_t timeslot);}
\DoxyCodeLine{30 \textcolor{comment}{/* decode channel number as per Section 9.3.1 */}}
\DoxyCodeLine{31 \textcolor{keywordtype}{int} rsl\_dec\_chan\_nr(uint8\_t chan\_nr, uint8\_t *type, uint8\_t *subch, uint8\_t *timeslot);}
\DoxyCodeLine{32 \textcolor{comment}{/* Turns channel number into a string */}}
\DoxyCodeLine{33 \textcolor{keywordtype}{char} *rsl\_chan\_nr\_str\_buf(\textcolor{keywordtype}{char} *buf, \textcolor{keywordtype}{size\_t} buf\_len, uint8\_t chan\_nr);}
\DoxyCodeLine{34 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *rsl\_chan\_nr\_str(uint8\_t chan\_nr);}
\DoxyCodeLine{35 \textcolor{keywordtype}{char} *rsl\_chan\_nr\_str\_c(\textcolor{keyword}{const} \textcolor{keywordtype}{void} *ctx, uint8\_t chan\_nr);}
\DoxyCodeLine{36 }
\DoxyCodeLine{37 }
\DoxyCodeLine{38 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *rsl\_err\_name(uint8\_t err);}
\DoxyCodeLine{39 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *rsl\_rlm\_cause\_name(uint8\_t err);}
\DoxyCodeLine{40 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *rsl\_msg\_name(uint8\_t err);}
\DoxyCodeLine{41 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *rsl\_ipac\_msg\_name(uint8\_t msg\_type);}
\DoxyCodeLine{42 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *rsl\_or\_ipac\_msg\_name(uint8\_t msg\_type);}
\DoxyCodeLine{43 }
\DoxyCodeLine{44 \textcolor{comment}{/* Section 3.3.2.3 TS 05.02. I think this looks like a table */}}
\DoxyCodeLine{45 \textcolor{keywordtype}{int} rsl\_ccch\_conf\_to\_bs\_cc\_chans(\textcolor{keywordtype}{int} ccch\_conf);}
\DoxyCodeLine{46 }
\DoxyCodeLine{47 \textcolor{comment}{/* Push a RSL RLL header */}}
\DoxyCodeLine{48 \textcolor{keywordtype}{void} rsl\_rll\_push\_hdr(\textcolor{keyword}{struct} msgb *msg, uint8\_t msg\_type, uint8\_t chan\_nr,}
\DoxyCodeLine{49                       uint8\_t link\_id, \textcolor{keywordtype}{int} transparent);}
\DoxyCodeLine{50 }
\DoxyCodeLine{51 \textcolor{comment}{/* Push a RSL RLL header with L3\_INFO IE */}}
\DoxyCodeLine{52 \textcolor{keywordtype}{void} rsl\_rll\_push\_l3(\textcolor{keyword}{struct} msgb *msg, uint8\_t msg\_type, uint8\_t chan\_nr,}
\DoxyCodeLine{53                      uint8\_t link\_id, \textcolor{keywordtype}{int} transparent);}
\DoxyCodeLine{54 }
\DoxyCodeLine{55 \textcolor{comment}{/* Allocate msgb and fill with simple RSL RLL header */}}
\DoxyCodeLine{56 \textcolor{keyword}{struct }msgb *rsl\_rll\_simple(uint8\_t msg\_type, uint8\_t chan\_nr,}
\DoxyCodeLine{57                             uint8\_t link\_id, \textcolor{keywordtype}{int} transparent);}
\DoxyCodeLine{58 }
\DoxyCodeLine{59 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string rsl\_act\_type\_names[];}
\DoxyCodeLine{60 }
\DoxyCodeLine{62 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *rsl\_act\_type\_name(uint8\_t act\_type)}
\DoxyCodeLine{63 \{}
\DoxyCodeLine{64         \textcolor{keywordflow}{return} get\_value\_string(rsl\_act\_type\_names, act\_type);}
\DoxyCodeLine{65 \}}
\DoxyCodeLine{66 }

\end{DoxyCode}
