Fix more build problems due to prototypes produced by rxgen.
[openafs.git] / src / xstat / xstat_fs_callback.c
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  * 
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 /*
11  * Description:
12  *      Implementation of the xstat_fs callback routines.  These are the
13  *      server-side functions that the File Server expects to invoke on
14  *      the client machine via the afsint interface.  In this case, the
15  *      client process is acting as a callback listener, so it has to
16  *      be prepared to answer these calls.
17  *
18  * Environment:
19  *      The afsint server stubs expect the functions defined here to
20  *      be provided.  There is no .h file for this code, since the
21  *      linker really does all the work for us, and these don't really
22  *      need to be ``visible'' to anyone else.
23  *------------------------------------------------------------------------*/
24
25 #include <afsconfig.h>
26 #include <afs/param.h>
27
28 RCSID("$Header$");
29
30 #include <errno.h>
31 #include <stdio.h>                      /*Standard I/O stuff*/
32 #include <afs/afscbint.h>               /*Callback interface defs*/
33
34 int afs_cb_inited = 0;
35 struct interfaceAddr afs_cb_interface;
36
37 #define XSTAT_FS_CALLBACK_VERBOSE 0
38
39 /*
40  * Initialize the callback interface structure
41  */
42 static int init_afs_cb() {
43     int count;
44
45     afs_uuid_create(&afs_cb_interface.uuid);
46     count = rx_getAllAddr(&afs_cb_interface.addr_in, AFS_MAX_INTERFACE_ADDR);
47     if ( count <= 0 )
48         afs_cb_interface.numberOfInterfaces = 0;
49     else
50         afs_cb_interface.numberOfInterfaces = count;
51     afs_cb_inited = 1;
52     return 0;
53 }
54
55 /*
56  * Routines we need that don't have explicit include file definitions.
57  */
58 extern char *hostutil_GetNameByINet();  /*Host parsing utility*/
59
60 static char mn[] = "xstat_fs_callback"; /*Module name*/
61
62 /*------------------------------------------------------------------------
63  * SRXAFSCB_CallBack
64  *
65  * Description:
66  *      Handle a set of callbacks from the File Server.
67  *
68  * Arguments:
69  *      struct rx_call *rxcall  : Ptr to the associated Rx call structure.
70  *      AFSCBFids *Fids_Array   : Ptr to the set of Fids.
71  *      AFSCBs *CallBacks_Array : Ptr to the set of callbacks.
72  *
73  * Returns:
74  *      0 on success,
75  *      Error value otherwise.
76  *
77  * Environment:
78  *      Nothing interesting.
79  *
80  * Side Effects:
81  *      As advertised.
82  *------------------------------------------------------------------------*/
83
84 afs_int32 SRXAFSCB_CallBack(rxcall, Fids_Array, CallBack_Array)
85     struct rx_call *rxcall;
86     AFSCBFids *Fids_Array;
87     AFSCBs *CallBack_Array;
88
89 { /*SRXAFSCB_CallBack*/
90
91 #if XSTAT_FS_CALLBACK_VERBOSE
92     static char rn[] = "SRXAFSCB_CallBack";     /*Routine name*/
93     char hostName[256];                         /*Host name buffer*/
94     char *hostNameResult;                       /*Ptr to static*/
95
96     fprintf(stderr, "[%s:%s] Called\n",
97             mn, rn);
98
99     if (rxcall != (struct rx_call *)0) {
100         hostNameResult =
101             hostutil_GetNameByINet((afs_int32)(rxcall->conn->peer->host));
102         strcpy(hostName, hostNameResult);
103         fprintf(stderr, "[%s:%s] Called from host %s, port %d\n",
104                 mn, rn, hostName, rxcall->conn->peer->port);
105     } /*Valid rxcall param*/
106 #endif /* XSTAT_FS_CALLBACK_VERBOSE */
107
108     /*
109      * Return successfully.
110      */
111     return(0);
112
113 } /*SRXAFSCB_CallBack*/
114
115 /*------------------------------------------------------------------------
116  * SRXAFSCB_InitCallBackState
117  *
118  * Description:
119  *      Initialize callback state on this ``Cache Manager''.
120  *
121  * Arguments:
122  *      struct rx_call *rxcall  : Ptr to the associated Rx call structure.
123  *
124  * Returns:
125  *      0 on success,
126  *      Error value otherwise.
127  *
128  * Environment:
129  *      This will definitely be called by the File Server (exactly once),
130  *      since it will think we are another new ``Cache Manager''.
131  *
132  * Side Effects:
133  *      As advertised.
134  *------------------------------------------------------------------------*/
135
136 afs_int32 SRXAFSCB_InitCallBackState(rxcall)
137     struct rx_call *rxcall;
138
139 { /*SRXAFSCB_InitCallBackState*/
140
141 #if XSTAT_FS_CALLBACK_VERBOSE
142     static char rn[] = "SRXAFSCB_InitCallBackState";    /*Routine name*/
143     char hostName[256];                                 /*Host name buffer*/
144     char *hostNameResult;                               /*Ptr to static*/
145
146     fprintf(stderr, "[%s:%s] Called\n",
147             mn, rn);
148
149     if (rxcall != (struct rx_call *)0) {
150         hostNameResult =
151             hostutil_GetNameByINet((afs_int32)(rxcall->conn->peer->host));
152         strcpy(hostName, hostNameResult);
153         fprintf(stderr, "[%s:%s] Called from host %s, port %d\n",
154                 mn, rn, hostName, rxcall->conn->peer->port);
155     } /*Valid rxcall param*/
156 #endif /* XSTAT_FS_CALLBACK_VERBOSE */
157
158     /*
159      * Return successfully.
160      */
161     return(0);
162
163 } /*SRXAFSCB_InitCallBackState*/
164
165 /*------------------------------------------------------------------------
166  * SRXAFSCB_Probe
167  *
168  * Description:
169  *      Respond to a probe from the File Server.  If a File Server
170  *      doesn't hear from you every so often, it will send you a probe
171  *      to make sure you're there, just like any other ``Cache Manager''
172  *      it's keeping track of.
173  *
174  * Arguments:
175  *      struct rx_call *rxcall  : Ptr to the associated Rx call structure.
176  *
177  * Returns:
178  *      0 on success,
179  *      Error value otherwise.
180  *
181  * Environment:
182  *      This may be called by the File Server if we don't call it often
183  *      enough.
184  *
185  * Side Effects:
186  *      As advertised.
187  *------------------------------------------------------------------------*/
188
189 afs_int32 SRXAFSCB_Probe(rxcall)
190         struct rx_call *rxcall;
191
192 { /*SRXAFSCB_Probe*/
193
194 #if XSTAT_FS_CALLBACK_VERBOSE
195     static char rn[] = "SRXAFSCB_Probe";                /*Routine name*/
196     char hostName[256];                         /*Host name buffer*/
197     char *hostNameResult;                       /*Ptr to static*/
198
199     fprintf(stderr, "[%s:%s] Called\n",
200             mn, rn);
201
202     if (rxcall != (struct rx_call *)0) {
203         hostNameResult =
204             hostutil_GetNameByINet((afs_int32)(rxcall->conn->peer->host));
205         strcpy(hostName, hostNameResult);
206         fprintf(stderr, "[%s:%s] Called from host %s, port %d\n",
207                 mn, rn, hostName, rxcall->conn->peer->port);
208     } /*Valid rxcall param*/
209 #endif /* XSTAT_FS_CALLBACK_VERBOSE */
210
211     /*
212      * Return successfully.
213      */
214     return(0);
215
216 } /*SRXAFSCB_Probe*/
217
218
219 /*------------------------------------------------------------------------
220  * SRXAFSCB_GetCE64
221  *
222  * Description:
223  *      Respond minimally to a request for returning the contents of
224  *      a cache entry, since someone out there thinks you're a Cache
225  *      Manager.
226  *
227  * Arguments:
228  *      struct rx_call *rxcall: Ptr to the associated Rx call structure.
229  *
230  * Returns:
231  *      0 (always)
232  *
233  * Environment:
234  *      Nothing interesting.
235  *
236  * Side Effects:
237  *      As advertised.
238  *------------------------------------------------------------------------*/
239
240 afs_int32 SRXAFSCB_GetCE64(rxcall, index, ce)
241     struct rx_call *rxcall;
242     afs_int32 index;
243     AFSDBCacheEntry64 *ce;
244
245 { /*SRXAFSCB_GetCE64*/
246
247 #if XSTAT_FS_CALLBACK_VERBOSE
248     static char rn[] = "SRXAFSCB_GetCE64";              /*Routine name*/
249     char hostName[256];                         /*Host name buffer*/
250     char *hostNameResult;                       /*Ptr to static*/
251
252     if (rxcall != (struct rx_call *)0) {
253         hostNameResult =
254             hostutil_GetNameByINet((afs_int32)(rxcall->conn->peer->host));
255         strcpy(hostName, hostNameResult);
256         fprintf(stderr, "[%s:%s] Called from host %s, port %d\n",
257                 mn, rn, hostName, rxcall->conn->peer->port);
258     } /*Valid rxcall param*/
259 #endif /* XSTAT_FS_CALLBACK_VERBOSE */
260
261     return(0);
262
263 } /*SRXAFSCB_GetCE64*/
264
265 afs_int32 SRXAFSCB_GetCE(rxcall, index, ce)
266     struct rx_call *rxcall;
267     afs_int32 index;
268     AFSDBCacheEntry *ce;
269
270 { /*SRXAFSCB_GetCE*/
271
272 #if XSTAT_FS_CALLBACK_VERBOSE
273     static char rn[] = "SRXAFSCB_GetCE";        /*Routine name*/
274     char hostName[256];                         /*Host name buffer*/
275     char *hostNameResult;                       /*Ptr to static*/
276
277     if (rxcall != (struct rx_call *)0) {
278         hostNameResult =
279             hostutil_GetNameByINet((afs_int32)(rxcall->conn->peer->host));
280         strcpy(hostName, hostNameResult);
281         fprintf(stderr, "[%s:%s] Called from host %s, port %d\n",
282                 mn, rn, hostName, rxcall->conn->peer->port);
283     } /*Valid rxcall param*/
284 #endif /* XSTAT_FS_CALLBACK_VERBOSE */
285
286     return(0);
287
288 } /*SRXAFSCB_GetCE*/
289
290
291 /*------------------------------------------------------------------------
292  * SRXAFSCB_GetLock
293  *
294  * Description:
295  *      Respond minimally to a request for returning the contents of
296  *      a cache lock, since someone out there thinks you're a Cache
297  *      Manager.
298  *
299  * Arguments:
300  *      struct rx_call *rxcall: Ptr to the associated Rx call structure.
301  *
302  * Returns:
303  *      0 (always)
304  *
305  * Environment:
306  *      Nothing interesting.
307  *
308  * Side Effects:
309  *      As advertised.
310  *------------------------------------------------------------------------*/
311
312 afs_int32 SRXAFSCB_GetLock(rxcall, index, lock)
313     struct rx_call *rxcall;
314     afs_int32 index;
315     AFSDBLock *lock;
316
317 { /*SRXAFSCB_GetLock*/
318
319 #if XSTAT_FS_CALLBACK_VERBOSE
320     static char rn[] = "SRXAFSCB_GetLock";      /*Routine name*/
321     char hostName[256];                         /*Host name buffer*/
322     char *hostNameResult;                       /*Ptr to static*/
323
324     if (rxcall != (struct rx_call *)0) {
325         hostNameResult =
326             hostutil_GetNameByINet((afs_int32)(rxcall->conn->peer->host));
327         strcpy(hostName, hostNameResult);
328         fprintf(stderr, "[%s:%s] Called from host %s, port %d\n",
329                 mn, rn, hostName, rxcall->conn->peer->port);
330     } /*Valid rxcall param*/
331 #endif /* XSTAT_FS_CALLBACK_VERBOSE */
332
333     return(0);
334
335 } /*SRXAFSCB_GetLock*/
336
337
338 /*------------------------------------------------------------------------
339  * SRXAFSCB_XStatsVersion
340  *
341  * Description:
342  *      Respond minimally to a request for fetching the version of
343  *      extended Cache Manager statistics offered, since someone out
344  *      there thinks you're a Cache Manager.
345  *
346  * Arguments:
347  *      struct rx_call *rxcall: Ptr to the associated Rx call structure.
348  *
349  * Returns:
350  *      0 (always)
351  *
352  * Environment:
353  *      Nothing interesting.
354  *
355  * Side Effects:
356  *      As advertised.
357  *------------------------------------------------------------------------*/
358
359 afs_int32 SRXAFSCB_XStatsVersion(rxcall, versionNumberP)
360     struct rx_call *rxcall;
361     afs_int32 *versionNumberP;
362
363 { /*SRXAFSCB_XStatsVersion*/
364
365 #if XSTAT_FS_CALLBACK_VERBOSE
366     static char rn[] = "SRXAFSCB_XStatsVersion"; /*Routine name*/
367     char hostName[256];                          /*Host name buffer*/
368     char *hostNameResult;                        /*Ptr to static*/
369
370     if (rxcall != (struct rx_call *)0) {
371         hostNameResult =
372             hostutil_GetNameByINet((afs_int32)(rxcall->conn->peer->host));
373         strcpy(hostName, hostNameResult);
374         fprintf(stderr, "[%s:%s] Called from host %s, port %d\n",
375                 mn, rn, hostName, rxcall->conn->peer->port);
376     } /*Valid rxcall param*/
377 #endif /* XSTAT_FS_CALLBACK_VERBOSE */
378
379     return(0);
380
381 } /*SRXAFSCB_XStatsVersion*/
382
383
384 /*------------------------------------------------------------------------
385  * SRXAFSCB_GetXStats
386  *
387  * Description:
388  *      Respond minimally to a request for returning extended
389  *      statistics for a Cache Manager, since someone out there thinks
390  *      you're a Cache Manager.
391  *
392  * Arguments:
393  *      struct rx_call *rxcall: Ptr to the associated Rx call structure.
394  *
395  * Returns:
396  *      0 (always)
397  *
398  * Environment:
399  *      Nothing interesting.
400  *
401  * Side Effects:
402  *      As advertised.
403  *------------------------------------------------------------------------*/
404
405 afs_int32 SRXAFSCB_GetXStats(rxcall, clientVersionNumber, collectionNumber,
406                              srvVersionNumberP, timeP, dataP)
407     struct rx_call *rxcall;
408     afs_int32 clientVersionNumber;
409     afs_int32 collectionNumber;
410     afs_int32 *srvVersionNumberP;
411     afs_int32 *timeP;
412     AFSCB_CollData *dataP;
413
414 { /*SRXAFSCB_GetXStats*/
415
416 #if XSTAT_FS_CALLBACK_VERBOSE
417     static char rn[] = "SRXAFSCB_GetXStats";    /*Routine name*/
418     char hostName[256];                         /*Host name buffer*/
419     char *hostNameResult;                       /*Ptr to static*/
420
421     if (rxcall != (struct rx_call *)0) {
422         hostNameResult =
423             hostutil_GetNameByINet((afs_int32)(rxcall->conn->peer->host));
424         strcpy(hostName, hostNameResult);
425         fprintf(stderr, "[%s:%s] Called from host %s, port %d\n",
426                 mn, rn, hostName, rxcall->conn->peer->port);
427     } /*Valid rxcall param*/
428 #endif /* XSTAT_FS_CALLBACK_VERBOSE */
429
430     return(0);
431
432 } /*SRXAFSCB_GetXStats*/
433
434 /*------------------------------------------------------------------------
435  * EXPORTED SRXAFSCB_InitCallBackState2
436  *
437  * Description:
438  *      This routine was used in the AFS 3.5 beta release, but not anymore.
439  *      It has since been replaced by SRXAFSCB_InitCallBackState3.
440  *
441  * Arguments:
442  *      rxcall : Ptr to Rx call on which this request came in.
443  *
444  * Returns:
445  *      RXGEN_OPCODE (always). 
446  *
447  * Environment:
448  *      Nothing interesting.
449  *
450  * Side Effects:
451  *      None
452  *------------------------------------------------------------------------*/
453
454 int SRXAFSCB_InitCallBackState2(rxcall, addr)
455 struct rx_call *rxcall;
456 struct interfaceAddr * addr;
457 {
458
459 #if XSTAT_FS_CALLBACK_VERBOSE
460     static char rn[] = "SRXAFSCB_InitCallBackState2";   /*Routine name*/
461     char hostName[256];                                 /*Host name buffer*/
462     char *hostNameResult;                               /*Ptr to static*/
463
464     if (rxcall != (struct rx_call *)0) {
465       hostNameResult =
466           hostutil_GetNameByINet((afs_int32)(rxcall->conn->peer->host));
467       strcpy(hostName, hostNameResult);
468       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n",
469               mn, rn, hostName, rxcall->conn->peer->port);
470     } /*Valid rxcall param*/
471 #endif /* XSTAT_FS_CALLBACK_VERBOSE */
472     return RXGEN_OPCODE;
473 }
474
475 /*------------------------------------------------------------------------
476  * EXPORTED SRXAFSCB_WhoAreYou
477  *
478  * Description:
479  *      Routine called by the server-side callback RPC interface to
480  *      obtain a unique identifier for the client. The server uses
481  *      this identifier to figure out whether or not two RX connections
482  *      are from the same client, and to find out which addresses go
483  *      with which clients.
484  *
485  * Arguments:
486  *      rxcall : Ptr to Rx call on which this request came in.
487  *      addr: Ptr to return the list of interfaces for this client.
488  *
489  * Returns:
490  *      0 (Always)
491  *
492  * Environment:
493  *      Nothing interesting.
494  *
495  * Side Effects:
496  *      As advertised.
497  *------------------------------------------------------------------------*/
498
499 int SRXAFSCB_WhoAreYou(rxcall, addr)
500 struct rx_call *rxcall;
501 struct interfaceAddr *addr;
502 {
503     int i;
504     int code = 0;
505     int         count;
506
507 #if XSTAT_FS_CALLBACK_VERBOSE
508     static char rn[] = "SRXAFSCB_WhoAreYou";            /*Routine name*/
509     char hostName[256];                                 /*Host name buffer*/
510     char *hostNameResult;                               /*Ptr to static*/
511
512     if (rxcall != (struct rx_call *)0) {
513       hostNameResult =
514           hostutil_GetNameByINet((afs_int32)(rxcall->conn->peer->host));
515       strcpy(hostName, hostNameResult);
516       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n",
517               mn, rn, hostName, rxcall->conn->peer->port);
518     } /*Valid rxcall param*/
519 #endif /* XSTAT_FS_CALLBACK_VERBOSE */
520
521     if ( rxcall && addr )
522     {
523         if (!afs_cb_inited) init_afs_cb();
524         *addr = afs_cb_interface;
525     }
526
527     /*
528      * Return successfully.
529      */
530     return(0);
531 }
532
533
534 /*------------------------------------------------------------------------
535  * EXPORTED SRXAFSCB_InitCallBackState3
536  *
537  * Description:
538  *      Routine called by the server-side callback RPC interface to
539  *      implement clearing all callbacks from this host.
540  *
541  * Arguments:
542  *      rxcall : Ptr to Rx call on which this request came in.
543  *
544  * Returns:
545  *      0 (always).
546  *
547  * Environment:
548  *      Nothing interesting.
549  *
550  * Side Effects:
551  *      As advertised.
552  *------------------------------------------------------------------------*/
553
554 int SRXAFSCB_InitCallBackState3(rxcall, uuidp)
555 struct rx_call *rxcall;
556 afsUUID *uuidp;
557 {
558 #if XSTAT_FS_CALLBACK_VERBOSE
559     static char rn[] = "SRXAFSCB_InitCallBackState3";   /*Routine name*/
560     char hostName[256];                                 /*Host name buffer*/
561     char *hostNameResult;                               /*Ptr to static*/
562
563     if (rxcall != (struct rx_call *)0) {
564       hostNameResult =
565           hostutil_GetNameByINet((afs_int32)(rxcall->conn->peer->host));
566       strcpy(hostName, hostNameResult);
567       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n",
568               mn, rn, hostName, rxcall->conn->peer->port);
569     } /*Valid rxcall param*/
570 #endif /* XSTAT_FS_CALLBACK_VERBOSE */
571
572     /*
573      * Return successfully.
574      */
575     return(0);
576 }
577  
578
579 /*------------------------------------------------------------------------
580  * EXPORTED SRXAFSCB_ProbeUuid
581  *
582  * Description:
583  *      Routine called by the server-side callback RPC interface to
584  *      implement ``probing'' the Cache Manager, just making sure it's
585  *      still there is still the same client it used to be.
586  *
587  * Arguments:
588  *      rxcall : Ptr to Rx call on which this request came in.
589  *      uuidp : Ptr to UUID that must match the client's UUID.
590  *
591  * Returns:
592  *      0 if uuidp matches the UUID for this client
593  *      Non-zero otherwize
594  *
595  * Environment:
596  *      Nothing interesting.
597  *
598  * Side Effects:
599  *      As advertised.
600  *------------------------------------------------------------------------*/
601
602 int SRXAFSCB_ProbeUuid(rxcall, uuidp)
603 struct rx_call *rxcall;
604 afsUUID *uuidp;
605 {
606     int code = 0;
607
608 #if XSTAT_FS_CALLBACK_VERBOSE
609     static char rn[] = "SRXAFSCB_ProbeUuid";            /*Routine name*/
610     char hostName[256];                                 /*Host name buffer*/
611     char *hostNameResult;                               /*Ptr to static*/
612
613     if (rxcall != (struct rx_call *)0) {
614       hostNameResult =
615           hostutil_GetNameByINet((afs_int32)(rxcall->conn->peer->host));
616       strcpy(hostName, hostNameResult);
617       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n",
618               mn, rn, hostName, rxcall->conn->peer->port);
619     } /*Valid rxcall param*/
620 #endif /* XSTAT_FS_CALLBACK_VERBOSE */
621
622     if (!afs_cb_inited) init_afs_cb();
623     if (!afs_uuid_equal(uuidp, &afs_cb_interface.uuid))
624         code = 1; /* failure */
625     return code;
626 }
627
628 /*------------------------------------------------------------------------
629  * EXPORTED SRXAFSCB_GetServerPrefs
630  *
631  * Description:
632  *      Routine to list server preferences used by this client.
633  *
634  * Arguments:
635  *      a_call  : Ptr to Rx call on which this request came in.
636  *      a_index : Input server index
637  *      a_srvr_addr  : Output server address (0xffffffff on last server)
638  *      a_srvr_rank  : Output server rank
639  *
640  * Returns:
641  *      RXGEN_OPCODE   (always)
642  *
643  * Environment:
644  *      Nothing interesting.
645  *
646  * Side Effects:
647  *      As advertised.
648  *------------------------------------------------------------------------*/
649
650 int SRXAFSCB_GetServerPrefs(
651     struct rx_call *a_call,
652     afs_int32 a_index,
653     afs_int32 *a_srvr_addr,
654     afs_int32 *a_srvr_rank)
655 {
656     return RXGEN_OPCODE;
657 }
658
659 /*------------------------------------------------------------------------
660  * EXPORTED SRXAFSCB_GetCellServDB
661  *
662  * Description:
663  *      Routine to list cells configured for this client
664  *
665  * Arguments:
666  *      a_call  : Ptr to Rx call on which this request came in.
667  *      a_index : Input cell index
668  *      a_name  : Output cell name ("" on last cell)
669  *      a_hosts : Output cell database servers
670  *
671  * Returns:
672  *      0 on success
673  *
674  * Environment:
675  *      Nothing interesting.
676  *
677  * Side Effects:
678  *      As advertised.
679  *------------------------------------------------------------------------*/
680
681 int SRXAFSCB_GetCellServDB(
682     struct rx_call *a_call,
683     afs_int32 a_index,
684     char **a_name,
685     serverList *a_hosts)
686 {
687     return RXGEN_OPCODE;
688 }
689
690
691 /*------------------------------------------------------------------------
692  * EXPORTED SRXAFSCB_GetLocalCell
693  *
694  * Description:
695  *      Routine to return name of client's local cell
696  *
697  * Arguments:
698  *      a_call  : Ptr to Rx call on which this request came in.
699  *      a_name  : Output cell name
700  *
701  * Returns:
702  *      RXGEN_OPCODE   (always)
703  *
704  * Environment:
705  *      Nothing interesting.
706  *
707  * Side Effects:
708  *      As advertised.
709  *------------------------------------------------------------------------*/
710
711 int SRXAFSCB_GetLocalCell(
712     struct rx_call *a_call,
713     char **a_name)
714 {
715     char *t_name;
716
717     t_name = (char *)malloc(AFSNAMEMAX);
718     if (!t_name)
719         return ENOMEM;
720     strcpy(t_name, "This is xstat_fs");
721     *a_name = t_name;
722     return 0;
723 }
724
725
726 /*------------------------------------------------------------------------
727  * EXPORTED SRXAFSCB_GetCacheConfig
728  *
729  * Description:
730  *      Routine to return parameters used to initialize client cache.
731  *      Client may request any format version. Server may not return
732  *      format version greater than version requested by client.
733  *
734  * Arguments:
735  *      a_call:        Ptr to Rx call on which this request came in.
736  *      callerVersion: Data format version desired by the client.
737  *      serverVersion: Data format version of output data.
738  *      configCount:   Number bytes allocated for output data.
739  *      config:        Client cache configuration.
740  *
741  * Returns:
742  *      RXGEN_OPCODE   (always)
743  *
744  * Environment:
745  *      Nothing interesting.
746  *
747  * Side Effects:
748  *      As advertised.
749  *------------------------------------------------------------------------*/
750
751 int SRXAFSCB_GetCacheConfig(
752     struct rx_call *a_call,
753     afs_uint32 callerVersion,
754     afs_uint32 *serverVersion,
755     afs_uint32 *configCount,
756     cacheConfig *config)
757 {
758     return RXGEN_OPCODE;
759 }