Previous section.

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

Name

NFSPROC3_SYMLINK - Create a Symbolic Link

Call Arguments

struct symlinkdata3 { sattr3 symlink_attributes; nfspath3 symlink_data; };

struct SYMLINK3args { diropargs3 where; symlinkdata3 symlink; };

Return Arguments

struct SYMLINK3resok { post_op_fh3 obj; post_op_attr obj_attributes; wcc_data dir_wcc; };

struct SYMLINK3resfail { wcc_data dir_wcc; };

union SYMLINK3res switch (nfsstat3 status) { case NFS3_OK: SYMLINK3resok resok; default: SYMLINK3resfail resfail; };

RPC Procedure Description

SYMLINK3res NFSPROC3_SYMLINK(SYMLINK3args) = 10;

Description

Procedure SYMLINK creates a new symbolic link.

On entry, the arguments in SYMLINK3args are:

where
The location of the symbolic link to be created:

dir
The file handle for the directory in which the symbolic link is to be created.

name
The name that is to be associated with the created symbolic link. See General File Name Requirements for more information on file names.

symlink
The symbolic link to create.

symlink_attributes

The initial attributes for the symbolic link.

symlink_data
The string containing the symbolic link data.

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

obj
The file handle for the newly created symbolic link.

obj_attributes
The attributes for the newly created symbolic link.

dir_wcc
Weak cache consistency data for the directory where.dir. For a client that requires only the post-.IR SYMLINK directory attributes, these can be found in dir_wcc.after.

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

dir_wcc
Weak cache consistency data for the directory where.dir. For a client that requires only the post-.IR SYMLINK directory attributes, these can be found in dir_wcc.after. Even though the SYMLINK failed, full wcc_data is returned to allow the client to determine whether the failing SYMLINK changed the directory.

Implementation Guidance

See General File Name Requirements for more information on file names.

For symbolic links, the actual file system node and its contents are expected to be created in a single atomic operation. That is, once the symbolic link is visible, there must not be a window where a READLINK would fail or return incorrect data.

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_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_EXIST
File exists. The file specified already exists.

NFS3ERR_NOTDIR
Not a directory. The caller specified a non-directory in a directory operation.

NFS3ERR_NOSPC
No space left on device. The operation would have caused the server's file system to exceed its limit.

NFS3ERR_ROFS
Read-only file system. A modifying operation was attempted on a read-only file system.

NFS3ERR_NAMETOOLONG

The filename in an operation was too long.

NFS3ERR_DQUOT
Resource (quota) hard limit exceeded. The user's resource limit on the server has been exceeded.

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