summaryrefslogtreecommitdiff
path: root/src/common/HPM.h
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-08-04 12:19:25 -0300
committershennetsind <ind@henn.et>2013-08-08 15:07:40 -0300
commit6b9f58446c46877ecfc5fe40847636145acf5af8 (patch)
tree81b71aa95a47e611a5415528cf72efefe0d552b1 /src/common/HPM.h
parentdefac0ef9714121a872ab48c3f6c4ddd177ae509 (diff)
downloadhercules-6b9f58446c46877ecfc5fe40847636145acf5af8.tar.gz
hercules-6b9f58446c46877ecfc5fe40847636145acf5af8.tar.bz2
hercules-6b9f58446c46877ecfc5fe40847636145acf5af8.tar.xz
hercules-6b9f58446c46877ecfc5fe40847636145acf5af8.zip
HPM Update
- Custom Packet Support - Custom Data Struct Support (currently append-able to map_session_data and socket_data) - Char Server Support - Login Server Support http://hercules.ws/board/topic/1934-hercules-plugin-manager-update/ Documentation will soon be updated in http://hercules.ws/wiki/HPM Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/common/HPM.h')
-rw-r--r--src/common/HPM.h32
1 files changed, 31 insertions, 1 deletions
diff --git a/src/common/HPM.h b/src/common/HPM.h
index 10b1f0e79..d2a1308f2 100644
--- a/src/common/HPM.h
+++ b/src/common/HPM.h
@@ -49,6 +49,27 @@ struct hpm_symbol {
void *ptr;
};
+struct HPluginData {
+ unsigned int pluginID;
+ unsigned int type;
+ struct {
+ unsigned int free : 1;
+ } flag;
+ void *data;
+};
+
+struct HPluginPacket {
+ unsigned int pluginID;
+ unsigned short cmd;
+ short len;
+ void (*receive) (int fd);
+};
+
+struct HPMFileNameCache {
+ const char *addr;
+ char *name;
+};
+
/* Hercules Plugin Manager Interface */
struct HPM_interface {
/* vars */
@@ -59,6 +80,12 @@ struct HPM_interface {
unsigned int plugin_count;
struct hpm_symbol **symbols;
unsigned int symbol_count;
+ /* packet hooking points */
+ struct HPluginPacket *packets[hpPHP_MAX];
+ unsigned int packetsc[hpPHP_MAX];
+ /* plugin file ptr caching */
+ struct HPMFileNameCache *fnames;
+ unsigned int fnamec;
/* funcs */
void (*init) (void);
void (*final) (void);
@@ -73,7 +100,10 @@ struct HPM_interface {
void (*symbol_defaults) (void);
void (*config_read) (void);
bool (*populate) (struct hplugin *plugin,const char *filename);
- void (*symbol_defaults_sub) (void);
+ void (*symbol_defaults_sub) (void);//TODO drop
+ char *(*pid2name) (unsigned int pid);
+ unsigned char (*parse_packets) (int fd, enum HPluginPacketHookingPoints point);
+ void (*load_sub) (struct hplugin *plugin);
} HPM_s;
struct HPM_interface *HPM;