summaryrefslogtreecommitdiff
path: root/one.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'one.cpp')
-rw-r--r--one.cpp35
1 files changed, 29 insertions, 6 deletions
diff --git a/one.cpp b/one.cpp
index 115ad265..f68e3cec 100644
--- a/one.cpp
+++ b/one.cpp
@@ -70,14 +70,27 @@ using namespace ZeroTier;
static OneService *volatile zt1Service = (OneService *)0;
+#define PROGRAM_NAME "ZeroTier One"
+#define COPYRIGHT_NOTICE "Copyright © 2011–2016 ZeroTier, Inc."
+#define LICENSE_GRANT \
+ "This is free software: you may copy, modify, and/or distribute this" ZT_EOL_S \
+ "work under the terms of the GNU General Public License, version 3 or" ZT_EOL_S \
+ "later as published by the Free Software Foundation." ZT_EOL_S \
+ "No warranty expressed or implied." ZT_EOL_S
+
/****************************************************************************/
/* zerotier-cli personality */
/****************************************************************************/
static void cliPrintHelp(const char *pn,FILE *out)
{
- fprintf(out,"ZeroTier One version %d.%d.%d"ZT_EOL_S"(c)2011-2015 ZeroTier, Inc."ZT_EOL_S,ZEROTIER_ONE_VERSION_MAJOR,ZEROTIER_ONE_VERSION_MINOR,ZEROTIER_ONE_VERSION_REVISION);
- fprintf(out,"Licensed under the GNU General Public License v3"ZT_EOL_S""ZT_EOL_S);
+ fprintf(out,
+ "%s version %d.%d.%d" ZT_EOL_S,
+ PROGRAM_NAME,
+ ZEROTIER_ONE_VERSION_MAJOR, ZEROTIER_ONE_VERSION_MINOR, ZEROTIER_ONE_VERSION_REVISION);
+ fprintf(out,
+ COPYRIGHT_NOTICE ZT_EOL_S
+ LICENSE_GRANT ZT_EOL_S);
fprintf(out,"Usage: %s [-switches] <command/path> [<args>]"ZT_EOL_S""ZT_EOL_S,pn);
fprintf(out,"Available switches:"ZT_EOL_S);
fprintf(out," -h - Display this help"ZT_EOL_S);
@@ -550,8 +563,13 @@ static int cli(int argc,char **argv)
static void idtoolPrintHelp(FILE *out,const char *pn)
{
- fprintf(out,"ZeroTier One version %d.%d.%d"ZT_EOL_S"(c)2011-2015 ZeroTier, Inc."ZT_EOL_S,ZEROTIER_ONE_VERSION_MAJOR,ZEROTIER_ONE_VERSION_MINOR,ZEROTIER_ONE_VERSION_REVISION);
- fprintf(out,"Licensed under the GNU General Public License v3"ZT_EOL_S""ZT_EOL_S);
+ fprintf(out,
+ "%s version %d.%d.%d" ZT_EOL_S,
+ PROGRAM_NAME,
+ ZEROTIER_ONE_VERSION_MAJOR, ZEROTIER_ONE_VERSION_MINOR, ZEROTIER_ONE_VERSION_REVISION);
+ fprintf(out,
+ COPYRIGHT_NOTICE ZT_EOL_S
+ LICENSE_GRANT ZT_EOL_S);
fprintf(out,"Usage: %s <command> [<args>]"ZT_EOL_S""ZT_EOL_S"Commands:"ZT_EOL_S,pn);
fprintf(out," generate [<identity.secret>] [<identity.public>]"ZT_EOL_S);
fprintf(out," validate <identity.secret/public>"ZT_EOL_S);
@@ -891,8 +909,13 @@ static BOOL IsCurrentUserLocalAdministrator(void)
static void printHelp(const char *cn,FILE *out)
{
- fprintf(out,"ZeroTier One version %d.%d.%d"ZT_EOL_S"(c)2011-2015 ZeroTier, Inc."ZT_EOL_S,ZEROTIER_ONE_VERSION_MAJOR,ZEROTIER_ONE_VERSION_MINOR,ZEROTIER_ONE_VERSION_REVISION);
- fprintf(out,"Licensed under the GNU General Public License v3"ZT_EOL_S""ZT_EOL_S);
+ fprintf(out,
+ "%s version %d.%d.%d" ZT_EOL_S,
+ PROGRAM_NAME,
+ ZEROTIER_ONE_VERSION_MAJOR, ZEROTIER_ONE_VERSION_MINOR, ZEROTIER_ONE_VERSION_REVISION);
+ fprintf(out,
+ COPYRIGHT_NOTICE ZT_EOL_S
+ LICENSE_GRANT ZT_EOL_S);
std::string updateUrl(OneService::autoUpdateUrl());
if (updateUrl.length())
fprintf(out,"Automatic updates enabled:"ZT_EOL_S" %s"ZT_EOL_S" (all updates are securely authenticated by 256-bit ECDSA signature)"ZT_EOL_S""ZT_EOL_S,updateUrl.c_str());