summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_char.Hooks.inc')
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.Hooks.inc38
1 files changed, 32 insertions, 6 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
index e87f6fe9c..df39880b6 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
@@ -18422,15 +18422,15 @@ int HP_sockt_realloc_writefifo(int fd, size_t addition) {
}
return retVal___;
}
-int HP_sockt_wfifoset(int fd, size_t len) {
+int HP_sockt_wfifoset(int fd, size_t len, bool validate) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_sockt_wfifoset_pre > 0) {
- int (*preHookFunc) (int *fd, size_t *len);
+ int (*preHookFunc) (int *fd, size_t *len, bool *validate);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_sockt_wfifoset_pre[hIndex].func;
- retVal___ = preHookFunc(&fd, &len);
+ retVal___ = preHookFunc(&fd, &len, &validate);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -18438,13 +18438,13 @@ int HP_sockt_wfifoset(int fd, size_t len) {
}
}
{
- retVal___ = HPMHooks.source.sockt.wfifoset(fd, len);
+ retVal___ = HPMHooks.source.sockt.wfifoset(fd, len, validate);
}
if (HPMHooks.count.HP_sockt_wfifoset_post > 0) {
- int (*postHookFunc) (int retVal___, int fd, size_t len);
+ int (*postHookFunc) (int retVal___, int fd, size_t len, bool validate);
for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_sockt_wfifoset_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, fd, len);
+ retVal___ = postHookFunc(retVal___, fd, len, validate);
}
}
return retVal___;
@@ -18502,6 +18502,32 @@ void HP_sockt_close(int fd) {
}
return;
}
+void HP_sockt_validateWfifo(int fd, size_t len) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_sockt_validateWfifo_pre > 0) {
+ void (*preHookFunc) (int *fd, size_t *len);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_validateWfifo_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_sockt_validateWfifo_pre[hIndex].func;
+ preHookFunc(&fd, &len);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.validateWfifo(fd, len);
+ }
+ if (HPMHooks.count.HP_sockt_validateWfifo_post > 0) {
+ void (*postHookFunc) (int fd, size_t len);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_validateWfifo_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_sockt_validateWfifo_post[hIndex].func;
+ postHookFunc(fd, len);
+ }
+ }
+ return;
+}
bool HP_sockt_session_is_valid(int fd) {
int hIndex = 0;
bool retVal___ = false;