summaryrefslogtreecommitdiff
path: root/tools/HPMHookGen
AgeCommit message (Collapse)AuthorFilesLines
2018-12-17Fix HPM generation for old packet versions.Andrei Karas1-1/+3
From now HPM generated for 20031028 main packet version.
2018-07-12Fix date part2Unknown1-1/+1
2018-04-25Add support for time_t as return type in the HPMHookGenHaru1-1/+2
Signed-off-by: Haru <haru@dotalux.com>
2017-04-26Improve the code style of the generated HPMHooking dataHaru1-11/+12
Signed-off-by: Haru <haru@dotalux.com>
2016-10-14Fixed a memory manager crash when a memory leak occurs in a pluginHaru1-2/+1
- Plugins were accidentally using the core's memory manager instead of the HPM-safe wrappers. - As a side-effect of this, plugins shall not be able to hook into the iMalloc interface. - The issue was introduced in e7c2f7d827ad286dc826e483391e64b8ffe2720b Signed-off-by: Haru <haru@dotalux.com>
2016-07-12Interface grfio.chemagx2-0/+5
2016-07-12Removed unnecessary typedefs from thread and spinlockHaru1-0/+2
- SPIN_LOCK -> struct spin_lock - rAthread -> struct thread_handle - rAthreadProc -> threadFunc - RATHREAD_PRIO -> enum thread_priority - RAT_PRIO_LOW -> THREADPRIO_LOW - RAT_PRIO_NORMAL -> THREADPRIO_NORMAL - RAT_PRIO_HIGH -> THREADPRIO_HIGH - RA_THREADS_MAX -> THREADS_MAX Signed-off-by: Haru <haru@dotalux.com> fixupthread
2016-07-12Changed the HPMHookGen script to correctly handle macros associated with an ↵Haru1-0/+1
interface Signed-off-by: Haru <haru@dotalux.com>
2016-07-02Added 'GENERATED FILE DO NOT EDIT' to the auto-generated filesHaru2-0/+4
See https://github.com/Reviewable/Reviewable/wiki/FAQ#how-do-i-tell-reviewable-that-a-file-is-generated-and-should-not-be-reviewed Signed-off-by: Haru <haru@dotalux.com>
2016-04-30Added one level of indirection to all variables in pre-hook functionsHaru1-1/+1
- Previously, only scalar variables had their indirection level increased. Now pointers do as well (this allows users to override const pointers) Signed-off-by: Haru <haru@dotalux.com>
2016-04-30Removed extra indirection level in HPMHooking post-hooksHaru1-14/+16
- The extra indirection level (necessary to override function arguments from a hook) isn't necessary in post-hooks, but only in pre-hooks. - This simplifies the syntax and code of post-hooks. Signed-off-by: Haru <haru@dotalux.com>
2016-04-30Replaced memset with braced initializers in the HPMHooking hook handlersHaru1-5/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-04-30Added type-checking for the addHookPre() and addHookPost() macrosHaru1-119/+58
- The macros will now throw a warning at compile time if a plugin is using a wrong function type for a pre or post hook. This avoids some very subtle, hard to detect, issues. - The macros now require 3 arguments instead of 2. Example: old code: addHookPre("ifname->function" my_hook); becomes: addHookPre(ifname, function, my_hook); Signed-off-by: Haru <haru@dotalux.com>
2016-04-16Added lclif packet handlers to the lclif interfaceHaru1-1/+6
Signed-off-by: Haru <haru@dotalux.com>
2016-04-16Rewrite client interface for login server (part 3)hemagx1-0/+2
Rewritten login clif parser, using a packet db Signed-off-by: Haru <haru@dotalux.com>
2016-04-16Added support for private headers to the HPMDataCheck/HPMHooking generatorsHaru2-12/+21
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Updated HPMHookGen script to support union argumentsHaru1-2/+2
Also removed the no longer necessary DB-related typedefs Signed-off-by: Haru <haru@dotalux.com>
2016-01-21Remove unused PCRE_SUPPORT define.Andrei Karas1-2/+1
2015-12-15Added GPL-compliant header to all sources and build scriptsHaru3-36/+198
Signed-off-by: Haru <haru@dotalux.com>
2015-12-12Added support for pcre-related interfaces to plugins (HPMHookGen/HPMSymbols ↵Haru1-1/+2
generation) Fixes #931 Signed-off-by: Haru <haru@dotalux.com>
2015-11-14Fixed include path in the doxygen configurationHaru1-1/+2
Signed-off-by: Haru <haru@dotalux.com>
2015-09-25Upgraded Doxygen configuration file to 1.8.10Haru1-5/+109
Signed-off-by: Haru <haru@dotalux.com>
2015-08-15Automatic HPM symbol sharingHaru1-2/+5
Signed-off-by: Haru <haru@dotalux.com>
2015-08-15Enabled HPMDataCheck for login and char serversHaru1-2/+9
Signed-off-by: Haru <haru@dotalux.com>
2015-08-15HPM compatibility improvementsHaru3-27/+69
Improved compatibility, portability and standards conformance. - Since it is not possible to portably and reliably re-use the core's symbols in plugins, symbols are no longer exported unless explicitly required, in the UNIX builds. This mimics the Windows behavior and adds HPM compatibility to OSes such as FreeBSD. Credits to Andrei Karas for making this possible. - For convenience, it is no longer necessary to call GET_SYMBOL, since the plugin will automatically import all the available symbols when it's loaded, depending on the included headers. - Plugins are now supposed to include the "common/hercules.h" header before including anything else. Incluing common/HPMi.h, common/cbasetypes.h or conf/core.h is no longer necessary, as those are guaranteed to be automatically included by hercules.h. - HPM API version bumped to 1.1. Signed-off-by: Haru <haru@dotalux.com>
2015-08-15Added HPMHooking support for common interfacesHaru1-4/+37
Signed-off-by: Haru <haru@dotalux.com>
2015-06-19Fixed HPMHookGen's inability to detect certain interface membersHaru2-6/+7
Private members as well as members of interfaces with more than one section are now correctly detected. Signed-off-by: Haru <haru@dotalux.com>
2015-06-19Follow-up to e81d221Haru2-6/+2
Let doxygen ignore __attribute__ instead of ignoring it at parse time. Signed-off-by: Haru <haru@dotalux.com>
2015-06-19Improved info/error messages during plugin loadingHaru1-2/+2
- Each loaded plugin will now show a status message - If a plugin loads because of a missing symbol, an error message will be displayed, mentioning the name of the missing symbol. Signed-off-by: Haru <haru@dotalux.com>
2015-06-19Fixed an issue causing some structs to be missing from the HPMDataCheckHaru2-1/+2
Signed-off-by: Haru <haru@dotalux.com>
2015-06-19Improved the HPMHookingGen parserHaru1-0/+5
It now strips gcc's __attribute__ from interface methods Signed-off-by: Haru <haru@dotalux.com>
2015-01-24Minor channel system refactoringHaru1-0/+2
Signed-off-by: Haru <haru@dotalux.com>
2015-01-22HPMHookGen compatibility fix for doxygen 1.8.9.xHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2014-11-15Follow-up to 61fc83fd7dd51e9a88ac7e6264692fcf561a37f7Haru2-2/+2
Compatibility fix for older versions of Perl Signed-off-by: Haru <haru@dotalux.com>
2014-11-15Corrected an issue in the HPMHookGen when interfaces only have one memberHaru2-19/+18
- Fixed hooks/symbols generation for the inter_quest interface - Re-enabled strict mode Signed-off-by: Haru <haru@dotalux.com>
2014-11-15Fix HPM hook generation script for support new interfaces.Andrei Karas1-1/+6
2014-11-02Fixed an error in the HPMHookGenHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2014-10-28Added preliminary support for char and login server to HPMHookingHaru1-84/+91
- Special thanks to Ind Signed-off-by: Haru <haru@dotalux.com>
2014-10-28Added preliminary support for login and char server in the HPMDataCheckHaru1-2/+14
- Special thanks to Ind Signed-off-by: Haru <haru@dotalux.com>
2014-08-07Corrected several format-string errors through the codeHaru1-2/+2
- Functions that expect a printf-style format string are now marked as such, so that gcc/clang will emit a warning warn you if you mismatch format string and arguments. Signed-off-by: Haru <haru@dotalux.com>
2014-07-11Fixed reserved __identifier violationsHaru1-4/+4
- Complies with CERT DCL37-C - Fixes issue #293 (special thanks to elfring) Signed-off-by: Haru <haru@dotalux.com>
2014-05-30HPMHookGen compatibility update for doxygen 1.8.7Haru1-2/+0
2014-05-25Improved CFLAGS/CPPFLAGS handlingHaru1-0/+2
- Language extensions, such as _GNU_SOURCE are now enabled through CPPFLAGS by the configure script, rather than within the source code. - Moved some configure-time CFLAGS to CPPFLAGS, where appropriate. - Fixes bugreport:8211, thanks to Neoth http://hercules.ws/board/tracker/issue-8211-compiling-warning-in-linux Signed-off-by: Haru <haru@dotalux.com>
2014-05-01Corrected an issue when calling hookStop() from a post-hookHaru1-0/+1
- Now hookStop() will do absolutely nothing if called from a post-hook, instead of causing unexpected effects on the next pre-hook execution. Signed-off-by: Haru <haru@dotalux.com>
2014-04-19Added support for enum bg_queue_types to the HPMHookGenHaru1-0/+2
- Fixes a HPM Hook generator warning in battlegrounds.c Signed-off-by: Haru <haru@dotalux.com>
2014-04-17Added sysinfo (System Information) functionalitiesHaru1-2/+4
- More informative messages are displayed during startup, to make it easier to identify what system and environment Hercules is running. - Git/SVN revision detection is improved, separating the source version (cached at compile time) from the runtime version, in case the user updated their working copy without recompiling the server. Git version detection is also more reliable, in case a non-default branch is used. - The get_revision script command has been removed (as it was useless to begin with, after the switch to git). An alternative will be provided later, for feature-probing purposes. - The patch was tested under Linux (Gentoo / gcc 4.7 on i686 and x86_64, Debian 6 / gcc 4.4 on i686, Raspbian / gcc 4.6 on armv6l, CentOS 5 / gcc 4.1 on i686, CentOS 6 / gcc 4.4 on x86_64, Linux Mint 15 / gcc 4.7 on x86_64, OS X Mountain Lion / clang 5.0 and gcc 4.8 on x86_64, Cygwin-NT-5.1/gcc 4.8 on i686, FreeBSD 8 / gcc 4.2 on i386, FreeBSD 9 / gcc 4.2 on amd64, FreeBSD 10 / clang 3.3 on amd64, NetBSD 5 / gcc 4.1 on i386, NetBSD 6 / gcc 4.5 on amd64, OpenBSD 5 / gcc 4.2 on amd64, Solaris 11 / gcc 4.5 on i86pc, Windows 7 / Visual Studio 2012 on x86, Windows 8 / Visual Studio 2010 on WOW64, Windows 8.1 / Visual Studio 2013 on WOW64. Signed-off-by: Haru <haru@dotalux.com>
2014-03-17Improved const pointer detection in the HPMHooking generatorHaru1-2/+2
- Fixes a HPMHooking compile error in d117462. Thanks to Potte. Signed-off-by: Haru <haru@dotalux.com>
2014-02-06Follow up d33469689ea8e671fa0d525d54bce6932dfe9107shennetsind1-2/+2
Fixed issue on windows that'd cause plugins to be rejected on loading. Thanks to Mhalicot Signed-off-by: shennetsind <ind@henn.et>
2014-02-03Updated HPMHookGen with a HPMDataCheck generatorHaru3-11/+93
- It will be used by an upcoming commit by Ind. - Added dummy HPMDataCheck.h, to test the API bot's capability to re-generate it. - Improved XML parser performance. Signed-off-by: Haru <haru@dotalux.com>
2013-11-20Added support for 'make plugin.pluginname' to compile only 'pluginname'Haru1-8/+8
- Various Makefile optimizations Signed-off-by: Haru <haru@dotalux.com>