Subject: Re: SCTP socket options

From: "Brian F. G. Bidulock" <[email-masked]>
Date: Thu, 1 Mar 2007 00:40:14 -0700

devayya,

devayya wrote:                                                                     (Thu, 01 Mar 2007 10:12:56)
> Hi,
> 
> Please see my implementation,
> Socket is created using
> 
> socket(PF_INET, SOCK_RAW, IPPROTO_SCTP)
> 
> .....
> 
> The socket option for Send buffer is set by using
> 
> setsockopt(.., SOL_SOCKET, SO_SNDBUF, (void *)&buffsend, ...)
> 
> where, buffsend = ((receiver window * No of virtual links) * 2)
> 
> Now suppose if I put receiver window size as more than 14560 and the 
> number of virtual links are 8, then the setsockopt() call is failing 
> with error ENOBUFS (SO_SNDBUFS exceeds system limit)

This is wrong.  BSD does not return an error if you exceed the system limit.
The size is simply set to the maximum.  POSIX does not proscribe an error in
this case either.

What operating system are you using?

--brian

> 
> Can anybody guide as to whether, I can assign more buffer space for 
> Sendbuffer ?  If so How can I do it. If not, is there a better approach 
> for socket creation and setsockopt so that I can use maximum buffer 
> space for send buffer and receive buffer.
> 
> 
> Thanks and best regards,
> devayya

-- 
Brian F. G. Bidulock
[email-masked]
http://www.openss7.org/

---

From: "Brian F. G. Bidulock" <[email-masked]>
Date: Thu, 1 Mar 2007 03:05:23 -0700

devayya,

I believe I did: on BSD when a send or receive buffer is set to greater
than the maximum with setsockopt, it sets the buffer to the maximum and
returns without error.  Also, for XTI, XTI_RCVBUF and XTI_SNDBUF are not
absolute requirements (that is, they will be negotiated to the minimum
or maximum as required).

So, fix Lynxos to not return an error.

BTW, this has little to nothing to do with SCTP.

--brian

On Thu, 01 Mar 2007, devayya wrote:

> We are using Lynxos 4.0 Operating system.
> Please suggest a correction.
> 
> regards,
> devayya
> 
> Brian F. G. Bidulock wrote:
> > devayya,
> > 

-- 
Brian F. G. Bidulock    ¦ The reasonable man adapts himself to the ¦
[email-masked]    ¦ world; the unreasonable one persists in  ¦
http://www.openss7.org/ ¦ trying  to adapt the  world  to himself. ¦
                        ¦ Therefore  all  progress  depends on the ¦
                        ¦ unreasonable man. -- George Bernard Shaw ¦