class Ospf


 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Methods


Detailed Description

 Ospf (OspfTypes::Version version, EventLoop& eventloop, IO<A>* io)

Ospf

OspfTypes::Version  version ()

version

Returns: version of OSPF this implementation represents.

bool  running ()

running

Returns: true if ospf should still be running.

ProcessStatus  status (string& reason)

status

Status of process.

void  shutdown ()

shutdown

Shutdown OSPF.

bool  transmit (const string& interface, const string& vif, A dst, A src, uint8_t* data, uint32_t len)

transmit

Used to send traffic on the IO interface.

void  receive (const string& interface, const string& vif, A dst, A src, uint8_t* data, uint32_t len)

receive

The callback method that is called when data arrives on the IO interface.

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

enable_interface_vif

Enable the interface/vif to receive frames.

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

disable_interface_vif

Disable this interface/vif from receiving frames.

bool  enabled (const string& interface, const string& vif, A address)

enabled

Is this interface/vif/address enabled? This is a question asked of the FEA, has the interface/vif been marked as up.

Returns: true if it is.

void  register_address_status (typename IO<A>::AddressStatusCb cb)

register_address_status

Add a callback for tracking the interface/vif/address status.

The callback will be invoked whenever the status of the tuple (interface, vif, address) is changed from disabled to enabled or vice-versa.

Parameters:

