From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH 16/18] batman-adv: Prefix unicast local static functions with batadv_
Date: Sat, 12 May 2012 18:34:05 +0200 [thread overview]
Message-ID: <1336840447-6580-16-git-send-email-sven@narfation.org> (raw)
In-Reply-To: <1336840447-6580-1-git-send-email-sven@narfation.org>
All non-static symbols of batman-adv were prefixed with batadv_ to avoid
collisions with other symbols of the kernel. Other symbols of batman-adv
should use the same prefix to keep the naming scheme consistent.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
unicast.c | 47 +++++++++++++++++++++++++----------------------
1 file changed, 25 insertions(+), 22 deletions(-)
diff --git a/unicast.c b/unicast.c
index 387b959..437bc32 100644
--- a/unicast.c
+++ b/unicast.c
@@ -29,9 +29,10 @@
#include "hard-interface.h"
-static struct sk_buff *frag_merge_packet(struct list_head *head,
- struct frag_packet_list_entry *tfp,
- struct sk_buff *skb)
+static struct sk_buff *
+batadv_frag_merge_packet(struct list_head *head,
+ struct frag_packet_list_entry *tfp,
+ struct sk_buff *skb)
{
struct unicast_frag_packet *up =
(struct unicast_frag_packet *)skb->data;
@@ -75,7 +76,8 @@ err:
return NULL;
}
-static void frag_create_entry(struct list_head *head, struct sk_buff *skb)
+static void batadv_frag_create_entry(struct list_head *head,
+ struct sk_buff *skb)
{
struct frag_packet_list_entry *tfp;
struct unicast_frag_packet *up =
@@ -91,7 +93,7 @@ static void frag_create_entry(struct list_head *head, struct sk_buff *skb)
return;
}
-static int frag_create_buffer(struct list_head *head)
+static int batadv_frag_create_buffer(struct list_head *head)
{
int i;
struct frag_packet_list_entry *tfp;
@@ -111,8 +113,9 @@ static int frag_create_buffer(struct list_head *head)
return 0;
}
-static struct frag_packet_list_entry *frag_search_packet(struct list_head *head,
- const struct unicast_frag_packet *up)
+static struct frag_packet_list_entry *
+batadv_frag_search_packet(struct list_head *head,
+ const struct unicast_frag_packet *up)
{
struct frag_packet_list_entry *tfp;
struct unicast_frag_packet *tmp_up = NULL;
@@ -188,22 +191,22 @@ int batadv_frag_reassemble_skb(struct sk_buff *skb, struct bat_priv *bat_priv,
orig_node->last_frag_packet = jiffies;
if (list_empty(&orig_node->frag_list) &&
- frag_create_buffer(&orig_node->frag_list)) {
+ batadv_frag_create_buffer(&orig_node->frag_list)) {
pr_debug("couldn't create frag buffer\n");
goto out;
}
- tmp_frag_entry = frag_search_packet(&orig_node->frag_list,
- unicast_packet);
+ tmp_frag_entry = batadv_frag_search_packet(&orig_node->frag_list,
+ unicast_packet);
if (!tmp_frag_entry) {
- frag_create_entry(&orig_node->frag_list, skb);
+ batadv_frag_create_entry(&orig_node->frag_list, skb);
ret = NET_RX_SUCCESS;
goto out;
}
- *new_skb = frag_merge_packet(&orig_node->frag_list, tmp_frag_entry,
- skb);
+ *new_skb = batadv_frag_merge_packet(&orig_node->frag_list,
+ tmp_frag_entry, skb);
/* if not, merge failed */
if (*new_skb)
ret = NET_RX_SUCCESS;
@@ -281,8 +284,8 @@ out:
return ret;
}
-static bool pull_and_fill_unicast(struct sk_buff *skb, int hdr_size,
- struct orig_node *orig_node)
+static bool batadv_pull_and_fill_unicast(struct sk_buff *skb, int hdr_size,
+ struct orig_node *orig_node)
{
struct unicast_packet *unicast_packet;
@@ -304,11 +307,11 @@ static bool pull_and_fill_unicast(struct sk_buff *skb, int hdr_size,
return true;
}
-static bool prepare_unicast_packet(struct sk_buff *skb,
- struct orig_node *orig_node)
+static bool batadv_prepare_unicast_packet(struct sk_buff *skb,
+ struct orig_node *orig_node)
{
- return pull_and_fill_unicast(skb, sizeof(struct unicast_packet),
- orig_node);
+ return batadv_pull_and_fill_unicast(skb, sizeof(struct unicast_packet),
+ orig_node);
}
bool batadv_prepare_unicast_4addr_packet(struct bat_priv *bat_priv,
@@ -328,8 +331,8 @@ bool batadv_prepare_unicast_4addr_packet(struct bat_priv *bat_priv,
* We can do that because the first member of the unicast_4addr_packet
* is of type struct unicast_packet
*/
- if (!pull_and_fill_unicast(skb, sizeof(*unicast_4addr_packet),
- orig_node))
+ if (!batadv_pull_and_fill_unicast(skb, sizeof(*unicast_4addr_packet),
+ orig_node))
goto out;
unicast_4addr_packet = (struct unicast_4addr_packet *)skb->data;
@@ -379,7 +382,7 @@ find_router:
switch (packet_type) {
case BAT_UNICAST:
- prepare_unicast_packet(skb, orig_node);
+ batadv_prepare_unicast_packet(skb, orig_node);
break;
case BAT_UNICAST_4ADDR:
batadv_prepare_unicast_4addr_packet(bat_priv, skb, orig_node,
--
1.7.10
next prev parent reply other threads:[~2012-05-12 16:34 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-12 16:33 [B.A.T.M.A.N.] [PATCH 01/18] batman-adv: Prefix bat_debugfs local static functions with batadv_ Sven Eckelmann
2012-05-12 16:33 ` [B.A.T.M.A.N.] [PATCH 02/18] batman-adv: Prefix bat_iv_ogm " Sven Eckelmann
2012-05-15 8:50 ` Marek Lindner
2012-05-12 16:33 ` [B.A.T.M.A.N.] [PATCH 03/18] batman-adv: Prefix bat_sysfs " Sven Eckelmann
2012-05-15 9:54 ` Marek Lindner
2012-05-16 17:23 ` Sven Eckelmann
2012-05-12 16:33 ` [B.A.T.M.A.N.] [PATCH 04/18] batman-adv: Prefix bridge_loop_avoidance " Sven Eckelmann
2012-05-15 11:28 ` Marek Lindner
2012-05-12 16:33 ` [B.A.T.M.A.N.] [PATCH 05/18] batman-adv: Prefix distributed-arp-table " Sven Eckelmann
2012-05-16 8:53 ` Marek Lindner
2012-05-12 16:33 ` [B.A.T.M.A.N.] [PATCH 06/18] batman-adv: Prefix gateway_client " Sven Eckelmann
2012-05-16 8:55 ` Marek Lindner
2012-05-12 16:33 ` [B.A.T.M.A.N.] [PATCH 07/18] batman-adv: Prefix gateway_common " Sven Eckelmann
2012-05-16 8:56 ` Marek Lindner
2012-05-12 16:33 ` [B.A.T.M.A.N.] [PATCH 08/18] batman-adv: Prefix hard-interface " Sven Eckelmann
2012-05-16 8:58 ` Marek Lindner
2012-05-12 16:33 ` [B.A.T.M.A.N.] [PATCH 09/18] batman-adv: Prefix hash " Sven Eckelmann
2012-05-16 8:59 ` Marek Lindner
2012-05-12 16:33 ` [B.A.T.M.A.N.] [PATCH 10/18] batman-adv: Prefix icmp_socket " Sven Eckelmann
2012-05-16 9:02 ` Marek Lindner
2012-05-12 16:34 ` [B.A.T.M.A.N.] [PATCH 11/18] batman-adv: Prefix originator " Sven Eckelmann
2012-05-16 10:34 ` Marek Lindner
2012-05-12 16:34 ` [B.A.T.M.A.N.] [PATCH 12/18] batman-adv: Prefix routing " Sven Eckelmann
2012-05-12 16:34 ` [B.A.T.M.A.N.] [PATCH 13/18] batman-adv: Prefix send " Sven Eckelmann
2012-05-12 16:34 ` [B.A.T.M.A.N.] [PATCH 14/18] batman-adv: Prefix soft-interface " Sven Eckelmann
2012-05-12 16:34 ` [B.A.T.M.A.N.] [PATCH 15/18] batman-adv: Prefix translation-table " Sven Eckelmann
2012-05-12 16:34 ` Sven Eckelmann [this message]
2012-05-12 16:34 ` [B.A.T.M.A.N.] [PATCH 17/18] batman-adv: Prefix vis " Sven Eckelmann
2012-05-12 16:34 ` [B.A.T.M.A.N.] [PATCH 18/18] batman-adv: Prefix main " Sven Eckelmann
2012-05-15 8:06 ` [B.A.T.M.A.N.] [PATCH 01/18] batman-adv: Prefix bat_debugfs " Marek Lindner
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=1336840447-6580-16-git-send-email-sven@narfation.org \
--to=sven@narfation.org \
--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