[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Understanding the Diagnostic Subsystem for AIX

diag_get_list

Purpose

Retrieves all objects in an object class that match the specified criteria.

Syntax

#include    <diag/diagodm.h>
#include    <sys/cfgodm.h>
#include    <diag/DiagODM.h>

void * diag_get_list (
                                void             *classp,
                                char             *criteria,
                                struct           listinfo *info,
                                int              max_expect,
                                int              depth)

Description

The diag_get_list subroutine takes an object class and criteria as input, and returns a list of objects that satisfy the input criteria. The subroutine opens and closes the object class around the get if the object class was not previously opened. If the object class was previously opened, the subroutine leaves the object class open when it returns.

Parameters

classp Class symbol identifier returned from a diag_open_class subroutine. If the diag_open_class subroutine has not been called, then this is the structure name of the class normally defined in either the diag/diagodm.h file, diag/DiagODM.h file, or sys/cfgodm.h file.
criteria String that contains the qualifying criteria for selecting objects.
info Structure containing information about the retrieval of the objects.
max_expect Expected number of objects to be returned. This is used to control the increments in which storage for structures is allocated, to reduce the realloc subroutine copy overhead.
depth Number of levels to recurse for objects with linking descriptors.

Return Value

Upon successful completion, a pointer to an array of C language structures containing the objects is returned. If no match is found, NULL is returned. If the diag_get_list fails, a value of -1 is returned.


[ Previous | Next | Contents | Home | Search ]