[BACK]Return to ci_types.h CVS log [TXT][DIR] Up to [Development] / failsafe / FailSafe / cluster_services / include

File: [Development] / failsafe / FailSafe / cluster_services / include / ci_types.h (download)

Revision 1.2, Tue Oct 31 00:13:35 2000 UTC (16 years, 11 months ago) by vasa
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -3 lines

Removing preprocessor statements (#if 11)

/*
 * 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
 */
/* 
 * ci_types.h
 *
 * what's in this file?
 */

#ifndef	CI_TYPES_H
#define	CI_TYPES_H
#ident "$Id: ci_types.h,v 1.2 2000/10/31 00:13:35 vasa Exp $"

#define	CI_CONFIG_REV		"1.666"

typedef	short	ci_nodeid_t;
typedef uint32_t ci_instid_t;
typedef uint32_t ci_clusterid_t;    /* To be provided by CDB. */

typedef int	ci_cluster_status_t;
typedef int	ci_machine_status_t;
typedef int	ci_filesystem_status_t;

#define	CI_NODEID_INVAL		((short)-1)
#define	CI_CLUSTERID_INVAL	((uint32_t)-1)

typedef enum {
	CI_NODEMODE_ENABLED        =       0,
	CI_NODEMODE_SUSPENDED      =       1,
	CI_NODEMODE_DISABLED       =       2,
	CI_NODEMODE_CONSOLE        =       3
} ci_nodemode_t;

/* Ci_incarnation_t is being introduced after ha_cmd and ha_gcd have
 * defined their own hardcoded types for incarnation numbers as
 * uint_t and int32_t. The int32_t is the lowest common denominator
 * (we will be using only positive integers) */
typedef int32_t	ci_incarnation_t;

/* The ci_param_t and the ci_param_name_t structure are used by
 * various subsystems to provide the CLI with a trasparent way
 * of dealing with the params. */
typedef enum ci_param_type_e {
    CI_INT      = 0,
    CI_STRING   = 1
} ci_param_type_t;

typedef union ci_param_value_u {
    int		integer;
    char	*string;
} ci_param_value_t;

typedef struct ci_param_name_s {
    char		*name;	/* Name of the parameter. */
    ci_param_type_t	type;	/* type CI_INT/CI_STRING */
    char		*help;	/* A string describing the parameter. */
    boolean_t		visible;/* Whether this param should be made
				 * available to the GUI/TBI. */
} ci_param_name_t;

typedef struct ci_param_s {
    ci_param_type_t	type;
    ci_param_value_t	value;
} ci_param_t;

/* Prototypes from ci_param.c */
ci_param_t	*ci_param_create(ci_param_type_t, void *);
void		ci_param_free(ci_param_t *);

#endif	/* CI_TYPES_H */