tools: add dnc (distributed netcat) tool

Change-Id: I85a4845a75f4aa46509a7a94ecace821745118e0
diff --git a/tools/common.h b/tools/common.h
new file mode 100644
index 0000000..19b7771
--- /dev/null
+++ b/tools/common.h
@@ -0,0 +1,44 @@
+/*
+ *  Copyright (C) 2004-2023 Savoir-faire Linux Inc.
+ *
+ *  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 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  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.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+#include <opendht/crypto.h>
+
+
+namespace dhtnet {
+
+using Buffer = std::shared_ptr<std::vector<uint8_t>>;
+
+/**
+ * Attempt to retrieve the identity from the .ssh directory, and if none is found, generate a new
+ * certification.
+ * @return dht::crypto::Identity
+ */
+
+dht::crypto::Identity loadIdentity(bool isServer);
+// add certstore to the config
+std::unique_ptr<ConnectionManager::Config> connectionManagerConfig(dht::crypto::Identity identity,
+                                                      const std::string& bootstrap_ip_add,
+                                                      const std::string& bootstrap_port,
+                                                      std::shared_ptr<Logger> logger,
+                                                      tls::CertificateStore& certStore,
+                                                      std::shared_ptr<asio::io_context> ioContext,
+                                                      IceTransportFactory& iceFactory);
+// add ioContext to readFromStdin
+
+template <typename T>
+void readFromPipe(std::shared_ptr<ChannelSocket> socket, T input, Buffer buffer);
+
+} // namespace dhtnet
\ No newline at end of file