All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
udp.h File Reference

Abstraction API for sending and receiving packets on UDP sockets. More...

#include <freeradius-devel/libradius.h>
+ Include dependency graph for udp.h:

Go to the source code of this file.

Macros

#define UDP_FLAGS_CONNECTED   (1 << 0)
 
#define UDP_FLAGS_NONE   (0)
 
#define UDP_FLAGS_PEEK   (1 << 1)
 

Functions

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)
 

Detailed Description

Abstraction API for sending and receiving packets on UDP sockets.

Id:
8f71e6c0bcf20df5a39df94c5a21ea4e1bb3bf54

Definition in file udp.h.

Macro Definition Documentation

#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.

Function Documentation

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 
)

+ Here is the caller graph for this function:

void udp_recv_discard ( int  sockfd)

Discard the next UDP packet.

Parameters
[in]sockfdwe're reading from.

Definition at line 105 of file udp.c.

+ Here is the caller graph for this function:

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]sockfdwe're reading from.
[out]datapointer where data will be written
[in]data_lenlength of data to read
[in]flagsfor things
[out]src_ipaddrof the packet.
[out]src_portof the packet.

Definition at line 125 of file udp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 
)

+ Here is the caller graph for this function: