\doxysection{include/osmocom/trx/ep.h File Reference}
\label{ep_8h}\index{include/osmocom/trx/ep.h@{include/osmocom/trx/ep.h}}


TRX protocol socket endpoint management (clock/ctrl/data UDP sockets).  


{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$stdbool.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/trx/trxc.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/trx/trxd.\+h$>$}\newline
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef void($\ast$ \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+closed\+\_\+cb\+\_\+t}) (struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep)
\begin{DoxyCompactList}\small\item\em Called once \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+close()}{p.}{ep_8h_a38607d3c25dfde685b0f779528455ef2} has fully completed (see \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+closed\+\_\+cb()}{p.}{ep_8h_a5d312e40b7c366a18c8f362bcdb5f4f4}) \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+mode} \{ \newline
\textbf{ OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+MODE\+\_\+\+L1}
, \newline
\textbf{ OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+MODE\+\_\+\+TRX}
 \}
\begin{DoxyCompactList}\small\item\em Endpoint mode\+: which side of the TRX protocol this endpoint implements. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+rx\+\_\+clck\+\_\+ind} (struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep, uint32\+\_\+t fn)
\begin{DoxyCompactList}\small\item\em Handle a received clock indication (\char`\"{}\+IND CLOCK $<$fn$>$\char`\"{}). \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+rx\+\_\+ctrl\+\_\+msg} (struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep, unsigned int chan, const struct \textbf{ osmo\+\_\+trxc\+\_\+msg} $\ast$msg)
\begin{DoxyCompactList}\small\item\em Handle a received TRXC message (CMD on the TRX side, RSP on the L1 side). \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+rx\+\_\+burst\+\_\+ind} (struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep, unsigned int chan, const struct \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind} $\ast$bi)
\begin{DoxyCompactList}\small\item\em Handle a received burst indication (OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+MODE\+\_\+\+L1 only). \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+rx\+\_\+burst\+\_\+req} (struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep, unsigned int chan, const struct \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req} $\ast$br)
\begin{DoxyCompactList}\small\item\em Handle a received burst transmit request (OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+MODE\+\_\+\+TRX only). \end{DoxyCompactList}\item 
struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+alloc} (void $\ast$ctx, unsigned int num\+\_\+chans)
\begin{DoxyCompactList}\small\item\em Allocate a TRX endpoint instance. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+open} (struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep)
\begin{DoxyCompactList}\small\item\em Open the clock/ctrl/data sockets of the given endpoint. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+close} (struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep)
\begin{DoxyCompactList}\small\item\em Close all sockets of the given endpoint. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+free} (struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep)
\begin{DoxyCompactList}\small\item\em Free the given endpoint instance (closes all sockets). \end{DoxyCompactList}\item 
bool \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+is\+\_\+open} (const struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep)
\begin{DoxyCompactList}\small\item\em Whether the endpoint\textquotesingle{}s sockets are currently open. \end{DoxyCompactList}\item 
bool \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+is\+\_\+closing} (const struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep)
\begin{DoxyCompactList}\small\item\em Whether a ctrl socket from a previous \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+close()}{p.}{trx__ep_8c_a38607d3c25dfde685b0f779528455ef2} is still flushing a queued TRXC message in the background (see \doxyref{trx\+\_\+ep\+\_\+ctrl\+\_\+close()}{p.}{trx__ep_8c_ac3a21ac397090bf281e267e251fdd840}). \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+closed\+\_\+cb} (struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep, \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+closed\+\_\+cb\+\_\+t} closed\+\_\+cb)
\begin{DoxyCompactList}\small\item\em Set the call-\/back invoked once \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+close()}{p.}{trx__ep_8c_a38607d3c25dfde685b0f779528455ef2} has fully completed\+: immediately if no ctrl chan needed flushing, or once the last async flush finishes (see \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+is\+\_\+closing()}{p.}{trx__ep_8c_a4dd846461e53e491fbddf829fefcb263}) otherwise. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+priv} (struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep, void $\ast$priv)
\begin{DoxyCompactList}\small\item\em Set the application-\/private data. \end{DoxyCompactList}\item 
void $\ast$ \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+get\+\_\+priv} (const struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep)
\begin{DoxyCompactList}\small\item\em Obtain the application-\/private data. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+name} (struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep, const char $\ast$fmt,...)
\begin{DoxyCompactList}\small\item\em Set the name (log prefix) of the given instance, e.\+g. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+get\+\_\+name} (const struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep)
\begin{DoxyCompactList}\small\item\em Obtain the name (log prefix) of the given instance. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+log\+\_\+cat} (struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep, int log\+\_\+cat)
\begin{DoxyCompactList}\small\item\em Set the logging category (e.\+g. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+num\+\_\+chans} (struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep, unsigned int num\+\_\+chans)
\begin{DoxyCompactList}\small\item\em Change the number of channels; only valid before \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+open()}{p.}{trx__ep_8c_a11e2dbc3d472ed74e5bc0d52aeea9663}. \end{DoxyCompactList}\item 
unsigned int \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+get\+\_\+num\+\_\+chans} (const struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep)
\begin{DoxyCompactList}\small\item\em Obtain the number of channels. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+mode} (struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep, enum \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+mode} mode)
\begin{DoxyCompactList}\small\item\em Set the endpoint mode (default\+: OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+MODE\+\_\+\+L1) \end{DoxyCompactList}\item 
enum \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+mode} \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+get\+\_\+mode} (const struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep)
\begin{DoxyCompactList}\small\item\em Obtain the endpoint mode. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+laddr} (struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep, const char $\ast$addr)
\begin{DoxyCompactList}\small\item\em Local/remote IP address (copied); must be set before \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+open()}{p.}{ep_8h_a11e2dbc3d472ed74e5bc0d52aeea9663} \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+get\+\_\+laddr} (const struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep)
\begin{DoxyCompactList}\small\item\em Obtain the local IP address. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+raddr} (struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep, const char $\ast$addr)
\begin{DoxyCompactList}\small\item\em Set the remote IP address (copied) \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+get\+\_\+raddr} (const struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep)
\begin{DoxyCompactList}\small\item\em Obtain the remote IP address. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+base\+\_\+port} (struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep, uint16\+\_\+t base\+\_\+port)
\begin{DoxyCompactList}\small\item\em Base UDP port (default\+: 5700). \end{DoxyCompactList}\item 
uint16\+\_\+t \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+get\+\_\+base\+\_\+port} (const struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep)
\begin{DoxyCompactList}\small\item\em Obtain the base UDP port. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+clock\+\_\+socket} (struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep, bool enable)
\begin{DoxyCompactList}\small\item\em Open the clock socket (base port + 0); default\+: false. \end{DoxyCompactList}\item 
bool \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+get\+\_\+clock\+\_\+socket} (const struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep)
\begin{DoxyCompactList}\small\item\em Whether the clock socket is enabled. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+ctrl\+\_\+promisc} (struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep, bool enable)
\begin{DoxyCompactList}\small\item\em Unconnected ctrl socket accepting/replying to any peer; default\+: false. \end{DoxyCompactList}\item 
bool \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+get\+\_\+ctrl\+\_\+promisc} (const struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep)
\begin{DoxyCompactList}\small\item\em Whether promiscuous ctrl socket mode is enabled. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+pdu\+\_\+batch} (struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep, bool enable)
\begin{DoxyCompactList}\small\item\em Enable/disable batching BURST.\+ind/req PDUs on the data sockets (default\+: true)\+: when enabled and TRXDv2 (or higher) is negotiated on a channel, a TDMA frame\textquotesingle{}s worth of PDUs is accumulated and sent in a single datagram (see \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+send\+\_\+burst\+\_\+ind()}{p.}{trx__ep_8c_a680a6a5e9c36ec796583776da9f15166}/\+\_\+req()); when disabled, every PDU is sent in its own datagram regardless of the negotiated TRXD PDU version, trading datagram count for latency. \end{DoxyCompactList}\item 
bool \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+get\+\_\+pdu\+\_\+batch} (const struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep)
\begin{DoxyCompactList}\small\item\em Whether batching BURST.\+ind/req PDUs on the data sockets is enabled. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+pdu\+\_\+ver} (struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep, unsigned int chan, uint8\+\_\+t ver)
\begin{DoxyCompactList}\small\item\em Per-\/channel TRXD PDU version in use (set after SETFORMAT negotiation) \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+get\+\_\+pdu\+\_\+ver} (const struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep, unsigned int chan)
\begin{DoxyCompactList}\small\item\em Get the TRXD PDU version in use for the given channel. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+send\+\_\+clck\+\_\+ind} (struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep, uint32\+\_\+t fn)
\begin{DoxyCompactList}\small\item\em Send a clock indication (\char`\"{}\+IND CLOCK $<$fn$>$\char`\"{}) on the clock socket. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+send\+\_\+ctrl\+\_\+msg} (struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep, unsigned int chan, const struct \textbf{ osmo\+\_\+trxc\+\_\+msg} $\ast$msg)
\begin{DoxyCompactList}\small\item\em Send a TRXC message on the ctrl socket of the given channel. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+send\+\_\+burst\+\_\+ind} (struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep, unsigned int chan, const struct \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind} $\ast$bi)
\begin{DoxyCompactList}\small\item\em Send a burst indication on the data socket of the given channel (OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+MODE\+\_\+\+TRX only). \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+send\+\_\+burst\+\_\+req} (struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep, unsigned int chan, const struct \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req} $\ast$br)
\begin{DoxyCompactList}\small\item\em Send a burst transmit request on the data socket of the given channel (OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+MODE\+\_\+\+L1 only). \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+send\+\_\+burst\+\_\+fin} (struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep, unsigned int chan)
\begin{DoxyCompactList}\small\item\em Flush the TRXDv2 batching buffer accumulated by \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+send\+\_\+burst\+\_\+ind()}{p.}{trx__ep_8c_a680a6a5e9c36ec796583776da9f15166} or \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+send\+\_\+burst\+\_\+req()}{p.}{trx__ep_8c_a68b09a204949f4337550a57cdf25cc62} (whichever applies to this endpoint\textquotesingle{}s mode), transmitting it in a single datagram; no-\/op (returns -\/ENOMSG) if nothing was accumulated, and for TRXDv0/v1 (each PDU is already sent immediately by \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+send\+\_\+burst\+\_\+ind()}{p.}{trx__ep_8c_a680a6a5e9c36ec796583776da9f15166}/\+\_\+req()). \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
TRX protocol socket endpoint management (clock/ctrl/data UDP sockets). 



