Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
mount_clnt.c File Reference
#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"

Go to the source code of this file.

Data Structures

struct  mountres
 
struct  mnt_fhstatus
 

Macros

#define MNTPATHLEN   (1024)
 
#define encode_dirpath_sz   (1 + XDR_QUADLEN(MNTPATHLEN))
 
#define MNT_status_sz   (1)
 
#define MNT_fhs_status_sz   (1)
 
#define MNT_fhandle_sz   XDR_QUADLEN(NFS2_FHSIZE)
 
#define MNT_fhandle3_sz   (1 + XDR_QUADLEN(NFS3_FHSIZE))
 
#define MNT_authflav3_sz   (1 + NFS_MAX_SECFLAVORS)
 
#define MNT_enc_dirpath_sz   encode_dirpath_sz
 
#define MNT_dec_mountres_sz   (MNT_status_sz + MNT_fhandle_sz)
 
#define MNT_dec_mountres3_sz
 

Enumerations

enum  {
  MOUNTPROC_NULL = 0, MOUNTPROC_MNT = 1, MOUNTPROC_DUMP = 2, MOUNTPROC_UMNT = 3,
  MOUNTPROC_UMNTALL = 4, MOUNTPROC_EXPORT = 5
}
 
enum  {
  MOUNTPROC3_NULL = 0, MOUNTPROC3_MNT = 1, MOUNTPROC3_DUMP = 2, MOUNTPROC3_UMNT = 3,
  MOUNTPROC3_UMNTALL = 4, MOUNTPROC3_EXPORT = 5
}
 
enum  mountstat {
  MNT_OK = 0, MNT_EPERM = 1, MNT_ENOENT = 2, MNT_EACCES = 13,
  MNT_EINVAL = 22
}
 
enum  mountstat3 {
  MNT3_OK = 0, MNT3ERR_PERM = 1, MNT3ERR_NOENT = 2, MNT3ERR_IO = 5,
  MNT3ERR_ACCES = 13, MNT3ERR_NOTDIR = 20, MNT3ERR_INVAL = 22, MNT3ERR_NAMETOOLONG = 63,
  MNT3ERR_NOTSUPP = 10004, MNT3ERR_SERVERFAULT = 10006
}
 

Functions

int nfs_mount (struct nfs_mount_request *info)
 
void nfs_umount (const struct nfs_mount_request *info)
 

Macro Definition Documentation

#define encode_dirpath_sz   (1 + XDR_QUADLEN(MNTPATHLEN))

Definition at line 31 of file mount_clnt.c.

#define MNT_authflav3_sz   (1 + NFS_MAX_SECFLAVORS)

Definition at line 36 of file mount_clnt.c.

#define MNT_dec_mountres3_sz
Value:
MNT_authflav3_sz)

Definition at line 43 of file mount_clnt.c.

#define MNT_dec_mountres_sz   (MNT_status_sz + MNT_fhandle_sz)

Definition at line 42 of file mount_clnt.c.

#define MNT_enc_dirpath_sz   encode_dirpath_sz

Definition at line 41 of file mount_clnt.c.

#define MNT_fhandle3_sz   (1 + XDR_QUADLEN(NFS3_FHSIZE))

Definition at line 35 of file mount_clnt.c.

#define MNT_fhandle_sz   XDR_QUADLEN(NFS2_FHSIZE)

Definition at line 34 of file mount_clnt.c.

#define MNT_fhs_status_sz   (1)

Definition at line 33 of file mount_clnt.c.

#define MNT_status_sz   (1)

Definition at line 32 of file mount_clnt.c.

#define MNTPATHLEN   (1024)

Definition at line 26 of file mount_clnt.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
MOUNTPROC_NULL 
MOUNTPROC_MNT 
MOUNTPROC_DUMP 
MOUNTPROC_UMNT 
MOUNTPROC_UMNTALL 
MOUNTPROC_EXPORT 

Definition at line 49 of file mount_clnt.c.

anonymous enum
Enumerator:
MOUNTPROC3_NULL 
MOUNTPROC3_MNT 
MOUNTPROC3_DUMP 
MOUNTPROC3_UMNT 
MOUNTPROC3_UMNTALL 
MOUNTPROC3_EXPORT 

Definition at line 61 of file mount_clnt.c.

enum mountstat
Enumerator:
MNT_OK 
MNT_EPERM 
MNT_ENOENT 
MNT_EACCES 
MNT_EINVAL 

Definition at line 75 of file mount_clnt.c.

enum mountstat3
Enumerator:
MNT3_OK 
MNT3ERR_PERM 
MNT3ERR_NOENT 
MNT3ERR_IO 
MNT3ERR_ACCES 
MNT3ERR_NOTDIR 
MNT3ERR_INVAL 
MNT3ERR_NAMETOOLONG 
MNT3ERR_NOTSUPP 
MNT3ERR_SERVERFAULT 

Definition at line 97 of file mount_clnt.c.

Function Documentation

int nfs_mount ( struct nfs_mount_request info)

nfs_mount - Obtain an NFS file handle for the given host and path : pointer to mount request arguments

Uses default timeout parameters specified by underlying transport.

Definition at line 144 of file mount_clnt.c.

void nfs_umount ( const struct nfs_mount_request info)

nfs_umount - Notify a server that we have unmounted this export : pointer to umount request arguments

MOUNTPROC_UMNT is advisory, so we set a short timeout, and always use UDP.

Definition at line 220 of file mount_clnt.c.

Variable Documentation

int errno

Definition at line 85 of file mount_clnt.c.

Definition at line 84 of file mount_clnt.c.