nfs-ganesha 1.4
Classes | Defines | Typedefs | Functions | Variables

commands_NFS_remote.c File Reference

#include "ganesha_rpc.h"
#include <string.h>
#include "fsal.h"
#include "cache_inode.h"
#include "commands.h"
#include "Getopt.h"
#include "cmd_nfstools.h"
#include "cmd_tools.h"
#include "nfs_file_handle.h"
#include "nfs_core.h"
#include "abstract_mem.h"
#include "nfs23.h"
#include "mount.h"
#include <unistd.h>
#include <sys/types.h>
#include <pwd.h>
#include <ctype.h>

Go to the source code of this file.

Classes

struct  shell_fh3__
struct  prog_vers_def__
struct  prog_vers_client_def__

Defines

#define MAXIT   10
#define MAXRETRY   3
#define MAX_GRPS   128
#define NFS_READDIR_SIZE   10
#define MAX_GRPS   128

Typedefs

typedef struct shell_fh3__ shell_fh3_t
typedef struct prog_vers_def__ prog_vers_def_t
typedef struct
prog_vers_client_def__ 
prog_vers_client_def_t

Functions

CLIENT * getCLIENT (char *name)
int setCLIENT (char *name, CLIENT *clnt)
char * getHostname (char *name)
int setHostname (char *name, char *hostname)
char * getProto (char *name)
int setProto (char *name, char *proto)
int getPort (char *name)
int setPort (char *name, int port)
int rpc_init (char *hostname, char *name, char *proto, int port, FILE *output)
int rpc_reinit (char *name, FILE *output)
int try_rpc_reinit (char *name, int error, FILE *output)
int switch_result (int result, int i, char *name, char *func_name, char *func_called_name, FILE *output)
int fn_rpc_init (int argc, char **argv, FILE *output)
void nfs_remote_layer_SetLogLevel (int log_lvl)
int fn_MNT1_remote_command (int argc, char **argv, FILE *output)
int fn_MNT3_remote_command (int argc, char **argv, FILE *output)
int fn_NFS2_remote_command (int argc, char **argv, FILE *output)
int fn_NFS3_remote_command (int argc, char **argv, FILE *output)
int nfs_remote_solvepath (shell_fh3_t *p_mounted_path_hdl, char *io_global_path, int size_global_path, char *i_spec_path, shell_fh3_t *p_current_hdl, shell_fh3_t *pnew_hdl, FILE *output)
int nfs_remote_getattr (shell_fh3_t *p_hdl, fattr3 *attrs, FILE *output)
int nfs_remote_access (shell_fh3_t *p_hdl, nfs3_uint32 *access_mask, FILE *output)
int nfs_remote_readlink (shell_fh3_t *p_hdl, char *linkcontent, FILE *output)
int nfs_remote_readdirplus (shell_fh3_t *p_dir_hdl, cookie3 cookie, cookieverf3 *p_cookieverf, dirlistplus3 *dirlist, nfs_res_t **to_be_freed, FILE *output)
void nfs_remote_readdirplus_free (nfs_res_t *to_free)
int nfs_remote_readdir (shell_fh3_t *p_dir_hdl, cookie3 cookie, cookieverf3 *p_cookieverf, dirlist3 *dirlist, nfs_res_t **to_be_freed, FILE *output)
void nfs_remote_readdir_free (nfs_res_t *to_free)
int nfs_remote_create (shell_fh3_t *p_dir_hdl, char *obj_name, mode_t posix_mode, shell_fh3_t *p_obj_hdl, FILE *output)
int nfs_remote_mkdir (shell_fh3_t *p_dir_hdl, char *obj_name, mode_t posix_mode, shell_fh3_t *p_obj_hdl, FILE *output)
int nfs_remote_rmdir (shell_fh3_t *p_dir_hdl, char *obj_name, FILE *output)
int nfs_remote_remove (shell_fh3_t *p_dir_hdl, char *obj_name, FILE *output)
int nfs_remote_setattr (shell_fh3_t *p_obj_hdl, sattr3 *p_attributes, FILE *output)
int nfs_remote_rename (shell_fh3_t *p_src_dir_hdl, char *src_name, shell_fh3_t *p_tgt_dir_hdl, char *tgt_name, FILE *output)
int nfs_remote_link (shell_fh3_t *p_file_hdl, shell_fh3_t *p_tgt_dir_hdl, char *tgt_name, FILE *output)
int nfs_remote_symlink (shell_fh3_t path_hdl, char *link_name, char *link_content, sattr3 *p_setattr, shell_fh3_t *p_link_hdl, FILE *output)
int nfs_remote_mount (char *str_path, shell_fh3_t *p_mnt_hdl, FILE *output)
int fn_nfs_remote_mount (int argc, char **argv, FILE *output)
int fn_nfs_remote_umount (int argc, char **argv, FILE *output)
int fn_nfs_remote_pwd (int argc, char **argv, FILE *output)
int fn_nfs_remote_ls (int argc, char **argv, FILE *output)
int fn_nfs_remote_cd (int argc, char **argv, FILE *output)
int fn_nfs_remote_create (int argc, char **argv, FILE *output)
int fn_nfs_remote_mkdir (int argc, char **argv, FILE *output)
int fn_nfs_remote_unlink (int argc, char **argv, FILE *output)
int fn_nfs_remote_setattr (int argc, char **argv, FILE *output)
int fn_nfs_remote_rename (int argc, char **argv, FILE *output)
int fn_nfs_remote_hardlink (int argc, char **argv, FILE *output)
int fn_nfs_remote_ln (int argc, char **argv, FILE *output)
int fn_nfs_remote_stat (int argc, char **argv, FILE *output)
int fn_nfs_remote_su (int argc, char **argv, FILE *output)
int fn_nfs_remote_id (int argc, char **argv, FILE *output)

