Hi there,
Was wondering if somebody could offer some advise with the suppression of
NDIS_STATUS_WAN_LINE_DOWN status indicator from the NDISWAN to my IMSAMP.
Here’s the scenario of my problem:
I am using the IMSAMP driver in a host which will do PPP dialup to a RAS
server. To simulate loss of connection, I off the modem. To preserve
existing TCP sockets (such as FTP or TELNET) from being terminated when I
lost the PPP connection, I would like to suppress the
NDIS_STATUS_WAN_LINE_DOWN from being communicated to the upper TCP layer. I
have modified the CLStatusIndication by adding this line in:
if (GeneralStatus != NDIS_STATUS_WAN_LINE_DOWN).
However, upon redialup (DHCP allocated the same IP address as before
disconnection), I found out that my existing connection is already
terminated. And worse still, I can get any new connectivity (not even Ping
out!) upon redialup. I did netstat before and after disconnection, and
found that my FTP connection disappeared upon disconnection. Upon redialup,
the PPP can be established but I can’t even ping out with it (this is with
the suppression of NDIS_STATUS_WAN_LINE_DOWN status indicator in the
CLStatusIndication module)
Would really appreciate if somebody could offer some insights to this
problem or recommend any resources which dealt with similar topic.
Sincerely,
KS
VOID
CLStatusIndication(
IN NDIS_HANDLE ProtocolBindingContext,
IN NDIS_STATUS GeneralStatus,
IN PVOID StatusBuffer,
IN UINT StatusBufferSize
)
/*++
Routine Description:
Called by the NIC via NdisIndicateStatus
–*/
{
PADAPTER Adapter = (PADAPTER)ProtocolBindingContext;
NDIS_STATUS Status;
ULONG ErrorLogData[2];
ImDbgOut(DBG_TRACE, DBG_PROTOCOL, (“(%08X) CLStatusIndication: Status
%08X\n”,Adapter, GeneralStatus));
//
// now indicate the status to the upper layer
//
if (GeneralStatus != NDIS_STATUS_WAN_LINE_DOWN)
{
if ( Adapter->IMMPState & ADAPTER_STATE_RUNNING ) {
NdisMIndicateStatus( Adapter->IMNdisHandle, GeneralStatus,
StatusBuffer, StatusBufferSize );
}
}
} // CLStatusIndication