Print this page
remove support for non-ANSI compilation
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/cladm.h
+++ new/usr/src/uts/common/sys/cladm.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License, Version 1.0 only
6 6 * (the "License"). You may not use this file except in compliance
7 7 * with the License.
8 8 *
9 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 * or http://www.opensolaris.org/os/licensing.
11 11 * See the License for the specific language governing permissions
12 12 * and limitations under the License.
↓ open down ↓ |
12 lines elided |
↑ open up ↑ |
13 13 *
14 14 * When distributing Covered Code, include this CDDL HEADER in each
15 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 * If applicable, add the following below this CDDL HEADER, with the
17 17 * fields enclosed by brackets "[]" replaced with your own identifying
18 18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 19 *
20 20 * CDDL HEADER END
21 21 */
22 22 /*
23 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24 + *
23 25 * Copyright 1998-2002 Sun Microsystems, Inc. All rights reserved.
24 26 * Use is subject to license terms.
25 27 */
26 28
27 29 #ifndef _SYS_CLADM_H
28 30 #define _SYS_CLADM_H
29 31
30 -#pragma ident "%Z%%M% %I% %E% SMI"
31 -
32 32 #ifdef __cplusplus
33 33 extern "C" {
34 34 #endif
35 35
36 36 #include <sys/types.h>
37 37 #include <sys/clconf.h>
38 38 #include <netinet/in.h>
39 39
40 40
41 41 /*
42 42 * This file defines interfaces which are private to Sun Clustering.
43 43 * Others should not depend on this in any way as it may change or be
44 44 * removed completely.
45 45 */
46 46
47 47 /*
48 48 * cladm() facilities; see below for definitions pertinent to each of these
49 49 * facilities.
50 50 */
51 51 #define CL_INITIALIZE 0 /* bootstrapping information */
52 52 #define CL_CONFIG 1 /* configuration information */
53 53
54 54
55 55 /*
56 56 * Command definitions for each of the facilities.
57 57 * The type of the data pointer and the direction of the data transfer
58 58 * is listed for each command.
59 59 */
60 60
61 61 /*
62 62 * CL_INITIALIZE facility commands.
63 63 */
64 64 #define CL_GET_BOOTFLAG 0 /* Return cluster config/boot status */
65 65
66 66 /*
67 67 * Definitions for the flag bits returned by CL_GET_BOOTFLAG.
68 68 */
69 69 #define CLUSTER_CONFIGURED 0x0001 /* system is configured as a cluster */
70 70 #define CLUSTER_BOOTED 0x0002 /* system is booted as a cluster */
71 71
72 72 #ifdef _KERNEL
73 73 #define CLUSTER_INSTALLING 0x0004 /* cluster is being installed */
74 74 #define CLUSTER_DCS_ENABLED 0x0008 /* cluster device framework enabled */
75 75 #endif /* _KERNEL */
76 76
77 77 /*
78 78 * CL_CONFIG facility commands.
79 79 * The CL_GET_NETADDRS and CL_GET_NUM_NETADDRS are contract private interfaces
80 80 * per PSARC/2001/579-01.
81 81 */
82 82 #define CL_NODEID 0 /* Return nodeid of this node. */
83 83 #define CL_HIGHEST_NODEID 1 /* Return highest configured nodeid. */
84 84 #define CL_GDEV_PREFIX 2 /* Return path to global namespace. */
85 85 #define CL_GET_NETADDRS 3 /* Get array of network addresses */
86 86 /* controlled by Sun Cluster. */
87 87 #define CL_GET_NUM_NETADDRS 4 /* Get the number of data structure */
88 88 /* entries in the array that will be */
89 89 /* returned using CL_GET_NETADDRS. */
90 90
91 91 /*
92 92 * The cladm system call can provide an array of cluster controlled
93 93 * network addresses and associated netmasks. The cladm arguments
94 94 * must be as follows: the argument fac is specified as CL_CONFIG,
95 95 * the argument cmd is specified as CL_GET_NETADDRS, and argument arg
96 96 * is the location of a structure of type cladm_netaddrs_t. The
97 97 * cladm_num_netaddrs is used as input for the requested number
98 98 * of array entries, and is used as ouput for the number of valid array
99 99 * entries available.
100 100 *
101 101 * The caller must allocate sufficient memory for the array of
102 102 * structures of type cladm_netaddr_entry_t and specify the starting
103 103 * location as cladm_netaddrs_array. The number of entries included
104 104 * in the array is determined using cladm with argument fac specified
105 105 * as CL_CONFIG, argument cmd specified as CL_GET_NUM_NETADDRS, and
106 106 * argument arg is the location of a structure of type cladm_netaddrs_t.
107 107 * The determined number of array entries is returned in
108 108 * cladm_num_netaddrs.
109 109 *
110 110 * These commands support the yielding of DR operation control (by the
111 111 * RCM Framework) to Sun Cluster for cluster controlled adapters.
112 112 *
113 113 * These data structures are contract private per PSARC/2001/579-01.
114 114 */
115 115 typedef struct {
116 116 int32_t cl_ipversion; /* IPV4_VERSION or IPV6_VERSION */
117 117 union {
118 118 struct {
119 119 ipaddr_t ipv4_netaddr;
120 120 ipaddr_t ipv4_netmask;
121 121 } cl_ipv4;
122 122 struct {
123 123 uint32_t ipv6_netaddr[4];
124 124 uint32_t ipv6_netmask[4];
125 125 } cl_ipv6;
126 126 } cl_ipv_un;
127 127 } cladm_netaddr_entry_t;
128 128
129 129 typedef struct {
130 130 uint32_t cladm_num_netaddrs;
131 131 cladm_netaddr_entry_t *cladm_netaddrs_array;
132 132 } cladm_netaddrs_t;
133 133
134 134 #if defined(_SYSCALL32)
135 135 typedef struct {
↓ open down ↓ |
94 lines elided |
↑ open up ↑ |
136 136 uint32_t cladm_num_netaddrs;
137 137 caddr32_t cladm_netaddrs_array;
138 138 } cladm_netaddrs32_t;
139 139 #endif /* defined(_SYSCALL32) */
140 140
141 141
142 142 #ifdef _KERNEL
143 143 extern int cladmin(int fac, int cmd, void *data);
144 144 extern int cluster_bootflags;
145 145 #else
146 -#if defined(__STDC__)
147 146 extern int _cladm(int fac, int cmd, void *data);
148 -#else /* !defined(__STDC__) */
149 -extern int _cladm();
150 -#endif /* defined(__STDC__) */
151 147 #endif /* _KERNEL */
152 148
153 149 #ifdef __cplusplus
154 150 }
155 151 #endif
156 152
157 153
158 154 #endif /* _SYS_CLADM_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX