io_msg()

int io_msg ( resmgr_context_t *ctp,
             io_msg_t *msg,
             RESMGR_OCB_T *ocb ) 

Classification: I/O

Default handler: none.

Helper functions: none.

Client function: none—manually assembled and sent via MsgSend()

Messages: _IO_MSG

Data structure:

struct _io_msg {
  uint16_t       type;
  uint16_t       combine_len;
  uint16_t       mgrid;
  uint16_t       subtype;
};

typedef union {
  struct _io_msg i;
} io_msg_t;

Description: The _IO_MSG interface is a more general, but less portable, variation on the ioctl()/devctl() theme. The mgrid is used to identify a particular manager—you should not perform actions for requests that don't conform to your manager ID. The subtype is effectively the command that the client wishes to perform. Any data that's transferred implicitly follows the input structure. Data that's returned to the client is sent on its own, with the status returned via _RESMGR_STATUS().

Returns: The status via the helper macro _RESMGR_STATUS().