Previous section.

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


NLM_SHARE - Share a File

Call Arguments

struct nlm_shareargs { netobj cookie; nlm_share share; bool reclaim; };

Return Arguments

struct nlm_shareres { netobj cookie; nlm_stats stat; int sequence; };

RPC Procedure Description

nlm_shareres NLM_SHARE(nlm_shareargs ) = 20;


This procedure indicates that a client wishes to open a file using the DOS 3.1 and above file-sharing modes.

The file to be opened is "share.fh" for access "share.access" in sharing mode "share.mode". The server will examine any entry sharing reservations for this file to determine whether the share is permitted, that is, it does not conflict with the existing use of the file. If the share can be granted, a sharing reservation is established. If a conflict does exist, the request is rejected immediately. This procedure does not block; it is the responsibility of the client to retry any rejected requests.

If "reclaim" is true, then the server will assume this is a request to re-establish a previous share (for example, after the server has crashed and rebooted). During the grace period the server will only accept shares with "reclaim" set to true.

Once a sharing reservation has been established, the lock manager will make no attempt to verify that the reservation is still valid; if the client host crashes and restarts while the reservation is still in effect, the client must call the NLM_FREE_ALL procedure to release all sharing reservations.

Return Codes

When the procedure returns, "stat" will be set to one of the following values:

Indicates that the procedure completed successfully.

Indicates that the procedure failed because the request conflicted with existing sharing reservations for the file.


Indicates that the procedure failed because the server NLM could not allocate the resources needed to process the request.


Indicates that the procedure failed because the server host has recently been rebooted and the server NLM is re-establishing existing locks, and is not yet ready to accept normal service requests.

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