Subject: [Tsvwg] Section 7.1.3 sctpsocket-02.txt

From: [email-masked]
Date: Fri, 11 Jan 2002 19:12:26 +0530

hi all,

  in section 7.1.3   the following structure is being used for returning the
SCTP_INITMSG option value

struct sctp_initmsg {
       uint16_t sinit_num_ostreams;
       uint16_t sinit_max_instreams;
       uint16_t sinit_max_attempts;
       uint16_t sinit_max_init_timeo;
    };

 Since it does not have any input parameter to differentiate in case of more
than
one association in UDP style socket .

can anybody explain how to handle this case ?

thanks
Yogesh

_______________________________________________
tsvwg mailing list
[email-masked]
http://www1.ietf.org/mailman/listinfo/tsvwg

---

From: Randall Stewart <[email-masked]>
Date: Fri, 11 Jan 2002 09:12:32 -0600

Yogesh:

Two things:

First:

The sctp_initmsg is used in the UDP model to start
a new association with a peer (i.e. you are sending the
INIT message out) and over-ride the default INIT parameters
with the value found in the sctp_initmsg structure.

So we have an app sending a message with a
sendmsg() and putting the sctp_initmsg structure
in a CMSG header to go with the first message you
are sending. The sendmsg() call also includes the
destination address in the msg_name field ... i.e. the
sockaddr * of who you are sending (and INIT'ing) to.

Second:

If you are asking instead about notifications, i.e.
the association just came up and how do I tell what
parameters were negotiated in the streams counts
etc.. you get this in a MSG_NOTIFICATION in the
form of a 

struct sctp_assoc_change x;

And it too is received via a recvmsg() call where
the msg_flags field gets set to MSG_NOTIFICATION and the
msg_name will have the peer that the association just came
up with .. the data read will be the  sctp_assoc_change..

Of course you must enable this event...

Hope that helps...

R

-- 
Randall R. Stewart
[email-masked] 815-342-5222 (cell phone)