- From: Torbjorn Andersson <tora AT cs.kau.se>
- To: discussion AT sctp.de
- Subject: Re: [SCTP-Discussion] UDP style
- Date: Thu Jul 4 09:47:01 2002
- List-id: SCTP Discussions <discussion.sctp.de>
See below..
>
Am Mittwoch, 3. Juli 2002 16:38 schrieben Sie:
>
> > Am Mittwoch, 3. Juli 2002 15:48 schrieben Sie:
>
> > > I'm testing the explicit assoc shutdown feature of the udp style
>
> > > socket.
>
> > >
>
> > > With the function below I send a empty message with only the
>
> > > sinfo_flag, set to MSG_EOF, and sinfo_assoc_id set to the target
>
> > > assoc ID.
>
> >
>
> > Use "msg->msg_flags = MSG_EOF". The usage of sinfo->sinfo_flags is
>
> > implemented in the next release of the socket API, to be released soon.
>
>
>
> How will the socket know which association to shut down, if it don't look
>
> into the sendreceive structure ? Can I still explicitly shutdown
>
> association ?
>
>
The assoc ID has to be given in sinfo_assoc_id, but due to a small error,
>
the sinfo_flags value is ignored. If you set the flag in msg->msg_flags,
>
the shutdown should work with the old version of the socket API.
>
In detail, the flag value given to the SCTPSocket or SCTPAssociation object
>
in ext_sendmsg_singlebuffer() should be the OR-value
>
flags|msg->msg_flags|sinfo->sinfo_flags, but in the old version it is only
>
flags|msg->msg_flags.
>
>
You can try to fix the problem in sctpsocketwrapper.cc,
>
ext_sendmsg_singlebuffer() (or ext_sendmsg() in very old versions):
>
>
if((msg != NULL) && (msg->msg_iov != NULL) &&
>
(msg->msg_iov->iov_base != NULL)) {
Why does the msg->msg_iov need to be != NULL when there is no data to
transmit, in the case of an explicit assocition shutdown ?
>
flags |= msg->msg_flags;
>
*** INSERT THIS ***
>
if(info != NULL) {
>
flags |= info->sinfo_flags;
>
}
>
*******************
>
if(tdSocket->Socket.SCTPSocketDesc.Flags & O_NONBLOCK) {
>
flags |= MSG_DONTWAIT;
>
}
>
>
Please mail me if this solves the problem.
I will give it a try...
/Thanks from Torbjörn
Archive powered by MHonArc 2.6.19+.