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