Skip to content

Commit

Permalink
Add boolean parameter to NDNRoutingHelper constructor to allow for cr…
Browse files Browse the repository at this point in the history
…eating permanent faces.

Refs #5264

Change-Id: I6da3e777261ec978c8cff7da4d10f9661371dacf
  • Loading branch information
awlane authored and dulalsaurab committed Jul 27, 2023
1 parent cb8c911 commit 92bc429
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions minindn/helpers/ndn_routing_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,11 @@ class NdnRoutingHelper(object):
:param Routing routingType: (optional) Routing algorithm, link-state or hr etc
"""
def __init__(self, netObject, faceType=nfdc.PROTOCOL_UDP, routingType="link-state"):
def __init__(self, netObject, faceType=nfdc.PROTOCOL_UDP, routingType="link-state", permanentFaces=False):
self.net = netObject
self.faceType = faceType
self.routingType = routingType
self.permanentFaces = permanentFaces
self.routes = []
self.namePrefixes = {host_name.name: [] for host_name in self.net.hosts}
self.routeObject = _CalculateRoutes(self.net, self.routingType)
Expand Down Expand Up @@ -349,7 +350,7 @@ def calculateRoutes(self):
def createFaces(self, node, neighborIPs):
neighborFaces = {}
for k, ip in neighborIPs.items():
faceID = nfdc.createFace(node, ip, self.faceType)
faceID = nfdc.createFace(node, ip, self.faceType, self.permanentFaces)
if not isinstance(faceID, str): raise ValueError(faceID)
neighborFaces[k] = faceID
return neighborFaces
Expand Down

0 comments on commit 92bc429

Please sign in to comment.