From a49787ff1589d86efa87263676761ddcbecd64ce Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 4 Oct 2013 16:12:09 -0300 Subject: HPM: Hooking! http://hercules.ws/board/topic/2399-hpm-hooking-now-available/ Signed-off-by: shennetsind --- src/common/HPM.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/common/HPM.h') diff --git a/src/common/HPM.h b/src/common/HPM.h index 614498fd3..395555948 100644 --- a/src/common/HPM.h +++ b/src/common/HPM.h @@ -79,6 +79,9 @@ struct HPM_interface { /* vars */ unsigned int version[2]; bool off; + bool hooking; + /* hooking */ + bool force_return; /* data */ struct hplugin **plugins; unsigned int plugin_count; @@ -94,12 +97,12 @@ struct HPM_interface { void (*init) (void); void (*final) (void); struct hplugin * (*create) (void); - void (*load) (const char* filename); + struct hplugin * (*load) (const char* filename); void (*unload) (struct hplugin* plugin); bool (*exists) (const char *filename); bool (*iscompatible) (char* version); void (*event) (enum hp_event_types type); - void *(*import_symbol) (char *); + void *(*import_symbol) (char *name, unsigned int pID); void (*share) (void *, char *); void (*symbol_defaults) (void); void (*config_read) (void); @@ -108,6 +111,7 @@ struct HPM_interface { char *(*pid2name) (unsigned int pid); unsigned char (*parse_packets) (int fd, enum HPluginPacketHookingPoints point); void (*load_sub) (struct hplugin *plugin); + bool (*addhook_sub) (enum HPluginHookType type, const char *target, void *hook, unsigned int pID); } HPM_s; struct HPM_interface *HPM; -- cgit v1.2.3-60-g2f50