Open highlyunavailable opened 5 years ago
I've finally tracked this down. The reason for this behavior is because the code is using winsock Connect() function to filter on the remote IP when UseSocketFilter is set to true. However, according to documentation https://docs.microsoft.com/en-us/windows/win32/winsock/tcp-ip-raw-sockets-2?redirectedfrom=MSDN:
If a foreign address is defined for the socket, it should correspond to the source address as specified in the IP header of the received datagram
For raw sockets, the received packets will have the expected remote ip as the source address. Unfortunately, packets originating from the game will have source address = local ip, and so this is the reason these packets are not available when this feature is turned on.
I will need to consider a larger change to Machina to resolve this - probably creating multiple raw sockets, one for each direction, when this flag is enabled.
If I set the
UseSocketFilter
property of anFFXIVNetworkMonitor
totrue
, the callback for MessageSent never triggers. I'm using raw sockets, not winpcap.I've ensured that the app is allowed through the firewall and there are no errors in the trace log. At a deeper level, it looks like
ProcessSentMessage
is never called because no packets are ever returned for the sent side of the connection. Is this a limitation ofUseSocketFilter
or is there further configuration I need to do?