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