libTFO
Public Types | Public Member Functions
FibEntry< M, A, U > Class Template Reference

Forwarding table entry along with its traffic statistics. More...

#include <fibentry.hh>

List of all members.

Public Types

typedef M match_type
typedef A action_type
typedef U user_type

Public Member Functions

 FibEntry (uint32_t size_b2, uint32_t size_b3, const M &m, const A &a)
 ~FibEntry (void)
const M & match (void) const
const A & action (void) const
const A & action (const A &a)
const A & old_action (void) const
const A & old_action (const A &a)
U & user_data (void)
enum FibEntryStatestate (void) const
enum FibEntryStatestate (enum FibEntryState s)
enum FibEntryTabletable (void) const
enum FibEntryTabletable (enum FibEntryTable t)
const uint32_t ttl (void) const
const uint32_t ttl (uint32_t t)
const uint32_t ttl_decrement (void)
const uint64_t & hits_total (void) const
const uint64_t & hits_b1 (void) const
const uint64_t & hits_b2 (void) const
const uint64_t & hits_b3 (void) const
void update_hits (const uint64_t &hits, const enum FibEntryHitsUpdateType type)
void bin_complete (void)

Detailed Description

template<typename M, typename A, typename U>
class FibEntry< M, A, U >

Forwarding table entry along with its traffic statistics.

Template Parameters:
MType of flow match, e.g., destination IP prefix.
AType of flow action, e.g., output interface.
UType of additional information attached to FIB entries.

Member Typedef Documentation

template<typename M, typename A, typename U>
typedef A FibEntry< M, A, U >::action_type
template<typename M, typename A, typename U>
typedef M FibEntry< M, A, U >::match_type
template<typename M, typename A, typename U>
typedef U FibEntry< M, A, U >::user_type

Constructor & Destructor Documentation

template<typename M, typename A, typename U>
FibEntry< M, A, U >::FibEntry ( uint32_t  size_b2,
uint32_t  size_b3,
const M &  m,
const A &  a 
) [inline]

Creates a new instance of FibEntry.

Parameters:
[in]size_b2Number of b1 time bins that make a b2 time bin.
[in]size_b3Number of b1 time bins that make a b3 time bin.
[in]mMatch.
[in]aAction.
template<typename M, typename A, typename U>
FibEntry< M, A, U >::~FibEntry ( void  ) [inline]

Deletes a FibEntry.


Member Function Documentation

template<typename M, typename A, typename U>
const A& FibEntry< M, A, U >::action ( void  ) const [inline]
Returns:
Returns the action.
template<typename M, typename A, typename U>
const A& FibEntry< M, A, U >::action ( const A &  a) [inline]

Sets the action.

Parameters:
[in]aAction.
Returns:
Returns the action.
template<typename M, typename A, typename U>
void FibEntry< M, A, U >::bin_complete ( void  ) [inline]

Updates the hit counters of all time scales (b1, b2, b3).

template<typename M, typename A, typename U>
const uint64_t& FibEntry< M, A, U >::hits_b1 ( void  ) const [inline]
Returns:
Returns the hits of the most recently completed b1 time bin.
template<typename M, typename A, typename U>
const uint64_t& FibEntry< M, A, U >::hits_b2 ( void  ) const [inline]
Returns:
Returns the hits of the most recently completed b2 time bin.
template<typename M, typename A, typename U>
const uint64_t& FibEntry< M, A, U >::hits_b3 ( void  ) const [inline]
Returns:
Returns the hits of the most recently completed b3 time bin.
template<typename M, typename A, typename U>
const uint64_t& FibEntry< M, A, U >::hits_total ( void  ) const [inline]
Returns:
Returns the total number of hits.
template<typename M, typename A, typename U>
const M& FibEntry< M, A, U >::match ( void  ) const [inline]
Returns:
Returns the match.
template<typename M, typename A, typename U>
const A& FibEntry< M, A, U >::old_action ( void  ) const [inline]
Returns:
Returns the action prior to the last modification.
template<typename M, typename A, typename U>
const A& FibEntry< M, A, U >::old_action ( const A &  a) [inline]

Sets the action prior to the last modification.

Parameters:
[in]aAction.
Returns:
Returns the action prior to the last modification.
template<typename M, typename A, typename U>
enum FibEntryState& FibEntry< M, A, U >::state ( void  ) const [inline]
Returns:
Returns the FibEntryState.
template<typename M, typename A, typename U>
enum FibEntryState& FibEntry< M, A, U >::state ( enum FibEntryState  s) [inline]

Sets the FibEntryState.

Parameters:
[in]sState.
Returns:
Returns the FibEntryState.
template<typename M, typename A, typename U>
enum FibEntryTable& FibEntry< M, A, U >::table ( void  ) const [inline]
Returns:
Returns the FibEntryTable.
template<typename M, typename A, typename U>
enum FibEntryTable& FibEntry< M, A, U >::table ( enum FibEntryTable  t) [inline]

Sets the FibEntryTable.

Parameters:
[in]tTable.
Returns:
Returns the FibEntryTable.
template<typename M, typename A, typename U>
const uint32_t FibEntry< M, A, U >::ttl ( void  ) const [inline]
Returns:
Returns the TTL value.
template<typename M, typename A, typename U>
const uint32_t FibEntry< M, A, U >::ttl ( uint32_t  t) [inline]

Sets the TTL.

Parameters:
[in]tTTL value.
Returns:
Returns the TTL value.
template<typename M, typename A, typename U>
const uint32_t FibEntry< M, A, U >::ttl_decrement ( void  ) [inline]

Decrements the TTL.

Returns:
Returns the TTL value.
template<typename M, typename A, typename U>
void FibEntry< M, A, U >::update_hits ( const uint64_t &  hits,
const enum FibEntryHitsUpdateType  type 
) [inline]

Modifies the hit counter. Call bin_complete() when b1 has finished.

Parameters:
[in]hitsNumber of hits.
[in]typeType of update.
template<typename M, typename A, typename U>
U& FibEntry< M, A, U >::user_data ( void  ) [inline]
Returns:
User data accessor.

The documentation for this class was generated from the following file:
 All Classes Files Functions Typedefs Enumerations Enumerator