1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __SEQ_FILE_NET_H__
3 #define __SEQ_FILE_NET_H__
5 #include <linux/seq_file.h>
8 extern struct net init_net;
10 struct seq_net_private {
16 static inline struct net *seq_file_net(struct seq_file *seq)
19 return ((struct seq_net_private *)seq->private)->net;
26 * This one is needed for proc_create_net_single since net is stored directly
27 * in private not as a struct i.e. seq_file_net can't be used.
29 static inline struct net *seq_file_single_net(struct seq_file *seq)
32 return (struct net *)seq->private;