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