X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Ffib%2Ffib_types.h;h=75ed7799f12de0efe857b24246aa5ca1d58255fe;hb=2de1f15355f9e183e46ee4ea94523a7dd4921ec0;hp=5742c69b7c7af45168b2ff251dbe328aa6d16dd3;hpb=79ae2d306269524b9de662dbbf532a04e11b7634;p=vpp.git diff --git a/src/vnet/fib/fib_types.h b/src/vnet/fib/fib_types.h index 5742c69b7c7..75ed7799f12 100644 --- a/src/vnet/fib/fib_types.h +++ b/src/vnet/fib/fib_types.h @@ -16,6 +16,7 @@ #ifndef __FIB_TYPES_H__ #define __FIB_TYPES_H__ +#include #include #include #include @@ -71,6 +72,16 @@ typedef enum fib_protocol_t_ { _item <= FIB_PROTOCOL_IP6; \ _item++) +/** + * @brief Convert from boolean is_ip6 to FIB protocol. + * Drop MPLS on the floor in favor of IPv4. + */ +static inline fib_protocol_t +fib_ip_proto(bool is_ip6) +{ + return (is_ip6) ? FIB_PROTOCOL_IP6 : FIB_PROTOCOL_IP4; +} + /** * @brief Convert from a protocol to a link type */ @@ -344,6 +355,10 @@ typedef enum fib_route_path_flags_t_ * A path that resolves via another table */ FIB_ROUTE_PATH_DEAG = (1 << 13), + /** + * A path that resolves via a DVR DPO + */ + FIB_ROUTE_PATH_DVR = (1 << 14), } fib_route_path_flags_t; /**