diff options
Diffstat (limited to 'Documentation/networking/phonet.txt')
-rw-r--r-- | Documentation/networking/phonet.txt | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/Documentation/networking/phonet.txt b/Documentation/networking/phonet.txt index 6e8ce09f9c73..24ad2adba6e5 100644 --- a/Documentation/networking/phonet.txt +++ b/Documentation/networking/phonet.txt | |||
@@ -112,6 +112,22 @@ However, connect() and getpeername() are not supported, as they did | |||
112 | not seem useful with Phonet usages (could be added easily). | 112 | not seem useful with Phonet usages (could be added easily). |
113 | 113 | ||
114 | 114 | ||
115 | Resource subscription | ||
116 | --------------------- | ||
117 | |||
118 | A Phonet datagram socket can be subscribed to any number of 8-bits | ||
119 | Phonet resources, as follow: | ||
120 | |||
121 | uint32_t res = 0xXX; | ||
122 | ioctl(fd, SIOCPNADDRESOURCE, &res); | ||
123 | |||
124 | Subscription is similarly cancelled using the SIOCPNDELRESOURCE I/O | ||
125 | control request, or when the socket is closed. | ||
126 | |||
127 | Note that no more than one socket can be subcribed to any given | ||
128 | resource at a time. If not, ioctl() will return EBUSY. | ||
129 | |||
130 | |||
115 | Phonet Pipe protocol | 131 | Phonet Pipe protocol |
116 | -------------------- | 132 | -------------------- |
117 | 133 | ||
@@ -166,6 +182,46 @@ The pipe protocol provides two socket options at the SOL_PNPIPE level: | |||
166 | or zero if encapsulation is off. | 182 | or zero if encapsulation is off. |
167 | 183 | ||
168 | 184 | ||
185 | Phonet Pipe-controller Implementation | ||
186 | ------------------------------------- | ||
187 | |||
188 | Phonet Pipe-controller is enabled by selecting the CONFIG_PHONET_PIPECTRLR Kconfig | ||
189 | option. It is useful when communicating with those Nokia Modems which do not | ||
190 | implement Pipe controller in them e.g. Nokia Slim Modem used in ST-Ericsson | ||
191 | U8500 platform. | ||
192 | |||
193 | The implementation is based on the Data Connection Establishment Sequence | ||
194 | depicted in 'Nokia Wireless Modem API - Wireless_modem_user_guide.pdf' | ||
195 | document. | ||
196 | |||
197 | It allows a phonet sequenced socket (host-pep) to initiate a Pipe connection | ||
198 | between itself and a remote pipe-end point (e.g. modem). | ||
199 | |||
200 | The implementation adds socket options at SOL_PNPIPE level: | ||
201 | |||
202 | PNPIPE_PIPE_HANDLE | ||
203 | It accepts an integer argument for setting value of pipe handle. | ||
204 | |||
205 | PNPIPE_ENABLE accepts one integer value (int). If set to zero, the pipe | ||
206 | is disabled. If the value is non-zero, the pipe is enabled. If the pipe | ||
207 | is not (yet) connected, ENOTCONN is error is returned. | ||
208 | |||
209 | The implementation also adds socket 'connect'. On calling the 'connect', pipe | ||
210 | will be created between the source socket and the destination, and the pipe | ||
211 | state will be set to PIPE_DISABLED. | ||
212 | |||
213 | After a pipe has been created and enabled successfully, the Pipe data can be | ||
214 | exchanged between the host-pep and remote-pep (modem). | ||
215 | |||
216 | User-space would typically follow below sequence with Pipe controller:- | ||
217 | -socket | ||
218 | -bind | ||
219 | -setsockopt for PNPIPE_PIPE_HANDLE | ||
220 | -connect | ||
221 | -setsockopt for PNPIPE_ENCAP_IP | ||
222 | -setsockopt for PNPIPE_ENABLE | ||
223 | |||
224 | |||
169 | Authors | 225 | Authors |
170 | ------- | 226 | ------- |
171 | 227 | ||