locked
How to insert ACKs at transport layer from Callout RRS feed

  • Question

  • I'm using my callout as a TCP proxy and send the received packets to a User Mode Application. Unfortunately, the Driver keeps getting packets and blocks the User Mode Processing.

    So, I'd like to ACK from the Callout, so the server doesn't keep resending.

    I'm thinking to ucreate the ACK packet from scratch starting with FwpsAllocateNetBufferAndNetBufferList, but I'm not exactly sure how to create the transport header and IP header.

    Should I load the transport Header into the MDL, with the ACK bit set and right ACK#, then call FWPSCOnstructIPHeaderForTransportPacket?

    Or, Should I load both the Transpotrt and IP headers into the Net Buffer?

    Or, should I cloned the incoming packet, flip addresses, update header fields and dump the message body?

    Or, is there another way, such as  a magic WPF function?

    For instance, does FwpsPendClassify return an Ack to the server for the packet? If so, does it have any other bad side effects.

    And a side question, in all the WinDDK examples that modify packets, what takes care of Seq#, Ack# adjustments if the message body gets bigger/smaller? 

     

    Friday, November 18, 2011 6:35 PM

All replies

  • If you are poxying the connection, you would probably be better served by using teh FWPM_LAYER_ALE_CONNECTION_REDIRECT_V{4 / 6}.  this layer will proxy the connection to wherever you want transparently.

    Adding packets for TCP is best done at STREAM.  this is because it is outside the TCP state machine.  Again, using the previous mentioned layer(s) would eliminate this need.

    Hope this helps,


    Dusty Harper [MSFT]
    Microsoft Corporation
    ------------------------------------------------------------
    This posting is provided "AS IS", with NO warranties and confers NO rights
    ------------------------------------------------------------

    Monday, February 13, 2012 9:28 PM
    Moderator