summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2013-05-31 15:05:49 +0000
committerDavid S. Miller <davem@davemloft.net>2013-06-04 12:56:14 -0700
commit8cc785f6f429c2a3fb81745dc142cbd72a462c4a (patch)
treea8b9d6fab0cab1e1026fd99dc10c51ad8244a8cc /include
parent17ef66afc0bdbbdc5c526db5e24bdd2dc3df1205 (diff)
net: ipv4: make the ping /proc code AF-independent
Introduce a ping_seq_afinfo structure (similar to its UDP equivalent) and use it to make some of the ping /proc functions address-family independent. Rename the remaining ping /proc functions from ping_* to ping_v4_*. Compiles and displays reasonable results with CONFIG_IPV6={n,m,y} Signed-off-by: Lorenzo Colitti <lorenzo@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/ping.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/net/ping.h b/include/net/ping.h
index 9242fa090d3d..b9282f019804 100644
--- a/include/net/ping.h
+++ b/include/net/ping.h
@@ -49,6 +49,7 @@ struct ping_table {
struct ping_iter_state {
struct seq_net_private p;
int bucket;
+ sa_family_t family;
};
extern struct proto ping_prot;
@@ -87,6 +88,13 @@ int ping_queue_rcv_skb(struct sock *sk, struct sk_buff *skb);
void ping_rcv(struct sk_buff *skb);
#ifdef CONFIG_PROC_FS
+struct ping_seq_afinfo {
+ char *name;
+ sa_family_t family;
+ const struct file_operations *seq_fops;
+ const struct seq_operations seq_ops;
+};
+
extern int __init ping_proc_init(void);
extern void ping_proc_exit(void);
#endif