netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
channel.h File Reference
#include "mcast.h"
#include "udp.h"
#include "tcp.h"
Include dependency graph for channel.h:
This graph shows which files directly or indirectly include this file:

Data Structures

struct  mcast_channel
 
struct  udp_channel
 
struct  tcp_channel
 
union  channel_type_conf
 
struct  channel_conf
 
struct  channel_ops
 
struct  channel
 
struct  multichannel
 

Macros

#define CHANNEL_F_DEFAULT   (1 << 0)
 
#define CHANNEL_F_BUFFERED   (1 << 1)
 
#define CHANNEL_F_STREAM   (1 << 2)
 
#define CHANNEL_F_ERRORS   (1 << 3)
 
#define CHANNEL_F_ACCEPT   (1 << 4)
 
#define CHANNEL_F_MAX   (1 << 5)
 
#define CHANNEL_T_DATAGRAM   0
 
#define CHANNEL_T_STREAM   1
 
#define MULTICHANNEL_MAX   4
 

Enumerations

enum  {
  CHANNEL_NONE,
  CHANNEL_MCAST,
  CHANNEL_UDP,
  CHANNEL_TCP,
  CHANNEL_MAX
}
 

Functions

int channel_init (void)
 
void channel_end (void)
 
struct channelchannel_open (struct channel_conf *conf)
 
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_accept (struct channel *c)
 
int channel_get_fd (struct channel *c)
 
int channel_accept_isset (struct channel *c, fd_set *readfds)
 
int channel_isset (struct channel *c, fd_set *readfds)
 
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_type (struct channel *c)
 
struct multichannelmultichannel_open (struct channel_conf *conf, int len)
 
void multichannel_close (struct multichannel *m)
 
int multichannel_send (struct multichannel *c, const struct nethdr *net)
 
int multichannel_send_flush (struct multichannel *c)
 
int multichannel_recv (struct multichannel *c, char *buf, int size)
 
void multichannel_stats (struct multichannel *m, int fd)
 
void multichannel_stats_extended (struct multichannel *m, struct nlif_handle *h, int fd)
 
int multichannel_get_ifindex (struct multichannel *m, int i)
 
int multichannel_get_current_ifindex (struct multichannel *m)
 
void multichannel_set_current_channel (struct multichannel *m, int i)
 
void multichannel_change_current_channel (struct multichannel *m, struct channel *c)
 

Macro Definition Documentation

#define CHANNEL_F_ACCEPT   (1 << 4)
#define CHANNEL_F_BUFFERED   (1 << 1)
#define CHANNEL_F_DEFAULT   (1 << 0)

Referenced by multichannel_open().

#define CHANNEL_F_ERRORS   (1 << 3)

Referenced by channel_send(), and channel_send_flush().

#define CHANNEL_F_MAX   (1 << 5)

Referenced by channel_open().

#define CHANNEL_F_STREAM   (1 << 2)
#define CHANNEL_T_DATAGRAM   0
#define CHANNEL_T_STREAM   1
#define MULTICHANNEL_MAX   4

Referenced by multichannel_open().

Enumeration Type Documentation

anonymous enum
Enumerator
CHANNEL_NONE 
CHANNEL_MCAST 
CHANNEL_UDP 
CHANNEL_TCP 
CHANNEL_MAX 

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.

void multichannel_change_current_channel ( struct multichannel m,
struct channel c 
)

References multichannel::current.

void multichannel_close ( struct multichannel m)

References multichannel::channel, channel_close(), and multichannel::channel_num.

Here is the call graph for this function:

int multichannel_get_current_ifindex ( struct multichannel m)
int multichannel_get_ifindex ( struct multichannel m,
int  i 
)
struct multichannel* multichannel_open ( struct channel_conf conf,
int  len 
)
int multichannel_recv ( struct multichannel c,
char *  buf,
int  size 
)

References channel_recv(), and multichannel::current.

Here is the call graph for this function:

int multichannel_send ( struct multichannel c,
const struct nethdr net 
)

References channel_send(), and multichannel::current.

Here is the call graph for this function:

int multichannel_send_flush ( struct multichannel c)

References channel_send_flush(), and multichannel::current.

Here is the call graph for this function:

void multichannel_set_current_channel ( struct multichannel m,
int  i 
)
void multichannel_stats ( struct multichannel m,
int  fd 
)

References channel_stats(), and multichannel::current.

Here is the call graph for this function:

void multichannel_stats_extended ( struct multichannel m,
struct nlif_handle h,
int  fd 
)

References multichannel::channel, multichannel::channel_num, channel_stats_extended(), and multichannel::current.

Here is the call graph for this function: