修改decrypt-mirror插件的文件名和目录结构。增加平台胶合层decrypt_mirror_plugin.h和decrypt_mirror_plugin.cpp
This commit is contained in:
15
plugin/business/decrypt-mirroring/include/external/decrypt_mirror_plugin.h
vendored
Normal file
15
plugin/business/decrypt-mirroring/include/external/decrypt_mirror_plugin.h
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
#include <tfe_stream.h>
|
||||
|
||||
int decrypt_mirror_init(void *proxy);
|
||||
|
||||
enum tfe_stream_action decrypt_mirror_on_open_cb(const struct tfe_stream * stream, unsigned int thread_id,
|
||||
enum tfe_conn_dir dir, const unsigned char * data, size_t len, void ** pme);
|
||||
|
||||
enum tfe_stream_action decrypt_mirror_on_data_cb(const struct tfe_stream * stream, unsigned int thread_id,
|
||||
enum tfe_conn_dir dir, const unsigned char * data, size_t len, void ** pme);
|
||||
|
||||
void decrypt_mirror_on_close_cb(const struct tfe_stream * stream, unsigned int thread_id,
|
||||
enum tfe_stream_close_reason reason, void ** pme);
|
||||
void decrypt_mirror_deinit(void);
|
||||
|
||||
@@ -3,21 +3,17 @@
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include <tfe_stream.h>
|
||||
|
||||
|
||||
#define DELIVER_DIR_C2S 0x01
|
||||
#define DELIVER_DIR_S2C 0x02
|
||||
|
||||
|
||||
struct deliver_addr_info
|
||||
struct origin_stream_addr
|
||||
{
|
||||
struct sockaddr client;
|
||||
struct sockaddr server;
|
||||
struct sockaddr* client;
|
||||
struct sockaddr* server;
|
||||
};
|
||||
|
||||
|
||||
@@ -31,7 +27,7 @@ Return:
|
||||
0:succes
|
||||
<0:error
|
||||
***************************************************************************/
|
||||
int deliver_init(int thread_num,char* filepath);
|
||||
int mirror_stream_init(int thread_num, const char* filepath);
|
||||
|
||||
|
||||
|
||||
@@ -45,7 +41,7 @@ Return:
|
||||
0:succes
|
||||
<0:error
|
||||
***************************************************************************/
|
||||
int deliver_session_start(int thread_seq,struct deliver_addr_info* addr,void** pme);
|
||||
int mirror_stream_open(struct origin_stream_addr* addr,void** pme);
|
||||
|
||||
|
||||
|
||||
@@ -61,7 +57,7 @@ Return:
|
||||
0:succes
|
||||
<0:error
|
||||
***************************************************************************/
|
||||
int deliver_session_data(int cur_dir,int thread_seq,int buflen,char*buf,void** pme);
|
||||
int mirror_stream_write(enum tfe_conn_dir cur_dir,const unsigned char * data, size_t len, void** pme,int thread_seq);
|
||||
|
||||
|
||||
|
||||
@@ -74,14 +70,7 @@ Return:
|
||||
0:succes
|
||||
<0:error
|
||||
***************************************************************************/
|
||||
int deliver_session_end(int thread_seq,void** pme);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
void mirror_stream_close(void** pme, int thread_id);
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef DELIVER_PRIVATE_H
|
||||
#define DELIVER_PRIVATE_H
|
||||
|
||||
#include <decrypt-mirroring.h>
|
||||
#include <mirror_stream.h>
|
||||
#include <MESA/field_stat2.h>
|
||||
|
||||
#ifndef MAX_THREAD_NUM
|
||||
@@ -12,8 +12,8 @@
|
||||
#define DELIVER_SENDPKT_BUFLEN 2048
|
||||
|
||||
//runtime log
|
||||
#define DELIVER_MODULE_INIT "deliver_init"
|
||||
#define DELIVER_MODULE_SENDPKT "deliver_sendpkt"
|
||||
#define DELIVER_MODULE_INIT "mirror_stream_init"
|
||||
#define DELIVER_MODULE_SENDPKT "mirror_stream_sendpkt"
|
||||
#define DELIVER_SENDPKT_START "sendpkt_start"
|
||||
#define DELIVER_SENDPKT_DEBUG "sendpkt_debug"
|
||||
#define DELIVER_RECVPKT_DEBUG "recvpkt_debug"
|
||||
@@ -76,7 +76,7 @@ struct deliver_comm_info
|
||||
|
||||
struct deliver_pkt_info
|
||||
{
|
||||
int dir;
|
||||
enum tfe_conn_dir dir;
|
||||
unsigned int seq; //host order
|
||||
unsigned int ack; //host order
|
||||
unsigned int len; //host order,tcp payload len
|
||||
@@ -99,7 +99,7 @@ struct deliver_session_info
|
||||
struct deliver_pme_info
|
||||
{
|
||||
unsigned char dst_macaddr[DELIVER_MACADDR_LEN];
|
||||
struct deliver_addr_info addr_info;
|
||||
struct origin_stream_addr addr_info;
|
||||
struct deliver_pkt_info pkt_info;
|
||||
struct deliver_session_info session_info;
|
||||
};
|
||||
Reference in New Issue
Block a user