HP-UX SNAplus2 NOF Programmer's Guide

Writing NOF Applications
List Options For QUERY_* Verbs
Chapter 2 111
List Options For QUERY_* Verbs
A NOF application can obtain information about a particular SNAplus2
resource by issuing a QUERY_* verb for the appropriate resource type.
For example, it can obtain information about the configuration of an LS
by issuing QUERY_LS. These verbs can either return information about
a specific resource (for example, the configuration of a particular LS) or
about many resources of the same type (for example, a summary of all
configured LSs), depending on the options used. In addition, some
QUERY_* verbs have the option of returning either summary or detailed
information about the specified resources. This section explains how to
use these options.
Obtaining Information about a Single Resource or
Multiple Resources
You can think of the information returned by QUERY_* verbs as being
stored in the form of a list, ordered according to the name of the resource.
For example, the information returned by QUERY_LS is in order of LS
name. The normal order of the list (for compatibility with SNMP list
ordering) is as follows:
By name length (shortest name first)
By ASCII lexicographical ordering for names of the same length
Where the list ordering differs from this (for example, where the list is
ordered by a numeric value), this difference is indicated in the individual
verb descriptions in Chapter 4, “NOF API Verbs (QUERY Verbs).
This means that an application can obtain information about multiple
resources by requesting the complete list or a specified part of it. The
following parameters on a QUERY_* verb determine which entries from
the list are returned:
buf_size
Size of the data buffer that the application supplies to
receive the returned information.
num_entries
Maximum number of resources for which information
should be returned. The application can specify 1 to
request a specific entry rather than a range, a number
greater than 1 to request a range, or 0 (zero) to request
as many entries as possible.