linux/fs/nfs/mount_clnt.c

// SPDX-License-Identifier: GPL-2.0
/*
 * In-kernel MOUNT protocol client
 *
 * Copyright (C) 1997, Olaf Kirch <[email protected]>
 */

#include <linux/types.h>
#include <linux/socket.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/uio.h>
#include <linux/net.h>
#include <linux/in.h>
#include <linux/sunrpc/clnt.h>
#include <linux/sunrpc/sched.h>
#include <linux/nfs_fs.h>
#include "internal.h"

#define NFSDBG_FACILITY

/*
 * Defined by RFC 1094, section A.3; and RFC 1813, section 5.1.4
 */
#define MNTPATHLEN

/*
 * XDR data type sizes
 */
#define encode_dirpath_sz
#define MNT_status_sz
#define MNT_fhandle_sz
#define MNT_fhandlev3_sz
#define MNT_authflav3_sz

/*
 * XDR argument and result sizes
 */
#define MNT_enc_dirpath_sz
#define MNT_dec_mountres_sz
#define MNT_dec_mountres3_sz

/*
 * Defined by RFC 1094, section A.5
 */
enum {};

/*
 * Defined by RFC 1813, section 5.2
 */
enum {};

static const struct rpc_program mnt_program;

/*
 * Defined by OpenGroup XNFS Version 3W, chapter 8
 */
enum mountstat {};

static struct {} mnt_errtbl[] =;

/*
 * Defined by RFC 1813, section 5.1.5
 */
enum mountstat3 {};

static struct {} mnt3_errtbl[] =;

struct mountres {};

/**
 * nfs_mount - Obtain an NFS file handle for the given host and path
 * @info: pointer to mount request arguments
 * @timeo: deciseconds the mount waits for a response before it retries
 * @retrans: number of times the mount retries a request
 *
 * Uses timeout parameters specified by caller. On successful return, the
 * auth_flavs list and auth_flav_len will be populated with the list from the
 * server or a faked-up list if the server didn't provide one.
 */
int nfs_mount(struct nfs_mount_request *info, int timeo, int retrans)
{}

/**
 * nfs_umount - Notify a server that we have unmounted this export
 * @info: pointer to umount request arguments
 *
 * MOUNTPROC_UMNT is advisory, so we set a short timeout, and always
 * use UDP.
 */
void nfs_umount(const struct nfs_mount_request *info)
{}

/*
 * XDR encode/decode functions for MOUNT
 */

static void encode_mntdirpath(struct xdr_stream *xdr, const char *pathname)
{}

static void mnt_xdr_enc_dirpath(struct rpc_rqst *req, struct xdr_stream *xdr,
				const void *dirpath)
{}

/*
 * RFC 1094: "A non-zero status indicates some sort of error.  In this
 * case, the status is a UNIX error number."  This can be problematic
 * if the server and client use different errno values for the same
 * error.
 *
 * However, the OpenGroup XNFS spec provides a simple mapping that is
 * independent of local errno values on the server and the client.
 */
static int decode_status(struct xdr_stream *xdr, struct mountres *res)
{}

static int decode_fhandle(struct xdr_stream *xdr, struct mountres *res)
{}

static int mnt_xdr_dec_mountres(struct rpc_rqst *req,
				struct xdr_stream *xdr,
				void *data)
{}

static int decode_fhs_status(struct xdr_stream *xdr, struct mountres *res)
{}

static int decode_fhandle3(struct xdr_stream *xdr, struct mountres *res)
{}

static int decode_auth_flavors(struct xdr_stream *xdr, struct mountres *res)
{}

static int mnt_xdr_dec_mountres3(struct rpc_rqst *req,
				 struct xdr_stream *xdr,
				 void *data)
{}

static const struct rpc_procinfo mnt_procedures[] =;

static const struct rpc_procinfo mnt3_procedures[] =;

static unsigned int mnt_counts[ARRAY_SIZE(mnt_procedures)];
static const struct rpc_version mnt_version1 =;

static unsigned int mnt3_counts[ARRAY_SIZE(mnt3_procedures)];
static const struct rpc_version mnt_version3 =;

static const struct rpc_version *mnt_version[] =;

static struct rpc_stat mnt_stats;

static const struct rpc_program mnt_program =;