cfga_scsi.h revision 09fe1b16b0d85a4b43987628152f516df3ae9838
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _CFGA_SCSI_H
#define _CFGA_SCSI_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
#include <locale.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <locale.h>
#include <langinfo.h>
#include <time.h>
#include <stdarg.h>
#include <sys/dditypes.h>
#include <libdevinfo.h>
#include <libdevice.h>
#include <librcm.h>
#include <dirent.h>
#include <strings.h>
#include <sys/byteorder.h>
#include <strings.h>
#include <signal.h>
#include <synch.h>
#include <thread.h>
#include <limits.h>
#include <ftw.h>
#define CFGA_PLUGIN_LIB
#include <config_admin.h>
#if !defined(DEBUG)
#define NDEBUG 1
#else
#endif
#include <assert.h>
typedef enum {
SCFGA_ERR = -1,
SCFGA_LIB_ERR = 0,
} scfga_ret_t;
/* Commands used internally */
typedef enum {
SCFGA_INVAL_CMD = -1,
SCFGA_DEV_OP = 0,
} scfga_cmd_t;
typedef enum {
SCFGA_TERMINATE = 0,
/* Structures for tree walking code */
typedef struct {
} walk_node_t;
typedef struct {
const char *nodetype;
} walk_minor_t;
typedef union {
} walkarg_t;
typedef struct {
char *phys;
char *log;
int match_minor;
int l_errno;
} pathm_t;
typedef struct ldata_list {
struct ldata_list *next;
} ldata_list_t;
typedef struct {
struct cfga_confirm *confp;
} prompt_t;
typedef struct {
char *hba_phys;
char *dyncomp;
char *path;
} apid_t;
/* Private hardware options */
#define OPT_DISABLE_RCM "disable_rcm"
#define OPT_USE_DIFORCE "use_diforce"
/* apid_t flags */
#define FLAG_DISABLE_RCM 0x01
#define FLAG_USE_DIFORCE 0x02
/* Message ids */
typedef enum {
/* ERRORS */
ERR_UNKNOWN = -1,
/* Errors with arguments */
/* RCM Errors */
/* Commands */
/* help messages */
/* Hotplug messages */
/* Hotplugging confirmation prompts */
/* Misc. */
} msgid_t;
typedef enum {
} led_strid_t;
typedef enum {
} led_modeid_t;
typedef struct {
cfga_flags_t, char **);
} hw_cmd_t;
typedef struct {
int nargs; /* Number of arguments following msgid */
int intl; /* Flag: if 1, internationalize */
const char *msgstr;
} msgcvt_t;
#define SLASH "/"
#define CFGA_DEV_DIR "/dev/cfg"
#define DEV_DIR "/dev"
#define DEVICES_DIR "/devices"
#define DSK_DIR "dsk"
#define RDSK_DIR "rdsk"
#define RMT_DIR "rmt"
#define DYN_SEP "::"
#define MINOR_SEP ":"
di_nodeid(s) == (DI_PROM_NODEID))
/*
* The following macro removes the separator from the dynamic component.
*/
extern int _scfga_debug;
/*
*/
/* Function prototypes */
char **errstring);
/* List related routines */
/* Conversion routines */
int *l_errnop);
/* RCM routines */
/* Utility routines */
int match_minor);
char **errstring);
char *cfga_str(int append_newline, ...);
#ifdef __cplusplus
}
#endif
#endif /* _CFGA_SCSI_H */