class XrlPortManager

Class for managing RIP Ports and their transport systems. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Methods

Protected Methods

Protected Members


Detailed Description

The XrlPortManager class instantiates RIP Port instances and their transport system. The methods add_rip_address and remove_rip_address cause Port objects and XrlPortIO objects to be instantiated and destructed.

The deliver_packet method forwards an arriving packet to the appropriate XrlPortIO object.

 XrlPortManager (System<A>& system, XrlRouter& xr, IfMgrXrlMirror& ifm)

XrlPortManager

 ~XrlPortManager ()

~XrlPortManager

int  startup ()

startup

Request start up of instance.

Returns: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from ServiceBase.

int  shutdown ()

shutdown

Request shutdown of instance.

Returns: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from ServiceBase.

bool  add_rip_address (const string& ifname, const string& vifname, const A& addr)

add_rip_address

Request the addition of an address to run RIP on. If the address is known to exist on the specified interface and vif, a request is sent to the FEA to create an appropriately bound RIP socket.

Parameters:

interfaceto run RIP on.
vifvirtual interface to run RIP on.
addraddress to run RIP on.

Returns: true on success or if address is already running RIP, false on failure.

bool  remove_rip_address (const string& ifname, const string& vifname, const A& addr)

remove_rip_address

Remove an address running RIP.

Parameters:

interfaceto run RIP on.
vifvirtual interface to run RIP on.
addraddress to run RIP on.

Returns: true on success or if address is not running RIP, false on otherwise.

bool  deliver_packet (const string& sockid, const string& ifname, const string& vifname, const A& src_addr, uint16_t src_port, const vector<uint8_t>& pdata)

deliver_packet

Deliver packet to RIP port associated with socket id that received the packet.

Parameters:

sockidunique socket identifier.
ifnamethe interface name the packet arrived on, if known. If unknown, then it is an empty string.
vifnamethe vif name the packet arrived on, if known. If unknown, then it is an empty string.
src_addrsource address of packet.
src_portsource port of packet.
pdatapacket data.

Returns: true if packet delivered, false if the owner of the sockid can not be found.

Port<A>*  find_port (const string& ifname, const string& vifname, const A& addr)

find_port

Find RIP port associated with interface, vif, address tuple.

Returns: pointer to port on success, 0 if port could not be found.

const Port<A>*  find_port (const string& ifname, const string& vifname, const A& addr)

find_port

[const]

Find RIP port associated with interface, vif, address tuple.

Returns: pointer to port on success, 0 if port could not be found.

bool  underlying_rip_address_up (const string& ifname, const string& vifname, const A& addr)

underlying_rip_address_up

[const]

Determine if rip address is up. The result is based on the current state of information from the FEA.

Returns: true if the address is up, false if the address is not up or does not exist.

bool  underlying_rip_address_exists (const string& ifname, const string& vifname, const A& addr)

underlying_rip_address_exists

[const]

Determine if rip address exists. The result is based on the current state of information from the FEA.

Returns: true if the address is up, false if the address is not up or does not exist.

Trace&  packet_trace ()

packet_trace

void  tree_complete ()

tree_complete

[protected]

Reimplemented from IfMgrHintObserver.

void  updates_made ()

updates_made

[protected]

Reimplemented from IfMgrHintObserver.

void  status_change (ServiceBase* service, ServiceStatus old_status, ServiceStatus new_status)

status_change

[protected]

Reimplemented from ServiceChangeObserverBase.

void  try_start_next_io_handler ()

try_start_next_io_handler

[protected]

XrlRouter& _xr

_xr

[protected]

IfMgrXrlMirror& _ifm

_ifm

[protected]

map<ServiceBase*, Port<A>*> _dead_ports

_dead_ports

[protected]


Generated by: pavlin on kobe.xorp.net on Wed Jan 7 19:11:10 2009, using kdoc 2.0a54+XORP.