class IoLink

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

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Methods

Protected Methods

Protected Members


Detailed Description

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

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

IoLink

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.
 ~IoLink ()

~IoLink

[virtual]

Virtual destructor.

IoLinkManager&  io_link_manager ()

io_link_manager

Get the IoLinkManager instance.

Returns: the IoLinkManager instance.

FeaDataPlaneManager&  fea_data_plane_manager ()

fea_data_plane_manager

Get the FeaDataPlaneManager instance.

Returns: the FeaDataPlaneManager instance.

bool  is_running ()

is_running

[const virtual]

Test whether this instance is running.

Returns: true if the instance is running, otherwise false.

EventLoop&  eventloop ()

eventloop

Get the event loop.

Returns: the event loop.

const IfTree&  iftree ()

iftree

[const]

Get the interface tree.

Returns: the interface tree.

const string&  if_name ()

if_name

[const virtual]

Get the interface name.

Returns: the interface name.

const string&  vif_name ()

vif_name

[const virtual]

Get the vif name.

Returns: the vif name.

uint16_t  ether_type ()

ether_type

[const virtual]

Get the EtherType protocol number.

Returns: the EtherType protocol number. If it is 0 then it is unused.

const string&  filter_program ()

filter_program

[const]

Get the optional filter program.

Returns: the optional filter program to be applied on the received packets.

IoLinkReceiver*  io_link_receiver ()

io_link_receiver

Get the registered receiver.

Returns: the registered receiver.

void  register_io_link_receiver (IoLinkReceiver* io_link_receiver)

register_io_link_receiver

[virtual]

Register the I/O Link raw packets receiver.

Parameters:

io_link_receiverthe receiver to register.
void  unregister_io_link_receiver ()

unregister_io_link_receiver

[virtual]

Unregister the I/O Link raw packets receiver.

int  start (string& error_msg)

start

[pure virtual]

Start operation.

Parameters:

error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  stop (string& error_msg)

stop

[pure virtual]

Stop operation.

Parameters:

error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  join_multicast_group (const Mac& group, string& error_msg)

join_multicast_group

[pure 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.

int  leave_multicast_group (const Mac& group, string& error_msg)

leave_multicast_group

[pure 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.

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

[pure 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.

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_enabledif true, trace log is enabled, otherwise is disabled.
void  recv_packet (const Mac& src_address, const Mac& dst_address, uint16_t ether_type, const vector<uint8_t>& payload)

recv_packet

[protected virtual]

Received a 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.
bool _is_running

_is_running

[protected]


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