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