/*
 * Please do not edit this file.
 * It was generated using rpcgen.
 */

#include "/build/libnvidia-container/src/libnvidia-container-1.19.0/src/nvc_rpc.h"
#include <stdio.h>
#include <stdlib.h>
#include <rpc/pmap_clnt.h>
#include <string.h>
#include <memory.h>
#include <sys/socket.h>
#include <netinet/in.h>

#ifndef SIG_PF
#define SIG_PF void(*)(int)
#endif
#pragma GCC diagnostic ignored "-Wmissing-prototypes"
#pragma GCC diagnostic ignored "-Wsign-conversion"
#pragma GCC diagnostic ignored "-Wunused-variable"

int
_driver_init_1 (ptr_t  *argp, void *result, struct svc_req *rqstp)
{
	return (driver_init_1_svc(*argp, result, rqstp));
}

int
_driver_shutdown_1 (ptr_t  *argp, void *result, struct svc_req *rqstp)
{
	return (driver_shutdown_1_svc(*argp, result, rqstp));
}

int
_driver_get_rm_version_1 (ptr_t  *argp, void *result, struct svc_req *rqstp)
{
	return (driver_get_rm_version_1_svc(*argp, result, rqstp));
}

int
_driver_get_cuda_version_1 (ptr_t  *argp, void *result, struct svc_req *rqstp)
{
	return (driver_get_cuda_version_1_svc(*argp, result, rqstp));
}

int
_driver_get_device_count_1 (ptr_t  *argp, void *result, struct svc_req *rqstp)
{
	return (driver_get_device_count_1_svc(*argp, result, rqstp));
}

int
_driver_get_device_1 (driver_get_device_1_argument *argp, void *result, struct svc_req *rqstp)
{
	return (driver_get_device_1_svc(argp->arg1, argp->arg2, result, rqstp));
}

int
_driver_get_device_minor_1 (driver_get_device_minor_1_argument *argp, void *result, struct svc_req *rqstp)
{
	return (driver_get_device_minor_1_svc(argp->arg1, argp->arg2, result, rqstp));
}

int
_driver_get_device_busid_1 (driver_get_device_busid_1_argument *argp, void *result, struct svc_req *rqstp)
{
	return (driver_get_device_busid_1_svc(argp->arg1, argp->arg2, result, rqstp));
}

int
_driver_get_device_uuid_1 (driver_get_device_uuid_1_argument *argp, void *result, struct svc_req *rqstp)
{
	return (driver_get_device_uuid_1_svc(argp->arg1, argp->arg2, result, rqstp));
}

int
_driver_get_device_arch_1 (driver_get_device_arch_1_argument *argp, void *result, struct svc_req *rqstp)
{
	return (driver_get_device_arch_1_svc(argp->arg1, argp->arg2, result, rqstp));
}

int
_driver_get_device_model_1 (driver_get_device_model_1_argument *argp, void *result, struct svc_req *rqstp)
{
	return (driver_get_device_model_1_svc(argp->arg1, argp->arg2, result, rqstp));
}

int
_driver_get_device_brand_1 (driver_get_device_brand_1_argument *argp, void *result, struct svc_req *rqstp)
{
	return (driver_get_device_brand_1_svc(argp->arg1, argp->arg2, result, rqstp));
}

int
_driver_get_device_mig_mode_1 (driver_get_device_mig_mode_1_argument *argp, void *result, struct svc_req *rqstp)
{
	return (driver_get_device_mig_mode_1_svc(argp->arg1, argp->arg2, result, rqstp));
}

int
_driver_get_device_max_mig_device_count_1 (driver_get_device_max_mig_device_count_1_argument *argp, void *result, struct svc_req *rqstp)
{
	return (driver_get_device_max_mig_device_count_1_svc(argp->arg1, argp->arg2, result, rqstp));
}

