19f6446c7SSven Eckelmann /* Copyright (C) 2009-2015 B.A.T.M.A.N. contributors:
2c6c8fea2SSven Eckelmann  *
3c6c8fea2SSven Eckelmann  * Marek Lindner
4c6c8fea2SSven Eckelmann  *
5c6c8fea2SSven Eckelmann  * This program is free software; you can redistribute it and/or
6c6c8fea2SSven Eckelmann  * modify it under the terms of version 2 of the GNU General Public
7c6c8fea2SSven Eckelmann  * License as published by the Free Software Foundation.
8c6c8fea2SSven Eckelmann  *
9c6c8fea2SSven Eckelmann  * This program is distributed in the hope that it will be useful, but
10c6c8fea2SSven Eckelmann  * WITHOUT ANY WARRANTY; without even the implied warranty of
11c6c8fea2SSven Eckelmann  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12c6c8fea2SSven Eckelmann  * General Public License for more details.
13c6c8fea2SSven Eckelmann  *
14c6c8fea2SSven Eckelmann  * You should have received a copy of the GNU General Public License
15ebf38fb7SAntonio Quartulli  * along with this program; if not, see <http://www.gnu.org/licenses/>.
16c6c8fea2SSven Eckelmann  */
17c6c8fea2SSven Eckelmann 
18c6c8fea2SSven Eckelmann #ifndef _NET_BATMAN_ADV_GATEWAY_COMMON_H_
19c6c8fea2SSven Eckelmann #define _NET_BATMAN_ADV_GATEWAY_COMMON_H_
20c6c8fea2SSven Eckelmann 
211e2c2a4fSSven Eckelmann #include "main.h"
221e2c2a4fSSven Eckelmann 
231e2c2a4fSSven Eckelmann #include <linux/types.h>
241e2c2a4fSSven Eckelmann 
251e2c2a4fSSven Eckelmann struct batadv_priv;
261e2c2a4fSSven Eckelmann struct net_device;
271e2c2a4fSSven Eckelmann 
28cd646ab1SSven Eckelmann enum batadv_gw_modes {
29cd646ab1SSven Eckelmann 	BATADV_GW_MODE_OFF,
30cd646ab1SSven Eckelmann 	BATADV_GW_MODE_CLIENT,
31cd646ab1SSven Eckelmann 	BATADV_GW_MODE_SERVER,
32c6c8fea2SSven Eckelmann };
33c6c8fea2SSven Eckelmann 
34414254e3SMarek Lindner /**
35414254e3SMarek Lindner  * enum batadv_bandwidth_units - bandwidth unit types
36414254e3SMarek Lindner  * @BATADV_BW_UNIT_KBIT: unit type kbit
37414254e3SMarek Lindner  * @BATADV_BW_UNIT_MBIT: unit type mbit
38414254e3SMarek Lindner  */
39414254e3SMarek Lindner enum batadv_bandwidth_units {
40414254e3SMarek Lindner 	BATADV_BW_UNIT_KBIT,
41414254e3SMarek Lindner 	BATADV_BW_UNIT_MBIT,
42414254e3SMarek Lindner };
43414254e3SMarek Lindner 
4497ea4ba1SSven Eckelmann #define BATADV_GW_MODE_OFF_NAME	"off"
4597ea4ba1SSven Eckelmann #define BATADV_GW_MODE_CLIENT_NAME	"client"
4697ea4ba1SSven Eckelmann #define BATADV_GW_MODE_SERVER_NAME	"server"
47c6c8fea2SSven Eckelmann 
4884d5e5e0SSven Eckelmann ssize_t batadv_gw_bandwidth_set(struct net_device *net_dev, char *buff,
4984d5e5e0SSven Eckelmann 				size_t count);
50414254e3SMarek Lindner void batadv_gw_tvlv_container_update(struct batadv_priv *bat_priv);
51414254e3SMarek Lindner void batadv_gw_init(struct batadv_priv *bat_priv);
52414254e3SMarek Lindner void batadv_gw_free(struct batadv_priv *bat_priv);
53c6c8fea2SSven Eckelmann 
54c6c8fea2SSven Eckelmann #endif /* _NET_BATMAN_ADV_GATEWAY_COMMON_H_ */
55