The rsm_memseg_export_publish(), rsm_memseg_export_unpublish(), and rsm_memseg_export_republish() functions allow or disallow a memory segment 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 identifier 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 permissions 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.
|