[hipl-commit] [trunk] Rev 4309: Remove disabled code from firewall/opptcp.c.

  • From: Diego Biurrun <diego@xxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Fri, 16 Apr 2010 02:29:25 +0300

Committer: Diego Biurrun <diego@xxxxxxxxxx>
Date: 16/04/2010 at 02:29:25
Revision: 4309
Revision-id: diego@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  Remove disabled code from firewall/opptcp.c.

Modified:
  M  firewall/opptcp.c

=== modified file 'firewall/opptcp.c'
--- firewall/opptcp.c   2010-04-13 18:08:56 +0000
+++ firewall/opptcp.c   2010-04-15 23:29:06 +0000
@@ -304,71 +304,3 @@
     }
     return foundHipOpp;
 }
-
-#if 0
-/**
- * Send the necessary data to hipd, so that a tcp packet is sent from there. 
This was done because it was not possible to send a packet directly from here.
- *
- * @param hdr pointer to the packet that is to be sent.
- * @param packet_size the size of the packet.
- * @param ip_version ipv4 or ipv6.
- * @param addHit whether the local HIT is to be added at the tcp options
- * @param addOption whether the i1 option is to be added at the tcp options
- * @return nothing
- */
-int hip_request_send_tcp_packet(void *hdr,
-                                int packet_size,
-                                int ip_version,
-                                int addHit,
-                                int addOption)
-{
-    struct hip_common *msg = NULL;
-    int err                = 0;
-
-    /* todo: rewrite this code to bundle traffic type, hit and option
-     * into a single builder parameter */
-
-    HIP_DEBUG("\n");
-
-    HIP_IFE(!(msg = hip_msg_alloc()), -1);
-
-    /* build the message header */
-    HIP_IFEL(hip_build_user_hdr(msg, HIP_MSG_OPPTCP_SEND_TCP_PACKET, 0),
-             -1, "build hdr failed\n");
-
-    HIP_IFEL(hip_build_param_contents(msg, (void *) hdr,
-                                      HIP_PARAM_IP_HEADER,
-                                      packet_size),
-             -1, "build param HIP_PARAM_IP_HEADER failed\n");
-
-    HIP_IFEL(hip_build_param_contents(msg, (int *) (&packet_size),
-                                      HIP_PARAM_PACKET_SIZE,
-                                      sizeof(int)),
-             -1, "build param HIP_PARAM_PACKET_SIZE failed\n");
-
-    HIP_IFEL(hip_build_param_contents(msg, (int *) (&ip_version),
-                                      HIP_PARAM_TRAFFIC_TYPE,
-                                      sizeof(int)),
-             -1, "build param HIP_PARAM_TRAFFIC_TYPE failed\n");
-
-    HIP_IFEL(hip_build_param_contents(msg, (int *) (&addHit),
-                                      HIP_PARAM_ADD_HIT,
-                                      sizeof(int)),
-             -1, "build param HIP_PARAM_ADD_HIT failed\n");
-
-    HIP_IFEL(hip_build_param_contents(msg, (int *) (&addOption),
-                                      HIP_PARAM_ADD_OPTION,
-                                      sizeof(int)),
-             -1, "build param HIP_PARAM_ADD_OPTION failed\n");
-
-    HIP_DUMP_MSG(msg);
-    /* send and receive msg to/from hipd */
-    HIP_IFEL(hip_send_recv_daemon_info(msg, 1, hip_fw_async_sock), -1, 
"send_recv msg failed\n");
-    _HIP_DEBUG("send_recv msg succeed\n");
-    /* check error value */
-    //HIP_IFEL(hip_get_msg_err(msg), -1, "Got erroneous message!\n");
-
-out_err:
-    return err;
-}
-#endif /* 0 */

Other related posts:

  • » [hipl-commit] [trunk] Rev 4309: Remove disabled code from firewall/opptcp.c. - Diego Biurrun