Bug #3381
closed
Face lifetime missing in dataset
Added by Junxiao Shi almost 9 years ago.
Updated almost 9 years ago.
Description
Steps to reproduce:
- start NFD with one or more UDP channels
- cause NFD to create a UDP on-demand face, by sending an Interest to NFD from a remote host over UDP tunnel
- execute
nfd-status -f
Expected: the UDP on-demand face has an expires
field
Actual: the UDP on-demand face has no expires
field
In 2014 Face design, FaceManager
invokes Face::getFaceStatus
method on every face to obtain its FaceStatus
struct.
In #3177, Face::getFaceStatus
is eliminated, and FaceManager
becomes responsible to populate the FaceStatus
struct, but "remaining lifetime" field wasn't considered.
Currently, Face
class and Transport
class lack a getter for FaceManager
to obtain or compute "remaining lifetime".
To fix this bug, a getter needs to be defined in "dynamic properties" section.
/** \return expiration time of the face
* \retval time::steady_clock::TimePoint::max() the face has indefinite lifetime
*/
time::steady_clock::TimePoint
getExpirationTime() const;
- Status changed from New to In Progress
- Assignee set to Eric Newberry
Is this field only applicable to unicast UDP or is it also used by other Transports?
Nevermind the question in note 3.
However, I have another question: FaceManager::collectFaceProperties
is used with both FaceStatus
and FaceEventNotification
, the former having an ExpirationPeriod field, while the latter does not. As such, I see two options to proceed: Either remove the template and create separate functions for each class or add an ExpirationPeriod field to FaceEventNotification
. Does anyone have any better ideas?
Answer to note-3:
Face lifetime is applicable to on-demand datagram faces only.
Answer to note-4:
- Introduce
ndn::nfd::FaceStatus FaceManager::collectFaceStatus(const Face& face, time::steady_clock::TimePoint now)
static method, that calls FaceManager::collectFaceProperties
and Face:: getExpirationTime
.
- Merge
collectFaceCounters
into collectFaceStatus
since this is the only usher.
- Use
collectFaceStatus
in both listFaces
and queryFaces
.
- Status changed from In Progress to Code review
- Status changed from Code review to Closed
- % Done changed from 0 to 100
Also available in: Atom
PDF