Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* Header for analysis_flow utility methods */
#ifndef _Included_analysis_h
#define _Included_analysis_h
#ifdef __cplusplus
extern "C" {
#define EXTERN extern "C"
#endif
#include <stdint.h>
#include <stdint.h>
#include "export.h"
#include <jni.h>
#include "org_jnetpcap_packet_analysis_Analysis.h"
#include "org_jnetpcap_packet_analysis_AnalysisUtils.h"
#define ROOT_TYPE org_jnetpcap_analysis_AnalysisUtils_ROOT_TYPE
/*
* A header for every analysis object
*/
typedef struct analysis_t {
uint16_t type;
uint16_t len; // length so we can walk unknown analysis types
} analysis_t;
/*
* Roots are embeded in packet_state_t and header_state_t objects
*/
typedef struct root_analysis_t {
uint16_t type; // == ROOT_TYPE
uint16_t len; // length so we can walk unknown analysis types
analysis_t *child;
};
typedef void (*native_analyzer_func_t)(packet_state_t *packet);
extern native_analyzer_func_t native_analyzers[];
typedef struct analyzer_t {
native_analyzer_func_t analyzers[64][4];
} analyzer_t;
#ifdef __cplusplus
}
#endif
#endif