14 return "RPC executed successfully";
16 return "remote hasn't exported program";
18 return "remote can't support version #";
20 return "program can't support procedure";
22 return "procedure can't decode params";
24 return "RPC system error";
26 return "unknown accept_stat error";
37 return "bad credential (seal broken)";
38 case AUTH_REJECTEDCRED:
39 return "client must begin new session";
41 return "bad verifier (seal broken)";
42 case AUTH_REJECTEDVERF:
43 return "verifier expired or replayed";
45 return "rejected for security reasons";
46 case AUTH_INVALIDRESP:
47 return "bogus response verifier";
49 return "reason unknown";
50 case AUTH_KERB_GENERIC:
51 return "kerberos generic error";
53 return "time of credential expired";
55 return "problem with ticket file";
57 return "can't decode authenticator";
59 return "wrong net address in ticket";
60 case RPCSEC_GSS_CREDPROBLEM:
61 return "no credentials for user";
62 case RPCSEC_GSS_CTXPROBLEM:
63 return "problem with context";
65 return "auth_stat error";
69 rpc_call_stat::rpc_call_stat(
const rpc_msg &hdr)
71 if (hdr.body.mtype() == REPLY)
72 switch (hdr.body.rbody().stat()) {
75 accept_ = hdr.body.rbody().areply().reply_data.stat();
79 switch (hdr.body.rbody().rreply().stat()) {
81 type_ = RPCVERS_MISMATCH;
85 auth_ = hdr.body.rbody().rreply().rj_why();
93 rpc_call_stat::message()
const 100 case RPCVERS_MISMATCH:
101 return "server reported rpcvers field with wrong value";
103 return "unable to unmarshal reply value sent by server";
105 return "network error when communicating with server";
107 return "insufficient memory to unmarshal result";
109 std::cerr <<
"rpc_call_stat: invalid type" << std::endl;
117 if (hdr.body.mtype() != REPLY)
119 switch (hdr.body.rbody().stat()) {
121 if (hdr.body.rbody().areply().reply_data.stat() == SUCCESS)
123 throw xdr_call_error(hdr.body.rbody().areply().reply_data.stat());
125 if (hdr.body.rbody().rreply().stat() == AUTH_ERROR)
Most of the xdrpp library is encapsulated in the xdr namespace.
Exceptions raised by RPC calls.
Generic class of XDR unmarshaling errors.
const char * rpc_errmsg(accept_stat ev)
Translate one of the conditions in RFC5531 for an unexecuted call into a string.
void check_call_hdr(const rpc_msg &hdr)
Check that an RPC header precedes a result.
This is the exception raised in an RPC client when it reaches the server and transmits a call...