Previous section.

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


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



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:

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:

The data associated with the symbolic link.


The post-operation attributes for the symbolic link.

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


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

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

Invalid argument or unsupported argument for an operation.

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.

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.


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


The operation is not supported.


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