The Fn svc_reg routine returns 1 if it succeeds, and 0 otherwise.
Typical service application would call Fn svc_auth_reg after registering the service and prior to calling Fn svc_run . When needed to process an RPC credential of type Fa cred_flavor , the Fa handler procedure will be called with two arguments, Fa struct svc_req *rqst and Fa struct rpc_msg *msg , and is expected to return a valid Vt enum auth_stat value. There is no provision to change or delete an authentication handler once registered.
The Fn svc_auth_reg routine returns 0 if the registration is successful, 1 if Fa cred_flavor already has an authentication handler registered for it, and -1 otherwise.