libstoragemgmt_nfsexport.h File Reference

#include "libstoragemgmt_types.h"
Include dependency graph for libstoragemgmt_nfsexport.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define ANON_UID_GID_NA   -1
#define ANON_UID_GID_ERROR   (ANON_UID_GID_NA - 1)

Functions

lsm_nfs_export LSM_DLL_EXPORT * lsm_nfs_export_record_alloc (const char *id, const char *fs_id, const char *export_path, const char *auth, lsm_string_list *root, lsm_string_list *rw, lsm_string_list *ro, uint64_t anonuid, uint64_t anongid, const char *options, const char *plugin_data)
lsm_nfs_export LSM_DLL_EXPORT ** lsm_nfs_export_record_array_alloc (uint32_t size)
int LSM_DLL_EXPORT lsm_nfs_export_record_free (lsm_nfs_export *exp)
int LSM_DLL_EXPORT lsm_nfs_export_record_array_free (lsm_nfs_export *exps[], uint32_t size)
lsm_nfs_export LSM_DLL_EXPORT * lsm_nfs_export_record_copy (lsm_nfs_export *source)
const char LSM_DLL_EXPORT * lsm_nfs_export_id_get (lsm_nfs_export *exp)
int LSM_DLL_EXPORT lsm_nfs_export_id_set (lsm_nfs_export *exp, const char *ep)
const char LSM_DLL_EXPORT * lsm_nfs_export_fs_id_get (lsm_nfs_export *exp)
int LSM_DLL_EXPORT lsm_nfs_export_fs_id_set (lsm_nfs_export *exp, const char *fs_id)
const char LSM_DLL_EXPORT * lsm_nfs_export_export_path_get (lsm_nfs_export *exp)
int LSM_DLL_EXPORT lsm_nfs_export_export_path_set (lsm_nfs_export *exp, const char *export_path)
const char LSM_DLL_EXPORT * lsm_nfs_export_auth_type_get (lsm_nfs_export *exp)
int LSM_DLL_EXPORT lsm_nfs_export_auth_type_set (lsm_nfs_export *exp, const char *value)
lsm_string_list LSM_DLL_EXPORT * lsm_nfs_export_root_get (lsm_nfs_export *exp)
int LSM_DLL_EXPORT lsm_nfs_export_root_set (lsm_nfs_export *exp, lsm_string_list *value)
lsm_string_list LSM_DLL_EXPORT * lsm_nfs_export_read_write_get (lsm_nfs_export *exp)
int LSM_DLL_EXPORT lsm_nfs_export_read_write_set (lsm_nfs_export *exp, lsm_string_list *value)
lsm_string_list LSM_DLL_EXPORT * lsm_nfs_export_read_only_get (lsm_nfs_export *exp)
int LSM_DLL_EXPORT lsm_nfs_export_read_only_set (lsm_nfs_export *exp, lsm_string_list *value)
uint64_t LSM_DLL_EXPORT lsm_nfs_export_anon_uid_get (lsm_nfs_export *exp)
int LSM_DLL_EXPORT lsm_nfs_export_anon_uid_set (lsm_nfs_export *exp, uint64_t value)
uint64_t LSM_DLL_EXPORT lsm_nfs_export_anon_gid_get (lsm_nfs_export *exp)
int LSM_DLL_EXPORT lsm_nfs_export_anon_gid_set (lsm_nfs_export *exp, uint64_t value)
const char LSM_DLL_EXPORT * lsm_nfs_export_options_get (lsm_nfs_export *exp)
int LSM_DLL_EXPORT lsm_nfs_export_options_set (lsm_nfs_export *exp, const char *value)

Define Documentation

#define ANON_UID_GID_ERROR   (ANON_UID_GID_NA - 1)

Definition at line 34 of file libstoragemgmt_nfsexport.h.

#define ANON_UID_GID_NA   -1

Because the nfs export functions use an unsigned data type these values will be represented as (2**64-1 and 2**64-2 respectively)

Definition at line 33 of file libstoragemgmt_nfsexport.h.


Function Documentation

uint64_t LSM_DLL_EXPORT lsm_nfs_export_anon_gid_get ( lsm_nfs_export exp  ) 

Returns the group id which is to be mapped to anonymous group

Parameters:
exp Valid nfs export record
Returns:
ANON_UID_GID_NA value is returned when this isn't set, else value mapped to anonymous group id. For errors ANON_UID_GID_ERROR is returned.
int LSM_DLL_EXPORT lsm_nfs_export_anon_gid_set ( lsm_nfs_export exp,
uint64_t  value 
)
uint64_t LSM_DLL_EXPORT lsm_nfs_export_anon_uid_get ( lsm_nfs_export exp  ) 

Returns the id which is to be mapped to anonymous id

Parameters:
exp Valid nfs export record
Returns:
ANON_UID_GID_NA value is returned when this isn't set, else value mapped to anonymous group id. For errors ANON_UID_GID_ERROR is returned.
int LSM_DLL_EXPORT lsm_nfs_export_anon_uid_set ( lsm_nfs_export exp,
uint64_t  value 
)
const char LSM_DLL_EXPORT* lsm_nfs_export_auth_type_get ( lsm_nfs_export exp  ) 

