diff options
author | Marek Lindner <lindner_marek@yahoo.de> | 2013-04-23 21:39:58 +0800 |
---|---|---|
committer | Antonio Quartulli <antonio@meshcoding.com> | 2013-10-09 21:22:27 +0200 |
commit | 414254e342a0d58144de40c3da777521ebaeeb07 (patch) | |
tree | a292367d064dd72f4b7a095382e11a9974d685af /net/batman-adv/packet.h | |
parent | ef26157747d42254453f6b3ac2bd8bd3c53339c3 (diff) |
batman-adv: tvlv - gateway download/upload bandwidth container
Prior to this patch batman-adv read the advertised uplink bandwidth
from userspace and compressed this information into a single byte
called "gateway class".
Now the download & upload bandwidth information is sent as-is. No
userspace change is necessary since the sysfs API always allowed
to specify a bandwidth.
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Spyros Gasteratos <morfeas3000@gmail.com>
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
Diffstat (limited to 'net/batman-adv/packet.h')
-rw-r--r-- | net/batman-adv/packet.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/net/batman-adv/packet.h b/net/batman-adv/packet.h index b5c21c418a5..6d0b3a73cee 100644 --- a/net/batman-adv/packet.h +++ b/net/batman-adv/packet.h @@ -118,6 +118,14 @@ enum batadv_bla_claimframe { BATADV_CLAIM_TYPE_REQUEST = 0x03, }; +/** + * enum batadv_tvlv_type - tvlv type definitions + * @BATADV_TVLV_GW: gateway tvlv + */ +enum batadv_tvlv_type { + BATADV_TVLV_GW = 0x01, +}; + /* the destination hardware field in the ARP frame is used to * transport the claim type and the group id */ @@ -147,7 +155,7 @@ struct batadv_ogm_packet { __be32 seqno; uint8_t orig[ETH_ALEN]; uint8_t prev_sender[ETH_ALEN]; - uint8_t gw_flags; /* flags related to gateway class */ + uint8_t reserved; uint8_t tq; uint8_t tt_num_changes; uint8_t ttvn; /* translation table version number */ @@ -352,4 +360,15 @@ struct batadv_tvlv_hdr { __be16 len; }; +/** + * struct batadv_tvlv_gateway_data - gateway data propagated through gw tvlv + * container + * @bandwidth_down: advertised uplink download bandwidth + * @bandwidth_up: advertised uplink upload bandwidth + */ +struct batadv_tvlv_gateway_data { + __be32 bandwidth_down; + __be32 bandwidth_up; +}; + #endif /* _NET_BATMAN_ADV_PACKET_H_ */ |