xref: /linux/include/net/netns/can.h (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * can in net namespaces
4  */
5 
6 #ifndef __NETNS_CAN_H__
7 #define __NETNS_CAN_H__
8 
9 #include <linux/spinlock.h>
10 #include <linux/timer.h>
11 
12 struct can_dev_rcv_lists;
13 struct can_pkg_stats;
14 struct can_rcv_lists_stats;
15 
16 struct netns_can {
17 #if IS_ENABLED(CONFIG_PROC_FS)
18 	struct proc_dir_entry *proc_dir;
19 	struct proc_dir_entry *pde_stats;
20 	struct proc_dir_entry *pde_reset_stats;
21 	struct proc_dir_entry *pde_rcvlist_all;
22 	struct proc_dir_entry *pde_rcvlist_fil;
23 	struct proc_dir_entry *pde_rcvlist_inv;
24 	struct proc_dir_entry *pde_rcvlist_sff;
25 	struct proc_dir_entry *pde_rcvlist_eff;
26 	struct proc_dir_entry *pde_rcvlist_err;
27 	struct proc_dir_entry *bcmproc_dir;
28 #endif
29 
30 	/* receive filters subscribed for 'all' CAN devices */
31 	struct can_dev_rcv_lists *rx_alldev_list;
32 	spinlock_t rcvlists_lock;
33 	struct timer_list stattimer; /* timer for statistics update */
34 	struct can_pkg_stats *pkg_stats;
35 	struct can_rcv_lists_stats *rcv_lists_stats;
36 
37 	/* CAN GW per-net gateway jobs */
38 	struct hlist_head cgw_list;
39 };
40 
41 #endif /* __NETNS_CAN_H__ */
42