This function connects to segment segment_id on remote node node_id by using the specified permission perm. The function returns a segment handle after connecting to the segment.
The argument perm specifies the access mode requested by the importer for this connection. To establish the connection, the access permissions specified by the exporter are compared to the access mode, user ID, and group ID used by the importer. If the request mode is not valid, the connection request is denied. The perm argument is limited to the following octal values:
Read mode
Write mode
Read/write mode
The specified controller must have a physical connection to the controller that is used in the export of the segment.
Return Values: Returns 0 if successful. Returns an error value otherwise.
Invalid controller handle
Controller not present
Invalid segment handle
Permission denied
Segment not published to node
No such segment published
Remote node not reachable
Connection interrupted
Insufficient memory
Insufficient resources
Bad address
This function disconnects a segment. This function frees a segment's resources after disconnecting a segment. All existing mappings to the disconnected segment are removed. The handle im_memseg is freed.
Return Values: Returns 0 if successful. Returns an error value otherwise.
Invalid segment handle
Segment still mapped
pollfd in use