qnx_vc_attach

qnx_vc_attach — establishes a virtual circuit between two processes on two computers.

Syntax

qnx_vc_attach (node, taskid, max_msg_length, flags)

		

Arguments

node
The node to which to attach.
taskid
The task id to which to attach.
max_msg_length
The maximum message size which will be passed between tasks.
flags
Virtual circuit flags.

Returns

A task id of a virtual circuit, or -1 on error, with errno set.

Description

This function establishes a network link between two processes on two computers. Once this link is established the two processes can communicate using the IPC function qnx_send/qnx_receive/qnx_reply.

Legal virtual circuit flags that can be OR-ed together are:

  • 0 (zero) A new virtual process and a new buffer will be allocated on both ends.
  • _VC_AT_SHARE Use an existing virtual circuit, if it exists.
  • _VC_AT_REM_ZOMBIE The remote virtual circuit id (vid) will become a zombie process when the remote process ID terminates.

Possible values for errno are:

  • EAGAIN Proc to Net enqueuing failed
  • EHOSTUNREACH Destination node not in netmap or physical I/O error
  • EINVAL buffer too big
  • ENOLIC no license to communicate with this node
  • ENOMEM not enough memory to complete operation
  • ENOVPE not enough proc entries to new vc
  • ENOSYS no Net manager found
  • ESRCH process ID not valid

Example

Examples of this function are beyond the scope of this documentation.

See Also

qnx_vc_name_attach, qnx_send, send, send_async