Closed killerdbob closed 2 years ago
This behavior is by design.
face1.addRoute(prefix1)
This causes Interests matching prefix1 to be forwarded to face1.
enableNfdPrefixReg(face1)
This creates a ReadvertiseDestination associated with face1.
Every time a prefix is announced by a source face other than face1, and the source face is not marked advertiseFrom: false
attribute, this ReadvertiseDestination would send a prefix registration command.
The prefix registration command would cause Interests matching the announced prefix to come from face1.
endpoint.produce(prefix2, ...)
This creates a new logical face in NDNts internal Forwarder and announces prefix2 on this logical face. The announcement would trigger the ReadvertisementDestination created above to send the prefix registration command, so that Interests matching prefix2 would come from face1, which is further forwarded to the producer handler function.
ok, thank you.
Hi, I follow your instruction in lib nfdmgmt, it does not work if I don't run produce(). My code is as follow, this will not register a "/hi" into NFD.
After I run a produce, the "/hi" will be registered. Is this a bug?