After a context has been set, the application might need to change QOP and service values for individual data units being transmitted. For example, if you want a program to encrypt a password but not a login name, you can use rpc_gss_set_defaults().
rpc_gss_set_defaults(clnt->clnt_auth, rpc_gss_svc_privacy, qop); . . .
In this case, the security service is set to privacy. See Creating a Context. qop is a pointer to a string naming the new QOP.
Contexts are destroyed in the usual way, with auth_destroy().
For more information on changing service and QOP, see the rpc_gss_set_defaults(3NSL) man page.