xorp

Mld6igmpGroupRecord Class Reference

A class to store information about multicast group membership. More...

#include <mld6igmp_group_record.hh>

List of all members.

Public Member Functions

 Mld6igmpGroupRecord (Mld6igmpVif &mld6igmp_vif, const IPvX &group)
 Constructor for a given vif and group address.
 ~Mld6igmpGroupRecord ()
 Destructor.
Mld6igmpVifmld6igmp_vif () const
 Get the vif this entry belongs to.
const IPvXgroup () const
 Get the multicast group address.
EventLoopeventloop ()
 Get the corresponding event loop.
bool is_include_mode () const
 Test whether the filter mode is INCLUDE.
bool is_asm_mode () const
 Test whether the filter mode is EXCLUDE.
void set_include_mode ()
 Set the filter mode to INCLUDE.
void set_exclude_mode ()
 Set the filter mode to asm.
bool is_unused () const
 Test whether the entry is unused.
Mld6igmpSourceRecordfind_do_forward_source (const IPvX &source)
 Find a source that should be forwarded.
Mld6igmpSourceRecordfind_dont_forward_source (const IPvX &source)
 Find a source that should not be forwarded.
const Mld6igmpSourceSetdo_forward_sources () const
 Get a reference to the set of sources to forward.
void process_mode_is_include (const set< IPvX > &sources, const IPvX &last_reported_host)
 Get a reference to the set of sources not to forward.
void process_mode_is_exclude (const set< IPvX > &sources, const IPvX &last_reported_host)
 Process MODE_IS_EXCLUDE report.
void process_change_to_include_mode (const set< IPvX > &sources, const IPvX &last_reported_host)
 Process CHANGE_TO_INCLUDE_MODE report.
void process_change_to_exclude_mode (const set< IPvX > &sources, const IPvX &last_reported_host)
 Process CHANGE_TO_EXCLUDE_MODE report.
void process_allow_new_sources (const set< IPvX > &sources, const IPvX &last_reported_host)
 Process ALLOW_NEW_SOURCES report.
void process_block_old_sources (const set< IPvX > &sources, const IPvX &last_reported_host)
 Process BLOCK_OLD_SOURCES report.
void lower_group_timer (const TimeVal &timeval)
 Lower the group timer.
void lower_source_timer (const set< IPvX > &sources, const TimeVal &timeval)
 Lower the source timer for a set of sources.
void source_expired (Mld6igmpSourceRecord *source_record)
 Take the appropriate actions for a source that has expired.
uint32_t timeout_sec () const
 Get the number of seconds until the group timer expires.
uint32_t igmpv1_host_present_timer_timeout_sec () const
 Get the number of seconds until the IGMPv1 host present timer expires.
uint32_t igmpv2_mldv1_host_present_timer_timeout_sec () const
 Get the number of seconds until the IGMPv2/MLDv1 host present timer expires.
const IPvXlast_reported_host () const
 Get the address of the host that last reported as member.
XorpTimergroup_timer ()
 Get a refererence to the group timer.
void schedule_periodic_group_query (const set< IPvX > &sources)
 Schedule periodic Group-Specific and Group-and-Source-Specific Query retransmission.
void received_older_membership_report (int message_version)
 Record that an older Membership report message has been received.
bool is_igmpv1_mode () const
 Test if the group is running in IGMPv1 mode.
bool is_igmpv2_mode () const
 Test if the group is running in IGMPv2 mode.
bool is_igmpv3_mode () const
 Test if the group is running in IGMPv3 mode.
bool is_mldv1_mode () const
 Test if the group is running in MLDv1 mode.
bool is_mldv2_mode () const
 Test if the group is running in MLDv2 mode.
int family () const
 Get the address family.
 Mld6igmpGroupRecord (Mld6igmpVif &mld6igmp_vif, const IPvX &group)
 Constructor for a given vif and group address.
 ~Mld6igmpGroupRecord ()
 Destructor.
Mld6igmpVifmld6igmp_vif () const
 Get the vif this entry belongs to.
const IPvXgroup () const
 Get the multicast group address.
EventLoopeventloop ()
 Get the corresponding event loop.
