class Mld6igmpVif

A class for MLD/IGMP-specific virtual interface. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Methods


Detailed Description

 Mld6igmpVif (Mld6igmpNode& mld6igmp_node, const Vif& vif)

Mld6igmpVif

Constructor for a given MLD/IGMP node and a generic virtual interface.

Parameters:

mld6igmp_nodethe Mld6igmpNode this interface belongs to.
vifthe generic Vif interface that contains various information.
 ~Mld6igmpVif ()

~Mld6igmpVif

[virtual]

Destructor

int  set_proto_version (int proto_version)

set_proto_version

Set the current protocol version.

The protocol version must be in the interval [IGMP_VERSION_MIN, IGMP_VERSION_MAX] or [MLD_VERSION_MIN, MLD_VERSION_MAX]

Parameters:

proto_versionthe protocol version to set.

Returns: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from ProtoUnit.

int  start (string& error_msg)

start

Start MLD/IGMP on a single virtual interface.

Parameters:

error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  stop (string& error_msg)

stop

Stop MLD/IGMP on a single virtual interface.

Parameters:

error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

void  enable ()

enable

Enable MLD/IGMP on a single virtual interface.

If an unit is not enabled, it cannot be start, or pending-start.

void  disable ()

disable

Disable MLD/IGMP on a single virtual interface.

If an unit is disabled, it cannot be start or pending-start. If the unit was runnning, it will be stop first.

int  mld6igmp_recv (const IPvX& src, const IPvX& dst, int ip_ttl, int ip_tos, bool is_router_alert, buffer_t *buffer, string& error_msg)

mld6igmp_recv

Receive a protocol message.

Parameters:

srcthe source address of the message.
dstthe destination address of the message.
ip_ttlthe IP TTL of the message. If it has a negative value it should be ignored.
ip_ttlthe IP TOS of the message. If it has a negative value, it should be ignored.
is_router_alertif true, the IP Router Alert option in the IP packet was set (when applicable).
bufferthe data buffer with the received message.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

string  flags_string ()

flags_string

[const]

Get the string with the flags about the vif status.

TODO: temporary here. Should go to the Vif class after the Vif class starts using the Proto class.

Returns: the C++ style string with the flags about the vif status (e.g., UP/DOWN/DISABLED, etc).

Mld6igmpNode&  mld6igmp_node ()

mld6igmp_node

[const]

Get the MLD6IGMP node (Mld6igmpNode).

Returns: a reference to the MLD6IGMP node (Mld6igmpNode).

const IPvX&  primary_addr ()

primary_addr

[const]

Get my primary address on this interface.

Returns: my primary address on this interface.

void  set_primary_addr (const IPvX& v)

set_primary_addr

Set my primary address on this interface.

Parameters:

vthe value of the primary address.
int  update_primary_address (string& error_msg)

update_primary_address

Update the primary address.

The primary address should be a link-local unicast address, and is used for transmitting the multicast control packets on the LAN.

Parameters:

error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

const IPvX&  querier_addr ()

querier_addr

[const]

Get the MLD/IGMP querier address.

Returns: the MLD/IGMP querier address.

void  set_querier_addr (const IPvX& v)

set_querier_addr

Set the MLD6/IGMP querier address.

Parameters:

vthe value of the MLD/IGMP querier address.
Mld6igmpGroupSet&  group_records ()

group_records

Get the set with the multicast group records information (Mld6igmpGroupSet).

Returns: the set with the multicast group records information (Mld6igmpGroupSet).

const Mld6igmpGroupSet&  group_records ()

group_records

[const]

Get the const set with the multicast group records information (Mld6igmpGroupSet).

Returns: the const set with the multicast group records information (Mld6igmpGroupSet).

bool  proto_is_ssm ()

proto_is_ssm

[const]

Test if the protocol is Source-Specific Multicast (e.g., IGMPv3 or MLDv2).

Returns: true if the protocol is Source-Specific Multicast (e.g., IGMPv3 or MLDv2).

const XorpTimer&  const_other_querier_timer ()

const_other_querier_timer

[const]

Get the timer to timeout the (other) MLD/IGMP querier.

Returns: a reference to the timer to timeout the (other) MLD/IGMP querier.

ConfigParam<bool>&  ip_router_alert_option_check ()

ip_router_alert_option_check

Optain a reference to the "IP Router Alert option check" flag.

Returns: a reference to the "IP Router Alert option check" flag.

ConfigParam<TimeVal>&  configured_query_interval ()

