Defines | Functions | Variables

spp_ai.c File Reference

#include "spp_ai.h"
#include "preprocids.h"
#include "sf_dynamic_preproc_lib.h"
#include "sf_dynamic_preprocessor.h"
#include "debug.h"
#include "sfPolicy.h"
#include "sfPolicyUserData.h"
#include <sys/types.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <pthread.h>

Defines

#define GENERATOR_EXAMPLE   256
#define SRC_PORT_MATCH   1
#define SRC_PORT_MATCH_STR   "example_preprocessor: src port match"
#define DST_PORT_MATCH   2
#define DST_PORT_MATCH_STR   "example_preprocessor: dest port match"

Functions

static void AI_init (char *args)
 Initialize the preprocessor module.
static void AI_process (void *pkt, void *context)
 Function executed every time the module receives a packet to be processed.
static AI_configAI_parse (char *args)
 Parse the arguments passed to the module saving them to a valid configuration struct.
void AI_setup (void)
 Set up the preprocessor module.

Variables

tSfPolicyUserContextId ex_config = NULL
DynamicPreprocessorData _dpd

Define Documentation

#define DST_PORT_MATCH   2
#define DST_PORT_MATCH_STR   "example_preprocessor: dest port match"
#define GENERATOR_EXAMPLE   256
#define SRC_PORT_MATCH   1
#define SRC_PORT_MATCH_STR   "example_preprocessor: src port match"

Function Documentation

static void AI_init ( char *  args  )  [static]

Initialize the preprocessor module.

FUNCTION: AI_init

Parameters:
args Configuration arguments passed to the module
static AI_config * AI_parse ( char *  args  )  [static]

Parse the arguments passed to the module saving them to a valid configuration struct.

FUNCTION: AI_config

Parameters:
args Arguments passed to the module
Returns:
Pointer to AI_config keeping the configuration for the module
void AI_process ( void *  pkt,
void *  context 
) [static]

Function executed every time the module receives a packet to be processed.

FUNCTION: AI_process

Parameters:
pkt void* pointer to the packet data
context void* pointer to the context
void AI_setup ( void   ) 

Set up the preprocessor module.

FUNCTION: AI_setup


Variable Documentation

DynamicPreprocessorData _dpd
tSfPolicyUserContextId ex_config = NULL
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines