hipl-core team mailing list archive
-
hipl-core team
-
Mailing list archive
-
Message #00210
[Branch ~christof-mroz/hipl/hipfw-performance] Rev 4946: Don't define HIP_DEBUG_{LSI, HIT, INADDR, IN6ADDR} unless --enable-debug specified.
------------------------------------------------------------
revno: 4946
committer: Christof Mroz <christof.mroz@xxxxxxxxxxxxxx>
branch nick: hipfw-performance
timestamp: Thu 2010-09-16 13:41:57 +0200
message:
Don't define HIP_DEBUG_{LSI,HIT,INADDR,IN6ADDR} unless --enable-debug specified.
Also marked parameters unused where appropriate in order to fix
compilation.
modified:
firewall/conntrack.c
hipd/hiprelay.c
lib/core/debug.h
modules/update/hipd/update.c
--
lp:~christof-mroz/hipl/hipfw-performance
https://code.launchpad.net/~christof-mroz/hipl/hipfw-performance
Your team HIPL core team is subscribed to branch lp:~christof-mroz/hipl/hipfw-performance.
To unsubscribe from this branch go to https://code.launchpad.net/~christof-mroz/hipl/hipfw-performance/+edit-subscription
=== modified file 'firewall/conntrack.c'
--- firewall/conntrack.c 2010-09-15 19:55:26 +0000
+++ firewall/conntrack.c 2010-09-16 11:41:57 +0000
@@ -115,7 +115,7 @@
*
* @param hiptuple HIP tuple
*/
-static void print_tuple(const struct hip_tuple *hiptuple)
+static void print_tuple(DBG const struct hip_tuple *hiptuple)
{
HIP_DEBUG("next tuple: \n");
HIP_DEBUG("direction: %i\n", hiptuple->tuple->direction);
=== modified file 'hipd/hiprelay.c'
--- hipd/hiprelay.c 2010-09-09 01:12:24 +0000
+++ hipd/hiprelay.c 2010-09-16 11:41:57 +0000
@@ -1005,16 +1005,16 @@
* forward a HIP control packet with relay_to parameter
*
* @param r the HIP control message to be relayed
- * @param r_saddr the original source address
- * @param r_daddr the original destination address
+ * @param r_saddr (unused) the original source address
+ * @param r_daddr (unused) the original destination address
* @param relay_to_addr the address where to relay the packet
* @param relay_to_port the port where to relay the packet
* @return zero on success or negative on error
*/
static int hip_relay_forward_response(const hip_common_t *r,
const uint8_t type_hdr,
- const struct in6_addr *r_saddr,
- const struct in6_addr *r_daddr,
+ DBG const struct in6_addr *r_saddr,
+ DBG const struct in6_addr *r_daddr,
const struct in6_addr *relay_to_addr,
const in_port_t relay_to_port)
{
=== modified file 'lib/core/debug.h'
--- lib/core/debug.h 2010-09-13 14:24:52 +0000
+++ lib/core/debug.h 2010-09-16 11:41:57 +0000
@@ -305,10 +305,17 @@
#define HIP_INFO_LSI(str, lsi) hip_print_lsi(DEBUG_LEVEL_INFO, __FILE__, __LINE__, __FUNCTION__, str, lsi)
#define HIP_INFO_INADDR(str, in) hip_print_lsi(DEBUG_LEVEL_INFO, __FILE__, __LINE__, __FUNCTION__, str, in)
+#ifdef CONFIG_HIP_DEBUG
#define HIP_DEBUG_HIT(str, hit) hip_print_hit(DEBUG_LEVEL_DEBUG, __FILE__, __LINE__, __FUNCTION__, str, hit)
#define HIP_DEBUG_IN6ADDR(str, in6) hip_print_hit(DEBUG_LEVEL_DEBUG, __FILE__, __LINE__, __FUNCTION__, str, in6)
#define HIP_DEBUG_LSI(str, lsi) hip_print_lsi(DEBUG_LEVEL_DEBUG, __FILE__, __LINE__, __FUNCTION__, str, lsi)
#define HIP_DEBUG_INADDR(str, in) hip_print_lsi(DEBUG_LEVEL_DEBUG, __FILE__, __LINE__, __FUNCTION__, str, in)
+#else
+#define HIP_DEBUG_HIT(str, hit) do {} while (0)
+#define HIP_DEBUG_IN6ADDR(str, in6) do {} while (0)
+#define HIP_DEBUG_LSI(str, lsi) do {} while (0)
+#define HIP_DEBUG_INADDR(str, in) do {} while (0)
+#endif
enum logtype_t { LOGTYPE_NOLOG, LOGTYPE_SYSLOG, LOGTYPE_STDERR };
enum logfmt_t { LOGFMT_SHORT, LOGFMT_LONG };
=== modified file 'modules/update/hipd/update.c'
--- modules/update/hipd/update.c 2010-09-09 01:12:24 +0000
+++ modules/update/hipd/update.c 2010-09-16 11:41:57 +0000
@@ -410,7 +410,7 @@
* @return zero on success or negative on failure
*/
static int hip_select_local_addr_for_first_update(const struct hip_hadb_state *ha,
- const struct in6_addr *src_addr,
+ DBG const struct in6_addr *src_addr,
const struct in6_addr *dst_addr,
struct in6_addr *new_src_addr)
{