Re: recv() clarification in SCTP sockets API draft

Michael Tuexen <Michael.Tuexen@lurchi.franken.de> Thu, 05 August 2010 20:03 UTC

Return-Path: <Michael.Tuexen@lurchi.franken.de>
X-Original-To: tsvwg@core3.amsl.com
Delivered-To: tsvwg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id D02423A6988 for <tsvwg@core3.amsl.com>; Thu, 5 Aug 2010 13:03:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MimuI4k7CLOt for <tsvwg@core3.amsl.com>; Thu, 5 Aug 2010 13:03:31 -0700 (PDT)
Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) by core3.amsl.com (Postfix) with ESMTP id 2E4653A68DB for <tsvwg@ietf.org>; Thu, 5 Aug 2010 13:03:31 -0700 (PDT)
Received: from [192.168.1.195] (p5481DF04.dip.t-dialin.net [84.129.223.4]) (Authenticated sender: micmac) by mail-n.franken.de (Postfix) with ESMTP id 91A6B1C0C0BD8; Thu, 5 Aug 2010 22:03:59 +0200 (CEST)
Subject: Re: recv() clarification in SCTP sockets API draft
Mime-Version: 1.0 (Apple Message framework v1081)
Content-Type: text/plain; charset="us-ascii"
From: Michael Tuexen <Michael.Tuexen@lurchi.franken.de>
In-Reply-To: <20100805190330.GA21832@openss7.org>
Date: Thu, 05 Aug 2010 22:03:58 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <87E9E4F4-7464-49B3-A516-4BA4ACA18545@lurchi.franken.de>
References: <4C5318B7.2060204@hp.com> <A51D8ACD861B7E41BFC7FE5C64BE96481167B001@MTLEXVS01.ulticom.com> <BE1B7EEE-0B46-46D6-8C0C-5D15A278560C@lurchi.franken.de> <A51D8ACD861B7E41BFC7FE5C64BE96481167B015@MTLEXVS01.ulticom.com> <348884DC-5F88-47A8-8219-644ED6B336B4@lakerest.net> <20100805065615.GA30908@openss7.org> <CBBCCCC8-BA0F-48C8-B1AD-A0870356B008@lurchi.franken.de> <20100805190330.GA21832@openss7.org>
To: bidulock@openss7.org
X-Mailer: Apple Mail (2.1081)
Cc: tsvwg@ietf.org, Randy Stewart <randall@lakerest.net>
X-BeenThere: tsvwg@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Transport Area Working Group <tsvwg.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/tsvwg>, <mailto:tsvwg-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tsvwg>
List-Post: <mailto:tsvwg@ietf.org>
List-Help: <mailto:tsvwg-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tsvwg>, <mailto:tsvwg-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Aug 2010 20:03:32 -0000

On Aug 5, 2010, at 9:03 PM, Brian F. G. Bidulock wrote:

> Michael,
> 
> Michael Tuexen wrote:                                                                                                                                      (Thu, 05 Aug 2010 11:24:05)
>> On Aug 5, 2010, at 8:56 AM, Brian F. G. Bidulock wrote:
>> 
>>> Randy, Michael,
>>> 
>>> Was it your intention to deviate from the POSIX behaviour
>>> of recv()?
>> The problem is that POSIX makes SOCK_SEQPACKET unreliable in
>> contrast to SOCK_STREAM. Having the same function (recv())
>> for the same protocol behave that differently, seems to be
>> wrong to me.
> 
> What do you mean?  POSIX says:
> 
> "SOCK_SEQPACKET
>       Provides sequenced, reliable, bidirectional,
>       connection-mode transmission paths for records.  A record
>       can be sent using one or more output operations and
>       received using one or more input operations, but a single
>       operation never transfers part of more than one record.
>       Record boundaries are visible to the received via the
>       MSG_EOR flag."
> 
> SOCK_SEQPACKET is clearly "reliable".  What do you mean by
How can I receive "using one or more input operations". I can't
do that with recv(), recvfrom() or recvmsg(). They drop the
bytes of the record which do not fit into the buffer. This
makes it "unreliable". As a receiver I have no idea how big
the largest message would be. For SCTP we do no want to loose
parts of the messages.

Best regards
Michael
> 
>> The problem is that POSIX makes SOCK_SEQPACKET unreliable in
>> contrast to SOCK_STREAM.
> 
> --brian
> 
> -- 
> Brian F. G. Bidulock
> bidulock@openss7.org
> http://www.openss7.org/
>