SCTP Discussions

Text archives Help


[SCTP-Discussion] Read UDP events without SCTP dose not work.


Chronological Thread 
  • From: Salbrechter Bernd <bernd.salbrechter AT siemens.at>
  • To: discussion AT sctp.de
  • Subject: [SCTP-Discussion] Read UDP events without SCTP dose not work.
  • Date: Tue Apr 10 15:35:02 2001
  • List-id: SCTP Discussions <discussion.sctp.de>

Title: Read UDP events without SCTP dose not work.

Hi all!

I try to use the SCTPlib-1.0-pre8 to recive UDP packages without using the SCTP part. We need this to have the same interface to the scheduling in both cases with SCTP and without.

In addition to the Problems Martin Held posted here a sort time before, the lines 622ff in adaptation.c looks wrong. I think you want to reach line 628 if sctp_sfd == 0 or if the poll_fds[i].fd != sctp_sfd and the same for IPv6. In this case the lines should read:

if ( ((sctp_sfd !=0) || (poll_fds[i].fd != sctp_sfd))
#ifdef HAVE_IPV6
  && ((sctpv6_sfd != 0) || (poll_fds[i].fd != sctpv6_sfd))
#endif
){

Note the "or" instate of the "and" in the two subexpressions.

Anyway the useage of 0 for an invalid sctp file descriptor is problematic. Wouldn't it be better to initialize it to -1, which you get if the open fails. Then you do not need the first part in the test.

Regads
Bernd Salbrechter



  • [SCTP-Discussion] Read UDP events without SCTP dose not work., Salbrechter Bernd, 04/10/2001

Archive powered by MHonArc 2.6.19+.

Top of page