|
|
This appendix provides reference information on RPC Log. It describes the externally defined function rpclog().
When an error is detected by the RPC library, it calls an externally defined function called rpclog(). The default rpclog shipped with the RPC library simply formats the information passed to it and then prints it to stderr.
When an error is detected by the RPC library, it calls an externally defined function called rpclog(). The default rpclog() shipped with the RPC library simply formats the information passed to it and then prints it to stderr.
Here is the source for the default rpclog():
#include <stdio.h>
#include <rpc.h>
void rpclog(number, csectp, funcp, msgp)
int number;
char *csectp;
char *funcp;
char *msgp;
{
fprintf(stderr, "%s%s\n", funcp, msgp);
return;
}
Parameters are:
| number | The error number (defined in xdrtype.h). |
| csectp | A pointer to a string defining the csect that encountered the error and called rpclog(). |
| funcp | A string defining the function that encountered the error and called rpclog(). |
| msgp | A pointer to the message text. |
If the default rpclog() function does not suffice for your application, it may be replaced by an application specific function. The new function should allow for the same calling sequence and return a void.
|
|