[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [dccp] Re: dccp_service in sockaddr_dccp{}



From: Arnaldo Carvalho de Melo <acme at conectiva.com.br>
Subject: Re: [dccp] Re: dccp_service in sockaddr_dccp{}
Date: Mon, 12 Sep 2005 15:51:58 -0300
Message-ID: <20050912185157.GA4642 at mandriva.com>

 > > My little concern (which may not be correct) is that one of the key deployment 
 > > issues of DCCP is smooth transition from UDP. If we can modify UDP applications 
 > > (especially client side) with minimum costs (ex: just replace SOCK_DGRAM 
 > > to SOCK_DCCP or SOCK_CONN_DGRAM), the benefit might be not small. 
 > > Besides that, we don't have to increase the number of sockaddr struct as 
 > > some folks pointed out, so the implementation would be simpler. 
 > 
 > Well, I've been thinking about this and perhaps the best option is to
 > support both, i.e. if an application passes just a sockaddr_in struct the
 > kernel DCCP stack understands it as "hey, lets use service 0, the app
 > doesn't cares, probably its a straight conversion from some legacy app", to
 > pass the service one would pass sockaddr_in_dccp with the service it
 > desires (connect) or accepts (bind), with the setsockopt being as well
 > accepted as a way to specify the services for both connect and bind.

I think that supporting both ways, i.e. "let application programmers choose",
is good idea. :)

 > Ah, and straight conversion from UDP? I toyed with the idea of doing the
 > connect on the first packet being sent so that UDP apps could be converted
 > doing what you described above, but being a connection oriented protocol
 > the straight conversion is s/SOCK_STREAM/SOCK_DCCP/g, no?

Well, I know it will not be that simple in some cases. But, how about allowing 
users to use "abbreviated" ways like this, (this may be the same idea as yours)

  1: if the application initiates communication by sending a packet, 
     we believe it is a client and do connect() automatically.

  2: if the application initiates communication by waiting a packet(read or recv),
     we believe it is a server and do listen(),accept() automatically.

may be too tricky or misleading users?

Thanks,
--
Yoshifumi Nishida
nishida at csl.sony.co.jp