This module defines DelayedCallTable which is an internal class used by the Node implementation of callLater to store callbacks and call them when they time out.
Bases: object
This module defines InterestFilterTable which is an internal class to hold a list of entries with an interest Filter and its OnInterestCallback.
Bases: object
Bases: object
An Entry holds an interestFilterId, an InterestFilter and the OnInterestCallback with its related Face. Create a new InterestFilterEntry with the given values.
Parameters: |
|
---|
Get the InterestFilter given to the constructor.
Returns: | The InterestFilter. |
---|---|
Return type: | InterestFilter |
Find all entries from the interest filter table where the interest conforms to the entry’s filter, and add to the matchedFilters list.
Parameters: |
|
---|
Add an entry to the table.
Parameters: |
|
---|
Remove the interest filter entry which has the interestFilterId from the interest filter table. This does not affect another interest filter with a different interestFilterId, even if it has the same prefix name. If there is no entry with the interestFilterId, do nothing.
Parameters: | interestFilterId (int) – The ID returned from setInterestFilter. |
---|
This module defines PendingInterestTable which is an internal class to hold a list of pending interests with their callbacks.
Bases: object
Bases: object
Create a new Entry with the given fields. Note: You should not call this directly but call PendingInterestTable.add.
Parameters: |
|
---|
Get the interest given to the constructor.
Returns: | The interest. |
---|---|
Return type: | int |
Check if setIsRemoved() was called.
Returns: | True if setIsRemoved() was called. |
---|---|
Return type: | bool |
Get the onData function object given to the constructor.
Returns: | The onData function object. |
---|---|
Return type: | function object |
Get the onNetworkNack function object given to the constructor.
Returns: | The onNetworkNack function object. |
---|---|
Return type: | function object |
Add a new entry to the pending interest table. However, if removePendingInterest was already called with the pendingInterestId, don’t add an entry and return None.
Parameters: |
|
---|---|
Returns: | The new PendingInterestTable.Entry, or None if removePendingInterest was already called with the pendingInterestId. |
Return type: | PendingInterestTable.Entry |
Find all entries from the pending interest table where the name conforms to the entry’s interest selectors, remove the entries from the table, set each entry’s isRemoved flag, and add to the entries list.
Parameters: |
|
---|
Find all entries from the pending interest table where the OnNetworkNack callback is not null and the entry’s interest is the same as the given interest, remove the entries from the table, set each entry’s isRemoved flag, and add to the entries list. (We don’t remove the entry if the OnNetworkNack callback is None so that OnTimeout will be called later.) The interests are the same if their default wire encoding is the same (which has everything including the name, nonce, link object and selectors).
Parameters: |
|
---|
Remove the specific pendingInterest entry from the table and set its isRemoved flag. However, if the pendingInterest isRemoved flag is already True or the entry is not in the pending interest table then do nothing.
Parameters: | pendingInterest (PendingInterestTable.Entry) – The Entry from the pending interest table. |
---|---|
Returns: | True if the entry was removed, False if not. |
Return type: | bool |
Remove the pending interest entry with the pendingInterestId from the pending interest table and set its isRemoved flag. This does not affect another pending interest with a different pendingInterestId, even if it has the same interest name. If there is no entry with the pendingInterestId, do nothing.
Parameters: | pendingInterestId (int) – The ID returned from expressInterest. |
---|
This module defines RegisteredPrefixTable which is an internal class to hold a list of registered prefixes with information necessary to remove the registration later.
Bases: object
Create a new RegisteredPrefixTable with an empty table.
Parameters: | interestFilterTable (InterestFilterTable) – See removeRegisteredPrefix(), which may call interestFilterTable.unsetInterestFilter(). |
---|
Add a new entry to the table.
Parameters: |
|
---|---|
Returns: | True if added an entry, false if removeRegisteredPrefix was already called with the registeredPrefixId. |
Return type: | bool |
Remove the registered prefix entry with the registeredPrefixId from the registered prefix table. This does not affect another registered prefix with a different registeredPrefixId, even if it has the same prefix name. If an interest filter was automatically created by registerPrefix, also remove it. If there is no entry with the registeredPrefixId, do nothing.
Parameters: | registeredPrefixId (int) – The ID returned from registerPrefix. |
---|