MCProxy

sender Class Reference
[Sender]

Abstract basic sender class.

#include "sender.hpp"

List of all members.

Public Member Functions

virtual bool init (int addr_family, int version)
virtual bool send_general_query (int if_index)=0
virtual bool send_group_specific_query (int if_index, const addr_storage &g_addr)=0
virtual bool send_leave (int if_index, const addr_storage &g_addr)=0
virtual bool send_report (int if_index, const addr_storage &g_addr)=0
 sender ()

Protected Member Functions

bool init_if_prop ()

Protected Attributes

int m_addr_family
if_prop m_if_prop
mroute_socket m_sock
int m_version

Constructor & Destructor Documentation

sender::sender (  ) 

Create a sender.

References HC_LOG_TRACE.


Member Function Documentation

bool 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 in igmp_sender, and mld_sender.

References mroute_socket::create_raw_ipv4_socket(), mroute_socket::create_raw_ipv6_socket(), HC_LOG_ERROR, HC_LOG_TRACE, init_if_prop(), m_addr_family, m_sock, m_version, and mc_socket::set_loop_back().

Referenced by proxy_instance::init(), mld_sender::init(), and igmp_sender::init().

bool sender::init_if_prop (  )  [protected]

initialize the interface properties class.

References HC_LOG_TRACE, m_if_prop, and if_prop::refresh_network_interfaces().

Referenced by init().

virtual bool sender::send_general_query ( int  if_index  )  [pure virtual]

Send a General Query to a specific interface.

Parameters:
if_index used interface
Returns:
Return true on success.

Implemented in igmp_sender, and mld_sender.

virtual bool sender::send_group_specific_query ( int  if_index,
const addr_storage g_addr 
) [pure 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.

Implemented in igmp_sender, and mld_sender.

virtual bool sender::send_leave ( int  if_index,
const addr_storage g_addr 
) [pure 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.

Implemented in igmp_sender, and mld_sender.

virtual bool sender::send_report ( int  if_index,
const addr_storage g_addr 
) [pure 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.

Implemented in igmp_sender, and mld_sender.


Member Data Documentation

int sender::m_addr_family [protected]

Used IP version (AF_INET or AF_INET6).

Referenced by init().

Collect interface properties. Used to generate multicast messages.

Referenced by init_if_prop(), igmp_sender::send_leave(), and igmp_sender::send_report().

int sender::m_version [protected]

Used group membership version.

Referenced by init().