Variables

nfs_parameter_t nfs_param
struct rpc_createerr rpc_createerr
struct passwd * current_pw

Define Documentation

#define MAX_GRPS   128
#define MAX_GRPS   128
#define MAXIT   10

Definition at line 59 of file commands_NFS_remote.c.

#define MAXRETRY   3

Definition at line 60 of file commands_NFS_remote.c.

#define NFS_READDIR_SIZE   10

Typedef Documentation

typedef struct shell_fh3__ shell_fh3_t

Function Documentation

int fn_MNT1_remote_command ( int  argc,
char **  argv,
FILE *  output 
)

process MNT1 protocol's command.

Definition at line 655 of file commands_NFS_remote.c.

int fn_MNT3_remote_command ( int  argc,
char **  argv,
FILE *  output 
)

process MNT3 protocol's command.

Definition at line 732 of file commands_NFS_remote.c.

int fn_NFS2_remote_command ( int  argc,
char **  argv,
FILE *  output 
)

process NFS2 protocol's command.

Definition at line 809 of file commands_NFS_remote.c.

int fn_NFS3_remote_command ( int  argc,
char **  argv,
FILE *  output 
)

process NFS3 protocol's command.

Definition at line 887 of file commands_NFS_remote.c.

int fn_nfs_remote_cd ( int  argc,
char **  argv,
FILE *  output 
)

change current path

Definition at line 2386 of file commands_NFS_remote.c.

int fn_nfs_remote_create ( int  argc,
char **  argv,
FILE *  output 
)

create a file

Definition at line 2461 of file commands_NFS_remote.c.

int fn_nfs_remote_hardlink ( int  argc,
char **  argv,
FILE *  output 
)

proceed a hardlink command.

Definition at line 3065 of file commands_NFS_remote.c.

int fn_nfs_remote_id ( int  argc,
char **  argv,
FILE *  output 
)

Definition at line 3559 of file commands_NFS_remote.c.

int fn_nfs_remote_ln ( int  argc,
char **  argv,
FILE *  output 
)

proceed an ln command.

Definition at line 3191 of file commands_NFS_remote.c.

int fn_nfs_remote_ls ( int  argc,
char **  argv,
FILE *  output 
)

proceed an ls command using NFS protocol NFS

