\doxysection{Ipa}
\label{group__ipa}\index{Ipa@{Ipa}}


IPA Multiplex utility routines.  


\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ IPA\+\_\+\+ALLOC\+\_\+\+SIZE}~1200
\item 
\#define \textbf{ IPA\+\_\+\+STRING\+\_\+\+MAX}~64
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
const char $\ast$ \textbf{ ipa\+\_\+ccm\+\_\+idtag\+\_\+name} (uint8\+\_\+t tag)
\item 
int \textbf{ ipa\+\_\+ccm\+\_\+idtag\+\_\+parse} (struct \textbf{ tlv\+\_\+parsed} $\ast$dec, unsigned char $\ast$buf, int \textbf{ len})
\begin{DoxyCompactList}\small\item\em Parse the payload part of an IPA CCM ID GET, return \doxyref{tlv\+\_\+parsed}{p.}{structtlv__parsed} format. \end{DoxyCompactList}\item 
int \textbf{ ipa\+\_\+ccm\+\_\+idtag\+\_\+parse\+\_\+off} (struct \textbf{ tlv\+\_\+parsed} $\ast$dec, unsigned char $\ast$buf, int \textbf{ len}, const int len\+\_\+offset)
\begin{DoxyCompactList}\small\item\em Parse the payload part of an IPA CCM ID GET, return \doxyref{tlv\+\_\+parsed}{p.}{structtlv__parsed} format. \end{DoxyCompactList}\item 
int \textbf{ ipa\+\_\+ccm\+\_\+id\+\_\+get\+\_\+parse} (struct \textbf{ tlv\+\_\+parsed} $\ast$dec, const uint8\+\_\+t $\ast$buf, unsigned int \textbf{ len})
\begin{DoxyCompactList}\small\item\em Parse the payload part of an IPA CCM ID GET, return \doxyref{tlv\+\_\+parsed}{p.}{structtlv__parsed} format. \end{DoxyCompactList}\item 
int \textbf{ ipa\+\_\+ccm\+\_\+id\+\_\+resp\+\_\+parse} (struct \textbf{ tlv\+\_\+parsed} $\ast$dec, const uint8\+\_\+t $\ast$buf, unsigned int \textbf{ len})
\begin{DoxyCompactList}\small\item\em Parse the payload part of an IPA CCM ID RESP, return \doxyref{tlv\+\_\+parsed}{p.}{structtlv__parsed} format. \end{DoxyCompactList}\item 
int \textbf{ ipa\+\_\+parse\+\_\+unitid} (const char $\ast$str, struct \textbf{ ipaccess\+\_\+unit} $\ast$unit\+\_\+data)
\item 
int \textbf{ ipa\+\_\+ccm\+\_\+tlv\+\_\+to\+\_\+unitdata} (struct \textbf{ ipaccess\+\_\+unit} $\ast$ud, const struct \textbf{ tlv\+\_\+parsed} $\ast$tp)
\begin{DoxyCompactList}\small\item\em Fill ud struct from tp structure. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ ipa\+\_\+ccm\+\_\+make\+\_\+id\+\_\+resp} (const struct \textbf{ ipaccess\+\_\+unit} $\ast$dev, const uint8\+\_\+t $\ast$ies\+\_\+req, unsigned int num\+\_\+ies\+\_\+req)
\begin{DoxyCompactList}\small\item\em Generate IPA CCM ID RESP based on list of IEs. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ ipa\+\_\+ccm\+\_\+make\+\_\+id\+\_\+resp\+\_\+from\+\_\+req} (const struct \textbf{ ipaccess\+\_\+unit} $\ast$dev, const uint8\+\_\+t $\ast$\textbf{ data}, unsigned int \textbf{ len})
\begin{DoxyCompactList}\small\item\em Generate IPA CCM ID RESP based on requets payload. \end{DoxyCompactList}\item 
int \textbf{ ipa\+\_\+send} (int \textbf{ fd}, const void $\ast$\textbf{ msg}, size\+\_\+t msglen)
\item 
int \textbf{ ipa\+\_\+ccm\+\_\+send\+\_\+pong} (int \textbf{ fd})
\item 
int \textbf{ ipa\+\_\+ccm\+\_\+send\+\_\+id\+\_\+ack} (int \textbf{ fd})
\item 
int \textbf{ ipa\+\_\+ccm\+\_\+send\+\_\+id\+\_\+req} (int \textbf{ fd})
\item 
int \textbf{ ipa\+\_\+ccm\+\_\+rcvmsg\+\_\+base} (struct \textbf{ msgb} $\ast$\textbf{ msg}, struct \textbf{ osmo\+\_\+fd} $\ast$bfd)
\item 
int \textbf{ ipa\+\_\+ccm\+\_\+rcvmsg\+\_\+bts\+\_\+base} (struct \textbf{ msgb} $\ast$\textbf{ msg}, struct \textbf{ osmo\+\_\+fd} $\ast$bfd)
\item 
void \textbf{ ipa\+\_\+prepend\+\_\+header\+\_\+ext} (struct \textbf{ msgb} $\ast$\textbf{ msg}, int \textbf{ proto})
\item 
void \textbf{ ipa\+\_\+prepend\+\_\+header} (struct \textbf{ msgb} $\ast$\textbf{ msg}, int \textbf{ proto})
\item 
struct \textbf{ msgb} $\ast$ \textbf{ ipa\+\_\+msg\+\_\+alloc} (int headroom)
\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
static const uint8\+\_\+t \textbf{ ipa\+\_\+pong\+\_\+msg} [$\,$]
\item 
static const uint8\+\_\+t \textbf{ ipa\+\_\+id\+\_\+ack\+\_\+msg} [$\,$]
\item 
static const uint8\+\_\+t \textbf{ ipa\+\_\+id\+\_\+req\+\_\+msg} [$\,$]
\item 
static const char $\ast$ \textbf{ idtag\+\_\+names} [$\,$]
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
IPA Multiplex utility routines. 



