DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
DMI package procedure libraries

Helper functions

This section describes the functions that are used for creating, deleting, copying and duplicating structures.

RPC information functions

The client front end defines the following RPC information function:

Creating DMI structures

All functions for creating DMI structures are prefixed with DmiNew, and create data of the type specified by the suffix. For example, DmiNewTimeStamp creates a new, zero-initialized DmiTimeStamp.

If a function does not have default input parameters other than memDsc, then only zero-initialized, top-level DMI data type structures are created. For example, the DmiNewRowData(3dmi) function creates a DmiRowData structure with all the members initialized to zero.

Functions that create DMI list data types (for example, DmiAttributeList and DmiAttributeIds allocate a list of specified size. These functions allocate both top-level structures {size, list} and zero-initialized arrays of corresponding elements. Top-level structures contain the specified list size and a pointer to the newly created list.

Some functions let you specify the entire contents of the new data structure. The DmiNewString and DmiNewUnicodeString functions create a new DmiString structure for specified ANSI or Unicode strings, respectively. The size and contents of DmiString are determined by the input string.

The DmiNewOctetString function creates a new DmiOctetString structure of specified size and content.

The DmiNewNodeAddress function creates a DmiNodeAddress structure with specified ``address'', ``rpc'' and ``transport'' fields.

See also:

Deleting DMI structures

All functions for deleting DMI structures are prefixed with DmiFree. The functions free data of the type specified by the suffix. For example, DmiFreeTimeStamp frees a DmiTimeStamp.

The DmiFree functions release the DMI data's top-level structure, and all recursively-referenced memory blocks. All blocks must be previously allocated in the memDsc memory model.

See also:

Copying DMI structures

All functions for deleting DMI structures are prefixed with DmiCopy, and copy data of the type specified in the suffix. For example, DmiCopyTimeStamp copies a DmiTimeStamp structure.

The destination top-level structure must be previously allocated. All referenced structures of the destination structure are recursively created and copied from the respective referenced source structures.

See also:

Duplicating DMI structures

All functions for duplicating DMI structures are prefixed with DmiDup(3dmi). The DmiDup functions duplicate top-level DMI data structures, and all referenced structures of the destination structure are recursively created and copied from the respective source structures. For example, DmiDupTimeStamp duplicates a DmiTimeStamp.

See also:


Next topic: RPC specific information
Previous topic: Argument passing

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004