#include <rpc/rpc.h> void auth_destroy(AUTH *auth);
The auth_destroy() function destroys the authentication information structure that is pointed to by the auth parameter.
No authorization is required.
None.
None.
| Message ID | Error Message Text |
|---|---|
| CPE3418 E | Possible APAR condition or hardware failure. |
| CPF3CF2 E | Error(s) occurred during running of &1 API. |
| CPF9872 E | Program or service program &1 in library &2 ended. Reason code &3. |
See Code disclaimer information for information pertaining to code examples.
The following example shows how auth_destroy() is used:
#include <stdio.h>
#include <rpc/rpc.h>
/* Define remote program number and version */
#define RMTPROGNUM (u_long)0x3fffffffL
#define RMTPROGVER (u_long)0x1
main()
{
CLIENT *clnt; /* The client handle */
/*
Create the client handle, and initialize the authentication in
the clnt->cl_auth struct
*/
clnt = clnt_create("RPCSERVER_HOST", RMTPROGNUM, RMTPROGVER,
"tcp");
if (clnt == (CLIENT *)NULL) {
printf("Could not create client\n");
exit(1);
}
...
/*
Destroy the authentication information associated with
clnt->cl_auth
*/
auth_destroy(clnt->cl_auth);
...
}
| Top | Remote Procedure Call (RPC) APIs | APIs by category |