man pages section 3: Extended Library Functions, Volume 4

Exit Print View

Updated: July 2014
 
 

stmfGetViewProp(3STMF)

Name

stmfGetViewProp - get a view entry property of a logical unit

Synopsis

cc [ flag... ] file... –lstmf [ library... ]
#include <libstmf.h>

int stmfGetViewProp(viewResource resource, stmfViewPropType propType,
      char *propVal, size_t *propLen);

Parameters

resource

A view resource previously allocated using stmfGetViewResourceList(3STMF) call.

propType

Property type value. The following values are supported:

STMF_VE_PROP_GUID

ASCII hexadecimal string of 32 characters representing the unique identifier for the logical unit to which the specified view resource is attached.

STMF_VE_PROP_HG_ALL

Set to “true” if host group was not specified while adding the view so that the associated logical unit is available to all initiators; otherwise it is set to “false”.

STMF_VE_PROP_HG

Host Group name attached to the specified view resource. This property is set to NULL if STMF_VE_PROP_HG_ALL is set to “true”.

STMF_VE_PROP_TG_ALL

Set to “true” if target group was not specified while adding the view so that the associated logical unit is available to all targets; otherwise it is set to “false”.

STMF_VE_PROP_TG

Target Group name attached to the specified view resource. This property is set to NULL if STMF_VE_PROP_TG_ALL is set to “true“.

STMF_VE_PROP_IDX

View entry index. The numeric value of the view entry, assigned by the system per logical unit.

STMF_VE_PROP_LUN_TYPE

Logical unit number type opted while adding the view entry, which is a directive for the system to map the associated logical unit for all initiators belonging to the host group of this view entry. The logical unit number type is either “fixed” or “auto” representing either a fixed LUN number or system-assigned automatic logical unit number.

STMF_VE_PROP_LUN

Fixed logical unit number. This property is valid only if a fixed logical unit number was opted while adding the view entry.

propVal

Pointer to property value. The memory for propVal needs to be allocated by the calling function.

propLen

The length of the property value. With the stmfGetViewProp() call, this parameter needs to be set with the length of the buffer allocated for propVal. propLen will be set to actual length of proVal on function return. In the case of insufficient size to hold the requested property value, propLen will contain the actual size of the propVal and stmfGetViewProp() will return STMF_ERROR_INVALID_ARG.

Description

The stmfGetViewProp() function obtains the property values of the specified view resource.

Return Values

The following values are returned:

STMF_ERROR_INVALID_ARG

One or more provided parameters are invalid.

STMF_ERROR_NO_PROP_VAL

No value for the specified property

STMF_STATUS_SUCCESS

The API call was successful.

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed
MT-Level
Safe

See also

libstmf(3LIB), stmfGetViewResourceList(3STMF), attributes(5)