All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antonio Quartulli <antonio@meshcoding.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org,
	Simon Wunderlich <siwu@hrz.tu-chemnitz.de>,
	Antonio Quartulli <antonio@meshcoding.com>,
	Marek Lindner <lindner_marek@yahoo.de>
Subject: [B.A.T.M.A.N.] [PATCH 16/16] batman-adv: reorder batadv_iv_flags
Date: Wed,  9 Oct 2013 21:32:54 +0200	[thread overview]
Message-ID: <1381347174-3629-17-git-send-email-antonio@meshcoding.com> (raw)
In-Reply-To: <1381347174-3629-1-git-send-email-antonio@meshcoding.com>

From: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>

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 <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
---
 net/batman-adv/packet.h | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/net/batman-adv/packet.h b/net/batman-adv/packet.h
index 4e5fe7d..4361bae 100644
--- a/net/batman-adv/packet.h
+++ b/net/batman-adv/packet.h
@@ -67,10 +67,19 @@ enum batadv_subtype {
 /* this file is included by batctl which needs these defines */
 #define BATADV_COMPAT_VERSION 15
 
+/**
+ * enum batadv_iv_flags - flags used in B.A.T.M.A.N. IV OGM packets
+ * @BATADV_NOT_BEST_NEXT_HOP: flag is set when ogm packet is forwarded and was
+ *     previously received from someone else than the best neighbor.
+ * @BATADV_PRIMARIES_FIRST_HOP: flag is set when the primary interface address
+ *     is used, and the packet travels its first hop.
+ * @BATADV_DIRECTLINK: flag is for the first hop or if rebroadcasted from a
+ *     one hop neighbor on the interface where it was originally received.
+ */
 enum batadv_iv_flags {
-	BATADV_NOT_BEST_NEXT_HOP   = BIT(3),
-	BATADV_PRIMARIES_FIRST_HOP = BIT(4),
-	BATADV_DIRECTLINK	   = BIT(6),
+	BATADV_NOT_BEST_NEXT_HOP   = BIT(0),
+	BATADV_PRIMARIES_FIRST_HOP = BIT(1),
+	BATADV_DIRECTLINK          = BIT(2),
 };
 
 /* ICMP message types */
@@ -164,11 +173,12 @@ struct batadv_header {
 /**
  * struct batadv_ogm_packet - ogm (routing protocol) packet
  * @header: common batman packet header
+ * @flags: contains routing relevant flags - see enum batadv_iv_flags
  * @tvlv_len: length of tvlv data following the ogm header
  */
 struct batadv_ogm_packet {
 	struct batadv_header header;
-	uint8_t  flags;    /* 0x40: DIRECTLINK flag ... */
+	uint8_t  flags;
 	__be32   seqno;
 	uint8_t  orig[ETH_ALEN];
 	uint8_t  prev_sender[ETH_ALEN];
-- 
1.8.3.2


WARNING: multiple messages have this Message-ID (diff)
From: Antonio Quartulli <antonio@meshcoding.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org,
	Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>,
	Simon Wunderlich <siwu@hrz.tu-chemnitz.de>,
	Marek Lindner <lindner_marek@yahoo.de>,
	Antonio Quartulli <antonio@meshcoding.com>
Subject: [PATCH 16/16] batman-adv: reorder batadv_iv_flags
Date: Wed,  9 Oct 2013 21:32:54 +0200	[thread overview]
Message-ID: <1381347174-3629-17-git-send-email-antonio@meshcoding.com> (raw)
In-Reply-To: <1381347174-3629-1-git-send-email-antonio@meshcoding.com>

From: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>

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 <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
---
 net/batman-adv/packet.h | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/net/batman-adv/packet.h b/net/batman-adv/packet.h
index 4e5fe7d..4361bae 100644
--- a/net/batman-adv/packet.h
+++ b/net/batman-adv/packet.h
@@ -67,10 +67,19 @@ enum batadv_subtype {
 /* this file is included by batctl which needs these defines */
 #define BATADV_COMPAT_VERSION 15
 
+/**
+ * enum batadv_iv_flags - flags used in B.A.T.M.A.N. IV OGM packets
+ * @BATADV_NOT_BEST_NEXT_HOP: flag is set when ogm packet is forwarded and was
+ *     previously received from someone else than the best neighbor.
+ * @BATADV_PRIMARIES_FIRST_HOP: flag is set when the primary interface address
+ *     is used, and the packet travels its first hop.
+ * @BATADV_DIRECTLINK: flag is for the first hop or if rebroadcasted from a
+ *     one hop neighbor on the interface where it was originally received.
+ */
 enum batadv_iv_flags {
-	BATADV_NOT_BEST_NEXT_HOP   = BIT(3),
-	BATADV_PRIMARIES_FIRST_HOP = BIT(4),
-	BATADV_DIRECTLINK	   = BIT(6),
+	BATADV_NOT_BEST_NEXT_HOP   = BIT(0),
+	BATADV_PRIMARIES_FIRST_HOP = BIT(1),
+	BATADV_DIRECTLINK          = BIT(2),
 };
 
 /* ICMP message types */
@@ -164,11 +173,12 @@ struct batadv_header {
 /**
  * struct batadv_ogm_packet - ogm (routing protocol) packet
  * @header: common batman packet header
+ * @flags: contains routing relevant flags - see enum batadv_iv_flags
  * @tvlv_len: length of tvlv data following the ogm header
  */
 struct batadv_ogm_packet {
 	struct batadv_header header;
-	uint8_t  flags;    /* 0x40: DIRECTLINK flag ... */
+	uint8_t  flags;
 	__be32   seqno;
 	uint8_t  orig[ETH_ALEN];
 	uint8_t  prev_sender[ETH_ALEN];
-- 
1.8.3.2

  parent reply	other threads:[~2013-10-09 19:32 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-09 19:32 [B.A.T.M.A.N.] pull request: batman-adv 2013-10-09b Antonio Quartulli
2013-10-09 19:32 ` Antonio Quartulli
2013-10-09 19:32 ` [B.A.T.M.A.N.] [PATCH 01/16] MAINTAINERS: batman-adv - update emails Antonio Quartulli
2013-10-09 19:32   ` Antonio Quartulli
2013-10-09 19:32 ` [B.A.T.M.A.N.] [PATCH 02/16] batman-adv: switch to a new packet compatibility version Antonio Quartulli
2013-10-09 19:32   ` Antonio Quartulli
2013-10-09 19:32 ` [B.A.T.M.A.N.] [PATCH 03/16] batman-adv: tvlv - basic infrastructure Antonio Quartulli
2013-10-09 19:32   ` Antonio Quartulli
2013-10-09 19:32 ` [B.A.T.M.A.N.] [PATCH 04/16] batman-adv: tvlv - gateway download/upload bandwidth container Antonio Quartulli
2013-10-09 19:32   ` Antonio Quartulli
2013-10-09 19:32 ` [B.A.T.M.A.N.] [PATCH 05/16] batman-adv: tvlv - add distributed arp table container Antonio Quartulli
2013-10-09 19:32   ` Antonio Quartulli
2013-10-09 19:32 ` [B.A.T.M.A.N.] [PATCH 06/16] batman-adv: tvlv - add network coding container Antonio Quartulli
2013-10-09 19:32   ` Antonio Quartulli
2013-10-09 19:32 ` [B.A.T.M.A.N.] [PATCH 07/16] batman-adv: tvlv - convert tt data sent within OGMs Antonio Quartulli
2013-10-09 19:32   ` Antonio Quartulli
2013-10-09 19:32 ` [B.A.T.M.A.N.] [PATCH 08/16] batman-adv: tvlv - convert tt query packet to use tvlv unicast packets Antonio Quartulli
2013-10-09 19:32   ` Antonio Quartulli
2013-10-09 19:32 ` [B.A.T.M.A.N.] [PATCH 09/16] batman-adv: tvlv - convert roaming adv " Antonio Quartulli
2013-10-09 19:32   ` Antonio Quartulli
2013-10-09 19:32 ` [B.A.T.M.A.N.] [PATCH 10/16] batman-adv: use CRC32C instead of CRC16 in TT code Antonio Quartulli
2013-10-09 19:32   ` Antonio Quartulli
2013-10-09 19:32 ` [B.A.T.M.A.N.] [PATCH 11/16] batman-adv: move BATADV_TT_CLIENT_TEMP to higher bit Antonio Quartulli
2013-10-09 19:32   ` Antonio Quartulli
2013-10-09 19:32 ` [B.A.T.M.A.N.] [PATCH 12/16] batman-adv: remove vis functionality Antonio Quartulli
2013-10-09 19:32   ` Antonio Quartulli
2013-10-09 19:32 ` [B.A.T.M.A.N.] [PATCH 13/16] batman-adv: add build check macros for packet member offset Antonio Quartulli
2013-10-09 19:32   ` Antonio Quartulli
2013-10-10  8:37   ` [B.A.T.M.A.N.] " David Laight
2013-10-10  8:37     ` David Laight
2013-10-10  8:55     ` [B.A.T.M.A.N.] " Antonio Quartulli
2013-10-10  8:55       ` Antonio Quartulli
2013-10-09 19:32 ` [B.A.T.M.A.N.] [PATCH 14/16] batman-adv: reorder packet types Antonio Quartulli
2013-10-09 19:32   ` Antonio Quartulli
2013-10-09 19:32 ` [B.A.T.M.A.N.] [PATCH 15/16] batman-adv: remove packed from batadv_ogm_packet Antonio Quartulli
2013-10-09 19:32   ` Antonio Quartulli
2013-10-09 19:32 ` Antonio Quartulli [this message]
2013-10-09 19:32   ` [PATCH 16/16] batman-adv: reorder batadv_iv_flags Antonio Quartulli
2013-10-09 19:56 ` [B.A.T.M.A.N.] pull request: batman-adv 2013-10-09b David Miller
2013-10-09 19:56   ` David Miller
2013-10-11  6:10   ` [B.A.T.M.A.N.] " Antonio Quartulli
2013-10-11  6:10     ` Antonio Quartulli
2013-10-11 20:45     ` [B.A.T.M.A.N.] " David Miller
2013-10-11 20:45       ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2013-10-09 12:40 [B.A.T.M.A.N.] pull request: batman-adv 2013-10-09 Antonio Quartulli
2013-10-09 12:40 ` [B.A.T.M.A.N.] [PATCH 16/16] batman-adv: reorder batadv_iv_flags Antonio Quartulli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1381347174-3629-17-git-send-email-antonio@meshcoding.com \
    --to=antonio@meshcoding.com \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=davem@davemloft.net \
    --cc=lindner_marek@yahoo.de \
    --cc=netdev@vger.kernel.org \
    --cc=siwu@hrz.tu-chemnitz.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.