nexthop_group_impl

Warning

doxygenfile: Cannot find file “eos/nexthop_group_impl.h

Type definitions in nexthop_group_impl

namespace eos
class nexthop_group_mpls_action_impl_t
#include <nexthop_group_impl.h>

An MPLS nexthop group switching operation.

This structure combines a stack of labels and an MPLS switching operation using those labels, such as eos::MPLS_ACTION_PUSH.

Public Functions

nexthop_group_mpls_action_impl_t()

Default constructor.

nexthop_group_mpls_action_impl_t(mpls_action_t action_type)

Constructs an MPLS action with a specific switching operation.

nexthop_group_mpls_action_impl_t(mpls_action_t action_type, std::forward_list< mpls_label_t > const & label_stack)

Constructs a populated MPLS label stack for some switching action.

mpls_action_t action_type() const

Getter for ‘action_type’: the MPLS switching operation for this action.

void action_type_is(mpls_action_t action_type)

Setter for ‘action_type’.

std::forward_list< mpls_label_t > const & label_stack() const

Getter for ‘label_stack’: the MPLS label stack.

The first element in iteration order is the innermost label, the last element in iteration order is the outermost label. When using std::forward_list< eos::mpls_label_t >::push_front to build the label stack, the first element pushed will be the outermost label, also known as top of stack.

void label_stack_is(std::forward_list< mpls_label_t > const & label_stack)

Setter for ‘label_stack’.

void label_stack_set(mpls_label_t const & label_stack)

Prepend one label_stack to the list.

void label_stack_del(mpls_label_t const & label_stack)

Remove all matching label_stack elements.

bool operator==(nexthop_group_mpls_action_impl_t const & other) const
bool operator!=(nexthop_group_mpls_action_impl_t const & other) const
bool operator<(nexthop_group_mpls_action_impl_t const & other) const
uint32_t hash() const

The hash function for type nexthop_group_mpls_action_t.

void mix_me(hash_mix & h) const

The hash mix function for type nexthop_group_mpls_action_t.

std::string to_string() const

Returns a string representation of the current object’s values.

Private Members

mpls_action_t action_type_
std::forward_list< mpls_label_t > label_stack_

Friends

friend std::ostream & operator<<

A utility stream operator that adds a string representation of nexthop_group_mpls_action_t to the ostream.

class nexthop_group_entry_counter_impl_t
#include <nexthop_group_impl.h>

Defines counter for a nexthop entry.

Public Functions

nexthop_group_entry_counter_impl_t()
nexthop_group_entry_counter_impl_t(uint64_t packets, uint64_t bytes, bool valid)
uint64_t packets() const
uint64_t bytes() const
bool valid() const
bool operator==(nexthop_group_entry_counter_impl_t const & other) const
bool operator!=(nexthop_group_entry_counter_impl_t const & other) const
bool operator<(nexthop_group_entry_counter_impl_t const & other) const
uint32_t hash() const

The hash function for type nexthop_group_entry_counter_t.

void mix_me(hash_mix & h) const

The hash mix function for type nexthop_group_entry_counter_t.

std::string to_string() const

Returns a string representation of the current object’s values.

Private Members

uint64_t packets_
uint64_t bytes_
bool valid_

Friends

friend std::ostream & operator<<

A utility stream operator that adds a string representation of nexthop_group_entry_counter_t to the ostream.

class nexthop_group_entry_impl_t
#include <nexthop_group_impl.h>

A nexthop group destination entry.

An entry consists of a nexthop IP address, and optionally an MPLS label switching operation.

Public Functions

nexthop_group_entry_impl_t()
nexthop_group_entry_impl_t(ip_addr_t const & nexthop)
nexthop_group_entry_impl_t(ip_addr_t const & nexthop, intf_id_t const & intf)
nexthop_group_entry_impl_t(std::string const & child_nexthop_group)
nexthop_group_mpls_action_t mpls_action() const

Getter for ‘mpls_action’: MPLS label switching stack for this entry.

void mpls_action_is(nexthop_group_mpls_action_t const & mpls_action)

Setter for ‘mpls_action’.

ip_addr_t nexthop() const

Getter for ‘nexthop’: the next hop IP address for this entry.

void nexthop_is(ip_addr_t const & nexthop)

Setter for ‘nexthop’.

intf_id_t intf() const

Getter for ‘intf’: the next hop egress interface.

void intf_is(intf_id_t const & intf)

Setter for ‘intf’.

std::string child_nexthop_group() const

Getter for ‘child_nexthop_group’: the name of next level nexthop-group.

void child_nexthop_group_is(std::string const & child_nexthop_group)

Setter for ‘child_nexthop_group’.

bool operator==(nexthop_group_entry_impl_t const & other) const
bool operator!=(nexthop_group_entry_impl_t const & other) const
bool operator<(nexthop_group_entry_impl_t const & other) const
uint32_t hash() const

The hash function for type nexthop_group_entry_t.

void mix_me(hash_mix & h) const

The hash mix function for type nexthop_group_entry_t.

std::string to_string() const

Returns a string representation of the current object’s values.

Private Members

nexthop_group_mpls_action_t mpls_action_
ip_addr_t nexthop_
intf_id_t intf_
std::string child_nexthop_group_

Friends

friend std::ostream & operator<<

A utility stream operator that adds a string representation of nexthop_group_entry_t to the ostream.

class nexthop_group_impl_t
#include <nexthop_group_impl.h>

A nexthop group.

A nexthop group represents encapsulation and IP addressing information to be used with a policy routing application.

Public Functions

nexthop_group_impl_t()
nexthop_group_impl_t(std::string name, nexthop_group_encap_t type)
nexthop_group_impl_t(std::string name, nexthop_group_encap_t type, nexthop_group_gre_key_t gre_key_type)
nexthop_group_impl_t(std::string name, ip_addr_t const & source_ip)
nexthop_group_impl_t(std::string name, ip_addr_t const & source_ip, std::map< uint16_t, nexthop_group_entry_t > const & nexthops)
std::string name() const

Getter for ‘name’: the unique name of the nexthop group.

nexthop_group_encap_t type() const

Getter for ‘type’: the type of packet encapsulation used on the group.

nexthop_group_gre_key_t gre_key_type() const

Getter for ‘gre_key_type’: the key of the GRE tunnel.

uint16_t ttl() const

Getter for ‘ttl’: the TTL set in frame headers of IP-in-IP or GRE tunnels.

void ttl_is(uint16_t ttl)

Setter for ‘ttl’.

ip_addr_t source_ip() const

Getter for ‘source_ip’: the source IP used on frames sent on this group.

void source_ip_is(ip_addr_t const & source_ip)

Setter for ‘source_ip’.

intf_id_t source_intf() const

Getter for ‘source_intf’: the source interface to use.

void source_intf_is(intf_id_t source_intf)

Setter for ‘source_intf’.

bool autosize() const

Getter for ‘autosize’: Dynamic resizing configuration for the nexthop group. When set, unresolved entries from the nexthop group are not programmed into hardware, and packets will be hashed across the remaining reachable entries in the group. Disabled (i.e. set to false) by default.

void autosize_is(bool autosize)

Setter for ‘autosize’.

uint16_t size() const

Utility method to return the number of entries configured in the nexthop group.

std::map< uint16_t, nexthop_group_entry_t > const & nexthops() const

Getter for ‘nexthops’: array index to nexthop group entry map.

void nexthops_is(std::map< uint16_t, nexthop_group_entry_t > const & nexthops)

Setter for ‘nexthops’.

void nexthop_set(uint16_t key, nexthop_group_entry_t const & value)

Inserts key/value pair to the map.

void nexthop_del(uint16_t key)

Deletes the key/value pair from the map.

std::map< uint16_t, ip_addr_t > const & destination_ips() const

Getter for ‘destination_ips’: array index to IP address map.

void destination_ips_is(std::map< uint16_t, ip_addr_t > const & destination_ips)

Setter for ‘destination_ips’.

void destination_ip_set(uint16_t key, ip_addr_t const & value)

Inserts key/value pair to the map.

void destination_ip_del(uint16_t key)

Deletes the key/value pair from the map.

bool counters_unshared() const

Getter for ‘counters_unshared’: Defines whether entry counters are unshared for the nexthop group. When set, do not share counter values between entries that share the same tunnel destination. Each entry will have its own unique counter. Disabled (i.e. set to false) by default.

void counters_unshared_is(bool counters_unshared)

Setter for ‘counters_unshared’.

bool hierarchical_fecs_enabled() const

Getter for ‘hierarchical_fecs_enabled’: Enableing hierarchical fec resolution for programming nexthop group entries. If this flag is true, the entry resolved over a remote nexthop will be programmed hierarchically in the hardware, i.e., the entry is pointing to another FEC which resolves over other nexthops. If the flag is false, the entry resolved over a remote nexthop will be programmed with the final resolved nexthop directly. In case the remote nexthop is resolved over ECMP of nexthops one of the ECMP nexthops is chosen to be programmed for the entry, in order to maintain the size of the nexthop group. This flag is also required to be set to true in order to configure entries resolving over other nexthop groups. The flag is disabled (i.e set to false) by default.

void hierarchical_fecs_enabled_is(bool hierarchical_fecs_enabled)

Setter for ‘hierarchical_fecs_enabled’.

bool operator==(nexthop_group_impl_t const & other) const
bool operator!=(nexthop_group_impl_t const & other) const
bool operator<(nexthop_group_impl_t const & other) const
uint32_t hash() const

The hash function for type nexthop_group_t.

void mix_me(hash_mix & h) const

The hash mix function for type nexthop_group_t.

std::string to_string() const

Returns a string representation of the current object’s values.

Private Members

std::string name_
nexthop_group_encap_t type_
nexthop_group_gre_key_t gre_key_type_
uint16_t ttl_
ip_addr_t source_ip_
intf_id_t source_intf_
bool autosize_
std::map< uint16_t, nexthop_group_entry_t > nexthops_
std::map< uint16_t, ip_addr_t > destination_ips_
bool counters_unshared_
bool hierarchical_fecs_enabled_

Friends

friend std::ostream & operator<<

A utility stream operator that adds a string representation of nexthop_group_t to the ostream.