cbthe callback to register.
bool  get_addresses (const string& interface, const string& vif, list<A>& 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.

bool  get_link_local_address (const string& interface, const string& vif, A& address)

get_link_local_address

Get a link local address for this interface/vif if available.

Parameters:

interfacethe name of the interface
vifthe name of the vif
address(out argument) set if address is found.

Returns: true if a link local address is available.

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

get_interface_id

Get the interface ID required for OSPFv3. The vif argument is required for virtual links.

bool  get_interface_vif_by_interface_id (uint32_t interface_id, string& interface, string& vif)

get_interface_vif_by_interface_id

Given an interface ID return the interface and vif.

bool  get_prefix_length (const string& interface, const string& vif, A address, uint16_t& prefix_length)

get_prefix_length

Returns: prefix length for this address.

uint32_t  get_mtu (const string& interface)

get_mtu

Returns: the mtu for this interface.

bool  join_multicast_group (const string& interface, const string& vif, A mcast)

join_multicast_group

On the interface/vif join this multicast group.

bool  leave_multicast_group (const string& interface, const string& vif, A mcast)

leave_multicast_group

On the interface/vif leave this multicast group.

bool  set_hello_interval (const string& interface, const string& vif, OspfTypes::AreaID area, uint16_t hello_interval)

set_hello_interval

Set the hello interval in seconds.

bool  set_options (const string& interface, const string& vif, OspfTypes::AreaID area, uint32_t options)

set_options

Set options.

bool  create_virtual_link (OspfTypes::RouterID rid)

create_virtual_link

Create a virtual link

Parameters:

ridneighbours router ID.
bool  delete_virtual_link (OspfTypes::RouterID rid)

delete_virtual_link

Delete a virtual link

Parameters:

ridneighbours router ID.
bool  transit_area_virtual_link (OspfTypes::RouterID rid, OspfTypes::AreaID transit_area)

transit_area_virtual_link

Attach this transit area to the neighbours router ID.

bool  set_router_priority (const string& interface, const string& vif, OspfTypes::AreaID area, uint8_t priority)

set_router_priority

Set router priority.

bool  set_router_dead_interval (const string& interface, const string& vif, OspfTypes::AreaID area, uint32_t router_dead_interval)

set_router_dead_interval

Set the router dead interval in seconds.

bool  set_interface_cost (const string& interface, const string& vif, OspfTypes::AreaID area, uint16_t interface_cost)

set_interface_cost

Set the interface cost.

bool  set_retransmit_interval (const string& interface, const string& vif, OspfTypes::AreaID area, uint16_t retransmit_interval)

set_retransmit_interval

Set the RxmtInterval.

bool  set_inftransdelay (const string& interface, const string& vif, OspfTypes::AreaID area, uint16_t inftransdelay)

set_inftransdelay

Set InfTransDelay

bool  set_simple_authentication_key (const string& interface, const string& vif, OspfTypes::AreaID area, const string& password, string& error_msg)

set_simple_authentication_key

Set a simple password authentication key.

Note that the current authentication handler is replaced with a simple password authentication handler.

Parameters:

interfacethe interface name.
vifthe vif name.
areathe area ID.
passwordthe password to set.
theerror message (if error).

Returns: true on success, otherwise false.

bool  delete_simple_authentication_key (const string& interface, const string& vif, OspfTypes::AreaID area, string& error_msg)

delete_simple_authentication_key

Delete a simple password authentication key.

Note that after the deletion the simple password authentication handler is replaced with a Null authentication handler.

Parameters:

interfacethe interface name.
vifthe vif name.
areathe area ID.
theerror message (if error).

Returns: true on success, otherwise false.

bool  set_md5_authentication_key (const string& interface, const string& vif, OspfTypes::AreaID area, uint8_t key_id, const string& password, const TimeVal& start_timeval, const TimeVal& end_timeval, const TimeVal& max_time_drift, string& error_msg)

set_md5_authentication_key

Set an MD5 authentication key.

Note that the current authentication handler is replaced with an MD5 authentication handler.

Parameters:

interfacethe interface name.
vifthe vif name.
areathe area ID.
key_idunique ID associated with key.
passwordphrase used for MD5 digest computation.
start_timevalstart time when key becomes valid.
end_timevalend time when key becomes invalid.
max_time_driftthe maximum time drift among all routers.
theerror message (if error).

Returns: true on success, otherwise false.

bool  delete_md5_authentication_key (const string& interface, const string& vif, OspfTypes::AreaID area, uint8_t key_id, string& error_msg)

delete_md5_authentication_key

Delete an MD5 authentication key.

Note that after the deletion if there are no more valid MD5 keys, the MD5 authentication handler is replaced with a Null authentication handler.

Parameters:

interfacethe interface name.
vifthe vif name.
areathe area ID.
key_idthe ID of the key to delete.
theerror message (if error).

Returns: true on success, otherwise false.

bool  set_passive (const string& interface, const string& vif, OspfTypes::AreaID area, bool passive)

set_passive

Toggle the passive status of an interface.

bool  originate_default_route (OspfTypes::AreaID area, bool enable)

originate_default_route

If this is a "stub" or "nssa" area toggle the sending of a default route.

bool  stub_default_cost (OspfTypes::AreaID area, uint32_t cost)

stub_default_cost

Set the StubDefaultCost, the default cost sent in a default route in a "stub" or "nssa" area.

bool  summaries (OspfTypes::AreaID area, bool enable)

summaries

Toggle the sending of summaries into "stub" or "nssa" areas.

bool  set_ip_router_alert (bool alert)

set_ip_router_alert

Send router alerts in IP packets or not.

bool  area_range_add (OspfTypes::AreaID area, IPNet<A> net, bool advertise)

area_range_add

Add area range.

bool  area_range_delete (OspfTypes::AreaID area, IPNet<A> net)

area_range_delete

Delete area range.

bool  area_range_change_state (OspfTypes::AreaID area, IPNet<A> net, bool advertise)

area_range_change_state

Change the advertised state of this area.

bool  get_lsa (const OspfTypes::AreaID area, const uint32_t index, bool& valid, bool& toohigh, bool& self, vector<uint8_t>& lsa)

get_lsa

Get a single lsa from an area. A stateless mechanism to get LSAs. The client of this interface should start from zero and continue to request LSAs (incrementing index) until toohigh becomes true.

Parameters:

areadatabase that is being searched.
indexinto database starting from 0.
validtrue if a LSA has been returned. Some index values do not contain LSAs. This should not be considered an error.
toohightrue if no more LSA exist after this index.
selfif true this LSA was originated by this router.
lsaif valid is true the LSA at index.
bool  get_area_list (list<OspfTypes::AreaID>& areas)

get_area_list

[const]

Get a list of all the configured areas.

bool  get_neighbour_list (list<OspfTypes::NeighbourID>& neighbours)

get_neighbour_list

[const]

Get a list of all the neighbours.

bool  get_neighbour_info (OspfTypes::NeighbourID nid, NeighbourInfo& ninfo)

get_neighbour_info

[const]

Get state information about this neighbour.

Parameters:

nidneighbour information is being request about.
ninfoif neighbour is found its information.
bool  add_route (IPNet<A> net, A nexthop, uint32_t nexthop_id, uint32_t metric, bool equal, bool discard, const PolicyTags& policytags)

add_route

Add route

Parameters:

netnetwork
nexthop_idinterface ID towards the nexthop
metricto network
equaltrue if this in another route to the same destination.
discardtrue if this is a discard route.
policytagspolicy info to the RIB.
bool  replace_route (IPNet<A> net, A nexthop, uint32_t nexthop_id, uint32_t metric, bool equal, bool discard, const PolicyTags& policytags)

replace_route

Replace route

Parameters:

netnetwork
nexthop_idinterface ID towards the nexthop
metricto network
equaltrue if this in another route to the same destination.
discardtrue if this is a discard route.
policytagspolicy info to the RIB.
bool  delete_route (IPNet<A> net)

delete_route

Delete route

void  configure_filter (const uint32_t& filter, const string& conf)

configure_filter

Configure a policy filter

Parameters:

filterId of filter to configure.
confConfiguration of filter.
void  reset_filter (const uint32_t& filter)

reset_filter

Reset a policy filter.

Parameters:

filterId of filter to reset.
void  push_routes ()

push_routes

Push routes through policy filters for re-filtering.

bool  originate_route (const IPNet<A>& net, const A& nexthop, const uint32_t& metric, const PolicyTags& policytags)

originate_route

Originate a route.

Parameters:

netto announce
nexthopto forward to
policytagspolicy-tags associated with route.

Returns: true on success

bool  withdraw_route (const IPNet<A>& net)

withdraw_route

Withdraw a route.

Parameters:

netto withdraw

Returns: true on success

OspfTypes::Version  get_version ()

get_version

[const]

Get the current OSPF version.

EventLoop&  get_eventloop ()

get_eventloop

Returns: a reference to the eventloop, required for timers etc...

void  set_testing (bool testing)

set_testing

The test status of OSPF.

bool  get_testing ()

get_testing

[const]

Returns: true if OSPF is being tested.

PeerManager<A>&  get_peer_manager ()

get_peer_manager

Returns: a reference to the PeerManager.

RoutingTable<A>&  get_routing_table ()

get_routing_table

Returns: a reference to the RoutingTable.

LsaDecoder&  get_lsa_decoder ()

get_lsa_decoder

Returns: a reference to the LSA decoder.

PolicyFilters&  get_policy_filters ()

get_policy_filters

Returns: a reference to the policy filters

uint8_t  get_instance_id ()

get_instance_id

[const]

Get the Instance ID.

void  set_instance_id (uint8_t instance_id)

set_instance_id

Set the Instance ID.

OspfTypes::RouterID  get_router_id ()

get_router_id

[const]

Get the Router ID.

void  set_router_id (OspfTypes::RouterID id)

set_router_id

Set the Router ID.

bool  get_rfc1583_compatibility ()

get_rfc1583_compatibility

[const]

Get RFC 1583 compatibility.

void  set_rfc1583_compatibility (bool compatibility)

set_rfc1583_compatibility

Set RFC 1583 compatibility.

Trace&  trace ()

trace


Generated by: pavlin on possum.icir.org on Wed Mar 21 11:23:58 2007, using kdoc $.