Blame view

net/batman-adv/debugfs.h 1.64 KB
0046b0402   Sven Eckelmann   batman-adv: updat...
1
  /* Copyright (C) 2010-2016  B.A.T.M.A.N. contributors:
c6c8fea29   Sven Eckelmann   net: Add batman-a...
2
3
4
5
6
7
8
9
10
11
12
13
14
   *
   * Marek Lindner
   *
   * This program is free software; you can redistribute it and/or
   * modify it under the terms of version 2 of the GNU General Public
   * License as published by the Free Software Foundation.
   *
   * This program is distributed in the hope that it will be useful, but
   * WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   * General Public License for more details.
   *
   * You should have received a copy of the GNU General Public License
ebf38fb7a   Antonio Quartulli   batman-adv: remov...
15
   * along with this program; if not, see <http://www.gnu.org/licenses/>.
c6c8fea29   Sven Eckelmann   net: Add batman-a...
16
   */
c6c8fea29   Sven Eckelmann   net: Add batman-a...
17
18
  #ifndef _NET_BATMAN_ADV_DEBUGFS_H_
  #define _NET_BATMAN_ADV_DEBUGFS_H_
1e2c2a4fe   Sven Eckelmann   batman-adv: Add r...
19
  #include "main.h"
1e2c2a4fe   Sven Eckelmann   batman-adv: Add r...
20
  struct net_device;
54590e4d4   Sven Eckelmann   batman-adv: Prefi...
21
  #define BATADV_DEBUGFS_SUBDIR "batman_adv"
c6c8fea29   Sven Eckelmann   net: Add batman-a...
22

dc1cbd145   Sven Eckelmann   batman-adv: Allow...
23
  #if IS_ENABLED(CONFIG_BATMAN_ADV_DEBUGFS)
9bb218828   Markus Pargmann   batman-adv: debug...
24

40a072d77   Sven Eckelmann   batman-adv: Prefi...
25
26
27
28
  void batadv_debugfs_init(void);
  void batadv_debugfs_destroy(void);
  int batadv_debugfs_add_meshif(struct net_device *dev);
  void batadv_debugfs_del_meshif(struct net_device *dev);
5bc7c1eb4   Simon Wunderlich   batman-adv: add d...
29
30
  int batadv_debugfs_add_hardif(struct batadv_hard_iface *hard_iface);
  void batadv_debugfs_del_hardif(struct batadv_hard_iface *hard_iface);
c6c8fea29   Sven Eckelmann   net: Add batman-a...
31

9bb218828   Markus Pargmann   batman-adv: debug...
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
  #else
  
  static inline void batadv_debugfs_init(void)
  {
  }
  
  static inline void batadv_debugfs_destroy(void)
  {
  }
  
  static inline int batadv_debugfs_add_meshif(struct net_device *dev)
  {
  	return 0;
  }
  
  static inline void batadv_debugfs_del_meshif(struct net_device *dev)
  {
  }
  
  static inline
  int batadv_debugfs_add_hardif(struct batadv_hard_iface *hard_iface)
  {
  	return 0;
  }
  
  static inline
  void batadv_debugfs_del_hardif(struct batadv_hard_iface *hard_iface)
  {
  }
  
  #endif
c6c8fea29   Sven Eckelmann   net: Add batman-a...
63
  #endif /* _NET_BATMAN_ADV_DEBUGFS_H_ */