Gets a list of supported security mechanisms.
Network Services Library (libnsl.a)
#include <rpc/rpcsec_gss.h>
char ** rpc_gss_get_mechanisms();
The rpc_gss_get_mechanisms subroutine returns a list of supported security mechanisms.
Item | Description |
---|---|
a NULL-terminated list of character strings | successful |
NULL | unsuccessful |
#include <stdlib.h>
#include <rpc/rpc.h>
#include <rpc/rpcsec_gss.h>
int main(void)
{
char **s;
/* Get mechanisms */
if((s = rpc_gss_get_mechanisms()) == NULL)
{
fprintf(stderr,"\nrpc_gss_get_mechanisms() failed!\n");
exit(1);
}
return 0;
}