All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] [DCCP]: Deprecate SOCK_DCCP in favour of SOCK_DGRAM
@ 2008-05-13  7:28 ` Gerrit Renker
  0 siblings, 0 replies; 60+ messages in thread
From: Gerrit Renker @ 2008-05-13  7:28 UTC (permalink / raw)
  To: dccp

There is an API and an address resolution problem involved in specifying a
separate/distinct socket type `SOCK_DCCP'.

The problem is that the default getaddrinfo(3) does not support the `alien'
SOCK_DCCP socket type (it returns `ai_socktype not supported'), thus requiring
various cheats/work-arounds in order to bring up a DCCP socket on a dual-stack
host.

In order to get an address at all,
 * a hint with an ai_socktype=SOCK_DGRAM or SOCK_STREAM needs to be supplied;
 * using ai_socktype=0 causes IPv4 addresses to be returned first, so that a
   server on a dual-stack host needs to be coaxed into v6 mode to accept
   incoming v6 connections.

The suggestion therefore is to not use a separate SOCK_DCCP socket type,
and to put DCCP up under SOCK_DGRAM (being in fact datagram-based), i.e.

	socket(sd, SOCK_DCCP, 0);	

is replaced by	
	
	socket(sd, SOCK_DGRAM, IPPROTO_DCCP);


Having also seen the work-arounds in programs that other people wrote,
I believe that the above change will make it in the long term easier for
people to write DCCP-enabled applications.

It also relieves the libc writers from having to support another socket type.

A quick look at SCTP shows that they also did not introduce new socket types,
relying on the existing SOCK_STREAM/SOCK_SEQPACKET ones.

It might be still early enough to resolve this, before it is widely used
and can then only be supported via work-arounds.

I can't see a disadvantage here and the only work required is to update that
datagram-based not automatically means connection-less.

Is there support for this change or are there reasons to keep SOCK_DCCP?

^ permalink raw reply	[flat|nested] 60+ messages in thread
* Re: [RFC] [DCCP]: Deprecate SOCK_DCCP in favour of SO
  2008-05-13  7:28 ` Gerrit Renker
@ 2008-05-13 12:53 ` Remi Denis-Courmont
  -1 siblings, 0 replies; 60+ messages in thread
From: Remi Denis-Courmont @ 2008-05-13 12:53 UTC (permalink / raw)
  To: dccp


On Tue, 13 May 2008 08:28:53 +0100, Gerrit Renker <gerrit@erg.abdn.ac.uk>
wrote:
> There is an API and an address resolution problem involved in specifying
a
> separate/distinct socket type `SOCK_DCCP'.
(...)
> Having also seen the work-arounds in programs that other people wrote,
> I believe that the above change will make it in the long term easier for
> people to write DCCP-enabled applications.

DCCP clearly fails the POSIX definition of SOCK_DGRAM in different ways.

I think this is not a good idea.

> It also relieves the libc writers from having to support another socket
> type.

As long as SOCK_DCCP-or-whatever is not automatically selected when
ai_socktype is nul, this should be both easy to implement in libc *and*
backward compatible (applications will not try to use DCCP implicitly).

> A quick look at SCTP shows that they also did not introduce new socket
> types, relying on the existing SOCK_STREAM/SOCK_SEQPACKET ones.

But they follow the semantics for them.

> It might be still early enough to resolve this, before it is widely used
> and can then only be supported via work-arounds.
> 
> I can't see a disadvantage here and the only work required is to update
> that
> datagram-based not automatically means connection-less.
> 
> Is there support for this change or are there reasons to keep SOCK_DCCP?

Maybe the name SOCK_DCCP sucks, but I think DCCP needs a "new" socket type
anyway.

-- 
Rémi Denis-Courmont
http://www.remlab.net


^ permalink raw reply	[flat|nested] 60+ messages in thread

end of thread, other threads:[~2008-05-14 18:08 UTC | newest]

Thread overview: 60+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-13  7:28 [RFC] [DCCP]: Deprecate SOCK_DCCP in favour of SOCK_DGRAM Gerrit Renker
2008-05-13  7:28 ` Gerrit Renker
2008-05-13  7:39 ` David Miller
2008-05-13  7:39   ` David Miller
2008-05-13  9:37 ` Gerrit Renker
2008-05-13  9:37   ` Gerrit Renker
2008-05-13 13:46 ` Gerrit Renker
2008-05-13 13:46   ` Gerrit Renker
2008-05-13 15:50 ` David Stevens
2008-05-13 15:50   ` David Stevens
2008-05-13 16:23 ` Arnaldo Carvalho de Melo
2008-05-13 16:23   ` Arnaldo Carvalho de Melo
2008-05-13 16:59 ` David Stevens
2008-05-13 16:59   ` David Stevens
2008-05-13 17:03 ` Gerrit Renker
2008-05-13 17:03   ` Gerrit Renker
2008-05-13 17:06 ` Rémi Denis-Courmont
2008-05-13 17:06   ` Rémi Denis-Courmont
2008-05-13 17:33 ` Arnaldo Carvalho de Melo
2008-05-13 17:33   ` Arnaldo Carvalho de Melo
2008-05-13 17:34 ` Arnaldo Carvalho de Melo
2008-05-13 17:34   ` Arnaldo Carvalho de Melo
2008-05-13 17:37 ` Rémi Denis-Courmont
2008-05-13 17:37   ` Rémi Denis-Courmont
2008-05-13 17:50 ` Arnaldo Carvalho de Melo
2008-05-13 17:50   ` Arnaldo Carvalho de Melo
2008-05-13 17:53 ` Arnaldo Carvalho de Melo
2008-05-13 17:53   ` Arnaldo Carvalho de Melo
2008-05-13 19:14 ` Ulrich Drepper
2008-05-13 19:14   ` Ulrich Drepper
2008-05-13 22:34 ` David Miller
2008-05-13 22:34   ` David Miller
2008-05-14  8:09 ` Gerrit Renker
2008-05-14  8:09   ` Gerrit Renker
2008-05-14 14:06 ` Ulrich Drepper
2008-05-14 14:06   ` Ulrich Drepper
2008-05-14 14:45 ` Gerrit Renker
2008-05-14 14:45   ` Gerrit Renker
2008-05-14 16:06 ` Ulrich Drepper
2008-05-14 16:06   ` Ulrich Drepper
2008-05-14 17:22 ` Gerrit Renker
2008-05-14 17:22   ` Gerrit Renker
2008-05-14 17:39 ` Sridhar Samudrala
2008-05-14 17:39   ` Sridhar Samudrala
2008-05-14 17:43 ` Ulrich Drepper
2008-05-14 17:43   ` Ulrich Drepper
2008-05-14 17:47 ` Rémi Denis-Courmont
2008-05-14 17:47   ` Rémi Denis-Courmont
2008-05-14 17:49 ` Rémi Denis-Courmont
2008-05-14 17:49   ` Rémi Denis-Courmont
2008-05-14 17:57 ` Ulrich Drepper
2008-05-14 17:57   ` Ulrich Drepper
2008-05-14 18:00 ` Gerrit Renker
2008-05-14 18:00   ` Gerrit Renker
2008-05-14 18:06 ` Ulrich Drepper
2008-05-14 18:06   ` Ulrich Drepper
2008-05-14 18:07 ` Ulrich Drepper
2008-05-14 18:07   ` Ulrich Drepper
  -- strict thread matches above, loose matches on Subject: below --
2008-05-13 12:53 [RFC] [DCCP]: Deprecate SOCK_DCCP in favour of SO Remi Denis-Courmont
2008-05-13 12:53 ` [RFC] [DCCP]: Deprecate SOCK_DCCP in favour of SOCK_DGRAM Remi Denis-Courmont

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.