aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2013-09-05 18:00:48 +0200
committerTobias Brunner <tobias@strongswan.org>2013-10-11 15:16:05 +0200
commitec6ad6b08616b9d3e1a3b3dffc06d56f65179a06 (patch)
treed7457304cbc07abdee36d633a953e84388e96dd5 /src
parent5abe3c52d396339f3e1ac5f5a63cb8a4dfa0209d (diff)
downloadstrongswan-ec6ad6b08616b9d3e1a3b3dffc06d56f65179a06.tar.bz2
strongswan-ec6ad6b08616b9d3e1a3b3dffc06d56f65179a06.tar.xz
pool: Move the pool utility to its own directory in src
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am4
-rw-r--r--src/libhydra/plugins/attr_sql/Makefile.am10
-rw-r--r--src/pool/.gitignore (renamed from src/libhydra/plugins/attr_sql/.gitignore)0
-rw-r--r--src/pool/Makefile.am16
-rw-r--r--src/pool/pool.c (renamed from src/libhydra/plugins/attr_sql/pool.c)1
-rw-r--r--src/pool/pool_attributes.c (renamed from src/libhydra/plugins/attr_sql/pool_attributes.c)13
-rw-r--r--src/pool/pool_attributes.h (renamed from src/libhydra/plugins/attr_sql/pool_attributes.h)2
-rw-r--r--src/pool/pool_usage.c (renamed from src/libhydra/plugins/attr_sql/pool_usage.c)1
-rw-r--r--src/pool/pool_usage.h (renamed from src/libhydra/plugins/attr_sql/pool_usage.h)1
9 files changed, 27 insertions, 21 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 8ed45acc9..218c9434c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -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
diff --git a/src/libhydra/plugins/attr_sql/Makefile.am b/src/libhydra/plugins/attr_sql/Makefile.am
index 4c369a2bd..d126bb035 100644
--- a/src/libhydra/plugins/attr_sql/Makefile.am
+++ b/src/libhydra/plugins/attr_sql/Makefile.am
@@ -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/libhydra/plugins/attr_sql/.gitignore b/src/pool/.gitignore
index eae4e6ad0..eae4e6ad0 100644
--- a/src/libhydra/plugins/attr_sql/.gitignore
+++ b/src/pool/.gitignore
diff --git a/src/pool/Makefile.am b/src/pool/Makefile.am
new file mode 100644
index 000000000..8b429a4ba
--- /dev/null
+++ b/src/pool/Makefile.am
@@ -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
diff --git a/src/libhydra/plugins/attr_sql/pool.c b/src/pool/pool.c
index 4e7c48e23..831b3c439 100644
--- a/src/libhydra/plugins/attr_sql/pool.c
+++ b/src/pool/pool.c
@@ -1284,4 +1284,3 @@ int main(int argc, char *argv[])
exit(EXIT_SUCCESS);
}
-
diff --git a/src/libhydra/plugins/attr_sql/pool_attributes.c b/src/pool/pool_attributes.c
index 1d1ba8f58..72af4f494 100644
--- a/src/libhydra/plugins/attr_sql/pool_attributes.c
+++ b/src/pool/pool_attributes.c
@@ -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)
}
}
}
-
diff --git a/src/libhydra/plugins/attr_sql/pool_attributes.h b/src/pool/pool_attributes.h
index a42291f57..6a5af3349 100644
--- a/src/libhydra/plugins/attr_sql/pool_attributes.h
+++ b/src/pool/pool_attributes.h
@@ -61,5 +61,3 @@ void status_attr(bool hexout);
void show_attr(void);
#endif /* POOL_ATTRIBUTES_H_ */
-
-
diff --git a/src/libhydra/plugins/attr_sql/pool_usage.c b/src/pool/pool_usage.c
index 985bc3ae8..7622cfa86 100644
--- a/src/libhydra/plugins/attr_sql/pool_usage.c
+++ b/src/pool/pool_usage.c
@@ -124,4 +124,3 @@ Usage:\n\
lines are ignored. The file may not contain a --batch command.\n\
\n");
}
-
diff --git a/src/libhydra/plugins/attr_sql/pool_usage.h b/src/pool/pool_usage.h
index a98b0d680..0082ef6f2 100644
--- a/src/libhydra/plugins/attr_sql/pool_usage.h
+++ b/src/pool/pool_usage.h
@@ -22,5 +22,4 @@
*/
void usage(void);
-
#endif /* POOL_USAGE_H_ */