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

Data Structures

struct  channel_buffer
 
struct  channel_error
 

Functions

int channel_init (void)
 
void channel_end (void)
 
struct channelchannel_open (struct channel_conf *cfg)
 
void channel_close (struct channel *c)
 
int channel_send (struct channel *c, const struct nethdr *net)
 
int channel_send_flush (struct channel *c)
 
int channel_recv (struct channel *c, char *buf, int size)
 
int channel_get_fd (struct channel *c)
 
void channel_stats (struct channel *c, int fd)
 
void channel_stats_extended (struct channel *c, int active, struct nlif_handle *h, int fd)
 
int channel_accept_isset (struct channel *c, fd_set *readfds)
 
int channel_isset (struct channel *c, fd_set *readfds)
 
int channel_accept (struct channel *c)
 
int channel_type (struct channel *c)
 

Variables

struct channel_ops channel_mcast
 
struct channel_ops channel_udp
 
struct channel_ops channel_tcp
 

Function Documentation

int channel_accept ( struct channel c)
int channel_accept_isset ( struct channel c,
fd_set *  readfds 
)
void channel_close ( struct channel c)

References channel::buffer, CHANNEL_F_BUFFERED, channel::channel_flags, channel_ops::close, channel::data, and channel::ops.

Referenced by multichannel_close(), and multichannel_open().

Here is the caller graph for this function:

void channel_end ( void  )

References queue_destroy().

Here is the call graph for this function:

int channel_get_fd ( struct channel c)
int channel_init ( void  )

References CHANNEL_MCAST, channel_mcast, CHANNEL_TCP, channel_tcp, CHANNEL_UDP, channel_udp, CONFIG, NULL, and queue_create().

Here is the call graph for this function:

int channel_isset ( struct channel c,
fd_set *  readfds 
)

References channel_ops::isset, and channel::ops.

int channel_recv ( struct channel c,
char *  buf,
int  size 
)

References channel::data, channel::ops, and channel_ops::recv.

Referenced by multichannel_recv().

Here is the caller graph for this function:

int channel_send ( struct channel c,
const struct nethdr net 
)
int channel_send_flush ( struct channel c)
void channel_stats ( struct channel c,
int  fd 
)

References channel::ops, and channel_ops::stats.

Referenced by multichannel_stats().

Here is the caller graph for this function:

void channel_stats_extended ( struct channel c,
int  active,
struct nlif_handle h,
int  fd 
)

References channel::ops, and channel_ops::stats_extended.

Referenced by multichannel_stats_extended().

Here is the caller graph for this function:

int channel_type ( struct channel c)

References channel::ops, and channel_ops::type.

Variable Documentation

struct channel_ops channel_mcast

Referenced by channel_init().

struct channel_ops channel_tcp

Referenced by channel_init().

struct channel_ops channel_udp

Referenced by channel_init().