aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/networking/phonet.txt
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /Documentation/networking/phonet.txt
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'Documentation/networking/phonet.txt')
-rw-r--r--Documentation/networking/phonet.txt45
1 files changed, 42 insertions, 3 deletions
diff --git a/Documentation/networking/phonet.txt b/Documentation/networking/phonet.txt
index 6e8ce09f9c73..81003581f47a 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
112not seem useful with Phonet usages (could be added easily). 112not seem useful with Phonet usages (could be added easily).
113 113
114 114
115Resource subscription
116---------------------
117
118A Phonet datagram socket can be subscribed to any number of 8-bits
119Phonet resources, as follow:
120
121 uint32_t res = 0xXX;
122 ioctl(fd, SIOCPNADDRESOURCE, &res);
123
124Subscription is similarly cancelled using the SIOCPNDELRESOURCE I/O
125control request, or when the socket is closed.
126
127Note that no more than one socket can be subcribed to any given
128resource at a time. If not, ioctl() will return EBUSY.
129
130
115Phonet Pipe protocol 131Phonet Pipe protocol
116-------------------- 132--------------------
117 133
@@ -138,9 +154,28 @@ connections, one per accept()'d socket.
138 write(cfd, msg, msglen); 154 write(cfd, msg, msglen);
139 } 155 }
140 156
141Connections are established between two endpoints by a "third party" 157Connections are traditionally established between two endpoints by a
142application. This means that both endpoints are passive; so connect() 158"third party" application. This means that both endpoints are passive.
143is 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
144 179
145WARNING: 180WARNING:
146When polling a connected pipe socket for writability, there is an 181When polling a connected pipe socket for writability, there is an
@@ -165,6 +200,10 @@ The pipe protocol provides two socket options at the SOL_PNPIPE level:
165 interface index of the network interface created by PNPIPE_ENCAP, 200 interface index of the network interface created by PNPIPE_ENCAP,
166 or zero if encapsulation is off. 201 or zero if encapsulation is off.
167 202
203 PNPIPE_HANDLE is a read-only integer value. It contains the underlying
204 identifier ("pipe handle") of the pipe. This is only defined for
205 socket descriptors that are already connected or being connected.
206
168 207
169Authors 208Authors
170------- 209-------