Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

rubicon_mangle.c File Reference

Modify packet contents and payloads (NB doesn't actually output). More...

#include "../../main/outplug.h"
#include "../../main/packet.h"
#include "../../main/memory.h"

Go to the source code of this file.

Defines

#define DEBUG_MANGLE   0

Functions

int pluginRegister (INPLUG **inp, ANPLUG **anp, PROTOPLUG **protop, OUTPLUG **outp, int(*DecodeCallback)(PACKET*,PROTO))
 Registration function. More...

int pluginInit (int ct, char **inits)
 Initialise the plugin. More...

int pluginCleanup (int reason)
 Cleanup the plugin. More...

int pluginOutput (PACKET *p, char *args)
 Outputs something. Maybe. More...


Detailed Description

Modify packet contents and payloads (NB doesn't actually output).

Definition in file rubicon_mangle.c.


Define Documentation

#define DEBUG_MANGLE   0
 

Definition at line 16 of file rubicon_mangle.c.


Function Documentation

int pluginCleanup ( int reason )
 

Cleanup the plugin.

Parameters:
reason   (int) The reason for the cleanup.

This call should always be made before closing the program, or reinitialising the plugin. It frees all the memory allocated and still held internally (i.e. it doesn't free memory that it has a pointer to but has passed elsewhere). Additionally, files are closed etc.

Definition at line 90 of file rubicon_mangle.c.

int pluginInit ( int ct,
char ** inits )
 

Initialise the plugin.

Parameters:
ct   (int) Number of initialisation strings
inits   (char **) Array of ct initialisation strings

Definition at line 73 of file rubicon_mangle.c.

int pluginOutput ( PACKET * p,
char * args )
 

Outputs something. Maybe.

Parameters:
p   (PACKET*) The packet to output
args   (char*) Description of what to output

The exact contents of the args differs widely between plugins. This plugin doesn't actually output anything. Instead, it messes around with the contents of the packet. Due to sequence number issues, it is normally no possible to shorten or lengthen the packet. The modified flag must be set on any modified protocol, so that checksums can be recalculated if required.

Definition at line 117 of file rubicon_mangle.c.

int pluginRegister ( INPLUG ** inp,
ANPLUG ** anp,
PROTOPLUG ** protop,
OUTPLUG ** outp,
int(* DecodeCallback)(PACKET *,PROTO) )
 

Registration function.

Parameters:
inp   (INPLUG**) Placeholder for input plugin descriptor
anp   (ANPLUG**) Placeholder for analysis plugin descriptor
protop   (PROTOPLUG**) Placeholder for protocol plugin descriptor
outp   (OUTPLUG**) Placeholder for output plugin descriptor
DecodeCallback   (function ptr) Pointer to generic decode function

This function is called by the main process in order to register the plugin. The function then populates the placeholders for the plugin types it supports, and sets all others to null. The DecodeCallback function is stored in case the plugin ever wants to decode anything.

Definition at line 39 of file rubicon_mangle.c.


Generated at Mon Jul 8 15:16:50 2002 for RUBICON by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000