Plugin Management support C plugin
This commit is contained in:
@@ -59,11 +59,12 @@ int main(int argc, char ** argv)
|
||||
struct plugin_manager *plug_mgr = plugin_manager_create();
|
||||
|
||||
// register build-in plugin
|
||||
plugin_manager_register(plug_mgr, "HTTP", http_decoder);
|
||||
plugin_manager_register(plug_mgr, "HTTP", SESSION_EVENT_ALL, http_decoder);
|
||||
|
||||
// load external plugins
|
||||
char absolute_plugin_file[] = "/op/tsg/sapp/plug/plugins.inf";
|
||||
plugin_manager_load(plug_mgr, absolute_plugin_file);
|
||||
char prefix_path[] = "/op/tsg/stellar/";
|
||||
char file_path[] = "./plugs/plugins.inf";
|
||||
plugin_manager_load(plug_mgr, prefix_path, file_path);
|
||||
|
||||
//packet_io_init
|
||||
struct packet_io_device *dev = packet_io_init(1, "stellar", "cap0");
|
||||
@@ -78,6 +79,7 @@ int main(int argc, char ** argv)
|
||||
usleep(1);
|
||||
}
|
||||
|
||||
plugin_manager_unload(plug_mgr);
|
||||
plugin_manager_destory(plug_mgr);
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user