igmp_sender Class Reference
[Sender]
Generates IGMP messages.
#include "igmp_sender.hpp"
Public Member Functions | |
igmp_sender () | |
bool | init (int addr_family, int version) |
bool | send_general_query (int if_index) |
bool | send_group_specific_query (int if_index, const addr_storage &g_addr) |
bool | send_leave (int if_index, const addr_storage &g_addr) |
bool | send_report (int if_index, const addr_storage &g_addr) |
Constructor & Destructor Documentation
igmp_sender::igmp_sender | ( | ) |
Create an igmp_sender.
References HC_LOG_TRACE.
Member Function Documentation
bool igmp_sender::init | ( | int | addr_family, | |
int | version | |||
) | [virtual] |
initialise the sender
- Parameters:
-
addr_family used IP version (AF_INET or AF_INET6) version used group membership version
- Returns:
- Return true on success.
Reimplemented from sender.
References HC_LOG_TRACE, and sender::init().
bool igmp_sender::send_general_query | ( | int | if_index | ) | [virtual] |
Send a General Query to a specific interface.
- Parameters:
-
if_index used interface
- Returns:
- Return true on success.
Implements sender.
References HC_LOG_TRACE, IPV4_ALL_HOST_ADDR, sender::m_sock, and mc_socket::send_packet().
bool igmp_sender::send_group_specific_query | ( | int | if_index, | |
const addr_storage & | g_addr | |||
) | [virtual] |
Send a Group Specific Query to a multicast group and a specific interface.
- Parameters:
-
if_index used interface g_addr used multicast group
- Returns:
- Return true on success.
Implements sender.
References HC_LOG_TRACE, sender::m_sock, mc_socket::send_packet(), and addr_storage::to_string().
bool igmp_sender::send_leave | ( | int | if_index, | |
const addr_storage & | g_addr | |||
) | [virtual] |
Send a leave Message to a multicast group and a specific interface.
- Parameters:
-
if_index used interface g_addr used multicast group
- Returns:
- Return true on success.
Implements sender.
References if_prop::get_ip4_if(), HC_LOG_TRACE, mc_socket::leave_group(), sender::m_if_prop, sender::m_sock, and addr_storage::to_string().
bool igmp_sender::send_report | ( | int | if_index, | |
const addr_storage & | g_addr | |||
) | [virtual] |
Send a Membership Report to a multicast group and a specific interface.
- Parameters:
-
if_index used interface g_addr used multicast group
- Returns:
- Return true on success.
Implements sender.
References if_prop::get_ip4_if(), HC_LOG_TRACE, mc_socket::join_group(), sender::m_if_prop, sender::m_sock, and addr_storage::to_string().