ip_route_impl

Warning

doxygenfile: Cannot find file “eos/ip_route_impl.h

Type definitions in ip_route_impl

namespace eos
class ip_route_key_impl_t
#include <ip_route_impl.h>

An IP route key, consisting of a prefix and preference.

Public Functions

ip_route_key_impl_t()
ip_route_key_impl_t(ip_prefix_t const & prefix)
ip_route_key_impl_t(ip_prefix_t const & prefix, ip_route_preference_t preference)
ip_prefix_t prefix() const

Getter for ‘prefix’: the IP v4/v6 network prefix.

void prefix_is(ip_prefix_t const & prefix)

Setter for ‘prefix’.

ip_route_preference_t preference() const

Getter for ‘preference’: a value 0..255, defaults to 1.

void preference_is(ip_route_preference_t preference)

Setter for ‘preference’.

bool operator==(ip_route_key_impl_t const & other) const
bool operator!=(ip_route_key_impl_t const & other) const
uint32_t hash() const

The hash function for type ip_route_key_t.

void mix_me(hash_mix & h) const

The hash mix function for type ip_route_key_t.

std::string to_string() const

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

Private Members

ip_prefix_t prefix_
ip_route_preference_t preference_

Friends

friend std::ostream & operator<<

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

class ip_route_impl_t
#include <ip_route_impl.h>

An IP v4/v6 static route. “Via”, or nexthops, for this route are stored separately and are associated by route key.

Public Functions

ip_route_impl_t()
ip_route_impl_t(ip_route_key_t const & key)

Creates an IP static route for the route key.

ip_route_key_t key() const

Getter for ‘key’: the route’s key.

void key_is(ip_route_key_t const & key)

Setter for ‘key’.

ip_route_tag_t tag() const

Getter for ‘tag’: a numbered tag, used for table segregation.

void tag_is(ip_route_tag_t tag)

Setter for ‘tag’.

bool operator==(ip_route_impl_t const & other) const
bool operator!=(ip_route_impl_t const & other) const
uint32_t hash() const

The hash function for type ip_route_t.

void mix_me(hash_mix & h) const

The hash mix function for type ip_route_t.

std::string to_string() const

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

Private Members

ip_route_key_t key_
ip_route_tag_t tag_

Friends

friend std::ostream & operator<<

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

class ip_route_via_impl_t
#include <ip_route_impl.h>

A Via describing a particular set of nexthop information. A Via can describe either a nexthop group name to either forward traffic to, or drop traffic if the interface is Null0.

Public Functions

ip_route_via_impl_t()
ip_route_via_impl_t(ip_route_key_t const & route_key)

Creates a route via for a route key.

ip_route_key_t route_key() const

Getter for ‘route_key’: key for the route that this via is attached to.

void route_key_is(ip_route_key_t const & route_key)

Setter for ‘route_key’.

ip_addr_t hop() const

Getter for ‘hop’: IP v4/v6 nexthop address, or a default ip_addr_t if not set.

void hop_is(ip_addr_t const & hop)

Setter for ‘hop’.

intf_id_t intf() const

Getter for ‘intf’: use the named interface if not a default intf_id_t. Using intf Null0 installs a “drop” route for the given prefix and preference.

void intf_is(intf_id_t intf)

Setter for ‘intf’.

std::string nexthop_group() const

Getter for ‘nexthop_group’: name of the next-hop group to use. If this string is non-empty, the next-hop group of the given name will be used, and both “hop” and “intf” must be left to their default value otherwise we will panic(). Note this is currently only supported for IPv4 routes.

void nexthop_group_is(std::string const & nexthop_group)

Setter for ‘nexthop_group’.

mpls_label_t mpls_label() const

Getter for ‘mpls_label’: Push this MPLS label onto packets using this route.

void mpls_label_is(mpls_label_t mpls_label)

Setter for ‘mpls_label’.

vni_t vni() const

Getter for ‘vni’: the VNI to use in the underlay tunnel vxlan header.

void vni_is(vni_t vni)

Setter for ‘vni’.

ip_addr_t vtep_addr() const

Getter for ‘vtep_addr’: IP v4 destination address for the underlay IP header.

void vtep_addr_is(ip_addr_t vtep_addr)

Setter for ‘vtep_addr’.

eth_addr_t router_mac() const

Getter for ‘router_mac’: DMAC to use in the underlay ethernet header.

void router_mac_is(eth_addr_t router_mac)

Setter for ‘router_mac’.

std::string egress_vrf() const

Getter for ‘egress_vrf’: VRF name in which nexthop IP address is.

void egress_vrf_is(std::string const & egress_vrf)

Setter for ‘egress_vrf’.

ip_via_metric_t metric() const

Getter for ‘metric’: metric for the via.

void metric_is(ip_via_metric_t metric)

Setter for ‘metric’.

bool operator==(ip_route_via_impl_t const & other) const
bool operator!=(ip_route_via_impl_t const & other) const
uint32_t hash() const

The hash function for type ip_route_via_t.

void mix_me(hash_mix & h) const

The hash mix function for type ip_route_via_t.

std::string to_string() const

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

Private Members

ip_route_key_t route_key_
ip_addr_t hop_
intf_id_t intf_
std::string nexthop_group_
mpls_label_t mpls_label_
vni_t vni_
ip_addr_t vtep_addr_
eth_addr_t router_mac_
std::string egress_vrf_
ip_via_metric_t metric_

Friends

friend std::ostream & operator<<

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