xref: /titanic_52/usr/src/cmd/isns/isnsd/isns_utils.h (revision 0a0e9771ca0211c15f3ac4466b661c145feeb9e4)
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 /*
23  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_ISNS_UTILS_H
28 #define	_ISNS_UTILS_H
29 
30 #include <isns_msgq.h>
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 int setup_mgmt_door(msg_queue_t *);
37 
38 typedef enum {
39 	PARTIAL_SUCCESS = 100,
40 	PARTIAL_FAILURE,
41 	ERR_DOOR_ALREADY_RUNNING,
42 	ERR_DOOR_CREATE_FAILED,
43 	ERR_DOOR_MORE_SPACE,
44 	ERR_NULL_XML_MESSAGE,
45 	ERR_INVALID_MGMT_REQUEST,
46 	ERR_XML_VALID_OPERATION_NOT_FOUND,
47 	ERR_XML_VALID_OBJECT_NOT_FOUND,
48 	ERR_XML_FAIL_TO_CREATE_WRITE_BUFFER,
49 	ERR_XML_FAIL_TO_GET_WRITEPTR,
50 	ERR_XML_INIT_READER_FAILED,
51 	ERR_XML_PARSE_MEMORY_FAILED,
52 	ERR_XML_FAILED_TO_SET_XPATH_CONTEXT,
53 	ERR_XML_FAILED_TO_REGISTER_NAMESPACE,
54 	ERR_XML_NEWNODE_FAILED,
55 	ERR_XML_ADDCHILD_FAILED,
56 	ERR_XML_SETPROP_FAILED,
57 	ERR_XML_NEWCHILD_FAILED,
58 	ERR_SYNTAX_MISSING_ROOT,
59 	ERR_SYNTAX_MISSING_NAME_ATTR,
60 	ERR_MALLOC_FAILED,
61 	ERR_XML_OP_FAILED,
62 	ERR_XML_STRDUP_FAILED,
63 	ERR_DOOR_SERVER_DETECTED_INVALID_USER,
64 	ERR_DOOR_SERVER_DETECTED_NOT_AUTHORIZED_USER,
65 	ERR_MATCHING_ISCSI_NODE_NOT_FOUND,
66 	ERR_MATCHING_NETWORK_ENTITY_NOT_FOUND,
67 	ERR_NO_PORTAL_GROUP_FOUND,
68 	ERR_MATCHING_PORTAL_NOT_FOUND,
69 	ERR_MATCHING_NODE_NOT_FOUND,
70 	ERR_MATCHING_DD_NOT_FOUND,
71 	ERR_MATCHING_DDSET_NOT_FOUND,
72 	ERR_NO_ASSOCIATED_DD_FOUND,
73 	ERR_NO_ASSOCIATED_DDSET_FOUND,
74 	ERR_NO_SUCH_ASSOCIATION,
75 	ERR_ALREADY_ASSOCIATED,
76 	ERR_NAME_IN_USE,
77 	ERR_DOOR_UCRED_FAILED
78 } result_code_t;
79 
80 char *result_code_to_str(int);
81 
82 #ifdef __cplusplus
83 }
84 #endif
85 
86 #endif /* _ISNS_UTILS_H */
87