route_map¶
Route Map management module.
Route map is a ordered set of route map entry statement that manage the redistribution of IP routes into the protocol domain and modify the attrbutes of routes.
This module provides APIs to query Route Map information.
-
namespace
eos
-
class
route_map_mgr
- #include <route_map.h>
A manager of route map configurations.
A example of the API usage is in example/RouteMapAgent.cpp
Public Functions
-
virtual
~route_map_mgr
()
-
virtual uint8_t
priority
() const = 0 Returns the priority value of eossdk route map configuration.
-
virtual void
priority_is
(uint8_t) = 0 Configures the priority value of eossdk route map configuration.
-
virtual route_map_t
route_map
(route_map_name_t const &) const = 0 Returns a eossdk route map with corresponding route map name, which contains route map entries. Returns an empty route_map_t if no matching route map was found.
-
virtual route_map_entry_t
route_map_entry
(route_map_name_t const &, route_map_sequence_number_t) const = 0 Returns a route map entry with the corresponding sequence number in corresponding route map. Returns an empty route_map_entry_t if no matching route map entry was found.
-
virtual void
route_map_set
(route_map_name_t const &, route_map_t const &) = 0 Creates or updates a route map.
-
virtual void
route_map_entry_set
(route_map_name_t const &, route_map_sequence_number_t, route_map_entry_t const &) = 0 Creates or updates a route map entry in corresponding route map.
-
virtual void
route_map_del
(route_map_name_t const &) = 0 Removes the corresponding route map from the configuration if exists.
-
virtual void
route_map_entry_del
(route_map_name_t const &, route_map_sequence_number_t) = 0 Removes the corresponding route map entry from a given route map.
Protected Functions
-
route_map_mgr
()
Private Members
-
route_map_mgr
-
virtual
-
class
Type definitions in route_map¶
-
namespace
eos
Typedefs
-
typedef std::string
route_map_name_t
-
typedef uint32_t
route_map_sequence_number_t
Enums
- bandwidth_unit_t enum
Values:
LINK_BANDWIDTH_UNIT_BIT
-LINK_BANDWIDTH_UNIT_KILOBIT
-LINK_BANDWIDTH_UNIT_MEGABIT
-LINK_BANDWIDTH_UNIT_GIGABIT
-
- route_map_operation_type_t enum
Route map extended community link bandwidth operation type.
Values:
OPERATION_TYPE_NONE
-OPERATION_TYPE_SET
-OPERATION_TYPE_DELETE
-
-
class
link_bandwidth_t
- #include <route_map.h>
Extended community link bandwidth value.
Public Functions
-
link_bandwidth_t
(float value, bandwidth_unit_t unit)
-
link_bandwidth_t
(float value)
-
link_bandwidth_t
()
-
link_bandwidth_t
(const link_bandwidth_t & other)
-
link_bandwidth_t &
operator=
(link_bandwidth_t const & other)
-
float
value
() const Getter for ‘value’: The link bandwidth value.
-
void
value_is
(float value) Setter for ‘value’.
-
bandwidth_unit_t
unit
() const Getter for ‘unit’: The link bandwidth bitrate unit.
-
void
unit_is
(bandwidth_unit_t unit) Setter for ‘unit’.
-
bool
operator==
(link_bandwidth_t const & other) const
-
bool
operator!=
(link_bandwidth_t const & other) const
-
bool
operator<
(link_bandwidth_t const & other) const
-
uint32_t
hash
() const The hash function for type link_bandwidth_t.
-
void
mix_me
(hash_mix & h) const The hash mix function for type link_bandwidth_t.
-
std::string
to_string
() const Returns a string representation of the current object’s values.
Private Members
-
std::shared_ptr< link_bandwidth_impl_t >
pimpl
Friends
-
friend std::ostream &
operator<<
A utility stream operator that adds a string representation of link_bandwidth_t to the ostream.
-
-
class
route_map_link_bandwidth_t
- #include <route_map.h>
Route map link bandwidth operation attribute information.
Public Functions
-
route_map_link_bandwidth_t
() Create route map link bandwidth.
-
route_map_link_bandwidth_t
(const route_map_link_bandwidth_t & other)
-
route_map_link_bandwidth_t &
operator=
(route_map_link_bandwidth_t const & other)
-
route_map_operation_type_t
operation
() const Getter for ‘operation’: Operation type.
-
bgp_asn_t
asn
() const Getter for ‘asn’: Peer AS number.
-
link_bandwidth_t
bandwidth
() const Getter for ‘bandwidth’: Link bandwidth value.
-
void
route_map_operation_type_set_is
(link_bandwidth_t bandwidth)
-
void
route_map_operation_type_delete_is
(link_bandwidth_t bandwidth, bgp_asn_t asn)
-
bool
operator==
(route_map_link_bandwidth_t const & other) const
-
bool
operator!=
(route_map_link_bandwidth_t const & other) const
-
bool
operator<
(route_map_link_bandwidth_t const & other) const
-
uint32_t
hash
() const The hash function for type route_map_link_bandwidth_t.
-
void
mix_me
(hash_mix & h) const The hash mix function for type route_map_link_bandwidth_t.
-
std::string
to_string
() const Returns a string representation of the current object’s values.
Private Members
-
std::shared_ptr< route_map_link_bandwidth_impl_t >
pimpl
Friends
-
friend std::ostream &
operator<<
A utility stream operator that adds a string representation of route_map_link_bandwidth_t to the ostream.
-
-
class
route_map_entry_t
- #include <route_map.h>
Route map entry sequence.
Public Functions
-
route_map_entry_t
()
-
route_map_entry_t
(bool permit)
-
route_map_entry_t
(const route_map_entry_t & other)
-
route_map_entry_t &
operator=
(route_map_entry_t const & other)
-
bool
permit
() const Getter for ‘permit’: Permit sequence entry when true, deny otherwise.
-
void
permit_is
(bool permit) Setter for ‘permit’.
-
route_map_sequence_number_t
continue_sequence
() const Getter for ‘continue_sequence’: Continue to a different map entry. Set to 0 for deletion.
-
void
continue_sequence_is
(route_map_sequence_number_t continue_sequence) Setter for ‘continue_sequence’.
-
route_map_link_bandwidth_t
link_bandwidth
() const Getter for ‘link_bandwidth’: BGP extended community link bandwidth attribute.
-
void
link_bandwidth_is
(route_map_link_bandwidth_t const & link_bandwidth) Setter for ‘link_bandwidth’.
-
void
link_bandwidth_del
() Remove the link bandwidth configuration.
-
bool
operator==
(route_map_entry_t const & other) const
-
bool
operator!=
(route_map_entry_t const & other) const
-
uint32_t
hash
() const The hash function for type route_map_entry_t.
-
void
mix_me
(hash_mix & h) const The hash mix function for type route_map_entry_t.
-
std::string
to_string
() const Returns a string representation of the current object’s values.
Private Members
-
std::shared_ptr< route_map_entry_impl_t >
pimpl
Friends
-
friend std::ostream &
operator<<
A utility stream operator that adds a string representation of route_map_entry_t to the ostream.
-
-
class
route_map_t
Public Functions
-
route_map_t
()
-
route_map_t
(const route_map_t & other)
-
route_map_t &
operator=
(route_map_t const & other)
-
std::map< route_map_sequence_number_t, route_map_entry_t > const &
map_entry
() const Getter for ‘map_entry’: A map of route map entries, keyed by sequence number.
-
void
map_entry_is
(std::map< route_map_sequence_number_t, route_map_entry_t > const & map_entry) Setter for ‘map_entry’.
-
void
map_entry_set
(route_map_sequence_number_t const & key, route_map_entry_t const & value) Inserts key/value pair to the map.
-
void
map_entry_del
(route_map_sequence_number_t const & key) Deletes the key/value pair from the map.
-
bool
operator==
(route_map_t const & other) const
-
bool
operator!=
(route_map_t const & other) const
-
uint32_t
hash
() const The hash function for type route_map_t.
-
void
mix_me
(hash_mix & h) const The hash mix function for type route_map_t.
-
std::string
to_string
() const Returns a string representation of the current object’s values.
Private Members
-
std::shared_ptr< route_map_impl_t >
pimpl
Friends
-
friend std::ostream &
operator<<
A utility stream operator that adds a string representation of route_map_t to the ostream.
-
-
typedef std::string