'\" te .\" Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. .TH stmfAddViewEntryList 3STMF "23 Apr 2012" "SunOS 5.11" "SCSI Target Mode Framework Library Functions" .SH NAME stmfAddViewEntryList \- add a list of view entries for a given logical unit .SH SYNOPSIS .LP .nf cc [ \fIflag\fR... ] \fIfile\fR... \fB-lstmf\fR [ \fIlibrary\fR... ] #include \fBint\fR \fBstmfAddViewEntryList\fR(\fBstmfGuid *\fR\fIlogicalUnit\fR, \fBstmfViewEntryList *\fR\fIviewEntryList\fR, \fBvoid **\fR\fIopData\fR); .fi .SH PARAMETERS .sp .ne 2 .mk .na \fB\fIlogicalUnit\fR\fR .ad .RS 17n .rt The identifier of the logical unit to which all view entries in the list are being added. .RE .sp .ne 2 .mk .na \fB\fIviewEntryList\fR\fR .ad .RS 17n .rt The list of view entries to be added to the specified logical unit identifier. .RE .sp .ne 2 .mk .na \fB\fIopData\fR\fR .ad .RS 17n .rt A pointer to a pointer to \fBvoid\fR. On successful return, \fIopData\fR will contains the information about the list of view entries added. On failure, \fIopData\fR may contain appropriate information depending on the error value returned. For some types of failure it is set to \fINULL\fR. .RE .SH DESCRIPTION .sp .LP The \fBstmfAddViewEntryList()\fR function adds all view entries mentioned in the list for the specified logical unit. Details of the view entries to be added are passed to the function using the \fBstmfViewEntry\fR structure. .sp .LP If the caller set the field \fIluNbrValid\fR to \fBB_FALSE\fR, the system will automatically choose a logical unit number (LUN) per initiator associated with host group mentioned in the view entry. Otherwise, the caller can specify a fixed LUN using the field \fIluNbr\fR along with the field \fIluNbrValid\fR set to \fBB_TRUE\fR. In this case, the system will map the specified LUN to the given logical unit for all initiators associated with the host group mentioned in the view entry, if the given LUN does not conflict with any other fixed LUN already existing in the system for any one of the above mentioned initiators. If the specified fixed LUN is in conflict with another system-chosen automatic LUN, the system-chosen automatic LUN will be remapped to another number to avoid the conflict. .sp .LP If any one of the given view entries in the list fails the system validity checks or causes conflicts, none of the specified view entries will be added to the system. The \fIopData\fR parameter will be populated with the details which caused the failure. The information in \fIopData\fR needs to be interpreted depending on the return value of the function. If the function call succeeds, \fIopData\fR will be populated with information regarding newly added view entries. Some of the failure types may set this parameter to \fINULL\fR. If the library returns data through parameter \fIopData\fR, the caller should call \fBstmfFreeMemory\fR(3STMF) when that data are no longer needed. .SH RETURN VALUES .sp .LP The following values are returned: .sp .ne 2 .mk .na \fB\fBSTMF_STATUS_SUCCESS\fR\fR .ad .sp .6 .RS 4n The API call was successful. This failure also sets \fIopData\fR to a pointer to a pointer to a \fBstmfViewList\fR structure with the information about view entries added to the specified logical unit. .RE .sp .ne 2 .mk .na \fB\fBSTMF_ERROR_INVALID_TG\fR\fR .ad .sp .6 .RS 4n One or more target group names mentioned in the view entry structure are invalid. This failure sets \fIopData\fR to a pointer to a pointer to a \fBstmfViewList\fR structure with view entries that caused the error .RE .sp .ne 2 .mk .na \fB\fBSTMF_ERROR_INVALID_HG\fR\fR .ad .sp .6 .RS 4n One or more host group name mentioned in the view entry structure are invalid. This failure sets \fIopData\fR to a pointer to a pointer to a \fBstmfViewList\fR structure with view entries that caused the error. .RE .sp .ne 2 .mk .na \fB\fBSTMF_ERROR_INVALID_ARG\fR\fR .ad .sp .6 .RS 4n One or more view entries has an invalid value. Examples for invalid view entry values are providing a bad \fIluNbr\fR field with the \fIluNbrValid\fR field set to \fBTRUE\fR or providing a bad or used \fIveIndex\fR value with the \fIveIndexValid\fR field set to \fBTRUE\fR. This failure sets \fIopData\fR to a pointer to a pointer to a \fBstmfViewList\fR structure with view entries that caused the error. .RE .sp .ne 2 .mk .na \fB\fBSTMF_ERROR_EXISTS\fR\fR .ad .sp .6 .RS 4n One ore more view entries mentioned in the \fIviewEntryList\fR already exist in the system This failure sets \fIopData\fR to a pointer to a pointer to a \fBstmfViewList\fR structure with view entries that caused the error. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelSafe .TE .SH SEE ALSO .sp .LP \fBlibstmf\fR(3LIB), \fBstmfFreeMemory\fR(3STMF), \fBattributes\fR(5)