Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

rsm_get_segmentid_range(3rsm) [opensolaris man page]

rsm_get_segmentid_range(3RSM)			      Remote Shared Memory Library Functions			     rsm_get_segmentid_range(3RSM)

NAME
rsm_get_segmentid_range - get segment ID range SYNOPSIS
cc [ flag... ] file... -lrsm [ library... ] #include <rsmapi.h> int rsm_get_segmentid_range(const char *appid, rsm_memseg_id_t *baseid, uint32_t *length); DESCRIPTION
RSM segment IDs can be either specified by the application or generated by the system using the rsm_memseg_export_publish(3RSM) function. Applications that specify segment IDs require a reserved range of segment IDs that they can use. This can be achieved by using rsm_get_seg- mentid_range() and by reserving a range of segment IDs in the segment ID configuration file, /etc/rsm/rsm.segmentid. The rsm_get_segmen- tid_range() function 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 application identifier (a string without spaces), the baseid (the 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 </usr/include/rsm/rsm_common.h> header and cannot be used by the applications. RETURN VALUES
Upon successful completion, these functions return 0. Otherwise, an error value is returned to indicate the error. ERRORS
The rsm_get_segmentid_range() function can return the following errors: RSMERR_BAD_ADDR The address passed is invalid. RSMERR_BAD_APPID The appid is not defined in configuration file. RSMERR_BAD_CONF The configuration file is not present or not readable, or the configuration file format is incorrect. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ |ATTRIBUTE TYPE |ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Unstable | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
rsm_memseg_export_publish(3RSM), attributes(5) SunOS 5.11 8 May 2003 rsm_get_segmentid_range(3RSM)

Check Out this Related Man Page

rsm_memseg_export_publish(3RSM) 		      Remote Shared Memory Library Functions			   rsm_memseg_export_publish(3RSM)

NAME
rsm_memseg_export_publish, rsm_memseg_export_unpublish, rsm_memseg_export_republish - allow or disallow a memory segment to be imported by other nodes SYNOPSIS
cc [ flag... ] file... -lrsm [ library... ] #include <rsmapi.h> int rsm_memseg_export_publish( rsm_memseg_export_handle_t memseg, rsm_memseg_id_t *segment_id, rsmapi_access_entry_t access_list[], uint_t access_list_length); int rsm_memseg_export_unpublish( rsm_memseg_export_handle_t memseg); int rsm_memseg_export_republish( rsm_memseg_export_handle_t memseg, rsmapi_access_entry_t access_list[], uint_t access_list_length); DESCRIPTION
The rsm_memseg_export_publish(), rsm_memseg_export_unpublish(), and rsm_memseg_export_republish() functions allow or disallow a memory seg- ment to be imported by other nodes. The rsm_memseg_export_publish(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 segment_id 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 iden- tifier value. The access_list 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: 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 provided, nodes not included in the list will be prevented from importing the segment. However, if the access list is NULL (this will require the length access_list_length to be specified as 0 as well), then no nodes will be excluded from importing and the access permis- sions on all nodes will equal the owner-group-other file creation permissions of the exporting process. Corresponding to the access_list argument, the access_list_length argument specifies the number of entries in the access_list array. The rsm_memseg_export_unpublish() function disallows the export segment specified by memseg from being imported. All the existing import connections are forcibly disconnected. The rsm_memseg_export_republish() 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. Otherwise, an error value is returned to indicate the error. ERRORS
The rsm_memseg_export_publish(), rsm_memseg_export_unpublish(), and rsm_memseg_export_republish() functions can return the following errors: RSMERR_BAD_SEG_HNDL Invalid segment handle. RSMERR_NOT_CREATOR Not creator of segment. The rsm_memseg_export_publish() and rsm_memseg_export_republish() functions can return the following errors, with the exception that only rsm_memseg_export_publish() can return the errors related to the segment identifier: RSMERR_SEGID_IN_USE Segment identifier in use. RSMERR_RESERVED_SEGID Segment identifier reserved. RSMERR_BAD_SEGID Invalid segment identifier. RSMERR_BAD_ACL Invalid access control list. RSMERR_SEG_ALREADY_PUBLISHED Segment already published. RSMERR_INSUFFICIENT_MEM Insufficient memory. RSMERR_INSUFFICIENT_RESOURCES Insufficient resources. RSMERR_LOCKS_NOT_SUPPORTED Locks not supported. RSMERR_BAD_ADDR Bad address. The rsm_memseg_export_republish() and rsm_memseg_export_unpublish() functions can return the following errors: RSMERR_SEG_NOT_PUBLISHED Segment not published. RSMERR_INTERRUPTED The operation was interrupted by a signal. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ |ATTRIBUTE TYPE |ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
rsm_memseg_export_create(3RSM), attributes(5) NOTES
An attempt to publish a segment might block until sufficient resources become available. SunOS 5.11 8 Jun 2001 rsm_memseg_export_publish(3RSM)
Man Page