[hipl-commit] [tiny] Rev 3697: Use packet type registration for core and update.

  • From: Tim Just <tim.just@xxxxxxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Thu, 18 Mar 2010 19:03:27 +0200

Committer: Tim Just <tim.just@xxxxxxxxxxxxxx>
Date: 18/03/2010 at 19:03:27
Revision: 3697
Revision-id: tim.just@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: tiny

Log:
  Use packet type registration for core and update.

Modified:
  M  hipd/init.c
  M  modules/update/hipd/update.c

=== modified file 'hipd/init.c'
--- hipd/init.c 2010-03-17 22:28:05 +0000
+++ hipd/init.c 2010-03-18 17:03:04 +0000
@@ -603,6 +603,25 @@
     return err;
 }
 
+static void hip_init_packet_types(void)
+{
+    lmod_register_packet_type(HIP_I1,        "HIP_I1");
+    lmod_register_packet_type(HIP_R1,        "HIP_R1");
+    lmod_register_packet_type(HIP_I2,        "HIP_I2");
+    lmod_register_packet_type(HIP_R2,        "HIP_R2");
+    lmod_register_packet_type(HIP_CER,       "HIP_CER");
+    lmod_register_packet_type(HIP_BOS,       "HIP_BOS");
+    lmod_register_packet_type(HIP_NOTIFY,    "HIP_NOTIFY");
+    lmod_register_packet_type(HIP_CLOSE,     "HIP_CLOSE");
+    lmod_register_packet_type(HIP_CLOSE_ACK, "HIP_CLOSE_ACK");
+    lmod_register_packet_type(HIP_HDRR,      "HIP_HDRR");
+    lmod_register_packet_type(HIP_PSIG,      "HIP_PSIG");
+    lmod_register_packet_type(HIP_TRIG,      "HIP_TRIG");
+    lmod_register_packet_type(HIP_LUPDATE,   "HIP_LUPDATE");
+    lmod_register_packet_type(HIP_DATA,      "HIP_DATA");
+    lmod_register_packet_type(HIP_PAYLOAD,   "HIP_PAYLOAD");
+}
+
 static int hip_init_handle_functions(void)
 {
     int err = 0;
@@ -729,6 +748,8 @@
 
     hip_set_os_dep_variables();
 
+    hip_init_packet_types();
+
     hip_init_handle_functions();
 
     hip_register_maint_function(&hip_nat_refresh_port,         10000);

=== modified file 'modules/update/hipd/update.c'
--- modules/update/hipd/update.c        2010-03-16 13:20:32 +0000
+++ modules/update/hipd/update.c        2010-03-18 17:03:04 +0000
@@ -998,6 +998,8 @@
              -1,
              "Error on registering UPDATE module.\n");
 
+    lmod_register_packet_type(HIP_UPDATE, "HIP_UPDATE");
+
     HIP_IFEL(lmod_register_state_init_function(&hip_update_init_state),
              -1,
              "Error on registering update state init function.\n");

Other related posts:

  • » [hipl-commit] [tiny] Rev 3697: Use packet type registration for core and update. - Tim Just