Previous section.

Protocols for Interworking: XNFS, Version 3W
Copyright © 1998 The Open Group

Name

NFSPROC3_READLINK - Read From Symbolic Link

Call Arguments

struct READLINK3args { nfs_fh3 symlink; };

Return Arguments

struct READLINK3resok { post_op_attr symlink_attributes; nfspath3 data; };

struct READLINK3resfail { post_op_attr symlink_attributes; };

union READLINK3res switch (nfsstat3 status) { case NFS3_OK: READLINK3resok resok; default: READLINK3resfail resfail; };

RPC Procedure Description

READLINK3res NFSPROC3_READLINK(READLINK3args) = 5;

Description

Procedure READLINK reads the data associated with a symbolic link. The data is a string that is opaque to the server. That is, whether created by the NFS Version 3 protocol software from a client or created locally on the server, the data in a symbolic link is not interpreted when created, but is simply stored.

On entry, the arguments in READLINK3args are:

symlink
The file handle for a symbolic link (file system object of type NF3LNK).

Upon successful return, READLINK3res.status is NFS3_OK and READLINK3res.resok contains:

data
The data associated with the symbolic link.

symlink_attributes

The post-operation attributes for the symbolic link.

Otherwise, READLINK3res.status contains the error on failure and READLINK3res.resfail contains the following:

symlink_attributes

The post-operation attributes for the symbolic link.

Implementation Guidance

A symbolic link is nominally a pointer to another file. The data is not necessarily interpreted by the server, just stored in the file. It is possible for a client implementation to store a pathname that is not meaningful to the server operating system in a symbolic link. A READLINK operation returns the data to the client for interpretation. If different implementations want to share access to symbolic links, then they must agree on the interpretation of the data in the symbolic link.

The READLINK operation is only allowed on objects of type NF3LNK. The server should return the NFS3ERR_INVAL error if the object is not of type NF3LNK.

Return Codes

NFS3ERR_IO
I/O error. Some sort of hard error occurred when the operation was in progress. This could be a disk error, for example.

NFS3ERR_INVAL
Invalid argument or unsupported argument for an operation.

NFS3ERR_ACCES
Permission denied. The caller does not have the correct permission to perform the requested operation. Contrast this with NFS3ERR_PERM, which restricts itself to owner permission failures.

NFS3ERR_STALE
Invalid file handle. The file handle given in the arguments was invalid. The file referred to by that file handle no longer exists or access to it has been revoked.

NFS3ERR_BADHANDLE

Invalid NFS file handle. The file handle failed internal consistency checks.

NFS3ERR_NOTSUPP

The operation is not supported.

NFS3ERR_SERVERFAULT

An error occurred on the server, which does not map to any of the valid NFS Version 3 protocol error values. The client should translate this into an appropriate error. Clients based on an XPG system may choose to translate this to EIO.


Why not acquire a nicely bound hard copy?
Click here to return to the publication details or order a copy of this publication.

Contents Next section Index