summaryrefslogtreecommitdiff
path: root/include/net/udp.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-04-10 22:31:50 +0300
committerChristoph Hellwig <hch@lst.de>2018-05-16 08:23:35 +0300
commita3d2599b24462c762719a70bc4d2ec8e8cb52fcf (patch)
treea3b5ae4182589c9ee914d4298366377112cb260b /include/net/udp.h
parent3f3942aca6da351a12543aa776467791b63b3a78 (diff)
downloadlinux-a3d2599b24462c762719a70bc4d2ec8e8cb52fcf.tar.xz
ipv{4,6}/udp{,lite}: simplify proc registration
Remove a couple indirections to make the code look like most other protocols. Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'include/net/udp.h')
-rw-r--r--include/net/udp.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/include/net/udp.h b/include/net/udp.h
index 0676b272f6ac..093cd323f66a 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -408,31 +408,27 @@ do { \
#define __UDPX_INC_STATS(sk, field) __UDP_INC_STATS(sock_net(sk), field, 0)
#endif
-/* /proc */
-int udp_seq_open(struct inode *inode, struct file *file);
-
+#ifdef CONFIG_PROC_FS
struct udp_seq_afinfo {
- char *name;
sa_family_t family;
struct udp_table *udp_table;
- const struct file_operations *seq_fops;
- struct seq_operations seq_ops;
};
struct udp_iter_state {
struct seq_net_private p;
- sa_family_t family;
int bucket;
- struct udp_table *udp_table;
};
-#ifdef CONFIG_PROC_FS
-int udp_proc_register(struct net *net, struct udp_seq_afinfo *afinfo);
-void udp_proc_unregister(struct net *net, struct udp_seq_afinfo *afinfo);
+void *udp_seq_start(struct seq_file *seq, loff_t *pos);
+void *udp_seq_next(struct seq_file *seq, void *v, loff_t *pos);
+void udp_seq_stop(struct seq_file *seq, void *v);
+
+extern const struct file_operations udp_afinfo_seq_fops;
+extern const struct file_operations udp6_afinfo_seq_fops;
int udp4_proc_init(void);
void udp4_proc_exit(void);
-#endif
+#endif /* CONFIG_PROC_FS */
int udpv4_offload_init(void);