dlm_TapDisconnect()
Disconnects a session and returns it to the open state.
#include "dlmtap.h" DlmResult dlm_TapDisconnect ( DlmLine line, );
line | id of session to disconnect |
dlm_TapDisconnect() disconnects a session and returns it to the open state.
If successful, dlm_TapDisconnect() returns a non-negative value. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:
if ((result = dlm_TapConnect(dlm_Line, 1000)) < 0) { printf("Error: Failure connecting - %s.\n", dlm_ErrorMessage(result)); } else { /* do something */ if ((result = dlm_TapDisconnect(dlm_Line)) < 0) { printf("Error: failure disconnecting - %s .\n", dlm_ErrorMessage(result)); } else { printf("Tap disconnected.\n"); } }