From patchwork Wed Oct 13 06:17:25 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kumar A Sanghvi X-Patchwork-Id: 67646 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id D135DB70CB for ; Wed, 13 Oct 2010 17:18:09 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752853Ab0JMGSE (ORCPT ); Wed, 13 Oct 2010 02:18:04 -0400 Received: from eu1sys200aog104.obsmtp.com ([207.126.144.117]:36984 "EHLO eu1sys200aog104.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752840Ab0JMGSD (ORCPT ); Wed, 13 Oct 2010 02:18:03 -0400 Received: from source ([164.129.1.35]) (using TLSv1) by eu1sys200aob104.postini.com ([207.126.147.11]) with SMTP ID DSNKTLVPFZQnN+7ZmwiuBRyQP9Bm2EhJbplN@postini.com; Wed, 13 Oct 2010 06:18:02 UTC Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id A4FACA5; Wed, 13 Oct 2010 06:17:56 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 82E851479; Wed, 13 Oct 2010 06:17:56 +0000 (GMT) Received: from exdcvycastm022.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm022", Issuer "exdcvycastm022" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id 731AF24C07D; Wed, 13 Oct 2010 08:17:52 +0200 (CEST) Received: from localhost (10.201.54.119) by exdcvycastm022.EQ1STM.local (10.230.100.30) with Microsoft SMTP Server (TLS) id 8.2.254.0; Wed, 13 Oct 2010 08:17:53 +0200 From: Kumar A Sanghvi To: , , Cc: , , , Kumar Sanghvi Subject: [PATCH] Documentation: Update Phonet doc for Pipe controller changes Date: Wed, 13 Oct 2010 11:47:25 +0530 Message-ID: <1286950645-21902-1-git-send-email-kumar.sanghvi@stericsson.com> X-Mailer: git-send-email 1.7.2.dirty MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Kumar Sanghvi Updates to Phonet doc for Pipe controller 'connect' socket implementation and changes related to socket options. Signed-off-by: Kumar Sanghvi --- Documentation/networking/phonet.txt | 32 ++++++++++++++------------------ 1 files changed, 14 insertions(+), 18 deletions(-) diff --git a/Documentation/networking/phonet.txt b/Documentation/networking/phonet.txt index 2d9bc2b..24ad2ad 100644 --- a/Documentation/networking/phonet.txt +++ b/Documentation/networking/phonet.txt @@ -199,33 +199,29 @@ between itself and a remote pipe-end point (e.g. modem). The implementation adds socket options at SOL_PNPIPE level: - PNPIPE_CREATE - It accepts an integer argument where-in - lower order 16 bits: pn_dev and pn_port pair for remote pep. - higher order 16 bits: 8 bit pipe-handle - - It sends a PNS_PEP_CONNECT_REQ on sequenced socket itself. On getting - PNS_PEP_CONNECT_RESP, it sends PNS_PEP_CONNECT_REQ to remote pep. On - getting response from remote pep, it selects the best possible Flow - control mechanism supported by remote-pep (modem) and then it sends - PNS_PEP_CREATED_IND to the sequenced socket and to the remote pep. - - It then updates the pipe state associated with the sequenced socket to - be PIPE_DISABLED. + PNPIPE_PIPE_HANDLE + It accepts an integer argument for setting value of pipe handle. PNPIPE_ENABLE accepts one integer value (int). If set to zero, the pipe is disabled. If the value is non-zero, the pipe is enabled. If the pipe is not (yet) connected, ENOTCONN is error is returned. - PNPIPE_DESTROY - This will send out PNS_PEP_DISCONNECT_REQ on the sequenced socket and - the remote pep. - It will also update the pipe state associated with the sequenced socket - to PIPE_IDLE +The implementation also adds socket 'connect'. On calling the 'connect', pipe +will be created between the source socket and the destination, and the pipe +state will be set to PIPE_DISABLED. After a pipe has been created and enabled successfully, the Pipe data can be exchanged between the host-pep and remote-pep (modem). +User-space would typically follow below sequence with Pipe controller:- +-socket +-bind +-setsockopt for PNPIPE_PIPE_HANDLE +-connect +-setsockopt for PNPIPE_ENCAP_IP +-setsockopt for PNPIPE_ENABLE + + Authors -------