netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
udp.c File Reference
#include "udp.h"
#include <stdio.h>
#include <stdlib.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <string.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <errno.h>
#include <limits.h>
Include dependency graph for udp.c:

Macros

#define SO_RCVBUFFORCE   33
 
#define SO_SNDBUFFORCE   32
 

Functions

struct udp_sockudp_server_create (struct udp_conf *conf)
 
void udp_server_destroy (struct udp_sock *m)
 
struct udp_sockudp_client_create (struct udp_conf *conf)
 
void udp_client_destroy (struct udp_sock *m)
 
ssize_t udp_send (struct udp_sock *m, const void *data, int size)
 
ssize_t udp_recv (struct udp_sock *m, void *data, int size)
 
int udp_get_fd (struct udp_sock *m)
 
int udp_isset (struct udp_sock *m, fd_set *readfds)
 
int udp_snprintf_stats (char *buf, size_t buflen, char *ifname, struct udp_stats *s, struct udp_stats *r)
 
int udp_snprintf_stats2 (char *buf, size_t buflen, const char *ifname, const char *status, int active, struct udp_stats *s, struct udp_stats *r)
 

Macro Definition Documentation

#define SO_RCVBUFFORCE   33

Referenced by udp_server_create().

#define SO_SNDBUFFORCE   32

Referenced by udp_client_create().

Function Documentation

void udp_client_destroy ( struct udp_sock m)

References udp_sock::fd.

int udp_get_fd ( struct udp_sock m)

References udp_sock::fd.

int udp_isset ( struct udp_sock m,
fd_set *  readfds 
)

References udp_sock::fd.

ssize_t udp_recv ( struct udp_sock m,
void *  data,
int  size 
)
ssize_t udp_send ( struct udp_sock m,
const void *  data,
int  size 
)
void udp_server_destroy ( struct udp_sock m)

References udp_sock::fd.

int udp_snprintf_stats ( char *  buf,
size_t  buflen,
char *  ifname,
struct udp_stats s,
struct udp_stats r 
)
int udp_snprintf_stats2 ( char *  buf,
size_t  buflen,
const char *  ifname,
const char *  status,
int  active,
struct udp_stats s,
struct udp_stats r 
)