MediaProcessors
Classes | Macros | Typedefs | Functions | Variables
comm_udp.c File Reference
#include "comm_udp.h"
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/select.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <errno.h>
#include <sys/types.h>
#include <inttypes.h>
#include <pthread.h>
#include <arpa/inet.h>
#include <sys/ioctl.h>
#include "check_utils.h"
#include "log.h"
#include "stat_codes.h"
#include "comm.h"
#include "uri_parser.h"
Include dependency graph for comm_udp.c:

Go to the source code of this file.

Classes

struct  comm_udp_ctx_s
 

Macros

#define UDP_COM_ADDR_IS_MULTICAST(addr)   IN_MULTICAST(htonl(addr))
 
#define UDP_COM_SOCKET_PROT   0
 
#define UDP_COM_DATAGRAM_BUF_SIZE   (1024*1024*1024)
 

Typedefs

typedef struct comm_udp_ctx_s comm_udp_ctx_t
 

Functions

static comm_ctx_tcomm_udp_open (const char *url, const char *local_url, comm_mode_t comm_mode, log_ctx_t *log_ctx, va_list arg)
 
static void comm_udp_close (comm_ctx_t **ref_comm_ctx)
 
static int comm_udp_send (comm_ctx_t *comm_ctx, const void *buf, size_t count, struct timeval *timeout)
 
static int comm_udp_recv (comm_ctx_t *comm_ctx, void **ref_buf, size_t *ref_count, char **ref_from, struct timeval *timeout)
 
static int comm_udp_unblock (comm_ctx_t *comm_ctx)
 

Variables

const comm_if_t comm_if_udp
 

Detailed Description

Author
Rafael Antoniello

Definition in file comm_udp.c.

Typedef Documentation

Module instance context structure

Variable Documentation

const comm_if_t comm_if_udp
Initial value:
=
{
"udp",
comm_udp_open,
comm_udp_close,
comm_udp_send,
comm_udp_recv,
comm_udp_unblock
}

Communication protocol interface implementing the User Data Protocol (UDP).

Definition at line 102 of file comm_udp.c.