Skip to content

Instantly share code, notes, and snippets.

@rynomad
Created September 18, 2013 03:34
Show Gist options
  • Save rynomad/6604213 to your computer and use it in GitHub Desktop.
Save rynomad/6604213 to your computer and use it in GitHub Desktop.
NDN CSTable hack
function getEntryForRegisteredPrefix(name) {
for (var i = 0; i < NDN.CSTable.length; i++) {
console.log(NDN.CSTable[i], name);
var entry = new Name(NDN.CSTable[i].name);
var interestName = new Interest(entry);
if (interestName.matches_name(new Name(name)) == true){
console.log('Match!!!', NDN.CSTable[i], name);
return NDN.CSTable[i];
}
}
return null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment