[PATCH] Allow getaddrinfo() to accept SCTP socket types in hints
Rick Jones
rick.jones2@hp.com
Thu Oct 19 16:54:00 GMT 2006
Sridhar Samudrala wrote:
> On Wed, 2006-10-18 at 12:32 -0700, Ulrich Drepper wrote:
>
>>Sridhar Samudrala wrote:
>>
>>>SCTP has been supported in linux kernel for quite some time and the
>>>2 styles of SCTP sockets are defined in the following SCTP sockets API
>>>extension draft.
>>
>>Last time I asked I was told to not even think about adding the sctp
>>functionality which currently resides in libsctp. Therefore I'm also
>>reluctant to add this patch especially since the cost to existing
>>programs is nonzero. Suddenly all programs which don't specify a
>>protocol in the getaddrinfo call also get the sctp reply. And those are
>>not really useful unless the entire SCTP API is available.
Not knowing any better about the code or its history I'll ask what might be a
stupid question - is there a middle ground where passing-in zero doesn't get one
SCTP entries, but passing-in IPPROTO_SCTP would actually return some?
> The SCTP API is currently available to the users via libsctp in
> lksctp-tools package and is included in all the major linux
> distributions including RHEL, SLES, Fedora etc.
> So SCTP API is available to users although not via glibc.
>
> This problem was reported by netperf maintainer when adding
> SCTP support.
I was wondering if netperf was wandering into a minefield.
Anyway, strictly speaking, SCTP support was already in netperf. By someone
other than myself, who understands SCTP far better than I.
I was trying to make things "cleaner" and to deal with a different issue in
Solaris - where one would get-back 0 in the ai_protocol field even when
hints.ai_protocol had a protocol number in it.
When I put-in the kludge/workaround for that, netperf SCTP on Solaris still
worked, but netperf SCTP on Linux ceased to function because I was passing
hints.ai_protocol == IPPROTO_SCTP and the getaddrinfo() call was
doubleplusunhappy with that. (the initial SCTP changes to netperf had a
different set of kludges/workarounds in them involving SCTP where it wasn't
passing IPPROTO_SCTP in the hints - that version is about five and more revs
back in the repository)
At present, netperf has another kludge/workaround for Linux to deal with
getaddrinfo not liking IPPROTO_SCTP, which one can see by looking at the routine
complete_addrinfo() at:
http://www.netperf.org/svn/netperf2/trunk/src/nettest_bsd.c
rick jones
>
> Thanks
> Sridhar
More information about the Libc-alpha
mailing list