/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of version 2.1 of the GNU Lesser General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307,
* USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/NoticeExplan
*/
/*
* srm.h
*
* SRM client interface. This file contains all data structures, macros
* and function prototypes that can be used by SRM clients.
* All SRM clients are expected to include this file.
*/
#ifndef SRM_H
#define SRM_H
#ident "$Id: srm.h,v 1.1 2000/08/31 19:16:32 vasa Exp $"
#include <ci_err.h> /* ci_err_t definition */
#include <ci_types.h> /* ci_nodeid_t definition */
#include <cdb.h> /* cdb_handle_t definition */
#include <ci_cdbkeys.h> /* CDB keys macro definitions */
#define SRM_DAEMON "ha_srmd"
#define SRM_MSGSTRING_SIZE 512 /* used in state to
* string conversion
* routines */
#define SRM_CLNT_BUFSIZE (32 * 1024) /* Size of the IPC buffer
* between SRM and clients */
#define SRM_HDL_INVAL ((uint32_t) (-1))
#define SRM_GET_ALL "__srm_get_all"
#define RES_BINDING_TYPE "__binding"
/* Handle used for communication with srmd. Multiple requests can be
* done with one channel handle. Channel handle can be obtained using
* srm_register() */
typedef uint32_t srm_chanhdl_t;
/* Request handle returned by non-blocking srm interfaces. This handle
* can be used to check for request completion. */
typedef uint32_t srm_reqhdl_t;
/* Flags used in srm requests. See below for values */
typedef uint32_t srm_flags_t;
/* Flags used in srm register request. See below for values */
typedef uint32_t srm_registerflags_t;
/* SRM resource errors. See below for values */
typedef uint32_t sr_res_err_t;
/* SRM CDB key maps */
#define SRM_CFG_LOCAL_PARAMETERS (CDB_DD CDB_LOCAL CDB_DD CDB_HA CDB_DD CDB_SERVICES CDB_DD CDB_SRM CDB_DD CDB_PARAMETERS)
#define SRM_CFG_LOCAL_RESTYPES (CDB_DD CDB_LOCAL CDB_DD CDB_HA CDB_DD CDB_RESTYPES)
/* Resource representation */
typedef struct srm_res_s {
char *name; /* Name of the resource */
char *type; /* Type of resource */
} srm_res_t;
/* Resource states returned by srm_resinfo() function. Please keep these
* enum values consistent with routines/data structures in
* "CI/lib/libci/src/srm/srm_strings.c"
*
* char *srm_resstate_to_string(sr_res_states_t state) */
typedef enum {
SRS_ALLOCATE_REQUEST = 1,
SRS_ALLOCATING_PROPOSAL = 2,
SRS_ALLOCATING = 3,
SRS_ALLOCATED_PROPOSAL = 4,
SRS_ALLOCATED = 5,
SRS_RELEASE_REQUEST = 6,
SRS_RELEASING_PROPOSAL = 7,
SRS_RELEASING = 8,
SRS_RELEASED_PROPOSAL = 9,
SRS_RELEASED = 10,
SRS_NEW = 11,
SRS_MAINTENANCE = 12, /* Not really an internal SRM state -
* not maintained globally in all SRMs
*/
SRS_NUMSTATES = 12,
/* The following states are used internally */
SRS_IPRIVATE = 1000,
SRS_IPENDING = 1001,
SRS_IUNKNOWN = 1002,
SRS_IACTION = 1003,
SRS_IBAD = 1004,
SRS_IEXCLUSIVE = 1005,
SRS_IPRIVATE_MAX = 1006
} sr_res_states_t;
/* Bind states returned by srm_bindinfo() function. Please keep these
* enum values consistent with routines/data structures in
* CI/lib/libci/src/srm/srm_strings.c
*
* char *srm_bindstate_to_string(sr_bind_states_t state); */
typedef enum {
SRBS_BIND_REQUEST = 1,
SRBS_BINDING = 2,
SRBS_BOUND = 3,
SRBS_MODIFY_REQUEST = 4,
SRBS_MODIFY_PROPOSAL = 5,
SRBS_MODIFYING = 6,
SRBS_UNBIND_REQUEST = 7,
SRBS_UNBINDING = 8,
SRBS_UNBOUND = 9,
SRBS_NEW = 10,
/* The following states are used internally */
SRBS_IPRIVATE = 1000,
SRBS_IPENDING = 1001,
SRBS_IUNKNOWN = 1002,
SRBS_IBAD = 1003,
SRBS_IPRIVATE_MAX = 1004
} sr_bind_states_t;
/* Values returned by srm_probe function. Values > 1000 are used
* internally and are not returned to the srm library user. Please keep
* these enum values consistent with routines/data structures in
* CI/lib/libci/src/srm/srm_strings.c
*
* char *srm_probestatus_to_string(srm_probestatus_t status); */
typedef enum {
SRPROBE_ALLOCATABLE = 1, /* Resource is allocatable at this
* node. */
SRPROBE_NOTALLOCATABLE = 2, /* Resource is not allocatable at
* this node. */
SRPROBE_ALLOCATED = 3, /* Resource is alrady allocated at
* this node. */
SRPROBE_ALLOCATEDBYUS = 4, /* Resource is already allocated at
* this node by a client with the
* same groupid as the requesting
* client. */
SRPROBE_NOTCACHED = 5, /* Probe request is not cached
* locally */
SRPROBE_NOSUCHNODE = 6, /* Probe was requested on a
* nonexistent node */
SRPROBE_NOTATTEMPTED = 7, /* This probe request was not attempted
* because the resource list provided
* was not good */
SRPROBE_RUNNING = 8, /* Resource is running in the
* node - returned only when
* SF_EXCLUSIVE flag is set */
SRPROBE_NOTRUNNING = 9, /* Resource is not running in the
* node - returned only when
* SF_EXCLUSIVE flag is set */
SRPROBE_PARTIALRUNNING = 10, /* This value set only for resources
* of type RES_BINDING_TYPE. Some
* resources of the resource group
* are running. This value is returned
* only when SF_EXCLUSIVE flag is
* set */
/* Following status are used internally */
SRPROBE_REQUESTED = 1001 /* Probe request is not yet done */
} srm_probestatus_t;
/* Status of a action/request perfomed on a resource. Values > 1000 are
* used internally and are not returned as status to the srm library user.
* Please keep these enum values consistent with routines/data structures in
* CI/lib/libci/src/srm/srm_strings.c
*
* char *srm_resstatus_to_string(srm_res_req_status_t status); */
typedef enum {
SRREQS_SUCCESS = 0, /* The request terminated successfully */
SRREQS_TIMEOUT = 1, /* The request timedout */
SRREQS_INERROR = 2, /* The resource was found to be in error or the
* resource is a binding and one of resources
* in the binding is in error */
SRREQS_MONFAIL = 3, /* The resource was found in monitoring
* failure state */
SRREQS_NOPERM = 4, /* Client does not have permission to
* perform this operation */
SRREQS_NOTATTEMPTED = 5, /* This operation was not attempted because
* of some failure - there are overlapping
* resources in the client request */
SRREQS_NOALLOC = 6, /* This resource was not found allocated
* by the group id */
SRREQS_NOTOWNER = 7, /* Resource is owned by some other SRM or the
* resource is a binding and a resource that is * part of the binding is allocated in another
* node */
SRREQS_RELEASING = 8, /* Resource to be allocated is still being
released */
SRREQS_ALREADYALLOC = 9, /* Resource is already allocated by same
* group id */
SRREQS_ALREADYREL = 10, /* Resource is already being released */
SRREQS_CFGERROR = 11, /* Resource configuration information not
* present */
SRREQS_ALLOCATING = 12, /* Allocate request for a resource which is
* already in the process of allocation
* (request by a client with same group id) */
SRREQS_RETRY = 13, /* Request could not be satisfied because
* resource was in an incompatible transient
* state. Retry later */
SRREQS_NOENTRY = 14, /* Resource table has no entry for this
* resource (probe and release) */
SRREQS_ALLOCATED = 15, /* Used in probe reply message to indicate
* that the resource has been allocated in
* the node */
SRREQS_ALREADYBOUND = 16, /* Bindname is already bound or in the process
* of getting bound to a different set
* of resources - bind request failed */
SRREQS_BINDINUSE = 17, /* Unbind request for a binding that is
* currently in use */
SRREQS_BINDNONEXIST = 18, /* Unbind request for a binding that does
* not exist */
SRREQS_ALREADYUNBINDING = 19, /* Binding is in process of unbinding */
SRREQS_ALLOCATEDBYUS = 20, /* Resource is already allocated at
* this node by a client with the
* same groupid as the requesting
* client. */
SRREQS_BINDINGINVAL = 21, /* Resource binding is invalid. The binding
* status is changing. This error is
* returned by allocate operation */
SRREQS_NOINFO = 22, /* Error returned by action thread when the
* output file did not have any information
* about the resource. open, exec errors are
* also merged into this error code. REVISIT */
SRREQS_INVAL = 23, /* An invalid request (invalid independent
* of the current state of the resources it
* is supposed to act on), e.g., a modify bind
* request without the SF_ADDBIND or SF_DELBIND
* flag. or all the resoures in the binding
* are being removed from the binding */
SRREQS_FAILED = 24, /* All other failures including srmd memory
* problems */
SRREQS_REPLYTOOBIG = 25, /* The client reply is too big to fit into
* the IPC communication buffer */
SRREQS_NOACTIVEMON = 26, /* Resource is not being monitored actively */
/* Following status are used internally */
SRREQS_ENQUEUED = 1001, /* This request has been enqueued by the
* client thread and must be acted on by
* the main thread. If client thread
* sets the status to any other value,
* main thread does not act on the resource.
* The main thread also sets the status to
* this value, if the action thread has to
* act on the resource. */
SRREQS_INPROGRESS = 1002, /* The main thread has initiated action */
SRREQS_REQUESTED = 1003, /* Used only by srm lib */
SRREQS_PARTIAL = 1004, /* Denotes partial success of the request.
* Used in exclusive probe request */
SRREQS_NOACTION = 1005 /* No action was performed in response to
* the request. The request can been treated
* as a success. */
} srm_res_req_status_t;
/* Error values returned by srm_resinfo_t - sr_res_err_t values
* void srm_reserror_to_string(sr_res_err_t error, char *string); */
#define SRERR_NONE 0x0000 /* No resource error */
#define SRERR_NODE_UNKNOWN 0x0001 /* Resource is allocated in a machine
* that is in UNKNOWN state */
#define SRERR_SRM_PULSEFAIL 0x0002 /* Resource is allocated in a machine
* and SRM daemon failed in that
* machine */
#define SRERR_MONITOR_FAILURE 0x0004 /* Local monitoring of the resource
* failed */
#define SRERR_ACTIONERROR 0x0008 /* One of the actions failed for the
resource */
/* Resource flags - res_flags field in srm_resinfo_t and values for
* SIT_RESFLAGS notification type
* void srm_resflags_to_string(uint32_t flags, char *string); */
#define SRFL_NOMONITOR 0x0001 /* Resource is not monitored locally */
#define SRFL_MONITOR 0x0002 /* Resource is being monitored locally */
#define SRFL_FORCEREL 0x0004 /* Resource has been released using force
* option */
#define SRFL_RESTART 0x0008 /* Resource has been failed over locally */
/* srm_flags_t values */
#define SF_ADMIN 0x00001 /* This is an admin request. */
#define SF_FORCED 0x00002 /* Forced release/alloc request. */
#define SF_PRINTRT 0x00004 /* Dump : print resource table */
#define SF_PRINTRQ 0x00008 /* req : print pending and done clntreqq */
#define SF_PRINTCL 0x00010 /* only.: print clients list */
#define SF_PRINTBT 0x00020 /* : print bind table */
#define SF_CACHEOK 0x00040 /* Probe: Get cached info and probe for
* what is not available */
#define SF_NOCACHE 0x00080 /* req : Fresh probe for everything */
#define SF_CACHEONLY 0x00100 /* only.: Do not probe, return only what is
* cached */
#define SF_ATTACH 0x00200 /* Do not perform actual allocation, just
* attach to the already allocated resource */
#define SF_DETACH 0x00400 /* Do not perform actual release, just detach
* from the allocated resource. */
#define SF_STARTMON 0x00800 /* Start local monitoring of a resource. */
#define SF_STOPMON 0x01000 /* Stop local monitoring of a resource. */
#define SF_ADDBIND 0x02000 /* Add resource to a binding. */
#define SF_DELBIND 0x04000 /* Delete resource from a binding. */
#define SF_NOMONITOR 0x08000 /* Do not start default monitoring when
* a resource is allocated. */
#define SF_PRINTCFG 0x10000 /* Dump req : print srm configuration info */
#define SF_EXCLUSIVE 0x20000 /* Probe request: do exclusive check of
* resources */
/* srm_registerflags_t values */
#define SRF_MUSTPULSE 0x0001 /* Clients will do pulses to SRMD */
#define SRF_SUPERUSER 0x0002 /* SRM clients with superuser
* privileges */
#define SRF_RESSTATE 0x0004 /* Client has to be notified of
* resource state changes */
#define SRF_RESERROR 0x0008 /* Client has to be notified of
* resource error changes */
#define SRF_RESFLAGS 0x0010 /* Client has to be notified of
* resource flags changes */
#define SRF_RESGRPSTATE 0x0020 /* Client has to be notified of
* resource group state changes */
#define SRF_RESSTATE_GRP 0x0040 /* Client has to be notified of
* state changes of resource groups
* only. Only changes to SRS_RELEASED
* and SRS_ALLOCATED are notified */
#define SRF_RESERROR_GRP 0x0080 /* Client has to be notified of
* error changes to resource groups
* only.
*/
/*
* srm_bindinfo_t - Binding information returned to clients
* See srm_bindinfo() function
*/
typedef struct srm_bindinfo_s {
srm_res_t bi_binding; /* binding name and type */
srm_res_req_status_t bi_status; /* bindinfo status for the
* binding */
sr_bind_states_t bi_state; /* State of binding */
uint32_t bi_numres; /* Number of resources */
srm_res_t *bi_reslist; /* List of resources */
} srm_bindinfo_t;
/*
* srm_resinfo_t - Resource information returned to clients
* See srm_resinfo() function.
*/
typedef struct srm_resinfo_s {
srm_res_t ri_resource; /* resource name and type */
srm_res_req_status_t ri_status; /* resinfo status for the
* resource */
ci_nodeid_t ri_resowner; /* resource owner */
sr_res_states_t ri_resstate; /* resource state */
sr_res_err_t ri_reserror; /* resource error status */
uint32_t ri_resflags; /* resource flags */
} srm_resinfo_t;
/*
* srm_resstats_t - Resource statistics returned to clients.
* See srm_resstats() function.
*/
typedef struct srm_resstats_s {
srm_res_t rs_resource; /* resource name and type */
srm_res_req_status_t rs_status; /* resource operation status */
uint32_t rs_generation_no;
/* This number keeps track of
* statistics generation. It is
* incremented when monitoring
* is started.
*/
uint32_t rs_num_monfailures;
/* Number of monitoring
* failures before declaring
* monitoring failure */
uint32_t rs_cumm_num_monfailures;
/* Cummulative number of
* monitoring failures */
uint32_t rs_cumm_num_monitors;
/* Cummulative number of
* monitors */
uint32_t rs_max_monitortime;
/* Maximum time taken to
* complete a monitor for
* the resource. Approximate
* value */
uint32_t rs_min_monitortime;
/* Minimum time taken to
* complete a monitor for
* the resource. Approximate
* value */
uint32_t rs_recent_monitortime;
/* Most recent monitoring time
* taken for the resource.
* Approximate value. */
uint32_t rs_threshold_monitortime;
/* Monitoring timeout for the
* resource */
uint32_t rs_histo_monitortime[5];
/* 20% percentile binning of
* the number of monitor
* responses in the range
* 1 .. rs_threshold_monitortime */
} srm_resstats_t;
/* Values for srm_infotype_t used in srm_pollinfo_t structure.
* Please keep these enum values consistent with routines/data structures in
* CI/lib/libci/src/srm/srm_strings.c
*
* char *srm_infotype_to_string(srm_infotype_t type); */
typedef enum {
SIT_RESSTATE = 1, /* Resource state information */
SIT_RESERROR = 2, /* Resource error information */
SIT_RESFLAGS = 3, /* Resource flags information */
SIT_RESGRPSTATE = 4 /* Resource group state information */
} srm_infotype_t;
/*
* srm_pollinfo_t - Information returned by srm_poll routine for each
* resource.
*/
typedef struct srm_pollinfo_s {
srm_res_t sp_resource; /* Resoure identifier - resource
* name & type */
srm_infotype_t sp_infotype; /* Type of information */
uint32_t sp_infovalue; /* Information value - It can be
* sr_res_states_t, sr_res_err_t,
* sr_bind_states_t or
* resource flags */
ci_nodeid_t sp_resowner; /* Resource owner - used when
* information type is SIT_RESSTATE
* and value is SRS_ALLOCATED */
uint32_t sp_groupid; /* Application that owns the resource*/
} srm_pollinfo_t;
/* SRM parameters related data structures and macros */
typedef struct srm_tuneable_s {
uint32_t valid; /* Valid parameters */
boolean_t sync_flag; /* B_TRUE means threads will
* poll for work */
uint32_t srm_group_id; /* SRM GCS group id */
uint32_t mainthr_tm; /* main thread time period in
* milliseconds */
uint32_t actionthr_tm; /* action thread time period in
* milliseconds */
uint32_t clientthr_tm; /* client thread time period in
* milliseconds */
uint32_t srm_msgbufsize; /* Size of SRM/GCS message
* buffer in bytes */
uint32_t srm_maxresentries; /* Maximum number of resource
* table entries. Resource table
* entries are freed only if the
* number of entries exceed this
* value. */
} srm_tuneable_t;
/* Values for srm_tuneable_t valid field */
#define SRM_TUNE_SF 0x00000001 /* Sync flag */
#define SRM_TUNE_SGI 0x00000002 /* SRM group id */
#define SRM_TUNE_MTT 0x00000004 /* Main thread time period */
#define SRM_TUNE_ATT 0x00000008 /* Action thread time period */
#define SRM_TUNE_CTT 0x00000010 /* Client thread time period */
#define SRM_TUNE_SMBS 0x00000020 /* SRM message buffer size */
#define SRM_TUNE_SMRE 0x00000040 /* SRM max. resource entries */
/*
* Minimum and maximum values for SRM parameters
*/
#define SRM_MAX_TES_COMINGUP_REPLYMSG 128
#define SRM_MIN_MAXRESENTRIES 10
#define SRM_MIN_TIMEPERIOD 1000
#define SRM_MIN_MSGBUFSIZE SRM_MAX_TES_COMINGUP_REPLYMSG * 256
/* Library api's available to srm clients */
ci_err_t srm_setnodename(char *nodename);
srm_reqhdl_t srm_register(srm_chanhdl_t *chanp, uint32_t grpid, int signo,
srm_registerflags_t flags, ci_err_t *errp);
srm_reqhdl_t srm_register_ext(srm_chanhdl_t *chanp, uint32_t grpid,
int signo, srm_registerflags_t flags,
uint32_t bufsize, ci_err_t *errp);
srm_reqhdl_t srm_unregister(srm_chanhdl_t hdl, srm_flags_t flags);
srm_reqhdl_t srm_allocate(srm_chanhdl_t hdl, srm_res_t *res, uint32_t nres,
uint32_t priority, uint32_t grp_id,
srm_flags_t flags, srm_res_req_status_t *result);
srm_reqhdl_t srm_release(srm_chanhdl_t hdl, srm_res_t *res, uint32_t nres,
uint32_t priority, uint32_t grp_id,
srm_flags_t flags,
srm_res_req_status_t *result);
srm_reqhdl_t srm_probe(srm_chanhdl_t hdl, srm_res_t *res, uint32_t nres,
ci_nodeid_t *nodes, uint32_t nnodes,
uint32_t grp_id, srm_flags_t flags,
srm_probestatus_t **result);
srm_reqhdl_t srm_localprobe(srm_chanhdl_t hdl, srm_res_t *res,
uint32_t nres, uint32_t grp_id,
srm_flags_t flags,
srm_probestatus_t *result);
srm_reqhdl_t srm_bind(srm_chanhdl_t hdl, char *bindname, srm_res_t *res,
uint32_t nres, srm_flags_t flags,
srm_res_req_status_t *result);
srm_reqhdl_t srm_unbind(srm_chanhdl_t hdl, char *bindname,
srm_flags_t flags, srm_res_req_status_t *result);
srm_reqhdl_t srm_modifybind(srm_chanhdl_t hdl, char *bindname,
srm_res_t *res, uint32_t nres,
uint32_t grp_id, srm_flags_t flags,
srm_res_req_status_t *result);
srm_reqhdl_t srm_bindinfo(srm_chanhdl_t hdl, srm_res_t *bindres,
uint32_t nbindings, srm_flags_t flags,
srm_bindinfo_t **resultp);
srm_reqhdl_t srm_resinfo(srm_chanhdl_t hdl, srm_res_t *res,
uint32_t nres, srm_flags_t flags,
srm_resinfo_t **resultp);
srm_reqhdl_t srm_resstats(srm_chanhdl_t hdl, srm_res_t *res,
uint32_t nres, srm_flags_t flags,
srm_resstats_t **resultp);
srm_reqhdl_t srm_discover(srm_chanhdl_t hdl, char *type, srm_flags_t flags,
srm_res_t **resultp);
srm_reqhdl_t srm_modifymon(srm_chanhdl_t hdl, srm_res_t *res,
uint32_t nres, uint32_t grp_id,
srm_flags_t flags,
srm_res_req_status_t *result);
srm_reqhdl_t srm_dump(srm_chanhdl_t hdl, int dumplevel,
srm_flags_t flags);
ci_err_t srm_done(srm_chanhdl_t chan_hdl, srm_reqhdl_t req_hdl);
ci_err_t srm_poll(srm_chanhdl_t chan_hdl, srm_pollinfo_t **result,
uint32_t *count);
void srm_poll_result_free(srm_pollinfo_t *result);
ci_err_t srm_bregister(srm_chanhdl_t *hdlp, uint32_t grpid,
int signo, srm_registerflags_t flags);
ci_err_t srm_bregister_ext(srm_chanhdl_t *hdlp, uint32_t grpid,
int signo, uint32_t bufsize,
srm_registerflags_t flags);
ci_err_t srm_bunregister(srm_chanhdl_t hdl, srm_flags_t flags);
ci_err_t srm_ballocate(srm_chanhdl_t hdl, srm_res_t *res,
uint32_t nres, uint32_t priority,
uint32_t grp_id, srm_flags_t flags,
srm_res_req_status_t *result);
ci_err_t srm_brelease(srm_chanhdl_t hdl, srm_res_t *res,
uint32_t nres, uint32_t priority,
uint32_t grp_id, srm_flags_t flags,
srm_res_req_status_t *result);
ci_err_t srm_bprobe(srm_chanhdl_t hdl, srm_res_t *res,
uint32_t nres, ci_nodeid_t *nodes,
uint32_t nnodes, uint32_t grp_id,
srm_flags_t flags,
srm_probestatus_t **result);
ci_err_t srm_blocalprobe(srm_chanhdl_t hdl, srm_res_t *res,
uint32_t nres, uint32_t grp_id,
srm_flags_t flags,
srm_probestatus_t *result);
ci_err_t srm_bbind(srm_chanhdl_t hdl, char *bindname,
srm_res_t *res, uint32_t nres,
srm_flags_t flags, srm_res_req_status_t *result);
ci_err_t srm_bunbind(srm_chanhdl_t hdl, char *bindname,
srm_flags_t flags, srm_res_req_status_t *result);
ci_err_t srm_bmodifybind(srm_chanhdl_t hdl, char *bindname,
srm_res_t *res, uint32_t nres,
uint32_t grp_id, srm_flags_t flags,
srm_res_req_status_t *result);
ci_err_t srm_bbindinfo(srm_chanhdl_t hdl, srm_res_t *bindres,
uint32_t nbindings, srm_flags_t flags,
srm_bindinfo_t **resultp);
ci_err_t srm_bresinfo(srm_chanhdl_t hdl, srm_res_t *res,
uint32_t nres, srm_flags_t flags,
srm_resinfo_t **resultp);
ci_err_t srm_bresstats(srm_chanhdl_t hdl, srm_res_t *res,
uint32_t nres, srm_flags_t flags,
srm_resstats_t **resultp);
ci_err_t srm_bdiscover(srm_chanhdl_t hdl, char *type,
srm_flags_t flags, srm_res_t **resultp);
void srm_bindinfo_result_free(srm_bindinfo_t *result);
void srm_resinfo_result_free(srm_resinfo_t *result);
void srm_resstats_result_free(srm_resstats_t *result);
void srm_discover_result_free(srm_res_t *result);
ci_err_t srm_bmonitor(srm_chanhdl_t hdl, srm_res_t *res,
uint32_t nres, uint32_t grp_id,
srm_flags_t flags,
srm_res_req_status_t *result);
ci_err_t srm_bdump(srm_chanhdl_t hdl, int dumplevel,
srm_flags_t flags);
ci_err_t srm_error(srm_chanhdl_t hdl);
char *srm_probestatus_to_string(srm_probestatus_t status);
char *srm_resstatus_to_string(srm_res_req_status_t status);
char *srm_resstate_to_string(sr_res_states_t state);
char *srm_bindstate_to_string(sr_bind_states_t state);
char *srm_infotype_to_string(srm_infotype_t);
void srm_reserror_to_string(sr_res_err_t, char *);
void srm_resflags_to_string(uint32_t, char *);
ci_err_t srm_tuneables_get(cdb_handle_t, char *, srm_tuneable_t *,
char *);
ci_err_t srm_tuneables_set(cdb_handle_t, char *, srm_tuneable_t *,
char *);
ci_err_t srm_tuneables_check(srm_tuneable_t *, char *);
#endif /* SRM_H */