\doxysubsection{Typedef Documentation}
\mbox{\label{ep_8h_aff7264316e83bb0be2486ed0a6331dfa}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_closed\_cb\_t@{osmo\_trx\_ep\_closed\_cb\_t}}
\index{osmo\_trx\_ep\_closed\_cb\_t@{osmo\_trx\_ep\_closed\_cb\_t}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_closed\_cb\_t}
{\footnotesize\ttfamily typedef void($\ast$ osmo\+\_\+trx\+\_\+ep\+\_\+closed\+\_\+cb\+\_\+t) (struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ep)}



Called once \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+close()}{p.}{ep_8h_a38607d3c25dfde685b0f779528455ef2} has fully completed (see \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+closed\+\_\+cb()}{p.}{ep_8h_a5d312e40b7c366a18c8f362bcdb5f4f4}) 



\doxysubsection{Enumeration Type Documentation}
\mbox{\label{ep_8h_a466e03d674d09345b4b8c60f5751a3bd}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_mode@{osmo\_trx\_ep\_mode}}
\index{osmo\_trx\_ep\_mode@{osmo\_trx\_ep\_mode}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_mode}
{\footnotesize\ttfamily enum \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+mode}}



Endpoint mode\+: which side of the TRX protocol this endpoint implements. 

The mode determines how datagrams received on the data sockets are parsed\+: the wire format alone does not identify the direction. \begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_TRX\_EP\_MODE\_L1@{OSMO\_TRX\_EP\_MODE\_L1}!ep.h@{ep.h}}\index{ep.h@{ep.h}!OSMO\_TRX\_EP\_MODE\_L1@{OSMO\_TRX\_EP\_MODE\_L1}}}\mbox{\label{ep_8h_a466e03d674d09345b4b8c60f5751a3bdad423d5131ba661cea71af0c35f5a53a5}} 
OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+MODE\+\_\+\+L1&L1 side (e.\+g. osmo-\/bts)\+: Rx BURST.\+ind, Tx BURST.\+req \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_TRX\_EP\_MODE\_TRX@{OSMO\_TRX\_EP\_MODE\_TRX}!ep.h@{ep.h}}\index{ep.h@{ep.h}!OSMO\_TRX\_EP\_MODE\_TRX@{OSMO\_TRX\_EP\_MODE\_TRX}}}\mbox{\label{ep_8h_a466e03d674d09345b4b8c60f5751a3bda725e3feeb9202b7ebce910f5f33299b4}} 
OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+MODE\+\_\+\+TRX&TRX side (e.\+g. osmo-\/trx)\+: Rx BURST.\+req, Tx BURST.\+ind \\
\hline

\end{DoxyEnumFields}


\doxysubsection{Function Documentation}
\mbox{\label{ep_8h_a28aa89ece8fae05a0c01afe110a8e58e}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_alloc@{osmo\_trx\_ep\_alloc}}
\index{osmo\_trx\_ep\_alloc@{osmo\_trx\_ep\_alloc}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_alloc()}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$ osmo\+\_\+trx\+\_\+ep\+\_\+alloc (\begin{DoxyParamCaption}\item[{void $\ast$}]{ctx,  }\item[{unsigned int}]{num\+\_\+chans }\end{DoxyParamCaption})}



Allocate a TRX endpoint instance. 

The mode, addresses and base port default to zero/unset and must be configured via the osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+$\ast$() accessors before \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+open()}{p.}{trx__ep_8c_a11e2dbc3d472ed74e5bc0d52aeea9663}; num\+\_\+chans may be changed later via \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+num\+\_\+chans()}{p.}{trx__ep_8c_aa359f74c1f9c4a0e33a1e45239356912}, but before \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+open()}{p.}{trx__ep_8c_a11e2dbc3d472ed74e5bc0d52aeea9663}. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em ctx} & talloc context to allocate from \\
\hline
\mbox{\texttt{ in}}  & {\em num\+\_\+chans} & number of channels ($>$ 0) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to the allocated instance; NULL on error 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+trx\+\_\+ep\+::base\+\_\+port}, \textbf{ osmo\+\_\+trx\+\_\+ep\+::log\+\_\+cat}, \textbf{ osmo\+\_\+trx\+\_\+ep\+::name}, \textbf{ osmo\+\_\+trx\+\_\+ep\+::num\+\_\+chans}, \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+num\+\_\+chans()}, and \textbf{ TRX\+\_\+\+EP\+\_\+\+DEFAULT\+\_\+\+BASE\+\_\+\+PORT}.

\mbox{\label{ep_8h_a38607d3c25dfde685b0f779528455ef2}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_close@{osmo\_trx\_ep\_close}}
\index{osmo\_trx\_ep\_close@{osmo\_trx\_ep\_close}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_close()}
{\footnotesize\ttfamily void osmo\+\_\+trx\+\_\+ep\+\_\+close (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep }\end{DoxyParamCaption})}



Close all sockets of the given endpoint. 

No-\/op if not opened. Any TRXC message still queued on a ctrl socket (e.\+g. a \textquotesingle{}goodbye\textquotesingle{} \char`\"{}\+CMD POWEROFF\char`\"{} sent right before teardown) is flushed asynchronously (best-\/effort) instead of being dropped; pending Tx data batches are dropped. 

References \textbf{ osmo\+\_\+trx\+\_\+ep\+::chans}, \textbf{ osmo\+\_\+trx\+\_\+ep\+::clck\+\_\+iofd}, \textbf{ osmo\+\_\+trx\+\_\+ep\+::closed\+\_\+cb}, \textbf{ osmo\+\_\+trx\+\_\+ep\+::flags}, \textbf{ osmo\+\_\+trx\+\_\+ep\+::laddr}, \textbf{ LOGEP}, \textbf{ osmo\+\_\+trx\+\_\+ep\+::num\+\_\+chans}, \textbf{ OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+F\+\_\+\+OPEN}, \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+is\+\_\+closing()}, \textbf{ osmo\+\_\+trx\+\_\+ep\+::raddr}, \textbf{ trx\+\_\+ep\+\_\+chan\+\_\+close()}, and \textbf{ trx\+\_\+ep\+\_\+port()}.



Referenced by \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+free()}, and \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+open()}.

\mbox{\label{ep_8h_afd3eb8dd5df6f258982203c4feeedb18}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_free@{osmo\_trx\_ep\_free}}
\index{osmo\_trx\_ep\_free@{osmo\_trx\_ep\_free}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_free()}
{\footnotesize\ttfamily void osmo\+\_\+trx\+\_\+ep\+\_\+free (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep }\end{DoxyParamCaption})}



Free the given endpoint instance (closes all sockets). 

If a ctrl socket is still flushing (see \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+is\+\_\+closing()}{p.}{trx__ep_8c_a4dd846461e53e491fbddf829fefcb263}), the endpoint itself is kept alive until the flush completes (see \doxyref{trx\+\_\+ep\+\_\+ctrl\+\_\+close\+\_\+sendto\+\_\+cb()}{p.}{trx__ep_8c_a95a1b2d00959f07310a495e4823c8c94}), which then finishes this deferred free. 

References \textbf{ osmo\+\_\+trx\+\_\+ep\+::flags}, \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+close()}, \textbf{ OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+F\+\_\+\+PENDING\+\_\+\+FREE}, and \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+is\+\_\+closing()}.

\mbox{\label{ep_8h_a8973e51e33cea63a0690c09cfd1adc1b}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_get\_base\_port@{osmo\_trx\_ep\_get\_base\_port}}
\index{osmo\_trx\_ep\_get\_base\_port@{osmo\_trx\_ep\_get\_base\_port}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_get\_base\_port()}
{\footnotesize\ttfamily uint16\+\_\+t osmo\+\_\+trx\+\_\+ep\+\_\+get\+\_\+base\+\_\+port (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep }\end{DoxyParamCaption})}



Obtain the base UDP port. 



References \textbf{ osmo\+\_\+trx\+\_\+ep\+::base\+\_\+port}.

\mbox{\label{ep_8h_a0944ea7e3284d74b8ba4037b74e1247f}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_get\_clock\_socket@{osmo\_trx\_ep\_get\_clock\_socket}}
\index{osmo\_trx\_ep\_get\_clock\_socket@{osmo\_trx\_ep\_get\_clock\_socket}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_get\_clock\_socket()}
{\footnotesize\ttfamily bool osmo\+\_\+trx\+\_\+ep\+\_\+get\+\_\+clock\+\_\+socket (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep }\end{DoxyParamCaption})}



Whether the clock socket is enabled. 



References \textbf{ osmo\+\_\+trx\+\_\+ep\+::flags}, and \textbf{ OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+F\+\_\+\+CLOCK\+\_\+\+SOCKET}.

\mbox{\label{ep_8h_a3149b3e125277e2cde3eee5579399fce}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_get\_ctrl\_promisc@{osmo\_trx\_ep\_get\_ctrl\_promisc}}
\index{osmo\_trx\_ep\_get\_ctrl\_promisc@{osmo\_trx\_ep\_get\_ctrl\_promisc}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_get\_ctrl\_promisc()}
{\footnotesize\ttfamily bool osmo\+\_\+trx\+\_\+ep\+\_\+get\+\_\+ctrl\+\_\+promisc (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep }\end{DoxyParamCaption})}



Whether promiscuous ctrl socket mode is enabled. 



References \textbf{ osmo\+\_\+trx\+\_\+ep\+::flags}, and \textbf{ OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+F\+\_\+\+CTRL\+\_\+\+PROMISC}.

\mbox{\label{ep_8h_afc92ec79a8e23ea98422043d5586b0ba}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_get\_laddr@{osmo\_trx\_ep\_get\_laddr}}
\index{osmo\_trx\_ep\_get\_laddr@{osmo\_trx\_ep\_get\_laddr}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_get\_laddr()}
{\footnotesize\ttfamily const char $\ast$ osmo\+\_\+trx\+\_\+ep\+\_\+get\+\_\+laddr (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep }\end{DoxyParamCaption})}



Obtain the local IP address. 



References \textbf{ osmo\+\_\+trx\+\_\+ep\+::laddr}.

\mbox{\label{ep_8h_a7ff547bc086ac9b10f805001cc266bf9}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_get\_mode@{osmo\_trx\_ep\_get\_mode}}
\index{osmo\_trx\_ep\_get\_mode@{osmo\_trx\_ep\_get\_mode}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_get\_mode()}
{\footnotesize\ttfamily enum \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+mode} osmo\+\_\+trx\+\_\+ep\+\_\+get\+\_\+mode (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep }\end{DoxyParamCaption})}



Obtain the endpoint mode. 



References \textbf{ osmo\+\_\+trx\+\_\+ep\+::mode}.

\mbox{\label{ep_8h_a25d774809eacaa95e41b6d969b1c20fd}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_get\_name@{osmo\_trx\_ep\_get\_name}}
\index{osmo\_trx\_ep\_get\_name@{osmo\_trx\_ep\_get\_name}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_get\_name()}
{\footnotesize\ttfamily const char $\ast$ osmo\+\_\+trx\+\_\+ep\+\_\+get\+\_\+name (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep }\end{DoxyParamCaption})}



Obtain the name (log prefix) of the given instance. 



References \textbf{ osmo\+\_\+trx\+\_\+ep\+::name}.

\mbox{\label{ep_8h_a3915235480027afec6902cc1b4d57933}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_get\_num\_chans@{osmo\_trx\_ep\_get\_num\_chans}}
\index{osmo\_trx\_ep\_get\_num\_chans@{osmo\_trx\_ep\_get\_num\_chans}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_get\_num\_chans()}
{\footnotesize\ttfamily unsigned int osmo\+\_\+trx\+\_\+ep\+\_\+get\+\_\+num\+\_\+chans (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep }\end{DoxyParamCaption})}



Obtain the number of channels. 



References \textbf{ osmo\+\_\+trx\+\_\+ep\+::num\+\_\+chans}.

\mbox{\label{ep_8h_ad0b591399e98481a33e9575a9e9d7828}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_get\_pdu\_batch@{osmo\_trx\_ep\_get\_pdu\_batch}}
\index{osmo\_trx\_ep\_get\_pdu\_batch@{osmo\_trx\_ep\_get\_pdu\_batch}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_get\_pdu\_batch()}
{\footnotesize\ttfamily bool osmo\+\_\+trx\+\_\+ep\+\_\+get\+\_\+pdu\+\_\+batch (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep }\end{DoxyParamCaption})}



Whether batching BURST.\+ind/req PDUs on the data sockets is enabled. 



References \textbf{ osmo\+\_\+trx\+\_\+ep\+::flags}, and \textbf{ OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+F\+\_\+\+NO\+\_\+\+PDU\+\_\+\+BATCH}.

\mbox{\label{ep_8h_afc3091f6584fceae3bd5c1301a17ca0e}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_get\_pdu\_ver@{osmo\_trx\_ep\_get\_pdu\_ver}}
\index{osmo\_trx\_ep\_get\_pdu\_ver@{osmo\_trx\_ep\_get\_pdu\_ver}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_get\_pdu\_ver()}
{\footnotesize\ttfamily int osmo\+\_\+trx\+\_\+ep\+\_\+get\+\_\+pdu\+\_\+ver (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep,  }\item[{unsigned int}]{chan }\end{DoxyParamCaption})}



Get the TRXD PDU version in use for the given channel. 



References \textbf{ osmo\+\_\+trx\+\_\+ep\+::chans}, \textbf{ osmo\+\_\+trx\+\_\+ep\+::num\+\_\+chans}, and \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+chan\+::pdu\+\_\+ver}.

\mbox{\label{ep_8h_a74488f3f55616b4f5d4f8523af418f03}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_get\_priv@{osmo\_trx\_ep\_get\_priv}}
\index{osmo\_trx\_ep\_get\_priv@{osmo\_trx\_ep\_get\_priv}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_get\_priv()}
{\footnotesize\ttfamily void $\ast$ osmo\+\_\+trx\+\_\+ep\+\_\+get\+\_\+priv (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep }\end{DoxyParamCaption})}



Obtain the application-\/private data. 



References \textbf{ osmo\+\_\+trx\+\_\+ep\+::priv}.

\mbox{\label{ep_8h_a498c5b1598ea56e07a55013daab3963c}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_get\_raddr@{osmo\_trx\_ep\_get\_raddr}}
\index{osmo\_trx\_ep\_get\_raddr@{osmo\_trx\_ep\_get\_raddr}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_get\_raddr()}
{\footnotesize\ttfamily const char $\ast$ osmo\+\_\+trx\+\_\+ep\+\_\+get\+\_\+raddr (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep }\end{DoxyParamCaption})}



Obtain the remote IP address. 



References \textbf{ osmo\+\_\+trx\+\_\+ep\+::raddr}.

\mbox{\label{ep_8h_a4dd846461e53e491fbddf829fefcb263}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_is\_closing@{osmo\_trx\_ep\_is\_closing}}
\index{osmo\_trx\_ep\_is\_closing@{osmo\_trx\_ep\_is\_closing}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_is\_closing()}
{\footnotesize\ttfamily bool osmo\+\_\+trx\+\_\+ep\+\_\+is\+\_\+closing (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep }\end{DoxyParamCaption})}



Whether a ctrl socket from a previous \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+close()}{p.}{trx__ep_8c_a38607d3c25dfde685b0f779528455ef2} is still flushing a queued TRXC message in the background (see \doxyref{trx\+\_\+ep\+\_\+ctrl\+\_\+close()}{p.}{trx__ep_8c_ac3a21ac397090bf281e267e251fdd840}). 



References \textbf{ osmo\+\_\+trx\+\_\+ep\+::chans}, \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+chan\+::ctrl\+\_\+wr\+\_\+pending}, and \textbf{ osmo\+\_\+trx\+\_\+ep\+::num\+\_\+chans}.



Referenced by \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+close()}, \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+free()}, \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+open()}, \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+num\+\_\+chans()}, and \textbf{ trx\+\_\+ep\+\_\+ctrl\+\_\+close\+\_\+sendto\+\_\+cb()}.

\mbox{\label{ep_8h_a6d9bcdaa745a9fe71b881e9b8bb6491d}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_is\_open@{osmo\_trx\_ep\_is\_open}}
\index{osmo\_trx\_ep\_is\_open@{osmo\_trx\_ep\_is\_open}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_is\_open()}
{\footnotesize\ttfamily bool osmo\+\_\+trx\+\_\+ep\+\_\+is\+\_\+open (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep }\end{DoxyParamCaption})}



Whether the endpoint\textquotesingle{}s sockets are currently open. 



References \textbf{ osmo\+\_\+trx\+\_\+ep\+::flags}, and \textbf{ OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+F\+\_\+\+OPEN}.

