class XrlIO

Concrete implementation of IO using XRLs. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Methods


Detailed Description

 XrlIO (EventLoop& eventloop, XrlRouter& xrl_router, const string& feaname, const string& ribname)

XrlIO

Construct an XrlIO instance.

Parameters:

eventloopthe event loop for the OLSR process.
xrl_routerthe name of the XRL router instance.
feanamethe name of the FEA XRL target.
ribnamethe name of the RIB XRL target.
 ~XrlIO ()

~XrlIO

Destroy an XrlIO instance.

int  startup ()

startup

Startup operation.

Returns: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from ServiceBase.

int  shutdown ()

shutdown

Shutdown operation.

Returns: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from ServiceBase.

void  component_up (string name)

component_up

Called when internal subsystem comes up.

Parameters:

namethe name of the affected subsystem
void  component_down (string name)

component_down

Called when internal subsystem goes down.

Parameters:

namethe name of the affected subsystem
void  receive (const string& sockid, const string& interface, const string& vif, const IPv4& src, const uint16_t& sport, const vector<uint8_t>& payload)

receive

Receive UDP datagrams. Specific to XrlIO.

Parameters:

sockidthe id of the socket.
interfacethe interface where received.
vifthe vif where received.
srcthe source port of the UDP datagram.
sportthe source address of the UDP datagram.
payloadthe datagram payload.
bool  send (const string& interface, const string& vif, const IPv4& src, const uint16_t& sport, const IPv4& dst, const uint16_t& dport, uint8_t* data, const uint32_t& len)

send

Send a UDP datagram on a specific link.

Parameters:

interfacethe interface to send from.
vifthe vif to send from.
srcthe IPv4 address to send from.
sportthe UDP port to send from.
dstthe IPv4 address to send to.
dportthe UDP port to send to.
datathe datagram payload.
lenthe length of the buffer @param data

Returns: true if the datagram was queued successfully, otherwise false.

Reimplemented from IO.

bool  enable_interface_vif (const string& interface, const string& vif)

enable_interface_vif

Enable the interface/vif to receive frames. XXX

Parameters:

interfacethe name of the interface to enable.
vifthe name of the vif to enable.

Returns: true if the interface/vif was enabled successfully, otherwise false.

bool  disable_interface_vif (const string& interface, const string& vif)

disable_interface_vif

Disable this interface/vif from receiving frames. XXX

Parameters:

interfacethe name of the interface to disable.
vifthe name of the vif to disable.

Returns: true if the interface/vif was disabled successfully, otherwise false.

bool  enable_address (const string& interface, const string& vif, const IPv4& address, const uint16_t& port, const IPv4& all_nodes_address)

enable_address

Enable an IPv4 address and port for OLSR datagram reception and transmission.

Parameters:

interfacethe interface to enable.
vifthe vif to enable.
addressthe address to enable.
portthe port to enable.
all_nodes_addressthe address to transmit to.

Returns: true if the address was enabled, otherwise false.

Reimplemented from IO.

bool  disable_address (const string& interface, const string& vif, const IPv4& address, const uint16_t& port)

disable_address

Disable an IPv4 address and port for OLSR datagram reception.

Parameters:

interfacethe interface to disable.
vifthe vif to disable.
addressthe address to disable.
portthe port to disable.

Returns: true if the address was disabled, otherwise false.

Reimplemented from IO.

bool  is_interface_enabled (const string& interface)

is_interface_enabled

[const]

Test whether an interface is enabled.

Parameters:

interfacethe name of the interface to test.

Returns: true if it exists and is enabled, otherwise false.

Reimplemented from IO.

bool  is_vif_enabled (const string& interface, const string& vif)

is_vif_enabled

[const]

Test whether an interface/vif is enabled.

Parameters:

interfacethe name of the interface to test.
vifthe name of the vif to test.

Returns: true if it exists and is enabled, otherwise false.

Reimplemented from IO.

bool  is_vif_broadcast_capable (const string& interface, const string& vif)

is_vif_broadcast_capable

Test whether this interface/vif is broadcast capable.

Parameters:

