consistent display of strongSwan version
authorAndreas Steffen <andreas.steffen@strongswan.org>
Sat, 13 Jun 2009 14:03:08 +0000 (16:03 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Sat, 13 Jun 2009 14:03:08 +0000 (16:03 +0200)
13 files changed:
src/_copyright/_copyright.c
src/charon/daemon.c
src/charon/plugins/stroke/stroke_list.c
src/libfreeswan/Makefile.am
src/libfreeswan/copyright.c
src/libfreeswan/freeswan.h
src/libfreeswan/version.3 [deleted file]
src/libfreeswan/version.c [deleted file]
src/pluto/adns.c
src/pluto/log.c
src/pluto/plutomain.c
src/starter/starter.c
src/whack/whack.c

index b729030..5abefd4 100644 (file)
@@ -37,7 +37,6 @@ main(int argc, char *argv[])
        int opt;
        extern int optind;
        int errflg = 0;
-       const char *version = ipsec_version_code();
        const char **notice = ipsec_copyright_notice();
        const char **co;
 
@@ -48,7 +47,7 @@ main(int argc, char *argv[])
                        exit(0);
                        break;
                case 'v':       /* version */
-                       printf("%s %s\n", me, version);
+                       printf("%s strongSwan "VERSION"\n", me);
                        exit(0);
                        break;
                case '?':
index 3df2fbb..e278360 100644 (file)
@@ -467,7 +467,7 @@ static bool initialize(private_daemon_t *this, bool syslog, level_t levels[])
        
        initialize_loggers(this, !syslog, levels);
        
-       DBG1(DBG_DMN, "starting charon (strongSwan Version %s)", VERSION);
+       DBG1(DBG_DMN, "Starting IKEv2 charon daemon (strongSwan "VERSION")");
 
        /* load secrets, ca certificates and crls */
        this->public.processor = processor_create();
index 4f97d38..564a511 100644 (file)
@@ -375,7 +375,7 @@ static void status(private_stroke_list_t *this, stroke_msg_t *msg, FILE *out, bo
                time_t now = time(NULL);
                u_int size, online, offline;
                
-               fprintf(out, "Daemon status (charon "VERSION"):\n");
+               fprintf(out, "Status of IKEv2 charon daemon (strongSwan "VERSION"):\n");
                fprintf(out, "  uptime: %V, since %T\n", &now, &this->uptime, &this->uptime, FALSE);
                fprintf(out, "  worker threads: %d idle of %d,",
                                charon->processor->get_idle_threads(charon->processor),
index 29d0ea0..44dd315 100644 (file)
@@ -7,7 +7,7 @@ libfreeswan_a_SOURCES = addrtoa.c addrtot.c addrtypeof.c anyaddr.c atoaddr.c ato
                        pfkey.h pfkeyv2.h rangetosubnet.c sameaddr.c satoa.c \
                        satot.c subnetof.c subnettoa.c subnettot.c \
                        subnettypeof.c ttoaddr.c ttodata.c ttoprotoport.c ttosa.c ttosubnet.c ttoul.c \
-                       ultoa.c ultot.c version.c
+                       ultoa.c ultot.c
 
 INCLUDES = \
 -I$(top_srcdir)/src/libstrongswan \
@@ -15,5 +15,5 @@ INCLUDES = \
 
 dist_man3_MANS = anyaddr.3 atoaddr.3 atoasr.3 atosa.3 atoul.3 goodmask.3 initaddr.3 initsubnet.3 \
                  keyblobtoid.3 portof.3 prng.3 rangetosubnet.3 sameaddr.3 subnetof.3 \
-                 ttoaddr.3 ttodata.3 ttosa.3 ttoul.3 version.3
+                 ttoaddr.3 ttodata.3 ttosa.3 ttoul.3
 
index 888308e..65585b6 100644 (file)
@@ -16,7 +16,7 @@
 #include "freeswan.h"
 
 static const char *co[] = {
- "Copyright (C) 1999-2008  Henry Spencer, Richard Guy Briggs,",
+ "Copyright (C) 1999-2009  Henry Spencer, Richard Guy Briggs,",
  "    D. Hugh Redelmeier, Sandy Harris, Claudia Schmeing,",
  "    Michael Richardson, Angelos D. Keromytis, John Ioannidis,",
  "",
index d671e7f..cb14cd6 100644 (file)
@@ -218,8 +218,6 @@ unsigned long prng_count(struct prng *prng);
 void prng_final(struct prng *prng);
 
 /* odds and ends */
-const char *ipsec_version_code(void);
-const char *ipsec_version_string(void);
 const char **ipsec_copyright_notice(void);
 
 const char *dns_string_rr(int rr, char *buf, int bufsize);
diff --git a/src/libfreeswan/version.3 b/src/libfreeswan/version.3
deleted file mode 100644 (file)
index f2a7389..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-.TH IPSEC_VERSION 3 "21 Nov 2001"
-.SH NAME
-ipsec ipsec_version_code \- get IPsec version code
-.br
-ipsec ipsec_version_string \- get full IPsec version string
-.br
-ipsec ipsec_copyright_notice \- get IPsec copyright notice
-.SH SYNOPSIS
-.B "#include <freeswan.h>
-.sp
-.B "const char *ipsec_version_code(void);"
-.br
-.B "const char *ipsec_version_string(void);"
-.br
-.B "const char **ipsec_copyright_notice(void);"
-.SH DESCRIPTION
-These functions provide information on version numbering and copyright
-of the Linux FreeS/WAN IPsec implementation.
-.PP
-.I Ipsec_version_code
-returns a pointer to a string constant
-containing the current IPsec version code,
-such as ``1.92'' or ``snap2001Nov19b''.
-.PP
-.I Ipsec_version_string
-returns a pointer to a string constant giving a full version identification,
-consisting of the version code preceded by a prefix identifying the software,
-e.g. ``Linux FreeS/WAN 1.92''.
-.PP
-.I Ipsec_copyright_notice
-returns a pointer to a vector of pointers,
-terminated by a
-.BR NULL ,
-which is the text of a suitable copyright notice.
-Each pointer points to a string constant (possibly empty) which is one line
-of the somewhat-verbose copyright notice.
-The strings are NUL-terminated and do not contain a newline;
-supplying suitable line termination for the output device is
-the caller's responsibility.
-.SH SEE ALSO
-ipsec(8)
-.SH HISTORY
-Written for the FreeS/WAN project by Henry Spencer.
diff --git a/src/libfreeswan/version.c b/src/libfreeswan/version.c
deleted file mode 100644 (file)
index 666a662..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * return IPsec version information
- * Copyright (C) 2001  Henry Spencer.
- *
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.  See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
- * This library 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 Library General Public
- * License for more details.
- */
-
-#include "freeswan.h"
-
-static const char strongswan_number[] = VERSION;
-static const char strongswan_string[] = "Linux strongSwan " VERSION;
-
-/*
- - ipsec_version_code - return IPsec version number/code, as string
- */
-const char *
-ipsec_version_code()
-{
-       return strongswan_number;
-}
-
-/*
- - ipsec_version_string - return full version string
- */
-const char *
-ipsec_version_string()
-{
-       return strongswan_string;
-}
index d7f35f9..95e22b9 100644 (file)
@@ -577,7 +577,7 @@ adns_usage(const char *fmt, const char *arg)
        fprintf(stderr, "INTERNAL TO PLUTO: DO NOT EXECUTE\n");
 
        fprintf(stderr, fmt, arg);
-       fprintf(stderr, "\n%s\n", ipsec_version_string());
+       fprintf(stderr, "\nstrongSwan "VERSION"\n");
 
        for (; *sp != NULL; sp++)
                fprintf(stderr, "%s\n", *sp);
index d4fa7bc..e34409f 100644 (file)
@@ -850,7 +850,7 @@ void show_status(bool all, const char *name)
 {
        if (all)
        {
-               whack_log(RC_COMMENT, "Daemon status (pluto "VERSION"):");
+               whack_log(RC_COMMENT, "Status of IKEv1 pluto daemon (strongSwan "VERSION"):");
                show_ifaces_status();
                show_myid_status();
                show_loaded_plugins();
index a53c777..39367ca 100644 (file)
@@ -137,11 +137,10 @@ static void usage(const char *mess)
                        "[--nat_traversal] [--keep_alive <delay_sec>]"
                        " \\\n\t"
                        "[--force_keepalive] [--disable_port_floating]"
-                  " \\\n\t"
-                  "[--virtual_private <network_list>]"
+                   " \\\n\t"
+                   "[--virtual_private <network_list>]"
                        "\n"
-               "strongSwan %s\n"
-               , ipsec_version_code());
+                   "strongSwan "VERSION"\n");
        exit_pluto(mess == NULL? 0 : 1);
 }
 
@@ -359,8 +358,7 @@ int main(int argc, char **argv)
                        {
                                const char **sp = ipsec_copyright_notice();
 
-                               printf("%s%s\n", ipsec_version_string(),
-                                                                compile_time_interop_options);
+                               printf("strongSwan "VERSION"%s\n", compile_time_interop_options);
                                for (; *sp != NULL; sp++)
                                        puts(*sp);
                        }
@@ -636,9 +634,8 @@ int main(int argc, char **argv)
        /* Note: some scripts may look for this exact message -- don't change
         * ipsec barf was one, but it no longer does.
         */
-       plog("Starting Pluto (strongSwan Version %s%s)"
-               , ipsec_version_code()
-               , compile_time_interop_options);
+       plog("Starting IKEv1 pluto daemon (strongSwan "VERSION")%s",
+                compile_time_interop_options);
 
        /* load plugins, further infrastructure may need it */
        lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR, 
index 02a64a7..2d2f452 100644 (file)
@@ -275,7 +275,7 @@ int main (int argc, char **argv)
        signal(SIGALRM, fsig);
        signal(SIGUSR1, fsig);
 
-       plog("Starting strongSwan %s IPsec [starter]...", ipsec_version_code());
+       plog("Starting strongSwan "VERSION" IPsec [starter]...");
 
        /* verify that we can start */
        if (getuid() != 0)
index dd7f772..2811250 100644 (file)
@@ -230,8 +230,7 @@ static void help(void)
                "shutdown: whack"
                        " --shutdown"
                        "\n\n"
-               "strongSwan %s\n"
-               , ipsec_version_code());
+               "strongSwan "VERSION"\n");
 }
 
 static const char *label = NULL;        /* --label operand, saved for diagnostics */
@@ -1004,7 +1003,7 @@ int main(int argc, char **argv)
                        {
                                const char **sp = ipsec_copyright_notice();
 
-                               printf("%s\n", ipsec_version_string());
+                               printf("strongSwan "VERSION"\n");
                                for (; *sp != NULL; sp++)
                                        puts(*sp);
                        }