[hipl-commit] [trunk] Rev 4535: Move configfile-related definitions to the only place they are used.

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

Committer: Diego Biurrun <diego@xxxxxxxxxx>
Date: 17/05/2010 at 01:22:11
Revision: 4535
Revision-id: diego@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  Move configfile-related definitions to the only place they are used.

Modified:
  M  hipd/init.c
  M  lib/conf/conf.h

=== modified file 'hipd/init.c'
--- hipd/init.c 2010-05-16 22:15:32 +0000
+++ hipd/init.c 2010-05-16 22:21:30 +0000
@@ -128,6 +128,74 @@
     fclose(fp);
 }
 
+#define HIPL_CONFIG_FILE_EX \
+    "# Format of this file is as with hipconf, but without hipconf prefix\n\
+# add hi default    # add all four HITs (see bug id 522)\n\
+# add map HIT IP    # preload some HIT-to-IP mappings to hipd\n\
+# add service rvs   # the host acts as HIP rendezvous (see also 
/etc/hip/relay_config)\n\
+# add server rvs [RVS-HIT] <RVS-IP-OR-HOSTNAME> <lifetime-secs> # register to 
rendezvous server\n\
+# add server relay [RELAY-HIT] <RVS-IP-OR-HOSTNAME> <lifetime-secs> # register 
to relay server\n\
+# add server full-relay [RELAY-HIT] <RVS-IP-OR-HOSTNAME> <lifetime-secs> # 
register to relay server\n\
+hit-to-ip on # resolve HITs to locators in dynamic DNS zone\n\
+# hit-to-ip set hit-to-ip.infrahip.net. # resolve HITs to locators in dynamic 
DNS zone\n\
+nsupdate on # send dynamic DNS updates\n\
+# add server rvs hiprvs.infrahip.net 50000 # Register to free RVS at 
infrahip\n\
+# heartbeat 10 # send ICMPv6 messages inside HIP tunnels\n\
+# locator on        # host sends all of its locators in base exchange\n\
+# datapacket on # experimental draft hiccups extensions\n\
+# shotgun on # use all possible src/dst IP combinations to send I1/UPDATE\n\
+# opp normal|advanced|none\n\
+# transform order 213 # crypto preference order (1=AES, 2=3DES, 3=NULL)\n\
+nat plain-udp       # use UDP capsulation (for NATted environments)\n\
+#nat port local 11111 # change local default UDP port\n\
+#nat port peer 22222 # change local peer UDP port\n\
+debug medium        # debug verbosity: all, medium or none\n"
+
+#define HIPL_HOSTS_FILE_EX \
+    "# This file stores the HITs of the hosts, in a similar fashion to 
/etc/hosts.\n\
+# The aliases are optional.  Examples:\n\
+#2001:1e:361f:8a55:6730:6f82:ef36:2fff kyle kyle.com # This is a HIT with 
alias\n\
+#2001:17:53ab:9ff1:3cba:15f:86d6:ea2e kenny       # This is a HIT without 
alias\n"
+
+#define HIPL_NSUPDATE_CONF_FILE     HIPL_SYSCONFDIR "/nsupdate.conf"
+
+#define HIPL_NSUPDATE_CONF_FILE_EX \
+    "##########################################################\n" \
+    "# configuration examples\n" \
+    "##########################################################\n" \
+    "# update records for 
5.7.d.1.c.c.8.d.0.6.3.b.a.4.6.2.5.0.5.2.e.4.7.5.e.1.0.0.1.0.0.2.hit-to-ip.infrahip.net.\n"
 \
+    "# $HIT_TO_IP_ZONE = 'hit-to-ip.infrahip.net.';\n" \
+    "# or in some other zone\n" \
+    "# $HIT_TO_IP_ZONE = 'hit-to-ip.example.org.';\n" \
+    "\n" \
+    "# update is sent to SOA if server empty\n" \
+    "# $HIT_TO_IP_SERVER = '';\n" \
+    "# or you may define it \n" \
+    "# $HIT_TO_IP_SERVER = 'ns.example.net.';\n" \
+    "\n" \
+    "# name of key if you configured it on the server\n" \
+    "# please also chown this file to nobody and chmod 400\n" \
+    "# $HIT_TO_IP_KEY_NAME='key.hit-to-ip';\n" \
+    "# $HIT_TO_IP_KEY_NAME = '';\n" \
+    "\n" \
+    "# secret of that key\n" \
+    "# 
$HIT_TO_IP_KEY_SECRET='Ousu6700S9sfYSL4UIKtvnxY4FKwYdgXrnEgDAu/rmUAoyBGFwGs0eY38KmYGLT1UbcL/O0igGFpm+NwGftdEQ==';\n"
 \
+    "# $HIT_TO_IP_KEY_SECRET = '';\n" \
+    "\n" \
+    "# TTL inserted for the records\n" \
+    "# $HIT_TO_IP_TTL = 1;\n" \
+    "###########################################################\n" \
+    "# domain with ORCHID prefix \n" \
+    "# $REVERSE_ZONE = '1.0.0.1.0.0.2.ip6.arpa.'; \n" \
+    "# \n" \
+    "# $REVERSE_SERVER = 'ptr-soa-hit.infrahip.net.'; # since SOA 
1.0.0.1.0.0.2.ip6.arpa. is dns1.icann.org. now\n" \
+    "# $REVERSE_KEY_NAME = '';\n" \
+    "# $REVERSE_KEY_SECRET = '';\n" \
+    "# $REVERSE_TTL = 86400;\n" \
+    "# System hostname is used if empty\n" \
+    "# $REVERSE_HOSTNAME = 'stargazer-hit.pc.infrahip.net';\n" \
+    "###########################################################\n"
+
 /**
  * load hipd configuration files
  */

