SCTP Discussions

Text archives Help


[SCTP-Discussion] ext_sendmsg() fails to send data


Chronological Thread 
  • From: "Heywood, Simon " <Simon.Heywood AT thalesgroup.com>
  • To: "SCTP discussion (E-mail)" <discussion AT sctp.de>
  • Subject: [SCTP-Discussion] ext_sendmsg() fails to send data
  • Date: Wed Jul 7 13:02:05 2004
  • List-id: SCTP Discussions <discussion.sctp.de>

I've been experiencing problems when sending a few KiB of data over an SCTP
link. I'm using ext_sendmsg() and ext_recvmsg() to transmit the data. I may
be doing something wrong in the code that calls those functions, but the
results are a little strange and I wondered if anyone else had encountered
this behaviour.

I knocked up the attached test code to investigate the problems. After
building it ('tar zxf <file>', 'cd bug_test', 'make') run 'sudo ./server' in
one virtual terminal and 'sudo ./client 1' in another. The number passed to
the client specifies the number of 1300 byte buffers to send, the rest
should be obvious from the code. When I pass '5', '50' or '500' I just get
three messages at the server (like the output below except for the last two
lines). With Ethereal, I also verified that there were only three data
messages on the wire. When I pass '5000' I get a lot of messages arriving
(as expected). Most odd. (BTW, you have to restart the server every time
before you run the client.)

The precise output varies; sometimes I get an internal error from one of the
SCTP libraries. The following output is typical of this.

----- client -----
heywood@bridge:~/src/bug_test$ sudo ./client 500
Sending 500 buffers.
----- client -----

----- server -----
heywood@bridge:~/src/bug_test$ sudo ./server
SCTP handling client '127.0.0.1:31943'.

recvtotal == 1300
UNITS == 1024
numdots == 0
recvtotal / UNITS == 1
.
recvtotal == 2600
UNITS == 1024
numdots == 1
recvtotal / UNITS == 2
.
recvtotal == 3900
UNITS == 1024
numdots == 2
recvtotal / UNITS == 3
.WARNING: SCTPSocket::internalReceive() - Data buffer size is zero!
sctp_recv_msg(): ext_recvmsg() failed: Invalid argument
----- server -----

I'm using the latest version of the Essen SCTP libraries (sctplib-1.0.1 and
socketapi-1.3.1) on Linux 2.4.26. I'd be grateful if someone could have a
look at this test code to see if I'm doing anything wrong, or at least to
try to reproduce these results.

Thanks,
Simon

Attachment: bug_test.tgz
Description: Binary data




Archive powered by MHonArc 2.6.19+.

Top of page