bool is_include_mode () const
 Test whether the filter mode is INCLUDE.
bool is_exclude_mode () const
 Test whether the filter mode is EXCLUDE.
void set_include_mode ()
 Set the filter mode to INCLUDE.
void set_exclude_mode ()
 Set the filter mode to EXCLUDE.
bool is_unused () const
 Test whether the entry is unused.
Mld6igmpSourceRecordfind_do_forward_source (const IPvX &source)
 Find a source that should be forwarded.
Mld6igmpSourceRecordfind_dont_forward_source (const IPvX &source)
 Find a source that should not be forwarded.
const Mld6igmpSourceSetdo_forward_sources () const
 Get a reference to the set of sources to forward.
const Mld6igmpSourceSetdont_forward_sources () const
 Get a reference to the set of sources not to forward.
void process_mode_is_include (const set< IPvX > &sources, const IPvX &last_reported_host)
 Process MODE_IS_INCLUDE report.
void process_mode_is_exclude (const set< IPvX > &sources, const IPvX &last_reported_host)
 Process MODE_IS_EXCLUDE report.
void process_change_to_include_mode (const set< IPvX > &sources, const IPvX &last_reported_host)
 Process CHANGE_TO_INCLUDE_MODE report.
void process_change_to_exclude_mode (const set< IPvX > &sources, const IPvX &last_reported_host)
 Process CHANGE_TO_EXCLUDE_MODE report.
void process_allow_new_sources (const set< IPvX > &sources, const IPvX &last_reported_host)
 Process ALLOW_NEW_SOURCES report.
void process_block_old_sources (const set< IPvX > &sources, const IPvX &last_reported_host)
 Process BLOCK_OLD_SOURCES report.
void lower_group_timer (const TimeVal &timeval)
 Lower the group timer.
void lower_source_timer (const set< IPvX > &sources, const TimeVal &timeval)
 Lower the source timer for a set of sources.
void source_expired (Mld6igmpSourceRecord *source_record)
 Take the appropriate actions for a source that has expired.
uint32_t timeout_sec () const
 Get the number of seconds until the group timer expires.
const IPvXlast_reported_host () const
 Get the address of the host that last reported as member.
XorpTimergroup_timer ()
 Get a refererence to the group timer.
void schedule_periodic_group_query (const set< IPvX > &sources)
 Schedule periodic Group-Specific and Group-and-Source-Specific Query retransmission.
void received_older_membership_report (int message_version)
 Record that an older Membership report message has been received.
bool is_igmpv1_mode () const
 Test if the group is running in IGMPv1 mode.
bool is_igmpv2_mode () const
 Test if the group is running in IGMPv2 mode.
bool is_igmpv3_mode () const
 Test if the group is running in IGMPv3 mode.
bool is_mldv1_mode () const
 Test if the group is running in MLDv1 mode.
bool is_mldv2_mode () const
 Test if the group is running in MLDv2 mode.
int family () const
 Get the address family.

Private Member Functions

void calculate_forwarding_changes (bool old_is_include_mode, const set< IPvX > &old_do_forward_sources) const
 Calculate the forwarding changes and notify the interested parties.
void older_version_host_present_timer_timeout ()
 Timeout: one of the older version host present timers has expired.
void group_timer_timeout ()
 Timeout: the group timer has expired.
bool group_query_periodic_timeout ()
 Periodic timeout: time to send the next Group-Specific and Group-and-Source-Specific Queries.
void set_last_reported_host (const IPvX &v)
 Set the address of the host that last reported as member.
void calculate_forwarding_changes (bool old_is_include_mode, const set< IPvX > &old_do_forward_sources, const set< IPvX > &old_dont_forward_sources) const
 Calculate the forwarding changes and notify the interested parties.
void older_version_host_present_timer_timeout ()
 Timeout: one of the older version host present timers has expired.
void group_timer_timeout ()
 Timeout: the group timer has expired.
bool group_query_periodic_timeout ()
 Periodic timeout: time to send the next Group-Specific and Group-and-Source-Specific Queries.
void set_last_reported_host (const IPvX &v)
 Set the address of the host that last reported as member.

Private Attributes

