]> git.baikalelectronics.ru Git - kernel.git/commit
[RAW]: Consolidate proc interface.
authorPavel Emelyanov <xemul@openvz.org>
Tue, 20 Nov 2007 06:38:33 +0000 (22:38 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 22:54:32 +0000 (14:54 -0800)
commit0a894134cc32d6e0e25f179fbd347a364c643ffd
tree3bd75f0afd1277d9340aa416ff79eec0be040392
parent7b2aceb3067254a70c6a2f2641ef44124ecc6562
[RAW]: Consolidate proc interface.

Both ipv6/raw.c and ipv4/raw.c use the seq files to walk
through the raw sockets hash and show them.

The "walking" code is rather huge, but is identical in both
cases. The difference is the hash table to walk over and
the protocol family to check (this was not in the first
virsion of the patch, which was noticed by YOSHIFUJI)

Make the ->open store the needed hash table and the family
on the allocated raw_iter_state and make the start/next/stop
callbacks work with it.

This removes most of the code.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/raw.h
net/ipv4/raw.c
net/ipv6/raw.c