Hello,
On Wednesday 17 September 2008 07:15:48 ext Dan Williams, you wrote:
On top of this patchset, a modem-to-Linux congestion control protocol, and of
course, a netif would be needed:
+--------------+
| TCP/IP stack |
+--------------+
| GPRS netif | (point-to-point IP network interface)
+--------------+
| Phonet pipe | (PF_PHONET, SOCK_SEQPACKET)
+--------------+
| Phonet stack | <--- this patchset
+--------------+
| HW driver | <--- sent to linux-omap
+--------------+
I still need to polish the Phonet pipe and GPRS netif code.
This is somewhat similar to the UDP-encapsulation already in the kernel (L2TP,
IPsec). In userland, that would look something like:
int lfd, fd, val = PNPIPE_ENCAP_IP, ifindex;
lfd = socket(PF_PHONET, SOCK_SEQPACKET, 0);
listen(lfd, 1);
/* Wait for modem */
fd = accept(lfd, NULL, NULL);
setsockopt(fd, SOL_PNPIPE, PNPIPE_ENCAP, &val, sizeof(val));
getsockopt(fd, SOL_PNPIPE, PNPIPE_IFINDEX, &ifindex, sizeof(ifindex));
printf("Created GPRS interface %s\n", if_indextoname(ifindex, buf));
/* Configure and use IP interface */
close(fd);
printf("Destroyed GPRS interface\n");
I am all for using a more generic and/or cleaner userland API if there is a
better alternative.
Regards,
--
Rémi Denis-Courmont
Maemo Software, Nokia Devices R&D
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html