Previous section.
UMA Measurement Layer Interface (MLI)
Copyright © 1997 The Open Group
C Language Header Files
The following two sections present the
<mli.h>
and
<uma.h>,
header files.
These two header files are included
because they define the data types and
structures more exactly than English text.
<mli.h>
#ifndef MLI_H
#define MLI_H
#include <limits.h>
#include <sys/uma.h>
/*
******************** NOTICE ***********************************
* The <dci.h>, <mli.h> and <uma.h> header files
* introduce UMA symbols which may conflict with other
* symbols defined in an application. Symbols with the
* following prefixes are therefore reserved to UMA:
* DCI
* dci
* UMA
* UMR
* UMS
*
* Note that the header files are provided as advisory
* reference examples.
******************** END OF NOTICE ****************************
*/
/**********************************************************************/
/* UMA data types */
/**********************************************************************/
typedef UMAInt4 UMAEvent;
typedef UMAUint4 UMAFlushFlags;
typedef UMAInt4 UMAPrio;
typedef UMAInt4 UMAProp;
typedef UMAInt4 UMAReasonCode;
typedef UMAUint4 UMASegFlags;
typedef UMAInt4 UMASessId;
typedef UMAInt4 UMAStatusCode;
typedef UMAInt4 UMAChannelFlags;
typedef UMAInt4 UMAWhence;
/**********************************************************************/
/* UMA Workload Definition Structures */
/**********************************************************************/
/* The UMAWorkDefn structure provides the definition of a constructed
* workload and specification:
*/
typedef struct UMAWorkDefn {
UMAUint4 size; /* size of this struct */
UMAUint4 rFlags; /* reporting flags */
UMATextDescr workIdSpec; /* workload id offset/size */
UMAUint4 granularity; /* granularity request */
UMAUint4 wFlags; /* workload flags */
UMAVarLenDescr workInfoSpec /* offset to WorkInfo data */
UMAVarLenDescr instanceSpec /* offset to instance data */
UMAVarLenData data; /* WorkInfo, instance specs*/
} UMAWorkDefn;
/* The UMAWorkSpec structure for specifying selection of
* UMAWorkInfo values:
*/
typedef struct UMAWorkSpec {
UMUint4 wSpecSize; /* size of this structure */
UMAUint4 wSelect; /* WorkInfo level select bits */
UMAVarArrayDescr wSpecDescr; /* WorkInfo specs descr */
UMAVarLenData data; /* WorkInfo level spec value */
} UMAWorkSpec;
/* And each WorkInfo level specification is in a UMAWorkLvlSpec
* structure:
*/
typedef struct UMAWorkLvlSpec {
UMAUint4 wLvlSize; /* size of this structure */
UMAUint4 wLvlType; /* enum type of WorkInfo spec*/
/* UMA_TEXTSTRING, */
/* UMA_UINT4, etc assigned */
UMAVarLenData data; /* work spec/expr */
} UMAWorkLvlSpec;
/* The UMAInstSpec structure for specifying selection of instances is
* defined:
*/
typedef struct UMAInstSpec {
UMAUint4 iSpecSize; /* size of this structure */
UMAUint4 iSelect; /* instance level select bits */
UMAVarArrayDescr iSpecsDescr; /* instance level specs descr */
UMAVarLenData data; /* instance level spec values */
} UMAInstSpec;
/* And each instance level specification is defined using the
* UMAInstLvlSpec structure:
*/
typedef struct UMAInstLvlSpec {
UMAUint4 iLvlSize; /* size of this structure */
UMAUint4 iLvlType; /* enum type of instance spec*/
/* UMA_TEXTSTRING, */
/* UMA_UINT4, etc assigned */
UMAVarLenData data; /* instance spec/expr */
} UMAInstLvlSpec;
/**********************************************************************/
/* Workload Reporting Flags */
/**********************************************************************/
#define UMA_REPORT_DYNAMIC 1<<0
#define UMA_REPORT_EVENT 1<<1
#define UMA_REPORT_WORKLOAD 1<<2
#define UMA_EVENT_FINALDATA 1<<3
#define UMA_EVENT_INBAND 1<<4
/**********************************************************************/
/* Dynamic and builtin data availability */
/**********************************************************************/
#define UMA_BUILTIN 0x0001 /* builtin data available */
#define UMA_DYNAMIC 0x0002 /* dynamic data available */
/**********************************************************************/
/* UMA Configuration Description Structures */
/* Returned in Messages of Class UMA Configuration */
/**********************************************************************/
/* The UMAClassAttr structure is returned in the message of subclass
* "Class Attributes" It provides the i18n, and ascii name labels for
* a class, identifies the metric-containing subclasses available in
* the class and provides labels for them.
*/
typedef struct UMAClassAttr {
UMAClassId class; /* class handle */
UMAVarLenDescr classLabel; /* class label struct */
UMAArrayDescr subClassId; /* array of DPD subcl ids */
UMAArrayDescr subClassStatus; /* subclass status array */
UMAVarArrayDescr subClassLabel; /* subcl label struct array */
} UMAClassAttr;
/* The UMALabel structure is used to provide both ascii and i18n
* labels for UMA providers, subclasses, instance tags, work units,
* and for data elements.
*/
typedef struct UMALabel {
UMAUint4 size; /* size of this structure */
UMAVarLenDescr ascii; /* descriptor for the variable */
/* UMATextString for ascii label */
UMAElementDescr i18n; /* descriptor for the variable */
/* length data for i18n label */
UMAVarLenData data; /* label data for ascii and i18n */
} UMALabel;
/* The UmaSubClassAttr structure is the container for the metadata
* describing a UMA subclass. It includes descriptors for instance
* tags, work unit identifiers and metrics. It is sent in a message
* of subclass "Subclass Attributes".
*/
typedef struct UMASubClassAttr {
UMASubClassHandles handles; /* cl/subcl handles,flags */
UMAVarArrayDescr instanceTags; /* instance tag */
/* descriptor array */
UMAVarArrayDescr workUnits; /* work unit descr array */
UMAVarArrayDescr dataBasic; /* basic data desc array */
UMAVarArrayDescr dataOptional; /* optional data descr array */
UMAVarArrayDescr dataExtended; /* extended data descr array */
} UMASubClassAttr;
/* The UMA class and subclass handles are contained in the
* UMASubClassHandles structure in messages of subclass
* "Subclass Attributes".
*/
typedef struct UMASubClassHandles {
UMAClass class; /* UMA class handle */
UMASubClass subClass; /* UMA subclass handle */
} UMASubClassHandles;
/* Metric instance identifiers are mapped level-by-level to
* instance tags in the UMA UDU and this mapping is described by
* the set of UMAInstTagDescr structures, one per level.
*/
typedef struct UMAInstTagDescr {
UMAUint4 size; /* size of this struct */
UMAUint4 flags; /* indic mapped explicit, */
/* as data array indices */
/* (lowest level only) */
UMADataType type; /* instance tag data type */
UMAInstTagType itType; /* instance tag type */
UMAUint4 itSize; /* tag size in bytes */
UMALabel label; /* ascii and i18n label */
} UMAInstTagDescr;
/* The possible work unit identifiers supplied by a provider
* are defined by a set of UMAWorkDescr structures. This set
* of structures is contained in a message of subclass
* "UMA Work Units".
*/
typedef struct UMAWorkDescr {
UMAUint4 size; /* size of this struct */
UMADataType dType /* Work Unit data type */
UMAWorkType wType; /* Work Unit type */
UMALabel label; /* ascii and i18n labels */
} UMAWorkDescr;
/* The mapping of Data Pool metric values to the UMA Data UDU is
* described by the set of UMADataAttr structures.
* Flag indicators show the implementation status of an item
* (NOTIMPLEMENTED, ENABLED, or DISABLED) and whether the data is
* for the interval or is an absolute count. The UMADataAttr
* are contained in messages of subclass "Subclass Attributes".
*/
typedef struct UMADataAttr {
UMAUint4 size; /* size of this struct */
UMADataType dataType; /* data type of metric */
UMAUint4 status; /* status: NOTIMPLEMENTED, */
/* DISABLED, ENABLED */
UMAUnit units; /* data units */
UMAUint4 dataFlags; /* flags on units */
/* rates, counts, */
/* intervalization */
UMAUint4 offset; /* to data item or descr */
/* from segment start */
UMADescrType descrType /* Descriptor type */
/* (or none) */
UMALabel label; /* ascii and i18n labels */
} UMADataAttr;
/**********************************************************************/
/* UMA control classes */
/**********************************************************************/
#Define UMA_COMMAND 1
#define UMA_CONDITION 2
#define UMA_STATUS 3
/**********************************************************************/
/* UMA message command subclasses */
/**********************************************************************/
#define UMA_CREATE 0
#define UMA_RECONNECT 1
#define UMA_SETATTR 2
#define UMA_CLOSE 3
#define UMA_START 4
#define UMA_SETTHRESH 5
#define UMA_RELEASE 6
#define UMA_GETDATA 7
#define UMA_STOP 8
#define UMA_SEEK 9
#define UMA_REQCONFIG 10
/**********************************************************************/
/* UMA message status subclasses */
/**********************************************************************/
#define UMA_CONN_ACK 1
#define UMA_RECONN_ACK 2
/**********************************************************************/
/* UMA message command segment types */
/**********************************************************************/
typedef struct UMACreate {
UMAHeader cs_header; /* Message header */
UMASegDescr cs_segdescr; /* Segment descriptor */
UMAUint4 cs_buff_size; /* Maximum comm. buffer size */
UMAUint4 cs_uid; /* For permission validation */
UMATextDescr cs_src; /* source of the data */
UMATextDescr cs_dest; /* destination of data */
UMAProp cs_props; /* Session properties */
} UMACreate;
typedef struct UMAReconnect {
UMAHeader cs_header; /* Message header */
UMASegDescr cs_segdescr; /* Segment descriptor */
UMAUint4 cs_buff_size; /* Maximum comm. buffer size */
UMATextDescr cs_dest; /* destination of data */
} UMAReconnect;
typedef struct UMASetAttr {
UMAHeader cs_header; /* Message header */
UMASegDescr cs_segdescr; /* Segment descriptor */
UMATextDescr cs_name; /* Attribute name */
UMAInt4 cs_value; /* Attribute value */
} UMASetAttr;
typedef struct UMAClose {
UMAHeader cs_header; /* Message header */
} UMAClose;
typedef struct UMAStart {
UMAHeader cs_header; /* Message header */
UMASegDescr cs_segdescr; /* Segment descriptor */
UMAProvider cs_provider; /* data provider identifier */
UMAClass cs_class; /* data class */
UMASubClass cs_subclass; /* data subclass */
UMASegFlags cs_flags; /* segment flags */
UMAUint4 cs_sentinel; /* len of wkld defn struct */
UMAWorkDefn cs_wklddefn; /* workload defn struct */
} UMAStart;
typedef struct UMASetThreshold {
UMAHeader cs_header; /* Message header */
UMASegDescr cs_segdescr; /* Segment descriptor */
UMAProvider cs_provider; /* data provider identifier */
UMAClass cs_class; /* data class */
UMASubClass cs_subclass; /* data subclass */
UMASegFlags cs_flags; /* segment flags */
UMATextDescr cs_expression; /* selection expression */
UMATextDescr cs_wkldId; /* workload identifier */
} UMASetThreshold;
typedef struct UMARelease {
UMAHeader cs_header; /* Message header */
} UMARelease;
typedef struct UMARequestData {
UMAHeader cs_header; /* Message header */
UMAUint4 cs_buffer; /* buffer selection */
} UMARequestData;
typedef struct UMAStop {
UMAHeader cs_header; /* Message header */
UMASegDescr cs_segdescr; /* Segment descriptor */
UMAProvider cs_provider; /* data provider identifier */
UMAClass cs_class; /* data class */
UMASubClass cs_subclass; /* data subclass */
UMASegFlags cs_flags; /* segment flags */
UMAFlushFlags cs_flush; /* which Q to flush */
UMAUint4 cs_sentinel; /* len of wkld defn struct */
UMAWorkDefn cs_wklddefn; /* workload defn struct */
} UMAStop;
typedef struct UMASeek {
UMAHeader cs_header; /* Message header */
UMASegDescr cs_segdescr; /* Segment descriptor */
UMATimeStamp cs_tstamp; /* Search timestamp */
UMAInt4 cs_pos; /* relative position */
UMATimeStamp cs_currtime; /* session's current time */
UMAUint4 cs_lastseek; /* last seek number */
} UMASeek;
typedef struct UMARequestConfig {
UMAHeader cs_header; /* Message header */
UMASegDescr cs_segdescr; /* Segment descriptor */
UMAProvider cs_provider; /* data provider identifier */
UMAClass cs_class; /* data class */
UMASubClass cs_subclass; /* data subclass */
} UMARequestConfig;
/**********************************************************************/
/* UMA message status segment types */
/**********************************************************************/
typedef struct UMAConnectAck {
UMAHeader cs_header; /* Message header */
UMASegDescr cs_segdescr; /* Segment descriptor */
UMAStatusCode cs_status; /* Status of session creation */
UMAReasonCode cs_reason; /* Reason of the failure */
} UMAConnectAck;
typedef struct UMAReconnectAck {
UMAHeader cs_header; /* Message header */
UMASegDescr cs_segdescr; /* Segment descriptor */
UMAStatusCode cs_status; /* Status of reconnection */
UMAReasonCode cs_reason; /* Reason of the failure */
} UMAReconnectAck;
/**********************************************************************/
/* UMA message condition */
/**********************************************************************/
typedef struct UMACondition {
UMAHeader cs_header; /* header */
UMASegDescr cs_segdescr; /* segment descriptor */
UMAInt4 cs_source; /* Source of the condition */
UMAInt4 cs_cond_id; /* Condition identification */
UMATextDescr cs_cond_descr /* Condition description */
UMAInt4 cs_hint1_type; /* Type of cs_hint1 */
union cs_hint1 {
UMAInt4 hint1_int4;
UMAInt8 hint1_int8;
UMATimeSec hint1_timesec;
UMATimeUsec hint1_timeusec;
UMATimeNsec hint1_timensec;
UMATimeStamp hint1_timestamp;
} cs_hint1;
UMAInt4 cs_hint2_type; /* Type of cs_hint2 */
union cs_hint2 {
UMAInt4 hint2_int4;
UMAInt8 hint2_int8;
UMATimeSec hint2_timesec;
UMATimeUsec hint2_timeusec;
UMATimeNsec hint2_timensec;
UMATimeStamp hint2_timestamp;
} cs_hint2;
UMAInt4 cs_hint3_type; /* Type of cs_hint3 */
union cs_hint3 {
UMAInt4 hint3_int4;
UMAInt8 hint3_int8;
UMATimeSec hint3_timesec;
UMATimeUsec hint3_timeusec;
UMATimeNsec hint3_timensec;
UMATimeStamp hint3_timestamp;
} cs_hint3;
} UMA_Condition;
/**********************************************************************/
/* UMA message condition subclasses */
/**********************************************************************/
#define UMA_INFO 1
#define UMA_WARNING 2
#define UMA_SEVERE 3
#define UMA_FATAL 4
/**********************************************************************/
/* UMA message condition codes for source */
/**********************************************************************/
#define DCL 1
#define DSL 2
#define UMADS 3
#define RECENT_HIST 4
/**********************************************************************/
/* UMA Condition Message Identifiers */
/**********************************************************************/
#define UMA_GAP -1 /* Timestamp in a gap in recent history */
#define UMA_NODATA -2 /* Requested segments not in current */
/* interval */
#define UMA_EOS -3 /* End time has been reached for this */
/* session */
#define UMA_EOF -4 /* End of source file has been reached */
#define UMA_INTVL -5 /* Requested interval is not available */
#define UMA_OPEN -6 /* Error opening a source file */
#define UMA_FLOCK -7 /* Source file is locked by another */
/* session */
#define UMA_PERMISSION -8 /* Permission error opening a source */
/* file */
#define UMA_FILE_TYPE -9 /* Source file is of invalid file type */
#define UMA_BAD_FILE -10 /* Source file is corrupted */
#define UMA_READ -11 /* Error reading a source file */
#define UMA_WRITE -12 /* Error writing to a source file */
#define UMA_ALLOC -13 /* Error while allocating memory */
#define UMA_STIME_BOUNDS -14 /* Seek to time prior to session start */
/* time */
/**********************************************************************/
/* UMA message condition codes for hint types */
/**********************************************************************/
#define UMA_HINT_INT4 1
#define UMA_HINT_INT8 2
#define UMA_HINT_TIMESEC 3
#define UMA_HINT_TIMEUSEC 4
#define UMA_HINT_TIMENSEC 5
#define UMA_HINT_TIMESTAMP 6
/**********************************************************************/
/* Miscellaneous constants */
/**********************************************************************/
#ifdef NULL
#undef NULL
#endif
#define NULL 0
#ifdef TRUE
#undef TRUE
#endif
#define TRUE 1
#ifdef FALSE
#undef FALSE
#endif
#define FALSE 0
#define UMA_ANYSESSION INT_MAX
#define UMA_ALLSESSIONS INT_MAX
#define UMA_ALLCLASSES INT_MAX
#define UMA_ALLSUBCLASSES INT_MAX
#define UMA_TIME_MAX INT_MAX
#define UMA_TIME_MIN INT_MIN
#define UMA_NULLSESSION -1
#define UMA_TIME_NOW -999
#define UMA_ANY_BAND 0x0001
#define UMA_IN_BAND_ONLY 0x0002
#define UMA_OUT_OF_BAND_ONLY 0x0004
#define UMA_PORT 1797 /* Port number for UMA service */
/**********************************************************************/
/* UMA session flags */
/* The following flags override the default (opposite) */
/**********************************************************************/
#define UMA_NOTERM 0x0001
#define UMA_NOTREGULAR 0x0002
#define UMA_SYNCH 0x0008
#define UMA_EVENT 0x0010
#define UMA_COHERENT 0x0020
/**********************************************************************/
/* UMA seek tstamp */
/**********************************************************************/
#define UMA_STIME -1
#define UMA_CTIME -2
#define UMA_LTIME -3
#define UMA_TSTAMP -4
/**********************************************************************/
/* UMA flush flags */
/**********************************************************************/
#define UMA_ALLSTARTED 1
#define UMA_HELD 2
#define UMA_RELEASED 3
/**********************************************************************/
/* UMA Class and Subclass Status */
/**********************************************************************/
#define UMA_ENABLED 1 /* Class/Subclass available */
#define UMA_DISABLED 2 /* Class/Subclass implemented, */
/* but omitted from the system */
/* at configuration time */
#define UMA_NOTIMPLEMENTED 3 /* Class/Subclass not implemented */
/**********************************************************************/
/* Network Family */
/**********************************************************************/
#define UMA_INET 1 /* Internet Protocol */
/**********************************************************************/
/* UMA macro operations */
/**********************************************************************/
#define UMA_SET(FIELD, FLAG) ((FIELD) |= (FLAG))
#define UMA_RESET(FIELD, FLAG) ((FIELD) &= ~(FLAG))
#define UMA_ISSET(FIELD, FLAG) ((FIELD) & (FLAG))
#define UMA_CLEAR(FIELD) ((FIELD) &= 0)
/**********************************************************************/
/* UMA Status Codes */
/**********************************************************************/
#define UMS_SUCCESS 0 /* No error */
#define UMS_NODE -1 /* Invalid/Unknown host name */
#define UMS_TIME -2 /* Invalid time */
#define UMS_SOURCE -3 /* Invalid source */
#define UMS_DEST -4 /* Invalid destination */
#define UMS_CLASS -5 /* Invalid class */
#define UMS_SUBCLASS -6 /* Invalid subclass */
#define UMS_INTERVAL -7 /* Invalid interval */
#define UMS_PROPERTY -8 /* Invalid property */
#define UMS_SESSID -9 /* Invalid session identifier */
#define UMS_PRIORITY -10 /* Invalid Priorit */
#define UMS_PROTOCOL -11 /* Protocol error */
#define UMS_COMM -12 /* Communication failure */
#define UMS_SESSION -13 /* Error has occurred in this session */
#define UMS_NOMSG -14 /* No message received from UMA */
#define UMS_SIGNAL -15 /* A interrupt has occurred */
#define UMS_EOS -16 /* Session is about to end */
#define UMS_ATTR -17 /* Invalid attribute specified */
#define UMS_UID -18 /* Invalid UID */
#define UMS_FLAGS -19 /* Invalid flags */
#define UMS_EXPRESSION -20 /* Invalid selection expression */
#define UMS_EVENT -21 /* unsolicited event unsupported */
/**********************************************************************/
/* UMA Reason Codes */
/**********************************************************************/
#define UMR_NOREASON 0 /* No reason */
#define UMR_INVALID -1 /* An invalid parameter specified */
#define UMR_UNKNOWN -2 /* Unknown src, dest, node, etc */
#define UMR_NETWORK -3 /* Network unreacheable */
#define UMR_TIMEOUT -4 /* A timeout has occured */
#define UMR_MAX -5 /* Max number of sessions reached */
#define UMR_NOTIMPLEMENTED -6 /* Class, subclass or event not */
/* implemented */
#define UMR_DISABLED -7 /* Class or Subclass disabled */
#define UMR_CONNECT -8 /* Error in connecting to UMA */
#define UMR_RECEIVE -9 /* Error when receiving from UMA */
#define UMR_SEND -10 /* Error when sending to UMA */
#define UMR_CONFLICT -11 /* Invalid Comb. of arguments */
#define UMR_INCOMPLETE -12 /* A required attribute not spec. */
#define UMR_PERMISSION -13 /* Permission denied */
#define UMR_ACTIVE -14 /* Session already active */
#define UMR_SYSERR -15 /* UMA has encountered a system err */
#define UMR_RESOURCE -16 /* Lack of system resource */
#define UMR_UMADS -17 /* Error accessing UMADS */
#define UMR_INTR -18 /* An interrupt has occured */
#define UMR_HEADER -19 /* An invalid header encountered */
#define UMR_MESSAGE -20 /* An invalid message encountered */
#define UMR_NOTSTARTED -21 /* Subclass not started */
#endif /* MLI_H */
<uma.h>
#ifndef UMA_H
#define UMA_H
#include <sys/types.h>
/*
* ****************** NOTICE ***********************************
* The <dci.h>, <mli.h> and <uma.h> header files
* introduce UMA symbols which may conflict with other
* symbols defined in an application. Symbols with the
* following prefixes are therefore reserved to UMA:
* DCI
* dci
* UMA
* UMR
* UMS
*
* Note that the header files are provided as advisory
* reference examples.
* ****************** END OF NOTICE ****************************
*/
/**********************************************************************/
/* UMA data types */
/**********************************************************************/
typedef int UMAInt4;
typedef unsigned int UMAUint4;
typedef longlong_t UMAInt8;
typedef ulonglong_t UMAUint8;
typedef UMAInt4 UMABoolean;
typedef UMAUint4 UMAProvider;
typedef UMAUint4 UMAClass;
typedef UMAUint4 UMAMsgFlags;
typedef UMAUint4 UMANetAddr;
#ifdef ORIGINALUMA
typedef unsigned char UMAOctetString;
#else
/* make sure that unsigned char in MLI definition is used correctly */
#endif
typedef UMAUint4 UMASchedClass;
typedef UMAUint4 UMASubClass;
typedef struct UMASegDescr {
unsigned char segtag[4];
unsigned char seglenlen;
unsigned char seglen[3];
} UMASegDescr;
typedef time_t UMATimeSec;
typedef UMAInt8 UMATimeNsec;
typedef UMAInt8 UMATimeUsec;
typedef UMAInt8 UMATimeStamp;
#ifdef timespec
typedef struct timespec UMATimeSpec;
#else
typedef struct UMATimeSpec {
UMAUint4 tv_sec;
UMAUint4 tv_nsec;
} UMATimeSpec;
#endif
#ifndef timeval
typedef struct timeval UMATimeVal;
#else
typedef struct UMATimeVal {
UMAUint4 tv_sec;
UMAUint4 tv_usec;
} UMATimeVal;
#endif
/* Support for random access to variable length members of structures
* requires that the address of these members is derived from fixed
* size structures at known offsets within the main structure
* definition. There are several types of variable length member descriptor
* structures, all of which contain the offset required to locate the
* variable length data. The 'offset' is considered relative to the
* base address of the parent structure of the variable length member
* descriptor. Extra information concerning the variable length data
* may also be available.
*
* Note that it is not possible to determine whether a variable length
* data has been initialized before it is referenced. As a convention,
* the offset plus length equal 0 could be used to indicate an
* uninitialized variable length data item.
*/
/* used as a place holder for variable length data in structs.
/* ------------------------------------------------------------- */
typedef unsigned char UMAVarLenData; /* Variable-length-date */
/* container */
/* descriptor for a single variable length element which contains
its own size
/* ------------------------------------------------------------- */
typedef struct UMAVarLenDescr {
UMAUint4 offset; /* offset to beginning of data */
} UMAVarLenDescr;
/* descriptor for variable length element (which doesn't contain */
/* its own size) */
/* ------------------------------------------------------------- */
typedef struct UMAElementDescr {
UMAUint4 offset; /* offset to beginning of data */
UMAUint4 size; /* size of the whole structure */
} UMAElementDescr;
/* descriptor for variable length text */
/* ------------------------------------------------------------- */
typedef struct UMATextDescr {
UMAUint4 offset; /* offset to beginning of data */
UMAUint4 count; /* count of elements in the text */
} UMATextDescr;
/* struct for a variable length string
/* ------------------------------------------------------------- */
typedef struct UMAString {
UMAUint4 size; /* size of the entire structure */
char string[1]; /* the variable length */
/* text string */
} UMATextString, UMAOctetString;
/* descriptor for variable length array of fixed size elements */
/* ------------------------------------------------------------- */
typedef struct UMAArrayDescr {
UMAUint4 offset; /* offset to beginning of data */
UMAUint4 count; /* count of elements in the array */
UMAUint4 size; /* size of each element of the array */
} UMAArrayDescr;
/* descriptor for variable length array of variable sized elements
/* ------------------------------------------------------------- */
typedef struct UMAVarArrayDescr {
UMAUint4 offset; /* offset to beginning of data */
UMAUint4 count; /* count of elements in the array*/
} UMAVarArrayDescr;
/* ------------------------------------------------------------- */
* Constants for common units in UMA
* Units are organised into 5 types:
* size, time, count, derived and info units
*
*/
#define UMA_UNITS_TIME 0x10000
#define UMA_UNITS_COUNT 0x20000
#define UMA_UNITS_SIZE 0x30000
#define UMA_UNITS_DERIVED 0x40000
#define UMA_UNITS_INFO 0x50000
enum UMAUnit {
/* time units */
UMA_SECS = 0x01 | UMA_UNITS_TIME,
UMA_MILLISECS = 0x02 | UMA_UNITS_TIME,
UMA_MICROSECS = 0x03 | UMA_UNITS_TIME,
UMA_NANOSECS = 0x04 | UMA_UNITS_TIME,
UMA_PICOSECS = 0x05 | UMA_UNITS_TIME,
UMA_TICKS = 0x06 | UMA_UNITS_TIME,
/* count units */
UMA_COUNT = 0x01 | UMA_UNITS_COUNT,
UMA_EVENT = 0x02 | UMA_UNITS_COUNT,
UMA_PAGES = 0x03 | UMA_UNITS_COUNT,
UMA_BLOCKS = 0x04 | UMA_UNITS_COUNT,
UMA_CHARACTERS = 0x05 | UMA_UNITS_COUNT,
UMA_QLENGTH = 0x06 | UMA_UNITS_COUNT,
UMA_PROCESSES = 0x07 | UMA_UNITS_COUNT,
UMA_TASKS = 0x08 | UMA_UNITS_COUNT,
UMA_THREADS = 0x09 | UMA_UNITS_COUNT,
UMA_JOBS = 0x0a | UMA_UNITS_COUNT,
UMA_USERS = 0x0b | UMA_UNITS_COUNT,
UMA_TRANSACTIONS = 0x0c | UMA_UNITS_COUNT,
UMA_MESSAGES = 0x0d | UMA_UNITS_COUNT,
UMA_SESSIONS = 0x0e | UMA_UNITS_COUNT,
UMA_STREAMSMODULES = 0x0f | UMA_UNITS_COUNT,
UMA_STREAMSHEADS = 0x10 | UMA_UNITS_COUNT,
UMA_STREAMSMSGS = 0x11 | UMA_UNITS_COUNT,
UMA_PACKETS = 0x12 | UMA_UNITS_COUNT,
UMA_INODES = 0x13 | UMA_UNITS_COUNT,
UMA_FILES = 0x14 | UMA_UNITS_COUNT,
UMA_FILESYSTEMS = 0x15 | UMA_UNITS_COUNT,
UMA_READS = 0x16 | UMA_UNITS_COUNT,
UMA_WRITES = 0x17 | UMA_UNITS_COUNT,
UMA_SEEKS = 0x18 | UMA_UNITS_COUNT,
UMA_IOCTLS = 0x19 | UMA_UNITS_COUNT,
UMA_CONNECTIONS = 0x1a | UMA_UNITS_COUNT,
UMA_RETRIES = 0x1b | UMA_UNITS_COUNT,
UMA_MOUNTS = 0x1c | UMA_UNITS_COUNT,
UMA_REWINDS = 0x1d | UMA_UNITS_COUNT,
UMA_POSITIONINGS = 0x1e | UMA_UNITS_COUNT,
UMA_MARKS = 0x1f | UMA_UNITS_COUNT,
UMA_PORTS = 0x20 | UMA_UNITS_COUNT,
UMA_PROCESSORS = 0x21 | UMA_UNITS_COUNT,
UMA_DISKS = 0x22 | UMA_UNITS_COUNT,
UMA_NETS = 0x23 | UMA_UNITS_COUNT,
UMA_SLINES = 0x24 | UMA_UNITS_COUNT,
UMA_BUSSES = 0x25 | UMA_UNITS_COUNT,
UMA_CHANNELS = 0x26 | UMA_UNITS_COUNT,
UMA_NOUNITS = 0x27 | UMA_UNITS_COUNT,
/* size units */
UMA_BYTES = 0x01 | UMA_UNITS_SIZE,
UMA_KBYTES = 0x02 | UMA_UNITS_SIZE,
UMA_MBYTES = 0x03 | UMA_UNITS_SIZE,
UMA_GBYTES = 0x04 | UMA_UNITS_SIZE,
UMA_TBYTES = 0x05 | UMA_UNITS_SIZE,
/* derived data units. */
/* The values from 0x01-0x9f are reserved. */
/* Values from 0xa0-0xfe may be used for vendor extensions. */
/* 0x00 and 0xff are unavailable for use */
UMA_DERIVED_SUM2 = 0x01 | UMA_UNITS_DERIVED,
UMA_DERIVED_SUM3 = 0x02 | UMA_UNITS_DERIVED,
UMA_DERIVED_DIFFERENCE = 0x03 | UMA_UNITS_DERIVED,
UMA_DERIVED_AVERAGE = 0x04 | UMA_UNITS_DERIVED,
UMA_DERIVED_PERCENT = 0x05 | UMA_UNITS_DERIVED,
UMA_DERIVED_PRODUCT = 0x06 | UMA_UNITS_DERIVED,
UMA_DERIVED_VARIANCE = 0x07 | UMA_UNITS_DERIVED,
/* info units */
UMA_CPU = 0x01 | UMA_UNITS_INFO,
UMA_MEMORY = 0x02 | UMA_UNITS_INFO,
UMA_TASKID = 0x03 | UMA_UNITS_INFO,
UMA_THREADID = 0x04 | UMA_UNITS_INFO,
UMA_PRECEDENCE = 0x05 | UMA_UNITS_INFO,
UMA_ORDER = 0x06 | UMA_UNITS_INFO,
UMA_DATA = 0x07 | UMA_UNITS_INFO,
UMA_TRUEFALSE = 0x08 | UMA_UNITS_INFO,
UMA_MODEL = 0x09 | UMA_UNITS_INFO,
UMA_POSITION = 0x0a | UMA_UNITS_INFO,
UMA_SECSMILLI = 0x0b | UMA_UNITS_INFO,
UMA_ADDR = 0x0c | UMA_UNITS_INFO,
UMA_SIZE = 0x0d | UMA_UNITS_INFO,
UMA_PROTECT = 0x0e | UMA_UNITS_INFO,
UMA_OBJECTNAME = 0x0f | UMA_UNITS_INFO,
UMA_MEMOFFSET = 0x10 | UMA_UNITS_INFO,
UMA_BYTESIZE = 0x11 | UMA_UNITS_INFO,
UMA_MODEL_ID = 0x12 | UMA_UNITS_INFO,
UMA_STATE = 0x13 | UMA_UNITS_INFO,
UMA_PROCESSOR_SPEED = 0x14 | UMA_UNITS_INFO
};
typedef enum UMAUnit UMAUnit;
/* ------------------------------------------------------------- */
/* Instance type definitions. */
enum UMAInstTagType {
UMA_SINGLEINST = 1, /* A single instance of */
/* value '0' exists */
UMA_WORKINFO = 2, /* UMA_WORKINFO enumeration */
UMA_WORKID = 3, /* Data associated */
/* with UMA_WORKINFO */
UMA_MSG_QUEUE = 4,
UMA_SEMAPHORE = 5,
UMA_SHR_SEGMENT = 6,
UMA_PROCESSOR = 7, /* processor number */
UMA_FSGROUP = 8,
UMA_MOUNTPOINT = 9,
UMA_INODE = 10, /* inode number */
UMA_DISKID = 11, /* disk device number */
UMA_BUCKET_NO = 12,
UMA_DISKPARTITION = 13,
UMA_ACCESS_PORT = 14,
UMA_DEVICE = 15, /* generic device number */
UMA_KERNEL_TABLES = 16,
UMA_CHANNEL = 17, /* channel number */
UMA_IOP = 18, /* IO processor number */
UMA_PATH = 19,
UMA_SYSCALL = 20, /* system call number */
UMA_ENUMERATION = 21,
UMA_STREAMS = 22,
UMA_CONTROLLERID = 23, /* controller number */
UMA_SCHED_CLASS = 24, /* scheduling class type */
UMA_LOGICALVOL = 25,
UMA_REMOTE_FSTYPES = 26,
UMA_IPADDR = 27,
UMA_FILESERVER_COMMAND = 28,
UMA_FILECLIENT_COMMAND = 29,
UMA_SERVER_COMMAND = 30,
UMA_CLIENT_COMMAND = 31,
UMA_MEMOBJECT_ID = 32,
UMA_HOSTPORT = 33,
UMA_TASKPORT = 34,
UMA_THREADPORT = 35,
UMA_DPGRPORT = 36,
UMA_PRCSCTLPORT = 37,
UMA_VMADDRESS = 38
};
typedef enum UMAInstTagType UMAInstTagType;
/* ------------------------------------------------------ */
/* Default UMAWorkInfo definitions: */
#define UMA_WORKINFO_PROJECT 1<<0
#define UMA_WORKINFO_GROUP_ID 1<<1
#define UMA_WORKINFO_EFFECTIVE_GROUP_ID 1<<2
#define UMA_WORKINFO_USER_ID 1<<3
#define UMA_WORKINFO_EFFECTIVE_USER_ID 1<<4
#define UMA_WORKINFO_SESSION_ID 1<<5
#define UMA_WORKINFO_TTY 1<<6
#define UMA_WORKINFO_NQS 1<<7
#define UMA_WORKINFO_SCHEDULING_CLASS 1<<8
#define UMA_WORKINFO_SCHED_GRP 1<<9
#define UMA_WORKINFO_TRANSACTION_ID 1<<10
#define UMA_WORKINFO_PROCESS_GRP 1<<11
#define UMA_WORKINFO_PARENT_PROCESS_ID 1<<12
#define UMA_WORKINFO_COMMAND_NAME 1<<13
#define UMA_WORKINFO_PROCESS_ID 1<<14
#define UMA_WORKINFO_THREAD_ID 1<<15
/* fundamental data types */
enum UMADataType {
UMA_INT4 = 1,
UMA_INT8 = 2,
UMA_UINT4 = 3,
UMA_UINT8 = 4,
UMA_BOOLEAN = 5,
UMA_OCTETSTRING = 6,
UMA_TEXTSTRING = 7,
UMA_TIMEVAL = 8,
UMA_TIMESPEC = 9,
UMA_TIMESTAMP = 11,
UMA_DERIVED = 12,
UMA_CLASSDATA = 13
};
typedef enum UMADataType UMADataType;
/* descriptor types */
enum UMADescrType {
UMA_NODESCR = 0,
UMA_ELEMENTDESCR = 1,
UMA_TEXTDESCR = 2,
UMA_ARRAYDESCR = 3,
UMA_VARARRAYDESCR = 4,
UMA_VARLENDESCR = 5
};
typedef enum UMADescrType UMADescrType;
/**********************************************************************/
/* Standard UMA message header */
/**********************************************************************/
typedef struct UMAHeader {
unsigned char mh_msgtag[4]; /* BER encoded indicator tag */
unsigned char mh_msglenlen; /* ASN.1/BER length of length */
unsigned char mh_msglen[3]; /* msg length from next field */
unsigned char mh_hdrtag[3]; /* msg header tag */
unsigned char mh_hdrlen; /* msg header length */
UMAMsgFlags mh_flags; /* Data Modes */
UMATimeUsec mh_time; /* timestamp of msg creation */
UMAClass mh_class; /* UMA Class of the message */
UMASubClass mh_subclass; /* UMA Subclass of the message */
unsigned char mh_address[8]; /* Host network address */
unsigned char mh_addr_family; /* Host network address type */
UMAUint4 mh_provider; /* Data provider */
UMAUint4 mh_provinst; /* Data provider instance */
} UMAHeader;
/**********************************************************************/
/* UMA interval message header extension */
/**********************************************************************/
typedef struct UMAIntExt {
unsigned char mhix_ixlenlen; /* Extension tag and length */
unsigned char mhix_ixlen[3]; /* Extension length */
UMAMsgFlags mhix_flags; /* Interval extension flags */
UMATimeSec mhix_schedtime; /* Time of sched. measurement */
UMATimeUsec mhix_intime; /* Actual interval start time */
UMATimeUsec mhix_intlen; /* Actual interval duration */
UMAUint4 mhix_baseoff; /* Global to basic offset */
UMAUint4 mhix_optoff; /* Global to optional offset */
UMAUint4 mhix_extoff; /* Global to extension offset */
} UMAIntExt;
/**********************************************************************/
/* UMA event message header extension */
/**********************************************************************/
typedef struct UMAEvtExt {
unsigned char mhex_exlenlen; /* Extension tag and length */
unsigned char mhex_exlen[3]; /* Length of event extension */
UMAMsgFlags mhex_flags; /* Event extension flags */
UMATimeUsec mhex_evtime; /* Timestamp of event */
UMAUint4 mhex_baseoff; /* Global to basic offset */
UMAUint4 mhex_optoff; /* Global to optional offset */
UMAUint4 mhex_extoff; /* Global to extension offset */
} UMAEvtExt;
/**********************************************************************/
/* UMA message header data modes */
/**********************************************************************/
#define UMA_THRESH 0x0001 /* Threshold screening applied */
#define UMA_UNUSED1 0x0002 /* Available for future use */
#define UMA_PROV_SCLASS 0x0004 /* Subclass is provider-specific */
#define UMA_PROV_CLASS 0x0008 /* Class is provider-specific */
#define UMA_L_SUB 0x0010 /* Last message for this subclass */
#define UMA_UNUSED2 0x0020 /* Available for future use */
#define UMA_L_CLASS 0x0040 /* Last message for this class */
#define UMA_F_CLASS 0x0080 /* First message for this class */
#define UMA_DST 0x0100 /* Daylight Saving times in effect */
#define UMA_UNUSED4 0x0200 /* Available for future use */
#define UMA_EVTHDR 0x0400 /* Event header extension present */
#define UMA_INTVAL 0x0800 /* Interval header extension present */
#define UMA_UNUSED5 0x1000 /* Available for future use */
#define UMA_R_L 0x2000 /* R-L byte ordering */
#define UMA_B_FORM 0x4000 /* Canonical B format */
#define UMA_CNTRL 0x8000 /* Control message */
/**********************************************************************/
/* UMA interval/event message header extension flags */
/**********************************************************************/
#define UMA_UNUSED6 0x0001 /* Available for future use */
#define UMA_UNUSED7 0x0002 /* Available for future use */
#define UMA_UNUSED8 0x0004 /* Available for future use */
#define UMA_UNUSED9 0x0008 /* Available for future use */
#define UMA_UNUSED10 0x0010 /* Available for future use */
#define UMA_UNUSED11 0x0020 /* Available for future use */
#define UMA_UNUSED12 0x0040 /* Available for future use */
#define UMA_UNUSED13 0x0080 /* Available for future use */
#define UMA_ASEG 0x0100 /* All segments requested */
#define UMA_ESEG 0x0200 /* Extension segment present */
#define UMA_OSEG 0x0400 /* Optional segment present */
#define UMA_BSEG 0x0800 /* Basic segment present */
#define UMA_UNUSED14 0x1000 /* Available for future use */
#define UMA_SRC_RECENT 0x2000 /* Source for this msg: recent hist */
#define UMA_L_INT 0x4000 /* Last message for interval */
#define UMA_F_INT 0x8000 /* First message for interval */
#endif /* UMA_H */
Why not acquire a nicely bound hard copy?
Click here to return to the publication details or order a copy
of this publication.