\doxysubsection{Macro Definition Documentation}
\mbox{\label{group__ipa_gaed6073c57651735b7ea4ab4d0a043cb4}} 
\index{Ipa@{Ipa}!IPA\_ALLOC\_SIZE@{IPA\_ALLOC\_SIZE}}
\index{IPA\_ALLOC\_SIZE@{IPA\_ALLOC\_SIZE}!Ipa@{Ipa}}
\doxysubsubsection{IPA\_ALLOC\_SIZE}
{\footnotesize\ttfamily \#define IPA\+\_\+\+ALLOC\+\_\+\+SIZE~1200}

\mbox{\label{group__ipa_gaf64e614303414077b71c4d937f51c45a}} 
\index{Ipa@{Ipa}!IPA\_STRING\_MAX@{IPA\_STRING\_MAX}}
\index{IPA\_STRING\_MAX@{IPA\_STRING\_MAX}!Ipa@{Ipa}}
\doxysubsubsection{IPA\_STRING\_MAX}
{\footnotesize\ttfamily \#define IPA\+\_\+\+STRING\+\_\+\+MAX~64}



\doxysubsection{Function Documentation}
\mbox{\label{group__ipa_ga0133c9aa4535b873ec570a97e1dddf91}} 
\index{Ipa@{Ipa}!ipa\_ccm\_id\_get\_parse@{ipa\_ccm\_id\_get\_parse}}
\index{ipa\_ccm\_id\_get\_parse@{ipa\_ccm\_id\_get\_parse}!Ipa@{Ipa}}
\doxysubsubsection{ipa\_ccm\_id\_get\_parse()}
{\footnotesize\ttfamily int ipa\+\_\+ccm\+\_\+id\+\_\+get\+\_\+parse (\begin{DoxyParamCaption}\item[{struct \textbf{ tlv\+\_\+parsed} $\ast$}]{dec,  }\item[{const uint8\+\_\+t $\ast$}]{buf,  }\item[{unsigned int}]{len }\end{DoxyParamCaption})}



Parse the payload part of an IPA CCM ID GET, return \doxyref{tlv\+\_\+parsed}{p.}{structtlv__parsed} format. 

The odd payload format of those messages is structured as follows\+:
\begin{DoxyItemize}
\item 8bit length value (length of payload {\itshape and tag})
\item 8bit tag value
\item optional, variable-\/length payload 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em dec} & Caller-\/provided/allocated output structure for parsed payload \\
\hline
\mbox{\texttt{ in}}  & {\em buf} & Buffer containing the payload (excluding 1 byte msg\+\_\+type) of the message \\
\hline
\mbox{\texttt{ in}}  & {\em len} & Length of {\itshape buf} in octets \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative on error 
\end{DoxyReturn}

\end{DoxyItemize}

References \textbf{ DLMI}, \textbf{ ipa\+\_\+ccm\+\_\+idtag\+\_\+name()}, \textbf{ len}, \textbf{ tlv\+\_\+p\+\_\+entry\+::len}, \textbf{ LOGL\+\_\+\+DEBUG}, \textbf{ LOGL\+\_\+\+ERROR}, \textbf{ LOGP}, \textbf{ LOGPC}, \textbf{ tlv\+\_\+parsed\+::lv}, and \textbf{ tlv\+\_\+p\+\_\+entry\+::val}.

\mbox{\label{group__ipa_gab9bb141300b3d0ecdcfb8e938a1ec40b}} 
\index{Ipa@{Ipa}!ipa\_ccm\_id\_resp\_parse@{ipa\_ccm\_id\_resp\_parse}}
\index{ipa\_ccm\_id\_resp\_parse@{ipa\_ccm\_id\_resp\_parse}!Ipa@{Ipa}}
\doxysubsubsection{ipa\_ccm\_id\_resp\_parse()}
{\footnotesize\ttfamily int ipa\+\_\+ccm\+\_\+id\+\_\+resp\+\_\+parse (\begin{DoxyParamCaption}\item[{struct \textbf{ tlv\+\_\+parsed} $\ast$}]{dec,  }\item[{const uint8\+\_\+t $\ast$}]{buf,  }\item[{unsigned int}]{len }\end{DoxyParamCaption})}



Parse the payload part of an IPA CCM ID RESP, return \doxyref{tlv\+\_\+parsed}{p.}{structtlv__parsed} format. 

The odd payload format of those messages is structured as follows\+:
\begin{DoxyItemize}
\item 16bit length value (length of payload {\itshape and tag})
\item 8bit tag value
\item optional, variable-\/length payload 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em dec} & Caller-\/provided/allocated output structure for parsed payload \\
\hline
\mbox{\texttt{ in}}  & {\em buf} & Buffer containing the payload (excluding 1 byte msg\+\_\+type) of the message \\
\hline
\mbox{\texttt{ in}}  & {\em len} & Length of {\itshape buf} in octets \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative on error 
\end{DoxyReturn}