int
_driver_get_device_mig_device_1 (driver_get_device_mig_device_1_argument *argp, void *result, struct svc_req *rqstp)
{
	return (driver_get_device_mig_device_1_svc(argp->arg1, argp->arg2, argp->arg3, result, rqstp));
}

int
_driver_get_device_gpu_instance_id_1 (driver_get_device_gpu_instance_id_1_argument *argp, void *result, struct svc_req *rqstp)
{
	return (driver_get_device_gpu_instance_id_1_svc(argp->arg1, argp->arg2, result, rqstp));
}

int
_driver_get_device_compute_instance_id_1 (driver_get_device_compute_instance_id_1_argument *argp, void *result, struct svc_req *rqstp)
{
	return (driver_get_device_compute_instance_id_1_svc(argp->arg1, argp->arg2, result, rqstp));
}

int
_nvcgo_init_1 (ptr_t  *argp, void *result, struct svc_req *rqstp)
{
	return (nvcgo_init_1_svc(*argp, result, rqstp));
}

int
_nvcgo_shutdown_1 (ptr_t  *argp, void *result, struct svc_req *rqstp)
{
	return (nvcgo_shutdown_1_svc(*argp, result, rqstp));
}

int
_nvcgo_get_device_cgroup_version_1 (nvcgo_get_device_cgroup_version_1_argument *argp, void *result, struct svc_req *rqstp)
{
	return (nvcgo_get_device_cgroup_version_1_svc(argp->arg1, argp->arg2, argp->arg3, result, rqstp));
}

int
_nvcgo_find_device_cgroup_path_1 (nvcgo_find_device_cgroup_path_1_argument *argp, void *result, struct svc_req *rqstp)
{
	return (nvcgo_find_device_cgroup_path_1_svc(argp->arg1, argp->arg2, argp->arg3, argp->arg4, argp->arg5, result, rqstp));
}

int
_nvcgo_setup_device_cgroup_1 (nvcgo_setup_device_cgroup_1_argument *argp, void *result, struct svc_req *rqstp)
{
	return (nvcgo_setup_device_cgroup_1_svc(argp->arg1, argp->arg2, argp->arg3, argp->arg4, result, rqstp));
}

