![]() |
The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Utility functions for managing UDP sockets. More...
#include <freeradius-devel/util/log.h>#include <freeradius-devel/util/socket.h>#include <freeradius-devel/util/syserror.h>#include <freeradius-devel/util/udp.h>
Include dependency graph for udp.c:Go to the source code of this file.
Macros | |
| #define | FR_DEBUG_STRERROR_PRINTF if (fr_debug_lvl) fr_strerror_printf |
Functions | |
| ssize_t | udp_recv (int sockfd, int flags, fr_socket_t *socket_out, void *data, size_t data_len, fr_time_t *when) |
| Read a UDP packet. | |
| int | udp_recv_discard (int sockfd) |
| Discard the next UDP packet. | |
| 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. | |
| int | udp_send (fr_socket_t const *sock, int flags, void *data, size_t data_len) |
| Send a packet via a UDP socket. | |
Utility functions for managing UDP sockets.
Definition in file udp.c.
| #define FR_DEBUG_STRERROR_PRINTF if (fr_debug_lvl) fr_strerror_printf |
| ssize_t udp_recv | ( | int | sockfd, |
| int | flags, | ||
| fr_socket_t * | socket_out, | ||
| void * | data, | ||
| size_t | data_len, | ||
| fr_time_t * | when | ||
| ) |
Read a UDP packet.
| [in] | sockfd | we're reading from. |
| [in] | flags | for things |
| [out] | socket_out | Information about the src/dst address of the packet and the interface it was received on. |
| [out] | data | pointer where data will be written |
| [in] | data_len | length of data to read |
| [out] | when | the packet was received. |
Definition at line 144 of file udp.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int udp_recv_discard | ( | int | sockfd | ) |
| 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.
| [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 95 of file udp.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int udp_send | ( | fr_socket_t const * | sock, |
| int | flags, | ||
| void * | data, | ||
| size_t | data_len | ||
| ) |
Send a packet via a UDP socket.
| [in] | sock | we're reading from. |
| [in] | flags | to pass to send(), or sendto() |
| [in] | data | to data to send |
| [in] | data_len | length of data to send |
Definition at line 42 of file udp.c.
Here is the call graph for this function:
Here is the caller graph for this function:
1.9.8