Mld6igmpVif_mld6igmp_vif
IPvX _group
Mld6igmpSourceSet _do_forward_sources
IPvX _last_reported_host
XorpTimer _igmpv1_host_present_timer
XorpTimer _igmpv2_mldv1_host_present_timer
XorpTimer _group_timer
XorpTimer _group_query_timer
size_t _query_retransmission_count
bool _is_include_mode
Mld6igmpSourceSet _dont_forward_sources

Detailed Description

A class to store information about multicast group membership.


Constructor & Destructor Documentation

Mld6igmpGroupRecord::Mld6igmpGroupRecord ( Mld6igmpVif mld6igmp_vif,
const IPvX group 
)

Constructor for a given vif and group address.

Mld6igmpGroupRecord::Mld6igmpGroupRecord: : The vif interface this entry belongs to.

Parameters:
mld6igmp_vifthe interface this entry belongs to.
groupthe multicast group address.

: The entry group address.

Return value:

Mld6igmpGroupRecord::~Mld6igmpGroupRecord ( )
Mld6igmpGroupRecord::Mld6igmpGroupRecord ( Mld6igmpVif mld6igmp_vif,
const IPvX group 
)

Constructor for a given vif and group address.

Parameters:
mld6igmp_vifthe interface this entry belongs to.
groupthe multicast group address.

Member Function Documentation

void Mld6igmpGroupRecord::calculate_forwarding_changes ( bool  old_is_include_mode,
const set< IPvX > &  old_do_forward_sources 
) const [private]

Calculate the forwarding changes and notify the interested parties.

Parameters:
old_is_includemode if true, the old filter mode was INCLUDE, otherwise was EXCLUDE.
old_do_forward_sourcesthe old set of sources to forward.
old_dont_forward_sourcesthe old set of sources not to forward.
void Mld6igmpGroupRecord::calculate_forwarding_changes ( bool  old_is_include_mode,
const set< IPvX > &  old_do_forward_sources,
const set< IPvX > &  old_dont_forward_sources 
) const [private]

Calculate the forwarding changes and notify the interested parties.

Parameters:
old_is_includemode if true, the old filter mode was INCLUDE, otherwise was EXCLUDE.
old_do_forward_sourcesthe old set of sources to forward.
old_dont_forward_sourcesthe old set of sources not to forward.
const Mld6igmpSourceSet& Mld6igmpGroupRecord::do_forward_sources ( ) const [inline]

Get a reference to the set of sources to forward.

Returns:
a reference to the set of sources to forward.
const Mld6igmpSourceSet& Mld6igmpGroupRecord::do_forward_sources ( ) const [inline]

Get a reference to the set of sources to forward.

Returns:
a reference to the set of sources to forward.
const Mld6igmpSourceSet& Mld6igmpGroupRecord::dont_forward_sources ( ) const [inline]

Get a reference to the set of sources not to forward.

Returns:
a reference to the set of sources not to forward.
EventLoop & Mld6igmpGroupRecord::eventloop ( )

Get the corresponding event loop.

Returns:
the corresponding event loop.
EventLoop& Mld6igmpGroupRecord::eventloop ( )

Get the corresponding event loop.

Returns:
the corresponding event loop.
int Mld6igmpGroupRecord::family ( ) const [inline]

Get the address family.

Returns:
the address family.
int Mld6igmpGroupRecord::family ( ) const [inline]

Get the address family.

Returns:
the address family.
Mld6igmpSourceRecord * Mld6igmpGroupRecord::find_do_forward_source ( const IPvX source)

Find a source that should be forwarded.

Parameters:
sourcethe source address.
Returns:
the corresponding source record (Mld6igmpSourceRecord) if found, otherwise NULL.
Mld6igmpSourceRecord* Mld6igmpGroupRecord::find_do_forward_source ( const IPvX source)

Find a source that should be forwarded.

Parameters:
sourcethe source address.
Returns:
the corresponding source record (Mld6igmpSourceRecord) if found, otherwise NULL.
Mld6igmpSourceRecord * Mld6igmpGroupRecord::find_dont_forward_source ( const IPvX source)

Find a source that should not be forwarded.

