From: Andreas Steffen Date: Wed, 9 Dec 2015 19:39:59 +0000 (+0100) Subject: Removed VICI protocol versioning X-Git-Tag: 5.4.0dr1~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=44d3b02b579be9a186031a950ca696532ea1b8a3;p=thirdparty%2Fstrongswan.git Removed VICI protocol versioning --- diff --git a/src/libcharon/plugins/vici/Makefile.am b/src/libcharon/plugins/vici/Makefile.am index 9540c2063d..99acc767e8 100644 --- a/src/libcharon/plugins/vici/Makefile.am +++ b/src/libcharon/plugins/vici/Makefile.am @@ -14,7 +14,6 @@ plugin_LTLIBRARIES = libstrongswan-vici.la endif libstrongswan_vici_la_SOURCES = \ - vici_version.c vici_version.h \ vici_socket.h vici_socket.c \ vici_message.h vici_message.c \ vici_builder.h vici_builder.c \ @@ -40,7 +39,6 @@ ipseclib_LTLIBRARIES = libvici.la libvici_la_SOURCES = \ vici_message.c vici_message.h \ vici_builder.c vici_builder.h \ - vici_version.c vici_version.h \ vici_cert_info.c vici_cert_info.h \ libvici.c libvici.h diff --git a/src/libcharon/plugins/vici/libvici.c b/src/libcharon/plugins/vici/libvici.c index d8ccd482da..7c98c8b692 100644 --- a/src/libcharon/plugins/vici/libvici.c +++ b/src/libcharon/plugins/vici/libvici.c @@ -2,9 +2,6 @@ * Copyright (C) 2014 Martin Willi * Copyright (C) 2014 revosec AG * - * Copyright (C) 2015 Andreas Steffen - * HSR Hochschule fuer Technik Rapperswil - * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your @@ -20,7 +17,6 @@ #include "vici_builder.h" #include "vici_dispatcher.h" #include "vici_socket.h" -#include "vici_version.h" #include #include @@ -333,11 +329,6 @@ void vici_add_key_valuef(vici_req_t *req, char *key, char *fmt, ...) va_end(args); } -void vici_add_version(vici_req_t *req, vici_version_t version) -{ - vici_add_key_valuef(req, "vici", "%N", vici_version_names, version); -} - void vici_begin_list(vici_req_t *req, char *name) { req->b->add(req->b, VICI_LIST_START, name); diff --git a/src/libcharon/plugins/vici/libvici.h b/src/libcharon/plugins/vici/libvici.h index 57058e292b..3ca9de4240 100644 --- a/src/libcharon/plugins/vici/libvici.h +++ b/src/libcharon/plugins/vici/libvici.h @@ -2,9 +2,6 @@ * Copyright (C) 2014 Martin Willi * Copyright (C) 2014 revosec AG * - * Copyright (C) 2015 Andreas Steffen - * HSR Hochschule fuer Technik Rapperswil - * libvici.h is MIT-licensed to simplify reuse, but please note that libvici.c * is not, as it depends on the GPLv2 licensed libstrongswan. * @@ -89,21 +86,6 @@ #include -/** - * Vici versions - */ -typedef enum { - /** default version if vici key/value pair is missing in message */ - VICI_1_0, - /** current version, vici key/value pair is explicitly sent in message */ - VICI_2_0, -} vici_version_t; - -/** - * Current vici version - */ -#define VICI_VERSION VICI_2_0 - /** * Opaque vici connection contex. */ @@ -237,14 +219,6 @@ void vici_add_key_value(vici_req_t *req, char *key, void *buf, int len); */ void vici_add_key_valuef(vici_req_t *req, char *key, char *fmt, ...); -/** - * Add a vici version key/value pair (not not needed for VICI 1.0) - * - * @param req request message to add vici version key/value pair to - * @param version vici version - */ -void vici_add_version(vici_req_t *req, vici_version_t version); - /** * Begin a list in a request message. * diff --git a/src/libcharon/plugins/vici/vici_version.c b/src/libcharon/plugins/vici/vici_version.c deleted file mode 100644 index 70d52bf3f3..0000000000 --- a/src/libcharon/plugins/vici/vici_version.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (C) 2015 Andreas Steffen - * HSR Hochschule fuer Technik Rapperswil - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. See . - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - */ - -#include "vici_version.h" - -ENUM(vici_version_names, VICI_1_0, VICI_2_0, - "1.0", - "2.0" -); diff --git a/src/libcharon/plugins/vici/vici_version.h b/src/libcharon/plugins/vici/vici_version.h deleted file mode 100644 index 53e13dc951..0000000000 --- a/src/libcharon/plugins/vici/vici_version.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2015 Andreas Steffen - * HSR Hochschule fuer Technik Rapperswil - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. See . - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - */ - -/** - * @defgroup vici_version vici_version - * @{ @ingroup vici - */ - -#ifndef VICI_VERSION_H_ -#define VICI_VERSION_H_ - -#include "libvici.h" - -#include - -extern enum_name_t *vici_version_names; - -#endif /** VICI_VERSION_H_ @}*/ diff --git a/src/swanctl/commands/version.c b/src/swanctl/commands/version.c index 32dd77e315..0c499e4cca 100644 --- a/src/swanctl/commands/version.c +++ b/src/swanctl/commands/version.c @@ -2,9 +2,6 @@ * Copyright (C) 2014 Martin Willi * Copyright (C) 2014 revosec AG * - * Copyright (C) 2015 Andreas Steffen - * HSR Hochschule fuer Technik Rapperswil - * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your @@ -18,8 +15,6 @@ #include "command.h" -#include - #include static int version(vici_conn_t *conn) @@ -56,8 +51,7 @@ static int version(vici_conn_t *conn) if (!daemon) { - printf("strongSwan swanctl %s vici %N\n", VERSION, - vici_version_names, VICI_VERSION); + printf("strongSwan swanctl %s\n", VERSION); return 0; } @@ -75,13 +69,12 @@ static int version(vici_conn_t *conn) } else { - printf("strongSwan %s vici %s %s (%s, %s, %s)\n", - vici_find_str(res, "" , "version"), - vici_find_str(res, "1.0", "vici"), - vici_find_str(res, "" , "daemon"), - vici_find_str(res, "" , "sysname"), - vici_find_str(res, "" , "release"), - vici_find_str(res, "" , "machine")); + printf("strongSwan %s %s (%s, %s, %s)\n", + vici_find_str(res, "", "version"), + vici_find_str(res, "", "daemon"), + vici_find_str(res, "", "sysname"), + vici_find_str(res, "", "release"), + vici_find_str(res, "", "machine")); } vici_free_res(res); return 0;