xorp

SgCount Class Reference

Class that contains various counters per (S,G) entry. More...

#include <mfea_mrouter.hh>

List of all members.

Public Member Functions

 SgCount ()
 Default constructor.
SgCountoperator= (const SgCount &sg_count)
 Assignment Operator.
SgCountoperator+= (const SgCount &sg_count)
 Assign-Sum Operator.
SgCountoperator-= (const SgCount &sg_count)
 Assign-Difference Operator.
size_t pktcnt () const
 Get the packet count.
size_t bytecnt () const
 Get the byte count.
size_t wrong_if () const
 Get the number of packets received on wrong interface.
void set_pktcnt (size_t v)
 Set the packet count.
void set_bytecnt (size_t v)
 Set the byte count.
void set_wrong_if (size_t v)
 Set the wrong-interface packet count.
void reset ()
 Reset all counters.
bool is_valid () const
 Test if this entry contains valid counters.

Private Attributes

size_t _pktcnt
size_t _bytecnt
size_t _wrong_if

Detailed Description

Class that contains various counters per (S,G) entry.

All counters are related to the multicast data packets per (S,G) entry.


Member Function Documentation

size_t SgCount::bytecnt ( ) const [inline]

Get the byte count.

Returns:
the byte count.
bool SgCount::is_valid ( ) const [inline]

Test if this entry contains valid counters.

Returns:
true if this entry contains valid counters, otherwise false.
SgCount& SgCount::operator+= ( const SgCount sg_count) [inline]

Assign-Sum Operator.

Parameters:
sg_countthe value to add to this entry.
Returns:
the entry with the new value after sg_count was added.
SgCount& SgCount::operator-= ( const SgCount sg_count) [inline]

Assign-Difference Operator.

Parameters:
sg_countthe value to substract from this entry.
Returns:
the entry with the new value after sg_count was substracted.
SgCount& SgCount::operator= ( const SgCount sg_count) [inline]

Assignment Operator.

Parameters:
sg_countthe value to assing to this entry.
Returns:
the entry with the new value assigned.
size_t SgCount::pktcnt ( ) const [inline]

Get the packet count.

Returns:
the packet count.
void SgCount::set_bytecnt ( size_t  v) [inline]

Set the byte count.

Parameters:
vthe value to assign to the byte count.
void SgCount::set_pktcnt ( size_t  v) [inline]

Set the packet count.

Parameters:
vthe value to assign to the packet count.
void SgCount::set_wrong_if ( size_t  v) [inline]

Set the wrong-interface packet count.

Parameters:
vthe value to assign to the wrong-interface packet count.
size_t SgCount::wrong_if ( ) const [inline]

Get the number of packets received on wrong interface.

Returns:
the number of packets received on wrong interface.

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