\end{DoxyItemize}

References \textbf{ DEBUGPC}, \textbf{ DLMI}, \textbf{ ipa\+\_\+ccm\+\_\+idtag\+\_\+name()}, \textbf{ len}, \textbf{ tlv\+\_\+p\+\_\+entry\+::len}, \textbf{ LOGL\+\_\+\+DEBUG}, \textbf{ LOGL\+\_\+\+ERROR}, \textbf{ LOGP}, \textbf{ LOGPC}, \textbf{ tlv\+\_\+parsed\+::lv}, and \textbf{ tlv\+\_\+p\+\_\+entry\+::val}.

\mbox{\label{group__ipa_ga30925204903de3e92e1ac19b7542320b}} 
\index{Ipa@{Ipa}!ipa\_ccm\_idtag\_name@{ipa\_ccm\_idtag\_name}}
\index{ipa\_ccm\_idtag\_name@{ipa\_ccm\_idtag\_name}!Ipa@{Ipa}}
\doxysubsubsection{ipa\_ccm\_idtag\_name()}
{\footnotesize\ttfamily const char $\ast$ ipa\+\_\+ccm\+\_\+idtag\+\_\+name (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{tag }\end{DoxyParamCaption})}



References \textbf{ ARRAY\+\_\+\+SIZE}, and \textbf{ idtag\+\_\+names}.



Referenced by \textbf{ ipa\+\_\+ccm\+\_\+id\+\_\+get\+\_\+parse()}, \textbf{ ipa\+\_\+ccm\+\_\+id\+\_\+resp\+\_\+parse()}, and \textbf{ ipa\+\_\+ccm\+\_\+idtag\+\_\+parse\+\_\+off()}.

\mbox{\label{group__ipa_gac4f74ce195e8959912c34f9cf3294132}} 
\index{Ipa@{Ipa}!ipa\_ccm\_idtag\_parse@{ipa\_ccm\_idtag\_parse}}
\index{ipa\_ccm\_idtag\_parse@{ipa\_ccm\_idtag\_parse}!Ipa@{Ipa}}
\doxysubsubsection{ipa\_ccm\_idtag\_parse()}
{\footnotesize\ttfamily int ipa\+\_\+ccm\+\_\+idtag\+\_\+parse (\begin{DoxyParamCaption}\item[{struct \textbf{ tlv\+\_\+parsed} $\ast$}]{dec,  }\item[{unsigned char $\ast$}]{buf,  }\item[{int}]{len }\end{DoxyParamCaption})}



Parse the payload part of an IPA CCM ID GET, return \doxyref{tlv\+\_\+parsed}{p.}{structtlv__parsed} format. 



References \textbf{ ipa\+\_\+ccm\+\_\+idtag\+\_\+parse\+\_\+off()}, and \textbf{ len}.

\mbox{\label{group__ipa_gaadc2384f1a6507fdba8721bf7227527f}} 
\index{Ipa@{Ipa}!ipa\_ccm\_idtag\_parse\_off@{ipa\_ccm\_idtag\_parse\_off}}
\index{ipa\_ccm\_idtag\_parse\_off@{ipa\_ccm\_idtag\_parse\_off}!Ipa@{Ipa}}
\doxysubsubsection{ipa\_ccm\_idtag\_parse\_off()}
{\footnotesize\ttfamily int ipa\+\_\+ccm\+\_\+idtag\+\_\+parse\+\_\+off (\begin{DoxyParamCaption}\item[{struct \textbf{ tlv\+\_\+parsed} $\ast$}]{dec,  }\item[{unsigned char $\ast$}]{buf,  }\item[{int}]{len,  }\item[{const int}]{len\+\_\+offset }\end{DoxyParamCaption})}



Parse the payload part of an IPA CCM ID GET, return \doxyref{tlv\+\_\+parsed}{p.}{structtlv__parsed} format. 

WARNING\+: This function can only parse correctly IPA CCM ID GET/\+REQUEST messages, and only when len\+\_\+offset is passed value of 1. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em dec} & Caller-\/provided/allocated output structure for parsed payload \\
\hline
\mbox{\texttt{ in}}  & {\em buf} & Buffer containing the payload (excluding 1 byte msg\+\_\+type) of the message \\
\hline
\mbox{\texttt{ in}}  & {\em len} & Length of {\itshape buf} in octets \\
\hline
\mbox{\texttt{ in}}  & {\em len\+\_\+offset} & Offset from end of len field to start of value (ommiting tag). Must be 1! \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative on error 
\end{DoxyReturn}


