|Skip Navigation Links|
|Exit Print View|
|man pages section 3: Extended Library Functions, Volume 4 Oracle Solaris 11 Express 11/10|
- set and retrieve the default state setting for the SRP Target service
cc [ flag... ] file... -lsrpt [ library... ] #include <libsrpt.h> int srpt_SetDefaultState(boolean_t enabled);
int srpt_GetDefaultState(boolean_t *enabled);
boolean value indicating whether COMSTAR SRP targets should be created
The srpt_SetDefaultState() function sets the default behavior of the SRP Target service. If enabled is B_TRUE, SRP targets will be created for all discovered HCAs that have not been specifically disabled. If enabled is B_FALSE, targets will not be created unless the HCA has been specifically enabled. See srpt_SetTargetState(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.
The srpt_GetDefaultState() function returns the current value for enabled.
Upon successful completion, these functions return 0. Otherwise they return a non-zero value to indicate the error.
These functions will fail if:
Resources could not be allocated.
A parameter is invalid.
See attributes(5) for descriptions of the following attributes: