Skip to content

Commit 18c68d5

Browse files
Simon Wunderlichordex
authored andcommitted
batman-adv: reorder batadv_iv_flags
The vis flag is not needed anymore, and since we do a compat bump we can start with the first bit again Signed-off-by: Simon Wunderlich <[email protected]> Signed-off-by: Marek Lindner <[email protected]> Signed-off-by: Antonio Quartulli <[email protected]>
1 parent 9284a47 commit 18c68d5

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

net/batman-adv/packet.h

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,19 @@ enum batadv_subtype {
6767
/* this file is included by batctl which needs these defines */
6868
#define BATADV_COMPAT_VERSION 15
6969

70+
/**
71+
* enum batadv_iv_flags - flags used in B.A.T.M.A.N. IV OGM packets
72+
* @BATADV_NOT_BEST_NEXT_HOP: flag is set when ogm packet is forwarded and was
73+
* previously received from someone else than the best neighbor.
74+
* @BATADV_PRIMARIES_FIRST_HOP: flag is set when the primary interface address
75+
* is used, and the packet travels its first hop.
76+
* @BATADV_DIRECTLINK: flag is for the first hop or if rebroadcasted from a
77+
* one hop neighbor on the interface where it was originally received.
78+
*/
7079
enum batadv_iv_flags {
71-
BATADV_NOT_BEST_NEXT_HOP = BIT(3),
72-
BATADV_PRIMARIES_FIRST_HOP = BIT(4),
73-
BATADV_DIRECTLINK = BIT(6),
80+
BATADV_NOT_BEST_NEXT_HOP = BIT(0),
81+
BATADV_PRIMARIES_FIRST_HOP = BIT(1),
82+
BATADV_DIRECTLINK = BIT(2),
7483
};
7584

7685
/* ICMP message types */
@@ -164,11 +173,12 @@ struct batadv_header {
164173
/**
165174
* struct batadv_ogm_packet - ogm (routing protocol) packet
166175
* @header: common batman packet header
176+
* @flags: contains routing relevant flags - see enum batadv_iv_flags
167177
* @tvlv_len: length of tvlv data following the ogm header
168178
*/
169179
struct batadv_ogm_packet {
170180
struct batadv_header header;
171-
uint8_t flags; /* 0x40: DIRECTLINK flag ... */
181+
uint8_t flags;
172182
__be32 seqno;
173183
uint8_t orig[ETH_ALEN];
174184
uint8_t prev_sender[ETH_ALEN];

0 commit comments

Comments
 (0)