\doxysection{src/osmo\+\_\+ss7\+\_\+route.c File Reference}
\label{osmo__ss7__route_8c}\index{src/osmo\_ss7\_route.c@{src/osmo\_ss7\_route.c}}
{\ttfamily \#include $<$errno.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/linuxlist.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/logging.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/sigtran/mtp\+\_\+sap.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/sigtran/osmo\+\_\+ss7.\+h$>$}\newline
{\ttfamily \#include \char`\"{}ss7\+\_\+combined\+\_\+linkset.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}ss7\+\_\+linkset.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}ss7\+\_\+as.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}ss7\+\_\+asp.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}ss7\+\_\+route.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}ss7\+\_\+route\+\_\+table.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}ss7\+\_\+internal.\+h\char`\"{}}\newline
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ APPEND}(fmt,  args ...)
\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 
static bool \textbf{ ss7\+\_\+route\+\_\+inserted} (const struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$rt)
\begin{DoxyCompactList}\small\item\em Check whether route has already been inserted into its routing table. \end{DoxyCompactList}\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}\item 
struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$ \textbf{ ss7\+\_\+route\+\_\+create} (struct \textbf{ osmo\+\_\+ss7\+\_\+route\+\_\+table} $\ast$rtbl, uint32\+\_\+t pc, 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 
static unsigned int \textbf{ count\+\_\+leading\+\_\+one\+\_\+bits} (uint32\+\_\+t inp, unsigned int nbits)
\item 
static int \textbf{ u32\+\_\+masklen} (uint32\+\_\+t mask, unsigned int nbits)
\item 
const char $\ast$ \textbf{ osmo\+\_\+ss7\+\_\+route\+\_\+print} (const struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$rt)
\item 
const char $\ast$ \textbf{ osmo\+\_\+ss7\+\_\+route\+\_\+name} (struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$rt, bool list\+\_\+asps)
\begin{DoxyCompactList}\small\item\em Return human readable representation of the route, in a static buffer. \end{DoxyCompactList}\item 
struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$ \textbf{ osmo\+\_\+ss7\+\_\+route\+\_\+lookup} (struct \textbf{ osmo\+\_\+ss7\+\_\+instance} $\ast$inst, uint32\+\_\+t \textbf{ dpc})
\begin{DoxyCompactList}\small\item\em Find a SS7 route for given destination point code in given SS7. \end{DoxyCompactList}\item 
struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$ \textbf{ osmo\+\_\+ss7\+\_\+route\+\_\+get\+\_\+dest\+\_\+as} (struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$rt)
\begin{DoxyCompactList}\small\item\em Get destination AS of route. \end{DoxyCompactList}\item 
bool \textbf{ ss7\+\_\+route\+\_\+is\+\_\+available} (const struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$rt)
\end{DoxyCompactItemize}


\doxysubsection{Macro Definition Documentation}
\mbox{\label{osmo__ss7__route_8c_a78d865d31aa82b7624caa11bfb02c913}} 
\index{osmo\_ss7\_route.c@{osmo\_ss7\_route.c}!APPEND@{APPEND}}
\index{APPEND@{APPEND}!osmo\_ss7\_route.c@{osmo\_ss7\_route.c}}
\doxysubsubsection{APPEND}
{\footnotesize\ttfamily \#define APPEND(\begin{DoxyParamCaption}\item[{}]{fmt,  }\item[{}]{args ... }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{        \textcolor{keywordflow}{do} \{ \(\backslash\)}
\DoxyCodeLine{                l = snprintf(pos, \textcolor{keyword}{sizeof}(buf) -\/ (pos -\/ buf), fmt, \#\# args); \(\backslash\)}
\DoxyCodeLine{                pos += l; \(\backslash\)}
\DoxyCodeLine{                if (pos -\/ buf >= \textcolor{keyword}{sizeof}(buf)) \(\backslash\)}
\DoxyCodeLine{                        goto out; \(\backslash\)}
\DoxyCodeLine{        \} \textcolor{keywordflow}{while} (0)}

\end{DoxyCode}


\doxysubsection{Function Documentation}
\mbox{\label{osmo__ss7__route_8c_a6f2fdcae0d3e5278f51ab44f674ab0eb}} 
\index{osmo\_ss7\_route.c@{osmo\_ss7\_route.c}!count\_leading\_one\_bits@{count\_leading\_one\_bits}}
\index{count\_leading\_one\_bits@{count\_leading\_one\_bits}!osmo\_ss7\_route.c@{osmo\_ss7\_route.c}}
\doxysubsubsection{count\_leading\_one\_bits()}
{\footnotesize\ttfamily static unsigned int count\+\_\+leading\+\_\+one\+\_\+bits (\begin{DoxyParamCaption}\item[{uint32\+\_\+t}]{inp,  }\item[{unsigned int}]{nbits }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Referenced by \textbf{ u32\+\_\+masklen()}.

\mbox{\label{osmo__ss7__route_8c_a00d4eeed253f86917689dd72043aaba7}} 
\index{osmo\_ss7\_route.c@{osmo\_ss7\_route.c}!osmo\_ss7\_route\_get\_dest\_as@{osmo\_ss7\_route\_get\_dest\_as}}
\index{osmo\_ss7\_route\_get\_dest\_as@{osmo\_ss7\_route\_get\_dest\_as}!osmo\_ss7\_route.c@{osmo\_ss7\_route.c}}
\doxysubsubsection{osmo\_ss7\_route\_get\_dest\_as()}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$ osmo\+\_\+ss7\+\_\+route\+\_\+get\+\_\+dest\+\_\+as (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$}]{rt }\end{DoxyParamCaption})}



Get destination AS of route. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em rt} & Route entry holding the AS destination \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to Application Server on success; NULL if rt doesn\textquotesingle{}t route to an AS (i.\+e. routes to a linkset). 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+ss7\+\_\+route\+::as}, and \textbf{ osmo\+\_\+ss7\+\_\+route\+::dest}.

