Barrelfish
|
NFS client definitions. More...
Macros | |
#define | NFS_READDIR_COOKIE 0 |
initial cookie for readdir | |
#define | NFS_READDIR_COOKIEVERF NULL |
initial cookie verifier for readder | |
Typedefs | |
typedef void(* | nfs_mount_callback_t) (void *arg, struct nfs_client *client, enum mountstat3 mountstat, struct nfs_fh3 fhandle) |
Callback function for mount operation. More... | |
typedef void(* | nfs_getattr_callback_t) (void *arg, struct nfs_client *client, GETATTR3res *result) |
Callback function for getattr operation. More... | |
typedef void(* | nfs_setattr_callback_t) (void *arg, struct nfs_client *client, SETATTR3res *result) |
Callback function for setattr operation. More... | |
typedef void(* | nfs_readdir_callback_t) (void *arg, struct nfs_client *client, READDIR3res *result) |
Callback function for readdir operation. More... | |
typedef void(* | nfs_readdirplus_callback_t) (void *arg, struct nfs_client *client, READDIRPLUS3res *result) |
Callback function for readdirplus operation. More... | |
typedef void(* | nfs_lookup_callback_t) (void *arg, struct nfs_client *client, LOOKUP3res *result) |
Callback function for lookup operation. More... | |
typedef void(* | nfs_access_callback_t) (void *arg, struct nfs_client *client, ACCESS3res *result) |
Callback function for access operation. More... | |
typedef void(* | nfs_read_callback_t) (void *arg, struct nfs_client *client, READ3res *result) |
Callback function for read operation. More... | |
typedef void(* | nfs_write_callback_t) (void *arg, struct nfs_client *client, WRITE3res *result) |
Callback function for write operation. More... | |
typedef void(* | nfs_create_callback_t) (void *arg, struct nfs_client *client, CREATE3res *result) |
Callback function for create operation. More... | |
typedef void(* | nfs_mkdir_callback_t) (void *arg, struct nfs_client *client, MKDIR3res *result) |
Callback function for mkdir operation. More... | |
typedef void(* | nfs_remove_callback_t) (void *arg, struct nfs_client *client, REMOVE3res *result) |
Callback function for remove operation. More... | |
Functions | |
struct nfs_client * | nfs_mount (struct ip_addr server, const char *path, nfs_mount_callback_t callback, void *cbarg) |
Initiate an NFS mount operation. More... | |
err_t | nfs_getattr (struct nfs_client *client, struct nfs_fh3 fh, nfs_getattr_callback_t callback, void *cbarg) |
Initiate an NFS getattr operation. More... | |
err_t | nfs_setattr (struct nfs_client *client, struct nfs_fh3 fh, sattr3 new_attributes, bool guarded, nfs_setattr_callback_t callback, void *cbarg) |
Initiate an NFS setattr operation. More... | |
err_t | nfs_readdir (struct nfs_client *client, struct nfs_fh3 fh, cookie3 cookie, cookieverf3 cookieverf, nfs_readdir_callback_t callback, void *cbarg) |
Initiate an NFS readdir operation. More... | |
err_t | nfs_readdirplus (struct nfs_client *client, struct nfs_fh3 fh, cookie3 cookie, cookieverf3 cookieverf, nfs_readdirplus_callback_t callback, void *cbarg) |
Initiate an NFS readdirplus operation. More... | |
err_t | nfs_lookup (struct nfs_client *client, struct nfs_fh3 dirfh, const char *name, nfs_lookup_callback_t callback, void *cbarg) |
Initiate an NFS lookup operation. More... | |
err_t | nfs_access (struct nfs_client *client, struct nfs_fh3 fh, uint32_t access, nfs_access_callback_t callback, void *cbarg) |
Initiate an NFS access operation. More... | |
err_t | nfs_read (struct nfs_client *client, struct nfs_fh3 fh, offset3 offset, count3 count, nfs_read_callback_t callback, void *cbarg) |
Initiate an NFS read operation. More... | |
err_t | nfs_write (struct nfs_client *client, struct nfs_fh3 fh, offset3 offset, const void *data, count3 count, stable_how stable, nfs_write_callback_t callback, void *cbarg) |
Initiate an NFS write operation. More... | |
err_t | nfs_create (struct nfs_client *client, struct nfs_fh3 dir, const char *name, bool guarded, sattr3 attributes, nfs_create_callback_t callback, void *cbarg) |
Initiate an NFS create operation (unchecked or guarded) More... | |
err_t | nfs_mkdir (struct nfs_client *client, struct nfs_fh3 dir, const char *name, sattr3 attributes, nfs_mkdir_callback_t callback, void *cbarg) |
Initiate an NFS mkdir operation. More... | |
err_t | nfs_remove (struct nfs_client *client, struct nfs_fh3 dir, const char *name, nfs_remove_callback_t callback, void *cbarg) |
Initiate an NFS remove operation. More... | |
void | nfs_destroy (struct nfs_client *client) |
Reclaim memory and terminate any outstanding operations. | |
NFS client definitions.
typedef void(* nfs_access_callback_t) (void *arg, struct nfs_client *client, ACCESS3res *result) |
Callback function for access operation.
arg | Opaque argument pointer, as provided to nfs_access() |
client | NFS client instance |
result | Result pointer, or NULL on error |
The memory referred to by #result, if any, is now the property of the callee, and must be freed by the appropriate XDR free operations.
typedef void(* nfs_create_callback_t) (void *arg, struct nfs_client *client, CREATE3res *result) |
Callback function for create operation.
arg | Opaque argument pointer, as provided to nfs_create() |
client | NFS client instance |
result | Result pointer, or NULL on error |
The memory referred to by #result, if any, is now the property of the callee, and must be freed by the appropriate XDR free operations.
typedef void(* nfs_getattr_callback_t) (void *arg, struct nfs_client *client, GETATTR3res *result) |
Callback function for getattr operation.
arg | Opaque argument pointer, as provided to nfs_getattr() |
client | NFS client instance |
result | Result pointer, or NULL on error |
The memory referred to by #result, if any, is now the property of the callee, and must be freed by the appropriate XDR free operations.
typedef void(* nfs_lookup_callback_t) (void *arg, struct nfs_client *client, LOOKUP3res *result) |
Callback function for lookup operation.
arg | Opaque argument pointer, as provided to nfs_lookup() |
client | NFS client instance |
result | Result pointer, or NULL on error |
The memory referred to by #result, if any, is now the property of the callee, and must be freed by the appropriate XDR free operations.
typedef void(* nfs_mkdir_callback_t) (void *arg, struct nfs_client *client, MKDIR3res *result) |
Callback function for mkdir operation.
arg | Opaque argument pointer, as provided to nfs_mkdir() |
client | NFS client instance |
result | Result pointer, or NULL on error |
The memory referred to by #result, if any, is now the property of the callee, and must be freed by the appropriate XDR free operations.
typedef void(* nfs_mount_callback_t) (void *arg, struct nfs_client *client, enum mountstat3 mountstat, struct nfs_fh3 fhandle) |
Callback function for mount operation.
arg | Opaque argument pointer, as provided to nfs_mount() |
client | NFS client instance |
mountstat | Mount status (MNT3_OK on success) |
fhandle | File handle for mount point (only valid if mountstat==MNT3_OK) |
The memory referred to by #fhandle, if any, is now the property of the callee, and must be freed by the appropriate XDR free operations.
typedef void(* nfs_read_callback_t) (void *arg, struct nfs_client *client, READ3res *result) |
Callback function for read operation.
arg | Opaque argument pointer, as provided to nfs_read() |
client | NFS client instance |
result | Result pointer, or NULL on error |
The memory referred to by #result, if any, is now the property of the callee, and must be freed by the appropriate XDR free operations.
typedef void(* nfs_readdir_callback_t) (void *arg, struct nfs_client *client, READDIR3res *result) |
Callback function for readdir operation.
arg | Opaque argument pointer, as provided to nfs_readdir() |
client | NFS client instance |
result | Result pointer, or NULL on error |
The memory referred to by #result, if any, is now the property of the callee, and must be freed by the appropriate XDR free operations.
typedef void(* nfs_readdirplus_callback_t) (void *arg, struct nfs_client *client, READDIRPLUS3res *result) |
Callback function for readdirplus operation.
arg | Opaque argument pointer, as provided to nfs_readdirplus() |
client | NFS client instance |
result | Result pointer, or NULL on error |
The memory referred to by #result, if any, is now the property of the callee, and must be freed by the appropriate XDR free operations.
typedef void(* nfs_remove_callback_t) (void *arg, struct nfs_client *client, REMOVE3res *result) |
Callback function for remove operation.
arg | Opaque argument pointer, as provided to nfs_remove() |
client | NFS client instance |
result | Result pointer, or NULL on error |
The memory referred to by #result, if any, is now the property of the callee, and must be freed by the appropriate XDR free operations.
typedef void(* nfs_setattr_callback_t) (void *arg, struct nfs_client *client, SETATTR3res *result) |
Callback function for setattr operation.
arg | Opaque argument pointer, as provided to nfs_setattr() |
client | NFS client instance |
result | Result pointer, or NULL on error |
The memory referred to by #result, if any, is now the property of the callee, and must be freed by the appropriate XDR free operations.
typedef void(* nfs_write_callback_t) (void *arg, struct nfs_client *client, WRITE3res *result) |
Callback function for write operation.
arg | Opaque argument pointer, as provided to nfs_write() |
client | NFS client instance |
result | Result pointer, or NULL on error |
The memory referred to by #result, if any, is now the property of the callee, and must be freed by the appropriate XDR free operations.
err_t nfs_access | ( | struct nfs_client * | client, |
struct nfs_fh3 | fh, | ||
uint32_t | access, | ||
nfs_access_callback_t | callback, | ||
void * | cbarg | ||
) |
Initiate an NFS access operation.
client | NFS client pointer, which has completed the mount process |
fh | Filehandle for file/object to check access to |
access | Rights to check for |
callback | Callback function to call when operation returns |
cbarg | Opaque argument word passed to callback function |
err_t nfs_create | ( | struct nfs_client * | client, |
struct nfs_fh3 | dir, | ||
const char * | name, | ||
bool | guarded, | ||
sattr3 | attributes, | ||
nfs_create_callback_t | callback, | ||
void * | cbarg | ||
) |
Initiate an NFS create operation (unchecked or guarded)
client | NFS client pointer, which has completed the mount process |
dir | Filehandle for directory in which to create file |
name | Name of file to create |
guarded | True iff the operation should fail if the file already exists |
attributes | Initial attributes for the file |
callback | Callback function to call when operation returns |
cbarg | Opaque argument word passed to callback function |
err_t nfs_getattr | ( | struct nfs_client * | client, |
struct nfs_fh3 | fh, | ||
nfs_getattr_callback_t | callback, | ||
void * | cbarg | ||
) |
Initiate an NFS getattr operation.
client | NFS client pointer, which has completed the mount process |
fh | Filehandle for directory to stat |
callback | Callback function to call when operation returns |
cbarg | Opaque argument word passed to callback function |
err_t nfs_lookup | ( | struct nfs_client * | client, |
struct nfs_fh3 | dirfh, | ||
const char * | name, | ||
nfs_lookup_callback_t | callback, | ||
void * | cbarg | ||
) |
Initiate an NFS lookup operation.
client | NFS client pointer, which has completed the mount process |
dirfh | Filehandle for directory to lookup |
name | Name to lookup |
callback | Callback function to call when operation returns |
cbarg | Opaque argument word passed to callback function |
err_t nfs_mkdir | ( | struct nfs_client * | client, |
struct nfs_fh3 | dir, | ||
const char * | name, | ||
sattr3 | attributes, | ||
nfs_mkdir_callback_t | callback, | ||
void * | cbarg | ||
) |
Initiate an NFS mkdir operation.
client | NFS client pointer, which has completed the mount process |
dir | Filehandle for directory in which to create directory |
name | Name of directory to create |
attributes | Initial attributes for the directory |
callback | Callback function to call when operation returns |
cbarg | Opaque argument word passed to callback function |
struct nfs_client* nfs_mount | ( | struct ip_addr | server, |
const char * | path, | ||
nfs_mount_callback_t | callback, | ||
void * | cbarg | ||
) |
Initiate an NFS mount operation.
server | IP address of NFSv3 server |
path | Path on server to mount |
callback | Callback function to call when mount completes or fails |
cbarg | Opaque argument word passed to callback function |
err_t nfs_read | ( | struct nfs_client * | client, |
struct nfs_fh3 | fh, | ||
offset3 | offset, | ||
count3 | count, | ||
nfs_read_callback_t | callback, | ||
void * | cbarg | ||
) |
Initiate an NFS read operation.
client | NFS client pointer, which has completed the mount process |
fh | Filehandle for file to read |
offset | Offset from start of file to read from |
count | Maximum number of bytes to read |
callback | Callback function to call when operation returns |
cbarg | Opaque argument word passed to callback function |
err_t nfs_readdir | ( | struct nfs_client * | client, |
struct nfs_fh3 | fh, | ||
cookie3 | cookie, | ||
cookieverf3 | cookieverf, | ||
nfs_readdir_callback_t | callback, | ||
void * | cbarg | ||
) |
Initiate an NFS readdir operation.
client | NFS client pointer, which has completed the mount process |
fh | Filehandle for directory to read |
cookie | Cookie from a previous call, or NFS_READDIR_COOKIE for a new call |
cookieverf | Cookie verifier from a previous call, or NFS_READDIR_COOKIEVERF |
callback | Callback function to call when operation returns |
cbarg | Opaque argument word passed to callback function |
err_t nfs_readdirplus | ( | struct nfs_client * | client, |
struct nfs_fh3 | fh, | ||
cookie3 | cookie, | ||
cookieverf3 | cookieverf, | ||
nfs_readdirplus_callback_t | callback, | ||
void * | cbarg | ||
) |
Initiate an NFS readdirplus operation.
client | NFS client pointer, which has completed the mount process |
fh | Filehandle for directory to read |
cookie | Cookie from a previous call, or NFS_READDIR_COOKIE for a new call |
cookieverf | Cookie verifier from a previous call, or NFS_READDIR_COOKIEVERF |
callback | Callback function to call when operation returns |
cbarg | Opaque argument word passed to callback function |
err_t nfs_remove | ( | struct nfs_client * | client, |
struct nfs_fh3 | dir, | ||
const char * | name, | ||
nfs_remove_callback_t | callback, | ||
void * | cbarg | ||
) |
Initiate an NFS remove operation.
client | NFS client pointer, which has completed the mount process |
dir | Filehandle for directory in which to remove file |
name | Name of file to remove |
callback | Callback function to call when operation returns |
cbarg | Opaque argument word passed to callback function |
err_t nfs_setattr | ( | struct nfs_client * | client, |
struct nfs_fh3 | fh, | ||
sattr3 | new_attributes, | ||
bool | guarded, | ||
nfs_setattr_callback_t | callback, | ||
void * | cbarg | ||
) |
Initiate an NFS setattr operation.
client | NFS client pointer, which has completed the mount process |
fh | Filehandle for directory which attributes are to be modified |
new | New attributes for directory |
guarded | TODO |
ctime | TODO |
callback | Callback function to call when operation returns |
cbarg | Opaque argument word passed to callback function |
err_t nfs_write | ( | struct nfs_client * | client, |
struct nfs_fh3 | fh, | ||
offset3 | offset, | ||
const void * | data, | ||
count3 | count, | ||
stable_how | stable, | ||
nfs_write_callback_t | callback, | ||
void * | cbarg | ||
) |
Initiate an NFS write operation.
client | NFS client pointer, which has completed the mount process |
fh | Filehandle for file to write |
offset | Offset from start of file to write from |
data | Pointer to data to write |
count | Number of bytes of data to write |
stable | Specifies when the server may commit data to stable storage |
callback | Callback function to call when operation returns |
cbarg | Opaque argument word passed to callback function |