|
| |||||||||||||||||
There should be one node per MLD or IGMP instance. There should be one instance per address family.
| Mld6igmpNode (int family, x_module_id module_id, EventLoop& event_loop)
| Mld6igmpNode |
Constructor for a given address family, module ID, and event loop.
Parameters:
| family | the address family (AF_INET or AF_INET6 for IPv4 and IPv6 respectively). |
| module_id | the module ID (x_module_id). Should be equal to X_MODULE_MLD6IGMP. |
| event_loop | the event loop to use. |
| ~Mld6igmpNode ()
| ~Mld6igmpNode |
[virtual]
Destructor
| int start ()
| start |
Start the node operation.
Returns: XORP_OK on success, otherwise XORP_ERROR.
Reimplemented from ProtoNode.
| int stop ()
| stop |
Stop the node operation.
Returns: XORP_OK on success, otherwise XORP_ERROR.
Reimplemented from ProtoNode.
| int add_vif (const Vif& vif)
| add_vif |
Install a new MLD6/IGMP vif.
Parameters:
| vif | vif information about new Mld6igmpVif to install. |
Returns: XORP_OK on success, otherwise XORP_ERROR.
Reimplemented from ProtoNode.
| int add_vif (const char *vif_name, uint32_t vif_index)
| add_vif |
Install a new MLD6/IGMP vif.
Parameters:
| vif_name | the name of the new vif. |
| vif_index | the vif index of the new vif. |
Returns: XORP_OK on success, otherwise XORP_ERROR.
Reimplemented from ProtoNode.
| int delete_vif (const char *vif_name)
| delete_vif |
Delete an existing MLD6/IGMP vif.
Parameters:
| vif_name | the name of the vif to delete. |
Returns: XORP_OK on success, otherwise XORP_ERROR.
Reimplemented from ProtoNode.
| int set_vif_flags (const char *vif_name,
bool is_pim_register, bool is_p2p,
bool is_loopback, bool is_multicast,
bool is_broadcast, bool is_up)
| set_vif_flags |
Set flags to a vif.
Parameters:
| vif_name | the name of the vif. |
| is_pim_register | true if this is a PIM Register vif. |
| is_p2p | true if this is a point-to-point vif. |
| is_loopback | true if this is a loopback interface. |
| is_multicast | true if the vif is multicast-capable. |
| is_broadcast | true if the vif is broadcast-capable. |
| is_up | true if the vif is UP and running. |
Returns: XORP_OK on success, otherwise XORP_ERROR.
| int add_vif_addr (const char *vif_name,
const IPvX& addr,
const IPvXNet& subnet_addr,
const IPvX& broadcast_addr,
const IPvX& peer_addr)
| add_vif_addr |
Add an address to a vif.
Parameters:
| vif_name | the name of the vif. |
| addr | the unicast address to add. |
| subnet_addr | the subnet address to add. |
| broadcast_addr | the broadcast address (when applicable). |
| peer_addr | the peer address (when applicable). |
Returns: XORP_OK on success, otherwise XORP_ERROR.
| int delete_vif_addr (const char *vif_name,
const IPvX& addr)
| delete_vif_addr |
Delete an address from a vif.
Parameters:
| vif_name | the name of the vif. |
| addr | the unicast address to delete. |
Returns: XORP_OK on success, otherwise XORP_ERROR.
| int start_all_vifs ()
| start_all_vifs |
Start MLD6/IGMP on all enabled interfaces.
Returns: the number of virtual interfaces MLD6/IGMP was started on, or XORP_ERROR if error occured.
| int stop_all_vifs ()
| stop_all_vifs |
Stop MLD6/IGMP on all interfaces it was running on.
Returns: he number of virtual interfaces MLD6/IGMP was stopped on, or XORP_ERROR if error occured.
| int enable_all_vifs ()
| enable_all_vifs |
Enable MLD6/IGMP on all interfaces.
Returns: XORP_OK on success, otherwise XORP_ERROR.
| int disable_all_vifs ()
| disable_all_vifs |
Disable MLD6/IGMP on all interfaces.
Returns: XORP_OK on success, otherwise XORP_ERROR.
| void delete_all_vifs ()
| delete_all_vifs |
Delete all MLD6/IGMP vifs.
| int proto_recv (const string& src_module_instance_name,
x_module_id src_module_id,
uint16_t vif_index,
const IPvX& src, const IPvX& dst,
int ip_ttl, int ip_tos, bool router_alert_bool,
const uint8_t *rcvbuf, size_t rcvlen)
| proto_recv |
Receive a protocol message.
Parameters:
| src_module_instance_name | the module instance name of the module-origin of the message. |
| src_module_id | the module ID (x_module_id) of the module-origin of the message. |
| vif_index | the vif index of the interface used to receive this message. |
| src | the source address of the message. |
| dst | the destination address of the message. |
| ip_ttl | the IP TTL of the message. If it has a negative value, it should be ignored. |
| ip_tos | the IP TOS of the message. If it has a negative value, it should be ignored. |
| router_alert_bool | if true, the IP Router Alert option in the IP packet was set (when applicable). |
| rcvbuf | the data buffer with the received message. |
| rcvlen | the data length in rcvbuf. |
Returns: XORP_OK on success, otherwise XORP_ERROR.
Reimplemented from ProtoNode.
| int mld6igmp_send (uint16_t vif_index,
const IPvX& src, const IPvX& dst,
int ip_ttl, int ip_tos,
bool router_alert_bool,
buffer_t *buffer)
| mld6igmp_send |
Send a protocol message.
Note: this method uses the pure virtual ProtoNode::proto_send() method that is implemented somewhere else (in a class that inherits this one).
Parameters:
| vif_index | the vif index of the vif to send the message. |
| src | the source address of the message. |
| dst | the destination address of the message. |
| ip_ttl | the TTL of the IP packet to send. If it has a negative value, the TTL will be set by the lower layers. |
| ip_tos | the TOS of the IP packet to send. If it has a negative value, the TOS will be set by the lower layers. |
| router_alert_bool | if true, set the IP Router Alert option in the IP packet to send (when applicable). |
| buffer | the data buffer with the message to send. |
Returns: XORP_OK on success, otherwise XORP_ERROR.
| int signal_message_recv (const string& ,
x_module_id ,
int ,
uint16_t ,
const IPvX& ,
const IPvX& ,
const uint8_t * ,
size_t
)
| signal_message_recv |
Receive signal message: not used by MLD6/IGMP.
Reimplemented from ProtoNode.
| int signal_message_send (const string& ,
x_module_id ,
int ,
uint16_t ,
const IPvX& ,
const IPvX& ,
const uint8_t * ,
size_t
)
| signal_message_send |
Send signal message: not used by MLD6/IGMP.
Reimplemented from ProtoNode.
| int start_protocol_kernel ()
| start_protocol_kernel |
[pure virtual]
Start the protocol with the kernel.
This is a pure virtual function, and it must be implemented by the communication-wrapper class that inherits this base class.
Returns: XORP_OK on success, otherwise XORP_ERROR.
| int stop_protocol_kernel ()
| stop_protocol_kernel |
[pure virtual]
Stop the protocol with the kernel.
This is a pure virtual function, and it must be implemented by the communication-wrapper class that inherits this base class.
Returns: XORP_OK on success, otherwise XORP_ERROR.
| int start_protocol_kernel_vif (uint16_t vif_index)
| start_protocol_kernel_vif |
[pure virtual]
Start a protocol vif with the kernel.
This is a pure virtual function, and it must be implemented by the communication-wrapper class that inherits this base class.
Parameters:
| vif_index | the vif index of the interface to start. |
Returns: XORP_OK on success, otherwise XORP_ERROR.
| int stop_protocol_kernel_vif (uint16_t vif_index)
| stop_protocol_kernel_vif |
[pure virtual]
Stop a protocol vif with the kernel.
This is a pure virtual function, and it must be implemented by the communication-wrapper class that inherits this base class.
Parameters:
| vif_index | the vif index of the interface to stop. |
Returns: XORP_OK on success, otherwise XORP_ERROR.
| int join_multicast_group (uint16_t vif_index,
const IPvX& multicast_group)
| join_multicast_group |
[pure virtual]
Join a multicast group on an interface.
This is a pure virtual function, and it must be implemented by the communication-wrapper class that inherits this base class.
TODO: add a source address as well!!
Parameters:
| vif_index | the vif index of the interface to join. |
| multicast_group | the multicast group address. |
Returns: XORP_OK on success, otherwise XORP_ERROR.
| int leave_multicast_group (uint16_t vif_index,
const IPvX& multicast_group)
| leave_multicast_group |
[pure virtual]
Leave a multicast group on an interface.
This is a pure virtual function, and it must be implemented by the communication-wrapper class that inherits this base class.
TODO: add a source address as well!!
Parameters:
| vif_index | the vif index of the interface to leave. |
| multicast_group | the multicast group address. |
Returns: XORP_OK on success, otherwise XORP_ERROR.
| int add_protocol (const string& module_instance_name,
x_module_id module_id,
uint16_t vif_index)
| 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_name | the module instance name of the protocol to add. |
| module_id | the module ID (x_module_id) of the protocol to add. |
| vif_index | the vif index of the interface to add the protocol to. |
Returns: XORP_OK on success, otherwise XORP_ERROR.
| int delete_protocol (const string& module_instance_name,
x_module_id module_id,
uint16_t vif_index)
| 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_name | the module instance name of the protocol to delete. |
| module_id | the module ID (x_module_id) of the protocol to delete. |
| vif_index | the vif index of the interface to delete the protocol from. |
Returns: XORP_OK on success, otherwise XORP_ERROR.
| int send_add_membership (const string& dst_module_instance_name,
x_module_id dst_module_id,
uint16_t vif_index,
const IPvX& source,
const IPvX& group)
| send_add_membership |
[pure virtual]
Send "add membership" to a protocol that needs to be notified about multicast membership changes.
This is a pure virtual function, and it must be implemented by the communication-wrapper class that inherits this base class.
Parameters:
| dst_module_instance_name | the module instance name of the protocol to notify. |
| dst_module_id | the module ID (x_module_id) of the protocol to notify. |
| vif_index | the vif index of the interface with membership change. |
| source | the source address of the (S,G) or (*,G) entry that has changed membership. In case of Any-Source Multicast, it is IPvX::ZERO(). |
| group | the group address. |
Returns: XORP_OK on success, otherwise XORP_ERROR.
| int send_delete_membership (const string& dst_module_instance_name,
x_module_id dst_module_id,
uint16_t vif_index,
const IPvX& source,
const IPvX& group)
| send_delete_membership |
[pure virtual]
Send "delete membership" to a protocol that needs to be notified about multicast membership changes.
This is a pure virtual function, and it must be implemented by the communication-wrapper class that inherits this base class.
Parameters:
| dst_module_instance_name | the module instance name of the protocol to notify. |
| dst_module_id | the module ID (x_module_id) of the protocol to notify. |
| vif_index | the vif index of the interface with membership change. |
| source | the source address of the (S,G) or (*,G) entry that has changed membership. In case of Any-Source Multicast, it is IPvX::ZERO(). |
| group | the group address of the (S,G) or (*,G) entry that has changed. |
Returns: XORP_OK on success, otherwise XORP_ERROR.
| int join_prune_notify_routing (const string& module_instance_name,
x_module_id module_id,
uint16_t vif_index,
const IPvX& source,
const IPvX& group,
action_jp_t action_jp)
| join_prune_notify_routing |
Notify a protocol about multicast membership change.
Parameters:
| module_instance_name | the module instance name of the protocol to notify. |
| module_id | the module ID (x_module_id) of the protocol to notify. |
| vif_index | the vif index of the interface with membership change. |
| source | the source address of the (S,G) or (*,G) entry that has changed. In case of group-specific multicast, it is IPvX::ZERO(). |
| group | the group address of the (S,G) or (*,G) entry that has changed. |
| action_jp | the membership change type (action_jp_t): either ACTION_JOIN or ACTION_PRUNE. |
Returns: XORP_OK on success, otherwise XORP_ERROR.
| bool is_log_trace ()
| is_log_trace |
[const]
Test if trace log is enabled.
This method is used to test whether to output trace log debug messges.
Returns: true if trace log is enabled, otherwise false.
| void set_log_trace (bool is_enabled)
| set_log_trace |
Enable/disable trace log.
This method is used to enable/disable trace log debug messages output.
Parameters:
| is_enabled | if true, trace log is enabled, otherwise is disabled. |
| Generated by: pavlin on possum.icir.org on Wed Dec 11 16:50:50 2002, using kdoc 2.0a54+XORP. |