i
i
“K16304” — 2012/11/19 — 9:15
i
i
i
i
i
i
8.4 Message-Based Communication
203
void test_handle_sctp_msg_UDP ( int fd , short int revents , short int ∗ gotEvents ,
void ∗dummy )
{
int msg_flags ,msg_len , addr_length;
int nr_destinations;
socklen_t peer_addr_len;
char readbuf [4096];
memset( readbuf , 0, sizeof (readbuf ));
msg_len = recvfrom (assocLinkTable[ assoc_index ]. sctpInstance ,
readbuf ,
sizeof(readbuf ) ,
&msg_flags ,
( struct sockaddr ∗ )
&assocLinkTable[ i_assoc_idx ]. destIpAddr [0] ,
addr_length
);
test_DistributeMsg_simple ( Readbuf ,
msglen
);
}
Figure 8.10 Simple SCTP UDP-like data receive.
Normal 2 way datagram association
TCP applications which employ application layer framing can convert to the normal
model of an SCTP message-based association.
This ...