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>
This commit is contained in:

committed by
Antonio Quartulli

parent
ef26157747
commit
414254e342
@@ -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_ */
|
||||
|
Reference in New Issue
Block a user