#include <netdir.h> void netdir_sperror();
The netdir_sperror() function issues an informational message that states why one of the name-to-address translation APIs may have failed.
None.
No authorization is required.
None
netdir_sperror() issues an informational message that indicates the error in one of the name-to-address translation APIs.
Message ID | Error Message Text |
---|---|
CPIA1B7 | The previous name-to-address translation has completed. |
The netdir_sperror() function issues CPIA1B7 message that indicates why one of the name-to-address translation mapping APIs failed. This function should be used after a failed call to a name-to-address translation function prior to calling another name-to-address translation function.
See Code disclaimer information for information pertaining to code examples.
The following example shows how netdir_sperror() is used:
#include <netdir.h> #include <rpc/rpc_com.h> main() { void *handlep; struct netconfig *nconf; /* Initialize the network selection mechanism */ if (handlep = setnetconfig()) == (void *)NULL) { exit(1); } /* Get a netconfig structure from the netconfig file */ if ((nconf = getnetconfig(handlep)) == (struct netconf *)NULL) { printf("Unable to obtain a netconfig structure\n"); } /* Set the protocol specific negotiation for broadcast */ if (netdir_options(nconf, ND_SET_BROADCAST, RPC_ANYSOCK, NULL)) { printf("Error setting the broadcasting option\n"); printf("See the job log for error message\n"); netdir_sperror(); } /* Release the netconfig handle allocated by setnetconfig() */ endnetconfig(handlep); }
Top | Remote Procedure Call (RPC) APIs | APIs by category |