Go to main content

man pages section 3: Extended Library Functions, Volume 4

Exit Print View

Updated: July 2017
 
 

srpt_SetDefaultState(3SRPT)

Name

srpt_SetDefaultState, srpt_GetDefaultState - set and retrieve the default state setting for the SRP Target service

Synopsis

cc [ flag... ] file... -lsrpt [ library... ]
#include <libsrpt.h>

int srpt_SetDefaultState(boolean_t enabled);
int srpt_GetDefaultState(boolean_t *enabled);

Parameters

enabled

boolean value indicating whether COMSTAR SRP targets should be created

Description

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.

Return Values

Upon successful completion, these functions return 0. Otherwise they return a non-zero value to indicate the error.

Errors

These functions will fail if:

ENOMEM

Resources could not be allocated.

EINVAL

A parameter is invalid.

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed
MT-Level
MT-Safe

See Also

libsrpt(3LIB), srpt_SetTargetState(3SRPT) , attributes(5)