\mbox{\label{ep_8h_a11e2dbc3d472ed74e5bc0d52aeea9663}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_open@{osmo\_trx\_ep\_open}}
\index{osmo\_trx\_ep\_open@{osmo\_trx\_ep\_open}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_open()}
{\footnotesize\ttfamily int osmo\+\_\+trx\+\_\+ep\+\_\+open (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep }\end{DoxyParamCaption})}



Open the clock/ctrl/data sockets of the given endpoint. 

\begin{DoxyReturn}{Returns}
0 on success; -\/EALREADY if already open; -\/EBUSY if a previous \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+close()}{p.}{trx__ep_8c_a38607d3c25dfde685b0f779528455ef2} is still flushing a ctrl socket (see \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+is\+\_\+closing()}{p.}{trx__ep_8c_a4dd846461e53e491fbddf829fefcb263}); other negative values on error (all sockets closed) 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+trx\+\_\+ep\+::chans}, \textbf{ osmo\+\_\+trx\+\_\+ep\+::clck\+\_\+iofd}, \textbf{ osmo\+\_\+trx\+\_\+ep\+::flags}, \textbf{ osmo\+\_\+trx\+\_\+ep\+::laddr}, \textbf{ LOGEP}, \textbf{ osmo\+\_\+trx\+\_\+ep\+::num\+\_\+chans}, \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+close()}, \textbf{ OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+F\+\_\+\+CLOCK\+\_\+\+SOCKET}, \textbf{ OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+F\+\_\+\+OPEN}, \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+is\+\_\+closing()}, \textbf{ OSMO\+\_\+\+TRXC\+\_\+\+MSG\+\_\+\+BUF\+\_\+\+SIZE}, \textbf{ osmo\+\_\+trx\+\_\+ep\+::raddr}, \textbf{ trx\+\_\+ep\+\_\+chan\+\_\+open()}, \textbf{ trx\+\_\+ep\+\_\+clck\+\_\+ioops}, \textbf{ trx\+\_\+ep\+\_\+open\+\_\+iofd()}, and \textbf{ trx\+\_\+ep\+\_\+port()}.

\mbox{\label{ep_8h_a3ca5991851248298ddb30a67f416919f}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_rx\_burst\_ind@{osmo\_trx\_ep\_rx\_burst\_ind}}
\index{osmo\_trx\_ep\_rx\_burst\_ind@{osmo\_trx\_ep\_rx\_burst\_ind}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_rx\_burst\_ind()}
{\footnotesize\ttfamily void osmo\+\_\+trx\+\_\+ep\+\_\+rx\+\_\+burst\+\_\+ind (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep,  }\item[{unsigned int}]{chan,  }\item[{const struct \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind} $\ast$}]{bi }\end{DoxyParamCaption})}



Handle a received burst indication (OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+MODE\+\_\+\+L1 only). 

Called for each PDU parsed from a datagram received on the per-\/channel data socket, also for each PDU of a TRXDv2 batch. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em ep} & TRX endpoint instance \\
\hline
\mbox{\texttt{ in}}  & {\em chan} & channel index (0 .. num\+\_\+chans -\/ 1) \\
\hline
\mbox{\texttt{ in}}  & {\em bi} & parsed burst indication \\
\hline
\end{DoxyParams}


Referenced by \textbf{ trx\+\_\+ep\+\_\+data\+\_\+read\+\_\+cb()}.

\mbox{\label{ep_8h_ab2198cf13d8059a481633d49f2a6a96a}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_rx\_burst\_req@{osmo\_trx\_ep\_rx\_burst\_req}}
\index{osmo\_trx\_ep\_rx\_burst\_req@{osmo\_trx\_ep\_rx\_burst\_req}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_rx\_burst\_req()}
{\footnotesize\ttfamily void osmo\+\_\+trx\+\_\+ep\+\_\+rx\+\_\+burst\+\_\+req (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep,  }\item[{unsigned int}]{chan,  }\item[{const struct \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req} $\ast$}]{br }\end{DoxyParamCaption})}



Handle a received burst transmit request (OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+MODE\+\_\+\+TRX only). 

Called for each PDU parsed from a datagram received on the per-\/channel data socket, also for each PDU of a TRXDv2 batch. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em ep} & TRX endpoint instance \\
\hline
\mbox{\texttt{ in}}  & {\em chan} & channel index (0 .. num\+\_\+chans -\/ 1) \\
\hline
\mbox{\texttt{ in}}  & {\em br} & parsed burst transmit request \\
\hline
\end{DoxyParams}


Referenced by \textbf{ trx\+\_\+ep\+\_\+data\+\_\+read\+\_\+cb()}.

\mbox{\label{ep_8h_a6202616a33ab545a4c281cae61bee445}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_rx\_clck\_ind@{osmo\_trx\_ep\_rx\_clck\_ind}}
\index{osmo\_trx\_ep\_rx\_clck\_ind@{osmo\_trx\_ep\_rx\_clck\_ind}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_rx\_clck\_ind()}
{\footnotesize\ttfamily void osmo\+\_\+trx\+\_\+ep\+\_\+rx\+\_\+clck\+\_\+ind (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep,  }\item[{uint32\+\_\+t}]{fn }\end{DoxyParamCaption})}



Handle a received clock indication (\char`\"{}\+IND CLOCK $<$fn$>$\char`\"{}). 

Called for datagrams received on the clock socket (if configured). 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em ep} & TRX endpoint instance \\
\hline
\mbox{\texttt{ in}}  & {\em fn} & indicated TDMA frame number ($<$ GSM\+\_\+\+TDMA\+\_\+\+HYPERFRAME) \\
\hline
\end{DoxyParams}


Referenced by \textbf{ trx\+\_\+ep\+\_\+clck\+\_\+read\+\_\+cb()}.

\mbox{\label{ep_8h_a7f40e507f197982f743955c738c4ed9d}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_rx\_ctrl\_msg@{osmo\_trx\_ep\_rx\_ctrl\_msg}}
\index{osmo\_trx\_ep\_rx\_ctrl\_msg@{osmo\_trx\_ep\_rx\_ctrl\_msg}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_rx\_ctrl\_msg()}
{\footnotesize\ttfamily void osmo\+\_\+trx\+\_\+ep\+\_\+rx\+\_\+ctrl\+\_\+msg (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep,  }\item[{unsigned int}]{chan,  }\item[{const struct \textbf{ osmo\+\_\+trxc\+\_\+msg} $\ast$}]{msg }\end{DoxyParamCaption})}



Handle a received TRXC message (CMD on the TRX side, RSP on the L1 side). 

Called for datagrams received on the per-\/channel ctrl socket. An L1 side application would typically feed responses into the TRXC client engine (see \doxyref{osmo\+\_\+trxc\+\_\+client\+\_\+rx()}{p.}{trxc__client_8h_a943c95be6750189cbbabd4e874a57ebf}). 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em ep} & TRX endpoint instance \\
\hline
\mbox{\texttt{ in}}  & {\em chan} & channel index (0 .. num\+\_\+chans -\/ 1) \\
\hline
\mbox{\texttt{ in}}  & {\em msg} & parsed TRXC message \\
\hline
\end{DoxyParams}