Definition at line 2073 of file commands_NFS_remote.c.

int fn_nfs_remote_mkdir ( int  argc,
char **  argv,
FILE *  output 
)

create a directory

Definition at line 2577 of file commands_NFS_remote.c.

int fn_nfs_remote_mount ( int  argc,
char **  argv,
FILE *  output 
)

mount a path to browse it.

Definition at line 1936 of file commands_NFS_remote.c.

int fn_nfs_remote_pwd ( int  argc,
char **  argv,
FILE *  output 
)

prints current path

Definition at line 2053 of file commands_NFS_remote.c.

int fn_nfs_remote_rename ( int  argc,
char **  argv,
FILE *  output 
)

proceed a rename command.

Definition at line 2938 of file commands_NFS_remote.c.

int fn_nfs_remote_setattr ( int  argc,
char **  argv,
FILE *  output 
)

setattr

Definition at line 2822 of file commands_NFS_remote.c.

int fn_nfs_remote_stat ( int  argc,
char **  argv,
FILE *  output 
)

proceed an ls command using NFS protocol NFS

Definition at line 3323 of file commands_NFS_remote.c.

int fn_nfs_remote_su ( int  argc,
char **  argv,
FILE *  output 
)

change thread credentials.

Definition at line 3469 of file commands_NFS_remote.c.

int fn_nfs_remote_umount ( int  argc,
char **  argv,
FILE *  output 
)

umount a mounted path

Definition at line 1982 of file commands_NFS_remote.c.

int fn_nfs_remote_unlink ( int  argc,
char **  argv,
FILE *  output 
)

unlink a file

Definition at line 2694 of file commands_NFS_remote.c.

int fn_rpc_init ( int  argc,
char **  argv,
FILE *  output 
)

fn_rpc_init

Definition at line 561 of file commands_NFS_remote.c.

CLIENT* getCLIENT ( char *  name)

getCLIENT

Definition at line 161 of file commands_NFS_remote.c.

char* getHostname ( char *  name)

getHostname

Definition at line 197 of file commands_NFS_remote.c.

int getPort ( char *  name)

getPort

Definition at line 269 of file commands_NFS_remote.c.

char* getProto ( char *  name)

getProto

Definition at line 233 of file commands_NFS_remote.c.

int nfs_remote_access ( shell_fh3_t p_hdl,
nfs3_uint32 access_mask,
FILE *  output 
)

nfs_remote_access

Definition at line 1175 of file commands_NFS_remote.c.

int nfs_remote_create ( shell_fh3_t p_dir_hdl,
char *  obj_name,
mode_t  posix_mode,
shell_fh3_t p_obj_hdl,
FILE *  output 
)

nfs_remote_create

Definition at line 1417 of file commands_NFS_remote.c.

int nfs_remote_getattr ( shell_fh3_t p_hdl,
fattr3 attrs,
FILE *  output 
)

nfs_remote_getattr

Definition at line 1125 of file commands_NFS_remote.c.

void nfs_remote_layer_SetLogLevel ( int  log_lvl)

Definition at line 646 of file commands_NFS_remote.c.

int nfs_remote_link ( shell_fh3_t p_file_hdl,
shell_fh3_t p_tgt_dir_hdl,
char *  tgt_name,
FILE *  output 
)

nfs_remote_link

Definition at line 1760 of file commands_NFS_remote.c.

int nfs_remote_mkdir ( shell_fh3_t p_dir_hdl,
char *  obj_name,
mode_t  posix_mode,
shell_fh3_t p_obj_hdl,
FILE *  output 
)

nfs_remote_mkdir

Definition at line 1492 of file commands_NFS_remote.c.

int nfs_remote_mount ( char *  str_path,
shell_fh3_t p_mnt_hdl,
FILE *  output 
)

nfs_remote_mount

Definition at line 1877 of file commands_NFS_remote.c.

int nfs_remote_readdir ( shell_fh3_t p_dir_hdl,
cookie3  cookie,
cookieverf3 p_cookieverf,
dirlist3 dirlist,
nfs_res_t **  to_be_freed,
FILE *  output 
)

