Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX SNAplus2 NOF Programmers Guide: HP-UX 11i > Chapter 2 Writing NOF Applications

Target For NOF Verbs

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

A NOF verb can be directed to any of the following targets:

  • A running node (to manage the node's resources)

  • The node on a server where the SNAplus2 software is running but where the node has not been started (to start the node, to query the node's stored configuration, or to modify the configuration so that the changes take effect when the node is restarted)

  • The domain configuration file (to manage domain resources)

  • The sna.net file (to manage the SNAplus2 servers that can act as backup masters if the master server is not available)

The target for a particular NOF verb is identified by the target_handle parameter used on the NOF call. An application acquires a target handle using different NOF verbs depending on the target, as follows:

Running node or node on running server

The application issues CONNECT_NODE, specifying the name of the required node, with a null target handle; SNAplus2 returns a target handle for this node as one of the VCB parameters for CONNECT_NODE.

Domain configuration file

The application issues OPEN_FILE with a null target handle; SNAplus2 returns a target handle for the file as one of the VCB parameters for OPEN_FILE.

sna.net file

The application issues OPEN_FILE with a null target handle; SNAplus2 returns a target handle for the file as one of the VCB parameters for OPEN_FILE.

Some NOF verbs can be issued only to particular target types:

  • DEFINE_NODE cannot be issued to a running node; it must be issued to a server where the node is not running.

  • Verbs associated with node resources, such as DEFINE_LOCAL_LU, must be issued to a node.

  • START_* and STOP_* verbs, to start and stop node resources, must be issued to a running node.

  • Verbs associated with domain resources, such as DEFINE_EMULATOR_USER, must be issued to the domain configuration file.

  • Different QUERY_* verbs return information about the definition of a resource, on its current status, or on both definition and status. Status information can only be obtained from a running node. Verbs that return only status information cannot be issued to an inactive node, and verbs that return both definition and status will return only definition information when issued to an inactive node. For example, QUERY_PARTNER_LU_DEFINITION can be issued either to an inactive node (to determine the stored configuration) or to a running node (to determine the current definition). However, QUERY_PARTNER_LU (which returns information about the LU's current sessions) can be issued only to a running node. QUERY_LS (which returns both the definition of the LS and its current status) can be issued either to an inactive node or to a running node, but status information is not returned if you issue it to an inactive node. The description of each QUERY_* verb in Chapter 3 “NOF API Verbs (ACTIVATE_SESSION to OPEN_FILE)” includes information about the valid target types for the verb.

  • Verbs associated with managing backup master servers (ADD_BACKUP, DELETE_BACKUP, QUERY_SNA_NET, REGISTER_INDICATION_SINK and UNREGISTER_INDICATION_SINK for SNA network file indications) must be issued to the sna.net file.

Processing Modes

Each target handle used by an application has an associated processing mode that can be modified with the NOF verb SET_PROCESSING_MODE. The mode controls file locking and access permissions for the application. The following modes are available:

AP_READ_ONLY

Only QUERY_* verbs are enabled in this mode. All other verbs, which modify the configuration or status of a resource, will be rejected.

This is the default mode when the target handle is first assigned; it enables the application to check the configuration or status of a resource but not to change it.

AP_READ_WRITE

All NOF verbs are enabled in this mode, including those that change a resource's configuration or status.

AP_COMMIT

This mode is only available if the target handle identifies the domain configuration file (not when issuing verbs to a node). It obtains a lock on the file so that only this application can access it; this file lock ensures that the file will not be modified by any other process during a sequence of verbs issued by this application. The file lock also ensures that no changes are made to the file until the complete sequence of verbs has been issued (until the application changes from AP_COMMIT mode to one of the other modes).

Because this mode prevents any other program from accessing the file, it should be used only for as long as necessary. The application should immediately issue all the verbs that it requires to modify the file and then change to one of the other modes.

If the file lock cannot be obtained (for example, because another program is currently modifying the file), the SET_PROCESSING_MODE verb will fail.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2003 Hewlett-Packard Development Company, L.P.