Referenced by \textbf{ trx\+\_\+ep\+\_\+ctrl\+\_\+recvfrom\+\_\+cb()}.

\mbox{\label{ep_8h_a8195eca01fcf74e4f227872174fa8a4e}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_send\_burst\_fin@{osmo\_trx\_ep\_send\_burst\_fin}}
\index{osmo\_trx\_ep\_send\_burst\_fin@{osmo\_trx\_ep\_send\_burst\_fin}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_send\_burst\_fin()}
{\footnotesize\ttfamily int osmo\+\_\+trx\+\_\+ep\+\_\+send\+\_\+burst\+\_\+fin (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep,  }\item[{unsigned int}]{chan }\end{DoxyParamCaption})}



Flush the TRXDv2 batching buffer accumulated by \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+send\+\_\+burst\+\_\+ind()}{p.}{trx__ep_8c_a680a6a5e9c36ec796583776da9f15166} or \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+send\+\_\+burst\+\_\+req()}{p.}{trx__ep_8c_a68b09a204949f4337550a57cdf25cc62} (whichever applies to this endpoint\textquotesingle{}s mode), transmitting it in a single datagram; no-\/op (returns -\/ENOMSG) if nothing was accumulated, and for TRXDv0/v1 (each PDU is already sent immediately by \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+send\+\_\+burst\+\_\+ind()}{p.}{trx__ep_8c_a680a6a5e9c36ec796583776da9f15166}/\+\_\+req()). 

\begin{DoxyReturn}{Returns}
0 on success; -\/ENOMSG if there was nothing to flush; other negative on error 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+trx\+\_\+ep\+::chans}, \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+chan\+::ep}, \textbf{ trx\+\_\+ep\+\_\+data\+\_\+tx\+\_\+flush()}, and \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+chan\+::tx\+\_\+msg}.

\mbox{\label{ep_8h_a680a6a5e9c36ec796583776da9f15166}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_send\_burst\_ind@{osmo\_trx\_ep\_send\_burst\_ind}}
\index{osmo\_trx\_ep\_send\_burst\_ind@{osmo\_trx\_ep\_send\_burst\_ind}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_send\_burst\_ind()}
{\footnotesize\ttfamily int osmo\+\_\+trx\+\_\+ep\+\_\+send\+\_\+burst\+\_\+ind (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep,  }\item[{unsigned int}]{chan,  }\item[{const struct \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind} $\ast$}]{bi }\end{DoxyParamCaption})}



Send a burst indication on the data socket of the given channel (OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+MODE\+\_\+\+TRX only). 

For TRXDv2, the PDUs are batched\+: they get accumulated until \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+send\+\_\+burst\+\_\+fin()}{p.}{trx__ep_8c_a8195eca01fcf74e4f227872174fa8a4e} is called, which transmits all accumulated PDUs in a single datagram. For TRXDv0/v1, each PDU is transmitted immediately.

\begin{DoxyReturn}{Returns}
0 on success; negative on error 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+trx\+\_\+ep\+::chans}, \textbf{ osmo\+\_\+trx\+\_\+ep\+::flags}, \textbf{ OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+F\+\_\+\+NO\+\_\+\+PDU\+\_\+\+BATCH}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+\_\+build()}, \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+chan\+::pdu\+\_\+ver}, \textbf{ TRX\+\_\+\+EP\+\_\+\+DATA\+\_\+\+BUF\+\_\+\+SIZE}, \textbf{ trx\+\_\+ep\+\_\+data\+\_\+tx\+\_\+flush()}, and \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+chan\+::tx\+\_\+msg}.

\mbox{\label{ep_8h_a68b09a204949f4337550a57cdf25cc62}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_send\_burst\_req@{osmo\_trx\_ep\_send\_burst\_req}}
\index{osmo\_trx\_ep\_send\_burst\_req@{osmo\_trx\_ep\_send\_burst\_req}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_send\_burst\_req()}
{\footnotesize\ttfamily int osmo\+\_\+trx\+\_\+ep\+\_\+send\+\_\+burst\+\_\+req (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep,  }\item[{unsigned int}]{chan,  }\item[{const struct \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req} $\ast$}]{br }\end{DoxyParamCaption})}



Send a burst transmit request on the data socket of the given channel (OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+MODE\+\_\+\+L1 only). 

For TRXDv2, the PDUs are batched\+: they get accumulated until \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+send\+\_\+burst\+\_\+fin()}{p.}{trx__ep_8c_a8195eca01fcf74e4f227872174fa8a4e} is called, which transmits all accumulated PDUs in a single datagram. For TRXDv0/v1, each PDU is transmitted immediately.

\begin{DoxyReturn}{Returns}
0 on success; negative on error 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+trx\+\_\+ep\+::chans}, \textbf{ osmo\+\_\+trx\+\_\+ep\+::flags}, \textbf{ OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+F\+\_\+\+NO\+\_\+\+PDU\+\_\+\+BATCH}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+\_\+build()}, \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+chan\+::pdu\+\_\+ver}, \textbf{ TRX\+\_\+\+EP\+\_\+\+DATA\+\_\+\+BUF\+\_\+\+SIZE}, \textbf{ trx\+\_\+ep\+\_\+data\+\_\+tx\+\_\+flush()}, and \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+chan\+::tx\+\_\+msg}.

\mbox{\label{ep_8h_ac4a09c58b17d9566ec11946fc45c1828}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_send\_clck\_ind@{osmo\_trx\_ep\_send\_clck\_ind}}
\index{osmo\_trx\_ep\_send\_clck\_ind@{osmo\_trx\_ep\_send\_clck\_ind}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_send\_clck\_ind()}
{\footnotesize\ttfamily int osmo\+\_\+trx\+\_\+ep\+\_\+send\+\_\+clck\+\_\+ind (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep,  }\item[{uint32\+\_\+t}]{fn }\end{DoxyParamCaption})}



Send a clock indication (\char`\"{}\+IND CLOCK $<$fn$>$\char`\"{}) on the clock socket. 

\begin{DoxyReturn}{Returns}
0 on success; negative on error 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+trx\+\_\+ep\+::clck\+\_\+iofd}, \textbf{ osmo\+\_\+trxc\+\_\+clock\+\_\+ind\+\_\+build()}, and \textbf{ OSMO\+\_\+\+TRXC\+\_\+\+MSG\+\_\+\+BUF\+\_\+\+SIZE}.

\mbox{\label{ep_8h_a9f914cf1e2ca1214a091b4d127c716fc}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_send\_ctrl\_msg@{osmo\_trx\_ep\_send\_ctrl\_msg}}
\index{osmo\_trx\_ep\_send\_ctrl\_msg@{osmo\_trx\_ep\_send\_ctrl\_msg}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_send\_ctrl\_msg()}
{\footnotesize\ttfamily int osmo\+\_\+trx\+\_\+ep\+\_\+send\+\_\+ctrl\+\_\+msg (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep,  }\item[{unsigned int}]{chan,  }\item[{const struct \textbf{ osmo\+\_\+trxc\+\_\+msg} $\ast$}]{tmsg }\end{DoxyParamCaption})}