Returns the client authentication type

Parameters:
exp Valid nfs export record
Returns:
Pointer to authentication type
int LSM_DLL_EXPORT lsm_nfs_export_auth_type_set ( lsm_nfs_export exp,
const char *  value 
)
const char LSM_DLL_EXPORT* lsm_nfs_export_export_path_get ( lsm_nfs_export exp  ) 

Returns the export path

Parameters:
exp Valid nfs export record
Returns:
Pointer to export path
int LSM_DLL_EXPORT lsm_nfs_export_export_path_set ( lsm_nfs_export exp,
const char *  export_path 
)
const char LSM_DLL_EXPORT* lsm_nfs_export_fs_id_get ( lsm_nfs_export exp  ) 

Returns the file system id

Parameters:
exp Valid nfs export record
Returns:
Pointer to file system id
int LSM_DLL_EXPORT lsm_nfs_export_fs_id_set ( lsm_nfs_export exp,
const char *  fs_id 
)
const char LSM_DLL_EXPORT* lsm_nfs_export_id_get ( lsm_nfs_export exp  ) 

Returns the ID

Parameters:
exp Valid nfs export record
Returns:
Pointer to ID
int LSM_DLL_EXPORT lsm_nfs_export_id_set ( lsm_nfs_export exp,
const char *  ep 
)
const char LSM_DLL_EXPORT* lsm_nfs_export_options_get ( lsm_nfs_export exp  ) 

Returns the options for this export.

Parameters:
exp Valid nfs export record
Returns:
Options value, NULL if not applicable.
int LSM_DLL_EXPORT lsm_nfs_export_options_set ( lsm_nfs_export exp,
const char *  value 
)
lsm_string_list LSM_DLL_EXPORT* lsm_nfs_export_read_only_get ( lsm_nfs_export exp  ) 

Returns the list of hosts that have read only access to export.

Parameters:
exp Valid nfs export record
Returns:
list of hosts
int LSM_DLL_EXPORT lsm_nfs_export_read_only_set ( lsm_nfs_export exp,
lsm_string_list value 
)
lsm_string_list LSM_DLL_EXPORT* lsm_nfs_export_read_write_get ( lsm_nfs_export exp  ) 

Returns the list of hosts that have read/write access to export.

Parameters:
exp Valid nfs export record
Returns:
list of hosts.
int LSM_DLL_EXPORT lsm_nfs_export_read_write_set ( lsm_nfs_export exp,
lsm_string_list value 
)
lsm_nfs_export LSM_DLL_EXPORT* lsm_nfs_export_record_alloc ( const char *  id,
const char *  fs_id,
const char *  export_path,
const char *  auth,
lsm_string_list root,
lsm_string_list rw,
lsm_string_list ro,
uint64_t  anonuid,
uint64_t  anongid,
const char *  options,
const char *  plugin_data 
)

Allocated memory for a NFS export record

Parameters:
id Export ID (Set to NULL when creating new export)
fs_id File system ID that is exported
export_path The desired path for the export (May be NULL)
auth NFS client authentication type (May be NULL)
root List of hosts that have root access (May be NULL)
rw List of hosts that have read/write access (May be NULL)
ro List of hosts that have read only access (May be NULL)
anonuid User id that should be mapped to anonymous (Valid or set to ANON_UID_GID_NA).
anongid Group id that should be mapped to anonymous (Valid or set to ANON_UID_GID_NA)
options String of options passed to array
plugin_data Reserved for plug-in use
Returns:
Valid export pointer, else NULL on error.

Here is the caller graph for this function:

lsm_nfs_export LSM_DLL_EXPORT** lsm_nfs_export_record_array_alloc ( uint32_t  size  ) 

Allocated the memory for an array of NFS export records.

Parameters:
size Number of elements
Returns:
Allocated memory, NULL on error

Here is the caller graph for this function:

int LSM_DLL_EXPORT lsm_nfs_export_record_array_free ( lsm_nfs_export exps[],
uint32_t  size 
)

Frees the memory for the NFS export array and the memory for each entry

Parameters:
exps Memory to free
size Number of entries
Returns:
LSM_ERR_OK on success, else error reason.

Here is the caller graph for this function:

lsm_nfs_export LSM_DLL_EXPORT* lsm_nfs_export_record_copy ( lsm_nfs_export source  ) 

Duplicates the source and returns the copy.

Parameters:
source Source record to copy
Returns:
Copy of source, else NULL one error.

Here is the caller graph for this function:

int LSM_DLL_EXPORT lsm_nfs_export_record_free ( lsm_nfs_export exp  ) 

Frees the memory for a NFS export record.

Parameters:
exp 
Returns:
LSM_ERR_OK on success, else error reason.

Here is the caller graph for this function:

lsm_string_list LSM_DLL_EXPORT* lsm_nfs_export_root_get ( lsm_nfs_export exp  ) 

Returns the list of hosts that have root access

Parameters:
exp Valid nfs export record
Returns:
list of hosts.
int LSM_DLL_EXPORT lsm_nfs_export_root_set ( lsm_nfs_export exp,
lsm_string_list value 
)

Generated on 9 Jul 2015 for libStorageMgmt by  doxygen 1.6.1