完成HTTP请求侧解析调试,可以解析请求的URL。
* 增加插件管理功能(简单实现),可以调用解析层插件; * 调整HTTP请求侧解析回调函数实现; * 增加hexdump工具函数;
This commit is contained in:
30
common/src/tfe_plugin.cpp
Normal file
30
common/src/tfe_plugin.cpp
Normal file
@@ -0,0 +1,30 @@
|
||||
|
||||
#include <tfe_plugin.h>
|
||||
|
||||
#ifndef TFE_PLUGIN_MAX
|
||||
#define TFE_PLUGIN_MAX 128
|
||||
#endif
|
||||
|
||||
static struct tfe_plugin * __g_tfe_plugin_info[TFE_PLUGIN_MAX];
|
||||
static unsigned int __g_nr_plugin_info = 0;
|
||||
|
||||
void tfe_plugin_register(struct tfe_plugin * plugin)
|
||||
{
|
||||
__g_tfe_plugin_info[__g_nr_plugin_info++] = plugin;
|
||||
}
|
||||
|
||||
void tfe_plugin_unregister(struct tfe_plugin * plugin)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
struct tfe_plugin * tfe_plugin_iterate(unsigned int * iterate)
|
||||
{
|
||||
if (*iterate < __g_nr_plugin_info) return __g_tfe_plugin_info[(*iterate)++];
|
||||
else return NULL;
|
||||
}
|
||||
|
||||
unsigned int tfe_plugin_total_counts()
|
||||
{
|
||||
return __g_nr_plugin_info;
|
||||
}
|
||||
Reference in New Issue
Block a user