[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_exec.c File Reference

#include <time.h>
#include <sys/time.h>
#include "../lib/libsnap.h"
#include <arpa/inet.h>
#include <assert.h>
#include <fcntl.h>
#include <netinet/ip.h>
#include <netdb.h>
#include <netinet/in.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "../lib/snap.h"
#include "../lib/bytecode.h"
#include "../lib/packet.h"
#include "../lib/d_printf.h"
#include "../lib/memalloc.h"
#include "../lib/io.h"
#include <pthread.h>
#include "snap_demux_handler.h"

Include dependency graph for snap_exec.c:

Include dependency graph

Go to the source code of this file.


Defines

#define NIPQUAD(addr)
#define IPPROTO_SNAP   130

Functions

char * basename (const char *)
void parse_cmdline (int argc, char **argv)
int compare_longints (const void *a, const void *b)
int init_request (int argc, char **argv)
void sendpkt ()
void usage (int argc, char **argv)
int main (int argc, char **argv)

Variables

unsigned char out_ttl = 32
short int receiveport = 7777
sockaddr_in destaddr
sockaddr_in srcaddr
sockaddr_in localaddr
int infd
buffer_t inbuf
int sd

Define Documentation

#define IPPROTO_SNAP   130
 

Definition at line 41 of file snap_exec.c.

Referenced by init_request().

#define NIPQUAD addr   
 

Value:

((unsigned char *)&addr)[0], \
        ((unsigned char *)&addr)[1], \
        ((unsigned char *)&addr)[2], \
        ((unsigned char *)&addr)[3]

Definition at line 35 of file snap_exec.c.


Function Documentation

char* basename const char *   
 

int compare_longints const void *    a,
const void *    b
 

Definition at line 57 of file snap_exec.c.

int init_request int    argc,
char **    argv
 

Definition at line 64 of file snap_exec.c.

References d_printf(), snaphdr::daddr, destaddr, file_to_str(), snaphdr::flags, infd, IPPROTO_SNAP, buffer_t::lenb, out_ttl, parse_cmdline(), ra_space, receiveport, snaphdr::saddr, sd, snaphdr::sport, srcaddr, and snaphdr::version.

int main int    argc,
char **    argv
 

Definition at line 242 of file snap_exec.c.

References buffer_handler, init_request(), sendpkt(), snap_demux_close(), snap_demux_handler(), snap_demux_init(), and SNAP_UDP.

void parse_cmdline int    argc,
char **    argv
 

Definition at line 130 of file snap_exec.c.

References basename(), destaddr, infd, infilename, out_ttl, receiveport, srcaddr, and usage().

void sendpkt  
 

Definition at line 111 of file snap_exec.c.

References buffer_t::lenb, localaddr, buffer_t::s, and sd.

Referenced by main().

void usage int    argc,
char **    argv
 

Definition at line 123 of file snap_exec.c.

References basename().


Variable Documentation

struct sockaddr_in destaddr
 

Definition at line 46 of file snap_exec.c.

Referenced by init_request(), and parse_cmdline().

buffer_t inbuf
 

Definition at line 54 of file snap_exec.c.

int infd
 

Definition at line 53 of file snap_exec.c.

Referenced by init_request(), and parse_cmdline().

struct sockaddr_in localaddr
 

Definition at line 48 of file snap_exec.c.

Referenced by sendpkt().

unsigned char out_ttl = 32
 

Definition at line 44 of file snap_exec.c.

Referenced by init_request(), and parse_cmdline().

short int receiveport = 7777
 

Definition at line 45 of file snap_exec.c.

Referenced by init_request(), and parse_cmdline().

int sd
 

Definition at line 55 of file snap_exec.c.

Referenced by init_request(), and sendpkt().

struct sockaddr_in srcaddr
 

Definition at line 47 of file snap_exec.c.

Referenced by init_request(), and parse_cmdline().