* [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: correct comments in bridge loop avoidance
@ 2012-06-23 10:34 Simon Wunderlich
2012-06-23 10:34 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: rename bridge loop avoidance claim types Simon Wunderlich
2012-06-25 14:28 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: correct comments in bridge loop avoidance Marek Lindner
0 siblings, 2 replies; 4+ messages in thread
From: Simon Wunderlich @ 2012-06-23 10:34 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Simon Wunderlich
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
---
bridge_loop_avoidance.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/bridge_loop_avoidance.c b/bridge_loop_avoidance.c
index 38aab1e..a61bb74 100644
--- a/bridge_loop_avoidance.c
+++ b/bridge_loop_avoidance.c
@@ -280,7 +280,7 @@ static void batadv_bla_send_claim(struct batadv_priv *bat_priv, uint8_t *mac,
NULL,
/* Ethernet SRC/HW SRC: originator mac */
primary_if->net_dev->dev_addr,
- /* HW DST: FF:43:05:XX:00:00
+ /* HW DST: FF:43:05:XX:YY:YY
* with XX = claim type
* and YY:YY = group id
*/
@@ -322,7 +322,8 @@ static void batadv_bla_send_claim(struct batadv_priv *bat_priv, uint8_t *mac,
break;
case BATADV_CLAIM_TYPE_REQUEST:
/* request frame
- * set HW SRC to the special mac containg the crc
+ * set HW SRC and header destination to the receiving backbone
+ * gws mac
*/
memcpy(hw_src, mac, ETH_ALEN);
memcpy(ethhdr->h_dest, mac, ETH_ALEN);
--
1.7.10
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: rename bridge loop avoidance claim types
2012-06-23 10:34 [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: correct comments in bridge loop avoidance Simon Wunderlich
@ 2012-06-23 10:34 ` Simon Wunderlich
2012-06-25 14:30 ` Marek Lindner
2012-06-25 14:28 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: correct comments in bridge loop avoidance Marek Lindner
1 sibling, 1 reply; 4+ messages in thread
From: Simon Wunderlich @ 2012-06-23 10:34 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Simon Wunderlich
for consistency reasons within the code and with the documentation,
we should always call it "claim" and "unclaim".
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
---
bridge_loop_avoidance.c | 18 +++++++++---------
packet.h | 4 ++--
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/bridge_loop_avoidance.c b/bridge_loop_avoidance.c
index a61bb74..6882715 100644
--- a/bridge_loop_avoidance.c
+++ b/bridge_loop_avoidance.c
@@ -294,7 +294,7 @@ static void batadv_bla_send_claim(struct batadv_priv *bat_priv, uint8_t *mac,
/* now we pretend that the client would have sent this ... */
switch (claimtype) {
- case BATADV_CLAIM_TYPE_ADD:
+ case BATADV_CLAIM_TYPE_CLAIM:
/* normal claim frame
* set Ethernet SRC to the clients mac
*/
@@ -302,7 +302,7 @@ static void batadv_bla_send_claim(struct batadv_priv *bat_priv, uint8_t *mac,
batadv_dbg(BATADV_DBG_BLA, bat_priv,
"bla_send_claim(): CLAIM %pM on vid %d\n", mac, vid);
break;
- case BATADV_CLAIM_TYPE_DEL:
+ case BATADV_CLAIM_TYPE_UNCLAIM:
/* unclaim frame
* set HW SRC to the clients mac
*/
@@ -465,7 +465,7 @@ static void batadv_bla_answer_request(struct batadv_priv *bat_priv,
continue;
batadv_bla_send_claim(bat_priv, claim->addr, claim->vid,
- BATADV_CLAIM_TYPE_ADD);
+ BATADV_CLAIM_TYPE_CLAIM);
}
rcu_read_unlock();
}
@@ -700,7 +700,7 @@ static int batadv_handle_unclaim(struct batadv_priv *bat_priv,
if (primary_if && batadv_compare_eth(backbone_addr,
primary_if->net_dev->dev_addr))
batadv_bla_send_claim(bat_priv, claim_addr, vid,
- BATADV_CLAIM_TYPE_DEL);
+ BATADV_CLAIM_TYPE_UNCLAIM);
backbone_gw = batadv_backbone_hash_find(bat_priv, backbone_addr, vid);
@@ -736,7 +736,7 @@ static int batadv_handle_claim(struct batadv_priv *bat_priv,
batadv_bla_add_claim(bat_priv, claim_addr, vid, backbone_gw);
if (batadv_compare_eth(backbone_addr, primary_if->net_dev->dev_addr))
batadv_bla_send_claim(bat_priv, claim_addr, vid,
- BATADV_CLAIM_TYPE_ADD);
+ BATADV_CLAIM_TYPE_CLAIM);
/* TODO: we could call something like tt_local_del() here. */
@@ -779,12 +779,12 @@ static int batadv_check_claim_group(struct batadv_priv *bat_priv,
* otherwise assume it is in the hw_src
*/
switch (bla_dst->type) {
- case BATADV_CLAIM_TYPE_ADD:
+ case BATADV_CLAIM_TYPE_CLAIM:
backbone_addr = hw_src;
break;
case BATADV_CLAIM_TYPE_REQUEST:
case BATADV_CLAIM_TYPE_ANNOUNCE:
- case BATADV_CLAIM_TYPE_DEL:
+ case BATADV_CLAIM_TYPE_UNCLAIM:
backbone_addr = ethhdr->h_source;
break;
default:
@@ -900,12 +900,12 @@ static int batadv_bla_process_claim(struct batadv_priv *bat_priv,
/* check for the different types of claim frames ... */
switch (bla_dst->type) {
- case BATADV_CLAIM_TYPE_ADD:
+ case BATADV_CLAIM_TYPE_CLAIM:
if (batadv_handle_claim(bat_priv, primary_if, hw_src,
ethhdr->h_source, vid))
return 1;
break;
- case BATADV_CLAIM_TYPE_DEL:
+ case BATADV_CLAIM_TYPE_UNCLAIM:
if (batadv_handle_unclaim(bat_priv, primary_if,
ethhdr->h_source, hw_src, vid))
return 1;
diff --git a/packet.h b/packet.h
index c0ed5b4..67374dd 100644
--- a/packet.h
+++ b/packet.h
@@ -92,8 +92,8 @@ enum batadv_tt_client_flags {
/* claim frame types for the bridge loop avoidance */
enum batadv_bla_claimframe {
- BATADV_CLAIM_TYPE_ADD = 0x00,
- BATADV_CLAIM_TYPE_DEL = 0x01,
+ BATADV_CLAIM_TYPE_CLAIM = 0x00,
+ BATADV_CLAIM_TYPE_UNCLAIM = 0x01,
BATADV_CLAIM_TYPE_ANNOUNCE = 0x02,
BATADV_CLAIM_TYPE_REQUEST = 0x03,
};
--
1.7.10
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: correct comments in bridge loop avoidance
2012-06-23 10:34 [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: correct comments in bridge loop avoidance Simon Wunderlich
2012-06-23 10:34 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: rename bridge loop avoidance claim types Simon Wunderlich
@ 2012-06-25 14:28 ` Marek Lindner
1 sibling, 0 replies; 4+ messages in thread
From: Marek Lindner @ 2012-06-25 14:28 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
On Saturday, June 23, 2012 12:34:17 Simon Wunderlich wrote:
> Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
> ---
> bridge_loop_avoidance.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
Applied in revision 4c66b7d.
Thanks,
Marek
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: rename bridge loop avoidance claim types
2012-06-23 10:34 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: rename bridge loop avoidance claim types Simon Wunderlich
@ 2012-06-25 14:30 ` Marek Lindner
0 siblings, 0 replies; 4+ messages in thread
From: Marek Lindner @ 2012-06-25 14:30 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
On Saturday, June 23, 2012 12:34:18 Simon Wunderlich wrote:
> for consistency reasons within the code and with the documentation,
> we should always call it "claim" and "unclaim".
>
> Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
> ---
> bridge_loop_avoidance.c | 18 +++++++++---------
> packet.h | 4 ++--
> 2 files changed, 11 insertions(+), 11 deletions(-)
Applied in revision f9bb019.
Thanks,
Marek
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-06-25 14:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-23 10:34 [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: correct comments in bridge loop avoidance Simon Wunderlich
2012-06-23 10:34 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: rename bridge loop avoidance claim types Simon Wunderlich
2012-06-25 14:30 ` Marek Lindner
2012-06-25 14:28 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: correct comments in bridge loop avoidance Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox