• P
    [RAW]: Consolidate proc interface. · 42a73808
    Pavel Emelyanov 提交于
    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: NPavel Emelyanov <xemul@openvz.org>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    42a73808
raw.c 28.3 KB