blob: ca9bd9fba5b504a8560fab44987de5cc8784b2a3 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Mario Kicherer8e8cda62017-02-21 12:19:47 +01002/*
3 * can in net namespaces
4 */
5
6#ifndef __NETNS_CAN_H__
7#define __NETNS_CAN_H__
8
9#include <linux/spinlock.h>
10
Marc Kleine-Buddeff847ee2017-06-03 20:10:03 +020011struct can_dev_rcv_lists;
Oliver Hartkoppcb5635a2017-04-25 08:19:41 +020012struct s_stats;
13struct s_pstats;
Mario Kicherer8e8cda62017-02-21 12:19:47 +010014
15struct netns_can {
16#if IS_ENABLED(CONFIG_PROC_FS)
17 struct proc_dir_entry *proc_dir;
18 struct proc_dir_entry *pde_version;
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;
Oliver Hartkopp384317e2017-04-25 08:19:42 +020027 struct proc_dir_entry *bcmproc_dir;
Mario Kicherer8e8cda62017-02-21 12:19:47 +010028#endif
29
30 /* receive filters subscribed for 'all' CAN devices */
Marc Kleine-Buddeff847ee2017-06-03 20:10:03 +020031 struct can_dev_rcv_lists *can_rx_alldev_list;
Mario Kicherer8e8cda62017-02-21 12:19:47 +010032 spinlock_t can_rcvlists_lock;
Oliver Hartkoppcb5635a2017-04-25 08:19:41 +020033 struct timer_list can_stattimer;/* timer for statistics update */
34 struct s_stats *can_stats; /* packet statistics */
35 struct s_pstats *can_pstats; /* receive list statistics */
Oliver Hartkopp1ef83312017-04-25 08:19:43 +020036
37 /* CAN GW per-net gateway jobs */
38 struct hlist_head cgw_list;
Mario Kicherer8e8cda62017-02-21 12:19:47 +010039};
40
41#endif /* __NETNS_CAN_H__ */