Parameters:
sourcethe source address.
Returns:
the corresponding source record (Mld6igmpSourceRecord) if found, otherwise NULL.
Mld6igmpSourceRecord* Mld6igmpGroupRecord::find_dont_forward_source ( const IPvX source)

Find a source that should not be forwarded.

Parameters:
sourcethe source address.
Returns:
the corresponding source record (Mld6igmpSourceRecord) if found, otherwise NULL.
const IPvX& Mld6igmpGroupRecord::group ( ) const [inline]

Get the multicast group address.

Returns:
the multicast group address.
const IPvX& Mld6igmpGroupRecord::group ( ) const [inline]

Get the multicast group address.

Returns:
the multicast group address.
bool Mld6igmpGroupRecord::group_query_periodic_timeout ( ) [private]

Periodic timeout: time to send the next Group-Specific and Group-and-Source-Specific Queries.

Returns:
true if the timer should be scheduled again, otherwise false.
bool Mld6igmpGroupRecord::group_query_periodic_timeout ( ) [private]

Periodic timeout: time to send the next Group-Specific and Group-and-Source-Specific Queries.

Returns:
true if the timer should be scheduled again, otherwise false.
XorpTimer& Mld6igmpGroupRecord::group_timer ( ) [inline]

Get a refererence to the group timer.

Returns:
a reference to the group timer.
XorpTimer& Mld6igmpGroupRecord::group_timer ( ) [inline]

Get a refererence to the group timer.

Returns:
a reference to the group timer.
uint32_t Mld6igmpGroupRecord::igmpv1_host_present_timer_timeout_sec ( ) const

Get the number of seconds until the IGMPv1 host present timer expires.

Returns:
the number of seconds until the IGMPv1 host present timer expires.
uint32_t Mld6igmpGroupRecord::igmpv2_mldv1_host_present_timer_timeout_sec ( ) const

Get the number of seconds until the IGMPv2/MLDv1 host present timer expires.

Returns:
the number of seconds until the IGMPv2/MLDv1 host present timer expires.
bool Mld6igmpGroupRecord::is_asm_mode ( ) const [inline]

Test whether the filter mode is EXCLUDE.

Returns:
true if the filter mode is EXCLUDE.
bool Mld6igmpGroupRecord::is_exclude_mode ( ) const [inline]

Test whether the filter mode is EXCLUDE.

Returns:
true if the filter mode is EXCLUDE.
bool Mld6igmpGroupRecord::is_igmpv1_mode ( ) const

Test if the group is running in IGMPv1 mode.

Returns:
true if the group is running in IGMPv1 mode, otherwise false.
bool Mld6igmpGroupRecord::is_igmpv1_mode ( ) const

Test if the group is running in IGMPv1 mode.

Returns:
true if the group is running in IGMPv1 mode, otherwise false.
bool Mld6igmpGroupRecord::is_igmpv2_mode ( ) const

Test if the group is running in IGMPv2 mode.

Returns:
true if the group is running in IGMPv2 mode, otherwise false.
bool Mld6igmpGroupRecord::is_igmpv2_mode ( ) const

Test if the group is running in IGMPv2 mode.

Returns:
true if the group is running in IGMPv2 mode, otherwise false.
bool Mld6igmpGroupRecord::is_igmpv3_mode ( ) const

Test if the group is running in IGMPv3 mode.

Returns:
true if the group is running in IGMPv3 mode, otherwise false.
bool Mld6igmpGroupRecord::is_igmpv3_mode ( ) const

Test if the group is running in IGMPv3 mode.

Returns:
true if the group is running in IGMPv3 mode, otherwise false.
bool Mld6igmpGroupRecord::is_include_mode ( ) const [inline]

Test whether the filter mode is INCLUDE.

Returns:
true if the filter mode is INCLUDE.
bool Mld6igmpGroupRecord::is_include_mode ( ) const [inline]

Test whether the filter mode is INCLUDE.

Returns:
true if the filter mode is INCLUDE.
bool Mld6igmpGroupRecord::is_mldv1_mode ( ) const

Test if the group is running in MLDv1 mode.

Returns:
true if the group is running in MLDv1 mode, otherwise false.
bool Mld6igmpGroupRecord::is_mldv1_mode ( ) const

