cc [ flag... ] file... -lsrpt [ library... ] #include <libsrpt.h> int srpt_SetTargetState(char *hca_guid, boolean_t enabled);
int srpt_GetTargetState(char *hca_guid, boolean_t *enabled);
int srpt_ResetTarget(char *hca_guid);
HCA GUID. Must be in one of the following forms:
base hex form
base hex form with leading zeroes
form from cfgadm
boolean value indicating whether a COMSTAR SRP target should be created for this HCA
The srpt_SetTargetState() function controls whether a COMSTAR SRP target will be created for the specified HCA. If enabled is B_TRUE, an SRP target will be created for this HCA. If enabled is B_FALSE, a target will not be created. This function overrides the default setting for the SRP Target service as set by srpt_SetDefaultState(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.
The srpt_GetTargetState() function retrieves the current setting for the specified HCA.
The srpt_ResetTarget() function clears HCA-specific settings. The service-wide defaults will control SRP Target creation for this HCA.
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: