diff --git a/daemon/face/ethernet-factory.cpp b/daemon/face/ethernet-factory.cpp
index 9ff5fd5..0ba49ae 100644
--- a/daemon/face/ethernet-factory.cpp
+++ b/daemon/face/ethernet-factory.cpp
@@ -173,30 +173,27 @@
 }
 
 void
-EthernetFactory::createFace(const FaceUri& remoteUri,
-                            const ndn::optional<FaceUri>& localUri,
-                            ndn::nfd::FacePersistency persistency,
-                            bool wantLocalFieldsEnabled,
+EthernetFactory::createFace(const CreateFaceParams& params,
                             const FaceCreatedCallback& onCreated,
                             const FaceCreationFailedCallback& onFailure)
 {
-  BOOST_ASSERT(remoteUri.isCanonical());
+  BOOST_ASSERT(params.remoteUri.isCanonical());
 
-  if (!localUri || localUri->getScheme() != "dev") {
+  if (!params.localUri || params.localUri->getScheme() != "dev") {
     NFD_LOG_TRACE("Cannot create unicast Ethernet face without dev:// LocalUri");
     onFailure(406, "Creation of unicast Ethernet faces requires a LocalUri with dev:// scheme");
     return;
   }
-  BOOST_ASSERT(localUri->isCanonical());
+  BOOST_ASSERT(params.localUri->isCanonical());
 
-  if (persistency == ndn::nfd::FACE_PERSISTENCY_ON_DEMAND) {
+  if (params.persistency == ndn::nfd::FACE_PERSISTENCY_ON_DEMAND) {
     NFD_LOG_TRACE("createFace does not support FACE_PERSISTENCY_ON_DEMAND");
     onFailure(406, "Outgoing Ethernet faces do not support on-demand persistency");
     return;
   }
 
-  ethernet::Address remoteEndpoint(ethernet::Address::fromString(remoteUri.getHost()));
-  std::string localEndpoint(localUri->getHost());
+  ethernet::Address remoteEndpoint(ethernet::Address::fromString(params.remoteUri.getHost()));
+  std::string localEndpoint(params.localUri->getHost());
 
   if (remoteEndpoint.isMulticast()) {
     NFD_LOG_TRACE("createFace does not support multicast faces");
@@ -204,7 +201,7 @@
     return;
   }
 
-  if (wantLocalFieldsEnabled) {
+  if (params.wantLocalFieldsEnabled) {
     // Ethernet faces are never local
     NFD_LOG_TRACE("createFace cannot create non-local face with local fields enabled");
     onFailure(406, "Local fields can only be enabled on faces with local scope");
@@ -213,7 +210,7 @@
 
   for (const auto& i : m_channels) {
     if (i.first == localEndpoint) {
-      i.second->connect(remoteEndpoint, persistency, onCreated, onFailure);
+      i.second->connect(remoteEndpoint, params.persistency, onCreated, onFailure);
       return;
     }
   }
diff --git a/daemon/face/ethernet-factory.hpp b/daemon/face/ethernet-factory.hpp
index e4cf7d9..244f769 100644
--- a/daemon/face/ethernet-factory.hpp
+++ b/daemon/face/ethernet-factory.hpp
@@ -50,10 +50,7 @@
                 FaceSystem::ConfigContext& context) override;
 
   void
-  createFace(const FaceUri& remoteUri,
-             const ndn::optional<FaceUri>& localUri,
-             ndn::nfd::FacePersistency persistency,
-             bool wantLocalFieldsEnabled,
+  createFace(const CreateFaceParams& params,
              const FaceCreatedCallback& onCreated,
              const FaceCreationFailedCallback& onFailure) override;
 
diff --git a/daemon/face/protocol-factory.hpp b/daemon/face/protocol-factory.hpp
index 524f901..0eee552 100644
--- a/daemon/face/protocol-factory.hpp
+++ b/daemon/face/protocol-factory.hpp
@@ -129,21 +129,28 @@
     return providedSchemes;
   }
 
-  /** \brief Try to create Face using the supplied FaceUri
+  /** \brief Parameters to ProtocolFactory::createFace
    *
-   * \param remoteUri remote URI of the new face
-   * \param localUri local URI of the new face
-   * \param persistency persistency of the new face
-   * \param wantLocalFieldsEnabled whether local fields should be enabled on the face
+   *  Parameters are passed as a struct rather than individually, so that a future change in the list
+   *  of parameters does not require an update to the method signature in all subclasses.
+   */
+  struct CreateFaceParams
+  {
+    FaceUri remoteUri;
+    ndn::optional<FaceUri> localUri;
+    ndn::nfd::FacePersistency persistency;
+    bool wantLocalFieldsEnabled;
+  };
+
+  /** \brief Try to create face using the supplied parameters
+   *
+   * \param params parameters to create face with
    * \param onCreated callback if face creation succeeds or face already exists;
    *                  persistency and local fields settings are not updated on an existing face
    * \param onFailure callback if face creation fails
    */
   virtual void
-  createFace(const FaceUri& remoteUri,
-             const ndn::optional<FaceUri>& localUri,
-             ndn::nfd::FacePersistency persistency,
-             bool wantLocalFieldsEnabled,
+  createFace(const CreateFaceParams& params,
              const FaceCreatedCallback& onCreated,
              const FaceCreationFailedCallback& onFailure) = 0;
 
diff --git a/daemon/face/tcp-factory.cpp b/daemon/face/tcp-factory.cpp
index 28ac251..9833ee6 100644
--- a/daemon/face/tcp-factory.cpp
+++ b/daemon/face/tcp-factory.cpp
@@ -125,29 +125,26 @@
 }
 
 void
-TcpFactory::createFace(const FaceUri& remoteUri,
-                       const ndn::optional<FaceUri>& localUri,
-                       ndn::nfd::FacePersistency persistency,
-                       bool wantLocalFieldsEnabled,
+TcpFactory::createFace(const CreateFaceParams& params,
                        const FaceCreatedCallback& onCreated,
                        const FaceCreationFailedCallback& onFailure)
 {
-  BOOST_ASSERT(remoteUri.isCanonical());
+  BOOST_ASSERT(params.remoteUri.isCanonical());
 
-  if (localUri) {
+  if (params.localUri) {
     NFD_LOG_TRACE("Cannot create unicast TCP face with LocalUri");
     onFailure(406, "Unicast TCP faces cannot be created with a LocalUri");
     return;
   }
 
-  if (persistency == ndn::nfd::FACE_PERSISTENCY_ON_DEMAND) {
+  if (params.persistency == ndn::nfd::FACE_PERSISTENCY_ON_DEMAND) {
     NFD_LOG_TRACE("createFace does not support FACE_PERSISTENCY_ON_DEMAND");
     onFailure(406, "Outgoing TCP faces do not support on-demand persistency");
     return;
   }
 
-  tcp::Endpoint endpoint(ip::address::from_string(remoteUri.getHost()),
-                         boost::lexical_cast<uint16_t>(remoteUri.getPort()));
+  tcp::Endpoint endpoint(ip::address::from_string(params.remoteUri.getHost()),
+                         boost::lexical_cast<uint16_t>(params.remoteUri.getPort()));
 
   // a canonical tcp4/tcp6 FaceUri cannot have a multicast address
   BOOST_ASSERT(!endpoint.address().is_multicast());
@@ -159,7 +156,7 @@
     return;
   }
 
-  if (wantLocalFieldsEnabled && !endpoint.address().is_loopback()) {
+  if (params.wantLocalFieldsEnabled && !endpoint.address().is_loopback()) {
     NFD_LOG_TRACE("createFace cannot create non-local face with local fields enabled");
     onFailure(406, "Local fields can only be enabled on faces with local scope");
     return;
@@ -169,7 +166,8 @@
   for (const auto& i : m_channels) {
     if ((i.first.address().is_v4() && endpoint.address().is_v4()) ||
         (i.first.address().is_v6() && endpoint.address().is_v6())) {
-      i.second->connect(endpoint, persistency, wantLocalFieldsEnabled, onCreated, onFailure);
+      i.second->connect(endpoint, params.persistency, params.wantLocalFieldsEnabled,
+                        onCreated, onFailure);
       return;
     }
   }
diff --git a/daemon/face/tcp-factory.hpp b/daemon/face/tcp-factory.hpp
index 36ee320..cbbbae6 100644
--- a/daemon/face/tcp-factory.hpp
+++ b/daemon/face/tcp-factory.hpp
@@ -50,10 +50,7 @@
                 FaceSystem::ConfigContext& context) override;
 
   void
-  createFace(const FaceUri& remoteUri,
-             const ndn::optional<FaceUri>& localUri,
-             ndn::nfd::FacePersistency persistency,
-             bool wantLocalFieldsEnabled,
+  createFace(const CreateFaceParams& params,
              const FaceCreatedCallback& onCreated,
              const FaceCreationFailedCallback& onFailure) override;
 
diff --git a/daemon/face/udp-factory.cpp b/daemon/face/udp-factory.cpp
index 8303aa8..702d02f 100644
--- a/daemon/face/udp-factory.cpp
+++ b/daemon/face/udp-factory.cpp
@@ -206,29 +206,26 @@
 }
 
 void
-UdpFactory::createFace(const FaceUri& remoteUri,
-                       const ndn::optional<FaceUri>& localUri,
-                       ndn::nfd::FacePersistency persistency,
-                       bool wantLocalFieldsEnabled,
+UdpFactory::createFace(const CreateFaceParams& params,
                        const FaceCreatedCallback& onCreated,
                        const FaceCreationFailedCallback& onFailure)
 {
-  BOOST_ASSERT(remoteUri.isCanonical());
+  BOOST_ASSERT(params.remoteUri.isCanonical());
 
-  if (localUri) {
+  if (params.localUri) {
     NFD_LOG_TRACE("Cannot create unicast UDP face with LocalUri");
     onFailure(406, "Unicast UDP faces cannot be created with a LocalUri");
     return;
   }
 
-  if (persistency == ndn::nfd::FACE_PERSISTENCY_ON_DEMAND) {
+  if (params.persistency == ndn::nfd::FACE_PERSISTENCY_ON_DEMAND) {
     NFD_LOG_TRACE("createFace does not support FACE_PERSISTENCY_ON_DEMAND");
     onFailure(406, "Outgoing UDP faces do not support on-demand persistency");
     return;
   }
 
-  udp::Endpoint endpoint(ip::address::from_string(remoteUri.getHost()),
-                         boost::lexical_cast<uint16_t>(remoteUri.getPort()));
+  udp::Endpoint endpoint(ip::address::from_string(params.remoteUri.getHost()),
+                         boost::lexical_cast<uint16_t>(params.remoteUri.getPort()));
 
   if (endpoint.address().is_multicast()) {
     NFD_LOG_TRACE("createFace does not support multicast faces");
@@ -243,7 +240,7 @@
     return;
   }
 
-  if (wantLocalFieldsEnabled) {
+  if (params.wantLocalFieldsEnabled) {
     // UDP faces are never local
     NFD_LOG_TRACE("createFace cannot create non-local face with local fields enabled");
     onFailure(406, "Local fields can only be enabled on faces with local scope");
@@ -254,7 +251,7 @@
   for (const auto& i : m_channels) {
     if ((i.first.address().is_v4() && endpoint.address().is_v4()) ||
         (i.first.address().is_v6() && endpoint.address().is_v6())) {
-      i.second->connect(endpoint, persistency, onCreated, onFailure);
+      i.second->connect(endpoint, params.persistency, onCreated, onFailure);
       return;
     }
   }
diff --git a/daemon/face/udp-factory.hpp b/daemon/face/udp-factory.hpp
index 2f809ac..589817d 100644
--- a/daemon/face/udp-factory.hpp
+++ b/daemon/face/udp-factory.hpp
@@ -66,10 +66,7 @@
                 FaceSystem::ConfigContext& context) override;
 
   void
-  createFace(const FaceUri& remoteUri,
-             const ndn::optional<FaceUri>& localUri,
-             ndn::nfd::FacePersistency persistency,
-             bool wantLocalFieldsEnabled,
+  createFace(const CreateFaceParams& params,
              const FaceCreatedCallback& onCreated,
              const FaceCreationFailedCallback& onFailure) override;
 
diff --git a/daemon/face/unix-stream-factory.cpp b/daemon/face/unix-stream-factory.cpp
index 0bba3be..7c1c7d5 100644
--- a/daemon/face/unix-stream-factory.cpp
+++ b/daemon/face/unix-stream-factory.cpp
@@ -84,10 +84,7 @@
 }
 
 void
-UnixStreamFactory::createFace(const FaceUri& remoteUri,
-                              const ndn::optional<FaceUri>& localUri,
-                              ndn::nfd::FacePersistency persistency,
-                              bool wantLocalFieldsEnabled,
+UnixStreamFactory::createFace(const CreateFaceParams& params,
                               const FaceCreatedCallback& onCreated,
                               const FaceCreationFailedCallback& onFailure)
 {
diff --git a/daemon/face/unix-stream-factory.hpp b/daemon/face/unix-stream-factory.hpp
index 53baadf..fc5579c 100644
--- a/daemon/face/unix-stream-factory.hpp
+++ b/daemon/face/unix-stream-factory.hpp
@@ -50,10 +50,7 @@
                 FaceSystem::ConfigContext& context) override;
 
   void
-  createFace(const FaceUri& remoteUri,
-             const ndn::optional<FaceUri>& localUri,
-             ndn::nfd::FacePersistency persistency,
-             bool wantLocalFieldsEnabled,
+  createFace(const CreateFaceParams& params,
              const FaceCreatedCallback& onCreated,
              const FaceCreationFailedCallback& onFailure) override;
 
diff --git a/daemon/face/websocket-factory.cpp b/daemon/face/websocket-factory.cpp
index 21933a4..9572216 100644
--- a/daemon/face/websocket-factory.cpp
+++ b/daemon/face/websocket-factory.cpp
@@ -118,10 +118,7 @@
 }
 
 void
-WebSocketFactory::createFace(const FaceUri& remoteUri,
-                             const ndn::optional<FaceUri>& localUri,
-                             ndn::nfd::FacePersistency persistency,
-                             bool wantLocalFieldsEnabled,
+WebSocketFactory::createFace(const CreateFaceParams& params,
                              const FaceCreatedCallback& onCreated,
                              const FaceCreationFailedCallback& onFailure)
 {
diff --git a/daemon/face/websocket-factory.hpp b/daemon/face/websocket-factory.hpp
index 0eaa767..a8c4600 100644
--- a/daemon/face/websocket-factory.hpp
+++ b/daemon/face/websocket-factory.hpp
@@ -52,10 +52,7 @@
   /** \brief unicast face creation is not supported and will always fail
    */
   void
-  createFace(const FaceUri& remoteUri,
-             const ndn::optional<FaceUri>& localUri,
-             ndn::nfd::FacePersistency persistency,
-             bool wantLocalFieldsEnabled,
+  createFace(const CreateFaceParams& params,
              const FaceCreatedCallback& onCreated,
              const FaceCreationFailedCallback& onFailure) override;
 
