[hipl-commit] [trunk] Rev 4544: Move the contents of lib/conf into lib/core.

  • From: Diego Biurrun <diego@xxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Mon, 17 May 2010 17:57:25 +0300

Committer: Diego Biurrun <diego@xxxxxxxxxx>
Date: 17/05/2010 at 17:57:25
Revision: 4544
Revision-id: diego@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  Move the contents of lib/conf into lib/core.
  
  The lib/conf directory contains only two files and there is a circular
  dependency to lib/core anyway.

Modified:
  D  lib/conf/
  R  lib/conf/conf.c => lib/core/conf.c
  R  lib/conf/conf.h => lib/core/conf.h
  M  COPYING
  M  Makefile.am
  M  doc/HACKING
  M  hipd/hipd.h
  M  hipd/hit_to_ip.c
  M  hipd/init.h
  M  hipd/netdev.c
  M  lib/core/debug.c
  M  lib/core/hostsfiles.h
  M  lib/core/message.h
  M  lib/tool/lutil.c
  M  tools/hipconf.c

=== modified file 'COPYING'
--- COPYING     2010-05-17 14:36:38 +0000
+++ COPYING     2010-05-17 14:56:20 +0000
@@ -20,7 +20,6 @@
   * firewall (see an exception below)
   * tools (see exceptions below)
   * lib/opphip
-  * lib/conf
   * lib/core
   * test
   * hipd

=== modified file 'Makefile.am'
--- Makefile.am 2010-05-16 21:02:09 +0000
+++ Makefile.am 2010-05-17 14:56:20 +0000
@@ -126,10 +126,10 @@
 
 # TODO: libhipcore, libhipconf and libhiptool have circular
 # dependencies. This needs to be addressed at some point.
-lib_core_libhipcore_la_SOURCES = lib/conf/conf.c            \
-                                 lib/core/builder.c         \
+lib_core_libhipcore_la_SOURCES = lib/core/builder.c         \
                                  lib/core/capability.c      \
                                  lib/core/certtools.c       \
+                                 lib/core/conf.c            \
                                  lib/core/crypto.c          \
                                  lib/core/debug.c           \
                                  lib/core/esp_prot_common.c \

=== modified file 'doc/HACKING'
--- doc/HACKING 2010-05-17 14:55:11 +0000
+++ doc/HACKING 2010-05-17 14:56:20 +0000
@@ -1410,12 +1410,12 @@
 
 Assume that you want to add an action named as 'NEWACT'.
 
-1.1. ACTION_NEWACT in lib/conf/conf.h
+1.1. ACTION_NEWACT in lib/core/conf.h
 -------------------------------------
 Define a constant ACTION_NEWACT which has value between 0 and ACTION_MAX.
 Probably you also need to increase the value of ACTION_MAX.
 
-1.2. hip_conf_get_action() in lib/conf/conf.c
+1.2. hip_conf_get_action() in lib/core/conf.c
 ---------------------------------------------
 Add a proper sentence in the strcmp() series, like that:
 
@@ -1424,11 +1424,11 @@
         ret = ACTION_NEWACT;
     ...
 
-1.3. hip_conf_check_action_argc() in lib/conf/conf.c
+1.3. hip_conf_check_action_argc() in lib/core/conf.c
 ----------------------------------------------------
 Add a case block for your ACTION_NEWACT constant in the switch(action) block.
 
-1.4. hip_conf_get_type_arg() in lib/conf/conf.c
+1.4. hip_conf_get_type_arg() in lib/core/conf.c
 -----------------------------------------------
 Add a case block for your ACTION_NEWACT constant in the switch(action) block.
 
@@ -1446,13 +1446,13 @@
 Add a case block for your HIP_MSG_NEWMODE constant in the switch(msg_type) 
block.
 In this case, you just need to return the same string as the constant.
 
-3.1. action_handler[] in lib/conf/conf.c
+3.1. action_handler[] in lib/core/conf.c
 ----------------------------------------
 Add a handler function for your new action in the action_handler[] array.
 NOTE: the location and the order of these handlers are important, because
 each entry of the handler array is to be accessed via type index.
 
-3.2. TYPE_NEWTYPE in lib/conf/conf.h
+3.2. TYPE_NEWTYPE in lib/core/conf.h
 ------------------------------------
 Define a constant TYPE_NEWTYPE which has value between 0 and TYPE_MAX.
 Probably you also need to increase the value of TYPE_MAX.
@@ -1465,15 +1465,15 @@
 each handler function in action_handler[], which you just added above
 at the step 3.1.
 
-3.3. hip_conf_handle_NEWACT() in lib/conf/conf.c
+3.3. hip_conf_handle_NEWACT() in lib/core/conf.c
 ------------------------------------------------
 Define a handler function added above at the step 3.1, somewhere in conf.c.
 
-3.4. hip_conf_handle_NEWACT() in lib/conf/conf.h
+3.4. hip_conf_handle_NEWACT() in lib/core/conf.h
 ------------------------------------------------
 Declare a prototype for your new handler function hip_conf_handle_NEWACT
 defined above at the step 3.1.
 
