diff options
author | Christoph Hellwig <hch@lst.de> | 2018-04-10 21:31:50 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-05-16 07:23:35 +0200 |
commit | a3d2599b24462c762719a70bc4d2ec8e8cb52fcf (patch) | |
tree | a3b5ae4182589c9ee914d4298366377112cb260b /include/net/udp.h | |
parent | proc: introduce proc_create_single{,_data} (diff) | |
download | linux-a3d2599b24462c762719a70bc4d2ec8e8cb52fcf.tar.xz linux-a3d2599b24462c762719a70bc4d2ec8e8cb52fcf.zip |
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.h | 20 |
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); |