summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHercules.ws <dev@herc.ws>2018-11-15 04:01:47 +0100
committerHerculesWSAPI <dev@herc.ws>2018-11-15 04:01:47 +0100
commit8df29ed9c26a999eed468206e7f7c6132758f234 (patch)
treecae82e9ef26684148259d88992ad9ae1764f2ca5
parent47d6523817646f2d4f081b93ec44a971a01fce25 (diff)
downloadhercules-8df29ed9c26a999eed468206e7f7c6132758f234.tar.gz
hercules-8df29ed9c26a999eed468206e7f7c6132758f234.tar.bz2
hercules-8df29ed9c26a999eed468206e7f7c6132758f234.tar.xz
hercules-8df29ed9c26a999eed468206e7f7c6132758f234.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <dev@herc.ws>
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc2
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.Hooks.inc26
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.Hooks.inc26
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc26
10 files changed, 95 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 7139bfa6c..ea1aa85a4 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -7466,6 +7466,8 @@ typedef int (*HPMHOOK_pre_sockt_realloc_writefifo) (int *fd, size_t *addition);
typedef int (*HPMHOOK_post_sockt_realloc_writefifo) (int retVal___, int fd, size_t addition);
typedef int (*HPMHOOK_pre_sockt_wfifoset) (int *fd, size_t *len, bool *validate);
typedef int (*HPMHOOK_post_sockt_wfifoset) (int retVal___, int fd, size_t len, bool validate);
+typedef void (*HPMHOOK_pre_sockt_wfifohead) (int *fd, size_t *len);
+typedef void (*HPMHOOK_post_sockt_wfifohead) (int fd, size_t len);
typedef int (*HPMHOOK_pre_sockt_rfifoskip) (int *fd, size_t *len);
typedef int (*HPMHOOK_post_sockt_rfifoskip) (int retVal___, int fd, size_t len);
typedef void (*HPMHOOK_pre_sockt_close) (int *fd);
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
index 839be6ebc..d5babae97 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
@@ -1404,6 +1404,8 @@ struct {
struct HPMHookPoint *HP_sockt_realloc_writefifo_post;
struct HPMHookPoint *HP_sockt_wfifoset_pre;
struct HPMHookPoint *HP_sockt_wfifoset_post;
+ struct HPMHookPoint *HP_sockt_wfifohead_pre;
+ struct HPMHookPoint *HP_sockt_wfifohead_post;
struct HPMHookPoint *HP_sockt_rfifoskip_pre;
struct HPMHookPoint *HP_sockt_rfifoskip_post;
struct HPMHookPoint *HP_sockt_close_pre;
@@ -3037,6 +3039,8 @@ struct {
int HP_sockt_realloc_writefifo_post;
int HP_sockt_wfifoset_pre;
int HP_sockt_wfifoset_post;
+ int HP_sockt_wfifohead_pre;
+ int HP_sockt_wfifohead_post;
int HP_sockt_rfifoskip_pre;
int HP_sockt_rfifoskip_post;
int HP_sockt_close_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
index 101dddd53..55f2df4ce 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
@@ -749,6 +749,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(sockt->realloc_fifo, HP_sockt_realloc_fifo) },
{ HP_POP(sockt->realloc_writefifo, HP_sockt_realloc_writefifo) },
{ HP_POP(sockt->wfifoset, HP_sockt_wfifoset) },
+ { HP_POP(sockt->wfifohead, HP_sockt_wfifohead) },
{ HP_POP(sockt->rfifoskip, HP_sockt_rfifoskip) },
{ HP_POP(sockt->close, HP_sockt_close) },
{ HP_POP(sockt->validateWfifo, HP_sockt_validateWfifo) },
diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
index df39880b6..5f20fd224 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
@@ -18449,6 +18449,32 @@ int HP_sockt_wfifoset(int fd, size_t len, bool validate) {
}
return retVal___;
}
+void HP_sockt_wfifohead(int fd, size_t len) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_sockt_wfifohead_pre > 0) {
+ void (*preHookFunc) (int *fd, size_t *len);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifohead_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_sockt_wfifohead_pre[hIndex].func;
+ preHookFunc(&fd, &len);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.wfifohead(fd, len);
+ }
+ if (HPMHooks.count.HP_sockt_wfifohead_post > 0) {
+ void (*postHookFunc) (int fd, size_t len);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifohead_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_sockt_wfifohead_post[hIndex].func;
+ postHookFunc(fd, len);
+ }
+ }
+ return;
+}
int HP_sockt_rfifoskip(int fd, size_t len) {
int hIndex = 0;
int retVal___ = 0;
diff --git a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
index 89f201c09..35dea3ce7 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
@@ -562,6 +562,8 @@ struct {
struct HPMHookPoint *HP_sockt_realloc_writefifo_post;
struct HPMHookPoint *HP_sockt_wfifoset_pre;
struct HPMHookPoint *HP_sockt_wfifoset_post;
+ struct HPMHookPoint *HP_sockt_wfifohead_pre;
+ struct HPMHookPoint *HP_sockt_wfifohead_post;
struct HPMHookPoint *HP_sockt_rfifoskip_pre;
struct HPMHookPoint *HP_sockt_rfifoskip_post;
struct HPMHookPoint *HP_sockt_close_pre;
@@ -1353,6 +1355,8 @@ struct {
int HP_sockt_realloc_writefifo_post;
int HP_sockt_wfifoset_pre;
int HP_sockt_wfifoset_post;
+ int HP_sockt_wfifohead_pre;
+ int HP_sockt_wfifohead_post;
int HP_sockt_rfifoskip_pre;
int HP_sockt_rfifoskip_post;
int HP_sockt_close_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
index f50b7666d..b03162550 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
@@ -315,6 +315,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(sockt->realloc_fifo, HP_sockt_realloc_fifo) },
{ HP_POP(sockt->realloc_writefifo, HP_sockt_realloc_writefifo) },
{ HP_POP(sockt->wfifoset, HP_sockt_wfifoset) },
+ { HP_POP(sockt->wfifohead, HP_sockt_wfifohead) },
{ HP_POP(sockt->rfifoskip, HP_sockt_rfifoskip) },
{ HP_POP(sockt->close, HP_sockt_close) },
{ HP_POP(sockt->validateWfifo, HP_sockt_validateWfifo) },
diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
index 4cf0e85ce..c4359a2ad 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
@@ -7204,6 +7204,32 @@ int HP_sockt_wfifoset(int fd, size_t len, bool validate) {
}
return retVal___;
}
+void HP_sockt_wfifohead(int fd, size_t len) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_sockt_wfifohead_pre > 0) {
+ void (*preHookFunc) (int *fd, size_t *len);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifohead_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_sockt_wfifohead_pre[hIndex].func;
+ preHookFunc(&fd, &len);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.wfifohead(fd, len);
+ }
+ if (HPMHooks.count.HP_sockt_wfifohead_post > 0) {
+ void (*postHookFunc) (int fd, size_t len);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifohead_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_sockt_wfifohead_post[hIndex].func;
+ postHookFunc(fd, len);
+ }
+ }
+ return;
+}
int HP_sockt_rfifoskip(int fd, size_t len) {
int hIndex = 0;
int retVal___ = 0;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index b1dfbed80..4b0054b28 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -5978,6 +5978,8 @@ struct {
struct HPMHookPoint *HP_sockt_realloc_writefifo_post;
struct HPMHookPoint *HP_sockt_wfifoset_pre;
struct HPMHookPoint *HP_sockt_wfifoset_post;
+ struct HPMHookPoint *HP_sockt_wfifohead_pre;
+ struct HPMHookPoint *HP_sockt_wfifohead_post;
struct HPMHookPoint *HP_sockt_rfifoskip_pre;
struct HPMHookPoint *HP_sockt_rfifoskip_post;
struct HPMHookPoint *HP_sockt_close_pre;
@@ -12597,6 +12599,8 @@ struct {
int HP_sockt_realloc_writefifo_post;
int HP_sockt_wfifoset_pre;
int HP_sockt_wfifoset_post;
+ int HP_sockt_wfifohead_pre;
+ int HP_sockt_wfifohead_post;
int HP_sockt_rfifoskip_pre;
int HP_sockt_rfifoskip_post;
int HP_sockt_close_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 378eb77eb..a900af716 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -3057,6 +3057,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(sockt->realloc_fifo, HP_sockt_realloc_fifo) },
{ HP_POP(sockt->realloc_writefifo, HP_sockt_realloc_writefifo) },
{ HP_POP(sockt->wfifoset, HP_sockt_wfifoset) },
+ { HP_POP(sockt->wfifohead, HP_sockt_wfifohead) },
{ HP_POP(sockt->rfifoskip, HP_sockt_rfifoskip) },
{ HP_POP(sockt->close, HP_sockt_close) },
{ HP_POP(sockt->validateWfifo, HP_sockt_validateWfifo) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index db191064c..af1f11fe2 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -79971,6 +79971,32 @@ int HP_sockt_wfifoset(int fd, size_t len, bool validate) {
}
return retVal___;
}
+void HP_sockt_wfifohead(int fd, size_t len) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_sockt_wfifohead_pre > 0) {
+ void (*preHookFunc) (int *fd, size_t *len);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifohead_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_sockt_wfifohead_pre[hIndex].func;
+ preHookFunc(&fd, &len);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.wfifohead(fd, len);
+ }
+ if (HPMHooks.count.HP_sockt_wfifohead_post > 0) {
+ void (*postHookFunc) (int fd, size_t len);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifohead_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_sockt_wfifohead_post[hIndex].func;
+ postHookFunc(fd, len);
+ }
+ }
+ return;
+}
int HP_sockt_rfifoskip(int fd, size_t len) {
int hIndex = 0;
int retVal___ = 0;