public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: mihail.costea2005@gmail.com
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [RFC 2/6] batman-adv: Renames batadv_dat_snoop_*_arp_* functions to batadv_dat_snoop_*_pkt_*
Date: Mon,  8 Jul 2013 03:12:41 +0300	[thread overview]
Message-ID: <1373242365-763-2-git-send-email-mihail.costea2005@gmail.com> (raw)
In-Reply-To: <1373242365-763-1-git-send-email-mihail.costea2005@gmail.com>

From: Mihail Costea <mihail.costea90@gmail.com>

Renames snooping functions in order to suggest that they should work on
more protocols than ARP.

Signed-off-by: Mihail Costea <mihail.costea90@gmail.com>
Signed-off-by: Stefan Popa <Stefan.A.Popa@intel.com>
Reviewed-by: Stefan Popa <Stefan.A.Popa@intel.com>

---
 distributed-arp-table.c |   16 ++++++++--------
 distributed-arp-table.h |   16 ++++++++--------
 routing.c               |    8 ++++----
 soft-interface.c        |    6 +++---
 4 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/distributed-arp-table.c b/distributed-arp-table.c
index 90565d0..b2a4fe5 100644
--- a/distributed-arp-table.c
+++ b/distributed-arp-table.c
@@ -976,7 +976,7 @@ static unsigned short batadv_dat_get_vid(struct sk_buff *skb, int *hdr_size)
 }
 
 /**
- * batadv_dat_snoop_outgoing_arp_request - snoop the ARP request and try to
+ * batadv_dat_snoop_outgoing_pkt_request - snoop the ARP request and try to
  * answer using DAT
  * @bat_priv: the bat priv with all the soft interface information
  * @skb: packet to check
@@ -985,7 +985,7 @@ static unsigned short batadv_dat_get_vid(struct sk_buff *skb, int *hdr_size)
  * otherwise. In case of a positive return value the message has to be enqueued
  * to permit the fallback.
  */
