Service codes

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

 



Hi All,

That was a very interesting discussion of service codes on Monday :-).
Here are some opinions I've come away with.  One of the interesting
items in the discussion was that one of the purposes of service codes
was to relieve port scarcity -- it was explicitly intended that multiple
apps with different service codes could listen simultaneously on the
same port.

I'm going to use socket terminology here because it's too much work to
think up something totally generic.  DCCP sockets have some different
characteristics from other socket types, but mostly they're the same.  I
see two normal socket call flows, one for initiated connections and one
for received connections.  For initiated connections you call open, bind
and connect.  For received connections you call open, bind, listen and
accept.

Bound DCCP sockets are slightly different from bound other sockets -- a
bound DCCP socket has a destination address, destination port AND A
SERVICE CODE associated with it.  Given this I would like to suggest the
following requirements:

REQ: A DCCP implementation MUST require the using application to
explicitly set the service code associated with a socket before it can
be used in a listen or connect request.  The service code for a socket
MUST NOT default to 0.  It could default to SC=xFFFF, which is not a
valid value for SC and will be rejected if ever used.

REQ: A DCCP application in development SHOULD NOT use SC=0.  It SHOULD
choose a code from the private use space (first ASCII character equal to
'?').

REQ: A DCCP implementation MUST reject a DCCP-Request with SC=0 if no
socket is listening on that port with SC=0 (SC=0 MUST NOT be interpreted
as a wildcard).

Justification:  If we allow SC to default to 0, and allow apps to use
it, we'll get everyone using SC=0 and we'll loose the ability to
alleviate port scarcity.

REQ: A DCCP implementation MUST allow multiple sockets with different
service codes to listen on the same port.

Justification:  If some implementations allow multiple listening sockets
and others don't, app writers are going to be forced to assume the
lowest common denominator and we'll have port scarcity problems.

I realize that none of the existing implementations work this way, but I
think that's asking for long-term problems.

Tom P.



[Index of Archives]     [Linux Kernel Development]     [Linux DCCP]     [IETF Annouce]     [Linux Networking]     [Git]     [Security]     [Linux Assembly]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [DDR & Rambus]

  Powered by Linux