10b873931SAntonio Quartulli /* Copyright (C) 2009-2013 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 
21cd646ab1SSven Eckelmann enum batadv_gw_modes {
22cd646ab1SSven Eckelmann 	BATADV_GW_MODE_OFF,
23cd646ab1SSven Eckelmann 	BATADV_GW_MODE_CLIENT,
24cd646ab1SSven Eckelmann 	BATADV_GW_MODE_SERVER,
25c6c8fea2SSven Eckelmann };
26c6c8fea2SSven Eckelmann 
27414254e3SMarek Lindner /**
28414254e3SMarek Lindner  * enum batadv_bandwidth_units - bandwidth unit types
29414254e3SMarek Lindner  * @BATADV_BW_UNIT_KBIT: unit type kbit
30414254e3SMarek Lindner  * @BATADV_BW_UNIT_MBIT: unit type mbit
31414254e3SMarek Lindner  */
32414254e3SMarek Lindner enum batadv_bandwidth_units {
33414254e3SMarek Lindner 	BATADV_BW_UNIT_KBIT,
34414254e3SMarek Lindner 	BATADV_BW_UNIT_MBIT,
35414254e3SMarek Lindner };
36414254e3SMarek Lindner 
3797ea4ba1SSven Eckelmann #define BATADV_GW_MODE_OFF_NAME	"off"
3897ea4ba1SSven Eckelmann #define BATADV_GW_MODE_CLIENT_NAME	"client"
3997ea4ba1SSven Eckelmann #define BATADV_GW_MODE_SERVER_NAME	"server"
40c6c8fea2SSven Eckelmann 
4184d5e5e0SSven Eckelmann ssize_t batadv_gw_bandwidth_set(struct net_device *net_dev, char *buff,
4284d5e5e0SSven Eckelmann 				size_t count);
43414254e3SMarek Lindner void batadv_gw_tvlv_container_update(struct batadv_priv *bat_priv);
44414254e3SMarek Lindner void batadv_gw_init(struct batadv_priv *bat_priv);
45414254e3SMarek Lindner void batadv_gw_free(struct batadv_priv *bat_priv);
46c6c8fea2SSven Eckelmann 
47c6c8fea2SSven Eckelmann #endif /* _NET_BATMAN_ADV_GATEWAY_COMMON_H_ */
48