Test if the group is running in MLDv1 mode.

Returns:
true if the group is running in MLDv1 mode, otherwise false.
bool Mld6igmpGroupRecord::is_mldv2_mode ( ) const

Test if the group is running in MLDv2 mode.

Returns:
true if the group is running in MLDv2 mode, otherwise false.
bool Mld6igmpGroupRecord::is_mldv2_mode ( ) const

Test if the group is running in MLDv2 mode.

Returns:
true if the group is running in MLDv2 mode, otherwise false.
bool Mld6igmpGroupRecord::is_unused ( ) const

Test whether the entry is unused.

Returns:
true if the entry is unused, otherwise false.
bool Mld6igmpGroupRecord::is_unused ( ) const

Test whether the entry is unused.

Returns:
true if the entry is unused, otherwise false.
const IPvX& Mld6igmpGroupRecord::last_reported_host ( ) const [inline]

Get the address of the host that last reported as member.

Returns:
the address of the host that last reported as member.
const IPvX& Mld6igmpGroupRecord::last_reported_host ( ) const [inline]

Get the address of the host that last reported as member.

Returns:
the address of the host that last reported as member.
void Mld6igmpGroupRecord::lower_group_timer ( const TimeVal timeval)

Lower the group timer.

Parameters:
timevalthe timeout interval the timer should be lowered to.
void Mld6igmpGroupRecord::lower_group_timer ( const TimeVal timeval)

Lower the group timer.

Parameters:
timevalthe timeout interval the timer should be lowered to.
void Mld6igmpGroupRecord::lower_source_timer ( const set< IPvX > &  sources,
const TimeVal timeval 
)

Lower the source timer for a set of sources.

Parameters:
sourcesthe source addresses.
timevalthe timeout interval the timer should be lowered to.
void Mld6igmpGroupRecord::lower_source_timer ( const set< IPvX > &  sources,
const TimeVal timeval 
)

Lower the source timer for a set of sources.

Parameters:
sourcesthe source addresses.
timevalthe timeout interval the timer should be lowered to.
Mld6igmpVif& Mld6igmpGroupRecord::mld6igmp_vif ( ) const [inline]

Get the vif this entry belongs to.

Returns:
a reference to the vif this entry belongs to.
Mld6igmpVif& Mld6igmpGroupRecord::mld6igmp_vif ( ) const [inline]

Get the vif this entry belongs to.

Returns:
a reference to the vif this entry belongs to.
void Mld6igmpGroupRecord::process_allow_new_sources ( const set< IPvX > &  sources,
const IPvX last_reported_host 
)

Process ALLOW_NEW_SOURCES report.

Parameters:
sourcesthe source addresses.
last_reported_hostthe address of the host that last reported as member.
void Mld6igmpGroupRecord::process_allow_new_sources ( const set< IPvX > &  sources,
const IPvX last_reported_host 
)

Process ALLOW_NEW_SOURCES report.

Parameters:
sourcesthe source addresses.
last_reported_hostthe address of the host that last reported as member.
void Mld6igmpGroupRecord::process_block_old_sources ( const set< IPvX > &  sources,
const IPvX last_reported_host 
)

Process BLOCK_OLD_SOURCES report.

Parameters:
sourcesthe source addresses.
last_reported_hostthe address of the host that last reported as member.
void Mld6igmpGroupRecord::process_block_old_sources ( const set< IPvX > &  sources,
const IPvX last_reported_host 
)

Process BLOCK_OLD_SOURCES report.

Parameters:
sourcesthe source addresses.
last_reported_hostthe address of the host that last reported as member.
void Mld6igmpGroupRecord::process_change_to_exclude_mode ( const set< IPvX > &  sources,
const IPvX last_reported_host 
)

Process CHANGE_TO_EXCLUDE_MODE report.

Parameters:
sourcesthe source addresses.
last_reported_hostthe address of the host that last reported as member.
void Mld6igmpGroupRecord::process_change_to_exclude_mode ( const set< IPvX > &  sources,
const IPvX last_reported_host 
)

Process CHANGE_TO_EXCLUDE_MODE report.

