/*
* 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
*/
/*
* cms_params.h
*
* This file defines all cms parameters related data structures
* and provides declarations of routines to extract and manipulate
* these routines.
*/
#ifndef CMS_PARAM_H
#define CMS_PARAM_H
#ident "$Id: cms_params.h,v 1.1 2000/08/31 19:16:32 vasa Exp $"
#define CMS_HELPSTR_NODE_TIMEOUT "The HA subsystem at a node"\
" considers another node"\
" in the HA cluster dead if"\
" it does not get"\
" a heartbeat message from"\
" the HA subsystem at that"\
" node this often. The"\
" timeout is specified in"\
" milliseconds.";
#define CMS_HELPSTR_SEND_PERIOD "The HA subsystem at a node"\
" sends heartbeat messages to"\
" other nodes in the HA cluster"\
" this often. The"\
" timeout is specified in"\
" milliseconds.";
#define CMS_HELPSTR_TIE_BREAKER "The tie-breaker node, must"\
" be part of cluster."
typedef struct cms_params_s {
cms_timeout_type_val_t tva[CMS_NUMTOIS];
int tvcount;
char tiebreaker[MAXHOSTNAMELEN];
} cms_params_t;
const char *cms_cdbkey_to_clikey(char *);
const char *cms_clikey_to_cdbkey(char *);
const ci_param_name_t *cms_params_names_get(int *);
int cms_params_count_get(void);
cms_params_t *cms_params_create(void);
void cms_params_clear(cms_params_t *);
void cms_params_destroy(cms_params_t *);
ci_param_t *cms_param_extract(cms_params_t *, char *);
void cms_param_free(ci_param_t *);
ci_err_t cms_param_compile(cms_params_t *, char *,
ci_param_t *);
boolean_t cms_params_verify(cdb_handle_t, char *,
cms_params_t *, char *);
ci_err_t cms_params_set(cdb_handle_t, char *, boolean_t,
cms_params_t *, char *);
ci_err_t cms_params_get(cdb_handle_t, char *, boolean_t,
cms_params_t *, char *);
#endif