ipv{4,6}/tcp: simplify procfs registration
Avoid most of the afinfo indirections and just call the proc helpers directly. Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
@@ -1747,27 +1747,22 @@ enum tcp_seq_states {
|
||||
TCP_SEQ_STATE_ESTABLISHED,
|
||||
};
|
||||
|
||||
int tcp_seq_open(struct inode *inode, struct file *file);
|
||||
void *tcp_seq_start(struct seq_file *seq, loff_t *pos);
|
||||
void *tcp_seq_next(struct seq_file *seq, void *v, loff_t *pos);
|
||||
void tcp_seq_stop(struct seq_file *seq, void *v);
|
||||
|
||||
struct tcp_seq_afinfo {
|
||||
char *name;
|
||||
sa_family_t family;
|
||||
const struct file_operations *seq_fops;
|
||||
struct seq_operations seq_ops;
|
||||
};
|
||||
|
||||
struct tcp_iter_state {
|
||||
struct seq_net_private p;
|
||||
sa_family_t family;
|
||||
enum tcp_seq_states state;
|
||||
struct sock *syn_wait_sk;
|
||||
int bucket, offset, sbucket, num;
|
||||
loff_t last_pos;
|
||||
};
|
||||
|
||||
int tcp_proc_register(struct net *net, struct tcp_seq_afinfo *afinfo);
|
||||
void tcp_proc_unregister(struct net *net, struct tcp_seq_afinfo *afinfo);
|
||||
|
||||
extern struct request_sock_ops tcp_request_sock_ops;
|
||||
extern struct request_sock_ops tcp6_request_sock_ops;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user