\doxysection{src/gsm/ipa.c File Reference}
\label{ipa_8c}\index{src/gsm/ipa.c@{src/gsm/ipa.c}}


Open\+BSC Abis input driver for ip.\+access.  


{\ttfamily \#include \char`\"{}config.\+h\char`\"{}}\newline
{\ttfamily \#include $<$unistd.\+h$>$}\newline
{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$errno.\+h$>$}\newline
{\ttfamily \#include $<$stdlib.\+h$>$}\newline
{\ttfamily \#include $<$sys/types.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/byteswap.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/msgb.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/talloc.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/logging.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/macaddr.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/select.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/tlv.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/protocol/ipaccess.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/ipa.\+h$>$}\newline
\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 request payload. \end{DoxyCompactList}\item 
int \textbf{ ipa\+\_\+send} (int fd, const void $\ast$\textbf{ msg}, size\+\_\+t msglen)
\item 
int \textbf{ ipa\+\_\+ccm\+\_\+send\+\_\+pong} (int fd)
\item 
int \textbf{ ipa\+\_\+ccm\+\_\+send\+\_\+id\+\_\+ack} (int fd)
\item 
int \textbf{ ipa\+\_\+ccm\+\_\+send\+\_\+id\+\_\+req} (int 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}
Open\+BSC Abis input driver for ip.\+access. 

