Novell Home

TID100792 (IABJ9695) - NCP Conn. Failure Detection

From Developer Community

How can a NetWare client (including an NLM running on a local server) which has a connection to a remote NetWare server tell when the remote server connection has been terminated?

remote server connection termination Q & A

Q: How can a NetWare client (including an NLM running on a local server) which has a connection to a remote NetWare server tell when the remote server connection has been terminated?

A: The NetWare server has resources allocated to support each active NCP connection. A server periodically sends an unsolicited NCP "watchdog" packet to the NetWare client in order to verify that the client is still alive. The client sends a watchdog reply back to the server. This must be done so that server resources can be released for dead clients.

There is no "reverse watchdog" NCP. In other words, NetWare clients do not send unsolicited packets to NetWare servers on a periodic basis to ensure that the server is still available. Rather than implement "reverse watchdog", a client simply assumes that the connection is always valid unless proven otherwise while corresponding normally with the 
server. Client algorithms are configurable, but will generally make several ?retry' attempts 
when the server does not respond. These attempts sometimes include killing the current NCP connection and creating a new NCP connection with the server. All of this client ?NCP retry attempt' technology is transparent to the user and the currently executing 
application unless all retry attempts fail. 

Therefore, the best way for a NetWare client to verify that the NCP connection is still valid is to cause the client to make an NCP request to the specific NetWare server. Many developers use a functions like NWGetServerDateAndTime() or NWGetFileServerVersionInfo() to cause the client to issue an NCP request to the server. If such functions succeed, the NCP connection is operational. These functions are popular 
because they require minimal server resources to fulfil. Specifically, the server can simply copy the required information to a reply NCP packet and return the requested information to the client.

iabj9695.exe

iabj9695.exe19.5 K2005-04-06

--Benjamin Fjeldsted

Novell® Making IT Work As One

© 2008 Novell, Inc. All Rights Reserved.