i
i
“K16304” — 2012/11/19 — 9:15
i
i
i
i
i
i
208
SCTP Application Interface
IPPROTO_SCTP,
SCTP_INITMSG,
&initm ,
(socklen_t ) sizeof( initm)
);
sctp_connectx( assocLinkTable[i_assoc_idx ]. sctpInstance ,
( struct sockaddr ∗ ) &assocLinkTable[ i_assoc_idx ]. destIpAddr [0] ,
assocLinkTable[ i_assoc_idx ]. noOfDestinationAddresses ,
assocLinkTable[i_assoc_idx ]. assocSctpId
);
assocLinkTable[ i_assoc_idx ]. state = ASSOC_ACTIVE;
}
Figure 8.17 Connect to an SCTP association.
else
{
assocLinkTable[ i_assoc_idx ]. state = ASSOC_ACTIVE;
sctp_initmsg initm;
bzero(&initm , sizeof (initm ));
initm . sinit_num_ostreams = assocLinkTable[ i_assoc_idx ]. numStreams ;
initm . sinit_max_instreams =
hostTable [assocLinkTable[i_assoc_idx ]. host_index ]. numInStreams ;
setsockopt ( ass