[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120711112308.GA3044@aemeltch-MOBL1>
Date: Wed, 11 Jul 2012 14:23:10 +0300
From: Andrei Emeltchenko <andrei.emeltchenko.news@...il.com>
To: Masatake YAMATO <yamato@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-bluetooth@...r.kernel.org
Subject: Re: [PATCH v3 1/8] bluetooth: /proc/net/ entries for bluetooth
protocols
Hi Masatake,
On Wed, Jul 11, 2012 at 01:58:31PM +0900, Masatake YAMATO wrote:
> (The patch sets are rebased to bluetooth-next. Unnecessary white
> spaces are trimmed.)
>
> lsof command can tell the type of socket processes are using.
> Internal lsof uses inode numbers on socket fs to resolve the type of
> sockets. Files under /proc/net/, such as tcp, udp, unix, etc provides
> such inode information.
>
> Unfortunately bluetooth related protocols don't provide such inode
> information. This patch series introduces /proc/net files for the protocols.
>
> This patch against af_bluetooth.c provides facility to the implementation
> of protocols. This patch extends bt_sock_list and introduces two exported
> function bt_procfs_init, bt_procfs_cleanup.
>
> The type bt_sock_list is already used in some of implementation of
> protocols. bt_procfs_init prepare seq_operations which converts
> protocol own bt_sock_list data to protocol own proc entry when the
> entry is accessed.
>
> What I, lsof user, need is just inode number of bluetooth
> socket. However, people may want more information. The bt_procfs_init
> takes a function pointer for customizing the show handler of
> seq_operations.
I've tested the patch and it creates entries in /proc/net
BTW: Shall lsof be able to identify l2cap protocol?
for l2test it prints: "can't identify protocol"
Best regards
Andrei Emeltchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists