diff options
author | Andrei Karas <akaras@inbox.ru> | 2019-02-18 22:32:25 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2019-03-11 03:04:57 +0300 |
commit | dd742ed655c1d6344c8ca88f86f246200da32b04 (patch) | |
tree | ea0618ff45f0e45af32f8d57f5d11cc0a84a4cfd /src/plugins/HPMHooking/HPMHooking_login.Hooks.inc | |
parent | ca315dcb6f8ba435beedc9c1a5bff12194bccc72 (diff) | |
download | hercules-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_login.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_login.Hooks.inc | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc index 044ee2df2..080fb75ff 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc @@ -7495,6 +7495,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) { |