face+table: move EndpointId typedef out of Transport and use it in table
refs: #4843
Change-Id: I2b200518a57b21d66eae4360166afda31c3bf11b
diff --git a/daemon/face/datagram-transport.hpp b/daemon/face/datagram-transport.hpp
index 669b46e..501b590 100644
--- a/daemon/face/datagram-transport.hpp
+++ b/daemon/face/datagram-transport.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2018, Regents of the University of California,
+ * Copyright (c) 2014-2019, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -260,7 +260,7 @@
}
template<class T, class U>
-Transport::EndpointId
+EndpointId
DatagramTransport<T, U>::makeEndpointId(const typename protocol::endpoint&)
{
return 0;
diff --git a/daemon/face/face.hpp b/daemon/face/face.hpp
index a81a75e..f99bece 100644
--- a/daemon/face/face.hpp
+++ b/daemon/face/face.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2018, Regents of the University of California,
+ * Copyright (c) 2014-2019, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -299,6 +299,7 @@
} // namespace face
+using face::EndpointId;
using face::FaceId;
using face::Face;
diff --git a/daemon/face/lp-reassembler.cpp b/daemon/face/lp-reassembler.cpp
index cd6f873..905dc66 100644
--- a/daemon/face/lp-reassembler.cpp
+++ b/daemon/face/lp-reassembler.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2018, Regents of the University of California,
+ * Copyright (c) 2014-2019, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -40,7 +40,7 @@
}
std::tuple<bool, Block, lp::Packet>
-LpReassembler::receiveFragment(Transport::EndpointId remoteEndpoint, const lp::Packet& packet)
+LpReassembler::receiveFragment(EndpointId remoteEndpoint, const lp::Packet& packet)
{
BOOST_ASSERT(packet.has<lp::FragmentField>());
diff --git a/daemon/face/lp-reassembler.hpp b/daemon/face/lp-reassembler.hpp
index f416b2c..21f4e1c 100644
--- a/daemon/face/lp-reassembler.hpp
+++ b/daemon/face/lp-reassembler.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2018, Regents of the University of California,
+ * Copyright (c) 2014-2019, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -83,7 +83,7 @@
* \throw tlv::Error packet is malformed
*/
std::tuple<bool, Block, lp::Packet>
- receiveFragment(Transport::EndpointId remoteEndpoint, const lp::Packet& packet);
+ receiveFragment(EndpointId remoteEndpoint, const lp::Packet& packet);
/** \brief count of partial packets
*/
@@ -97,7 +97,7 @@
* Before it's erased, this signal is emitted with the remote endpoint,
* and the number of fragments being dropped.
*/
- signal::Signal<LpReassembler, Transport::EndpointId, size_t> beforeTimeout;
+ signal::Signal<LpReassembler, EndpointId, size_t> beforeTimeout;
private:
/** \brief holds all fragments of packet until reassembled
@@ -113,7 +113,7 @@
/** \brief index key for PartialPackets
*/
typedef std::tuple<
- Transport::EndpointId, // remoteEndpoint
+ EndpointId, // remoteEndpoint
lp::Sequence // message identifier (sequence of the first fragment)
> Key;
diff --git a/daemon/face/multicast-udp-transport.cpp b/daemon/face/multicast-udp-transport.cpp
index 6e99a1c..ec50d7f 100644
--- a/daemon/face/multicast-udp-transport.cpp
+++ b/daemon/face/multicast-udp-transport.cpp
@@ -191,7 +191,7 @@
}
template<>
-Transport::EndpointId
+EndpointId
DatagramTransport<boost::asio::ip::udp, Multicast>::makeEndpointId(const protocol::endpoint& ep)
{
if (ep.address().is_v4()) {
diff --git a/daemon/face/multicast-udp-transport.hpp b/daemon/face/multicast-udp-transport.hpp
index 72498d0..bea7cb4 100644
--- a/daemon/face/multicast-udp-transport.hpp
+++ b/daemon/face/multicast-udp-transport.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2018, Regents of the University of California,
+ * Copyright (c) 2014-2019, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -40,7 +40,7 @@
// that would cause an implicit instantiation to take place, in every translation
// unit in which such a use occurs".
template<>
-Transport::EndpointId
+EndpointId
DatagramTransport<boost::asio::ip::udp, Multicast>::makeEndpointId(const protocol::endpoint& ep);
/**
diff --git a/daemon/face/transport.hpp b/daemon/face/transport.hpp
index 3f00424..8bbfe86 100644
--- a/daemon/face/transport.hpp
+++ b/daemon/face/transport.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2018, Regents of the University of California,
+ * Copyright (c) 2014-2019, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -37,6 +37,10 @@
class Face;
class LinkService;
+/** \brief identifies an endpoint on the link
+ */
+typedef uint64_t EndpointId;
+
/** \brief indicates the state of a transport
*/
enum class TransportState {
@@ -113,10 +117,6 @@
class Transport : protected virtual TransportCounters, noncopyable
{
public:
- /** \brief identifies an endpoint on the link
- */
- typedef uint64_t EndpointId;
-
/** \brief stores a packet along with the remote endpoint
*/
class Packet