Commit 8bd2c54b authored by 's avatar
Browse files

fixes in cooking



git-svn-id: file:///home/svn/mapi/trunk@194 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 4cb45bd4
//Tue Feb 8 15:15:28 2005
//Wed Sep 28 15:07:02 2005
//This file was created automatically by createlib.pl
#include <stdio.h>
......@@ -12,24 +12,24 @@ __attribute__ ((destructor)) void fini ();
mapidflib_functionlist_t functions[3];
extern mapidflib_function_def_t * anonprint_get_funct_info();
extern mapidflib_function_def_t * anonymize_get_funct_info();
extern mapidflib_function_def_t * uncook_get_funct_info();
extern mapidflib_function_def_t * anonprint_get_funct_info();
mapidflib_functionlist_t* mapidflib_get_function_list()
{
functions[0].def=anonymize_get_funct_info();
functions[0].def=anonprint_get_funct_info();
functions[0].def->libname=libname;
functions[0].next=&functions[1];
functions[1].def=uncook_get_funct_info();
functions[1].def=anonymize_get_funct_info();
functions[1].def->libname=libname;
functions[1].next=&functions[2];
functions[2].def=anonprint_get_funct_info();
functions[2].def=uncook_get_funct_info();
functions[2].def->libname=libname;
functions[2].next=NULL;
return &functions[0];
}
......
No preview for this file type
......@@ -1002,7 +1002,7 @@ static mapidflib_function_def_t finfo={
"", //libname
"MAPI_ANONYMIZE", //name
"Anonymizes packets (header and payload) based on certain rules", //descr
"iii", //argdescr
"", //argdescr
MAPI_DEVICE_ALL, //devtype
MAPIRES_NONE, //Method for returning results
0, //shm size
......
......@@ -50,9 +50,9 @@ static int anonprint_process(mapidflib_function_instance_t *instance,const unsig
static mapidflib_function_def_t anonprintfinfo={
"", //libname
"ANON_PRINT_PKT", //name
"PRINT_PACKET", //name
"Prints a packet to standard output", //descr
"i", //argdescr
"", //argdescr
MAPI_DEVICE_ALL, //devtype
MAPIRES_NONE, //Method for returning results
0, //shm size
......
......@@ -787,9 +787,6 @@ mapid_get_lib_name(int libnumber)
void
mapid_process_pkt(mapidlib_instance_t *i,
const unsigned char* dev_pkt,
......
......@@ -23,7 +23,6 @@
#define int_ntoa(x) inet_ntoa(*((struct in_addr *)&x))
#define COOKING "COOKING"
#define SERVER 0
#define CLIENT 1
#define FRAG_BUF_SIZE 16*1024
......@@ -54,7 +53,7 @@ int un_cooked_pkts = 0;
unsigned char *last_dev_pkt;
int callbacks=0;
struct mapidlibflow *cook_tmp_flow;
struct mapidlibflow *cook_tmp_flow=NULL;
static int cook_instance(mapidflib_function_instance_t* instance, flist_t *flist, mapidflib_flow_mod_t *flow_mod,function_manipulation_t* manip)
{
......@@ -63,6 +62,7 @@ static int cook_instance(mapidflib_function_instance_t* instance, flist_t *flist
struct mapidlibflow *flow=NULL;
mapidlib_instance_t *i;
i = flow_mod->mi;
n = flist_head(i->flowlist);
......@@ -392,7 +392,7 @@ static int cook_init(mapidflib_function_instance_t *instance,
// return 1 in order for processing to continue in other functions
// return 0 not to
static int cook_process(mapidflib_function_instance_t *instance,unsigned char* dev_pkt, unsigned char* link_pkt, mapid_pkthdr_t* pkt_head)
static int cook_process(mapidflib_function_instance_t *instance,const unsigned char* dev_pkt,const unsigned char* link_pkt, mapid_pkthdr_t* pkt_head)
{
struct pcap_pkthdr h;
......@@ -535,15 +535,16 @@ static int cook_process(mapidflib_function_instance_t *instance,unsigned char* d
static int cook_cleanup(mapidflib_function_instance_t *instance)
{
return 0;
}
//////////////////////////////////////////////
static mapidflib_function_def_t finfo =
static mapidflib_function_def_t cooking_finfo =
{
"", //libname
COOKING, //name
"Cooking TCP/IP packets\nParameters:\n\tthreshold : int\n\ttimeout : int\n", //Description
"COOKING", //name
"Cooking TCP/IP packets", //Description
"ii", //argdescr
MAPI_DEVICE_ALL, //Devoid
MAPIRES_NONE,
......@@ -565,5 +566,5 @@ mapidflib_function_def_t* cooking_get_funct_info();
mapidflib_function_def_t* cooking_get_funct_info()
{
return &finfo;
return &cooking_finfo;
};
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment