xorp

IoLinkDummy Class Reference

A base class for Dummy I/O link raw communication. More...

#include <io_link_dummy.hh>

Inheritance diagram for IoLinkDummy:
IoLink

List of all members.

Public Member Functions

 IoLinkDummy (FeaDataPlaneManager &fea_data_plane_manager, const IfTree &iftree, const string &if_name, const string &vif_name, uint16_t ether_type, const string &filter_program)
 Constructor for link-level access for a given interface and vif.
virtual ~IoLinkDummy ()
 Virtual destructor.
int start (string &error_msg)
 Start operation.
int stop (string &error_msg)
 Stop operation.
int join_multicast_group (const Mac &group, string &error_msg)
 Join a multicast group on an interface.
int leave_multicast_group (const Mac &group, string &error_msg)
 Leave a multicast group on an interface.
int send_packet (const Mac &src_address, const Mac &dst_address, uint16_t ether_type, const vector< uint8_t > &payload, string &error_msg)
 Send a link-level packet.

Private Attributes

set
< IoLinkComm::JoinedMulticastGroup
_joined_groups_table

Detailed Description

A base class for Dummy I/O link raw communication.

Each protocol 'registers' for link raw I/O per interface and vif and gets assigned one object (per interface and vif) of this class.


Constructor & Destructor Documentation

IoLinkDummy::IoLinkDummy ( FeaDataPlaneManager fea_data_plane_manager,
const IfTree iftree,
const string &  if_name,
const string &  vif_name,
uint16_t  ether_type,
const string &  filter_program 
)

Constructor for link-level access for a given interface and vif.

Parameters:
fea_data_plane_managerthe corresponding data plane manager (FeaDataPlaneManager).
iftreethe interface tree to use.
if_namethe interface name.
vif_namethe vif name.
ether_typethe EtherType protocol number. If it is 0 then it is unused.
filter_programthe optional filter program to be applied on the received packets. The program uses tcpdump(1) style expression.

Member Function Documentation

int IoLinkDummy::join_multicast_group ( const Mac group,
string &  error_msg 
) [virtual]

Join a multicast group on an interface.

Parameters:
groupthe multicast group to join.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implements IoLink.

int IoLinkDummy::leave_multicast_group ( const Mac group,
string &  error_msg 
) [virtual]

Leave a multicast group on an interface.

Parameters:
groupthe multicast group to leave.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implements IoLink.

int IoLinkDummy::send_packet ( const Mac src_address,
const Mac dst_address,
uint16_t  ether_type,
const vector< uint8_t > &  payload,
string &  error_msg 
) [virtual]

Send a link-level packet.

Parameters:
src_addressthe MAC source address.
dst_addressthe MAC destination address.
ether_typethe EtherType protocol number.
payloadthe payload, everything after the MAC header.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implements IoLink.

int IoLinkDummy::start ( string &  error_msg) [virtual]

Start operation.

Parameters:
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implements IoLink.

int IoLinkDummy::stop ( string &  error_msg) [virtual]

Stop operation.

Parameters:
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implements IoLink.


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