References \textbf{ DLMI}, \textbf{ ipa\+\_\+ccm\+\_\+idtag\+\_\+name()}, \textbf{ len}, \textbf{ tlv\+\_\+p\+\_\+entry\+::len}, \textbf{ LOGL\+\_\+\+DEBUG}, \textbf{ LOGL\+\_\+\+ERROR}, \textbf{ LOGP}, \textbf{ LOGPC}, \textbf{ tlv\+\_\+parsed\+::lv}, and \textbf{ tlv\+\_\+p\+\_\+entry\+::val}.



Referenced by \textbf{ ipa\+\_\+ccm\+\_\+idtag\+\_\+parse()}.

\mbox{\label{group__ipa_ga1146f83f73c07ab7abedf57a5029d7ea}} 
\index{Ipa@{Ipa}!ipa\_ccm\_make\_id\_resp@{ipa\_ccm\_make\_id\_resp}}
\index{ipa\_ccm\_make\_id\_resp@{ipa\_ccm\_make\_id\_resp}!Ipa@{Ipa}}
\doxysubsubsection{ipa\_ccm\_make\_id\_resp()}
{\footnotesize\ttfamily struct \textbf{ msgb} $\ast$ ipa\+\_\+ccm\+\_\+make\+\_\+id\+\_\+resp (\begin{DoxyParamCaption}\item[{const struct \textbf{ ipaccess\+\_\+unit} $\ast$}]{dev,  }\item[{const uint8\+\_\+t $\ast$}]{ies\+\_\+req,  }\item[{unsigned int}]{num\+\_\+ies\+\_\+req }\end{DoxyParamCaption})}



Generate IPA CCM ID RESP based on list of IEs. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em dev} & Descriptor describing identity data for response \\
\hline
\mbox{\texttt{ in}}  & {\em ies\+\_\+req} & List of IEIs to include in response \\
\hline
\mbox{\texttt{ in}}  & {\em num\+\_\+ies\+\_\+req} & Number of IEIs in {\itshape ies\+\_\+req} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Message buffer with IPA CCM ID RESP 
\end{DoxyReturn}


References \textbf{ ipaccess\+\_\+unit\+::bts\+\_\+id}, \textbf{ DLINP}, \textbf{ ipaccess\+\_\+unit\+::equipvers}, \textbf{ ipa\+\_\+msg\+\_\+alloc()}, \textbf{ ipa\+\_\+prepend\+\_\+header()}, \textbf{ IPA\+\_\+\+STRING\+\_\+\+MAX}, \textbf{ IPAC\+\_\+\+IDTAG\+\_\+\+EQUIPVERS}, \textbf{ IPAC\+\_\+\+IDTAG\+\_\+\+LOCATION1}, \textbf{ IPAC\+\_\+\+IDTAG\+\_\+\+LOCATION2}, \textbf{ IPAC\+\_\+\+IDTAG\+\_\+\+MACADDR}, \textbf{ IPAC\+\_\+\+IDTAG\+\_\+\+SERNR}, \textbf{ IPAC\+\_\+\+IDTAG\+\_\+\+SWVERSION}, \textbf{ IPAC\+\_\+\+IDTAG\+\_\+\+UNIT}, \textbf{ IPAC\+\_\+\+IDTAG\+\_\+\+UNITNAME}, \textbf{ IPAC\+\_\+\+MSGT\+\_\+\+ID\+\_\+\+RESP}, \textbf{ IPAC\+\_\+\+PROTO\+\_\+\+IPACCESS}, \textbf{ ipaccess\+\_\+unit\+::location1}, \textbf{ ipaccess\+\_\+unit\+::location2}, \textbf{ LOGL\+\_\+\+INFO}, \textbf{ LOGL\+\_\+\+NOTICE}, \textbf{ LOGP}, \textbf{ ipaccess\+\_\+unit\+::mac\+\_\+addr}, \textbf{ msg}, \textbf{ msgb\+\_\+free()}, \textbf{ msgb\+\_\+put()}, \textbf{ osmo\+\_\+strlcpy()}, \textbf{ ipaccess\+\_\+unit\+::serno}, \textbf{ ipaccess\+\_\+unit\+::site\+\_\+id}, \textbf{ ipaccess\+\_\+unit\+::swversion}, \textbf{ ipaccess\+\_\+unit\+::trx\+\_\+id}, and \textbf{ ipaccess\+\_\+unit\+::unit\+\_\+name}.



Referenced by \textbf{ ipa\+\_\+ccm\+\_\+make\+\_\+id\+\_\+resp\+\_\+from\+\_\+req()}.

\mbox{\label{group__ipa_ga39c8386a7d4d40c51734855401e4c664}} 
\index{Ipa@{Ipa}!ipa\_ccm\_make\_id\_resp\_from\_req@{ipa\_ccm\_make\_id\_resp\_from\_req}}
\index{ipa\_ccm\_make\_id\_resp\_from\_req@{ipa\_ccm\_make\_id\_resp\_from\_req}!Ipa@{Ipa}}
\doxysubsubsection{ipa\_ccm\_make\_id\_resp\_from\_req()}
{\footnotesize\ttfamily struct \textbf{ msgb} $\ast$ ipa\+\_\+ccm\+\_\+make\+\_\+id\+\_\+resp\+\_\+from\+\_\+req (\begin{DoxyParamCaption}\item[{const struct \textbf{ ipaccess\+\_\+unit} $\ast$}]{dev,  }\item[{const uint8\+\_\+t $\ast$}]{data,  }\item[{unsigned int}]{len }\end{DoxyParamCaption})}



