aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/networking/phonet.txt
diff options
context:
space:
mode:
authorRémi Denis-Courmont <remi.denis-courmont@nokia.com>2011-03-08 17:44:12 -0500
committerDavid S. Miller <davem@davemloft.net>2011-03-09 14:59:33 -0500
commit297edb6003268c1d60da8c21eb76bf39b6428213 (patch)
treeb17c7544eed3430ed89a56e54a3de14fe9755c3c /Documentation/networking/phonet.txt
parentacaf7df610ff3faf1778ce40d601fc3dd4a41b40 (diff)
Phonet: support active connection without pipe controller on modem
This provides support for newer ISI modems with no need for the earlier experimental compile-time alternative choice. With this, we can now use the same kernel and userspace with both types of modems. This also avoids confusing two different and incompatible state machines, actively connected vs accepted sockets, and adds connection response error handling (processing "SYN/RST" of sorts). Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/networking/phonet.txt')
-rw-r--r--Documentation/networking/phonet.txt53
1 files changed, 24 insertions, 29 deletions
diff --git a/Documentation/networking/phonet.txt b/Documentation/networking/phonet.txt
index cacac968c1c3..3d127791cb06 100644
--- a/Documentation/networking/phonet.txt
+++ b/Documentation/networking/phonet.txt
@@ -154,9 +154,28 @@ connections, one per accept()'d socket.
154 write(cfd, msg, msglen); 154 write(cfd, msg, msglen);
155 } 155 }
156 156
157Connections are established between two endpoints by a "third party" 157Connections are traditionally established between two endpoints by a
158application. This means that both endpoints are passive; so connect() 158"third party" application. This means that both endpoints are passive.
159is not possible. 159
160
161As of Linux kernel version 2.6.39, it is also possible to connect
162two endpoints directly, using connect() on the active side. This is
163intended to support the newer Nokia Wireless Modem API, as found in
164e.g. the Nokia Slim Modem in the ST-Ericsson U8500 platform:
165
166 struct sockaddr_spn spn;
167 int fd;
168
169 fd = socket(PF_PHONET, SOCK_SEQPACKET, PN_PROTO_PIPE);
170 memset(&spn, 0, sizeof(spn));
171 spn.spn_family = AF_PHONET;
172 spn.spn_obj = ...;
173 spn.spn_dev = ...;
174 spn.spn_resource = 0xD9;
175 connect(fd, (struct sockaddr *)&spn, sizeof(spn));
176 /* normal I/O here ... */
177 close(fd);
178
160 179
161WARNING: 180WARNING:
162When polling a connected pipe socket for writability, there is an 181When polling a connected pipe socket for writability, there is an
@@ -189,17 +208,8 @@ The pipe protocol provides two socket options at the SOL_PNPIPE level:
189Phonet Pipe-controller Implementation 208Phonet Pipe-controller Implementation
190------------------------------------- 209-------------------------------------
191 210
192Phonet Pipe-controller is enabled by selecting the CONFIG_PHONET_PIPECTRLR Kconfig 211Phonet Pipe-controller is enabled by selecting the CONFIG_PHONET_PIPECTRLR
193option. It is useful when communicating with those Nokia Modems which do not 212Kconfig option.
194implement Pipe controller in them e.g. Nokia Slim Modem used in ST-Ericsson
195U8500 platform.
196
197The implementation is based on the Data Connection Establishment Sequence
198depicted in 'Nokia Wireless Modem API - Wireless_modem_user_guide.pdf'
199document.
200
201It allows a phonet sequenced socket (host-pep) to initiate a Pipe connection
202between itself and a remote pipe-end point (e.g. modem).
203 213
204The implementation adds socket options at SOL_PNPIPE level: 214The implementation adds socket options at SOL_PNPIPE level:
205 215
@@ -207,21 +217,6 @@ The implementation adds socket options at SOL_PNPIPE level:
207 is disabled. If the value is non-zero, the pipe is enabled. If the pipe 217 is disabled. If the value is non-zero, the pipe is enabled. If the pipe
208 is not (yet) connected, ENOTCONN is error is returned. 218 is not (yet) connected, ENOTCONN is error is returned.
209 219
210The implementation also adds socket 'connect'. On calling the 'connect', pipe
211will be created between the source socket and the destination, and the pipe
212state will be set to PIPE_DISABLED.
213
214After a pipe has been created and enabled successfully, the Pipe data can be
215exchanged between the host-pep and remote-pep (modem).
216
217User-space would typically follow below sequence with Pipe controller:-
218-socket
219-bind
220-setsockopt for PNPIPE_PIPE_HANDLE
221-connect
222-setsockopt for PNPIPE_ENCAP_IP
223-setsockopt for PNPIPE_ENABLE
224
225 220
226Authors 221Authors
227------- 222-------