[hipl-commit] [trunk] Rev 4731: hipd: remove/mark more unused variables.

  • From: Mircea Gherzan <mircea.gherzan@xxxxxxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Wed, 9 Jun 2010 12:28:22 +0300

Committer: Mircea Gherzan <mircea.gherzan@xxxxxxxxxxxxxx>
Date: 09/06/2010 at 12:28:22
Revision: 4731
Revision-id: mircea.gherzan@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  hipd: remove/mark more unused variables.

Modified:
  M  hipd/hiprelay.c
  M  hipd/input.c

=== modified file 'hipd/hiprelay.c'
--- hipd/hiprelay.c     2010-06-01 15:11:27 +0000
+++ hipd/hiprelay.c     2010-06-09 09:27:57 +0000
@@ -80,6 +80,7 @@
 #include "config.h"
 #include "hiprelay.h"
 #include "output.h"
+#include "lib/core/common_defines.h"
 #include "lib/core/hip_udp.h"
 
 /** HIP relay config file default content. If the file @c HIP_RELAY_CONFIG_FILE
@@ -163,7 +164,6 @@
                                       const uint8_t type_hdr,
                                       const in6_addr_t *r_saddr,
                                       const in6_addr_t *r_daddr,
-                                      const hip_portpair_t *r_info,
                                       const in6_addr_t *relay_to_addr,
                                       const in_port_t relay_to_port);
 static void hip_relrec_set_lifetime(hip_relrec_t *rec, const uint8_t lifetime);
@@ -853,7 +853,7 @@
  * @return zero on success or negative on error
  */
 int hip_relay_handle_relay_to(const uint8_t packet_type,
-                              const uint32_t ha_state,
+                              UNUSED const uint32_t ha_state,
                               struct hip_packet_context *ctx)
 {
     int err           = 0;
@@ -905,7 +905,6 @@
                                    packet_type,
                                    ctx->src_addr,
                                    ctx->dst_addr,
-                                   ctx->msg_ports,
                                    (in6_addr_t *) &relay_to->address,
                                    ntohs(relay_to->port));
         //  state = HIP_STATE_NONE;
@@ -923,7 +922,6 @@
  * @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_info the transport layer ports
  * @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
@@ -932,7 +930,6 @@
                                       const uint8_t type_hdr,
                                       const in6_addr_t *r_saddr,
                                       const in6_addr_t *r_daddr,