Generate IPA CCM ID RESP based on requets payload. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em dev} & Descriptor describing identity data for response \\
\hline
\mbox{\texttt{ in}}  & {\em data} & Payload of the IPA CCM ID GET request \\
\hline
\mbox{\texttt{ in}}  & {\em len} & Length of {\itshape data} in octets \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Message buffer with IPA CCM ID RESP 
\end{DoxyReturn}


References \textbf{ data}, \textbf{ DLINP}, \textbf{ ipa\+\_\+ccm\+\_\+make\+\_\+id\+\_\+resp()}, \textbf{ len}, \textbf{ LOGL\+\_\+\+ERROR}, and \textbf{ LOGP}.

\mbox{\label{group__ipa_ga40990af43271278e728aa1130a99cb61}} 
\index{Ipa@{Ipa}!ipa\_ccm\_rcvmsg\_base@{ipa\_ccm\_rcvmsg\_base}}
\index{ipa\_ccm\_rcvmsg\_base@{ipa\_ccm\_rcvmsg\_base}!Ipa@{Ipa}}
\doxysubsubsection{ipa\_ccm\_rcvmsg\_base()}
{\footnotesize\ttfamily int ipa\+\_\+ccm\+\_\+rcvmsg\+\_\+base (\begin{DoxyParamCaption}\item[{struct \textbf{ msgb} $\ast$}]{msg,  }\item[{struct \textbf{ osmo\+\_\+fd} $\ast$}]{bfd }\end{DoxyParamCaption})}



References \textbf{ DEBUGP}, \textbf{ DLINP}, \textbf{ DLMI}, \textbf{ osmo\+\_\+fd\+::fd}, \textbf{ ipa\+\_\+ccm\+\_\+send\+\_\+id\+\_\+ack()}, \textbf{ ipa\+\_\+ccm\+\_\+send\+\_\+pong()}, \textbf{ IPAC\+\_\+\+MSGT\+\_\+\+ID\+\_\+\+ACK}, \textbf{ IPAC\+\_\+\+MSGT\+\_\+\+PING}, \textbf{ IPAC\+\_\+\+MSGT\+\_\+\+PONG}, \textbf{ LOGL\+\_\+\+ERROR}, \textbf{ LOGP}, \textbf{ msg}, and \textbf{ msg\+\_\+type}.

\mbox{\label{group__ipa_gae0471f92d28a0675059c89a64807e530}} 
\index{Ipa@{Ipa}!ipa\_ccm\_rcvmsg\_bts\_base@{ipa\_ccm\_rcvmsg\_bts\_base}}
\index{ipa\_ccm\_rcvmsg\_bts\_base@{ipa\_ccm\_rcvmsg\_bts\_base}!Ipa@{Ipa}}
\doxysubsubsection{ipa\_ccm\_rcvmsg\_bts\_base()}
{\footnotesize\ttfamily int ipa\+\_\+ccm\+\_\+rcvmsg\+\_\+bts\+\_\+base (\begin{DoxyParamCaption}\item[{struct \textbf{ msgb} $\ast$}]{msg,  }\item[{struct \textbf{ osmo\+\_\+fd} $\ast$}]{bfd }\end{DoxyParamCaption})}



References \textbf{ DEBUGP}, \textbf{ DLINP}, \textbf{ DLMI}, \textbf{ osmo\+\_\+fd\+::fd}, \textbf{ ipa\+\_\+ccm\+\_\+send\+\_\+pong()}, \textbf{ IPAC\+\_\+\+MSGT\+\_\+\+ID\+\_\+\+ACK}, \textbf{ IPAC\+\_\+\+MSGT\+\_\+\+PING}, \textbf{ IPAC\+\_\+\+MSGT\+\_\+\+PONG}, \textbf{ LOGL\+\_\+\+ERROR}, \textbf{ LOGP}, \textbf{ msg}, and \textbf{ msg\+\_\+type}.

\mbox{\label{group__ipa_ga1ff8e415a818895841135c7f0af2747b}} 
\index{Ipa@{Ipa}!ipa\_ccm\_send\_id\_ack@{ipa\_ccm\_send\_id\_ack}}
\index{ipa\_ccm\_send\_id\_ack@{ipa\_ccm\_send\_id\_ack}!Ipa@{Ipa}}
\doxysubsubsection{ipa\_ccm\_send\_id\_ack()}
{\footnotesize\ttfamily int ipa\+\_\+ccm\+\_\+send\+\_\+id\+\_\+ack (\begin{DoxyParamCaption}\item[{int}]{fd }\end{DoxyParamCaption})}



References \textbf{ fd}, \textbf{ ipa\+\_\+id\+\_\+ack\+\_\+msg}, and \textbf{ ipa\+\_\+send()}.



Referenced by \textbf{ ipa\+\_\+ccm\+\_\+rcvmsg\+\_\+base()}.

