Messages

Cogent API and Utilities: Version 4.1
Prev | Chapter 3. Interprocess Communication | Next

# 3.3. Messages

Message structures are used to encapsulate the information passed between processes. The underlying messaging primitives do not specify a data format so information concerning the sending task, the message length and message type is not necessarily available. The `IP_Msg` structure efficiently encapsulates this information, while following the OS convention on message type and subtype header information.

An `IP_Msg` is in fact a wrapper on a data buffer. Only the `msg` portion is transmitted or received into during an interprocess communication transaction. In most cases, the `msg` portion is a pointer to an `IP_MsgBuffer` structure which defines the message type, subtype, length and identifying information about the sender. The `IP_MsgBuffer` structure is of varying length, with the last part of the structure containing the data.

- `IP_MsgDefaultSize` - gets the default size of interprocess messages.

- `IP_MsgCreate` - creates an `IP_Msg` structure.

- `IP_MsgDestroy` - frees memory associated with a message.

- `IP_MsgResize` - resizes the `IP_MsgBuffer`, if possible.

- `IP_MsgCascade` - writes message data to an `IP_MsgBuffer`.

- `IP_MsgRaw` - like `IP_MsgCascade`, with `IP_SUB_RAW` for its `subtype`.

- `IP_MsgRawData` - gives a pointer to `IP_RAW` message data.

- `IP_MsgLisp` - constructs a formatted text message.

Prev | Home | Next
Task Structure Caching | Up | Cascade NameServer Functions

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