'\" te .\" Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. .TH srpt_SetDefaultState 3SRPT "2 Apr 2010" "SunOS 5.11" "SRP Target Management Library" .SH NAME srpt_SetDefaultState, srpt_GetDefaultState \- set and retrieve the default state setting for the SRP Target service .SH SYNOPSIS .LP .nf cc [ \fIflag\fR... ] \fIfile\fR... -lsrpt [ \fIlibrary\fR... ] #include int srpt_SetDefaultState(boolean_t \fIenabled\fR); .fi .LP .nf int srpt_GetDefaultState(boolean_t *\fIenabled\fR); .fi .SH PARAMETERS .sp .ne 2 .mk .na \fB\fIenabled\fR\fR .ad .RS 11n .rt boolean value indicating whether COMSTAR SRP targets should be created .RE .SH DESCRIPTION .sp .LP The \fBsrpt_SetDefaultState()\fR function sets the default behavior of the SRP Target service. If \fIenabled\fR is \fBB_TRUE\fR, SRP targets will be created for all discovered HCAs that have not been specifically disabled. If \fIenabled\fR is \fBB_FALSE\fR, targets will not be created unless the HCA has been specifically enabled. See \fBsrpt_SetTargetState\fR(3SRPT) for enabling or disabling specific HCAs. If the default state is changed when the SRP service is online, the state of existing targets is not changed until the service is restarted. .sp .LP The \fBsrpt_GetDefaultState()\fR function returns the current value for \fIenabled\fR. .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_SetTargetState\fR(3SRPT), \fBattributes\fR(5)