Siena Fast Forwarding Documentation (v. 2.0.1)
Public Member Functions | List of all members
siena::MatchHandler Class Referenceabstract

hook for the output function for matching interfaces. More...

#include <forwarding.h>

Public Member Functions

virtual ~MatchHandler ()
 virtual destructor
 
virtual bool output (InterfaceId)=0
 output function. More...
 

Detailed Description

hook for the output function for matching interfaces.

The matching function of a forwarding table doesn't actually produce an output. Instead, it delegates the processing of matching interfaces to a specialized match handler. This base class defines the interface of such a handler. Users of the forwarding table must implement this interface and pass it to the matching function.

The forwarding_messages example shows how to set up and use match handlers.

Examples:
forwarding_messages.cc.

Member Function Documentation

virtual bool siena::MatchHandler::output ( InterfaceId  )
pure virtual

output function.

This function is called within the matching function of the forwarding table. The parameter is the interface identifier of the matching interface. This function may explicitly cause the matching function to terminate by returning true.