Responding to a Disconnect Request
The host stack initiates the closing of an offloaded TCP connection by calling the NdisOffloadTcpDisconnect function, which causes NDIS to call the offload target's MiniportTcpOffloadDisconnect function.
If the Flags parameter of MiniportTcpOffloadDisconnect is set to TCP_DISCONNECT_ABORTIVE_CLOSE, the offload target performs an abortive disconnect by sending an RST segment on the specified TCP connection.
If the Flags parameter of MiniportTcpOffloadDisconnect is set to TCP_DISCONNECT_GRACEFUL_CLOSE, the offload target performs a graceful disconnect by sending a FIN segment on the specified TCP connection. In the disconnect request, the host stack can specify data that the offload target must send on the connection before sending the FIN segment.
From the perspective of the offload target, sending a FIN segment closes the send half of the connection but does not close the receive half of the connection. The remote host terminates the receive half of the connection by sending a FIN segment or an RST segment to the offload target.
The offload target must not free resources for the connection on which it has sent either a FIN or RST segment until the host stack terminates the offload of the connection.