\mbox{\label{group__ipa_gac086626686b3c4d7878cc22f6447be0f}} 
\index{Ipa@{Ipa}!ipa\_ccm\_send\_id\_req@{ipa\_ccm\_send\_id\_req}}
\index{ipa\_ccm\_send\_id\_req@{ipa\_ccm\_send\_id\_req}!Ipa@{Ipa}}
\doxysubsubsection{ipa\_ccm\_send\_id\_req()}
{\footnotesize\ttfamily int ipa\+\_\+ccm\+\_\+send\+\_\+id\+\_\+req (\begin{DoxyParamCaption}\item[{int}]{fd }\end{DoxyParamCaption})}



References \textbf{ fd}, \textbf{ ipa\+\_\+id\+\_\+req\+\_\+msg}, and \textbf{ ipa\+\_\+send()}.

\mbox{\label{group__ipa_ga1017bde59cde1cea88415139a35266d1}} 
\index{Ipa@{Ipa}!ipa\_ccm\_send\_pong@{ipa\_ccm\_send\_pong}}
\index{ipa\_ccm\_send\_pong@{ipa\_ccm\_send\_pong}!Ipa@{Ipa}}
\doxysubsubsection{ipa\_ccm\_send\_pong()}
{\footnotesize\ttfamily int ipa\+\_\+ccm\+\_\+send\+\_\+pong (\begin{DoxyParamCaption}\item[{int}]{fd }\end{DoxyParamCaption})}



References \textbf{ fd}, \textbf{ ipa\+\_\+pong\+\_\+msg}, and \textbf{ ipa\+\_\+send()}.



Referenced by \textbf{ ipa\+\_\+ccm\+\_\+rcvmsg\+\_\+base()}, and \textbf{ ipa\+\_\+ccm\+\_\+rcvmsg\+\_\+bts\+\_\+base()}.

\mbox{\label{group__ipa_gabee7e74d00086e92af84938bd6e0d95e}} 
\index{Ipa@{Ipa}!ipa\_ccm\_tlv\_to\_unitdata@{ipa\_ccm\_tlv\_to\_unitdata}}
\index{ipa\_ccm\_tlv\_to\_unitdata@{ipa\_ccm\_tlv\_to\_unitdata}!Ipa@{Ipa}}
\doxysubsubsection{ipa\_ccm\_tlv\_to\_unitdata()}
{\footnotesize\ttfamily int ipa\+\_\+ccm\+\_\+tlv\+\_\+to\+\_\+unitdata (\begin{DoxyParamCaption}\item[{struct \textbf{ ipaccess\+\_\+unit} $\ast$}]{ud,  }\item[{const struct \textbf{ tlv\+\_\+parsed} $\ast$}]{tp }\end{DoxyParamCaption})}



Fill ud struct from tp structure. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em ud} & \doxyref{ipaccess\+\_\+unit}{p.}{structipaccess__unit} to fill \\
\hline
\mbox{\texttt{ in}}  & {\em tp} & the decoded TLV structure from eg. ID\+\_\+\+RESP message \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
zero on success, negative on error
\end{DoxyReturn}
This function expects parameter ud\textquotesingle{}s fields to be initialized to zero if not yet set. Existing incoming string pointer fields are expected to be allocated using talloc and will be deallocated as such if replaced with the content of tp. 

References \textbf{ ipaccess\+\_\+unit\+::equipvers}, \textbf{ ipa\+\_\+parse\+\_\+unitid()}, \textbf{ IPAC\+\_\+\+IDTAG\+\_\+\+EQUIPVERS}, \textbf{ IPAC\+\_\+\+IDTAG\+\_\+\+LOCATION1}, \textbf{ IPAC\+\_\+\+IDTAG\+\_\+\+LOCATION2}, \textbf{ IPAC\+\_\+\+IDTAG\+\_\+\+MACADDR}, \textbf{ IPAC\+\_\+\+IDTAG\+\_\+\+SERNR}, \textbf{ IPAC\+\_\+\+IDTAG\+\_\+\+SWVERSION}, \textbf{ IPAC\+\_\+\+IDTAG\+\_\+\+UNIT}, \textbf{ IPAC\+\_\+\+IDTAG\+\_\+\+UNITNAME}, \textbf{ ipaccess\+\_\+unit\+::location1}, \textbf{ ipaccess\+\_\+unit\+::location2}, \textbf{ ipaccess\+\_\+unit\+::mac\+\_\+addr}, \textbf{ osmo\+\_\+macaddr\+\_\+parse()}, \textbf{ osmo\+\_\+talloc\+\_\+replace\+\_\+string()}, \textbf{ ipaccess\+\_\+unit\+::serno}, \textbf{ ipaccess\+\_\+unit\+::swversion}, \textbf{ TLVP\+\_\+\+PRES\+\_\+\+LEN}, \textbf{ TLVP\+\_\+\+VAL}, and \textbf{ ipaccess\+\_\+unit\+::unit\+\_\+name}.