-bool batadv_dat_snoop_outgoing_arp_request(struct batadv_priv *bat_priv,
+bool batadv_dat_snoop_outgoing_pkt_request(struct batadv_priv *bat_priv,
 					   struct sk_buff *skb)
 {
 	uint16_t type = 0;
@@ -1063,7 +1063,7 @@ out:
 }
 
 /**
- * batadv_dat_snoop_incoming_arp_request - snoop the ARP request and try to
+ * batadv_dat_snoop_incoming_pkt_request - snoop the ARP request and try to
  * answer using the local DAT storage
  * @bat_priv: the bat priv with all the soft interface information
  * @skb: packet to check
@@ -1071,7 +1071,7 @@ out:
  *
  * Returns true if the request has been answered, false otherwise.
  */
-bool batadv_dat_snoop_incoming_arp_request(struct batadv_priv *bat_priv,
+bool batadv_dat_snoop_incoming_pkt_request(struct batadv_priv *bat_priv,
 					   struct sk_buff *skb, int hdr_size)
 {
 	uint16_t type;
@@ -1137,11 +1137,11 @@ out:
 }
 
 /**
- * batadv_dat_snoop_outgoing_arp_reply - snoop the ARP reply and fill the DHT
+ * batadv_dat_snoop_outgoing_pkt_reply - snoop the ARP reply and fill the DHT
  * @bat_priv: the bat priv with all the soft interface information
  * @skb: packet to check
  */
-void batadv_dat_snoop_outgoing_arp_reply(struct batadv_priv *bat_priv,
+void batadv_dat_snoop_outgoing_pkt_reply(struct batadv_priv *bat_priv,
 					 struct sk_buff *skb)
 {
 	uint16_t type;
@@ -1178,13 +1178,13 @@ void batadv_dat_snoop_outgoing_arp_reply(struct batadv_priv *bat_priv,
 			     BATADV_P_DAT_DHT_PUT);
 }
 /**
- * batadv_dat_snoop_incoming_arp_reply - snoop the ARP reply and fill the local
+ * batadv_dat_snoop_incoming_pkt_reply - snoop the ARP reply and fill the local
  * DAT storage only
  * @bat_priv: the bat priv with all the soft interface information
  * @skb: packet to check
  * @hdr_size: size of the encapsulation header
  */
-bool batadv_dat_snoop_incoming_arp_reply(struct batadv_priv *bat_priv,
+bool batadv_dat_snoop_incoming_pkt_reply(struct batadv_priv *bat_priv,
 					 struct sk_buff *skb, int hdr_size)
 {
 	uint16_t type;
diff --git a/distributed-arp-table.h b/distributed-arp-table.h
index 557bab9..21d7b24 100644
--- a/distributed-arp-table.h
+++ b/distributed-arp-table.h
@@ -31,13 +31,13 @@
 #define BATADV_DAT_DATA_MAX_LEN 16
 
 void batadv_dat_status_update(struct net_device *net_dev);
-bool batadv_dat_snoop_outgoing_arp_request(struct batadv_priv *bat_priv,
+bool batadv_dat_snoop_outgoing_pkt_request(struct batadv_priv *bat_priv,
 					   struct sk_buff *skb);
-bool batadv_dat_snoop_incoming_arp_request(struct batadv_priv *bat_priv,
+bool batadv_dat_snoop_incoming_pkt_request(struct batadv_priv *bat_priv,
 					   struct sk_buff *skb, int hdr_size);
-void batadv_dat_snoop_outgoing_arp_reply(struct batadv_priv *bat_priv,
+void batadv_dat_snoop_outgoing_pkt_reply(struct batadv_priv *bat_priv,
 					 struct sk_buff *skb);
-bool batadv_dat_snoop_incoming_arp_reply(struct batadv_priv *bat_priv,
+bool batadv_dat_snoop_incoming_pkt_reply(struct batadv_priv *bat_priv,
 					 struct sk_buff *skb, int hdr_size);
 bool batadv_dat_drop_broadcast_packet(struct batadv_priv *bat_priv,
 				      struct batadv_forw_packet *forw_packet);
@@ -105,28 +105,28 @@ static inline void batadv_dat_status_update(struct net_device *net_dev)
 }
 
 static inline bool
-batadv_dat_snoop_outgoing_arp_request(struct batadv_priv *bat_priv,
+batadv_dat_snoop_outgoing_pkt_request(struct batadv_priv *bat_priv,
 				      struct sk_buff *skb)
 {
 	return false;
 }
 
 static inline bool
-batadv_dat_snoop_incoming_arp_request(struct batadv_priv *bat_priv,
+batadv_dat_snoop_incoming_pkt_request(struct batadv_priv *bat_priv,
 				      struct sk_buff *skb, int hdr_size)
 {
 	return false;
 }
 
 static inline bool
-batadv_dat_snoop_outgoing_arp_reply(struct batadv_priv *bat_priv,
+batadv_dat_snoop_outgoing_pkt_reply(struct batadv_priv *bat_priv,
 				    struct sk_buff *skb)
 {
 	return false;
 }
 
 static inline bool
-batadv_dat_snoop_incoming_arp_reply(struct batadv_priv *bat_priv,
+batadv_dat_snoop_incoming_pkt_reply(struct batadv_priv *bat_priv,
 				    struct sk_buff *skb, int hdr_size)
 {
 	return false;
diff --git a/routing.c b/routing.c
index e63b05d..d4fae86 100644
--- a/routing.c
+++ b/routing.c
@@ -937,10 +937,10 @@ int batadv_recv_unicast_packet(struct sk_buff *skb,
 			orig_node = batadv_orig_hash_find(bat_priv, orig_addr);
 		}
 
-		if (batadv_dat_snoop_incoming_arp_request(bat_priv, skb,
+		if (batadv_dat_snoop_incoming_pkt_request(bat_priv, skb,
 							  hdr_size))
 			goto rx_success;
-		if (batadv_dat_snoop_incoming_arp_reply(bat_priv, skb,
+		if (batadv_dat_snoop_incoming_pkt_reply(bat_priv, skb,
 							hdr_size))
 			goto rx_success;
 
@@ -1142,9 +1142,9 @@ int batadv_recv_bcast_packet(struct sk_buff *skb,
 	if (batadv_bla_is_backbone_gw(skb, orig_node, hdr_size))
 		goto out;
 
-	if (batadv_dat_snoop_incoming_arp_request(bat_priv, skb, hdr_size))
+	if (batadv_dat_snoop_incoming_pkt_request(bat_priv, skb, hdr_size))
 		goto rx_success;
-	if (batadv_dat_snoop_incoming_arp_reply(bat_priv, skb, hdr_size))
+	if (batadv_dat_snoop_incoming_pkt_reply(bat_priv, skb, hdr_size))
 		goto rx_success;
 
 	/* broadcast for me */
diff --git a/soft-interface.c b/soft-interface.c
index d897194..d294e36 100644
--- a/soft-interface.c
+++ b/soft-interface.c
@@ -245,7 +245,7 @@ static int batadv_interface_tx(struct sk_buff *skb,
 		 * packet, instead we first wait for DAT to try to retrieve the
 		 * correct ARP entry
 		 */
-		if (batadv_dat_snoop_outgoing_arp_request(bat_priv, skb))
+		if (batadv_dat_snoop_outgoing_pkt_request(bat_priv, skb))
 			brd_delay = msecs_to_jiffies(ARP_REQ_DELAY);
 
 		if (batadv_skb_head_push(skb, sizeof(*bcast_packet)) < 0)
@@ -284,10 +284,10 @@ static int batadv_interface_tx(struct sk_buff *skb,
 				goto dropped;
 		}
 
-		if (batadv_dat_snoop_outgoing_arp_request(bat_priv, skb))
+		if (batadv_dat_snoop_outgoing_pkt_request(bat_priv, skb))
 			goto dropped;
 
-		batadv_dat_snoop_outgoing_arp_reply(bat_priv, skb);
+		batadv_dat_snoop_outgoing_pkt_reply(bat_priv, skb);
 
 		ret = batadv_send_skb_unicast(bat_priv, skb, vid);
 		if (ret != 0)
-- 
1.7.10.4


  reply	other threads:[~2013-07-08  0:12 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-08  0:12 [B.A.T.M.A.N.] [RFC 1/6] batman-adv: Generalize DAT in order to support any type of data, not only IPv4 mihail.costea2005
2013-07-08  0:12 ` mihail.costea2005 [this message]
2013-07-08  0:12 ` [B.A.T.M.A.N.] [RFC 3/6] batman-adv: Adds IPv6 to DAT and generic struct in distributed-arp-table.c mihail.costea2005
2013-08-10 11:14   ` Antonio Quartulli
2013-07-08  0:12 ` [B.A.T.M.A.N.] [RFC 4/6] batman-adv: Adds necessary functions for NDP, like checking if a packet is valid or creating a Neighbor Advertisement mihail.costea2005
2013-08-10 12:20   ` Antonio Quartulli
2013-08-14 13:38     ` Mihail Costea
2013-07-08  0:12 ` [B.A.T.M.A.N.] [RFC 5/6] batman-adv: Generalize snooping mechanism in order to suport NDP too mihail.costea2005
2013-09-30 20:06   ` Linus Lüssing
2013-09-30 20:38     ` Linus Lüssing
2013-10-04 18:28       ` Mihail Costea
2013-10-05  7:14         ` Antonio Quartulli
2013-10-05  9:48           ` Mihail Costea
2013-07-08  0:12 ` [B.A.T.M.A.N.] [RFC 6/6] batman-adv: Adds snooping of router and override flags for NA creation mihail.costea2005
2013-08-10 13:20   ` Antonio Quartulli
2013-08-14 13:51     ` Mihail Costea
2013-08-14 15:42       ` Linus Lüssing
2013-08-14 17:42         ` Antonio Quartulli
2013-07-23  7:27 ` [B.A.T.M.A.N.] [RFC 1/6] batman-adv: Generalize DAT in order to support any type of data, not only IPv4 Antonio Quartulli
2013-07-24 16:50   ` Mihail Costea
2013-08-10 11:03 ` Antonio Quartulli
2013-08-10 19:01   ` Mihail Costea
2013-08-10 20:36     ` Antonio Quartulli
2013-09-09 14:05       ` Mihail Costea
2013-09-09 14:53         ` Antonio Quartulli
2013-09-10  4:35           ` Mihail Costea
2013-09-10  5:38             ` Antonio Quartulli
2013-09-10 12:45               ` Mihail Costea
2013-09-10 21:01                 ` Antonio Quartulli
2013-09-11  4:33                   ` Mihail Costea
2013-09-11  6:46                     ` Antonio Quartulli
2016-03-10 19:11     ` Sven Eckelmann
2016-03-20 12:02       ` 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=1373242365-763-2-git-send-email-mihail.costea2005@gmail.com \
    --to=mihail.costea2005@gmail.com \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox