\doxysection{src/ss7\+\_\+route.h File Reference} \label{ss7__route_8h}\index{src/ss7\_route.h@{src/ss7\_route.h}} {\ttfamily \#include $<$stdint.\+h$>$}\newline {\ttfamily \#include $<$osmocom/core/linuxlist.\+h$>$}\newline \doxysubsection*{Data Structures} \begin{DoxyCompactItemize} \item struct \textbf{ osmo\+\_\+ss7\+\_\+route} \end{DoxyCompactItemize} \doxysubsection*{Macros} \begin{DoxyCompactItemize} \item \#define \textbf{ OSMO\+\_\+\+SS7\+\_\+\+ROUTE\+\_\+\+PRIO\+\_\+\+DEFAULT}~5 \end{DoxyCompactItemize} \doxysubsection*{Functions} \begin{DoxyCompactItemize} \item struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$ \textbf{ ss7\+\_\+route\+\_\+alloc} (struct \textbf{ osmo\+\_\+ss7\+\_\+route\+\_\+table} $\ast$rtbl, uint32\+\_\+t pc, uint32\+\_\+t mask) \begin{DoxyCompactList}\small\item\em Allocate a route entry. \end{DoxyCompactList}\item struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$ \textbf{ ss7\+\_\+route\+\_\+create} (struct \textbf{ osmo\+\_\+ss7\+\_\+route\+\_\+table} $\ast$rtbl, uint32\+\_\+t \textbf{ dpc}, uint32\+\_\+t mask, const char $\ast$linkset\+\_\+name) \begin{DoxyCompactList}\small\item\em Create a new route in the given routing table. \end{DoxyCompactList}\item void \textbf{ ss7\+\_\+route\+\_\+destroy} (struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$rt) \begin{DoxyCompactList}\small\item\em Destroy a given SS7 route. \end{DoxyCompactList}\item struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$ \textbf{ ss7\+\_\+route\+\_\+find\+\_\+dpc} (struct \textbf{ osmo\+\_\+ss7\+\_\+route\+\_\+table} $\ast$rtbl, uint32\+\_\+t \textbf{ dpc}) \item struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$ \textbf{ ss7\+\_\+route\+\_\+find\+\_\+dpc\+\_\+mask} (struct \textbf{ osmo\+\_\+ss7\+\_\+route\+\_\+table} $\ast$rtbl, uint32\+\_\+t \textbf{ dpc}, uint32\+\_\+t mask) \item int \textbf{ ss7\+\_\+route\+\_\+set\+\_\+linkset} (struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$rt, const char $\ast$linkset\+\_\+name) \begin{DoxyCompactList}\small\item\em Set linkset on route entry. \end{DoxyCompactList}\item int \textbf{ ss7\+\_\+route\+\_\+insert} (struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$rt) \begin{DoxyCompactList}\small\item\em Insert route into its routing table. \end{DoxyCompactList}\end{DoxyCompactItemize} \doxysubsection{Macro Definition Documentation} \mbox{\label{ss7__route_8h_a203ea4f16e9c9f19abcdab98cf1ca111}} \index{ss7\_route.h@{ss7\_route.h}!OSMO\_SS7\_ROUTE\_PRIO\_DEFAULT@{OSMO\_SS7\_ROUTE\_PRIO\_DEFAULT}} \index{OSMO\_SS7\_ROUTE\_PRIO\_DEFAULT@{OSMO\_SS7\_ROUTE\_PRIO\_DEFAULT}!ss7\_route.h@{ss7\_route.h}} \doxysubsubsection{OSMO\_SS7\_ROUTE\_PRIO\_DEFAULT} {\footnotesize\ttfamily \#define OSMO\+\_\+\+SS7\+\_\+\+ROUTE\+\_\+\+PRIO\+\_\+\+DEFAULT~5} \doxysubsection{Function Documentation} \mbox{\label{ss7__route_8h_ae40a7c0d3c3310101a0cc8c0d51770d2}} \index{ss7\_route.h@{ss7\_route.h}!ss7\_route\_alloc@{ss7\_route\_alloc}} \index{ss7\_route\_alloc@{ss7\_route\_alloc}!ss7\_route.h@{ss7\_route.h}} \doxysubsubsection{ss7\_route\_alloc()} {\footnotesize\ttfamily struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$ ss7\+\_\+route\+\_\+alloc (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+route\+\_\+table} $\ast$}]{rtbl, }\item[{uint32\+\_\+t}]{pc, }\item[{uint32\+\_\+t}]{mask }\end{DoxyParamCaption})} Allocate a route entry. \begin{DoxyParams}[1]{Parameters} \mbox{\texttt{ in}} & {\em rtbl} & Routing Table where the route belongs \\ \hline \mbox{\texttt{ in}} & {\em pc} & Point Code of the destination of the route \\ \hline \mbox{\texttt{ in}} & {\em mask} & Mask of the destination Point Code pc \\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} Allocated route (not yet inserted into its rtbl), NULL on error \end{DoxyReturn} The returned route has no linkset associated yet, user {\itshape must} associate it using API \doxyref{ss7\+\_\+route\+\_\+set\+\_\+linkset()}{p.}{osmo__ss7__route_8c_a46ccd2320c3e917d0e9bef6b90e78601} before inserting the route into its routing table. Fields priority and qos\+\_\+class may be set {\itshape before} inserting the route into its routing table\+: \begin{DoxyItemize} \item A default priority of 0 is configured on the route. \item A default qos-\/class of 0 is configured on the route. \end{DoxyItemize} Use API \doxyref{ss7\+\_\+route\+\_\+insert()}{p.}{osmo__ss7__route_8c_acf75f3605c463d7c4cef4e73257194ab} to insert the route into its routing table. The route entry allocated with this API can be destroyed/freed at any point using API \doxyref{ss7\+\_\+route\+\_\+destroy()}{p.}{osmo__ss7__route_8c_a6ce127d1c6de224f5a6297f68fba4cfc}, regardless of it being already inserted or not in its routing table. References \textbf{ osmo\+\_\+ss7\+\_\+instance\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+route\+\_\+table\+::inst}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::list}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::mask}, \textbf{ osmo\+\_\+ss7\+\_\+pc\+\_\+normalize()}, \textbf{ OSMO\+\_\+\+SS7\+\_\+\+ROUTE\+\_\+\+PRIO\+\_\+\+DEFAULT}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::pc}, \textbf{ osmo\+\_\+ss7\+\_\+instance\+::pc\+\_\+fmt}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::priority}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::rtable}, and \textbf{ ss7\+\_\+initialized}. Referenced by \textbf{ DEFUN\+\_\+\+ATTR()}, and \textbf{ ss7\+\_\+route\+\_\+create()}. \mbox{\label{ss7__route_8h_a02584e9723d6375ca5cf5a823f29c10f}} \index{ss7\_route.h@{ss7\_route.h}!ss7\_route\_create@{ss7\_route\_create}} \index{ss7\_route\_create@{ss7\_route\_create}!ss7\_route.h@{ss7\_route.h}} \doxysubsubsection{ss7\_route\_create()} {\footnotesize\ttfamily struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$ ss7\+\_\+route\+\_\+create (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+route\+\_\+table} $\ast$}]{rtbl, }\item[{uint32\+\_\+t}]{pc, }\item[{uint32\+\_\+t}]{mask, }\item[{const char $\ast$}]{linkset\+\_\+name }\end{DoxyParamCaption})} Create a new route in the given routing table. \begin{DoxyParams}[1]{Parameters} \mbox{\texttt{ in}} & {\em rtbl} & Routing Table in which the route is to be created \\ \hline \mbox{\texttt{ in}} & {\em pc} & Point Code of the destination of the route \\ \hline \mbox{\texttt{ in}} & {\em mask} & Mask of the destination Point Code pc \\ \hline \mbox{\texttt{ in}} & {\em linkset\+\_\+name} & string name of the linkset to be used \\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} callee-\/allocated + initialized route, NULL on error \end{DoxyReturn} The route allocated and returned by this API is already inserted into the routing table, with priority and qos-\/class set to 0. If you plan to use different values for priority and qos-\/class, avoid using this API and use \doxyref{ss7\+\_\+route\+\_\+alloc()}{p.}{osmo__ss7__route_8c_ae40a7c0d3c3310101a0cc8c0d51770d2} + \doxyref{ss7\+\_\+route\+\_\+set\+\_\+linkset()}{p.}{osmo__ss7__route_8c_a46ccd2320c3e917d0e9bef6b90e78601} + \doxyref{ss7\+\_\+route\+\_\+insert()}{p.}{osmo__ss7__route_8c_acf75f3605c463d7c4cef4e73257194ab} instead. References \textbf{ osmo\+\_\+ss7\+\_\+route\+::linkset\+\_\+name}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::mask}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::pc}, \textbf{ ss7\+\_\+route\+\_\+alloc()}, \textbf{ ss7\+\_\+route\+\_\+insert()}, \textbf{ ss7\+\_\+route\+\_\+set\+\_\+linkset()}, and \textbf{ ss7\+\_\+route\+\_\+table\+\_\+find\+\_\+route\+\_\+by\+\_\+dpc\+\_\+mask()}. Referenced by \textbf{ \+\_\+rout\+\_\+key()}, \textbf{ handle\+\_\+rkey\+\_\+reg()}, \textbf{ ipa\+\_\+add\+\_\+route()}, \textbf{ osmo\+\_\+sccp\+\_\+simple\+\_\+client\+\_\+on\+\_\+ss7\+\_\+id()}, and \textbf{ osmo\+\_\+sccp\+\_\+simple\+\_\+server\+\_\+add\+\_\+clnt()}. \mbox{\label{ss7__route_8h_a6ce127d1c6de224f5a6297f68fba4cfc}} \index{ss7\_route.h@{ss7\_route.h}!ss7\_route\_destroy@{ss7\_route\_destroy}} \index{ss7\_route\_destroy@{ss7\_route\_destroy}!ss7\_route.h@{ss7\_route.h}} \doxysubsubsection{ss7\_route\_destroy()} {\footnotesize\ttfamily void ss7\+\_\+route\+\_\+destroy (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$}]{rt }\end{DoxyParamCaption})} Destroy a given SS7 route. References \textbf{ osmo\+\_\+ss7\+\_\+route\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+route\+\_\+table\+::inst}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::linkset\+\_\+name}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::list}, \textbf{ LOGSS7}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::mask}, \textbf{ osmo\+\_\+ss7\+\_\+pointcode\+\_\+print()}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::pc}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::rtable}, \textbf{ ss7\+\_\+initialized}, and \textbf{ ss7\+\_\+route\+\_\+inserted()}. Referenced by \textbf{ \+\_\+rout\+\_\+key()}, \textbf{ DEFUN\+\_\+\+ATTR()}, \textbf{ handle\+\_\+rkey\+\_\+dereg()}, \textbf{ handle\+\_\+rkey\+\_\+reg()}, \textbf{ ipa\+\_\+del\+\_\+route()}, \textbf{ osmo\+\_\+sccp\+\_\+simple\+\_\+client\+\_\+on\+\_\+ss7\+\_\+id()}, \textbf{ osmo\+\_\+sccp\+\_\+simple\+\_\+server\+\_\+add\+\_\+clnt()}, \textbf{ ss7\+\_\+route\+\_\+table\+\_\+del\+\_\+routes\+\_\+by\+\_\+as()}, and \textbf{ ss7\+\_\+route\+\_\+table\+\_\+del\+\_\+routes\+\_\+by\+\_\+linkset()}. \mbox{\label{ss7__route_8h_a6089b2cc0e2616cea85a644641cf29b7}} \index{ss7\_route.h@{ss7\_route.h}!ss7\_route\_find\_dpc@{ss7\_route\_find\_dpc}} \index{ss7\_route\_find\_dpc@{ss7\_route\_find\_dpc}!ss7\_route.h@{ss7\_route.h}} \doxysubsubsection{ss7\_route\_find\_dpc()} {\footnotesize\ttfamily struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$ ss7\+\_\+route\+\_\+find\+\_\+dpc (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+route\+\_\+table} $\ast$}]{rtbl, }\item[{uint32\+\_\+t}]{dpc }\end{DoxyParamCaption})} \mbox{\label{ss7__route_8h_ac484bdd16ce44ebe412847eb6e52e086}} \index{ss7\_route.h@{ss7\_route.h}!ss7\_route\_find\_dpc\_mask@{ss7\_route\_find\_dpc\_mask}} \index{ss7\_route\_find\_dpc\_mask@{ss7\_route\_find\_dpc\_mask}!ss7\_route.h@{ss7\_route.h}} \doxysubsubsection{ss7\_route\_find\_dpc\_mask()} {\footnotesize\ttfamily struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$ ss7\+\_\+route\+\_\+find\+\_\+dpc\+\_\+mask (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+route\+\_\+table} $\ast$}]{rtbl, }\item[{uint32\+\_\+t}]{dpc, }\item[{uint32\+\_\+t}]{mask }\end{DoxyParamCaption})} \mbox{\label{ss7__route_8h_acf75f3605c463d7c4cef4e73257194ab}} \index{ss7\_route.h@{ss7\_route.h}!ss7\_route\_insert@{ss7\_route\_insert}} \index{ss7\_route\_insert@{ss7\_route\_insert}!ss7\_route.h@{ss7\_route.h}} \doxysubsubsection{ss7\_route\_insert()} {\footnotesize\ttfamily int ss7\+\_\+route\+\_\+insert (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$}]{rt }\end{DoxyParamCaption})} Insert route into its routing table. \begin{DoxyParams}[1]{Parameters} \mbox{\texttt{ in}} & {\em rt} & Route to be inserted into its routing table \\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} 0 on success, negative on error \end{DoxyReturn} A route is only really used once it has been inserted into its routing table. References \textbf{ osmo\+\_\+ss7\+\_\+route\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+route\+\_\+table\+::inst}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::linkset\+\_\+name}, \textbf{ LOGSS7}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::mask}, \textbf{ osmo\+\_\+ss7\+\_\+pointcode\+\_\+print()}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::pc}, \textbf{ route\+\_\+insert\+\_\+sorted()}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::rtable}, \textbf{ ss7\+\_\+route\+\_\+inserted()}, and \textbf{ ss7\+\_\+route\+\_\+table\+\_\+find\+\_\+route\+\_\+by\+\_\+dpc\+\_\+mask()}. Referenced by \textbf{ DEFUN\+\_\+\+ATTR()}, and \textbf{ ss7\+\_\+route\+\_\+create()}. \mbox{\label{ss7__route_8h_a46ccd2320c3e917d0e9bef6b90e78601}} \index{ss7\_route.h@{ss7\_route.h}!ss7\_route\_set\_linkset@{ss7\_route\_set\_linkset}} \index{ss7\_route\_set\_linkset@{ss7\_route\_set\_linkset}!ss7\_route.h@{ss7\_route.h}} \doxysubsubsection{ss7\_route\_set\_linkset()} {\footnotesize\ttfamily int ss7\+\_\+route\+\_\+set\+\_\+linkset (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$}]{rt, }\item[{const char $\ast$}]{linkset\+\_\+name }\end{DoxyParamCaption})} Set linkset on route entry. \begin{DoxyParams}[1]{Parameters} \mbox{\texttt{ in}} & {\em rt} & Route to be configured \\ \hline \mbox{\texttt{ in}} & {\em linkset\+\_\+name} & string name of the linkset to be used \\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} 0 on success, negative on error. \end{DoxyReturn} References \textbf{ osmo\+\_\+ss7\+\_\+route\+::as}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+linkset\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::dest}, \textbf{ osmo\+\_\+ss7\+\_\+route\+\_\+table\+::inst}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::linkset}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::linkset\+\_\+name}, \textbf{ LOGSS7}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::mask}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::name}, \textbf{ osmo\+\_\+ss7\+\_\+linkset\+::name}, \textbf{ osmo\+\_\+ss7\+\_\+as\+\_\+find\+\_\+by\+\_\+name()}, \textbf{ osmo\+\_\+ss7\+\_\+pointcode\+\_\+print()}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::pc}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::rtable}, \textbf{ ss7\+\_\+linkset\+\_\+find\+\_\+by\+\_\+name()}, and \textbf{ ss7\+\_\+route\+\_\+inserted()}. Referenced by \textbf{ DEFUN\+\_\+\+ATTR()}, and \textbf{ ss7\+\_\+route\+\_\+create()}.