Send a TRXC message on the ctrl socket of the given channel. 

\begin{DoxyReturn}{Returns}
0 on success; negative on error 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+trx\+\_\+ep\+::chans}, \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+chan\+::ctrl\+\_\+iofd}, \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+chan\+::ctrl\+\_\+peer}, \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+chan\+::ctrl\+\_\+wr\+\_\+pending}, \textbf{ OSMO\+\_\+\+TRXC\+\_\+\+MSG\+\_\+\+BUF\+\_\+\+SIZE}, and \textbf{ osmo\+\_\+trxc\+\_\+msg\+\_\+build()}.

\mbox{\label{ep_8h_a8de9e23c68bf1285d626effe03687ecf}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_set\_base\_port@{osmo\_trx\_ep\_set\_base\_port}}
\index{osmo\_trx\_ep\_set\_base\_port@{osmo\_trx\_ep\_set\_base\_port}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_set\_base\_port()}
{\footnotesize\ttfamily int osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+base\+\_\+port (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep,  }\item[{uint16\+\_\+t}]{base\+\_\+port }\end{DoxyParamCaption})}



Base UDP port (default\+: 5700). 

All local and remote ports are derived from it, given that the L1 side uses a fixed offset of +100\+: the TRX side binds base + ofs and sends to base + 100 + ofs, while the L1 side binds base + 100 + ofs and sends to base + ofs, where ofs = 0 for the clock socket, and for each channel N\+: ofs = 2 $\ast$ N + 1 (ctrl), ofs = 2 $\ast$ N + 2 (data).

Base UDP port (default\+: 5700). 

References \textbf{ osmo\+\_\+trx\+\_\+ep\+::base\+\_\+port}, \textbf{ osmo\+\_\+trx\+\_\+ep\+::flags}, and \textbf{ OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+F\+\_\+\+OPEN}.

\mbox{\label{ep_8h_a005113b95b4a0a2c1518915f0c0d5e19}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_set\_clock\_socket@{osmo\_trx\_ep\_set\_clock\_socket}}
\index{osmo\_trx\_ep\_set\_clock\_socket@{osmo\_trx\_ep\_set\_clock\_socket}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_set\_clock\_socket()}
{\footnotesize\ttfamily int osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+clock\+\_\+socket (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep,  }\item[{bool}]{enable }\end{DoxyParamCaption})}



Open the clock socket (base port + 0); default\+: false. 

Open the clock socket (base port + 0); default\+: false. 

References \textbf{ osmo\+\_\+trx\+\_\+ep\+::flags}, \textbf{ OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+F\+\_\+\+CLOCK\+\_\+\+SOCKET}, and \textbf{ OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+F\+\_\+\+OPEN}.

\mbox{\label{ep_8h_a5d312e40b7c366a18c8f362bcdb5f4f4}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_set\_closed\_cb@{osmo\_trx\_ep\_set\_closed\_cb}}
\index{osmo\_trx\_ep\_set\_closed\_cb@{osmo\_trx\_ep\_set\_closed\_cb}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_set\_closed\_cb()}
{\footnotesize\ttfamily void osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+closed\+\_\+cb (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep,  }\item[{\textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+closed\+\_\+cb\+\_\+t}}]{closed\+\_\+cb }\end{DoxyParamCaption})}



Set the call-\/back invoked once \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+close()}{p.}{trx__ep_8c_a38607d3c25dfde685b0f779528455ef2} has fully completed\+: immediately if no ctrl chan needed flushing, or once the last async flush finishes (see \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+is\+\_\+closing()}{p.}{trx__ep_8c_a4dd846461e53e491fbddf829fefcb263}) otherwise. 



References \textbf{ osmo\+\_\+trx\+\_\+ep\+::closed\+\_\+cb}.

\mbox{\label{ep_8h_aa6dd8fb133b8c60cd5f84eb985732806}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_set\_ctrl\_promisc@{osmo\_trx\_ep\_set\_ctrl\_promisc}}
\index{osmo\_trx\_ep\_set\_ctrl\_promisc@{osmo\_trx\_ep\_set\_ctrl\_promisc}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_set\_ctrl\_promisc()}
{\footnotesize\ttfamily int osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+ctrl\+\_\+promisc (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep,  }\item[{bool}]{enable }\end{DoxyParamCaption})}



Unconnected ctrl socket accepting/replying to any peer; default\+: false. 

Unconnected ctrl socket accepting/replying to any peer; default\+: false.

a test tool injecting extra TRXC commands from its own socket. The RSP always goes back to whoever actually sent the CMD, promiscuous or not (see \doxyref{trx\+\_\+ep\+\_\+ctrl\+\_\+recvfrom\+\_\+cb()}{p.}{trx__ep_8c_a653378d12902ff75f0c6fa2e25620650} and chan-\/$>$ctrl\+\_\+peer). 

References \textbf{ osmo\+\_\+trx\+\_\+ep\+::flags}, \textbf{ OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+F\+\_\+\+CTRL\+\_\+\+PROMISC}, and \textbf{ OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+F\+\_\+\+OPEN}.

\mbox{\label{ep_8h_afa4d72e1e3055df97b09c51297950625}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_set\_laddr@{osmo\_trx\_ep\_set\_laddr}}
\index{osmo\_trx\_ep\_set\_laddr@{osmo\_trx\_ep\_set\_laddr}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_set\_laddr()}
{\footnotesize\ttfamily int osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+laddr (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep,  }\item[{const char $\ast$}]{addr }\end{DoxyParamCaption})}



Local/remote IP address (copied); must be set before \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+open()}{p.}{ep_8h_a11e2dbc3d472ed74e5bc0d52aeea9663} 

Local/remote IP address (copied); must be set before \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+open()}{p.}{ep_8h_a11e2dbc3d472ed74e5bc0d52aeea9663} 

References \textbf{ osmo\+\_\+trx\+\_\+ep\+::flags}, \textbf{ osmo\+\_\+trx\+\_\+ep\+::laddr}, and \textbf{ OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+F\+\_\+\+OPEN}.

\mbox{\label{ep_8h_ad9d0a1d4462c0ea37ddc05bcb299d0d8}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_set\_log\_cat@{osmo\_trx\_ep\_set\_log\_cat}}
\index{osmo\_trx\_ep\_set\_log\_cat@{osmo\_trx\_ep\_set\_log\_cat}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_set\_log\_cat()}
{\footnotesize\ttfamily void osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+log\+\_\+cat (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep,  }\item[{int}]{log\+\_\+cat }\end{DoxyParamCaption})}



Set the logging category (e.\+g. 

DTRX in osmo-\/bts; default\+: DLGLOBAL) 

References \textbf{ osmo\+\_\+trx\+\_\+ep\+::log\+\_\+cat}.

