Subject: Re: [PATCH 1/4] [net-2.6.22] IrDA: IrLAP raw mode

From: Samuel Ortiz <[email-masked]>
Date: Sat, 7 Apr 2007 02:53:39 +0300

On Fri, Mar 16, 2007 at 08:34:51PM -0700, David Miller wrote:
> From: Samuel Ortiz <[email-masked]>
> Date: Sat, 17 Mar 2007 03:57:29 +0200
> 
> > This patch allows us to bypass the IrDA stack down to the IrLAP level.
> > Sending and receiving frames is done through a character device.
> > This is useful for e.g. doing real IrDA sniffing, testing external IrDA
> > stacks and for Lirc (once I will add the framing disabling switch).
> > 
> > Signed-off-by: Samuel Ortiz <[email-masked]>
> 
> I understand the idea, but I fail to see any reason this should not be
> done with sockets.
> 
> Everywhere else we provide this kind of functionality it is either
> with netlink (nf_queue etc.) or raw sockets of some kind
> (AF_INET/SOCK_RAW, AF_PACKET, etc.)
> 
> Therefore IRDA should really provide this facility in some similar
> manner.
I definitely agree here. Actually, you can already sniff IrDA packets through
an AF_PACKET socket, that's what irdadump does. My patch was useless, forget
about it...

I have a question though: On top of the regular IrDA sniffing done with a
simple AF_PACKET socket, I also would like to be able to disable TX at the
IrLAP level (typically, this would allow an IrDA device to listen to all
the packets from an IrDA link without being noticed by the other devices).

I was thinking of adding a protocol private ioctl (as in SIOCPROTOPRIVATE) to
let userspace toggle an IrLAP flag (one per IrLAP instance) that would
disable a specific IrDA device TX path.
Would that be an acceptable solution, or would you rather see a netlink socket
for that purpose ?

Cheers,
Samuel.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV