face+security: Introduce environment variables to set/override transport, pib, and tpm configurations.
- NDN_CLIENT_TRANSPORT: equivalent of transport in client.conf
- NDN_CLIENT_PIB: equivalent of pib in client.conf
- NDN_CLIENT_TPM: equivalent of tpm in client.conf
Whenever an environment variable is set, it takes precedence over any
values specified in the configuration file.
Change-Id: I44c2347168616387a0489b6bf5c2c3a12db29863
Refs: #2925, #2514
diff --git a/src/transport/unix-transport.hpp b/src/transport/unix-transport.hpp
index 5a73047..6d16c26 100644
--- a/src/transport/unix-transport.hpp
+++ b/src/transport/unix-transport.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2013-2014 Regents of the University of California.
+ * Copyright (c) 2013-2016 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -69,18 +69,18 @@
virtual void
send(const Block& header, const Block& payload);
+ /**
+ * @brief Create transport with parameters defined in URI
+ *
+ * @throws Transport::Error if incorrect URI or unsupported protocol is specified
+ */
static shared_ptr<UnixTransport>
- create(const ConfigFile& config);
+ create(const std::string& uri);
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
- /**
- * Determine the default NFD unix socket
- *
- * @returns transport value if present in config, else /var/run/nfd.sock
- * @throws ConfigFile::Error if fail to parse value of a present "transport" field
- */
+
static std::string
- getDefaultSocketName(const ConfigFile& config);
+ getSocketNameFromUri(const std::string& uri);
private:
std::string m_unixSocket;