\mbox{\label{osmo__ss7__route_8c_a75a8cf8f7186081400da51a00106e8da}} 
\index{osmo\_ss7\_route.c@{osmo\_ss7\_route.c}!osmo\_ss7\_route\_lookup@{osmo\_ss7\_route\_lookup}}
\index{osmo\_ss7\_route\_lookup@{osmo\_ss7\_route\_lookup}!osmo\_ss7\_route.c@{osmo\_ss7\_route.c}}
\doxysubsubsection{osmo\_ss7\_route\_lookup()}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$ osmo\+\_\+ss7\+\_\+route\+\_\+lookup (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+instance} $\ast$}]{inst,  }\item[{uint32\+\_\+t}]{dpc }\end{DoxyParamCaption})}



Find a SS7 route for given destination point code in given SS7. 

NOTE\+: DEPRECATED, use \doxyref{ss7\+\_\+instance\+\_\+lookup\+\_\+route()}{p.}{osmo__ss7__instance_8c_a154eb42c95d9d897d8abeb337c9200eb} instead 

References \textbf{ dpc}, \textbf{ osmo\+\_\+ss7\+\_\+route\+\_\+label\+::opc}, \textbf{ ss7\+\_\+initialized}, and \textbf{ ss7\+\_\+instance\+\_\+lookup\+\_\+route()}.

\mbox{\label{osmo__ss7__route_8c_a286e2d2dfc24375cf83db56c67fe0ea2}} 
\index{osmo\_ss7\_route.c@{osmo\_ss7\_route.c}!osmo\_ss7\_route\_name@{osmo\_ss7\_route\_name}}
\index{osmo\_ss7\_route\_name@{osmo\_ss7\_route\_name}!osmo\_ss7\_route.c@{osmo\_ss7\_route.c}}
\doxysubsubsection{osmo\_ss7\_route\_name()}
{\footnotesize\ttfamily const char $\ast$ osmo\+\_\+ss7\+\_\+route\+\_\+name (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$}]{rt,  }\item[{bool}]{list\+\_\+asps }\end{DoxyParamCaption})}



Return human readable representation of the route, in a static buffer. 

This uses both \doxyref{osmo\+\_\+ss7\+\_\+pointcode\+\_\+print()}{p.}{osmo__ss7_8h_accae8bcfd3577b2fcae21c55d97be313} and \doxyref{osmo\+\_\+ss7\+\_\+pointcode\+\_\+print2()}{p.}{osmo__ss7_8h_a9c9283afabd1e1566f511e66698ea44d}, so pairing \doxyref{osmo\+\_\+ss7\+\_\+route\+\_\+name()}{p.}{osmo__ss7__route_8c_a286e2d2dfc24375cf83db56c67fe0ea2} with \doxyref{osmo\+\_\+ss7\+\_\+pointcode\+\_\+print()}{p.}{osmo__ss7_8h_accae8bcfd3577b2fcae21c55d97be313} in the same printf statement is likely to conflict. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em rt} & The route information to print, or NULL. \\
\hline
\mbox{\texttt{ in}}  & {\em list\+\_\+asps} & If true, append info for all ASPs for the route\textquotesingle{}s AS. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A string constant or static buffer. 
\end{DoxyReturn}