void
driver_program_1(struct svc_req *rqstp, register SVCXPRT *transp)
{
	union {
		ptr_t driver_init_1_arg;
		ptr_t driver_shutdown_1_arg;
		ptr_t driver_get_rm_version_1_arg;
		ptr_t driver_get_cuda_version_1_arg;
		ptr_t driver_get_device_count_1_arg;
		driver_get_device_1_argument driver_get_device_1_arg;
		driver_get_device_minor_1_argument driver_get_device_minor_1_arg;
		driver_get_device_busid_1_argument driver_get_device_busid_1_arg;
		driver_get_device_uuid_1_argument driver_get_device_uuid_1_arg;
		driver_get_device_arch_1_argument driver_get_device_arch_1_arg;
		driver_get_device_model_1_argument driver_get_device_model_1_arg;
		driver_get_device_brand_1_argument driver_get_device_brand_1_arg;
		driver_get_device_mig_mode_1_argument driver_get_device_mig_mode_1_arg;
		driver_get_device_max_mig_device_count_1_argument driver_get_device_max_mig_device_count_1_arg;
		driver_get_device_mig_device_1_argument driver_get_device_mig_device_1_arg;
		driver_get_device_gpu_instance_id_1_argument driver_get_device_gpu_instance_id_1_arg;
		driver_get_device_compute_instance_id_1_argument driver_get_device_compute_instance_id_1_arg;
	} argument;
	union {
		driver_init_res driver_init_1_res;
		driver_shutdown_res driver_shutdown_1_res;
		driver_get_rm_version_res driver_get_rm_version_1_res;
		driver_get_cuda_version_res driver_get_cuda_version_1_res;
		driver_get_device_count_res driver_get_device_count_1_res;
		driver_get_device_res driver_get_device_1_res;
		driver_get_device_minor_res driver_get_device_minor_1_res;
		driver_get_device_busid_res driver_get_device_busid_1_res;
		driver_get_device_uuid_res driver_get_device_uuid_1_res;
		driver_get_device_arch_res driver_get_device_arch_1_res;
		driver_get_device_model_res driver_get_device_model_1_res;
		driver_get_device_brand_res driver_get_device_brand_1_res;
		driver_get_device_mig_mode_res driver_get_device_mig_mode_1_res;
		driver_get_device_max_mig_device_count_res driver_get_device_max_mig_device_count_1_res;
		driver_get_device_mig_device_res driver_get_device_mig_device_1_res;
		driver_get_device_gpu_instance_id_res driver_get_device_gpu_instance_id_1_res;
		driver_get_device_compute_instance_id_res driver_get_device_compute_instance_id_1_res;
	} result;
	bool_t retval;
	xdrproc_t _xdr_argument, _xdr_result;
	bool_t (*local)(char *, void *, struct svc_req *);

	switch (rqstp->rq_proc) {
	case NULLPROC:
		(void) svc_sendreply (transp, (xdrproc_t) xdr_void, (char *)NULL);
		return;

	case DRIVER_INIT:
		_xdr_argument = (xdrproc_t) xdr_ptr_t;
		_xdr_result = (xdrproc_t) xdr_driver_init_res;
		local = (bool_t (*) (char *, void *,  struct svc_req *))_driver_init_1;
		break;

	case DRIVER_SHUTDOWN:
		_xdr_argument = (xdrproc_t) xdr_ptr_t;
		_xdr_result = (xdrproc_t) xdr_driver_shutdown_res;
		local = (bool_t (*) (char *, void *,  struct svc_req *))_driver_shutdown_1;
		break;

	case DRIVER_GET_RM_VERSION:
		_xdr_argument = (xdrproc_t) xdr_ptr_t;
		_xdr_result = (xdrproc_t) xdr_driver_get_rm_version_res;
		local = (bool_t (*) (char *, void *,  struct svc_req *))_driver_get_rm_version_1;
		break;

	case DRIVER_GET_CUDA_VERSION:
		_xdr_argument = (xdrproc_t) xdr_ptr_t;
		_xdr_result = (xdrproc_t) xdr_driver_get_cuda_version_res;
		local = (bool_t (*) (char *, void *,  struct svc_req *))_driver_get_cuda_version_1;
		break;

	case DRIVER_GET_DEVICE_COUNT:
		_xdr_argument = (xdrproc_t) xdr_ptr_t;
		_xdr_result = (xdrproc_t) xdr_driver_get_device_count_res;
		local = (bool_t (*) (char *, void *,  struct svc_req *))_driver_get_device_count_1;
		break;

	case DRIVER_GET_DEVICE:
		_xdr_argument = (xdrproc_t) xdr_driver_get_device_1_argument;
		_xdr_result = (xdrproc_t) xdr_driver_get_device_res;
		local = (bool_t (*) (char *, void *,  struct svc_req *))_driver_get_device_1;
		break;

	case DRIVER_GET_DEVICE_MINOR:
		_xdr_argument = (xdrproc_t) xdr_driver_get_device_minor_1_argument;
		_xdr_result = (xdrproc_t) xdr_driver_get_device_minor_res;
		local = (bool_t (*) (char *, void *,  struct svc_req *))_driver_get_device_minor_1;
		break;

	case DRIVER_GET_DEVICE_BUSID:
		_xdr_argument = (xdrproc_t) xdr_driver_get_device_busid_1_argument;
		_xdr_result = (xdrproc_t) xdr_driver_get_device_busid_res;
		local = (bool_t (*) (char *, void *,  struct svc_req *))_driver_get_device_busid_1;
		break;

	case DRIVER_GET_DEVICE_UUID:
		_xdr_argument = (xdrproc_t) xdr_driver_get_device_uuid_1_argument;
		_xdr_result = (xdrproc_t) xdr_driver_get_device_uuid_res;
		local = (bool_t (*) (char *, void *,  struct svc_req *))_driver_get_device_uuid_1;
		break;

	case DRIVER_GET_DEVICE_ARCH:
		_xdr_argument = (xdrproc_t) xdr_driver_get_device_arch_1_argument;
		_xdr_result = (xdrproc_t) xdr_driver_get_device_arch_res;
		local = (bool_t (*) (char *, void *,  struct svc_req *))_driver_get_device_arch_1;
		break;

	case DRIVER_GET_DEVICE_MODEL:
		_xdr_argument = (xdrproc_t) xdr_driver_get_device_model_1_argument;
		_xdr_result = (xdrproc_t) xdr_driver_get_device_model_res;
		local = (bool_t (*) (char *, void *,  struct svc_req *))_driver_get_device_model_1;
		break;

	case DRIVER_GET_DEVICE_BRAND:
		_xdr_argument = (xdrproc_t) xdr_driver_get_device_brand_1_argument;
		_xdr_result = (xdrproc_t) xdr_driver_get_device_brand_res;
		local = (bool_t (*) (char *, void *,  struct svc_req *))_driver_get_device_brand_1;
		break;

	case DRIVER_GET_DEVICE_MIG_MODE:
		_xdr_argument = (xdrproc_t) xdr_driver_get_device_mig_mode_1_argument;
		_xdr_result = (xdrproc_t) xdr_driver_get_device_mig_mode_res;
		local = (bool_t (*) (char *, void *,  struct svc_req *))_driver_get_device_mig_mode_1;
		break;

	case DRIVER_GET_DEVICE_MAX_MIG_DEVICE_COUNT:
		_xdr_argument = (xdrproc_t) xdr_driver_get_device_max_mig_device_count_1_argument;
		_xdr_result = (xdrproc_t) xdr_driver_get_device_max_mig_device_count_res;
		local = (bool_t (*) (char *, void *,  struct svc_req *))_driver_get_device_max_mig_device_count_1;
		break;

	case DRIVER_GET_DEVICE_MIG_DEVICE:
		_xdr_argument = (xdrproc_t) xdr_driver_get_device_mig_device_1_argument;
		_xdr_result = (xdrproc_t) xdr_driver_get_device_mig_device_res;
		local = (bool_t (*) (char *, void *,  struct svc_req *))_driver_get_device_mig_device_1;
		break;

	case DRIVER_GET_DEVICE_GPU_INSTANCE_ID:
		_xdr_argument = (xdrproc_t) xdr_driver_get_device_gpu_instance_id_1_argument;
		_xdr_result = (xdrproc_t) xdr_driver_get_device_gpu_instance_id_res;
		local = (bool_t (*) (char *, void *,  struct svc_req *))_driver_get_device_gpu_instance_id_1;
		break;

	case DRIVER_GET_DEVICE_COMPUTE_INSTANCE_ID:
		_xdr_argument = (xdrproc_t) xdr_driver_get_device_compute_instance_id_1_argument;
		_xdr_result = (xdrproc_t) xdr_driver_get_device_compute_instance_id_res;
		local = (bool_t (*) (char *, void *,  struct svc_req *))_driver_get_device_compute_instance_id_1;
		break;

	default:
		svcerr_noproc (transp);
		return;
	}
	memset ((char *)&argument, 0, sizeof (argument));
	if (!svc_getargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) {
		svcerr_decode (transp);
		return;
	}
	retval = (bool_t) (*local)((char *)&argument, (void *)&result, rqstp);
	if (retval > 0 && !svc_sendreply(transp, (xdrproc_t) _xdr_result, (char *)&result)) {
		svcerr_systemerr (transp);
	}
	if (!svc_freeargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) {
		fprintf (stderr, "%s", "unable to free arguments");
		exit (1);
	}
	if (!driver_program_1_freeresult (transp, _xdr_result, (caddr_t) &result))
		fprintf (stderr, "%s", "unable to free results");

	return;
}

