Remote Shared Memory Library Functions
rsmgetsegmentidrange(3RSM)
NAME
rsmgetsegmentidrange - get segment ID range
SYNOPSIS
cc [ flag... ] file... -lrsm [ library... ]
#include
int rsmgetsegmentidrange(const char *appid,
rsmmemsegidt *baseid, uint32t *length);
DESCRIPTION
RSM segment IDs can be either specified by the application
or generated by the system using the
rsmmemsegexportpublish(3RSM) function. Applications that
specify segment IDs require a reserved range of segment IDs
that they can use. This can be achieved by using
rsmgetsegmentidrange() and by reserving a range of seg-
ment IDs in the segment ID configuration file,
/etc/rsm/rsm.segmentid. The rsmgetsegmentidrange() func-
tion can be used by applications to obtain the segment ID
range reserved for them. The appid argument is a null-
terminated string that identifies the application. The
baseid argument points to the location where the starting
segment ID of the reserved range is returned. The length
argument points to the location where the number of reserved
segment IDs is returned.
The application can use any value starting at baseid and
less than baseid]length. The application should use an
offset within the range of reserved segment IDs to obtain a
segment ID such that if the baseid or length is modified, it
will still be within its reserved range.
It is the responsibility of the system administrator to make
sure that the segment ID ranges are properly administered
(such that they are non-overlapping, the file on various
nodes of the cluster have identical entries, and so forth.)
Entries in the /etc/rsm/rsm.segmentid file are of the form:
#keyword appid baseid length
reserved SUNWfoo 0x600000 1000
The fields in the file are separated by tabs or blanks. The
first string is a keyword "reserve", followed by the appli-
cation identifier (a string without spaces), the baseid (the
SunOS 5.11 Last change: 8 May 2003 1
Remote Shared Memory Library Functions
rsmgetsegmentidrange(3RSM)
starting segment ID of the reserved range in hexadecimal),
and the length (the number of segmentids reserved). Comment
lines contain a "#" in the first column. The file should not
contain blank or empty lines. Segment IDs reserved for the
system are defined in the
header and cannot be used by the applications.
RETURN VALUES
Upon successful completion, these functions return 0. Other-
wise, an error value is returned to indicate the error.
ERORS
The rsmgetsegmentidrange() function can return the fol-
lowing errors:
RSMERBADADR The address passed is invalid.
RSMERBADAPID The appid is not defined in configura-
tion file.
RSMERBADCONF The configuration file is not present
or not readable, or the configuration
file format is incorrect.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Unstable
MT-Level MT-Safe
SEE ALSO
rsmmemsegexportpublish(3RSM), attributes(5)
SunOS 5.11 Last change: 8 May 2003 2
Remote Shared Memory Library Functions
rsmgetsegmentidrange(3RSM)
SunOS 5.11 Last change: 8 May 2003 3
|