References \textbf{ APPEND}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::as}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::asps}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::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\+::mask}, \textbf{ MAX\+\_\+\+PC\+\_\+\+STR\+\_\+\+LEN}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::name}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::name}, \textbf{ osmo\+\_\+ss7\+\_\+linkset\+::name}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+protocol\+\_\+name()}, \textbf{ osmo\+\_\+ss7\+\_\+pointcode\+\_\+print\+\_\+buf()}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::pc}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::proto}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::rtable}, and \textbf{ osmo\+\_\+ss7\+\_\+asp\+::sock\+\_\+name}.



Referenced by \textbf{ DEFUN()}, and \textbf{ hmrt\+\_\+message\+\_\+for\+\_\+routing()}.

\mbox{\label{osmo__ss7__route_8c_a57312ff6631501f256d1108b89ebf71a}} 
\index{osmo\_ss7\_route.c@{osmo\_ss7\_route.c}!osmo\_ss7\_route\_print@{osmo\_ss7\_route\_print}}
\index{osmo\_ss7\_route\_print@{osmo\_ss7\_route\_print}!osmo\_ss7\_route.c@{osmo\_ss7\_route.c}}
\doxysubsubsection{osmo\_ss7\_route\_print()}
{\footnotesize\ttfamily const char $\ast$ osmo\+\_\+ss7\+\_\+route\+\_\+print (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$}]{rt }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+ss7\+\_\+instance\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+route\+\_\+table\+::inst}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::mask}, \textbf{ osmo\+\_\+ss7\+\_\+pc\+\_\+width()}, \textbf{ osmo\+\_\+ss7\+\_\+pointcode\+\_\+print()}, \textbf{ osmo\+\_\+ss7\+\_\+pointcode\+\_\+print2()}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::pc}, \textbf{ osmo\+\_\+ss7\+\_\+instance\+::pc\+\_\+fmt}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::rtable}, and \textbf{ u32\+\_\+masklen()}.



Referenced by \textbf{ vty\+\_\+dump\+\_\+rtable()}.

\mbox{\label{osmo__ss7__route_8c_ae40a7c0d3c3310101a0cc8c0d51770d2}} 
\index{osmo\_ss7\_route.c@{osmo\_ss7\_route.c}!ss7\_route\_alloc@{ss7\_route\_alloc}}
\index{ss7\_route\_alloc@{ss7\_route\_alloc}!osmo\_ss7\_route.c@{osmo\_ss7\_route.c}}
\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{ NULL}, \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{osmo__ss7__route_8c_a5a18ce14ff4a7ed501c5621fe647bbff}} 
\index{osmo\_ss7\_route.c@{osmo\_ss7\_route.c}!ss7\_route\_create@{ss7\_route\_create}}
\index{ss7\_route\_create@{ss7\_route\_create}!osmo\_ss7\_route.c@{osmo\_ss7\_route.c}}
\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{ NULL}, \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{osmo__ss7__route_8c_a6ce127d1c6de224f5a6297f68fba4cfc}} 
\index{osmo\_ss7\_route.c@{osmo\_ss7\_route.c}!ss7\_route\_destroy@{ss7\_route\_destroy}}
\index{ss7\_route\_destroy@{ss7\_route\_destroy}!osmo\_ss7\_route.c@{osmo\_ss7\_route.c}}
\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{ LOGSS7}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::mask}, \textbf{ osmo\+\_\+ss7\+\_\+pointcode\+\_\+print()}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::pc}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::rtable}, \textbf{ ss7\+\_\+combined\+\_\+linkset\+\_\+del\+\_\+route()}, \textbf{ ss7\+\_\+initialized}, and \textbf{ ss7\+\_\+route\+\_\+inserted()}.



