Hi, I’ve postet a topic in Windows Internal, maybe here is a better location for my problem:
I want to redirect an outgoging dest. address to my own(192.168.1.9). All Messages are captured correctly.
Without my code(program) the messages are sent/received perfectly. But with my code nothing no messages are received or sent.
NEW EDIT
So, the messages are sent, but there are some problems. I Capture the packages from port 80 and want to send these to an proxy (installed on an other computer in my network (192.168.1.8 )).
If i handle the ip directly in firefox it works fine. But i want to handle that feature about Winpkfilter.
Something seems to be wrong. I’ve a Ethernet output for you:
http://www.imagehack.eu/uploads/01eec671ad.jpg
Maybe there is a problem with the Port (3175)?
Some Code:
if( PacketBuffer.m_dwDeviceFlags == PACKET_FLAG_ON_SEND )
{
if( pTcpHeader->th_dport == htons (80) ||
pTcpHeader->th_sport == htons (80) )
{
pIpHeader->ip_dst.S_un.S_addr = inet_addr("192.168.1.8");
RecalculateIPChecksum( pIpHeader );
RecalculateTCPChecksum( &PacketBuffer );
}
}
[...]
if ( PacketBuffer.m_dwDeviceFlags == PACKET_FLAG_ON_SEND )
{
// Place packet on the network interface
api.SendPacketToAdapter(&Request);
}
else
{
// Indicate packet to MSTCP
api.SendPacketToMstcp(&Request);
}