> with similar HTTP GET Protocol. We need to write a driver for gateway
> machine to add
> one parameter (for e.g. *Accept-Language: en-US*) in one of the GET
> command. All GET commands will communicate on the same session.
Parse all packet flow and inject the packet with *Accept-Language: en-US*
Note that the injection spot can be in the middle of some other packet, in which case you will need not only to inject, but to split too.
After injection, the TCP sequence number flow will be changed, and you must then update all sequence numbers in all remaining packets for this flow, and recompute the checksums.
This is how NAT editors work for "PORT" FTP command and for some other cases (PPTP?)
A hard thing. HTTP proxy is maybe simpler, or a stupid TCP-to-TCP, socket-to-socket user-mode proxy.
> I have done packet reading. Please guide how I can set "raw packet"
> (including ether header, ip header, tcp header and tcp payload with new
> field) bytes to NDIS_PACKET structure?
In the chain of NDIS_BUFFERs, which can be many.
--
Maxim S. Shatskih
Windows DDK MVP
http://www.storagecraft.com