1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 /*
27  * SES State definitions
28  */
29 
30 /*
31  * I18N message number ranges
32  *  This file: 16500 - 16999
33  *  Shared common messages: 1 - 1999
34  */
35 
36 #ifndef	_A_STATE_H
37 #define	_A_STATE_H
38 
39 
40 #ifdef	__cplusplus
41 extern "C" {
42 #endif
43 
44 /*
45  * Include any headers you depend on.
46  */
47 #include	<sys/fibre-channel/fcio.h>
48 #define	_SYS_FC4_FCAL_LINKAPP_H
49 #include	<sys/fc4/fcio.h>
50 #include <gfc.h>
51 #include <g_state.h>
52 #include <a5k.h>
53 
54 /*
55  * Definitions for send/receive diagnostic command
56  */
57 #define	HEADER_LEN		4
58 #define	MAX_REC_DIAG_LENGTH	0xfffe
59 
60 
61 
62 typedef struct	rec_diag_hdr {
63 	uchar_t		page_code;
64 	uchar_t		sub_enclosures;
65 	ushort_t	page_len;
66 } Rec_diag_hdr;
67 
68 /* struct for list of gfc_map_t */
69 typedef struct gfc_map_mp {
70 	gfc_map_t   map;
71 	struct gfc_map_mp *map_next;
72 } gfc_map_mp_t;
73 
74 /*
75  * We should use the scsi_capacity structure in impl/commands.h
76  * but it uses u_long's to define 32 bit values.
77  */
78 typedef	struct	capacity_data_struct {
79 	uint_t	last_block_addr;
80 	uint_t	block_size;
81 } Read_capacity_data;
82 
83 /* Function prototypes defined for liba5k modules */
84 /* diag.c */
85 extern int	l_dev_bypass_enable(struct  path_struct *, int, int,
86 		int, int);
87 extern int	l_bp_bypass_enable(char *, int, int, int, int, int);
88 extern int	d_p_enable(char *, int);
89 extern int	d_p_bypass(char *, int);
90 
91 /* lhot.c */
92 extern int	is_null_wwn(uchar_t *);
93 
94 /* mon.c */
95 extern int	l_ex_open_test(struct dlist *, char *, int);
96 extern int	l_get_conflict(char *, char **, int);
97 extern int	l_new_password(char *, char *);
98 extern int	l_get_mode_pg(char *, uchar_t **, int);
99 extern void	l_element_msg_string(uchar_t, char *);
100 extern int	l_check_file(char *, int);
101 extern int	l_get_pid_from_path(const char *, const gfc_map_t *, int *);
102 
103 #ifdef	__cplusplus
104 }
105 #endif
106 
107 #endif	/* _A_STATE_H */
108