Repository : ssh://git@open-mesh.org/batctl
On branch : master
commit 0979e7217031b3c44cda7cfddbe6bbdedd2f6f13 Author: Antonio Quartulli ordex@autistici.org Date: Sun Apr 28 10:09:26 2013 +0200
batctl: use the BigEndian notation for variables sent over the wire
All the variables sent over the wire must report the BigEndian (__be*) notation so that sparse can easily spot any bug due to missing conversions.
This patch changes the type used by the up and download bandwidth in the new GW TVLV from uint32_t to __be32 and adds all the related conversions.
Introduced by: 0853ec7fafe0a195754454832993c6b35e22b842 ("batman-adv: tvlv - gateway download/upload bandwidth container")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
0979e7217031b3c44cda7cfddbe6bbdedd2f6f13 packet.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/packet.h b/packet.h index 58fe4eb..559c738 100644 --- a/packet.h +++ b/packet.h @@ -372,8 +372,8 @@ struct batadv_tvlv_long { * @bandwidth_up: advertised uplink upload bandwidth */ struct batadv_tvlv_gateway_data { - uint32_t bandwidth_down; - uint32_t bandwidth_up; + __be32 bandwidth_down; + __be32 bandwidth_up; };
/**