libosmo-netif: include/osmocom/netif/datagram.h Source File

libosmo-netif 1.7.0.15-fe2d Osmocom network interface library

datagram.h
Go to the documentation of this file.
1#ifndef _OSMO_DGRAM_H_
2#define _OSMO_DGRAM_H_
3
17struct osmo_dgram_tx;
18
19struct osmo_dgram_tx *osmo_dgram_tx_create(void *ctx);
20void osmo_dgram_tx_destroy(struct osmo_dgram_tx *conn);
21
22void osmo_dgram_tx_set_addr(struct osmo_dgram_tx *conn, const char *addr);
23void osmo_dgram_tx_set_port(struct osmo_dgram_tx *conn, uint16_t port);
24void osmo_dgram_tx_set_local_addr(struct osmo_dgram_tx *conn, const char *addr);
25void osmo_dgram_tx_set_local_port(struct osmo_dgram_tx *conn, uint16_t port);
26void osmo_dgram_tx_set_data(struct osmo_dgram_tx *conn, void *data);
27
28int osmo_dgram_tx_open(struct osmo_dgram_tx *conn);
29void osmo_dgram_tx_close(struct osmo_dgram_tx *conn);
30
31void osmo_dgram_tx_send(struct osmo_dgram_tx *conn, struct msgb *msg);
32
33struct osmo_dgram_rx;
34
35struct osmo_dgram_rx *osmo_dgram_rx_create(void *ctx);
36
37void osmo_dgram_rx_set_addr(struct osmo_dgram_rx *conn, const char *addr);
38void osmo_dgram_rx_set_port(struct osmo_dgram_rx *conn, uint16_t port);
39void osmo_dgram_rx_set_read_cb(struct osmo_dgram_rx *conn, int (*read_cb)(struct osmo_dgram_rx *conn));
40void osmo_dgram_rx_destroy(struct osmo_dgram_rx *conn);
41
42int osmo_dgram_rx_open(struct osmo_dgram_rx *conn);
43void osmo_dgram_rx_close(struct osmo_dgram_rx *conn);
44
45int osmo_dgram_rx_recv(struct osmo_dgram_rx *conn, struct msgb *msg);
46
47struct osmo_dgram;
48
49struct osmo_dgram *osmo_dgram_create(void *ctx);
50void osmo_dgram_destroy(struct osmo_dgram *conn);
51
52int osmo_dgram_open(struct osmo_dgram *conn);
53void osmo_dgram_close(struct osmo_dgram *conn);
54
55void osmo_dgram_set_local_addr(struct osmo_dgram *conn, const char *addr);
56void osmo_dgram_set_remote_addr(struct osmo_dgram *conn, const char *addr);
57void osmo_dgram_set_local_port(struct osmo_dgram *conn, uint16_t port);
58void osmo_dgram_set_remote_port(struct osmo_dgram *conn, uint16_t port);
59void osmo_dgram_set_read_cb(struct osmo_dgram *conn, int (*read_cb)(struct osmo_dgram *conn));
60void osmo_dgram_set_data(struct osmo_dgram *conn, void *data);
61void *osmo_dgram_get_data(struct osmo_dgram *conn);
62
63void osmo_dgram_send(struct osmo_dgram *conn, struct msgb *msg);
64int osmo_dgram_recv(struct osmo_dgram *conn, struct msgb *msg);
65
66#endif
osmo_dgram_rx_close
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,...
Definition: datagram.c:376
osmo_dgram_destroy
void osmo_dgram_destroy(struct osmo_dgram *conn)
Destroy a Osmocom datagram transceiver.
Definition: datagram.c:440
osmo_dgram_tx_set_data
void osmo_dgram_tx_set_data(struct osmo_dgram_tx *conn, void *data)
Set application private data of the datagram transmitter.
Definition: datagram.c:188
osmo_dgram_tx_close
void osmo_dgram_tx_close(struct osmo_dgram_tx *conn)
Close an Osmocom Datagram Transmitter.
Definition: datagram.c:77
osmo_dgram_rx_recv
int osmo_dgram_rx_recv(struct osmo_dgram_rx *conn, struct msgb *msg)
Receive data via Osmocom datagram receiver.
Definition: datagram.c:256
osmo_dgram_set_remote_port
void osmo_dgram_set_remote_port(struct osmo_dgram *conn, uint16_t port)
Set the remote port to which we transmit.
Definition: datagram.c:477
osmo_dgram_get_data
void * osmo_dgram_get_data(struct osmo_dgram *conn)
Get application private data of the datagram transceiver.
Definition: datagram.c:502
osmo_dgram_close
void osmo_dgram_close(struct osmo_dgram *conn)
Close an Osmocom Datagram Transceiver.
Definition: datagram.c:530
osmo_dgram_tx_set_port
void osmo_dgram_tx_set_port(struct osmo_dgram_tx *conn, uint16_t port)
Set the remote port to which we transmit.
Definition: datagram.c:157
osmo_dgram_create
struct osmo_dgram * osmo_dgram_create(void *ctx)
Create an Osmocom datagram transceiver (bidirectional)
Definition: datagram.c:414
osmo_dgram_rx_set_read_cb
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.
Definition: datagram.c:331
osmo_dgram_set_remote_addr
void osmo_dgram_set_remote_addr(struct osmo_dgram *conn, const char *addr)
Set the remote address to which we transmit/connect.
Definition: datagram.c:459
osmo_dgram_send
void osmo_dgram_send(struct osmo_dgram *conn, struct msgb *msg)
Enqueue data to be sent via an Osmocom datagram transceiver.
Definition: datagram.c:539
osmo_dgram_set_read_cb
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.
Definition: datagram.c:485
osmo_dgram_tx_set_local_addr
void osmo_dgram_tx_set_local_addr(struct osmo_dgram_tx *conn, const char *addr)
Set the local address from which we transmit.
Definition: datagram.c:168
osmo_dgram_rx_destroy
void osmo_dgram_rx_destroy(struct osmo_dgram_rx *conn)
Destroy the datagram receiver.
Definition: datagram.c:339
osmo_dgram_tx_open
int osmo_dgram_tx_open(struct osmo_dgram_tx *conn)
Open connection of an Osmocom datagram transmitter.
Definition: datagram.c:204
osmo_dgram_set_local_port
void osmo_dgram_set_local_port(struct osmo_dgram *conn, uint16_t port)
Set the local port to which we bind.
Definition: datagram.c:468
osmo_dgram_tx_set_addr
void osmo_dgram_tx_set_addr(struct osmo_dgram_tx *conn, const char *addr)
Set the remote address to which we transmit.
Definition: datagram.c:146
osmo_dgram_set_data
void osmo_dgram_set_data(struct osmo_dgram *conn, void *data)
Set application private data of the datagram transmitter.
Definition: datagram.c:494
osmo_dgram_tx_destroy
void osmo_dgram_tx_destroy(struct osmo_dgram_tx *conn)
Destroy a Osmocom datagram transmitter.
Definition: datagram.c:195
osmo_dgram_recv
int osmo_dgram_recv(struct osmo_dgram *conn, struct msgb *msg)
Receive data via Osmocom datagram transceiver.
Definition: datagram.c:548
osmo_dgram_open
int osmo_dgram_open(struct osmo_dgram *conn)
Open the datagram transceiver.
Definition: datagram.c:510
osmo_dgram_rx_set_addr
void osmo_dgram_rx_set_addr(struct osmo_dgram_rx *conn, const char *addr)
Set the local address to which we bind.
Definition: datagram.c:311
osmo_dgram_tx_send
void osmo_dgram_tx_send(struct osmo_dgram_tx *conn, struct msgb *msg)
Enqueue data to be sent via an Osmocom datagram transmitter.
Definition: datagram.c:232
osmo_dgram_rx_create
struct osmo_dgram_rx * osmo_dgram_rx_create(void *ctx)
Create an Osmocom datagram receiver.
Definition: datagram.c:295
osmo_dgram_tx_create
struct osmo_dgram_tx * osmo_dgram_tx_create(void *ctx)
Create an Osmocom datagram transmitter.
Definition: datagram.c:127
osmo_dgram_tx_set_local_port
void osmo_dgram_tx_set_local_port(struct osmo_dgram_tx *conn, uint16_t port)
Set the local port from which we transmit.
Definition: datagram.c:178
osmo_dgram_set_local_addr
void osmo_dgram_set_local_addr(struct osmo_dgram *conn, const char *addr)
Set the local address to which we bind.
Definition: datagram.c:450
osmo_dgram_rx_open
int osmo_dgram_rx_open(struct osmo_dgram_rx *conn)
Open the datagram receiver.
Definition: datagram.c:348
osmo_dgram_rx_set_port
void osmo_dgram_rx_set_port(struct osmo_dgram_rx *conn, uint16_t port)
Set the local port to which we bind.
Definition: datagram.c:321