4 * Copyright (c) 1997 - 2003 Kungliga Tekniska Högskolan
5 * (Royal Institute of Technology, Stockholm, Sweden).
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * 3. Neither the name of the Institute nor the names of its contributors
20 * may be used to endorse or promote products derived from this software
21 * without specific prior written permission.
23 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
42 %#include <fs_errors.h>
45 error-function conv_to_arla_errno
53 struct AFSDBLockDesc {
66 struct AFSDBLockDesc lock;
69 struct AFSDBCacheEntry {
71 int32_t cell; /*Cell part of the fid*/
72 AFSFid netFid; /*Network part of the fid*/
75 struct AFSDBLockDesc lock;
85 const AFSCB_MAX_XSTAT_LONGS = 2048;
86 typedef int32_t AFSCB_CollData<AFSCB_MAX_XSTAT_LONGS>;
87 const AFSCB_XSTATSCOLL_CALL_INFO = 0; /*CM call counting & info*/
88 const AFSCB_XSTATSCOLL_PERF_INFO = 1; /*CM performance info*/
89 const AFSCB_XSTATSCOLL_FULL_PERF_INFO = 2; /*CM performance info*/
91 const AFS_MAX_INTERFACE_ADDR = 32;
92 struct interfaceAddr { /* for multihomed clients */
93 int numberOfInterfaces;
95 ASIS int32_t addr_in[AFS_MAX_INTERFACE_ADDR]; /* interface addresses */
96 ASIS int32_t subnetmask[AFS_MAX_INTERFACE_ADDR]; /* subnet masks in net ord */
97 int32_t mtu[AFS_MAX_INTERFACE_ADDR]; /* MTU */
100 const AFSMAXCELLHOSTS = 8; /*Max VLDB servers per cell*/
102 typedef int32_t serverList[AFSMAXCELLHOSTS];
104 typedef afs_uint32 cacheConfig<>;
107 CallBack (IN AFSCBFids *a_fidArrayP,
108 IN AFSCBs *a_callBackArrayP) = 204;
110 InitCallBackState () = 205;
114 /* return 0 if ok, 1 if bad index, lock == lock number index */
116 GetLock(IN int32_t index, OUT AFSDBLock *lock) = 207;
118 /* return 0 if ok, 1 if bad index, cbentry == cbentry number index */
120 GetCE(IN int32_t index, OUT AFSDBCacheEntry *cbentry) = 208;
122 /* AFSCB_XSTAT_VERSION */
124 XStatsVersion(OUT int32_t *version) = 209;
126 GetXStats(IN int32_t client_version_num,
127 IN int32_t collection_number,
128 OUT int32_t *server_version_number, /* AFSCB_XSTAT_VERSION */
130 OUT AFSCB_CollData *stats) = 210;
132 InitCallBackState2(OUT interfaceAddr *addr) = 211;
134 /* fill in interfaces et al in `addr' */
136 WhoAreYou(OUT interfaceAddr *addr) = 212;
140 InitCallBackState3(IN afsUUID *serverUuid) = 213;
142 /* still there? 0 if match, !0 otherwise */
144 ProbeUUID(IN afsUUID *uuid) = 214;
146 GetCellServDB(IN afs_int32 cellIndex,
147 OUT string cellName<AFSNAMEMAX>,
148 OUT serverList *cellHosts) = 216;
150 GetLocalCell(OUT string cellName<AFSNAMEMAX>) = 217;
152 GetCacheConfig(IN afs_uint32 callerVersion,
153 OUT afs_uint32 *serverVersion,
154 OUT afs_uint32 *configCount,
155 OUT cacheConfig *config) = 218;
157 GetCellByNum(IN int32_t cellNumber,
158 OUT string cellName<AFSNAMEMAX>,
159 OUT serverList *cellHosts) = 65537;
161 TellMeAboutYourself(OUT struct interfaceAddr *addr,
162 OUT Capabilities *capabilities) = 65538;