diff options
author | Masatake YAMATO <yamato@redhat.com> | 2012-07-26 01:26:32 +0900 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-08-06 15:02:58 -0300 |
commit | 256a06c8a85df676e80263af349daad1283e529e (patch) | |
tree | feb44aa2fcbcc0ec6a4827f8323153bba4a380fc /net/bluetooth/bnep | |
parent | 4af66c691f4e5c2db9bb00793669a548e9db1974 (diff) | |
download | blackbird-op-linux-256a06c8a85df676e80263af349daad1283e529e.tar.gz blackbird-op-linux-256a06c8a85df676e80263af349daad1283e529e.zip |
Bluetooth: /proc/net/ entries for bluetooth protocols
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.
In v4 patch, __acquires and __releases attributes are added to suppress
sparse warning. Suggested by Andrei Emeltchenko.
In v5 patch, linux/proc_fs.h is included to use PDE. Build error is
reported by Fengguang Wu.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth/bnep')
0 files changed, 0 insertions, 0 deletions