예제 #1
0
파일: svc.c 프로젝트: KubaKaszycki/kklibc
/* Program unavailable error reply */
void
svcerr_noprog (register SVCXPRT *xprt)
{
  struct rpc_msg rply;

  rply.rm_direction = REPLY;
  rply.rm_reply.rp_stat = MSG_ACCEPTED;
  rply.acpted_rply.ar_verf = xprt->xp_verf;
  rply.acpted_rply.ar_stat = PROG_UNAVAIL;
  SVC_REPLY (xprt, &rply);
}
예제 #2
0
파일: svc.c 프로젝트: KubaKaszycki/kklibc
/* Some system error */
void
svcerr_systemerr (register SVCXPRT *xprt)
{
  struct rpc_msg rply;

  rply.rm_direction = REPLY;
  rply.rm_reply.rp_stat = MSG_ACCEPTED;
  rply.acpted_rply.ar_verf = xprt->xp_verf;
  rply.acpted_rply.ar_stat = SYSTEM_ERR;
  SVC_REPLY (xprt, &rply);
}
예제 #3
0
파일: svc.c 프로젝트: KubaKaszycki/kklibc
/* Authentication error reply */
void
svcerr_auth (SVCXPRT *xprt, enum auth_stat why)
{
  struct rpc_msg rply;

  rply.rm_direction = REPLY;
  rply.rm_reply.rp_stat = MSG_DENIED;
  rply.rjcted_rply.rj_stat = AUTH_ERROR;
  rply.rjcted_rply.rj_why = why;
  SVC_REPLY (xprt, &rply);
}
예제 #4
0
파일: svc.c 프로젝트: KubaKaszycki/kklibc
/* Can't decode args error reply */
void
svcerr_decode (register SVCXPRT *xprt)
{
  struct rpc_msg rply;

  rply.rm_direction = REPLY;
  rply.rm_reply.rp_stat = MSG_ACCEPTED;
  rply.acpted_rply.ar_verf = xprt->xp_verf;
  rply.acpted_rply.ar_stat = GARBAGE_ARGS;
  SVC_REPLY (xprt, &rply);
}
예제 #5
0
/*
 * Program version mismatch error reply
 */
void
svcerr_progvers(SVCXPRT *xprt, u_long low_vers, u_long high_vers)
{
	struct rpc_msg rply;

	rply.rm_direction = REPLY;
	rply.rm_reply.rp_stat = MSG_ACCEPTED;
	rply.acpted_rply.ar_verf = xprt->xp_verf;
	rply.acpted_rply.ar_stat = PROG_MISMATCH;
	rply.acpted_rply.ar_vers.low = low_vers;
	rply.acpted_rply.ar_vers.high = high_vers;
	SVC_REPLY(xprt, &rply);
}
예제 #6
0
/*
 * Send a reply to an rpc request
 */
bool_t
svc_sendreply(SVCXPRT *xprt, xdrproc_t xdr_results, caddr_t xdr_location)
{
	struct rpc_msg rply; 

	rply.rm_direction = REPLY;
	rply.rm_reply.rp_stat = MSG_ACCEPTED; 
	rply.acpted_rply.ar_verf = xprt->xp_verf; 
	rply.acpted_rply.ar_stat = SUCCESS;
	rply.acpted_rply.ar_results.where = xdr_location;
	rply.acpted_rply.ar_results.proc = xdr_results;
	return (SVC_REPLY(xprt, &rply)); 
}
예제 #7
0
파일: svc.c 프로젝트: nfs-ganesha/ntirpc
/*
 * Some system error (MT-SAFE)
 */
void
svcerr_systemerr(SVCXPRT *xprt, struct svc_req *req)
{
	struct rpc_msg rply;

	assert(xprt != NULL);

	rply.rm_direction = REPLY;
	rply.rm_reply.rp_stat = MSG_ACCEPTED;
	rply.rm_xid = req->rq_xid;
	rply.acpted_rply.ar_verf = req->rq_verf;
	rply.acpted_rply.ar_stat = SYSTEM_ERR;
	SVC_REPLY(xprt, req, &rply);
}
예제 #8
0
파일: svc.c 프로젝트: nfs-ganesha/ntirpc
/*
 * Can't decode args error reply (MT-SAFE)
 */
void
svcerr_decode(SVCXPRT *xprt, struct svc_req *req)
{
	struct rpc_msg rply;

	assert(xprt != NULL);

	rply.rm_direction = REPLY;
	rply.rm_reply.rp_stat = MSG_ACCEPTED;
	rply.rm_xid = req->rq_xid;
	rply.acpted_rply.ar_verf = req->rq_verf;
	rply.acpted_rply.ar_stat = GARBAGE_ARGS;
	SVC_REPLY(xprt, req, &rply);
}
예제 #9
0
파일: svc.c 프로젝트: nfs-ganesha/ntirpc
/*
 * No procedure error reply (MT-SAFE)
 */
void
svcerr_noproc(SVCXPRT *xprt, struct svc_req *req)
{
	struct rpc_msg rply;

	assert(xprt != NULL);

	rply.rm_direction = REPLY;
	rply.rm_reply.rp_stat = MSG_ACCEPTED;
	rply.rm_xid = req->rq_xid;
	rply.acpted_rply.ar_verf = req->rq_verf;
	rply.acpted_rply.ar_stat = PROC_UNAVAIL;
	SVC_REPLY(xprt, req, &rply);
}
예제 #10
0
파일: svc.c 프로젝트: nfs-ganesha/ntirpc
/*
 * Send a reply to an rpc request (MT-SAFE).
 *
 * XXX Rather than marshal an rpc_msg on the stack, we may
 * want another variant which takes a message, perhaps one from
 * a reply cache (e.g., CITI Windows NFS client).
 *
 */
bool
svc_sendreply(SVCXPRT *xprt, struct svc_req *req, xdrproc_t xdr_results,
	      void *xdr_location)
{
	struct rpc_msg rply;

	assert(xprt != NULL);

	rply.rm_direction = REPLY;
	rply.rm_reply.rp_stat = MSG_ACCEPTED;
	rply.rm_xid = req->rq_xid;
	rply.acpted_rply.ar_verf = req->rq_verf;
	rply.acpted_rply.ar_stat = SUCCESS;
	rply.acpted_rply.ar_results.where = xdr_location;
	rply.acpted_rply.ar_results.proc = xdr_results;
	return (SVC_REPLY(xprt, req, &rply));
}