inet_diag: Generalize inet_diag dump and get_exact calls
authorPavel Emelyanov <xemul@parallels.com>
Fri, 9 Dec 2011 06:23:18 +0000 (06:23 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Dec 2011 19:14:08 +0000 (14:14 -0500)
commit1942c518ca017f376b267a7c5e78c15d37202442
tree9ead5443adf15f2264240c928ff2514349fdcade
parent3c4d05c8056724aff3abc20650807dd828fded54
inet_diag: Generalize inet_diag dump and get_exact calls

Introduce two callbacks in inet_diag_handler -- one for dumping all
sockets (with filters) and the other one for dumping a single sk.

Replace direct calls to icsk handlers with indirect calls to callbacks
provided by handlers.

Make existing TCP and DCCP handlers use provided helpers for icsk-s.

The UDP diag module will provide its own.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/inet_diag.h
net/dccp/diag.c
net/ipv4/inet_diag.c
net/ipv4/tcp_diag.c