DLM Monitor

Monitor Open


Opens a new session for monitoring.

#include "dlmmon.h"

DlmResult dlm_MonOpen
        DlmPassword     password,
        DlmAddress      address,
        DlmLine         line,
        DlmMonCallback  callback,
        DlmUserData     userData,
        DlmMonitorId *  id
password password shared by the monitor and server for session authorization
address server address to connect to (server name or ip address)
line session line identifier
callback callback function for the session events
userData user data passed transparently to callback function
id output for session id

dlm_MonOpen() opens a new session for monitoring. This function returnss a session identifier via the id parameter. This value is required as the first parameter by all other calls related to this monitoring session.

For details about password requirements, see DLM Security.

The prototype of the callback supplied is defined in dlmmon.h. This parameter may not be NULL. For details about the DLM callback mechanism, see DLM Callbacks.

The return value of the callback is ignored at this time.

Return Values

If successful, dlm_MonOpen() returns a non-negative value. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:

See Also


if ((result = dlm_MonOpen(password, address, line,
                              callback, 0, &id)) < 0)
    printf("Error: Failure opening: %s.\n", dlm_ErrorMessage(result));
    /* do something */

    if ((result =  dlm_MonClose(id)) < 0)
        printf("Error: Failure closing: %s.\n", dlm_ErrorMessage(result));
        printf("Monitor session closed.\n");