configured_query_interval

Optain a reference to the configured Query Interval.

Returns: a reference to the configured Query Interval.

const TimeVal&  effective_query_interval ()

effective_query_interval

[const]

Get the effective Query Interval value.

Note that this value may be modified by reconfiguring the router, or by the Query message from the current Querier.

Returns: the value of the effective Query Interval.

void  set_effective_query_interval (const TimeVal& v)

set_effective_query_interval

Set the effective Query Interval.

Note that this value may be modified by reconfiguring the router, or by the Query message from the current Querier.

Parameters:

vthe value of the effective Query Interval.
ConfigParam<TimeVal>&  query_last_member_interval ()

query_last_member_interval

Optain a reference to the Last Member Query Interval.

Returns: a reference to the Last Member Query Interval.

ConfigParam<TimeVal>&  query_response_interval ()

query_response_interval

Optain a reference to the Query Response Interval.

Returns: a reference to the Query Response Interval.

ConfigParam<uint32_t>&  configured_robust_count ()

configured_robust_count

Optain a reference to the configured Robustness Variable count.

Returns: a reference to the configured Robustness Variable count.

uint32_t  effective_robustness_variable ()

effective_robustness_variable

[const]

Get the effective Robustness Variable value.

Note that this value may be modified by reconfiguring the router, or by the Query messages from the current Querier.

Returns: the value of the effective Robustness Variable.

void  set_effective_robustness_variable (uint32_t v)

set_effective_robustness_variable

Set the effective Robustness Variable.

Note that this value may be modified by reconfiguring the router, or by the Query messages from the current Querier.

Parameters:

vthe value of the effective Robustness Variable.
uint32_t  last_member_query_count ()

last_member_query_count

[const]

Get the Last Member Query Count value.

Note: According to the IGMP/MLD spec, the default value for the Last Member Query Count is the Robustness Variable. Hence, the Last Member Query Count itself should be configurable. For simplicity (and for consistency with other router vendors), it is always same as the Robustness Variable.

Returns: the value of the Last Member Query Count.

const TimeVal&  group_membership_interval ()

group_membership_interval

[const]

Obtain a reference to the Group Membership Interval.

Note that it is not directly configurable, but may be tuned by changing the values of the parameters it depends on.

Returns: a reference to the Group Membership Interval.

const TimeVal&  last_member_query_time ()

last_member_query_time

[const]

Obtain a reference to the Last Member Query Time.

Note that it is not directly configurable, but may be tuned by changing the values of the parameters it depends on.

Returns: a reference to the Last Member Query Time.

const TimeVal&  older_version_host_present_interval ()

older_version_host_present_interval

[const]

Obtain a reference to the Older Version Host Present Interval.

Note that it is not directly configurable, but may be tuned by changing the values of the parameters it depends on.

Returns: a reference to the Older Version Host Present Interval.

int  add_protocol (xorp_module_id module_id, const string& module_instance_name)

add_protocol

Add a protocol that needs to be notified about multicast membership changes.

Add a protocol to the list of entries that would be notified if there is membership change on a particular interface.

Parameters:

module_instance_namethe module instance name of the protocol to add.
module_idthe module ID (xorp_module_id) of the protocol to add.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  delete_protocol (xorp_module_id module_id, const string& module_instance_name)

delete_protocol

Delete a protocol that needs to be notified about multicast membership changes.

Delete a protocol from the list of entries that would be notified if there is membership change on a particular interface.

Parameters:

module_instance_namethe module instance name of the protocol to delete.
module_idthe module ID (xorp_module_id) of the protocol to delete.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  join_prune_notify_routing (const IPvX& source, const IPvX& group, action_jp_t action_jp)

join_prune_notify_routing

[const]

Notify the interested parties that there is membership change among the local members.

Parameters:

sourcethe source address of the (S,G) entry that has changed. In case of group-specific membership, it could be IPvX::ZERO().
groupthe group address of the (S,G) entry that has changed.
action_jpthe membership change: ACTION_JOIN or ACTION_PRUNE.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  mld6igmp_send (const IPvX& src, const IPvX& dst, uint8_t message_type, uint16_t max_resp_code, const IPvX& group_address, buffer_t *buffer, string& error_msg)

mld6igmp_send

Send MLD or IGMP message.

Parameters:

