summaryrefslogtreecommitdiff
path: root/src/common/HPM.h
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-10-04 16:12:09 -0300
committershennetsind <ind@henn.et>2013-10-04 16:12:09 -0300
commita49787ff1589d86efa87263676761ddcbecd64ce (patch)
tree3f4c4f003f261d51995f0e3ff7092bbf82bbab68 /src/common/HPM.h
parent2f2afbd3b63a75695f8f96e3bcb4db9fff5a7dc6 (diff)
downloadhercules-a49787ff1589d86efa87263676761ddcbecd64ce.tar.gz
hercules-a49787ff1589d86efa87263676761ddcbecd64ce.tar.bz2
hercules-a49787ff1589d86efa87263676761ddcbecd64ce.tar.xz
hercules-a49787ff1589d86efa87263676761ddcbecd64ce.zip
HPM: Hooking!
http://hercules.ws/board/topic/2399-hpm-hooking-now-available/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/common/HPM.h')
-rw-r--r--src/common/HPM.h8
1 files changed, 6 insertions, 2 deletions
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;