\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\+\_\+linkset.\+h\char`\"{}}\newline {\ttfamily \#include \char`\"{}ss7\+\_\+as.\+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*{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 static void \textbf{ route\+\_\+insert\+\_\+sorted} (struct \textbf{ osmo\+\_\+ss7\+\_\+route\+\_\+table} $\ast$rtbl, struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$cmp) \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 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}\end{DoxyCompactItemize} \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. References \textbf{ dpc}, \textbf{ osmo\+\_\+ss7\+\_\+instance\+::rtable\+\_\+system}, \textbf{ ss7\+\_\+initialized}, and \textbf{ ss7\+\_\+route\+\_\+table\+\_\+find\+\_\+route\+\_\+by\+\_\+dpc()}. Referenced by \textbf{ gen\+\_\+mtp\+\_\+transfer\+\_\+req\+\_\+xua()}, \textbf{ hmrt\+\_\+message\+\_\+for\+\_\+routing()}, and \textbf{ xua\+\_\+snm\+\_\+rx\+\_\+daud()}. \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_ad0a6fd14ffd12426244051823c5af2d2}} \index{osmo\_ss7\_route.c@{osmo\_ss7\_route.c}!route\_insert\_sorted@{route\_insert\_sorted}} \index{route\_insert\_sorted@{route\_insert\_sorted}!osmo\_ss7\_route.c@{osmo\_ss7\_route.c}} \doxysubsubsection{route\_insert\_sorted()} {\footnotesize\ttfamily static void route\+\_\+insert\+\_\+sorted (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+route\+\_\+table} $\ast$}]{rtbl, }\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+route} $\ast$}]{cmp }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}} References \textbf{ osmo\+\_\+ss7\+\_\+route\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::list}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::mask}, \textbf{ osmo\+\_\+ss7\+\_\+route\+::priority}, and \textbf{ osmo\+\_\+ss7\+\_\+route\+\_\+table\+::routes}. Referenced by \textbf{ ss7\+\_\+route\+\_\+insert()}. \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{ 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{ 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{ 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{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\+\_\+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{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_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{ 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()}.