how to use reply()

Hi experts,

is there an example how to use the reply() function?
After an ioctl I want to give back some data to my application (which
has made an request via qnx_ioctl).
The status return value is always sent to my application but the data
never arrive there!
I’m using the iomanager example from QNX.
In the example only the return value (status) is used.

The documentation of such things is really bad .


Georg Ertl

mail: geer@pfaffenhofen.de

you build an mx entry and Replymx back…

e.g.

Replymx(active->p_pid, nparts, mx_entry)

replymsg.ioctl_reply.zero = 0;
build_mx_entry(0, &replymsg, sizeof(replymsg.ioctl_reply)

  • sizeof(replymsg.ioctl_reply.data));

#define build_mx_entry(num, ptr, len) {
mx_entry[(num)].mxfer_off = FP_OFF(ptr);
mx_entry[(num)].mxfer_zero = 0;
mx_entry[(num)].mxfer_seg = FP_SEG(ptr);
mx_entry[(num)].mxfer_len = len; }

the above assumes that replymsg is a ptr to a union of all your possible
reply structures.
and mx_entry is an array of _mxfer_entry entries…
nparts is the # of mx parts in the reply.

you use the same technique to pull data from the ioctl (using REadMsgmx)

Georg Ertl <geer@pfaffenhofen.de> wrote:

Hi experts,

is there an example how to use the reply() function?
After an ioctl I want to give back some data to my application (which
has made an request via qnx_ioctl).
The status return value is always sent to my application but the data
never arrive there!
I’m using the iomanager example from QNX.
In the example only the return value (status) is used.

The documentation of such things is really bad .



Georg Ertl

mail: > geer@pfaffenhofen.de


Randy Martin randy@qnx.com
Manager of FAE Group, North America
QNX Software Systems www.qnx.com
175 Terence Matthews Crescent, Kanata, Ontario, Canada K2M 1W8
Tel: 613-591-0931 Fax: 613-591-3579