SCTP Discussions

Text archives Help


Re: [SCTP-Discussion] Test program showing a socketapi quirks.


Chronological Thread 
  • From: Michael Tuexen <Michael.Tuexen AT micmac.franken.de>
  • To: Ralph Loader <rcl AT ihug.co.nz>
  • Cc: discussion AT sctp.de
  • Subject: Re: [SCTP-Discussion] Test program showing a socketapi quirks.
  • Date: Sat Aug 26 12:32:02 2006
  • List-id: SCTP Discussions <discussion.sctp.de>

Just for information:

BSD systems return ENOTCONN if you write on a socket which is not connected.
So you would need an additional || error = ENOTCONN in your assert
assert (r == -1 && (errno == ECONNRESET || errno == EPIPE || errno == ENOTCONN));

Best regards
Michael

On Aug 25, 2006, at 10:57 PM, Ralph Loader wrote:

Hi,

Attached is a test program showing a few quirks with the ext_socket api.

(1) Doing a socket/listen/getsockname [without a bind] the getsockname
fails.

After adding in bind()s to get the program creating associations:

(2) Closing a listen()ing socket seemed to cause problems for sockets
accepted on it.

(3) Doing a shutdown(SHUT_WR) on one end of a connection seemed to cause
a read() on the other end to hang. [It never got as far as testing
poll()...]

Ralph.

On Solaris 10 kernel, the program runs perfectly, it runs OK on Linux
kernel but shows a couple of poll() oddities, on the ext_socket api it
fails pretty badly :-(

<sctp_de_test.cc>





Archive powered by MHonArc 2.6.19+.

Top of page