interfacethe interface to test.
vifthe vif to test.

Returns: true if it is broadcast capable, otherwise false.

Reimplemented from IO.

bool  is_vif_multicast_capable (const string& interface, const string& vif)

is_vif_multicast_capable

Test whether this interface/vif is multicast capable.

Parameters:

interfacethe interface to test.
vifthe vif to test.

Returns: true if it is multicast capable, otherwise false.

Reimplemented from IO.

bool  is_vif_loopback (const string& interface, const string& vif)

is_vif_loopback

Reimplemented from IO.

bool  is_address_enabled (const string& interface, const string& vif, const IPv4& address)

is_address_enabled

[const]

Test whether an interface/vif/address is enabled.

Parameters:

interfacethe name of the interface to test.
vifthe name of the vif to test.
addressthe address to test.

Returns: true if it exists and is enabled, otherwise false.

Reimplemented from IO.

bool  get_addresses (const string& interface, const string& vif, list<IPv4>& addresses)

get_addresses

[const]

Get all addresses associated with this interface/vif.

Parameters:

interfacethe name of the interface
vifthe name of the vif
addresses(out argument) list of associated addresses

Returns: true if there are no errors.

Reimplemented from IO.

bool  get_broadcast_address (const string& interface, const string& vif, IPv4& address)

get_broadcast_address

[const]

Get the broadcast address associated with this vif.

Parameters:

interfacethe name of the interface
vifthe name of the vif
address(out argument) "all nodes" address

Returns: true if there are no errors.

Reimplemented from IO.

bool  get_broadcast_address (const string& interface, const string& vif, const IPv4& address, IPv4& bcast_address)

get_broadcast_address

[const]

Get the broadcast address associated with this IPv4 address.

Parameters:

interfacethe name of the interface
vifthe name of the vif
addressIPv4 binding address
bcast_address(out argument) primary broadcast address

Returns: true if there are no errors.

Reimplemented from IO.

bool  get_interface_id (const string& interface, uint32_t& interface_id)

get_interface_id

Get the interface ID.

Parameters:

interfacethe name of the interface.
interface_idthe value if found..

Returns: true if the interface ID has been found..

Reimplemented from IO.

uint32_t  get_prefix_length (const string& interface, const string& vif, IPv4 address)

get_prefix_length

Obtain the subnet prefix length for an interface/vif/address.

Parameters:

interfacethe name of the interface.
vifthe name of the vif.
addressthe address.

Returns: the subnet prefix length for the address.

uint32_t  get_mtu (const string& interface)

get_mtu

Obtain the MTU for an interface.

Parameters:

interfacethe name of the interface.

Returns: the mtu for the interface.

Reimplemented from IO.

void  register_rib ()

register_rib

Register with the RIB.

void  unregister_rib ()

unregister_rib

Remove registration from the RIB.

void  rib_command_done (const XrlError& error, bool up, const char *comment)

rib_command_done

Callback method to: signal that an XRL command which has been sent to the RIB has returned.

Parameters:

errorthe XRL command return code.
upindicates if the RIB component has been brought up or down.
commenttext description of operation being performed.
bool  add_route (IPv4Net net, IPv4 nexthop, uint32_t nexthop_id, uint32_t metric, const PolicyTags& policytags)

add_route

Add route to RIB.

Parameters:

netnetwork
nexthop_idinterface ID towards the nexthop
metricto network
policytagspolicy info to the RIB.

Returns: true if the route add was queued successfully, otherwise false.

Reimplemented from IO.

bool  replace_route (IPv4Net net, IPv4 nexthop, uint32_t nexthop_id, uint32_t metric, const PolicyTags& policytags)

replace_route

Replace route in RIB.

Parameters:

netnetwork
nexthop_idinterface ID towards the nexthop
metricto network
policytagspolicy info to the RIB.

Returns: true if the route replacement was queued successfully, otherwise false.

Reimplemented from IO.

bool  delete_route (IPv4Net net)

delete_route

Delete route from RIB.

Parameters:

netthe destination to delete route for.

Returns: true if the route delete was queued successfully, otherwise false.

Reimplemented from IO.


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