Parameters:
sourcesthe source addresses.
last_reported_hostthe address of the host that last reported as member.
void Mld6igmpGroupRecord::process_change_to_include_mode ( const set< IPvX > &  sources,
const IPvX last_reported_host 
)

Process CHANGE_TO_INCLUDE_MODE report.

Parameters:
sourcesthe source addresses.
last_reported_hostthe address of the host that last reported as member.
void Mld6igmpGroupRecord::process_change_to_include_mode ( const set< IPvX > &  sources,
const IPvX last_reported_host 
)

Process CHANGE_TO_INCLUDE_MODE report.

Parameters:
sourcesthe source addresses.
last_reported_hostthe address of the host that last reported as member.
void Mld6igmpGroupRecord::process_mode_is_exclude ( const set< IPvX > &  sources,
const IPvX last_reported_host 
)

Process MODE_IS_EXCLUDE report.

Parameters:
sourcesthe source addresses.
last_reported_hostthe address of the host that last reported as member.
void Mld6igmpGroupRecord::process_mode_is_exclude ( const set< IPvX > &  sources,
const IPvX last_reported_host 
)

Process MODE_IS_EXCLUDE report.

Parameters:
sourcesthe source addresses.
last_reported_hostthe address of the host that last reported as member.
void Mld6igmpGroupRecord::process_mode_is_include ( const set< IPvX > &  sources,
const IPvX last_reported_host 
)

Process MODE_IS_INCLUDE report.

Parameters:
sourcesthe source addresses.
last_reported_hostthe address of the host that last reported as member.
void Mld6igmpGroupRecord::process_mode_is_include ( const set< IPvX > &  sources,
const IPvX last_reported_host 
)

Get a reference to the set of sources not to forward.

Process MODE_IS_INCLUDE report.

Returns:
a reference to the set of sources not to forward. Process MODE_IS_INCLUDE report.
Parameters:
sourcesthe source addresses.
last_reported_hostthe address of the host that last reported as member.
sourcesthe source addresses.
last_reported_hostthe address of the host that last reported as member.
void Mld6igmpGroupRecord::received_older_membership_report ( int  message_version)

Record that an older Membership report message has been received.

Parameters:
message_versionthe corresponding protocol version of the received message.
void Mld6igmpGroupRecord::received_older_membership_report ( int  message_version)

Record that an older Membership report message has been received.

Parameters:
message_versionthe corresponding protocol version of the received message.
void Mld6igmpGroupRecord::schedule_periodic_group_query ( const set< IPvX > &  sources)

Schedule periodic Group-Specific and Group-and-Source-Specific Query retransmission.

If the sources list is empty, we schedule Group-Specific Query, otherwise we schedule Group-and-Source-Specific Query.

Parameters:
sourcesthe source addresses.
void Mld6igmpGroupRecord::schedule_periodic_group_query ( const set< IPvX > &  sources)

Schedule periodic Group-Specific and Group-and-Source-Specific Query retransmission.

If the sources list is empty, we schedule Group-Specific Query, otherwise we schedule Group-and-Source-Specific Query.

Parameters:
sourcesthe source addresses.
void Mld6igmpGroupRecord::set_last_reported_host ( const IPvX v) [inline, private]

Set the address of the host that last reported as member.

Parameters:
vthe address of the host that last reported as member.
void Mld6igmpGroupRecord::set_last_reported_host ( const IPvX v) [inline, private]

Set the address of the host that last reported as member.

Parameters:
vthe address of the host that last reported as member.
void Mld6igmpGroupRecord::source_expired ( Mld6igmpSourceRecord source_record)

Take the appropriate actions for a source that has expired.

Parameters:
source_recordthe source record that has expired.
void Mld6igmpGroupRecord::source_expired ( Mld6igmpSourceRecord source_record)

Take the appropriate actions for a source that has expired.

Parameters:
source_recordthe source record that has expired.
uint32_t Mld6igmpGroupRecord::timeout_sec ( ) const

Get the number of seconds until the group timer expires.

Returns:
the number of seconds until the group timer expires.
uint32_t Mld6igmpGroupRecord::timeout_sec ( ) const

Get the number of seconds until the group timer expires.

Returns:
the number of seconds until the group timer expires.

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