Hi:
I basically want to define my own extra sub-type, in addition to the
ones in sys/iomsg.h:
So, I passed in the foll to _connect()
fd = _connect(0,
my_path, <=== msg->connect.path
mode, <=== m->c.mode
oflag, <=== m->c.ioflag
SH_DENYNO, <=== m->c.sflag
_IO_CONNECT_OPEN, <=== m->c.subtype
1,
_IO_FLAG_RD | _IO_FLOAG_WR,
0,
MY_EXTRA_TYPE, <==== ??? m->c.extra_type ??
sizeof(my_extra_type), <=== m->c.extra_len
(void *)e, <=== extra
0,
0,
0);
Now, I want to be able to retreive all that in in my_open() handler. I
get all of it in the msg->connect struct (shown above after <===),
except for MY_EXTRA_TYPE. It should logically be in
msg->connect.extra_type. But it isnt. Where is it?
-Rommel
Xiaodan Tang wrote:
Rommel Dongre <> rdongre@pillardata.com> > wrote:
Hi:
\
- From browsing the code, my understanding of the _connect() call is
that the 10th, 11th and 12th arguments are the extra message sub-type,
extra message size and extra message pointer, respectively.
\
- I am able to access the extra pointer correctly in an open outcall
(4th argument of the open handler), in my resource manager. Also, the
extra message size is correctly set in msg->connect.extra_len. But the
extra message sub-type isnt what there is in msg->connect.extra_type. So
what holds the extra message sub-type that I set in the _connect() call?
Not sure what is a “extra message sub-type” ?
There is “sub-type”, in this case, it is IO_CONNECT, there
is also “extra type”, which is "IO_CONNECT_EXTRA"
All these types are defined in sys/iomsg.h.
What exactly did you pass in with the _connect() call, and
what exactly did you see in your open call ?
-xtang
3. I am going by guess-work and trial-and-error. Is there any
documentation of these structures, and what they map onto, in an IPC?
Help would be greatly appreciated.
TIA,
Rommel