libosmo-netif 1.6.0.16-c51c Osmocom network interface library

Loading...
Searching...
No Matches
Macros | Functions
datagram.c File Reference
Osmocom Datagram Socket

Osmocom datagram socket helpers. More...

`#include <stdio.h>`
`#include <unistd.h>`
`#include <stdlib.h>`
`#include <errno.h>`
`#include <string.h>`
`#include <time.h>`
`#include <sys/fcntl.h>`
`#include <sys/socket.h>`
`#include <sys/ioctl.h>`
`#include <arpa/inet.h>`
`#include <netinet/in.h>`
`#include <osmocom/core/linuxlist.h>`
`#include <osmocom/core/select.h>`
`#include <osmocom/core/utils.h>`
`#include <osmocom/gsm/tlv.h>`
`#include <osmocom/core/msgb.h>`
`#include <osmocom/core/logging.h>`
`#include <osmocom/core/talloc.h>`
`#include <osmocom/core/socket.h>`
`#include <osmocom/netif/datagram.h>`

## Macros
#define | OSMO_DGRAM_CLI_F_RECONF (1 << 0)
#define | OSMO_DGRAM_RX_F_RECONF (1 << 0)

## Functions
void | osmo_dgram_tx_close (struct osmo_dgram_tx *conn)
| Close an Osmocom Datagram Transmitter.
struct osmo_dgram_tx * | osmo_dgram_tx_create (void *ctx)
| Create an Osmocom datagram transmitter.
void | osmo_dgram_tx_set_addr (struct osmo_dgram_tx *conn, const char *addr)
| Set the remote address to which we transmit.
void | osmo_dgram_tx_set_port (struct osmo_dgram_tx *conn, uint16_t port)
| Set the remote port to which we transmit.
void | osmo_dgram_tx_set_local_addr (struct osmo_dgram_tx *conn, const char *addr)
| Set the local address from which we transmit.
void | osmo_dgram_tx_set_local_port (struct osmo_dgram_tx *conn, uint16_t port)
| Set the local port from which we transmit.
void | osmo_dgram_tx_set_data (struct osmo_dgram_tx *conn, void *data)
| Set application private data of the datagram transmitter.
void | osmo_dgram_tx_destroy (struct osmo_dgram_tx *conn)
| Destroy a Osmocom datagram transmitter.
int | osmo_dgram_tx_open (struct osmo_dgram_tx *conn)
| Open connection of an Osmocom datagram transmitter.
void | osmo_dgram_tx_send (struct osmo_dgram_tx *conn, struct msgb *msg)
| Enqueue data to be sent via an Osmocom datagram transmitter.
int | osmo_dgram_rx_recv (struct osmo_dgram_rx *conn, struct msgb *msg)
| Receive data via Osmocom datagram receiver.
struct osmo_dgram_rx * | osmo_dgram_rx_create (void *ctx)
| Create an Osmocom datagram receiver.
void | osmo_dgram_rx_set_addr (struct osmo_dgram_rx *conn, const char *addr)
| Set the local address to which we bind.
void | osmo_dgram_rx_set_port (struct osmo_dgram_rx *conn, uint16_t port)
| Set the local port to which we bind.
void | osmo_dgram_rx_set_read_cb (struct osmo_dgram_rx *conn, int(*read_cb)(struct osmo_dgram_rx *conn))
| Set the read() call-back of the datagram receiver.
void | osmo_dgram_rx_destroy (struct osmo_dgram_rx *conn)
| Destroy the datagram receiver.
int | osmo_dgram_rx_open (struct osmo_dgram_rx *conn)
| Open the datagram receiver.
void | osmo_dgram_rx_close (struct osmo_dgram_rx *conn)
| Close the datagram receiver and unregister from select loop Does not destroy the datagram receiver, merely closes it!
struct osmo_dgram * | osmo_dgram_create (void *ctx)
| Create an Osmocom datagram transceiver (bidirectional)
void | osmo_dgram_destroy (struct osmo_dgram *conn)
| Destroy a Osmocom datagram transceiver.
void | osmo_dgram_set_local_addr (struct osmo_dgram *conn, const char *addr)
| Set the local address to which we bind.
void | osmo_dgram_set_remote_addr (struct osmo_dgram *conn, const char *addr)
| Set the remote address to which we transmit/connect.
void | osmo_dgram_set_local_port (struct osmo_dgram *conn, uint16_t port)
| Set the local port to which we bind.
void | osmo_dgram_set_remote_port (struct osmo_dgram *conn, uint16_t port)
| Set the remote port to which we transmit.
void | osmo_dgram_set_read_cb (struct osmo_dgram *conn, int(*read_cb)(struct osmo_dgram *conn))
| Set the read() call-back of the datagram receiver.
void | osmo_dgram_set_data (struct osmo_dgram *conn, void *data)
| Set application private data of the datagram transmitter.
void * | osmo_dgram_get_data (struct osmo_dgram *conn)
| Get application private data of the datagram transceiver.
int | osmo_dgram_open (struct osmo_dgram *conn)
| Open the datagram transceiver.
void | osmo_dgram_close (struct osmo_dgram *conn)
| Close an Osmocom Datagram Transceiver.
void | osmo_dgram_send (struct osmo_dgram *conn, struct msgb *msg)
| Enqueue data to be sent via an Osmocom datagram transceiver.
int | osmo_dgram_recv (struct osmo_dgram *conn, struct msgb *msg)
| Receive data via Osmocom datagram transceiver.

## Detailed Description

Osmocom datagram socket helpers.