Remote Shared Memory Library Functions
rsmmemsegexportpublish(3RSM)
NAME
rsmmemsegexportpublish, rsmmemsegexportunpublish,
rsmmemsegexportrepublish - allow or disallow a memory
segment to be imported by other nodes
SYNOPSIS
cc [ flag... ] file... -lrsm [ library... ]
#include
int rsmmemsegexportpublish(
rsmmemsegexporthandlet memseg,
rsmmemsegidt *segmentid,
rsmapiaccessentryt accesslist[],
uintt accesslistlength);
int rsmmemsegexportunpublish(
rsmmemsegexporthandlet memseg);
int rsmmemsegexportrepublish(
rsmmemsegexporthandlet memseg,
rsmapiaccessentryt accesslist[],
uintt accesslistlength);
DESCRIPTION
The rsmmemsegexportpublish(),
rsmmemsegexportunpublish(), and
rsmmemsegexportrepublish() functions allow or disallow a
memory segment to be imported by other nodes.
The rsmmemsegexportpublish(3RSM) function allows the
export segment specified by the memseg argument to be
imported by other nodes. It also assigns a unique segment
identifier to the segment and defines the access control
list for the segment. The segmentid argument is a pointer
to an identifier which is unique on the publishing node. It
is the responsibility of the application to manage the
assignment of unique segment identifiers. The identifier can
be optionally initialized to 0, in which case the system
will return a unique segment identifier value. The
accesslist argument is composed of pairs of nodeid and
access permissions. For each nodeid specified in the list,
the associated read/write permissions are provided by three
octal digits for owner, group, and other, as for Solaris
file permissions. In the access control each octal digit may
have the following values:
SunOS 5.11 Last change: 8 Jun 2001 1
Remote Shared Memory Library Functions
rsmmemsegexportpublish(3RSM)
2 write access
4 read only access
6 read and write access
An access permissions value of 0624 specifies: (1) an
importer with the same uid as the exporter has read and
write access; (2) an importer with the same gid as the
exporter has write access only; and (3) all other importers
have read access only. When an access control list is pro-
vided, nodes not included in the list will be prevented from
importing the segment. However, if the access list is NUL
(this will require the length accesslistlength to be
specified as 0 as well), then no nodes will be excluded from
importing and the access permissions on all nodes will equal
the owner-group-other file creation permissions of the
exporting process. Corresponding to the accesslist argu-
ment, the accesslistlength argument specifies the number
of entries in the accesslist array.
The rsmmemsegexportunpublish() function disallows the
export segment specified by memseg from being imported. All
the existing import connections are forcibly disconnected.
The rsmmemsegexportrepublish() function changes the
access control list for the exported and published segment.
Although the current import connections remain unaffected by
this call, new connections are constrained by the new
access list.
RETURN VALUES
Upon successful completion, these functions return 0. Other-
wise, an error value is returned to indicate the error.
ERORS
The rsmmemsegexportpublish(),
rsmmemsegexportunpublish(), and
rsmmemsegexportrepublish() functions can return the fol-
lowing errors:
RSMERBADSEGHNDL Invalid segment handle.
SunOS 5.11 Last change: 8 Jun 2001 2
Remote Shared Memory Library Functions
rsmmemsegexportpublish(3RSM)
RSMERNOTCREATOR Not creator of segment.
The rsmmemsegexportpublish() and
rsmmemsegexportrepublish() functions can return the fol-
lowing errors, with the exception that only
rsmmemsegexportpublish() can return the errors related to
the segment identifier:
RSMERSEGIDINUSE
Segment identifier in use.
RSMERESERVEDSEGID
Segment identifier reserved.
RSMERBADSEGID
Invalid segment identifier.
RSMERBADACL
Invalid access control list.
RSMERSEGALREADYPUBLISHED
Segment already published.
RSMERINSUFICIENTMEM
Insufficient memory.
RSMERINSUFICIENTRESOURCES
Insufficient resources.
RSMERLOCKSNOTSUPORTED
Locks not supported.
SunOS 5.11 Last change: 8 Jun 2001 3
Remote Shared Memory Library Functions
rsmmemsegexportpublish(3RSM)
RSMERBADADR
Bad address.
The rsmmemsegexportrepublish() and
rsmmemsegexportunpublish() functions can return the fol-
lowing errors:
RSMERSEGNOTPUBLISHED Segment not published.
RSMERINTERUPTED The operation was interrupted
by a signal.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Evolving
MT-Level MT-Safe
SEE ALSO
rsmmemsegexportcreate(3RSM), attributes(5)
NOTES
An attempt to publish a segment might block until sufficient
resources become available.
SunOS 5.11 Last change: 8 Jun 2001 4
Remote Shared Memory Library Functions
rsmmemsegexportpublish(3RSM)
SunOS 5.11 Last change: 8 Jun 2001 5
|