stmfGetViewProp - get a view entry property of a logical unit
cc [ flag... ] file... –lstmf [ library... ] #include <libstmf.h> int stmfGetViewProp(viewResource resource, stmfViewPropType propType, char *propVal, size_t *propLen);
A view resource previously allocated using stmfGetViewResourceList(3STMF) call.
Property type value. The following values are supported:
ASCII hexadecimal string of 32 characters representing the unique identifier for the logical unit to which the specified view resource is attached.
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”.
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”.
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”.
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“.
View entry index. The numeric value of the view entry, assigned by the system per logical unit.
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.
Fixed logical unit number. This property is valid only if a fixed logical unit number was opted while adding the view entry.
Pointer to property value. The memory for propVal needs to be allocated by the calling function.
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.
The stmfGetViewProp() function obtains the property values of the specified view resource.
The following values are returned:
One or more provided parameters are invalid.
No value for the specified property
The API call was successful.
See attributes(5) for descriptions of the following attributes: