xorp

ExpectTable< A > Class Template Reference

A Route Table for comparing route updates received against expected. More...

#include <rt_tab_expect.hh>

Inheritance diagram for ExpectTable< A >:
RouteTable< A >

List of all members.

Public Member Functions

 ExpectTable (const string &tablename, RouteTable< A > *parent)
const list
< ExpectedRouteChange< A > > & 
expected_route_changes () const
void expect_add (const IPRouteEntry< A > &route)
void expect_delete (const IPRouteEntry< A > &route)
int add_route (const IPRouteEntry< A > &route, RouteTable< A > *caller)
int delete_route (const IPRouteEntry< A > *route, RouteTable< A > *caller)
const IPRouteEntry< A > * lookup_route (const IPNet< A > &net) const
const IPRouteEntry< A > * lookup_route (const A &addr) const
RouteRange< A > * lookup_route_range (const A &addr) const
TableType type () const
RouteTable< A > * parent ()
void replumb (RouteTable< A > *old_parent, RouteTable< A > *new_parent)
string str () const

Private Attributes

RouteTable< A > * _parent
list< ExpectedRouteChange< A > > _expected_route_changes

Detailed Description

template<class A>
class ExpectTable< A >

A Route Table for comparing route updates received against expected.

Users of this class specify expected updates with expect_add and expect_delete. As the updates come through they are compared against those expect and generate an assertion failure if those arriving do not match those expected. An assertion failure will also occur if there are unmatched updates upon instance destruction.

This class is strictly for debugging and testing purposes.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations