Project

General

Profile

Feature #2989

Updated by Junxiao Shi over 9 years ago

Implement a minimal UDP **permanent face**. 

 In this minimal implementation, 

 * `UdpFace` constructor accepts `FacePersistency persistency` parameter in place of `bool isOnDemand`. 
 * If `persistency == FacePersistency::PERMANENT`, the face ignores all socket errors after successful creation.   
   Errors during the initial face creation should be reported as usual. 
 * There is no UP/DOWN state transitions.   
   An operator who decides to use a permanent face must take care to choose a strategy that is able to try multiple faces (ie. not `best-route`). 

 This Feature also includes the following changes: 

 * `Face::isOnDemand` and `Face::setOnDemand` are replaced with `Face::getPersistency` and `Face::setPersistency` (also, `bool m_isOnDemand` is replaced with `FacePersistency m_persistency`); all usages of those methods shall be replaced 
 * `ProtocolFactory::createFace` needs a `FacePersistency persistency` parameter.   
   If a `ProtocolFactory` subclass does not support the specified `persistency`, throw `ProtocolFactory::Error`. 
 * `UdpFactory::createFace` should support `FacePersistency::PERSISTENT` and `FacePersistency::PERMANENT`. 
 * `FaceManager::createFace` passes `FacePersistency::PERSISTENT` to `ProtocolFactory::createFace`. 

 **NFD Developer Guide** "Face Abstraction" section should be updated as part of this issue.   
 To allow an operator to use UDP permanent faces, management and `nfdc` changes are needed, but they are not part of this issue.

Back