|
xorp
|
Base class for the Multicast Routing Information Base Table. More...
#include <mrib_table.hh>
Classes | |
| class | PendingTransaction |
Public Types | |
| typedef MribTableIterator | iterator |
Public Member Functions | |
| MribTable (int family) | |
| Constructor for table of a given address family. | |
| ~MribTable () | |
| Destructor. | |
| int | family () const |
| Get the address family. | |
| void | clear () |
| Remove all entries and pending transactions (make the container empty). | |
| void | remove_all_entries () |
| Remove all entries. | |
| list< Mrib * > & | removed_mrib_entries () |
| Get a reference to the list with removed Mrib entries. | |
| bool | is_preserving_removed_mrib_entries () const |
| Test if the removed Mrib entries are preserved or deleted. | |
| void | set_is_preserving_removed_mrib_entries (bool v) |
| Enable or disable the preserving of the removed Mrib entries. | |
| Mrib * | insert (const Mrib &mrib) |
| Insert a copy of a Mrib entry. | |
| void | remove (const IPvXNet &dest_prefix) |
| Remove from the table a Mrib entry for a given destination prefix. | |
| void | remove (const Mrib &mrib) |
| Remove a Mrib entry from the table. | |
| Mrib * | find (const IPvX &address) const |
| Find the longest prefix match for an address. | |
| Mrib * | find_exact (const IPvXNet &dest_prefix) const |
| Find an exact match for a network address prefix. | |
| iterator | begin () const |
| Get an iterator for the first element. | |
| iterator | end () const |
| Get an iterator for the last element. | |
| void | update_entry_vif_index (const IPvXNet &dest_prefix, uint32_t vif_index) |
| Update the vif index of a Mrib entry. | |
| void | add_pending_insert (uint32_t tid, const Mrib &mrib) |
| Add a pending transaction to insert a Mrib entry from the table. | |
| void | add_pending_remove (uint32_t tid, const Mrib &mrib) |
| Add a pending transaction to remove a Mrib entry from the table. | |
| void | add_pending_remove_all_entries (uint32_t tid) |
| Add a pending transaction to remove all Mrib entries from the table. | |
| void | commit_pending_transactions (uint32_t tid) |
| Commit pending transactions for adding or removing Mrib entries for a given transaction ID. | |
| void | abort_pending_transactions (uint32_t tid) |
| Abort pending transactions for adding or removing Mrib entries for a given transaction ID. | |
| void | abort_all_pending_transactions () |
| Abort all pending transactions for adding or remove Mrib entries. | |
| size_t | size () const |
| Get the number of Mrib entries in the table. | |
Private Member Functions | |
| void | remove_mrib_entry (Mrib *mrib) |
| Remove a Mrib entry from the table. | |
| MribLookup * | find_prefix_mrib_lookup (const IPvXNet &addr_prefix) const |
| Find an exact MribLookip match. | |
| void | remove_mrib_lookup (MribLookup *mrib_lookup) |
| Remove a subtree of entries in the table. | |
Private Attributes | |
| int | _family |
| MribLookup * | _mrib_lookup_root |
| size_t | _mrib_lookup_size |
| size_t | _mrib_size |
| list< PendingTransaction > | _mrib_pending_transactions |
| bool | _is_preserving_removed_mrib_entries |
| list< Mrib * > | _removed_mrib_entries |
| MribTable::MribTable | ( | int | family | ) |
Constructor for table of a given address family.
MribTable::MribTable: : The address family (e.g., AF_INET or AF_INET6).
| family | the address family. |
MribTable constructor.
| MribTable::~MribTable | ( | ) |
Destructor.
MribTable destructor. Remove and delete all MRIB entries and cleanup.
| void MribTable::abort_pending_transactions | ( | uint32_t | tid | ) |
| void MribTable::add_pending_insert | ( | uint32_t | tid, |
| const Mrib & | mrib | ||
| ) |
| void MribTable::add_pending_remove | ( | uint32_t | tid, |
| const Mrib & | mrib | ||
| ) |
Add a pending transaction to remove a Mrib entry from the table.
the operation is added to the list of pending transaction, but the entry itself is not removed from the table (until MribTable::commit_pending_transactions() is called).
| tid | the transaction ID. |
| mrib | the Mrib entry that contains the information about the entry to remove. |
Reimplemented in PimMribTable.
| void MribTable::add_pending_remove_all_entries | ( | uint32_t | tid | ) |
Add a pending transaction to remove all Mrib entries from the table.
the operation is added to the list of pending transaction, but the entries themselves is not removed from the table (until MribTable::commit_pending_transactions() is called).
| tid | the transaction ID. |
Reimplemented in PimMribTable.
| iterator MribTable::begin | ( | ) | const [inline] |
| void MribTable::commit_pending_transactions | ( | uint32_t | tid | ) |
Commit pending transactions for adding or removing Mrib entries for a given transaction ID.
All pending transactions to add/remove Mrib entries for a given transaction ID are processes (see MribTable::add_pending_insert() and MribTable::add_pending_remove() and MribTable::add_pending_remove_all_entries()).
Reimplemented in PimMribTable.
| iterator MribTable::end | ( | ) | const [inline] |
| int MribTable::family | ( | ) | const [inline] |
Find the longest prefix match for an address.
| address | the lookup address. |
Reimplemented in PimMribTable.
| MribLookup * MribTable::find_prefix_mrib_lookup | ( | const IPvXNet & | addr_prefix | ) | const [private] |
Find an exact MribLookip match.
| addr_prefix | the lookup network address prefix. |
| bool MribTable::is_preserving_removed_mrib_entries | ( | ) | const [inline] |
| void MribTable::remove | ( | const IPvXNet & | dest_prefix | ) |
| void MribTable::remove | ( | const Mrib & | mrib | ) |
| void MribTable::remove_mrib_entry | ( | Mrib * | mrib | ) | [private] |
| void MribTable::remove_mrib_lookup | ( | MribLookup * | mrib_lookup | ) | [private] |
Remove a subtree of entries in the table.
Remove recursively all MribLookup below and including the given mrib_lookup entry.
| mrib_lookup | the MribLookup entry that is the root of the subtree to remove. |
| list<Mrib *>& MribTable::removed_mrib_entries | ( | ) | [inline] |
| void MribTable::set_is_preserving_removed_mrib_entries | ( | bool | v | ) | [inline] |
| size_t MribTable::size | ( | ) | const [inline] |
| void MribTable::update_entry_vif_index | ( | const IPvXNet & | dest_prefix, |
| uint32_t | vif_index | ||
| ) |