srcthe message source address.
dstthe message destination address.
message_typethe MLD or IGMP type of the message.
max_resp_codethe "Maximum Response Code" or "Max Resp Code" field in the MLD or IGMP headers respectively (in the particular protocol resolution).
group_addressthe "Multicast Address" or "Group Address" field in the MLD or IGMP headers respectively.
bufferthe buffer with the rest of the message.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  mld6igmp_group_query_send (const IPvX& group_address, string& error_msg)

mld6igmp_group_query_send

Send Group-Specific Query message.

Parameters:

group_addressthe "Multicast Address" or "Group Address" field in the MLD or IGMP headers respectively.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  mld6igmp_group_source_query_send (const IPvX& group_address, const set<IPvX>& sources, string& error_msg)

mld6igmp_group_source_query_send

Send MLDv2 or IGMPv3 Group-and-Source-Specific Query message.

Parameters:

group_addressthe "Multicast Address" or "Group Address" field in the MLD or IGMP headers respectively.
sourcesthe set of source addresses.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  mld6igmp_query_send (const IPvX& src, const IPvX& dst, const TimeVal& max_resp_time, const IPvX& group_address, const set<IPvX>& sources, bool s_flag, string& error_msg)

mld6igmp_query_send

Send MLD or IGMP Query message.

Parameters:

srcthe message source address.
dstthe message destination address.
max_resp_timethe maximum response time.
group_addressthe "Multicast Address" or "Group Address" field in the MLD or IGMP headers respectively.
sourcesthe set of source addresses (for IGMPv3 or MLDv2 only).
s_flagthe "Suppress Router-Side Processing" bit (for IGMPv3 or MLDv2 only; in all other cases it should be set to false).
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

bool  is_igmpv1_mode ()

is_igmpv1_mode

[const]

Test if the interface is running in IGMPv1 mode.

Returns: true if the interface is running in IGMPv1 mode, otherwise false.

bool  is_igmpv2_mode ()

is_igmpv2_mode

[const]

Test if the interface is running in IGMPv2 mode.

Returns: true if the interface is running in IGMPv2 mode, otherwise false.

bool  is_igmpv3_mode ()

is_igmpv3_mode

[const]

Test if the interface is running in IGMPv3 mode.

Returns: true if the interface is running in IGMPv3 mode, otherwise false.

bool  is_mldv1_mode ()

is_mldv1_mode

[const]

Test if the interface is running in MLDv1 mode.

Returns: true if the interface is running in MLDv1 mode, otherwise false.

bool  is_mldv2_mode ()

is_mldv2_mode

[const]

Test if the interface is running in MLDv2 mode.

Returns: true if the interface is running in MLDv2 mode, otherwise false.

bool  is_igmpv1_mode (const Mld6igmpGroupRecord* group_record)

is_igmpv1_mode

[const]

Test if a group is running in IGMPv1 mode.

Note that if group_record is NULL, then we test whether the interface itself is running in IGMPv1 mode.

Parameters:

group_recordthe group record to test.

Returns: true if the group is running in IGMPv1 mode, otherwise false.

bool  is_igmpv2_mode (const Mld6igmpGroupRecord* group_record)

is_igmpv2_mode

[const]

Test if a group is running in IGMPv2 mode.

Note that if group_record is NULL, then we test whether the interface itself is running in IGMPv2 mode.

Parameters:

group_recordthe group record to test.

Returns: true if the group is running in IGMPv2 mode, otherwise false.

bool  is_igmpv3_mode (const Mld6igmpGroupRecord* group_record)

is_igmpv3_mode

[const]

Test if a group is running in IGMPv3 mode.

Note that if group_record is NULL, then we test whether the interface itself is running in IGMPv3 mode.

Parameters:

group_recordthe group record to test.

Returns: true if the group is running in IGMPv3 mode, otherwise false.

bool  is_mldv1_mode (const Mld6igmpGroupRecord* group_record)

is_mldv1_mode

[const]

Test if a group is running in MLDv1 mode.

Note that if group_record is NULL, then we test whether the interface itself is running in MLDv1 mode.

Parameters:

group_recordthe group record to test.

Returns: true if the group is running in MLDv1 mode, otherwise false.

bool  is_mldv2_mode (const Mld6igmpGroupRecord* group_record)

is_mldv2_mode

[const]

Test if a group is running in MLDv2 mode.

Note that if group_record is NULL, then we test whether the interface itself is running in MLDv2 mode.

Parameters:

group_recordthe group record to test.

Returns: true if the group is running in MLDv2 mode, otherwise false.


Generated by: pavlin on possum.icir.org on Wed Aug 2 15:36:22 2006, using kdoc $.