addressAsText, getRemoteProxiedAddress

This commit is contained in:
Alex Hultman
2020-06-06 19:52:28 +02:00
parent 2538cd18e9
commit d5782fdb9c
6 changed files with 46 additions and 15 deletions
+6 -2
View File
@@ -41,8 +41,8 @@ private:
public:
/* Returns 4 or 16 bytes */
std::string_view getSourceIP() {
return {"hello", 5};
std::string_view getSourceIp() {
return {(char *) sourceIp, 16};
}
/* Returns [done, consumed] where done = false on failure */
@@ -86,6 +86,10 @@ public:
printf("Family: %d\n", (header.fam & 0xf0) >> 4);
printf("Transport: %d\n", (header.fam & 0x0f));
//memcpy(sourceIp, )
return {true, 16 + hostLength};
}