class IoLinkComm

A class that handles raw link I/O communication for a specific protocol. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Types

Public Methods


Detailed Description

A class that handles raw link I/O communication for a specific protocol.

It also allows arbitrary filters to receive the raw link-level data for that protocol.

InputFilter (class)

InputFilter

Filter class.

JoinedMulticastGroup (class)

JoinedMulticastGroup

Joined multicast group class.

 IoLinkComm (IoLinkManager& io_link_manager, const IfTree& iftree, const string& if_name, const string& vif_name, uint16_t ether_type, const string& filter_program)

IoLinkComm

Constructor for IoLinkComm.

Parameters:

io_link_managerthe corresponding I/O Link manager (IoLinkManager).
iftreethe interface tree to use.
if_namethe interface name.
vif_namethe vif name.
ether_typethe EtherType protocol number.
filter_programthe optional filter program to be applied on the received packets.
 ~IoLinkComm ()

~IoLinkComm

[virtual]

Virtual destructor.

void  allocate_io_link_plugins ()

allocate_io_link_plugins

Allocate the I/O Link plugins (one per data plane manager).

void  deallocate_io_link_plugins ()

deallocate_io_link_plugins

Deallocate the I/O Link plugins (one per data plane manager).

void  allocate_io_link_plugin (FeaDataPlaneManager* fea_data_plane_manager)

allocate_io_link_plugin

Allocate an I/O Link plugin for a given data plane manager.

Parameters:

fea_data_plane_managerthe data plane manager.
void  deallocate_io_link_plugin (FeaDataPlaneManager* fea_data_plane_manager)

deallocate_io_link_plugin

Deallocate the I/O Link plugin for a given data plane manager.

Parameters:

fea_data_plane_managerthe data plane manager.
void  start_io_link_plugins ()

start_io_link_plugins

Start all I/O Link plugins.

void  stop_io_link_plugins ()

stop_io_link_plugins

Stop all I/O Link plugins.

int  add_filter (InputFilter* filter)

add_filter

Add a filter to list of input filters.

The IoLinkComm class assumes that the callee will be responsible for managing the memory associated with the filter and will call remove_filter() if the filter is deleted or goes out of scope.

Parameters:

filterthe filter to add.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  remove_filter (InputFilter* filter)

remove_filter

Remove filter from list of input filters.

Parameters:

filterthe filter to remove.

Returns: XORP_OK on success, otherwise XORP_ERROR.

bool  no_input_filters ()

no_input_filters

[const]

Returns: true if there are no filters associated with this instance.

int  send_packet (const Mac& src_address, const Mac& dst_address, uint16_t ether_type, const vector<uint8_t>& payload, string& error_msg)

send_packet

Send a raw 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.

void  recv_packet (const Mac& src_address, const Mac& dst_address, uint16_t ether_type, const vector<uint8_t>& payload)

recv_packet

[virtual]

Received a raw link-level packet.

Parameters:

src_addressthe MAC source address.
dst_addressthe MAC destination address.
ether_typethe EtherType protocol number.
packetthe payload, everything after the MAC header.

Reimplemented from IoLinkReceiver.

int  join_multicast_group (const Mac& group_address, const string& receiver_name, string& error_msg)

join_multicast_group

Join a MAC multicast group.

Parameters:

group_addressthe multicast group address to join.
receiver_namethe name of the receiver.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  leave_multicast_group (const Mac& group_address, const string& receiver_name, string& error_msg)

leave_multicast_group

Leave a MAC multicast group.

Parameters:

group_addressthe multicast group address to leave.
receiver_namethe name of the receiver.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

const string&  if_name ()

if_name

[const]

Get the interface name.

Returns: the interface name.

const string&  vif_name ()

vif_name

[const]

Get the vif name.

Returns: the vif name.

uint16_t  ether_type ()

ether_type

[const]

Get the EtherType protocol number.

Returns: the EtherType protocol number.

const string&  filter_program ()

filter_program

[const]

Get the filter program.

Returns: the filter program.


Generated by: bms on anglepoise.lon.incunabulum.net on Wed Jul 23 10:05:50 2008, using kdoc 2.0a54+XORP.