summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-02-18 22:32:25 +0300
committerAndrei Karas <akaras@inbox.ru>2019-03-11 03:04:57 +0300
commitdd742ed655c1d6344c8ca88f86f246200da32b04 (patch)
treeea0618ff45f0e45af32f8d57f5d11cc0a84a4cfd /src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
parentca315dcb6f8ba435beedc9c1a5bff12194bccc72 (diff)
downloadhercules-dd742ed655c1d6344c8ca88f86f246200da32b04.tar.gz
hercules-dd742ed655c1d6344c8ca88f86f246200da32b04.tar.bz2
hercules-dd742ed655c1d6344c8ca88f86f246200da32b04.tar.xz
hercules-dd742ed655c1d6344c8ca88f86f246200da32b04.zip
Add function connect_client into socket interface
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 8242b9797..d18b4f360 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -80816,6 +80816,33 @@ void HP_sockt_flush_fifos(void) {
}
return;
}
+int HP_sockt_connect_client(int listen_fd) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_sockt_connect_client_pre > 0) {
+ int (*preHookFunc) (int *listen_fd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_connect_client_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_sockt_connect_client_pre[hIndex].func;
+ retVal___ = preHookFunc(&listen_fd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.connect_client(listen_fd);
+ }
+ if (HPMHooks.count.HP_sockt_connect_client_post > 0) {
+ int (*postHookFunc) (int retVal___, int listen_fd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_connect_client_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_sockt_connect_client_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, listen_fd);
+ }
+ }
+ return retVal___;
+}
void HP_sockt_set_nonblocking(int fd, unsigned long yes) {
int hIndex = 0;
if (HPMHooks.count.HP_sockt_set_nonblocking_pre > 0) {