[insert project logo here (125x200px max)]

Navigator

Mailinglists

Please report any errors or ommissions you find to our `Help' mailinglist, or post a message in the Forums.

Copyright and Licensing Information

Snap is (c) Jonathan T. Moore, 1999-2002 and licensed under the GNU General Public License (GPL).

All other parts of Splash are (c) Willem de Bruijn, 2002-2003 and licensed under the BSD Open Source License.

All sourcecode is made publicly available.

Acknowledgement

Splash and the Splash website are hosted by SourceForge.net

SourceForge.net Logo

osi-open source certified logo

Splash - Documentation

SNMP Plus a Lightweight API for SNAP Handling

Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

snap-1.1-wjdb/src/snap_demux_handler.c File Reference

#include <netinet/ip.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <ctype.h>
#include "../lib/d_printf.h"
#include "../lib/io.h"
#include "snap_demux_handler.h"

Include dependency graph for snap_demux_handler.c:

Include dependency graph

Go to the source code of this file.


Functions

void snap_demux_close_unix ()
int snap_demux_init_unix ()
void snap_demux_close_rawip ()
int snap_demux_init_rawip ()
void snap_demux_close_udp ()
int snap_demux_init_udp ()
void snap_demux_buffer_noop (char *pbuf)
void snap_demux_buffer_print_unsafe (char *pbuf)
void snap_demux_buffer_print (char *pbuf)
void snap_demux_close ()
int snap_demux_init (int protocols)
int snap_demux_receivefrom (int socket_waiting, buffer_handler active_handler)
int snap_demux_receive (buffer_handler active_handler)
int snap_demux_select ()
int snap_demux_handler (buffer_handler active_handler)

Variables

int socket_unix = -1
int socket_rawip = -1
int socket_udp = -1
int protocols_internal = 0
int max_filedes = -1
fd_set fdset

Function Documentation

void snap_demux_buffer_noop char *    pbuf
 

Definition at line 132 of file snap_demux_handler.c.

void snap_demux_buffer_print char *    pbuf
 

Definition at line 139 of file snap_demux_handler.c.

void snap_demux_buffer_print_unsafe char *    pbuf
 

Definition at line 135 of file snap_demux_handler.c.

void snap_demux_close  
 

Definition at line 170 of file snap_demux_handler.c.

References max_filedes, protocols_internal, snap_demux_close_rawip(), snap_demux_close_udp(), snap_demux_close_unix(), SNAP_RAWIP, SNAP_UDP, and SNAP_UNIX.

Referenced by main(), and snap_demux_init().

void snap_demux_close_rawip  
 

Definition at line 65 of file snap_demux_handler.c.

References socket_rawip.

Referenced by snap_demux_close(), and snap_demux_init_rawip().

void snap_demux_close_udp  
 

Definition at line 98 of file snap_demux_handler.c.

References socket_udp.

Referenced by snap_demux_close(), and snap_demux_init_udp().

void snap_demux_close_unix  
 

Definition at line 27 of file snap_demux_handler.c.

References socket_unix.

Referenced by snap_demux_close(), and snap_demux_init_unix().

int snap_demux_handler buffer_handler    active_handler
 

Definition at line 297 of file snap_demux_handler.c.

References buffer_handler, snap_demux_receive(), and snap_demux_select().

Referenced by main().

int snap_demux_init int    protocols
 

Definition at line 188 of file snap_demux_handler.c.

References d_printf(), fdset, max_filedes, protocols_internal, snap_demux_close(), snap_demux_init_rawip(), snap_demux_init_udp(), snap_demux_init_unix(), SNAP_RAWIP, SNAP_UDP, SNAP_UNIX, socket_rawip, socket_udp, and socket_unix.

Referenced by main().

int snap_demux_init_rawip  
 

Definition at line 73 of file snap_demux_handler.c.

References bindaddr, snap_demux_close_rawip(), and socket_rawip.

Referenced by snap_demux_init().

int snap_demux_init_udp  
 

Definition at line 106 of file snap_demux_handler.c.

References bindaddr, snap_demux_close_udp(), and socket_udp.

Referenced by snap_demux_init().

int snap_demux_init_unix  
 

Definition at line 40 of file snap_demux_handler.c.

References snap_demux_close_unix(), and socket_unix.

Referenced by snap_demux_init().

int snap_demux_receive buffer_handler    active_handler
 

Definition at line 251 of file snap_demux_handler.c.

References buffer_handler, d_printf_timed(), fdset, protocols_internal, snap_demux_receivefrom(), SNAP_RAWIP, SNAP_UDP, SNAP_UNIX, socket_rawip, socket_udp, and socket_unix.

Referenced by snap_demux_handler().

int snap_demux_receivefrom int    socket_waiting,
buffer_handler    active_handler
 

Definition at line 222 of file snap_demux_handler.c.

References buffer_handler, d_printf(), d_printf_timed(), and SNAP_BUFLEN.

Referenced by snap_demux_receive().

int snap_demux_select  
 

Definition at line 269 of file snap_demux_handler.c.

References d_printf_timed(), fdset, max_filedes, protocols_internal, SNAP_RAWIP, SNAP_UDP, SNAP_UNIX, socket_rawip, socket_udp, and socket_unix.

Referenced by snap_demux_handler().


Variable Documentation

fd_set fdset
 

Definition at line 21 of file snap_demux_handler.c.

Referenced by snap_demux_init(), snap_demux_receive(), snap_demux_select(), and snap_external_svclib_snmp_execpdu().

int max_filedes = -1
 

Definition at line 20 of file snap_demux_handler.c.

Referenced by snap_demux_close(), snap_demux_init(), and snap_demux_select().

int protocols_internal = 0
 

Definition at line 19 of file snap_demux_handler.c.

Referenced by snap_demux_close(), snap_demux_init(), snap_demux_receive(), and snap_demux_select().

int socket_rawip = -1
 

Definition at line 16 of file snap_demux_handler.c.

Referenced by snap_demux_close_rawip(), snap_demux_init(), snap_demux_init_rawip(), snap_demux_receive(), and snap_demux_select().

int socket_udp = -1
 

Definition at line 17 of file snap_demux_handler.c.

Referenced by snap_demux_close_udp(), snap_demux_init(), snap_demux_init_udp(), snap_demux_receive(), and snap_demux_select().

int socket_unix = -1
 

Definition at line 15 of file snap_demux_handler.c.

Referenced by snap_demux_close_unix(), snap_demux_init(), snap_demux_init_unix(), snap_demux_receive(), and snap_demux_select().