10046b040SSven Eckelmann /* Copyright (C) 2009-2016 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 net_device; 261e2c2a4fSSven Eckelmann 27cd646ab1SSven Eckelmann enum batadv_gw_modes { 28cd646ab1SSven Eckelmann BATADV_GW_MODE_OFF, 29cd646ab1SSven Eckelmann BATADV_GW_MODE_CLIENT, 30cd646ab1SSven Eckelmann BATADV_GW_MODE_SERVER, 31c6c8fea2SSven Eckelmann }; 32c6c8fea2SSven Eckelmann 33414254e3SMarek Lindner /** 34414254e3SMarek Lindner * enum batadv_bandwidth_units - bandwidth unit types 35414254e3SMarek Lindner * @BATADV_BW_UNIT_KBIT: unit type kbit 36414254e3SMarek Lindner * @BATADV_BW_UNIT_MBIT: unit type mbit 37414254e3SMarek Lindner */ 38414254e3SMarek Lindner enum batadv_bandwidth_units { 39414254e3SMarek Lindner BATADV_BW_UNIT_KBIT, 40414254e3SMarek Lindner BATADV_BW_UNIT_MBIT, 41414254e3SMarek Lindner }; 42414254e3SMarek Lindner 4397ea4ba1SSven Eckelmann #define BATADV_GW_MODE_OFF_NAME "off" 4497ea4ba1SSven Eckelmann #define BATADV_GW_MODE_CLIENT_NAME "client" 4597ea4ba1SSven Eckelmann #define BATADV_GW_MODE_SERVER_NAME "server" 46c6c8fea2SSven Eckelmann 4784d5e5e0SSven Eckelmann ssize_t batadv_gw_bandwidth_set(struct net_device *net_dev, char *buff, 4884d5e5e0SSven Eckelmann size_t count); 49414254e3SMarek Lindner void batadv_gw_tvlv_container_update(struct batadv_priv *bat_priv); 50414254e3SMarek Lindner void batadv_gw_init(struct batadv_priv *bat_priv); 51414254e3SMarek Lindner void batadv_gw_free(struct batadv_priv *bat_priv); 520b5ecc68SAntonio Quartulli bool batadv_parse_throughput(struct net_device *net_dev, char *buff, 530b5ecc68SAntonio Quartulli const char *description, u32 *throughput); 54c6c8fea2SSven Eckelmann 55c6c8fea2SSven Eckelmann #endif /* _NET_BATMAN_ADV_GATEWAY_COMMON_H_ */ 56