\mbox{\label{group__ipa_ga28dae9512716808a69d7182b588a2f72}} 
\index{Ipa@{Ipa}!ipa\_msg\_alloc@{ipa\_msg\_alloc}}
\index{ipa\_msg\_alloc@{ipa\_msg\_alloc}!Ipa@{Ipa}}
\doxysubsubsection{ipa\_msg\_alloc()}
{\footnotesize\ttfamily struct \textbf{ msgb} $\ast$ ipa\+\_\+msg\+\_\+alloc (\begin{DoxyParamCaption}\item[{int}]{headroom }\end{DoxyParamCaption})}



References \textbf{ msgb\+\_\+alloc\+\_\+headroom()}.



Referenced by \textbf{ ipa\+\_\+ccm\+\_\+make\+\_\+id\+\_\+resp()}.

\mbox{\label{group__ipa_ga809b00900ab023be996f934ec557b3fb}} 
\index{Ipa@{Ipa}!ipa\_parse\_unitid@{ipa\_parse\_unitid}}
\index{ipa\_parse\_unitid@{ipa\_parse\_unitid}!Ipa@{Ipa}}
\doxysubsubsection{ipa\_parse\_unitid()}
{\footnotesize\ttfamily int ipa\+\_\+parse\+\_\+unitid (\begin{DoxyParamCaption}\item[{const char $\ast$}]{str,  }\item[{struct \textbf{ ipaccess\+\_\+unit} $\ast$}]{unit\+\_\+data }\end{DoxyParamCaption})}



References \textbf{ ipaccess\+\_\+unit\+::bts\+\_\+id}, \textbf{ ipaccess\+\_\+unit\+::site\+\_\+id}, and \textbf{ ipaccess\+\_\+unit\+::trx\+\_\+id}.



Referenced by \textbf{ ipa\+\_\+ccm\+\_\+tlv\+\_\+to\+\_\+unitdata()}.

\mbox{\label{group__ipa_ga5453b0deac7307bb3817b882b0250455}} 
\index{Ipa@{Ipa}!ipa\_prepend\_header@{ipa\_prepend\_header}}
\index{ipa\_prepend\_header@{ipa\_prepend\_header}!Ipa@{Ipa}}
\doxysubsubsection{ipa\_prepend\_header()}
{\footnotesize\ttfamily void ipa\+\_\+prepend\+\_\+header (\begin{DoxyParamCaption}\item[{struct \textbf{ msgb} $\ast$}]{msg,  }\item[{int}]{proto }\end{DoxyParamCaption})}



References \textbf{ ipaccess\+\_\+head\+::len}, \textbf{ msg}, \textbf{ msgb\+\_\+push()}, \textbf{ osmo\+\_\+htons}, \textbf{ proto}, and \textbf{ ipaccess\+\_\+head\+::proto}.



Referenced by \textbf{ ipa\+\_\+ccm\+\_\+make\+\_\+id\+\_\+resp()}.

\mbox{\label{group__ipa_ga801f9b4b6721017eba546c8598f6abd2}} 
\index{Ipa@{Ipa}!ipa\_prepend\_header\_ext@{ipa\_prepend\_header\_ext}}
\index{ipa\_prepend\_header\_ext@{ipa\_prepend\_header\_ext}!Ipa@{Ipa}}
\doxysubsubsection{ipa\_prepend\_header\_ext()}
{\footnotesize\ttfamily void ipa\+\_\+prepend\+\_\+header\+\_\+ext (\begin{DoxyParamCaption}\item[{struct \textbf{ msgb} $\ast$}]{msg,  }\item[{int}]{proto }\end{DoxyParamCaption})}



References \textbf{ msg}, \textbf{ msgb\+\_\+push()}, \textbf{ proto}, and \textbf{ ipaccess\+\_\+head\+\_\+ext\+::proto}.

\mbox{\label{group__ipa_gaed27d04f0f1a7b4fd2d1c8e4cdd81bb6}} 
\index{Ipa@{Ipa}!ipa\_send@{ipa\_send}}
\index{ipa\_send@{ipa\_send}!Ipa@{Ipa}}
\doxysubsubsection{ipa\_send()}
{\footnotesize\ttfamily int ipa\+\_\+send (\begin{DoxyParamCaption}\item[{int}]{fd,  }\item[{const void $\ast$}]{msg,  }\item[{size\+\_\+t}]{msglen }\end{DoxyParamCaption})}



References \textbf{ DLINP}, \textbf{ fd}, \textbf{ LOGL\+\_\+\+ERROR}, \textbf{ LOGP}, and \textbf{ msg}.



Referenced by \textbf{ ipa\+\_\+ccm\+\_\+send\+\_\+id\+\_\+ack()}, \textbf{ ipa\+\_\+ccm\+\_\+send\+\_\+id\+\_\+req()}, and \textbf{ ipa\+\_\+ccm\+\_\+send\+\_\+pong()}.



