resmgr_context_t

Context information that's passed between resource-manager functions

Synopsis:

#include <sys/iofunc.h>
#include <sys/resmgr.h>

struct _extended_context {
        size_t                   length;
        struct _xendian_context  xendian;
        void                     *data; /* general purpose */
};

typedef struct _resmgr_context {
    int                         rcvid;
    struct _msg_info            info;
    resmgr_iomsgs_t             *msg;
    dispatch_t                  *dpp;
    int                         id;
    struct _extended_context    *extra;
    size_t                      msg_max_size;
    long                        status;
    size_t                      offset;
    size_t                      size;
    iov_t                       iov[1];
} resmgr_context_t;

Description:

The resmgr_context_t structure defines context information that's passed to resource-manager functions.

Note: The message_context_t structure is identical to resmgr_context_t.

The members include:

rcvid
The receive ID to use for messages to and from the client.
info
A _msg_info structure that contains information about the message received by the resource manager.
msg
A pointer to the message received by the resource manager, expressed as a union of all the possible message types.
dpp
The dispatch handle, created by a successful call to dispatch_create().
id
The link ID, returned by resmgr_attach().
extra
A pointer to an _extended_context structure that includes the following:
  • length — the size of the _extended_context structure, in bytes
  • xendian — an _xendian_context structure that the library uses when handling endian-swapping across Qnet.
  • data — (QNX Neutrino 7.0 or later) A pointer that a resource manager can use for arbitrary data that it needs. The resource-manager framework doesn't use this member.
msg_max_size
The minimum amount of space reserved for receiving a message.
status
A place to store the status of the current operation. Always use _RESMGR_STATUS() to set this member.
offset
The offset, in bytes, into the client's message. You'll use this when working with combine messages.
size
The number of valid bytes in the message area.
iov
An I/O vector where you can place the data that you're returning to the client.

Classification:

QNX Neutrino