Previous Page Contents Page Next Page

3.4 REGISTER_NMVT_APPLICATION

The REGISTER_NMVT_APPLICATION verb registers the MS application with SNAP-IX as an NMVT-level application that can receive NMVTs. This verb is normally used by an NMVT-level application, but it can also be used by an MDS-level application that can receive NMVTs after they have been converted to MDS_MUs. Before issuing this verb, the application must issue CONNECT_MS_NODE to obtain a target handle for the SNAP-IX node. This handle is a required parameter to the MS entry point for REGISTER_NMVT_APPLICATION.

An application must always issue this verb using the asynchronous MS entry point and supply a callback routine. SNAP-IX uses this callback routine to return received NMVTs to the application. For more information about the MS entry points, see Writing MS Applications.

SNAP-IX routes an NMVT to this application only if both the destination name and the MS major vector key in the NMVT match the values supplied on this call. For more information, see NMVT Routing.

3.4.1 VCB Structure

typedef struct register_nmvt_application
{
   AP_UINT16      opcode;                    /* Verb operation code                  */
   unsigned char  reserv2;                   /* reserved                             */
   unsigned char  format;                    /* reserved                             */
   AP_UINT16      primary_rc;                /* Primary return code                  */
   AP_UINT32      secondary_rc;              /* Secondary return code                */
   unsigned char  ms_appl_name[8];           /* MS application name                  */
   AP_UINT16      ms_vector_key_type;        /* MS vector key accepted by appl       */
   unsigned char  conversion_required;       /* MDS level application requesting     */
                                             /*  MDS_MUs                             */
} REGISTER_NMVT_APPLICATION; 

3.4.2 Supplied Parameters

An application supplies the following parameters when it issues the REGISTER_NMVT_APPLICATION verb:

opcode

AP_REGISTER_NMVT_APPLICATION

ms_appl_name

A name identifying this application. An application can register more than once using different application names. This name has the following requirements:

  • It cannot match the name used by any other application that is currently registered to accept the same range of keys as specified by the ms_vector_key_type parameter.

  • It cannot be either NODE and UNIX, which are reserved for use by SNAP-IX components.

  • It must be eight characters long; pad on the right with EBCDIC space characters (0x40) if necessary.

  • It can be one of the following:

    • An EBCDIC string, using type-1134 characters (uppercase A-Z and numerals 0-9)

    • One of the MS Discipline-Specific Application Programs specified in an appendix of IBM Systems Network Architecture: Management Services Reference

Incoming NMVTs will be routed to this application only if the value specified in this parameter matches the Destination Application Name ( 0x50) subfield of the MS major vector within the NMVT.

ms_vector_key_type

The MS major vector key or keys accepted by the application. SNAP-IX routes incoming NMVTs to the application that issued this verb only if the MS major vector key in the NMVT matches the value or values specified here.

Specify one of the following:

0xnnnn

The 2-byte hexadecimal value of a particular major vector key.

AP_SPCF_KEYS

Accept all major vector keys in the range 0x8061- 0x8064. This value is intended for use by an application that is implementing the SNA Service Point Command Facility (SPCF) function; do not use it if your application is not implementing this function. The ms_appl_name parameter must not match the application name of any other application that is registered to accept SPCF keys.

AP_ALL_KEYS

Accept all major vector keys. The ms_appl_name parameter must not match the application name of any other application that is registered to accept all keys.

An application can issue multiple REGISTER_NMVT_APPLICATION verbs (with the same application name or different application names) to accept NMVTs for more than one key or range of keys.

SNAP-IX uses both the name and the key to determine which application receives the NMVT. Therefore, two or more applications can register to accept NMVTs for the same range of keys (AP_SPCF_KEYS or AP_ALL_KEYS), provided they use different application names. However, only one application can accept NMVTs for a specific key. If you specify a particular major vector key, the verb returns an error if another application has already registered to accept NMVTs for the specified key.

conversion_required

Specifies whether the registering application is MDS-level and requires conversion of NMVTs to MDS_MUs. Specify one of the following:

AP_YES

The application is MDS-level; NMVTs should be converted to MDS_MUs.

AP_NO

The application is NMVT-level; NMVTs should not be converted.

3.4.3 Returned Parameters

After the verb executes, SNAP-IX returns parameters to indicate whether the execution was successful and, if not, to indicate the reason the execution was not successful.

Successful Execution

If the verb executes successfully, SNAP-IX returns the following parameter:

primary_rc

AP_OK

SNAP-IX does not return a secondary_rc when the verb executes successfully.

Unsuccessful Execution

When a verb does not execute successfully, SNAP-IX returns a primary return code to indicate the type of error and a secondary return code to provide specific details about the reason for unsuccessful execution.

Parameter Check

If the verb does not execute because of a parameter error, SNAP-IX returns the following parameters:

primary_rc

AP_PARAMETER_CHECK

secondary_rc

One of the following values:

AP_ALL_APPL_ALREADY_REGISTERED

Indicates one of the following error conditions:

  • This application has already registered to accept all keys.

  • Another application has registered to accept all keys using the same application name.

  • The application registered to accept all keys using one of the two reserved names, NODE and UNIX.

AP_INVALID_APPLICATION_NAME

The supplied application name contains a character not in the EBCDIC type-1134 character set, and the name is not one of the MS Discipline-Specific Application Program names.

AP_INVALID_TARGET_HANDLE

The target handle supplied by the entry point used with the verb is not a valid value returned on a previous CONNECT_MS_NODE verb.

AP_KEY_APPL_ALREADY_REGISTERED

Indicates one of the following error conditions:

  • Another application has already registered to accept NMVTs for this specific key. Only one application can register for each key.

  • The application registered to accept a specific key using one of the two reserved names NODE and UNIX.

AP_SPCF_APPL_ALREADY_REGD

Indicates one of the following error conditions:

  • This application has already registered to accept SPCF keys.

  • Another application has registered to accept SPCF keys using the same application name.

  • The application registered to accept SPCF keys using one of the two reserved names NODE and UNIX.

AP_SYNC_NOT_ALLOWED

The application used the synchronous MS entry point to issue this verb within a callback routine. The application must use the asynchronous entry point to issue any verb from a callback routine.

State Check

If the verb fails to execute because of a state error, SNAP-IX returns the following parameters:

primary_rc

AP_STATE_CHECK

secondary_rc

AP_INVALID_TARGET_STATE

The application issued this verb while CONNECT_MS_NODE or DISCONNECT_MS_NODE was outstanding.

SNAP-IX Software Not Active

If the verb does not execute because the SNAP-IX software is not active, SNAP-IX returns the following parameter:

primary_rc

One of the following:

AP_COMM_SUBSYSTEM_NOT_LOADED

The SNAP-IX software is not loaded.

AP_COMM_SUBSYSTEM_ABENDED

The SNAP-IX software has failed.

SNAP-IX does not return a secondary_rc when the SNAP-IX software is not active.

System Error

If the verb does not execute because of a system error, SNAP-IX returns the following parameters:

primary_rc

AP_UNEXPECTED_SYSTEM_ERROR

An operating system call failed during processing of the verb.

secondary_rc

The return code from the operating system call. For the meaning of this return code, check the returned value in the file /usr/include/sys/errno.h .

Previous Page Contents Page Top of Page Next page