From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Marek Lindner Date: Sat, 11 Feb 2012 22:09:30 +0800 References: <1328830902-11574-1-git-send-email-ordex@autistici.org> <1328830902-11574-5-git-send-email-ordex@autistici.org> In-Reply-To: <1328830902-11574-5-git-send-email-ordex@autistici.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201202112209.30987.lindner_marek@yahoo.de> Subject: Re: [B.A.T.M.A.N.] [PATCHv5 4/9] batman-adv: Distributed ARP Table - add ARP parsing functions Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: The list for a Better Approach To Mobile Ad-hoc Networking On Friday, February 10, 2012 07:41:37 Antonio Quartulli wrote: > +static inline void bat_dbg_arp(struct bat_priv *bat_priv, > + struct sk_buff *skb, uint16_t type) { > + char buf[30]; > + const char *type_str[] = { "REQUEST", "REPLY", "RREQUEST", > "RREPLY", + "InREQUEST", "InREPLY", > "NAK" }; + > + if (type >= 1 && type <= ARRAY_SIZE(type_str)) > + scnprintf(buf, sizeof(buf), "%s", type_str[type - 1]); > + else > + scnprintf(buf, sizeof(buf), "UNKNOWN (%hu)", type); > + > + bat_dbg(DBG_ARP, bat_priv, "ARP message of type %s recognised " > + "[src: %pM-%pI4 dst: %pM-%pI4]\n", buf, ARP_HW_SRC(skb), > + &ARP_IP_SRC(skb), ARP_HW_DST(skb), &ARP_IP_DST(skb)); > +} Every time this fucntion is called an additional bat_dgb() call is made directly before that (as far as I can tell). Wouldn't it make sense to include this extra message as parameter to bat_dbg_arp() ? Regards, Marek