Abstraction API for sending and receiving packets on UDP sockets.
More...
#include <freeradius-devel/libradius.h>
Go to the source code of this file.
|
ssize_t | udp_recv (int sockfd, void *data, size_t data_len, int flags, fr_ipaddr_t *src_ipaddr, uint16_t *src_port, fr_ipaddr_t *dst_ipaddr, uint16_t *dst_port, int *if_index, struct timeval *when) |
|
void | udp_recv_discard (int sockfd) |
| Discard the next UDP packet. More...
|
|
ssize_t | udp_recv_peek (int sockfd, void *data, size_t data_len, int flags, fr_ipaddr_t *src_ipaddr, uint16_t *src_port) |
| Peek at the header of a UDP packet. More...
|
|
ssize_t | udp_send (int sockfd, void *data, size_t data_len, int flags, fr_ipaddr_t *src_ipaddr, uint16_t src_port, int if_index, fr_ipaddr_t *dst_ipaddr, uint16_t dst_port) |
|
Abstraction API for sending and receiving packets on UDP sockets.
- Id:
- 8f71e6c0bcf20df5a39df94c5a21ea4e1bb3bf54
- Copyright
- 2015 The FreeRADIUS server project
Definition in file udp.h.
#define UDP_FLAGS_CONNECTED (1 << 0) |
Definition at line 39 of file udp.h.
#define UDP_FLAGS_NONE (0) |
Definition at line 38 of file udp.h.
#define UDP_FLAGS_PEEK (1 << 1) |
Definition at line 40 of file udp.h.
ssize_t udp_recv |
( |
int |
sockfd, |
|
|
void * |
data, |
|
|
size_t |
data_len, |
|
|
int |
flags, |
|
|
fr_ipaddr_t * |
src_ipaddr, |
|
|
uint16_t * |
src_port, |
|
|
fr_ipaddr_t * |
dst_ipaddr, |
|
|
uint16_t * |
dst_port, |
|
|
int * |
if_index, |
|
|
struct timeval * |
when |
|
) |
| |
void udp_recv_discard |
( |
int |
sockfd | ) |
|
Discard the next UDP packet.
- Parameters
-
[in] | sockfd | we're reading from. |
Definition at line 105 of file udp.c.
ssize_t udp_recv_peek |
( |
int |
sockfd, |
|
|
void * |
data, |
|
|
size_t |
data_len, |
|
|
int |
flags, |
|
|
fr_ipaddr_t * |
src_ipaddr, |
|
|
uint16_t * |
src_port |
|
) |
| |
Peek at the header of a UDP packet.
- Parameters
-
[in] | sockfd | we're reading from. |
[out] | data | pointer where data will be written |
[in] | data_len | length of data to read |
[in] | flags | for things |
[out] | src_ipaddr | of the packet. |
[out] | src_port | of the packet. |
Definition at line 125 of file udp.c.
ssize_t udp_send |
( |
int |
sockfd, |
|
|
void * |
data, |
|
|
size_t |
data_len, |
|
|
int |
flags, |
|
|
fr_ipaddr_t * |
src_ipaddr, |
|
|
uint16_t |
src_port, |
|
|
int |
if_index, |
|
|
fr_ipaddr_t * |
dst_ipaddr, |
|
|
uint16_t |
dst_port |
|
) |
| |