-                                      const hip_portpair_t *r_info,
                                       const in6_addr_t *relay_to_addr,
                                       const in_port_t relay_to_port)
 {
@@ -1113,7 +1110,7 @@
  * @return zero on success or negative on error
  */
 int hip_relay_handle_relay_to_in_client(const uint8_t packet_type,
-                                        const uint32_t ha_state,
+                                        UNUSED const uint32_t ha_state,
                                         struct hip_packet_context *ctx)
 {
     int err = 0;

=== modified file 'hipd/input.c'
--- hipd/input.c        2010-06-08 23:31:25 +0000
+++ hipd/input.c        2010-06-09 09:27:57 +0000
@@ -25,14 +25,15 @@
 #include "oppdb.h"
 #include "user.h"
 #include "keymat.h"
+#include "lib/core/builder.h"
+#include "lib/core/common_defines.h"
 #include "lib/core/crypto.h"
-#include "lib/core/builder.h"
 #include "lib/core/hip_udp.h"
 #include "lib/core/hostid.h"
+#include "lib/core/keylen.h"
+#include "lib/core/performance.h"
 #include "lib/core/solve.h"
 #include "lib/core/transform.h"
-#include "lib/core/keylen.h"
-#include "lib/core/performance.h"
 #include "dh.h"
 
 #include "hidb.h"
@@ -633,10 +634,7 @@
 
 //TODO doxygen header missing
 static int handle_locator(struct hip_locator *locator,
-                          in6_addr_t         *r1_saddr,
-                          in6_addr_t         *r1_daddr,
-                          hip_ha_t           *entry,
-                          hip_portpair_t     *r1_info)
+                          hip_ha_t           *entry)
 {
     int n_addrs = 0, loc_size = 0, err = 0;
 
@@ -790,7 +788,7 @@
  *                 initiator should store these addresses to cope with the
  *                 double jump problem.
  */
-int hip_handle_r1(const uint8_t packet_type,
+int hip_handle_r1(UNUSED const uint8_t packet_type,
                   const uint32_t ha_state,
                   struct hip_packet_context *ctx)
 {
@@ -830,10 +828,7 @@
     locator = (struct hip_locator *) hip_get_param(ctx->input_msg, 
HIP_PARAM_LOCATOR);
     if (locator) {
         err = handle_locator(locator,
-                             ctx->src_addr,
-                             ctx->dst_addr,
-                             ctx->hadb_entry,
-                             ctx->msg_ports);
+                             ctx->hadb_entry);
     } else {
         HIP_DEBUG("R1 did not have locator\n");
     }
@@ -967,8 +962,8 @@
  *         Error   = -1
  *
  */
-int hip_handle_i2_in_i2_sent(const uint8_t packet_type,
-                             const uint32_t ha_state,
+int hip_handle_i2_in_i2_sent(UNUSED const uint8_t packet_type,
+                             UNUSED const uint32_t ha_state,
                              struct hip_packet_context *ctx)
 {
     if (hip_hit_is_bigger(&ctx->hadb_entry->hit_peer,
@@ -992,7 +987,7 @@
  *
  * @return zero on success, or negative error value on error.
  */
-int hip_check_r2(const uint8_t packet_type,
+int hip_check_r2(UNUSED const uint8_t packet_type,
                  const uint32_t ha_state,
                  struct hip_packet_context *ctx)
 {
@@ -1249,8 +1244,8 @@
  *
  * @return zero on success, or negative error value on error.
  */
-int hip_check_i1(const uint8_t packet_type,
-                 const uint32_t ha_state,
+int hip_check_i1(UNUSED const uint8_t packet_type,
+                 UNUSED const uint32_t ha_state,
                  struct hip_packet_context *ctx)
 {
     int err = 0, mask = 0;
@@ -1313,8 +1308,8 @@
  *                 present in the incoming I1 packet, only the first of a kind
  *                 is parsed.
  */
-int hip_handle_i1(const uint8_t packet_type,
-                  const uint32_t ha_state,
+int hip_handle_i1(UNUSED const uint8_t packet_type,
+                  UNUSED const uint32_t ha_state,
                   struct hip_packet_context *ctx)
 {
     int err = 0, src_hit_is_our;
@@ -1375,7 +1370,7 @@
  *
  * @return zero on success, or negative error value on error.
  */
-int hip_check_i2(const uint8_t packet_type,
+int hip_check_i2(UNUSED const uint8_t packet_type,
                  const uint32_t ha_state,
                  struct hip_packet_context *ctx)
 {
@@ -1658,8 +1653,8 @@
  *                 <a href="http://www.rfc-editor.org/rfc/rfc5201.txt";>
  *                 RFC 5201</a>.
  */
-int hip_handle_i2(const uint8_t packet_type,
-                  const uint32_t ha_state,
+int hip_handle_i2(UNUSED const uint8_t packet_type,
+                  UNUSED const uint32_t ha_state,
                   struct hip_packet_context *ctx)
 {
     int err = 0, retransmission = 0;
@@ -1870,8 +1865,8 @@
  *
  * @return     zero on success, or negative error value on error.
  */
-int hip_check_notify(const uint8_t packet_type,
-                     const uint32_t ha_state,
+int hip_check_notify(UNUSED const uint8_t packet_type,
+                     UNUSED const uint32_t ha_state,
                      struct hip_packet_context *ctx)
 {
     int err = 0;
@@ -1915,8 +1910,8 @@
  *
  * @return         zero on success, or negative error value on error.
  */
-int hip_handle_notify(const uint8_t packet_type,
-                      const uint32_t ha_state,
+int hip_handle_notify(UNUSED const uint8_t packet_type,
+                      UNUSED const uint32_t ha_state,
                       struct hip_packet_context *ctx)
 {
     int err = 0;

Other related posts:

  • » [hipl-commit] [trunk] Rev 4731: hipd: remove/mark more unused variables. - Mircea Gherzan