-4. hipconf_usage in lib/conf/conf.c
+4. hipconf_usage in lib/core/conf.c
 -----------------------------------
 Add a simple usage for your new action in the usage string.

=== modified file 'hipd/hipd.h'
--- hipd/hipd.h 2010-05-16 17:58:14 +0000
+++ hipd/hipd.h 2010-05-17 14:56:20 +0000
@@ -23,9 +23,9 @@
 #include "lib/core/crypto.h"
 #include "cookie.h"
 #include "user.h"
+#include "lib/core/conf.h"
 #include "lib/core/debug.h"
 #include "netdev.h"
-#include "lib/conf/conf.h"
 #include "nat.h"
 #include "init.h"
 #include "hidb.h"

=== modified file 'hipd/hit_to_ip.c'
--- hipd/hit_to_ip.c    2010-05-12 13:55:00 +0000
+++ hipd/hit_to_ip.c    2010-05-17 14:56:20 +0000
@@ -18,11 +18,11 @@
 #include <sys/socket.h>
 
 #include "hit_to_ip.h"
+#include "lib/core/conf.h"
 #include "lib/core/list.h"
 #include "lib/core/debug.h"
 #include "lib/core/prefix.h"
 #include "maintenance.h"
-#include "lib/conf/conf.h"
 
 
 int hip_hit_to_ip_status = 0;

=== modified file 'hipd/init.h'
--- hipd/init.h 2010-05-16 17:58:14 +0000
+++ hipd/init.h 2010-05-17 14:56:20 +0000
@@ -16,7 +16,7 @@
 #include <sys/utsname.h>
 
 #include "lib/tool/xfrmapi.h"
-#include "lib/conf/conf.h"
+#include "lib/core/conf.h"
 #include "oppipdb.h"
 #include "lib/core/debug.h"
 #include "hiprelay.h"

=== modified file 'hipd/netdev.c'
--- hipd/netdev.c       2010-05-16 21:02:09 +0000
+++ hipd/netdev.c       2010-05-17 14:56:20 +0000
@@ -34,7 +34,7 @@
 #include "maintenance.h"
 #include "lib/core/debug.h"
 #include "lib/tool/lutil.h"
-#include "lib/conf/conf.h"
+#include "lib/core/conf.h"
 #include "lib/core/hostsfiles.h"
 #include "lib/core/hip_udp.h"
 #include "lib/core/hit.h"

=== removed directory 'lib/conf'
=== modified file 'lib/core/debug.c'
--- lib/core/debug.c    2010-04-29 14:59:33 +0000
+++ lib/core/debug.c    2010-05-17 14:56:20 +0000
@@ -49,10 +49,10 @@
 #define _BSD_SOURCE
 
 #include "config.h"
+#include "conf.h"
 #include "debug.h"
 #include "straddr.h"
 #include "lib/tool/lutil.h"
-#include "lib/conf/conf.h"
 
 /* must be in the same order as enum debug_level (straight mapping) */
 const int debug2syslog_map[] = { LOG_ALERT,

=== modified file 'lib/core/hostsfiles.h'
--- lib/core/hostsfiles.h       2010-05-16 17:58:14 +0000
+++ lib/core/hostsfiles.h       2010-05-17 14:56:20 +0000
@@ -7,8 +7,8 @@
 #ifndef HIP_LIB_CORE_HOSTSFILES_H
 #define HIP_LIB_CORE_HOSTSFILES_H
 
+#include "conf.h"
 #include "prefix.h"
-#include "lib/conf/conf.h"
 
 int hip_map_first_id_to_hostname_from_hosts(const struct hosts_file_line 
*entry,
                                             const void *arg,

=== modified file 'lib/core/message.h'
--- lib/core/message.h  2010-04-29 14:59:33 +0000
+++ lib/core/message.h  2010-05-17 14:56:20 +0000
@@ -15,9 +15,9 @@
 
 #include "config.h"
 #include "lib/tool/nlink.h"
+#include "conf.h"
 #include "debug.h"
 #include "icomm.h"
-#include "lib/conf/conf.h"
 
 #define HIP_DEFAULT_MSG_TIMEOUT 4000000000ul /* nanosecs */
 

=== modified file 'lib/tool/lutil.c'
--- lib/tool/lutil.c    2010-04-29 14:59:33 +0000
+++ lib/tool/lutil.c    2010-05-17 14:56:20 +0000
@@ -9,7 +9,7 @@
  */
 
 #include "lutil.h"
-#include "lib/conf/conf.h"
+#include "lib/core/conf.h"
 
 /**
  * Read characters to a buffer from a file. Works like fgets() but

=== modified file 'tools/hipconf.c'
--- tools/hipconf.c     2010-04-29 14:59:33 +0000
+++ tools/hipconf.c     2010-05-17 14:56:20 +0000
@@ -8,7 +8,7 @@
  */
 #include "lib/core/ife.h"
 #include "lib/core/debug.h"
-#include "lib/conf/conf.h"
+#include "lib/core/conf.h"
 
 /**
  * Sets system log type and calls hipconf with command line arguments.

Other related posts:

  • » [hipl-commit] [trunk] Rev 4544: Move the contents of lib/conf into lib/core. - Diego Biurrun