]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
pool: Move the pool utility to its own directory in src
authorTobias Brunner <tobias@strongswan.org>
Thu, 5 Sep 2013 16:00:48 +0000 (18:00 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 11 Oct 2013 13:16:05 +0000 (15:16 +0200)
configure.ac
src/Makefile.am
src/libhydra/plugins/attr_sql/Makefile.am
src/pool/.gitignore [moved from src/libhydra/plugins/attr_sql/.gitignore with 100% similarity]
src/pool/Makefile.am [new file with mode: 0644]
src/pool/pool.c [moved from src/libhydra/plugins/attr_sql/pool.c with 99% similarity]
src/pool/pool_attributes.c [moved from src/libhydra/plugins/attr_sql/pool_attributes.c with 98% similarity]
src/pool/pool_attributes.h [moved from src/libhydra/plugins/attr_sql/pool_attributes.h with 99% similarity]
src/pool/pool_usage.c [moved from src/libhydra/plugins/attr_sql/pool_usage.c with 99% similarity]
src/pool/pool_usage.h [moved from src/libhydra/plugins/attr_sql/pool_usage.h with 99% similarity]

index 0f558161e2d40ff65f05ab794cc789c2d9115aa3..66cbfa987ad1dc727c0a3c9b3188616081b368af 100644 (file)
@@ -1478,6 +1478,7 @@ AC_CONFIG_FILES([
        src/scepclient/Makefile
        src/pki/Makefile
        src/pki/man/Makefile
+       src/pool/Makefile
        src/dumm/Makefile
        src/dumm/ext/extconf.rb
        src/libfast/Makefile
index 8ed45acc9aac4195d69b96ef2fc276f900a74dc9..218c9434c46c1df28dc4fc47a4ee4258d5157e44 100644 (file)
@@ -100,6 +100,10 @@ if USE_INTEGRITY_TEST
   SUBDIRS += checksum
 endif
 
+if USE_ATTR_SQL
+  SUBDIRS += pool
+endif
+
 if USE_TKM
   SUBDIRS += charon-tkm
 endif
index 4c369a2bd41f76587f824f187aad93ffce1f1f64..d126bb0356a54f26a1f2cf4bc9c068172165386d 100644 (file)
@@ -1,7 +1,6 @@
 AM_CPPFLAGS = \
        -I$(top_srcdir)/src/libstrongswan \
-       -I$(top_srcdir)/src/libhydra \
-       -DPLUGINS=\""${pool_plugins}\""
+       -I$(top_srcdir)/src/libhydra
 
 AM_CFLAGS = \
        -rdynamic
@@ -17,10 +16,3 @@ libstrongswan_attr_sql_la_SOURCES = \
        sql_attribute.h sql_attribute.c
 
 libstrongswan_attr_sql_la_LDFLAGS = -module -avoid-version
-
-ipsec_PROGRAMS = pool
-pool_SOURCES = pool.c pool_attributes.c pool_attributes.h \
-                          pool_usage.h pool_usage.c
-pool_LDADD = $(top_builddir)/src/libstrongswan/libstrongswan.la \
-                        $(top_builddir)/src/libhydra/libhydra.la
-pool.o :       $(top_builddir)/config.status
diff --git a/src/pool/Makefile.am b/src/pool/Makefile.am
new file mode 100644 (file)
index 0000000..8b429a4
--- /dev/null
@@ -0,0 +1,16 @@
+ipsec_PROGRAMS = pool
+
+pool_SOURCES = \
+       pool.c pool_attributes.c pool_attributes.h \
+       pool_usage.h pool_usage.c
+
+pool.o :       $(top_builddir)/config.status
+
+AM_CPPFLAGS = \
+       -I$(top_srcdir)/src/libstrongswan \
+       -I$(top_srcdir)/src/libhydra \
+       -DPLUGINS=\""${pool_plugins}\""
+
+pool_LDADD = \
+       $(top_builddir)/src/libstrongswan/libstrongswan.la \
+       $(top_builddir)/src/libhydra/libhydra.la
similarity index 99%
rename from src/libhydra/plugins/attr_sql/pool.c
rename to src/pool/pool.c
index 4e7c48e23757ae771d35478f6ecbb5da85118dc0..831b3c4392e021cdcf784f69795bfaeb7efa79a4 100644 (file)
@@ -1284,4 +1284,3 @@ int main(int argc, char *argv[])
 
        exit(EXIT_SUCCESS);
 }
-
similarity index 98%
rename from src/libhydra/plugins/attr_sql/pool_attributes.c
rename to src/pool/pool_attributes.c
index 1d1ba8f58dcf7078808af168c175067cc2678cda..72af4f494331fc81cefac8a67a8998071c1aa152 100644 (file)
@@ -49,7 +49,7 @@ static const attr_info_t attr_info[] = {
        { "internal_ip4_netmask", VALUE_ADDR,   INTERNAL_IP4_NETMASK, 0 },
        { "internal_ip6_netmask", VALUE_ADDR,   INTERNAL_IP6_NETMASK, 0 },
        { "netmask",              VALUE_ADDR,   INTERNAL_IP4_NETMASK,
-                                                                                       INTERNAL_IP6_NETMASK    },
+                                                                                       INTERNAL_IP6_NETMASK    },
        { "internal_ip4_dns",     VALUE_ADDR,   INTERNAL_IP4_DNS,     0 },
        { "internal_ip6_dns",     VALUE_ADDR,   INTERNAL_IP6_DNS,     0 },
        { "dns",                  VALUE_ADDR,   INTERNAL_IP4_DNS,
@@ -57,7 +57,7 @@ static const attr_info_t attr_info[] = {
        { "internal_ip4_nbns",    VALUE_ADDR,   INTERNAL_IP4_NBNS,    0 },
        { "internal_ip6_nbns",    VALUE_ADDR,   INTERNAL_IP6_NBNS,    0 },
        { "nbns",                 VALUE_ADDR,   INTERNAL_IP4_NBNS,
-                                                                                       INTERNAL_IP6_NBNS       },
+                                                                                       INTERNAL_IP6_NBNS       },
        { "wins",                 VALUE_ADDR,   INTERNAL_IP4_NBNS,
                                                                                        INTERNAL_IP6_NBNS       },
        { "internal_ip4_dhcp",    VALUE_ADDR,   INTERNAL_IP4_DHCP,    0 },
@@ -214,7 +214,7 @@ static bool parse_attributes(char *name, char *value, value_type_t *value_type,
                        if (*value_type == VALUE_ADDR)
                        {
                                *type = (addr->get_family(addr) == AF_INET) ?
-                                                       attr_info[i].type : attr_info[i].type_ip6;
+                                                       attr_info[i].type : attr_info[i].type_ip6;
                                addr->destroy(addr);
                        }
                        else if (*value_type == VALUE_HEX)
@@ -493,14 +493,14 @@ void del_attr(char *name, char *pool, char *identity,
                        else if (value_type == VALUE_STRING)
                        {
                                fprintf(stderr, "deleting %s attribute (%N) with value '%.*s'%s failed.\n",
-                                                               name, configuration_attribute_type_names, type,
+                                                               name, configuration_attribute_type_names, type,
                                                                (int)blob_db.len, blob_db.ptr, id_pool_str);
                        }
 
                        else
                        {
                                fprintf(stderr, "deleting %s attribute (%N) with value %#B%s failed.\n",
-                                                               name, configuration_attribute_type_names, type,
+                                                               name, configuration_attribute_type_names, type,
                                                                &blob_db, id_pool_str);
                        }
                        query->destroy(query);
@@ -529,7 +529,7 @@ void del_attr(char *name, char *pool, char *identity,
 
        if (!found)
        {
-               if (blob.len == 0)
+               if (blob.len == 0)
                {
                        if (type_ip6 == 0)
                        {
@@ -714,4 +714,3 @@ void show_attr(void)
                }
        }
 }
-
similarity index 99%
rename from src/libhydra/plugins/attr_sql/pool_attributes.h
rename to src/pool/pool_attributes.h
index a42291f57ceb511fbf36f794745736239a0eabbf..6a5af33493f02286dddd58388598c7fecfbe708a 100644 (file)
@@ -61,5 +61,3 @@ void status_attr(bool hexout);
 void show_attr(void);
 
 #endif /* POOL_ATTRIBUTES_H_ */
-
-
similarity index 99%
rename from src/libhydra/plugins/attr_sql/pool_usage.c
rename to src/pool/pool_usage.c
index 985bc3ae8887ac2023c69a6b8d9dc537e23e059f..7622cfa86f2e54d36e40b6a46a6d9b6b0b20f347 100644 (file)
@@ -124,4 +124,3 @@ Usage:\n\
                lines are ignored. The file may not contain a --batch command.\n\
   \n");
 }
-
similarity index 99%
rename from src/libhydra/plugins/attr_sql/pool_usage.h
rename to src/pool/pool_usage.h
index a98b0d6809287af432c3d9a75c5cc5890441aa1f..0082ef6f2b1c2dec2a592da792d78057903fd7d8 100644 (file)
@@ -22,5 +22,4 @@
  */
 void usage(void);
 
-
 #endif /* POOL_USAGE_H_ */