From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751926AbdEELVK convert rfc822-to-8bit (ORCPT ); Fri, 5 May 2017 07:21:10 -0400 Received: from smtp-out6.electric.net ([192.162.217.184]:54441 "EHLO smtp-out6.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751188AbdEELVI (ORCPT ); Fri, 5 May 2017 07:21:08 -0400 From: David Laight To: "'Steven Whitehouse'" , Sowmini Varadhan CC: Sam Kumar , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" Subject: RE: Question about SOCK_SEQPACKET Thread-Topic: Question about SOCK_SEQPACKET Thread-Index: AQHSxYskK00lcxsNNkqKpZgFIpHRpKHlliWQ Date: Fri, 5 May 2017 11:21:02 +0000 Message-ID: <063D6719AE5E284EB5DD2968C1650D6DCFFE60CD@AcuExch.aculab.com> References: <20170505100926.GD1547@oracle.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.99.200] Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Outbound-IP: 156.67.243.126 X-Env-From: David.Laight@ACULAB.COM X-Proto: esmtps X-Revdns: X-HELO: AcuExch.aculab.com X-TLS: TLSv1:AES128-SHA:128 X-Authenticated_ID: X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Steven Whitehouse > Sent: 05 May 2017 11:34 ... > Just before the part that you've quoted, the description for > SOCK_SEQPACKET says: > "The SOCK_SEQPACKET socket type is similar to the SOCK_STREAM type, and > is also connection-oriented. The only difference between these types is > that record boundaries are maintained using the SOCK_SEQPACKET type. 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 parts of more than one record." Right SOCK_SEQPACKET is for protocols like ISO transport. There is no limit on the length of a 'record'. I've written file transfer programs that put the entire file data into a single 'record'. The receiver disconnected on receipt of the 'end of record'. The socket man pages could easily be wrong - they are very IP-centric. Remember ISO transport use declined when Unix became more popular back in the mid 1980s. Unix sockets have never really been used for it - the address information needed just doesn't match that IP (especially IPv4). David