lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 19 Sep 2008 10:25:17 +0300
From:	"Rémi Denis-Courmont" 
	<remi.denis-courmont@...ia.com>
To:	"ext Dan Williams" <dcbw@...hat.com>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH 00/14] [RFC] Phonet protocol stack


	Hello,

On Wednesday 17 September 2008 07:15:48 ext Dan Williams, you wrote:
> Do you have any documentation or examples of how userspace uses this
> interface?

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.

> I'm starting to see a proliferation of methods by which 
> userspace now has to talk to cellular modems and I'd like to keep a
> handle on them, despite the fact that they all pretty much do the same
> thing and thus you'd think they'd expose about the same interface...

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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