pool: Move the pool utility to its own directory in src

This commit is contained in:
Tobias Brunner 2013-09-05 18:00:48 +02:00
parent 5abe3c52d3
commit ec6ad6b086
10 changed files with 28 additions and 21 deletions

View 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

View 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

View 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

16
src/pool/Makefile.am Normal file
View File

@ -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

View File

@ -1284,4 +1284,3 @@ int main(int argc, char *argv[])
exit(EXIT_SUCCESS);
}

View 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)
}
}
}

View File

@ -61,5 +61,3 @@ void status_attr(bool hexout);
void show_attr(void);
#endif /* POOL_ATTRIBUTES_H_ */

View File

@ -124,4 +124,3 @@ Usage:\n\
lines are ignored. The file may not contain a --batch command.\n\
\n");
}

View File

@ -22,5 +22,4 @@
*/
void usage(void);
#endif /* POOL_USAGE_H_ */