summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hicn-light/src/command_line/controller/hicnLightControl_main.c52
-rw-r--r--hicn-light/src/command_line/daemon/hicnLightDaemon_main.c52
-rw-r--r--libtransport/cmake/Modules/DefaultConfiguration.cmake19
3 files changed, 91 insertions, 32 deletions
diff --git a/hicn-light/src/command_line/controller/hicnLightControl_main.c b/hicn-light/src/command_line/controller/hicnLightControl_main.c
index 03f74692f..ff1a20ab0 100644
--- a/hicn-light/src/command_line/controller/hicnLightControl_main.c
+++ b/hicn-light/src/command_line/controller/hicnLightControl_main.c
@@ -80,14 +80,52 @@ typedef struct controller_main_state {
ControlState *controlState;
} ControlMainState;
+static void _printRed(const char *output) {
+
+#ifndef _WIN32
+ printf("\033[0;31m%s", output);
+#else
+ HANDLE hConsole = NULL;
+ WORD currentConsoleAttr;
+ CONSOLE_SCREEN_BUFFER_INFO csbi;
+ hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
+ if (GetConsoleScreenBufferInfo(hConsole, &csbi))
+ currentConsoleAttr = csbi.wAttributes;
+ SetConsoleTextAttribute(hConsole, 4);
+ printf("%s", output);
+ SetConsoleTextAttribute(hConsole, currentConsoleAttr);
+#endif
+
+}
+
+static void _printWhite(const char *output) {
+
+#ifndef _WIN32
+ printf("\033[0m%s", output);
+#else
+ HANDLE hConsole = NULL;
+ WORD currentConsoleAttr;
+ CONSOLE_SCREEN_BUFFER_INFO csbi;
+ SetConsoleTextAttribute(hConsole, 7);
+ if (GetConsoleScreenBufferInfo(hConsole, &csbi))
+ currentConsoleAttr = csbi.wAttributes;
+ hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
+ printf("%s", output);
+ SetConsoleTextAttribute(hConsole, currentConsoleAttr);
+#endif
+
+}
+
static void _displayForwarderLogo(void) {
- const char cli_banner[] =
- "\033[0;31m ____ ___ _ \033[0m __ _ __ _ __ __\n"
- "\033[0;31m / __// _ \\ (_)___ \033[0m / / (_)____ ___ ____/ /(_)___ _ / / / /_\n"
- "\033[0;31m / _/ / // /_ / // _ \\ \033[0m / _ \\ / // __// _ \\___/ // // _ `// _ \\/ __/\n"
- "\033[0;31m/_/ /____/(_)/_/ \\___/ \033[0m/_//_//_/ \\__//_//_/ /_//_/ \\_, //_//_/\\__/\n"
- " /___/ \n";
- printf("%s", cli_banner);
+ _printRed(" ____ ___ _ ");
+ _printWhite(" __ _ __ _ __ __\n");
+ _printRed(" / __// _ \\ (_)___ ");
+ _printWhite(" / / (_)____ ___ ____/ /(_)___ _ / / / /_\n");
+ _printRed(" / _/ / // /_ / // _ \\ ");
+ _printWhite(" / _ \\ / // __// _ \\___/ // // _ `// _ \\/ __/\n");
+ _printRed("/_/ /____/(_)/_/ \\___/ ");
+ _printWhite("/_//_//_/ \\__//_//_/ /_//_/ \\_, //_//_/\\__/\n");
+ _printWhite(" /___/ \n");
printf("\n");
}
diff --git a/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c b/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c
index 1b7e92e75..533bb9cf0 100644
--- a/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c
+++ b/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c
@@ -36,14 +36,52 @@
#include <src/core/dispatcher.h>
#include <src/core/forwarder.h>
+static void _printRed(const char *output) {
+
+#ifndef _WIN32
+ printf("\033[0;31m%s", output);
+#else
+ HANDLE hConsole = NULL;
+ WORD currentConsoleAttr;
+ CONSOLE_SCREEN_BUFFER_INFO csbi;
+ if (GetConsoleScreenBufferInfo(hConsole, &csbi))
+ currentConsoleAttr = csbi.wAttributes;
+ hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
+ SetConsoleTextAttribute(hConsole, 4);
+ printf("%s", output);
+ SetConsoleTextAttribute(hConsole, currentConsoleAttr);
+#endif
+
+}
+
+static void _printWhite(const char *output) {
+
+#ifndef _WIN32
+ printf("\033[0m%s", output);
+#else
+ HANDLE hConsole = NULL;
+ WORD currentConsoleAttr;
+ CONSOLE_SCREEN_BUFFER_INFO csbi;
+ if (GetConsoleScreenBufferInfo(hConsole, &csbi))
+ currentConsoleAttr = csbi.wAttributes;
+ hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
+ SetConsoleTextAttribute(hConsole, 7);
+ printf("%s", output);
+ SetConsoleTextAttribute(hConsole, currentConsoleAttr);
+#endif
+
+}
+
static void _displayForwarderLogo(void) {
- const char cli_banner[] =
- "\033[0;31m ____ ___ _ \033[0m __ _ __ _ __ __\n"
- "\033[0;31m / __// _ \\ (_)___ \033[0m / / (_)____ ___ ____/ /(_)___ _ / / / /_\n"
- "\033[0;31m / _/ / // /_ / // _ \\ \033[0m / _ \\ / // __// _ \\___/ // // _ `// _ \\/ __/\n"
- "\033[0;31m/_/ /____/(_)/_/ \\___/ \033[0m/_//_//_/ \\__//_//_/ /_//_/ \\_, //_//_/\\__/\n"
- " /___/ \n";
- printf("%s", cli_banner);
+ _printRed(" ____ ___ _ ");
+ _printWhite(" __ _ __ _ __ __\n");
+ _printRed(" / __// _ \\ (_)___ ");
+ _printWhite(" / / (_)____ ___ ____/ /(_)___ _ / / / /_\n");
+ _printRed(" / _/ / // /_ / // _ \\ ");
+ _printWhite(" / _ \\ / // __// _ \\___/ // // _ `// _ \\/ __/\n");
+ _printRed("/_/ /____/(_)/_/ \\___/ ");
+ _printWhite("/_//_//_/ \\__//_//_/ /_//_/ \\_, //_//_/\\__/\n");
+ _printWhite(" /___/ \n");
printf("\n");
}
diff --git a/libtransport/cmake/Modules/DefaultConfiguration.cmake b/libtransport/cmake/Modules/DefaultConfiguration.cmake
index 2110ac0fb..bf00bf5e1 100644
--- a/libtransport/cmake/Modules/DefaultConfiguration.cmake
+++ b/libtransport/cmake/Modules/DefaultConfiguration.cmake
@@ -16,8 +16,6 @@ set(CMAKE_CXX_STANDARD 14)
set(CMAKE_C_STANDARD 11)
# Compilation options
-option(BUILD_APPS "Build apps" ON)
-option(BUILD_WITH_VPP "Add support for VPP" OFF)
option(COMPILE_TESTS "Compile functional tests" OFF)
# Compilation flags
@@ -30,19 +28,4 @@ set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -fpermissive")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
-set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}")
-
-# Packaging
-# TODO Libasio and libmemif
-set(DEPS_DEB "libparc (>= 1.0)")
-set(DEPS_RPM "libparc >= 1.0")
-set(BUILD_DEPS_DEB "libtransport (>= 1.0), libhicn-dev (>= 1.0), libparc-dev (>= 1.0)")
-set(BUILD_DEPS_RPM "libtransport >= 1.0, libhicn-devel >= 1.0, libparc-devel >= 1.0")
-
-set(VPP_DEPS_DEB "${DEPS_DEB}, hicn-plugin, vpp-lib (>= 18.07), vpp-dev (>= 18.07)")
-set(VPP_DEPS_RPM "${DEPS_RPM}, hicn-plugin, vpp-lib >= 18.07), vpp-dev (>= 18.07)")
-set(VPP_BUILD_DEPS_DEB "${BUILD_DEPS_DEB}, hicn-plugin, vpp-lib (>= 18.07), vpp-dev (>= 18.07)")
-set(VPP_BUILD_DEPS_RPM "${BUILD_DEPS_RPM}, hicn-plugin, vpp-lib (>= 18.07), vpp-dev (>= 18.07)")
-
-set(PACKAGE_DESCRIPTION "This library is designed to provide a transport layer and API for applications willing to communicate using an hICN protocol stack.")
-set(PACKAGE_HOMEPAGE "https://wiki.fd.io/view/Libicnet") \ No newline at end of file
+set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}") \ No newline at end of file