mas_get_met_id(3mas)
mas_get_met_id --
get the metric ID for a particular entry in the metric registration table for consumer use
Synopsis
cc [options] file -lmas
#include <mas.h>
metid_t *mas_get_met_id(int md, uint32 mrt_slot);
Description
The function mas_get_met_id returns the address of the
metric ID number of the metric located in position mrt_slot of
the metric registration table.
The md argument is a metric descriptor returned from
mas_open.
The second argument, mrt_slot, is
array index to access within the metric registration table.
mrt_slot must be a non-negative number less than the
number of entries in the metric registration table.
The number of entries in the metric registration table can be
determined by calling mas_get_nmrt.
Hence, mas_get_met_id
can be used to determine the set of metrics that have been registered
in a metric registration file.
Return values
On success, mas_get_met_id returns an address
at which the metric ID number resides in the caller's address space.
On failure, mas_get_met_id returns NULL and sets mas_errno to identify the error.
Errors
MAS_INVALID_ARG - invalid metric descriptor-
The metric descriptor, md does not correspond
to a metric registration file previously opened by mas_open.
MAS_INVALIDARG - invalid slot number-
The location referred to by mrt_slot within the
metric registration table does not exist.
mrt_slot is probably greater than or equal to the
number of entries in the metric registration table.
MAS_SANITY - corrupted metric registration file - id address out of bounds-
The metric registration file is corrupted such that the address
of the metric ID falls outside the bounds of the metadata area.
References
Intro(3mas)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004