nfs_remote_readdir

Definition at line 1347 of file commands_NFS_remote.c.

void nfs_remote_readdir_free ( nfs_res_t to_free)

nfs_remote_readdir_free

Definition at line 1407 of file commands_NFS_remote.c.

int nfs_remote_readdirplus ( shell_fh3_t p_dir_hdl,
cookie3  cookie,
cookieverf3 p_cookieverf,
dirlistplus3 dirlist,
nfs_res_t **  to_be_freed,
FILE *  output 
)

nfs_remote_readdirplus

Definition at line 1276 of file commands_NFS_remote.c.

void nfs_remote_readdirplus_free ( nfs_res_t to_free)

nfs_remote_readdirplus_free

Definition at line 1337 of file commands_NFS_remote.c.

int nfs_remote_readlink ( shell_fh3_t p_hdl,
char *  linkcontent,
FILE *  output 
)

nfs_remote_readlink

Definition at line 1226 of file commands_NFS_remote.c.

int nfs_remote_remove ( shell_fh3_t p_dir_hdl,
char *  obj_name,
FILE *  output 
)

nfs_remote_remove

Definition at line 1611 of file commands_NFS_remote.c.

int nfs_remote_rename ( shell_fh3_t p_src_dir_hdl,
char *  src_name,
shell_fh3_t p_tgt_dir_hdl,
char *  tgt_name,
FILE *  output 
)

nfs_remote_rename

Definition at line 1708 of file commands_NFS_remote.c.

int nfs_remote_rmdir ( shell_fh3_t p_dir_hdl,
char *  obj_name,
FILE *  output 
)

nfs_remote_rmdir

Definition at line 1564 of file commands_NFS_remote.c.

int nfs_remote_setattr ( shell_fh3_t p_obj_hdl,
sattr3 p_attributes,
FILE *  output 
)

nfs_remote_setattr

Definition at line 1659 of file commands_NFS_remote.c.

int nfs_remote_solvepath ( shell_fh3_t p_mounted_path_hdl,
char *  io_global_path,
int  size_global_path,
char *  i_spec_path,
shell_fh3_t p_current_hdl,
shell_fh3_t pnew_hdl,
FILE *  output 
)

Definition at line 969 of file commands_NFS_remote.c.

int nfs_remote_symlink ( shell_fh3_t  path_hdl,
char *  link_name,
char *  link_content,
sattr3 p_setattr,
shell_fh3_t p_link_hdl,
FILE *  output 
)

nfs_remote_symlink

Definition at line 1809 of file commands_NFS_remote.c.

int rpc_init ( char *  hostname,
char *  name,
char *  proto,
int  port,
FILE *  output 
)

rpc_init

Definition at line 322 of file commands_NFS_remote.c.

int rpc_reinit ( char *  name,
FILE *  output 
)

rpc_reinit

Definition at line 466 of file commands_NFS_remote.c.

int setCLIENT ( char *  name,
CLIENT *  clnt 
)

setCLIENT

Definition at line 178 of file commands_NFS_remote.c.

int setHostname ( char *  name,
char *  hostname 
)

setHostname

Definition at line 214 of file commands_NFS_remote.c.

int setPort ( char *  name,
int  port 
)

setPort

Definition at line 286 of file commands_NFS_remote.c.

int setProto ( char *  name,
char *  proto 
)

setProto

Definition at line 250 of file commands_NFS_remote.c.

int switch_result ( int  result,
int  i,
char *  name,
char *  func_name,
char *  func_called_name,
FILE *  output 
)

Definition at line 523 of file commands_NFS_remote.c.

int try_rpc_reinit ( char *  name,
int  error,
FILE *  output 
)

try_rpc_reinit

Definition at line 503 of file commands_NFS_remote.c.


Variable Documentation

struct passwd* current_pw

Definition at line 305 of file commands_NFS_remote.c.

Definition at line 73 of file commands_NFS_remote.c.

Definition at line 78 of file commands_NFS_remote.c.