\doxysubsection{Variable Documentation}
\mbox{\label{group__ipa_ga40976470bf7cf1148ce07ec8ba20a92b}} 
\index{Ipa@{Ipa}!idtag\_names@{idtag\_names}}
\index{idtag\_names@{idtag\_names}!Ipa@{Ipa}}
\doxysubsubsection{idtag\_names}
{\footnotesize\ttfamily const char$\ast$ idtag\+\_\+names[$\,$]\hspace{0.3cm}{\ttfamily [static]}}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= \{}
\DoxyCodeLine{        [IPAC\_IDTAG\_SERNR]      = \textcolor{stringliteral}{"{}Serial\_Number"{}},}
\DoxyCodeLine{        [IPAC\_IDTAG\_UNITNAME]        = \textcolor{stringliteral}{"{}Unit\_Name"{}},}
\DoxyCodeLine{        [IPAC\_IDTAG\_LOCATION1]      = \textcolor{stringliteral}{"{}Location\_1"{}},}
\DoxyCodeLine{        [IPAC\_IDTAG\_LOCATION2]      = \textcolor{stringliteral}{"{}Location\_2"{}},}
\DoxyCodeLine{        [IPAC\_IDTAG\_EQUIPVERS]      = \textcolor{stringliteral}{"{}Equipment\_Version"{}},}
\DoxyCodeLine{        [IPAC\_IDTAG\_SWVERSION]      = \textcolor{stringliteral}{"{}Software\_Version"{}},}
\DoxyCodeLine{        [IPAC\_IDTAG\_IPADDR]    = \textcolor{stringliteral}{"{}IP\_Address"{}},}
\DoxyCodeLine{        [IPAC\_IDTAG\_MACADDR]  = \textcolor{stringliteral}{"{}MAC\_Address"{}},}
\DoxyCodeLine{        [IPAC\_IDTAG\_UNIT]        = \textcolor{stringliteral}{"{}Unit\_ID"{}},}
\DoxyCodeLine{\}}

\end{DoxyCode}


Referenced by \textbf{ ipa\+\_\+ccm\+\_\+idtag\+\_\+name()}.

\mbox{\label{group__ipa_ga4605ba89f8926674191fb08555279a83}} 
\index{Ipa@{Ipa}!ipa\_id\_ack\_msg@{ipa\_id\_ack\_msg}}
\index{ipa\_id\_ack\_msg@{ipa\_id\_ack\_msg}!Ipa@{Ipa}}
\doxysubsubsection{ipa\_id\_ack\_msg}
{\footnotesize\ttfamily const uint8\+\_\+t ipa\+\_\+id\+\_\+ack\+\_\+msg[$\,$]\hspace{0.3cm}{\ttfamily [static]}}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= \{}
\DoxyCodeLine{        0, 1, IPAC\_PROTO\_IPACCESS, IPAC\_MSGT\_ID\_ACK}
\DoxyCodeLine{\}}

\end{DoxyCode}


Referenced by \textbf{ ipa\+\_\+ccm\+\_\+send\+\_\+id\+\_\+ack()}.

\mbox{\label{group__ipa_gac1adbbecf32734f5bbaa2126c9b17a77}} 
\index{Ipa@{Ipa}!ipa\_id\_req\_msg@{ipa\_id\_req\_msg}}
\index{ipa\_id\_req\_msg@{ipa\_id\_req\_msg}!Ipa@{Ipa}}
\doxysubsubsection{ipa\_id\_req\_msg}
{\footnotesize\ttfamily const uint8\+\_\+t ipa\+\_\+id\+\_\+req\+\_\+msg[$\,$]\hspace{0.3cm}{\ttfamily [static]}}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= \{}
\DoxyCodeLine{        0, 17, IPAC\_PROTO\_IPACCESS, IPAC\_MSGT\_ID\_GET,}
\DoxyCodeLine{        0x01, IPAC\_IDTAG\_UNIT,}
\DoxyCodeLine{        0x01, IPAC\_IDTAG\_MACADDR,}
\DoxyCodeLine{        0x01, IPAC\_IDTAG\_LOCATION1,}
\DoxyCodeLine{        0x01, IPAC\_IDTAG\_LOCATION2,}
\DoxyCodeLine{        0x01, IPAC\_IDTAG\_EQUIPVERS,}
\DoxyCodeLine{        0x01, IPAC\_IDTAG\_SWVERSION,}
\DoxyCodeLine{        0x01, IPAC\_IDTAG\_UNITNAME,}
\DoxyCodeLine{        0x01, IPAC\_IDTAG\_SERNR,}
\DoxyCodeLine{\}}

\end{DoxyCode}


Referenced by \textbf{ ipa\+\_\+ccm\+\_\+send\+\_\+id\+\_\+req()}.

\mbox{\label{group__ipa_gafb3afeb4e59c26df17d5f22cb907aff6}} 
\index{Ipa@{Ipa}!ipa\_pong\_msg@{ipa\_pong\_msg}}
\index{ipa\_pong\_msg@{ipa\_pong\_msg}!Ipa@{Ipa}}
\doxysubsubsection{ipa\_pong\_msg}
{\footnotesize\ttfamily const uint8\+\_\+t ipa\+\_\+pong\+\_\+msg[$\,$]\hspace{0.3cm}{\ttfamily [static]}}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= \{}
\DoxyCodeLine{        0, 1, IPAC\_PROTO\_IPACCESS, IPAC\_MSGT\_PONG}
\DoxyCodeLine{\}}

\end{DoxyCode}


Referenced by \textbf{ ipa\+\_\+ccm\+\_\+send\+\_\+pong()}.

