4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 1998-2002 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
30 #pragma ident "%Z%%M% %I% %E% SMI"
36 #include <sys/types.h>
37 #include <sys/clconf.h>
38 #include <netinet/in.h>
42 * This file defines interfaces which are private to Sun Clustering.
43 * Others should not depend on this in any way as it may change or be
48 * cladm() facilities; see below for definitions pertinent to each of these
51 #define CL_INITIALIZE 0 /* bootstrapping information */
52 #define CL_CONFIG 1 /* configuration information */
56 * Command definitions for each of the facilities.
57 * The type of the data pointer and the direction of the data transfer
58 * is listed for each command.
62 * CL_INITIALIZE facility commands.
64 #define CL_GET_BOOTFLAG 0 /* Return cluster config/boot status */
67 * Definitions for the flag bits returned by CL_GET_BOOTFLAG.
69 #define CLUSTER_CONFIGURED 0x0001 /* system is configured as a cluster */
70 #define CLUSTER_BOOTED 0x0002 /* system is booted as a cluster */
73 #define CLUSTER_INSTALLING 0x0004 /* cluster is being installed */
74 #define CLUSTER_DCS_ENABLED 0x0008 /* cluster device framework enabled */
78 * CL_CONFIG facility commands.
79 * The CL_GET_NETADDRS and CL_GET_NUM_NETADDRS are contract private interfaces
80 * per PSARC/2001/579-01.
82 #define CL_NODEID 0 /* Return nodeid of this node. */
83 #define CL_HIGHEST_NODEID 1 /* Return highest configured nodeid. */
84 #define CL_GDEV_PREFIX 2 /* Return path to global namespace. */
85 #define CL_GET_NETADDRS 3 /* Get array of network addresses */
86 /* controlled by Sun Cluster. */
87 #define CL_GET_NUM_NETADDRS 4 /* Get the number of data structure */
88 /* entries in the array that will be */
89 /* returned using CL_GET_NETADDRS. */
92 * The cladm system call can provide an array of cluster controlled
93 * network addresses and associated netmasks. The cladm arguments
94 * must be as follows: the argument fac is specified as CL_CONFIG,
95 * the argument cmd is specified as CL_GET_NETADDRS, and argument arg
96 * is the location of a structure of type cladm_netaddrs_t. The
97 * cladm_num_netaddrs is used as input for the requested number
98 * of array entries, and is used as ouput for the number of valid array
101 * The caller must allocate sufficient memory for the array of
102 * structures of type cladm_netaddr_entry_t and specify the starting
103 * location as cladm_netaddrs_array. The number of entries included
104 * in the array is determined using cladm with argument fac specified
105 * as CL_CONFIG, argument cmd specified as CL_GET_NUM_NETADDRS, and
106 * argument arg is the location of a structure of type cladm_netaddrs_t.
107 * The determined number of array entries is returned in
108 * cladm_num_netaddrs.
110 * These commands support the yielding of DR operation control (by the
111 * RCM Framework) to Sun Cluster for cluster controlled adapters.
113 * These data structures are contract private per PSARC/2001/579-01.
116 int32_t cl_ipversion
; /* IPV4_VERSION or IPV6_VERSION */
119 ipaddr_t ipv4_netaddr
;
120 ipaddr_t ipv4_netmask
;
123 uint32_t ipv6_netaddr
[4];
124 uint32_t ipv6_netmask
[4];
127 } cladm_netaddr_entry_t
;
130 uint32_t cladm_num_netaddrs
;
131 cladm_netaddr_entry_t
*cladm_netaddrs_array
;
134 #if defined(_SYSCALL32)
136 uint32_t cladm_num_netaddrs
;
137 caddr32_t cladm_netaddrs_array
;
138 } cladm_netaddrs32_t
;
139 #endif /* defined(_SYSCALL32) */
143 extern int cladmin(int fac
, int cmd
, void *data
);
144 extern int cluster_bootflags
;
146 #if defined(__STDC__)
147 extern int _cladm(int fac
, int cmd
, void *data
);
148 #else /* !defined(__STDC__) */
150 #endif /* defined(__STDC__) */
158 #endif /* _SYS_CLADM_H */