25 payload.is_unreach = 0;
26 payload.is_prohibit = 0;
28 payload.is_classify = 0;
29 payload.is_multipath = 0;
30 payload.is_resolve_host = 0;
31 payload.is_resolve_attached = 0;
39 to_bytes(p.
nh(), &path_v6, payload.next_hop_address);
42 payload.next_hop_table_id = p.
rd()->table_id();
45 payload.next_hop_sw_if_index = p.
itf()->handle().value();
50 payload.is_unreach = 1;
52 payload.is_prohibit = 1;
56 payload.next_hop_weight = p.
weight();
58 payload.next_hop_via_label = 0;
59 payload.classify_table_index = 0;
67 to_bytes(p.
nh(), &path_v6, payload.nh_address);
70 payload.next_hop_sw_if_index = p.
itf()->handle().value();
82 }
else if (p.is_drop) {
84 }
else if (p.is_unreach) {
86 }
else if (p.is_prohibit) {
97 return route::path(address, *itf, p.weight, p.preference);
102 return route::path(*rd, address, p.weight, p.preference);
static std::shared_ptr< route_domain > find(const key_t &temp)
Find the instnace of the route domain in the OM.
static const special_t STANDARD
A standard path type.
static std::shared_ptr< interface > find(const handle_t &h)
The the singular instance of the interface in the DB by handle.
static const nh_proto_t IPV6
void to_vpp(const route::path &p, vapi_payload_ip_add_del_route &payload)
std::shared_ptr< route_domain > rd() const
A path for IP or MPLS routes.
route::path from_vpp(const vapi_type_fib_path &p, const nh_proto_t &nhp)
const boost::asio::ip::address & nh() const
static const special_t LOCAL
A local/for-us/recieve.
static const special_t DROP
drop path
Types belonging to Routing.
void to_bytes(const boost::asio::ip::address_v6 &addr, uint8_t *array)
static const special_t UNREACH
a path will return ICMP unreachables
special_t type() const
Getters.
uint8_t preference() const
static const special_t PROHIBIT
a path will return ICMP prohibit
static const flags_t DVR
A path that resolves via a DVR next-hop.
boost::asio::ip::address from_bytes(uint8_t is_ip6, const uint8_t *bytes)
Convert a VPP byte stinrg into a boost addresss.
nh_proto_t nh_proto() const
static const log_level_t ERROR
The VPP Object Model (VOM) library.
std::shared_ptr< interface > itf() const