[reSIProcate] AfterSocketCreationFuncPtr not called for TCP sockets

Scott Godin sgodin at sipspectrum.com
Tue May 19 09:26:57 CDT 2009


2) I'm successfully modifying the parameters on the server socket, but
> thanks to a bug/feature in (at least this version of) Linux, those
> parameters don't carry forth to the sockets created by the call to accept().
>  So short of modifying TcpBaseTransport::processListen to call the callback
> function after the call to accept(), there's nothing to be gained by my
> change.


Does it help if you call the AfterSocketCreationFuncPtr before the bind?
 Are you able to set the TOS and TTL headers in the connect call and have it
work?  If need be, I think adding a compiler flag that specifies that the
AfterSocketCreationFunc should be called in the accept() fn for TCP sockets
makes sense.

Scott


> I'm open to opinions and feedback, though.
> Thanks.
>
> PK
> ________________________________________
> From: slgodin at gmail.com [mailto:slgodin at gmail.com] On Behalf Of Scott
> Godin
> Sent: Sunday, May 17, 2009 12:12 PM
> To: Paul Kurmas
> Cc: resiprocate-devel at resiprocate.org
> Subject: Re: [reSIProcate] AfterSocketCreationFuncPtr not called for TCP
> sockets
>
> 1) Has a similar change been posted as a draft somewhere else?
>
> [Scott] I haven't seen such a change from any other source.
>
> 2) Is there a historical reason why the functionality isn't provided for
> TCP sockets?
>
> [Scott] I can't think of one.  Sounds like a good addition to the stack.
>  If you would like to post a patch for this, I can get it committed to SVN.
>
> Thanks!
> Scott
> On Fri, May 15, 2009 at 2:52 PM, Paul Kurmas <pkurmas at mutualink.net>
> wrote:
> One clarification here... the reason for installing the callback
> function is to be able to call setsockopt() to set the IP_TTL and IP_TOS
> fields of the stream.
>
> Any alternate solutions that use existing APIs to solve the problem
> would be welcome.  Thanks again.
>
> PK
>
> -----Original Message-----
> From: Paul Kurmas
> Sent: Friday, May 15, 2009 2:43 PM
> To: 'resiprocate-devel at resiprocate.org'
> Subject: AfterSocketCreationFuncPtr not
>
> I've created a function complying to the prototype for
> AfterSocketCreationFuncPtr & pass it to the SipStack ctor.  However, the
> function is not called for TCP sockets.  The argument is dropped from
> the call to the TcpTransport ctor, and in turn the TcpBaseTransport
> ctor.  The implementation of the TcpBaseTransport ctor list passes a
> null pointer to the InternalTransport ctor.
>
> I've verified in the latest-and-greatest code that this hasn't been
> changed in v1.4.1.  My codebase is at v1.3.4.  Before I start changing
> the implementation & posting the change, I wanted to know two things --
> 1) Has a similar change been posted as a draft somewhere else?
> 2) Is there a historical reason why the functionality isn't provided for
> TCP sockets?
>
> Many thanks in advance.
> PK
>
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel at resiprocate.org
> https://list.resiprocate.org/mailman/listinfo/resiprocate-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20090519/22bc4013/attachment.htm>


More information about the resiprocate-devel mailing list