Referenced by \textbf{ \+\_\+rout\+\_\+key()}, \textbf{ DEFUN\+\_\+\+ATTR()}, \textbf{ handle\+\_\+rkey\+\_\+dereg()}, \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{osmo__ss7__route_8c_acf75f3605c463d7c4cef4e73257194ab}} 
\index{osmo\_ss7\_route.c@{osmo\_ss7\_route.c}!ss7\_route\_insert@{ss7\_route\_insert}}
\index{ss7\_route\_insert@{ss7\_route\_insert}!osmo\_ss7\_route.c@{osmo\_ss7\_route.c}}
\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\+::clset}, \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\+::priority}, \textbf{ osmo\+\_\+ss7\+\_\+combined\+\_\+linkset\+::routes}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::rtable}, \textbf{ ss7\+\_\+combined\+\_\+linkset\+\_\+add\+\_\+route()}, \textbf{ ss7\+\_\+combined\+\_\+linkset\+\_\+alloc()}, \textbf{ ss7\+\_\+route\+\_\+inserted()}, and \textbf{ ss7\+\_\+route\+\_\+table\+\_\+find\+\_\+combined\+\_\+linkset()}.



Referenced by \textbf{ DEFUN\+\_\+\+ATTR()}, and \textbf{ ss7\+\_\+route\+\_\+create()}.

\mbox{\label{osmo__ss7__route_8c_a0f69f1d1840acfa1f107e2d289289d9b}} 
\index{osmo\_ss7\_route.c@{osmo\_ss7\_route.c}!ss7\_route\_inserted@{ss7\_route\_inserted}}
\index{ss7\_route\_inserted@{ss7\_route\_inserted}!osmo\_ss7\_route.c@{osmo\_ss7\_route.c}}
\doxysubsubsection{ss7\_route\_inserted()}
{\footnotesize\ttfamily static bool ss7\+\_\+route\+\_\+inserted (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$}]{rt }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Check whether route has already been inserted into its routing table. 

\begin{DoxyReturn}{Returns}
true if already inserted, false if not. 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+ss7\+\_\+route\+::list}.



Referenced by \textbf{ ss7\+\_\+route\+\_\+destroy()}, \textbf{ ss7\+\_\+route\+\_\+insert()}, and \textbf{ ss7\+\_\+route\+\_\+set\+\_\+linkset()}.

\mbox{\label{osmo__ss7__route_8c_adea2871496432ff17d7e980d0011e952}} 
\index{osmo\_ss7\_route.c@{osmo\_ss7\_route.c}!ss7\_route\_is\_available@{ss7\_route\_is\_available}}
\index{ss7\_route\_is\_available@{ss7\_route\_is\_available}!osmo\_ss7\_route.c@{osmo\_ss7\_route.c}}
\doxysubsubsection{ss7\_route\_is\_available()}
{\footnotesize\ttfamily bool ss7\+\_\+route\+\_\+is\+\_\+available (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$}]{rt }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+ss7\+\_\+route\+::as}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::dest}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::linkset}, \textbf{ osmo\+\_\+ss7\+\_\+as\+\_\+active()}, and \textbf{ ss7\+\_\+linkset\+\_\+is\+\_\+available()}.



Referenced by \textbf{ current\+\_\+rt()}, \textbf{ DEFUN()}, \textbf{ ss7\+\_\+combined\+\_\+linkset\+\_\+lookup\+\_\+route()}, \textbf{ ss7\+\_\+combined\+\_\+linkset\+\_\+select\+\_\+route\+\_\+roundrobin()}, and \textbf{ vty\+\_\+dump\+\_\+rtable()}.

\mbox{\label{osmo__ss7__route_8c_a46ccd2320c3e917d0e9bef6b90e78601}} 
\index{osmo\_ss7\_route.c@{osmo\_ss7\_route.c}!ss7\_route\_set\_linkset@{ss7\_route\_set\_linkset}}
\index{ss7\_route\_set\_linkset@{ss7\_route\_set\_linkset}!osmo\_ss7\_route.c@{osmo\_ss7\_route.c}}
\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{ NULL}, \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()}.

\mbox{\label{osmo__ss7__route_8c_a70c376cdc3ffe5d124ae90fd86f9c491}} 
\index{osmo\_ss7\_route.c@{osmo\_ss7\_route.c}!u32\_masklen@{u32\_masklen}}
\index{u32\_masklen@{u32\_masklen}!osmo\_ss7\_route.c@{osmo\_ss7\_route.c}}
\doxysubsubsection{u32\_masklen()}
{\footnotesize\ttfamily static int u32\+\_\+masklen (\begin{DoxyParamCaption}\item[{uint32\+\_\+t}]{mask,  }\item[{unsigned int}]{nbits }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ count\+\_\+leading\+\_\+one\+\_\+bits()}.



Referenced by \textbf{ osmo\+\_\+ss7\+\_\+route\+\_\+print()}.