=== modified file 'lib/conf/conf.h'
--- lib/conf/conf.h     2010-05-16 22:16:39 +0000
+++ lib/conf/conf.h     2010-05-16 22:21:30 +0000
@@ -47,75 +47,6 @@
 #define EXEC_LOADLIB_NONE       13
 /* @} */
 
-
-#define HIPL_CONFIG_FILE_EX \
-    "# Format of this file is as with hipconf, but without hipconf prefix\n\
-# add hi default    # add all four HITs (see bug id 522)\n\
-# add map HIT IP    # preload some HIT-to-IP mappings to hipd\n\
-# add service rvs   # the host acts as HIP rendezvous (see also 
/etc/hip/relay_config)\n\
-# add server rvs [RVS-HIT] <RVS-IP-OR-HOSTNAME> <lifetime-secs> # register to 
rendezvous server\n\
-# add server relay [RELAY-HIT] <RVS-IP-OR-HOSTNAME> <lifetime-secs> # register 
to relay server\n\
-# add server full-relay [RELAY-HIT] <RVS-IP-OR-HOSTNAME> <lifetime-secs> # 
register to relay server\n\
-hit-to-ip on # resolve HITs to locators in dynamic DNS zone\n\
-# hit-to-ip set hit-to-ip.infrahip.net. # resolve HITs to locators in dynamic 
DNS zone\n\
-nsupdate on # send dynamic DNS updates\n\
-# add server rvs hiprvs.infrahip.net 50000 # Register to free RVS at 
infrahip\n\
-# heartbeat 10 # send ICMPv6 messages inside HIP tunnels\n\
-# locator on        # host sends all of its locators in base exchange\n\
-# datapacket on # experimental draft hiccups extensions\n\
-# shotgun on # use all possible src/dst IP combinations to send I1/UPDATE\n\
-# opp normal|advanced|none\n\
-# transform order 213 # crypto preference order (1=AES, 2=3DES, 3=NULL)\n\
-nat plain-udp       # use UDP capsulation (for NATted environments)\n\
-#nat port local 11111 # change local default UDP port\n\
-#nat port peer 22222 # change local peer UDP port\n\
-debug medium        # debug verbosity: all, medium or none\n"
-
-#define HIPL_HOSTS_FILE_EX \
-    "# This file stores the HITs of the hosts, in a similar fashion to 
/etc/hosts.\n\
-# The aliases are optional.  Examples:\n\
-#2001:1e:361f:8a55:6730:6f82:ef36:2fff kyle kyle.com # This is a HIT with 
alias\n\
-#2001:17:53ab:9ff1:3cba:15f:86d6:ea2e kenny       # This is a HIT without 
alias\n"
-
-#define HIPL_NSUPDATE_CONF_FILE     HIPL_SYSCONFDIR "/nsupdate.conf"
-
-#define HIPL_NSUPDATE_CONF_FILE_EX \
-    "##########################################################\n" \
-    "# configuration examples\n" \
-    "##########################################################\n" \
-    "# update records for 
5.7.d.1.c.c.8.d.0.6.3.b.a.4.6.2.5.0.5.2.e.4.7.5.e.1.0.0.1.0.0.2.hit-to-ip.infrahip.net.\n"
 \
-    "# $HIT_TO_IP_ZONE = 'hit-to-ip.infrahip.net.';\n" \
-    "# or in some other zone\n" \
-    "# $HIT_TO_IP_ZONE = 'hit-to-ip.example.org.';\n" \
-    "\n" \
-    "# update is sent to SOA if server empty\n" \
-    "# $HIT_TO_IP_SERVER = '';\n" \
-    "# or you may define it \n" \
-    "# $HIT_TO_IP_SERVER = 'ns.example.net.';\n" \
-    "\n" \
-    "# name of key if you configured it on the server\n" \
-    "# please also chown this file to nobody and chmod 400\n" \
-    "# $HIT_TO_IP_KEY_NAME='key.hit-to-ip';\n" \
-    "# $HIT_TO_IP_KEY_NAME = '';\n" \
-    "\n" \
-    "# secret of that key\n" \
-    "# 
$HIT_TO_IP_KEY_SECRET='Ousu6700S9sfYSL4UIKtvnxY4FKwYdgXrnEgDAu/rmUAoyBGFwGs0eY38KmYGLT1UbcL/O0igGFpm+NwGftdEQ==';\n"
 \
-    "# $HIT_TO_IP_KEY_SECRET = '';\n" \
-    "\n" \
-    "# TTL inserted for the records\n" \
-    "# $HIT_TO_IP_TTL = 1;\n" \
-    "###########################################################\n" \
-    "# domain with ORCHID prefix \n" \
-    "# $REVERSE_ZONE = '1.0.0.1.0.0.2.ip6.arpa.'; \n" \
-    "# \n" \
-    "# $REVERSE_SERVER = 'ptr-soa-hit.infrahip.net.'; # since SOA 
1.0.0.1.0.0.2.ip6.arpa. is dns1.icann.org. now\n" \
-    "# $REVERSE_KEY_NAME = '';\n" \
-    "# $REVERSE_KEY_SECRET = '';\n" \
-    "# $REVERSE_TTL = 86400;\n" \
-    "# System hostname is used if empty\n" \
-    "# $REVERSE_HOSTNAME = 'stargazer-hit.pc.infrahip.net';\n" \
-    "###########################################################\n"
-
 /**
  * hipconf tool actions. These are numerical values for the first commandline
  * argument. For example in "tools/hipconf get hi default" -command "get"

Other related posts:

  • » [hipl-commit] [trunk] Rev 4535: Move configfile-related definitions to the only place they are used. - Diego Biurrun