The publish operation enables the importing of a memory segment by other nodes on the interconnect. An export segment might be published on multiple interconnect adapters.
The segment ID might be specified from within authorized ranges or specified as zero, in which case a valid segment ID is generated by the RSMAPI framework and is passed back.
The segment access control list is composed of pairs of node ID and access permissions. For each node ID specified in the list, the associated read/write permissions are provided by three octal digits for owner, group and other, as with Solaris file permissions. In the access control list, each octal digit can have the following values:
Write access.
Read only access.
Read and write access.
An access permission value of 0624 specifies the following kind of access:
An importer with the same uid as the exporter has both read and write access.
An importer with the same gid as the exporter has write access only.
All other importers have read access only.
When an access control list is provided, nodes not included in the list cannot import the segment. However, if the access list is null, any node can import the segment. The access permissions on all nodes equal the owner-group-other file creation permissions of the exporting process.
Node applications have the responsibility of managing the assignment of segment identifiers to ensure uniqueness on the exporting node.
typedef struct { rsm_node_id_t ae_node; /* remote node id allowed to access resource */ rsm_permission_t ae_permissions; /* mode of access allowed */ }rsmapi_access_entry_t;.
Return Values: Returns 0 if successful. Returns an error value otherwise.
Invalid segment handle
Segment already published
Invalid access control list
Invalid segment identifier
Segment identifier in use
Segment identifier reserved
Not creator of segment
Bad address
Insufficient memory
Insufficient resources
Authorized Segment ID Ranges:
0
0x0FFFFF
0x100000
0x1FFFFF
0x200000
0x2FFFFF
0x300000
0x3FFFFF
0x400000
0x4FFFFF
The following range is reserved for allocation by the system when the publish value is zero.
0x80000000
0xFFFFFFF
This function establishes a new node access list and segment access mode. These changes only affect future import calls and do not revoke already granted import requests.
Return Values: Returns 0 if successful. Returns an error value otherwise.
Invalid segment handle
Segment not published
Invalid access control list
Not creator of segment
Insufficient memory
Insufficient resources
Operation interrupted by signal
Return Values: Returns 0 if successful. Returns an error value otherwise.
Invalid segment handle
Segment not published
Not creator of segment
Operation interrupted by signal