[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 |
Splash - DocumentationSNMP Plus a Lightweight API for SNAP Handlingsnap-1.1-wjdb/src/snap_demux_handler.hGo to the documentation of this file.00001 /* 00002 * snap_demux_handler.h : functions for retrieving DEMUXed data 00003 */ 00004 00005 /* maximum size of a buffer */ 00006 #define SNAP_BUFLEN 3924 00007 00008 /* various implemented protocols */ 00009 #define SNAP_UNIX 0x1 00010 #define SNAP_RAWIP 0x2 00011 #define SNAP_UDP 0x4 00012 00013 /* used to pass a handler function */ 00014 typedef void (*buffer_handler)(char*); 00015 00016 /* has to be declared in caller application (ip portnumber) */ 00017 extern short int receiveport; 00018 00019 /* general functions */ 00020 int snap_demux_init(int); /* initialize the various protocols (see defines above) */ 00021 int snap_demux_receive(buffer_handler); /* receive and call handler */ 00022 int snap_demux_select(); /* our select(..) wrapper */ 00023 void snap_demux_close(); /* close all sockets and shut down */ 00024 00025 int snap_demux_handler(buffer_handler); /* call select(..) and receive a packet */ 00026 00027 /* buffer handler functions */ 00028 00029 void snap_demux_buffer_noop(char*); /* do nothing */ 00030 void snap_demux_buffer_print(char*); /* print the contents of the buffer to stderr using local code */ 00031 void snap_demux_buffer_print_unsafe(char*); /* print the contents of the buffer to stderr using fprintf */ |