\doxysection{ss7\+\_\+route\+\_\+table.\+h}
\label{ss7__route__table_8h_source}\index{src/ss7\_route\_table.h@{src/ss7\_route\_table.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}}
\DoxyCodeLine{00002\ }
\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#include\ <stdint.h>}}
\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ <unistd.h>}}
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ <osmocom/core/linuxlist.h>}}
\DoxyCodeLine{00006\ }
\DoxyCodeLine{00007\ \textcolor{comment}{/***********************************************************************}}
\DoxyCodeLine{00008\ \textcolor{comment}{\ *\ SS7\ Routing\ Tables}}
\DoxyCodeLine{00009\ \textcolor{comment}{\ ***********************************************************************/}}
\DoxyCodeLine{00010\ }
\DoxyCodeLine{00011\ \textcolor{keyword}{struct\ }osmo\_ss7\_instance;}
\DoxyCodeLine{00012\ \textcolor{keyword}{enum}\ osmo\_ss7\_route\_status;}
\DoxyCodeLine{00013\ }
\DoxyCodeLine{00014\ \textcolor{keyword}{struct\ }osmo\_ss7\_route\_label\ \{}
\DoxyCodeLine{00015\ \ \ \ \ \ \ \ \ uint32\_t\ opc;}
\DoxyCodeLine{00016\ \ \ \ \ \ \ \ \ uint32\_t\ dpc;}
\DoxyCodeLine{00017\ \ \ \ \ \ \ \ \ uint8\_t\ sls;}
\DoxyCodeLine{00018\ \};}
\DoxyCodeLine{00019\ \textcolor{keywordtype}{char}\ *ss7\_route\_label\_to\_str(\textcolor{keywordtype}{char}\ *buf,\ \textcolor{keywordtype}{size\_t}\ buf\_len,\ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_ss7\_instance\ *inst,\ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_ss7\_route\_label\ *rtlb);}
\DoxyCodeLine{00020\ }
\DoxyCodeLine{00021\ \textcolor{keyword}{struct\ }osmo\_ss7\_route\_table\ \{}
\DoxyCodeLine{00023\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }llist\_head\ list;}
\DoxyCodeLine{00025\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }osmo\_ss7\_instance\ *inst;}
\DoxyCodeLine{00027\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }llist\_head\ combined\_linksets;}
\DoxyCodeLine{00028\ }
\DoxyCodeLine{00029\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\{}
\DoxyCodeLine{00030\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{char}\ *name;}
\DoxyCodeLine{00031\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{char}\ *description;}
\DoxyCodeLine{00032\ \ \ \ \ \ \ \ \ \}\ cfg;}
\DoxyCodeLine{00033\ \};}
\DoxyCodeLine{00034\ }
\DoxyCodeLine{00035\ \textcolor{keyword}{struct\ }osmo\_ss7\_route\_table\ *}
\DoxyCodeLine{00036\ ss7\_route\_table\_find(\textcolor{keyword}{struct}\ osmo\_ss7\_instance\ *inst,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *name);}
\DoxyCodeLine{00037\ \textcolor{keyword}{struct\ }osmo\_ss7\_route\_table\ *}
\DoxyCodeLine{00038\ ss7\_route\_table\_find\_or\_create(\textcolor{keyword}{struct}\ osmo\_ss7\_instance\ *inst,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *name);}
\DoxyCodeLine{00039\ \textcolor{keywordtype}{void}\ ss7\_route\_table\_destroy(\textcolor{keyword}{struct}\ osmo\_ss7\_route\_table\ *rtbl);}
\DoxyCodeLine{00040\ }
\DoxyCodeLine{00041\ \textcolor{keyword}{struct\ }osmo\_ss7\_route\ *}
\DoxyCodeLine{00042\ ss7\_route\_table\_find\_route\_by\_dpc\_mask(\textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_ss7\_route\_table\ *rtbl,\ uint32\_t\ dpc,}
\DoxyCodeLine{00043\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ mask,\ \textcolor{keywordtype}{bool}\ dynamic);}
\DoxyCodeLine{00044\ \textcolor{keyword}{struct\ }osmo\_ss7\_route\ *}
\DoxyCodeLine{00045\ ss7\_route\_table\_find\_route\_by\_dpc\_mask\_as(\textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_ss7\_route\_table\ *rtbl,\ uint32\_t\ dpc,}
\DoxyCodeLine{00046\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ mask,\ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_ss7\_as\ *as,\ \textcolor{keywordtype}{bool}\ dynamic);}
\DoxyCodeLine{00047\ \textcolor{keyword}{struct\ }osmo\_ss7\_route\ *}
\DoxyCodeLine{00048\ ss7\_route\_table\_lookup\_route(\textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_ss7\_route\_table\ *rtbl,\ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_ss7\_route\_label\ *rtlabel);}
\DoxyCodeLine{00049\ \textcolor{keywordtype}{bool}\ ss7\_route\_table\_dpc\_is\_accessible(\textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_ss7\_route\_table\ *rtbl,\ uint32\_t\ dpc);}
\DoxyCodeLine{00050\ \textcolor{keywordtype}{bool}\ ss7\_route\_table\_dpc\_is\_accessible\_via\_as(\textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_ss7\_route\_table\ *rtbl,\ uint32\_t\ dpc,\ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_ss7\_as\ *as);}
\DoxyCodeLine{00051\ \textcolor{keywordtype}{bool}\ ss7\_route\_table\_dpc\_is\_accessible\_skip\_as(\textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_ss7\_route\_table\ *rtbl,\ uint32\_t\ dpc,\ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_ss7\_as\ *as);}
\DoxyCodeLine{00052\ }
\DoxyCodeLine{00053\ \textcolor{keyword}{struct\ }osmo\_ss7\_combined\_linkset\ *}
\DoxyCodeLine{00054\ ss7\_route\_table\_find\_combined\_linkset(\textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_ss7\_route\_table\ *rtbl,\ uint32\_t\ dpc,\ uint32\_t\ mask,\ uint32\_t\ prio);}
\DoxyCodeLine{00055\ \textcolor{keyword}{struct\ }osmo\_ss7\_combined\_linkset\ *}
\DoxyCodeLine{00056\ ss7\_route\_table\_find\_or\_create\_combined\_linkset(\textcolor{keyword}{struct}\ osmo\_ss7\_route\_table\ *rtbl,\ uint32\_t\ pc,\ uint32\_t\ mask,\ uint32\_t\ prio);}
\DoxyCodeLine{00057\ \textcolor{keyword}{struct\ }osmo\_ss7\_combined\_linkset\ *}
\DoxyCodeLine{00058\ ss7\_route\_table\_find\_combined\_linkset\_by\_dpc(\textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_ss7\_route\_table\ *rtbl,\ uint32\_t\ dpc);}
\DoxyCodeLine{00059\ \textcolor{keyword}{struct\ }osmo\_ss7\_combined\_linkset\ *}
\DoxyCodeLine{00060\ ss7\_route\_table\_find\_combined\_linkset\_by\_dpc\_mask(\textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_ss7\_route\_table\ *rtbl,\ uint32\_t\ dpc,\ uint32\_t\ mask);}
\DoxyCodeLine{00061\ \textcolor{keyword}{struct\ }osmo\_ss7\_combined\_linkset\ *}
\DoxyCodeLine{00062\ ss7\_route\_table\_find\_combined\_linkset(\textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_ss7\_route\_table\ *rtbl,\ uint32\_t\ dpc,\ uint32\_t\ mask,\ uint32\_t\ prio);}
\DoxyCodeLine{00063\ }
\DoxyCodeLine{00064\ \textcolor{keywordtype}{void}\ ss7\_route\_table\_update\_route\_status\_by\_as(\textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_ss7\_route\_table\ *rtbl,\ \textcolor{keyword}{enum}\ osmo\_ss7\_route\_status\ status,}
\DoxyCodeLine{00065\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_ss7\_as\ *as,\ uint32\_t\ dpc);}
\DoxyCodeLine{00066\ \textcolor{keywordtype}{void}\ ss7\_route\_table\_del\_routes\_by\_as(\textcolor{keyword}{struct}\ osmo\_ss7\_route\_table\ *rtbl,\ \textcolor{keyword}{struct}\ osmo\_ss7\_as\ *as);}
\DoxyCodeLine{00067\ \textcolor{keywordtype}{void}\ ss7\_route\_table\_del\_routes\_by\_linkset(\textcolor{keyword}{struct}\ osmo\_ss7\_route\_table\ *rtbl,\ \textcolor{keyword}{struct}\ osmo\_ss7\_linkset\ *lset);}

\end{DoxyCode}
