diff options
author | Haru <haru@dotalux.com> | 2015-09-15 12:52:08 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2015-10-11 00:24:20 +0200 |
commit | f17add758aa067f3b643e008dc42ec918b358528 (patch) | |
tree | 84d5640f652f2e4c6c546be5f95d8c1233ae0617 /src/common/HPM.h | |
parent | 5a9d6c05dba6aa00590b475f848964cd888c0a93 (diff) | |
download | hercules-f17add758aa067f3b643e008dc42ec918b358528.tar.gz hercules-f17add758aa067f3b643e008dc42ec918b358528.tar.bz2 hercules-f17add758aa067f3b643e008dc42ec918b358528.tar.xz hercules-f17add758aa067f3b643e008dc42ec918b358528.zip |
Changed HPM->symbols to a VECTOR
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/HPM.h')
-rw-r--r-- | src/common/HPM.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/common/HPM.h b/src/common/HPM.h index 5579dc2b1..6d44cd474 100644 --- a/src/common/HPM.h +++ b/src/common/HPM.h @@ -57,9 +57,12 @@ struct hplugin { struct HPMi_interface *hpi; }; +/** + * Symbols shared between core and plugins. + */ struct hpm_symbol { - char *name; - void *ptr; + const char *name; ///< The symbol name + void *ptr; ///< The symbol value }; struct HPluginData { @@ -104,8 +107,7 @@ struct HPM_interface { bool force_return; /* data */ VECTOR_DECL(struct hplugin *) plugins; - struct hpm_symbol **symbols; - unsigned int symbol_count; + VECTOR_DECL(struct hpm_symbol *) symbols; /* packet hooking points */ struct HPluginPacket *packets[hpPHP_MAX]; unsigned int packetsc[hpPHP_MAX]; @@ -128,7 +130,7 @@ struct HPM_interface { bool (*iscompatible) (char* version); void (*event) (enum hp_event_types type); void *(*import_symbol) (char *name, unsigned int pID); - void (*share) (void *, char *); + void (*share) (void *value, const char *name); void (*config_read) (void); char *(*pid2name) (unsigned int pid); unsigned char (*parse_packets) (int fd, enum HPluginPacketHookingPoints point); |