Reply To: Using WinpkFilter to modify the payload of TCP/IP packets

Home Forums Discussions Support Portal Using WinpkFilter to modify the payload of TCP/IP packets Reply To: Using WinpkFilter to modify the payload of TCP/IP packets

#6213

Daneel
Participant

Hi SerpentFly,

@SerpentFly wrote:

payload

Correct for TCP packet, for UDP an example it would be

payload

and so on…

I see. But this still means that I have to do the following actions if I want to modify the contents of a TCP/IP packet:

1) Buffer the payload of all ethernet packets which belong to the same TCP/IP packet, i.e., which have the same TCP sequence number.

2) Modify this buffer (which now contains the TCP/IP payload) according to the needs of my application.

3) Recalculate the TCP and IP checksum of the modified buffer.

4) Refragment the buffer into ethernet packets (size of 1500 bytes).

5) Attach the ethernet header to each of these packets.

6) Attach the modified (checksums, length) TCP/IP header to each of these packets.

Is this – in principle – accomplishable using the WinpkFilter framework or should I look for another solution (which?)?

Many thanks,
Michael