\mbox{\label{ep_8h_a50167e712196b0a1e8347e76c47b9846}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_set\_mode@{osmo\_trx\_ep\_set\_mode}}
\index{osmo\_trx\_ep\_set\_mode@{osmo\_trx\_ep\_set\_mode}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_set\_mode()}
{\footnotesize\ttfamily int osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+mode (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep,  }\item[{enum \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+mode}}]{mode }\end{DoxyParamCaption})}



Set the endpoint mode (default\+: OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+MODE\+\_\+\+L1) 



References \textbf{ osmo\+\_\+trx\+\_\+ep\+::flags}, \textbf{ osmo\+\_\+trx\+\_\+ep\+::mode}, and \textbf{ OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+F\+\_\+\+OPEN}.

\mbox{\label{ep_8h_add195a7e7ca41ed4f7b8e856b0aa6bd5}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_set\_name@{osmo\_trx\_ep\_set\_name}}
\index{osmo\_trx\_ep\_set\_name@{osmo\_trx\_ep\_set\_name}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_set\_name()}
{\footnotesize\ttfamily int osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+name (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep,  }\item[{const char $\ast$}]{fmt,  }\item[{}]{... }\end{DoxyParamCaption})}



Set the name (log prefix) of the given instance, e.\+g. 

\char`\"{}phy0\char`\"{} 

References \textbf{ osmo\+\_\+trx\+\_\+ep\+::name}.

\mbox{\label{ep_8h_aa359f74c1f9c4a0e33a1e45239356912}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_set\_num\_chans@{osmo\_trx\_ep\_set\_num\_chans}}
\index{osmo\_trx\_ep\_set\_num\_chans@{osmo\_trx\_ep\_set\_num\_chans}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_set\_num\_chans()}
{\footnotesize\ttfamily int osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+num\+\_\+chans (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep,  }\item[{unsigned int}]{num\+\_\+chans }\end{DoxyParamCaption})}



Change the number of channels; only valid before \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+open()}{p.}{trx__ep_8c_a11e2dbc3d472ed74e5bc0d52aeea9663}. 

\begin{DoxyReturn}{Returns}
0 on success; -\/EBUSY if the endpoint is already open or a ctrl socket from a previous \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+close()}{p.}{trx__ep_8c_a38607d3c25dfde685b0f779528455ef2} is still flushing (see \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+is\+\_\+closing()}{p.}{trx__ep_8c_a4dd846461e53e491fbddf829fefcb263}); -\/EINVAL if num\+\_\+chans is 0; -\/ENOMEM on allocation failure 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+trx\+\_\+ep\+::chans}, \textbf{ osmo\+\_\+trx\+\_\+ep\+::flags}, \textbf{ osmo\+\_\+trx\+\_\+ep\+::num\+\_\+chans}, \textbf{ OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+F\+\_\+\+OPEN}, \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+is\+\_\+closing()}, and \textbf{ trx\+\_\+ep\+\_\+chan\+\_\+init()}.



Referenced by \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+alloc()}.

\mbox{\label{ep_8h_a625a97dcfb59c97f2417bb51eedfeaff}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_set\_pdu\_batch@{osmo\_trx\_ep\_set\_pdu\_batch}}
\index{osmo\_trx\_ep\_set\_pdu\_batch@{osmo\_trx\_ep\_set\_pdu\_batch}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_set\_pdu\_batch()}
{\footnotesize\ttfamily void osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+pdu\+\_\+batch (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep,  }\item[{bool}]{enable }\end{DoxyParamCaption})}



Enable/disable batching BURST.\+ind/req PDUs on the data sockets (default\+: true)\+: when enabled and TRXDv2 (or higher) is negotiated on a channel, a TDMA frame\textquotesingle{}s worth of PDUs is accumulated and sent in a single datagram (see \doxyref{osmo\+\_\+trx\+\_\+ep\+\_\+send\+\_\+burst\+\_\+ind()}{p.}{trx__ep_8c_a680a6a5e9c36ec796583776da9f15166}/\+\_\+req()); when disabled, every PDU is sent in its own datagram regardless of the negotiated TRXD PDU version, trading datagram count for latency. 

May be changed at any time. 

References \textbf{ osmo\+\_\+trx\+\_\+ep\+::flags}, and \textbf{ OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+F\+\_\+\+NO\+\_\+\+PDU\+\_\+\+BATCH}.

\mbox{\label{ep_8h_a95baa5ab99126758b1c4275584c286d3}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_set\_pdu\_ver@{osmo\_trx\_ep\_set\_pdu\_ver}}
\index{osmo\_trx\_ep\_set\_pdu\_ver@{osmo\_trx\_ep\_set\_pdu\_ver}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_set\_pdu\_ver()}
{\footnotesize\ttfamily int osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+pdu\+\_\+ver (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep,  }\item[{unsigned int}]{chan,  }\item[{uint8\+\_\+t}]{ver }\end{DoxyParamCaption})}



Per-\/channel TRXD PDU version in use (set after SETFORMAT negotiation) 

Per-\/channel TRXD PDU version in use (set after SETFORMAT negotiation) 

References \textbf{ osmo\+\_\+trx\+\_\+ep\+::chans}, \textbf{ LOGEPCH}, \textbf{ osmo\+\_\+trx\+\_\+ep\+::num\+\_\+chans}, \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+PDU\+\_\+\+VER\+\_\+\+MAX}, and \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+chan\+::pdu\+\_\+ver}.

\mbox{\label{ep_8h_ac1121eccd4cb8b10220aaa765cd76ff5}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_set\_priv@{osmo\_trx\_ep\_set\_priv}}
\index{osmo\_trx\_ep\_set\_priv@{osmo\_trx\_ep\_set\_priv}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_set\_priv()}
{\footnotesize\ttfamily void osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+priv (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep,  }\item[{void $\ast$}]{priv }\end{DoxyParamCaption})}



Set the application-\/private data. 



References \textbf{ osmo\+\_\+trx\+\_\+ep\+::priv}.

\mbox{\label{ep_8h_ad9d930621e1a5f5ed361db6fe74e0c7d}} 
\index{ep.h@{ep.h}!osmo\_trx\_ep\_set\_raddr@{osmo\_trx\_ep\_set\_raddr}}
\index{osmo\_trx\_ep\_set\_raddr@{osmo\_trx\_ep\_set\_raddr}!ep.h@{ep.h}}
\doxysubsubsection{osmo\_trx\_ep\_set\_raddr()}
{\footnotesize\ttfamily int osmo\+\_\+trx\+\_\+ep\+\_\+set\+\_\+raddr (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trx\+\_\+ep} $\ast$}]{ep,  }\item[{const char $\ast$}]{addr }\end{DoxyParamCaption})}



Set the remote IP address (copied) 



References \textbf{ osmo\+\_\+trx\+\_\+ep\+::flags}, \textbf{ OSMO\+\_\+\+TRX\+\_\+\+EP\+\_\+\+F\+\_\+\+OPEN}, and \textbf{ osmo\+\_\+trx\+\_\+ep\+::raddr}.

