SCTP Discussions

Text archives Help


[SCTP-Discussion] ext_getsockopt and ext_setsockopt problems


Chronological Thread 
  • From: "Oon Heok Kee" <oonheokkee78 AT hotmail.com>
  • To: discussion AT sctp.de
  • Subject: [SCTP-Discussion] ext_getsockopt and ext_setsockopt problems
  • Date: Mon Oct 21 14:22: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 );
}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@


_________________________________________________________________
Broadband? Dial-up? Get reliable MSN Internet Access. http://resourcecenter.msn.com/access/plans/default.asp





Archive powered by MHonArc 2.6.19+.

Top of page