void
nvcgo_program_1(struct svc_req *rqstp, register SVCXPRT *transp)
{
	union {
		ptr_t nvcgo_init_1_arg;
		ptr_t nvcgo_shutdown_1_arg;
		nvcgo_get_device_cgroup_version_1_argument nvcgo_get_device_cgroup_version_1_arg;
		nvcgo_find_device_cgroup_path_1_argument nvcgo_find_device_cgroup_path_1_arg;
		nvcgo_setup_device_cgroup_1_argument nvcgo_setup_device_cgroup_1_arg;
	} argument;
	union {
		nvcgo_init_res nvcgo_init_1_res;
		nvcgo_shutdown_res nvcgo_shutdown_1_res;
		nvcgo_get_device_cgroup_version_res nvcgo_get_device_cgroup_version_1_res;
		nvcgo_find_device_cgroup_path_res nvcgo_find_device_cgroup_path_1_res;
		nvcgo_setup_device_cgroup_res nvcgo_setup_device_cgroup_1_res;
	} result;
	bool_t retval;
	xdrproc_t _xdr_argument, _xdr_result;
	bool_t (*local)(char *, void *, struct svc_req *);

	switch (rqstp->rq_proc) {
	case NULLPROC:
		(void) svc_sendreply (transp, (xdrproc_t) xdr_void, (char *)NULL);
		return;

	case NVCGO_INIT:
		_xdr_argument = (xdrproc_t) xdr_ptr_t;
		_xdr_result = (xdrproc_t) xdr_nvcgo_init_res;
		local = (bool_t (*) (char *, void *,  struct svc_req *))_nvcgo_init_1;
		break;

	case NVCGO_SHUTDOWN:
		_xdr_argument = (xdrproc_t) xdr_ptr_t;
		_xdr_result = (xdrproc_t) xdr_nvcgo_shutdown_res;
		local = (bool_t (*) (char *, void *,  struct svc_req *))_nvcgo_shutdown_1;
		break;

	case NVCGO_GET_DEVICE_CGROUP_VERSION:
		_xdr_argument = (xdrproc_t) xdr_nvcgo_get_device_cgroup_version_1_argument;
		_xdr_result = (xdrproc_t) xdr_nvcgo_get_device_cgroup_version_res;
		local = (bool_t (*) (char *, void *,  struct svc_req *))_nvcgo_get_device_cgroup_version_1;
		break;

	case NVCGO_FIND_DEVICE_CGROUP_PATH:
		_xdr_argument = (xdrproc_t) xdr_nvcgo_find_device_cgroup_path_1_argument;
		_xdr_result = (xdrproc_t) xdr_nvcgo_find_device_cgroup_path_res;
		local = (bool_t (*) (char *, void *,  struct svc_req *))_nvcgo_find_device_cgroup_path_1;
		break;

	case NVCGO_SETUP_DEVICE_CGROUP:
		_xdr_argument = (xdrproc_t) xdr_nvcgo_setup_device_cgroup_1_argument;
		_xdr_result = (xdrproc_t) xdr_nvcgo_setup_device_cgroup_res;
		local = (bool_t (*) (char *, void *,  struct svc_req *))_nvcgo_setup_device_cgroup_1;
		break;

	default:
		svcerr_noproc (transp);
		return;
	}
	memset ((char *)&argument, 0, sizeof (argument));
	if (!svc_getargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) {
		svcerr_decode (transp);
		return;
	}
	retval = (bool_t) (*local)((char *)&argument, (void *)&result, rqstp);
	if (retval > 0 && !svc_sendreply(transp, (xdrproc_t) _xdr_result, (char *)&result)) {
		svcerr_systemerr (transp);
	}
	if (!svc_freeargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) {
		fprintf (stderr, "%s", "unable to free arguments");
		exit (1);
	}
	if (!nvcgo_program_1_freeresult (transp, _xdr_result, (caddr_t) &result))
		fprintf (stderr, "%s", "unable to free results");

	return;
}
