Previous section.

Protocols for Interworking: XNFS, Version 3W
Copyright © 1998 The Open Group

Name

SM_MON - Monitor Host

RPC Data Descriptions

Call Arguments

struct my_id { string my_name<SM_MAXSTRLEN>; /* hostname */ int my_prog; /* RPC program number */ int my_vers; /* program version number */ int my_proc; /* procedure number */ }; struct mon_id { string mon_name<SM_MAXSTRLEN>; struct my_id my_id; }; struct mon { struct mon_id mon_id; opaque priv[16]; };

Return Arguments

struct sm_stat_res { res res_stat; int state; };

RPC Procedure Description

sm_stat_res SM_MON(struct mon) = 2;

Description

This procedure initiates the monitoring of the given host. This call enables the NSM to respond to notification of change of state calls (SM_NOTIFY) for the host specified in "mon_id.mon_name", and to notify that host, via the SM_NOTIFY call, when its state (that is, crash and reboot) changes.

"mon_id.mon_name" specifies the host to be monitored. "mon_id.my_id" specifies the hostname, RPC program number, version and procedure number in the local application, for example, the NLM, to be called when the NSM receives notification via the SM_NOTIFY call, that the state of host "mon_id.mon_name" has changed. "priv" may contain any private information required by the SM_MON call. This information will be supplied in the SM_NOTIFY call. See SM_NOTIFY for more details.

When an NSM receives an SM_MON call it must save the name of the host, "mon_id.mon_name" in a notify list on stable storage. If the host running the NSM crashes, on reboot it must send out an SM_NOTIFY call to each host in the notify list.

When an NSM receives an SM_NOTIFY call from remote NSM, it must search the notify list for the host specified in the SM_NOTIFY call, if it is found the RPC specified in "mon_id.my_id" is made.

Return Codes

When the procedure returns, "res_stat" will be set to one of the following values:

STAT_SUCC
Indicates the procedure completed successfully. The server will be able to monitor the host requested. "state" will be contain the state of the remote NSM.

STAT_FAIL
Indicates the procedure failed.


Why not acquire a nicely bound hard copy?
Click here to return to the publication details or order a copy of this publication.

Contents Next section Index