48 #define NFS_READLINK 5 97 const struct nfs_fh *fh,
const char *filename ) {
116 const struct nfs_fh *fh ) {
156 if ( ! lookup_reply || ! reply )
160 switch ( lookup_reply->
status )
200 if ( ! readlink_reply || ! reply )
204 switch ( readlink_reply->
status )
243 if ( ! read_reply || ! reply )
247 switch ( read_reply->
status )
#define ONCRPC_FIELD(type, value)
#define NFS3ERR_NAMETOOLONG
Filename too long.
#define iob_pull(iobuf, len)
#define EINVAL
Invalid argument.
#define iob_put(iobuf, len)
uint32_t status
Reply status.
uint32_t status
Reply status.
uint32_t count
Bytes read.
int nfs_get_read_reply(struct nfs_read_reply *read_reply, struct oncrpc_reply *reply)
Parse a READ reply.
#define NFS_LOOKUP
NFS LOOKUP procedure.
size_t nfs_iob_add_fh(struct io_buffer *io_buf, const struct nfs_fh *fh)
Add a file handle to the end of an I/O buffer.
int nfs_get_lookup_reply(struct nfs_lookup_reply *lookup_reply, struct oncrpc_reply *reply)
Parse a LOOKUP reply.
#define oncrpc_iob_get_int64(buf)
Get a 64 bits integer from the beginning of an I/O buffer.
struct nfs_fh fh
File handle.
#define NFS_READLINK
NFS READLINK procedure.
#define ENOENT
No such file or directory.
unsigned long long uint64_t
#define EACCES
Permission denied.
uint32_t eof
End-of-File indicator.
int oncrpc_call(struct interface *intf, struct oncrpc_session *session, uint32_t proc_name, const struct oncrpc_field fields[])
#define ENOTSUP
Operation not supported.
int nfs_lookup(struct interface *intf, struct oncrpc_session *session, const struct nfs_fh *fh, const char *filename)
Send a LOOKUP request.
int nfs_read(struct interface *intf, struct oncrpc_session *session, const struct nfs_fh *fh, uint64_t offset, uint32_t count)
Send a READ request.
enum nfs_attr_type ent_type
Entity type.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
#define oncrpc_iob_get_int(buf)
Get a 32 bits integer from the beginning of an I/O buffer.
uint32_t array
Array number.
#define NFS3ERR_SERVERFAULT
An error occurred on the server which does not map to any of the legal NFS version 3 protocol error v...
#define NFS3ERR_PERM
Not owner.
#define ENOTDIR
Not a directory.
uint16_t count
Number of entries.
static size_t oncrpc_iob_add_int(struct io_buffer *io_buf, uint32_t val)
Add a 32 bits integer to the end of an I/O buffer.
#define EPROTO
Protocol error.
#define NFS3ERR_NXIO
No such device or address.
uint32_t data_len
Data length.
#define ONCRPC_SUBFIELD(type, args...)
Data transfer interface opening.
size_t nfs_iob_get_fh(struct io_buffer *io_buf, struct nfs_fh *fh)
Extract a file handle from the beginning of an I/O buffer.
#define NFS3ERR_IO
I/O error.
#define NFS3ERR_NOTSUPP
Operation not supported.
uint32_t status
Reply status.
#define EPERM
Operation not permitted.
#define ENXIO
No such device or address.
#define NFS3ERR_NOENT
No such file or directory.
int nfs_readlink(struct interface *intf, struct oncrpc_session *session, const struct nfs_fh *fh)
Send a READLINK request.
Network File System protocol.
void * data
Start of data.
#define EIO
Input/output error.
#define NFS3ERR_BADHANDLE
Illegal NFS file handle.
#define ENAMETOOLONG
Filename too long.
#define NFS3ERR_STALE
Invalid file handle.
uint16_t offset
Offset to command line.
#define NFS_READ
NFS READ procedure.
#define NFS3ERR_INVAL
Invalid argument.
int nfs_get_readlink_reply(struct nfs_readlink_reply *readlink_reply, struct oncrpc_reply *reply)
Parse a READLINK reply.
#define ESTALE
Stale file handle.
#define NFS3ERR_ACCES
Permission denied.
uint64_t filesize
File size.
#define NFS3ERR_NOTDIR
Not a directory.
uint32_t path_len
File path length.