|
|
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.
inline XrlPortManager (System<A>& system,
XrlRouter& xr,
IfMgrXrlMirror& ifm)
| XrlPortManager |
~XrlPortManager ()
| ~XrlPortManager |
bool startup ()
| startup |
Request start up of instance.
Returns: true on success, false on failure.
Reimplemented from ServiceBase.
bool shutdown ()
| shutdown |
Request shutdown of instance.
Returns: true on success, false on failure.
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:
interface | to run RIP on. |
vif | virtual interface to run RIP on. |
addr | address 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:
interface | to run RIP on. |
vif | virtual interface to run RIP on. |
addr | address 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 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:
sockid | unique socket identifier. |
src_addr | source address of packet. |
src_port | source port of packet. |
pdata | packet 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.
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]