'\" te .\" Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. .TH srpt_SetTargetState 3SRPT "2 Apr 2010" "SunOS 5.11" "SRP Target Management Library" .SH NAME srpt_SetTargetState, srpt_GetTargetState, srpt_ResetTarget \- set and retrieve SRP Target state for a specific HCA .SH SYNOPSIS .LP .nf cc [ \fIflag\fR... ] \fIfile\fR... -lsrpt [ \fIlibrary\fR... ] #include int srpt_SetTargetState(char *\fIhca_guid\fR, boolean_t \fIenabled\fR); .fi .LP .nf int srpt_GetTargetState(char *\fIhca_guid\fR, boolean_t *\fIenabled\fR); .fi .LP .nf int srpt_ResetTarget(char *\fIhca_guid\fR); .fi .SH PARAMETERS .sp .ne 2 .mk .na \fB\fIhc_guid\fR\fR .ad .RS 11n .rt HCA GUID. Must be in one of the following forms: .sp .ne 2 .mk .na \fB\fB3BA000100CD18\fR\fR .ad .RS 24n .rt base hex form .RE .sp .ne 2 .mk .na \fB\fB0003BA000100CD18\fR\fR .ad .RS 24n .rt base hex form with leading zeroes .RE .sp .ne 2 .mk .na \fB\fBhca:3BA000100CD18\fR\fR .ad .RS 24n .rt form from cfgadm .RE .sp .ne 2 .mk .na \fB\fBeui.0003BA000100CD18\fR\fR .ad .RS 24n .rt EUI form .RE .RE .sp .ne 2 .mk .na \fB\fIenabled\fR\fR .ad .RS 11n .rt boolean value indicating whether a COMSTAR SRP target should be created for this HCA .RE .SH DESCRIPTION .sp .LP The \fBsrpt_SetTargetState()\fR function controls whether a COMSTAR SRP target will be created for the specified HCA. If \fIenabled\fR is B_TRUE, an SRP target will be created for this HCA. If \fIenabled\fR is B_FALSE, a target will not be created. This function overrides the default setting for the SRP Target service as set by \fBsrpt_SetDefaultState\fR(3SRPT). Changing the target state takes effect immediately if the SRP target service is online. Targets set to disabled will be offlined and removed; targets set to enabled will be immediately created. .sp .LP The \fBsrpt_GetTargetState()\fR function retrieves the current setting for the specified HCA. .sp .LP The \fBsrpt_ResetTarget()\fR function clears HCA-specific settings. The service-wide defaults will control SRP Target creation for this HCA. .SH RETURN VALUES .sp .LP Upon successful completion, these functions return 0. Otherwise they return a non-zero value to indicate the error. .SH ERRORS .sp .LP These functions will fail if: .sp .ne 2 .mk .na \fB\fBENOMEM\fR\fR .ad .RS 10n .rt Resources could not be allocated. .RE .sp .ne 2 .mk .na \fB\fBEINVAL\fR\fR .ad .RS 10n .rt A parameter is invalid. .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-LevelMT-Safe .TE .SH SEE ALSO .sp .LP \fBlibsrpt\fR(3LIB), \fBsrpt_SetDefaultState\fR(3SRPT), \fBattributes\fR(5)