Interprocess Communication

Cogent API and Utilities: Version 4.1
Prev |  | Next

# Chapter 3. Interprocess Communication

This package is written to be source code compatible across the QNX 4, QNX 6 and Linux operating systems. In Linux, the SRR Module is required.

In addition to this library, two programs are required: qserve and nserve. These should have been included with this package or another sofware package from Cogent. qserve provides asynchronous message queueing services, and offers a number of small changes from the semantics of the POSIX mqueue program. The major differences are the semantics of message notification, transparent networking, and the removal of a queue when its creating process terminates. nserve provides name resolution services on a per-process basis, allowing processes to easily identify one another by name, thereby making it possible for them to communicate. nserve is intended to maintain consistent name information across a network. In addition, nserve can inform all processes on the network via qserve whenever a named process start or stops.

Node ID has different meanings in QNX 4, QNX 6 and Linux. In QNX 4, the node ID is the node number, which is unique on the network, and always refers to the same node. In QNX 6, the node ID is the "node descriptor", which is only unique on a single machine, and is transient on the network. The node ID, when valid, indicates the identifier of the foreign node as seen by the current node. A node ID of zero always indicates the node on which the process is running. In Linux, the node ID is currently meaningless, as the SRR Module does not implement network message passing.

# 3.1. Connections and Channels

Connection and channel identifiers and node names are only relevant to QNX 6. Under QNX 4 and Linux, connection and channel should always be zero, and node name will either be the string representation of a node number, or "".

- `IP_SetConnectionID` - sets the connection ID for IP library use.

- `IP_GetConnectionID` - returns the connection ID for IP library use.

- `IP_SetChannelID` - sets the channel ID for IP library use.

- `IP_GetChannelID` - returns the channel ID for IP library use.

Prev | Home | Next
Memory Allocation and String Values | Up | Task Structure Caching

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.