\doxysection{include/osmocom/netif/datagram.h File Reference}
\label{datagram_8h}\index{include/osmocom/netif/datagram.h@{include/osmocom/netif/datagram.h}}


Osmocom datagram socket helpers.  


\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
struct osmo\+\_\+dgram\+\_\+tx $\ast$ \textbf{ osmo\+\_\+dgram\+\_\+tx\+\_\+create} (void $\ast$ctx)
\begin{DoxyCompactList}\small\item\em Create an Osmocom datagram transmitter. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+dgram\+\_\+tx\+\_\+destroy} (struct osmo\+\_\+dgram\+\_\+tx $\ast$conn)
\begin{DoxyCompactList}\small\item\em Destroy a Osmocom datagram transmitter. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+dgram\+\_\+tx\+\_\+set\+\_\+addr} (struct osmo\+\_\+dgram\+\_\+tx $\ast$conn, const char $\ast$addr)
\begin{DoxyCompactList}\small\item\em Set the remote address to which we transmit. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+dgram\+\_\+tx\+\_\+set\+\_\+port} (struct osmo\+\_\+dgram\+\_\+tx $\ast$conn, uint16\+\_\+t port)
\begin{DoxyCompactList}\small\item\em Set the remote port to which we transmit. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+dgram\+\_\+tx\+\_\+set\+\_\+local\+\_\+addr} (struct osmo\+\_\+dgram\+\_\+tx $\ast$conn, const char $\ast$addr)
\begin{DoxyCompactList}\small\item\em Set the local address from which we transmit. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+dgram\+\_\+tx\+\_\+set\+\_\+local\+\_\+port} (struct osmo\+\_\+dgram\+\_\+tx $\ast$conn, uint16\+\_\+t port)
\begin{DoxyCompactList}\small\item\em Set the local port from which we transmit. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+dgram\+\_\+tx\+\_\+set\+\_\+data} (struct osmo\+\_\+dgram\+\_\+tx $\ast$conn, void $\ast$data)
\begin{DoxyCompactList}\small\item\em Set application private data of the datagram transmitter. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+dgram\+\_\+tx\+\_\+open} (struct osmo\+\_\+dgram\+\_\+tx $\ast$conn)
\begin{DoxyCompactList}\small\item\em Open connection of an Osmocom datagram transmitter. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+dgram\+\_\+tx\+\_\+close} (struct osmo\+\_\+dgram\+\_\+tx $\ast$conn)
\begin{DoxyCompactList}\small\item\em Close an Osmocom Datagram Transmitter. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+dgram\+\_\+tx\+\_\+send} (struct osmo\+\_\+dgram\+\_\+tx $\ast$conn, struct msgb $\ast$msg)
\begin{DoxyCompactList}\small\item\em Enqueue data to be sent via an Osmocom datagram transmitter. \end{DoxyCompactList}\item 
struct osmo\+\_\+dgram\+\_\+rx $\ast$ \textbf{ osmo\+\_\+dgram\+\_\+rx\+\_\+create} (void $\ast$ctx)
\begin{DoxyCompactList}\small\item\em Create an Osmocom datagram receiver. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+dgram\+\_\+rx\+\_\+set\+\_\+addr} (struct osmo\+\_\+dgram\+\_\+rx $\ast$conn, const char $\ast$addr)
\begin{DoxyCompactList}\small\item\em Set the local address to which we bind. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+dgram\+\_\+rx\+\_\+set\+\_\+port} (struct osmo\+\_\+dgram\+\_\+rx $\ast$conn, uint16\+\_\+t port)
\begin{DoxyCompactList}\small\item\em Set the local port to which we bind. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+dgram\+\_\+rx\+\_\+set\+\_\+read\+\_\+cb} (struct osmo\+\_\+dgram\+\_\+rx $\ast$conn, int($\ast$read\+\_\+cb)(struct osmo\+\_\+dgram\+\_\+rx $\ast$conn))
\begin{DoxyCompactList}\small\item\em Set the read() call-\/back of the datagram receiver. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+dgram\+\_\+rx\+\_\+destroy} (struct osmo\+\_\+dgram\+\_\+rx $\ast$conn)
\begin{DoxyCompactList}\small\item\em Destroy the datagram receiver. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+dgram\+\_\+rx\+\_\+open} (struct osmo\+\_\+dgram\+\_\+rx $\ast$conn)
\begin{DoxyCompactList}\small\item\em Open the datagram receiver. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+dgram\+\_\+rx\+\_\+close} (struct osmo\+\_\+dgram\+\_\+rx $\ast$conn)
\begin{DoxyCompactList}\small\item\em Close the datagram receiver and unregister from select loop Does not destroy the datagram receiver, merely closes it! \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+dgram\+\_\+rx\+\_\+recv} (struct osmo\+\_\+dgram\+\_\+rx $\ast$conn, struct msgb $\ast$msg)
\begin{DoxyCompactList}\small\item\em Receive data via Osmocom datagram receiver. \end{DoxyCompactList}\item 
struct osmo\+\_\+dgram $\ast$ \textbf{ osmo\+\_\+dgram\+\_\+create} (void $\ast$ctx)
\begin{DoxyCompactList}\small\item\em Create an Osmocom datagram transceiver (bidirectional) \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+dgram\+\_\+destroy} (struct osmo\+\_\+dgram $\ast$conn)
\begin{DoxyCompactList}\small\item\em Destroy a Osmocom datagram transceiver. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+dgram\+\_\+open} (struct osmo\+\_\+dgram $\ast$conn)
\begin{DoxyCompactList}\small\item\em Open the datagram transceiver. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+dgram\+\_\+close} (struct osmo\+\_\+dgram $\ast$conn)
\begin{DoxyCompactList}\small\item\em Close an Osmocom Datagram Transceiver. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+dgram\+\_\+set\+\_\+local\+\_\+addr} (struct osmo\+\_\+dgram $\ast$conn, const char $\ast$addr)
\begin{DoxyCompactList}\small\item\em Set the local address to which we bind. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+dgram\+\_\+set\+\_\+remote\+\_\+addr} (struct osmo\+\_\+dgram $\ast$conn, const char $\ast$addr)
\begin{DoxyCompactList}\small\item\em Set the remote address to which we transmit/connect. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+dgram\+\_\+set\+\_\+local\+\_\+port} (struct osmo\+\_\+dgram $\ast$conn, uint16\+\_\+t port)
\begin{DoxyCompactList}\small\item\em Set the local port to which we bind. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+dgram\+\_\+set\+\_\+remote\+\_\+port} (struct osmo\+\_\+dgram $\ast$conn, uint16\+\_\+t port)
\begin{DoxyCompactList}\small\item\em Set the remote port to which we transmit. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+dgram\+\_\+set\+\_\+read\+\_\+cb} (struct osmo\+\_\+dgram $\ast$conn, int($\ast$read\+\_\+cb)(struct osmo\+\_\+dgram $\ast$conn))
\begin{DoxyCompactList}\small\item\em Set the read() call-\/back of the datagram receiver. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+dgram\+\_\+set\+\_\+data} (struct osmo\+\_\+dgram $\ast$conn, void $\ast$data)
\begin{DoxyCompactList}\small\item\em Set application private data of the datagram transmitter. \end{DoxyCompactList}\item 
void $\ast$ \textbf{ osmo\+\_\+dgram\+\_\+get\+\_\+data} (struct osmo\+\_\+dgram $\ast$conn)
\begin{DoxyCompactList}\small\item\em Get application private data of the datagram transceiver. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+dgram\+\_\+send} (struct osmo\+\_\+dgram $\ast$conn, struct msgb $\ast$msg)
\begin{DoxyCompactList}\small\item\em Enqueue data to be sent via an Osmocom datagram transceiver. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+dgram\+\_\+recv} (struct osmo\+\_\+dgram $\ast$conn, struct msgb $\ast$msg)
\begin{DoxyCompactList}\small\item\em Receive data via Osmocom datagram transceiver. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Osmocom datagram socket helpers. 

