- From: "Oon Heok Kee" <oonheokkee78 AT hotmail.com>
- To: discussion AT sctp.de
- Subject: [SCTP-Discussion] ext_setsockopt and ext_getsockopt problems
- Date: Sun Oct 20 07:32:01 2002
- List-id: SCTP Discussions <discussion.sctp.de>
Hi,
I've got a streaming server and client coded to run on SCTP. Connection
establishment and teardown seems to be working fine, but there are some
problems when I start using ext_getsockopt().
I've attached a small portion of the codes that calls ext_setsockopt(),
ext_getsockopt() and the parameters passed into the function. These values
and function calls work fine when used on other transport protocols, but I'm
wondering why they don't work with a TCP-style SCTP socket. Somehow,
ext_getsockopt() is always returning -1.
Thanks a lot!!
Oon, Heok Kee
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
int i_handle, i_opt, i_opt_size;
i_handle = ext_socket( AF_INET, SOCK_STREAM, IPPROTO_SCTP );
i_opt = 0x80000;
if( ext_setsockopt( i_handle, SOL_SOCKET, SO_RCVBUF, (void *) &i_opt,
sizeof( i_opt ) ) == -1 )
{
intf_WarnMsg( 1, "ipv4 warning: cannot configure socket (SO_RCVBUF: %s)",
strerror(errno) );
}
i_opt = 0;
i_opt_size = sizeof( i_opt );
if( ext_getsockopt( i_handle, SOL_SOCKET, SO_RCVBUF, (void*) &i_opt,
&i_opt_size ) == -1 )
{
intf_WarnMsg( 1, "ipv4 warning: cannot query socket (SO_RCVBUF: %s)",
strerror(errno) );
}
else if( i_opt < 0x80000 )
{
intf_WarnMsg( 1, "ipv4 warning: socket buffer size is 0x%x instead of
0x%x",
i_opt, 0x80000 );
}
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
_________________________________________________________________
Surf the Web without missing calls! Get MSN Broadband.
http://resourcecenter.msn.com/access/plans/freeactivation.asp
- [SCTP-Discussion] ext_setsockopt and ext_getsockopt problems, Oon Heok Kee, 10/20/2002
Archive powered by MHonArc 2.6.19+.