FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
fib_types.h File Reference
+ Include dependency graph for fib_types.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  fib_prefix_t_
 Aggregate type for a prefix. More...
 
struct  fib_mpls_label_t_
 Configuration for each label value in the output-stack. More...
 
struct  fib_route_path_t_
 A representation of a path as described by a route producer. More...
 
struct  fib_path_ext_list_t_
 A list of path-extensions. More...
 

Macros

#define FIB_NODE_INDEX_INVALID   ((fib_node_index_t)(~0))
 
#define FIB_PROTOCOLS
 
#define FIB_PROTOCOL_MAX   (FIB_PROTOCOL_MPLS + 1)
 Definition outside of enum so it does not need to be included in non-defaulted switch statements. More...
 
#define FIB_PROTOCOL_IP_MAX   (FIB_PROTOCOL_IP6 + 1)
 Definition outside of enum so it does not need to be included in non-defaulted switch statements. More...
 
#define FIB_PROTOCOL_NONE   (FIB_PROTOCOL_MAX+1)
 Not part of the enum so it does not have to be handled in switch statements. More...
 
#define FOR_EACH_FIB_PROTOCOL(_item)
 
#define FOR_EACH_FIB_IP_PROTOCOL(_item)
 
#define FIB_FORW_CHAINS
 
#define FIB_FORW_CHAIN_NUM   (FIB_FORW_CHAIN_TYPE_NSH+1)
 
#define FIB_FORW_CHAIN_MPLS_NUM   (FIB_FORW_CHAIN_TYPE_MPLS_EOS+1)
 
#define FOR_EACH_FIB_FORW_CHAIN(_item)
 
#define FOR_EACH_FIB_FORW_MPLS_CHAIN(_item)
 
#define FIB_SPEICAL_TYPE_MAX   (FIB_SPEICAL_TYPE_LAST + 1)
 The maximum number of types. More...
 
#define FOR_EACH_FIB_SPEICAL_TYPE(_item)
 
#define MFIB_RPF_ID_NONE   (0)
 
#define FIB_MPLS_LSP_MODES
 
#define FIB_ROUTE_PATH_HELP   "[next-hop-address] [next-hop-interface] [next-hop-table <value>] [weight <value>] [preference <value>] [udp-encap-id <value>] [ip4-lookup-in-table <value>] [ip6-lookup-in-table <value>] [mpls-lookup-in-table <value>] [resolve-via-host] [resolve-via-connected] [rx-ip4 <interface>] [out-labels <value value value>]"
 A help string to list the FIB path options. More...
 

Typedefs

typedef u32 fib_node_index_t
 A typedef of a node index. More...
 
typedef enum fib_protocol_t_ fib_protocol_t
 Protocol Type. More...
 
typedef enum fib_forward_chain_type_t_ fib_forward_chain_type_t
 FIB output chain type. More...
 
typedef struct fib_prefix_t_ fib_prefix_t
 Aggregate type for a prefix. More...
 
typedef enum fib_special_type_t_ fib_special_type_t
 Enurmeration of special path/entry types. More...
 
typedef enum fib_route_path_flags_t_ fib_route_path_flags_t
 Path flags from the control plane. More...
 
typedef u32 fib_rpf_id_t
 An RPF-ID is numerical value that is used RPF validate. More...
 
typedef enum fib_mpls_lsp_mode_t_ fib_mpls_lsp_mode_t
 MPLS LSP mode - only valid at the head and tail. More...
 
typedef struct fib_mpls_label_t_ fib_mpls_label_t
 Configuration for each label value in the output-stack. More...
 
typedef struct fib_route_path_t_ fib_route_path_t
 A representation of a path as described by a route producer. More...
 
typedef enum fib_path_list_walk_rc_t_ fib_path_list_walk_rc_t
 return code to control pat-hlist walk More...
 
typedef struct fib_path_ext_list_t_ fib_path_ext_list_t
 A list of path-extensions. More...
 

Enumerations

enum  fib_protocol_t_ { FIB_PROTOCOL_IP4 = DPO_PROTO_IP4, FIB_PROTOCOL_IP6 = DPO_PROTO_IP6, FIB_PROTOCOL_MPLS = DPO_PROTO_MPLS }
 Protocol Type. More...
 
enum  fib_forward_chain_type_t_ {
  FIB_FORW_CHAIN_TYPE_UNICAST_IP4, FIB_FORW_CHAIN_TYPE_UNICAST_IP6, FIB_FORW_CHAIN_TYPE_MPLS_NON_EOS, FIB_FORW_CHAIN_TYPE_BIER,
  FIB_FORW_CHAIN_TYPE_MPLS_EOS, FIB_FORW_CHAIN_TYPE_MCAST_IP4, FIB_FORW_CHAIN_TYPE_MCAST_IP6, FIB_FORW_CHAIN_TYPE_ETHERNET,
  FIB_FORW_CHAIN_TYPE_NSH
}
 FIB output chain type. More...
 
enum  fib_special_type_t_ { FIB_SPECIAL_TYPE_FIRST = 0, FIB_SPECIAL_TYPE_LOCAL = FIB_SPECIAL_TYPE_FIRST, FIB_SPECIAL_TYPE_DROP, FIB_SPECIAL_TYPE_LAST = FIB_SPECIAL_TYPE_DROP }
 Enurmeration of special path/entry types. More...
 
enum  fib_route_path_flags_t_ {
  FIB_ROUTE_PATH_FLAG_NONE = 0, FIB_ROUTE_PATH_RESOLVE_VIA_HOST = (1 << 0), FIB_ROUTE_PATH_RESOLVE_VIA_ATTACHED = (1 << 1), FIB_ROUTE_PATH_LOCAL = (1 << 2),
  FIB_ROUTE_PATH_ATTACHED = (1 << 3), FIB_ROUTE_PATH_DROP = (1 << 4), FIB_ROUTE_PATH_EXCLUSIVE = (1 << 5), FIB_ROUTE_PATH_INTF_RX = (1 << 6),
  FIB_ROUTE_PATH_RPF_ID = (1 << 7), FIB_ROUTE_PATH_SOURCE_LOOKUP = (1 << 8), FIB_ROUTE_PATH_UDP_ENCAP = (1 << 9), FIB_ROUTE_PATH_BIER_FMASK = (1 << 10),
  FIB_ROUTE_PATH_BIER_TABLE = (1 << 11), FIB_ROUTE_PATH_BIER_IMP = (1 << 12), FIB_ROUTE_PATH_DEAG = (1 << 13), FIB_ROUTE_PATH_DVR = (1 << 14),
  FIB_ROUTE_PATH_ICMP_UNREACH = (1 << 15), FIB_ROUTE_PATH_ICMP_PROHIBIT = (1 << 16), FIB_ROUTE_PATH_CLASSIFY = (1 << 17), FIB_ROUTE_PATH_POP_PW_CW = (1 << 18),
  FIB_ROUTE_PATH_GLEAN = (1 << 19)
}
 Path flags from the control plane. More...
 
enum  fib_mpls_lsp_mode_t_ { FIB_MPLS_LSP_MODE_PIPE, FIB_MPLS_LSP_MODE_UNIFORM }
 MPLS LSP mode - only valid at the head and tail. More...
 
enum  fib_path_list_walk_rc_t_ { FIB_PATH_LIST_WALK_STOP, FIB_PATH_LIST_WALK_CONTINUE }
 return code to control pat-hlist walk More...
 

Functions

static fib_protocol_t fib_ip_proto (bool is_ip6)
 Convert from boolean is_ip6 to FIB protocol. More...
 
ip46_type_t fib_proto_to_ip46 (fib_protocol_t fproto)
 Convert from fib_protocol to ip46_type. More...
 
fib_protocol_t fib_proto_from_ip46 (ip46_type_t iproto)
 Convert from ip46_type to fib_protocol. More...
 
vnet_link_t fib_proto_to_link (fib_protocol_t proto)
 Convert from a protocol to a link type. More...
 
vnet_link_t fib_forw_chain_type_to_link_type (fib_forward_chain_type_t fct)
 Convert from a chain type to the adjacency's link type. More...
 
fib_forward_chain_type_t fib_forw_chain_type_from_link_type (vnet_link_t lt)
 Convert from a adjacency's link type to chain type. More...
 
fib_forward_chain_type_t fib_forw_chain_type_from_dpo_proto (dpo_proto_t proto)
 Convert from a payload-protocol to a chain type. More...
 
fib_forward_chain_type_t fib_forw_chain_type_from_fib_proto (fib_protocol_t proto)
 Convert from a fib-protocol to a chain type. More...
 
dpo_proto_t fib_forw_chain_type_to_dpo_proto (fib_forward_chain_type_t fct)
 Convert from a chain type to the DPO proto it will install. More...
 
 STATIC_ASSERT (STRUCT_OFFSET_OF(fib_prefix_t, fp_addr)==4, "FIB Prefix's address is 4 byte aligned.")
 
int fib_prefix_cmp (const fib_prefix_t *p1, const fib_prefix_t *p2)
 Compare two prefixes for equality. More...
 
void fib_prefix_copy (fib_prefix_t *dst, const fib_prefix_t *src)
 Copy a prefix. More...
 
int fib_prefix_is_cover (const fib_prefix_t *p1, const fib_prefix_t *p2)
 Compare two prefixes for covering relationship. More...
 
int fib_prefix_is_host (const fib_prefix_t *p)
 Return true is the prefix is a host prefix. More...
 
u8 fib_prefix_get_host_length (fib_protocol_t proto)
 
void fib_prefix_normalize (const fib_prefix_t *p, fib_prefix_t *out)
 normalise a prefix (i.e. More...
 
void fib_prefix_from_ip46_addr (const ip46_address_t *addr, fib_prefix_t *pfx)
 Host prefix from ip. More...
 
u8format_fib_prefix (u8 *s, va_list *args)
 
u8format_fib_forw_chain_type (u8 *s, va_list *args)
 
dpo_proto_t fib_proto_to_dpo (fib_protocol_t fib_proto)
 
fib_protocol_t dpo_proto_to_fib (dpo_proto_t dpo_proto)
 
fib_protocol_t bier_hdr_proto_to_fib (bier_hdr_proto_id_t bproto)
 Convert from BIER next-hop proto to FIB proto. More...
 
u8format_fib_protocol (u8 *s, va_list *ap)
 
u8format_vnet_link (u8 *s, va_list *ap)
 
u8format_fib_route_path_flags (u8 *s, va_list *ap)
 Format route path flags. More...
 
u8format_fib_mpls_lsp_mode (u8 *s, va_list *ap)
 Format an LSP mode type. More...
 
u8format_fib_mpls_label (u8 *s, va_list *ap)
 Format an MPLS label. More...
 
uword unformat_fib_route_path (unformat_input_t *input, va_list *args)
 Unformat a fib_route_path_t from CLI input. More...
 
u8format_fib_route_path (u8 *s, va_list *ap)
 Format route path flags. More...
 

Macro Definition Documentation

◆ FIB_FORW_CHAIN_MPLS_NUM

#define FIB_FORW_CHAIN_MPLS_NUM   (FIB_FORW_CHAIN_TYPE_MPLS_EOS+1)

Definition at line 162 of file fib_types.h.

◆ FIB_FORW_CHAIN_NUM

#define FIB_FORW_CHAIN_NUM   (FIB_FORW_CHAIN_TYPE_NSH+1)

Definition at line 161 of file fib_types.h.

◆ FIB_FORW_CHAINS

#define FIB_FORW_CHAINS
Value:
{ \
[FIB_FORW_CHAIN_TYPE_ETHERNET] = "ethernet", \
[FIB_FORW_CHAIN_TYPE_UNICAST_IP4] = "unicast-ip4", \
[FIB_FORW_CHAIN_TYPE_UNICAST_IP6] = "unicast-ip6", \
[FIB_FORW_CHAIN_TYPE_MCAST_IP4] = "multicast-ip4", \
[FIB_FORW_CHAIN_TYPE_MCAST_IP6] = "multicast-ip6", \
[FIB_FORW_CHAIN_TYPE_MPLS_EOS] = "mpls-eos", \
}

Definition at line 149 of file fib_types.h.

◆ FIB_MPLS_LSP_MODES

#define FIB_MPLS_LSP_MODES
Value:
{ \
[FIB_MPLS_LSP_MODE_PIPE] = "pipe", \
[FIB_MPLS_LSP_MODE_UNIFORM] = "uniform", \
}

Definition at line 442 of file fib_types.h.

◆ FIB_NODE_INDEX_INVALID

#define FIB_NODE_INDEX_INVALID   ((fib_node_index_t)(~0))

Definition at line 30 of file fib_types.h.

◆ FIB_PROTOCOL_IP_MAX

#define FIB_PROTOCOL_IP_MAX   (FIB_PROTOCOL_IP6 + 1)

Definition outside of enum so it does not need to be included in non-defaulted switch statements.

Definition at line 57 of file fib_types.h.

◆ FIB_PROTOCOL_MAX

#define FIB_PROTOCOL_MAX   (FIB_PROTOCOL_MPLS + 1)

Definition outside of enum so it does not need to be included in non-defaulted switch statements.

Definition at line 51 of file fib_types.h.

◆ FIB_PROTOCOL_NONE

#define FIB_PROTOCOL_NONE   (FIB_PROTOCOL_MAX+1)

Not part of the enum so it does not have to be handled in switch statements.

Definition at line 62 of file fib_types.h.

◆ FIB_PROTOCOLS

#define FIB_PROTOCOLS
Value:
{ \
[FIB_PROTOCOL_IP4] = "ipv4", \
[FIB_PROTOCOL_IP6] = "ipv6", \
[FIB_PROTOCOL_MPLS] = "MPLS", \
}

Definition at line 41 of file fib_types.h.

◆ FIB_ROUTE_PATH_HELP

#define FIB_ROUTE_PATH_HELP   "[next-hop-address] [next-hop-interface] [next-hop-table <value>] [weight <value>] [preference <value>] [udp-encap-id <value>] [ip4-lookup-in-table <value>] [ip6-lookup-in-table <value>] [mpls-lookup-in-table <value>] [resolve-via-host] [resolve-via-connected] [rx-ip4 <interface>] [out-labels <value value value>]"

A help string to list the FIB path options.

Definition at line 625 of file fib_types.h.

◆ FIB_SPEICAL_TYPE_MAX

#define FIB_SPEICAL_TYPE_MAX   (FIB_SPEICAL_TYPE_LAST + 1)

The maximum number of types.

Definition at line 318 of file fib_types.h.

◆ FOR_EACH_FIB_FORW_CHAIN

#define FOR_EACH_FIB_FORW_CHAIN (   _item)
Value:
_item++)

Definition at line 164 of file fib_types.h.

◆ FOR_EACH_FIB_FORW_MPLS_CHAIN

#define FOR_EACH_FIB_FORW_MPLS_CHAIN (   _item)
Value:
_item++)

Definition at line 169 of file fib_types.h.

◆ FOR_EACH_FIB_IP_PROTOCOL

#define FOR_EACH_FIB_IP_PROTOCOL (   _item)
Value:
for (_item = FIB_PROTOCOL_IP4; \
_item <= FIB_PROTOCOL_IP6; \
_item++)

Definition at line 69 of file fib_types.h.

◆ FOR_EACH_FIB_PROTOCOL

#define FOR_EACH_FIB_PROTOCOL (   _item)
Value:
for (_item = FIB_PROTOCOL_IP4; \
_item <= FIB_PROTOCOL_MPLS; \
_item++)

Definition at line 64 of file fib_types.h.

◆ FOR_EACH_FIB_SPEICAL_TYPE

#define FOR_EACH_FIB_SPEICAL_TYPE (   _item)
Value:
for (_item = FIB_TYPE_SPEICAL_FIRST; \
_item <= FIB_SPEICAL_TYPE_LAST; _item++)

Definition at line 320 of file fib_types.h.

◆ MFIB_RPF_ID_NONE

#define MFIB_RPF_ID_NONE   (0)

Definition at line 423 of file fib_types.h.

Typedef Documentation

◆ fib_forward_chain_type_t

FIB output chain type.

When a child object requests a forwarding contribution from a parent, it does so for a particular scenario. This enumererates those sceanrios

◆ fib_mpls_label_t

Configuration for each label value in the output-stack.

◆ fib_mpls_lsp_mode_t

MPLS LSP mode - only valid at the head and tail.

◆ fib_node_index_t

A typedef of a node index.

we make this typedef so the code becomes easier for a human to parse.

Definition at line 29 of file fib_types.h.

◆ fib_path_ext_list_t

A list of path-extensions.

◆ fib_path_list_walk_rc_t

return code to control pat-hlist walk

◆ fib_prefix_t

typedef struct fib_prefix_t_ fib_prefix_t

Aggregate type for a prefix.

◆ fib_protocol_t

Protocol Type.

packed so it consumes a u8 only

◆ fib_route_path_flags_t

Path flags from the control plane.

◆ fib_route_path_t

A representation of a path as described by a route producer.

These paramenters will determine the path 'type', of which there are: 1) Attached-next-hop: a single peer on a link. It is 'attached' because it is in the same sub-net as the router, on a link directly connected to the route. It is 'next=hop' since the next-hop address of the peer is known. 2) Attached: the next-hop is not known. but we can ARP for it. 3) Recursive. The next-hop is known but the interface is not. So to find the adj to use we must recursively resolve the next-hop. 3) deaggregate (deag) A further lookup is required.

◆ fib_rpf_id_t

typedef u32 fib_rpf_id_t

An RPF-ID is numerical value that is used RPF validate.

An entry has-a RPF-ID, when a packet egress from (e.g. an LSP) it gains an RPF-ID, these two are compared for the RPF check. This replaces the interfce based chack (since the LSP has no associated interface.

Definition at line 421 of file fib_types.h.

◆ fib_special_type_t

Enurmeration of special path/entry types.

Enumeration Type Documentation

◆ fib_forward_chain_type_t_

FIB output chain type.

When a child object requests a forwarding contribution from a parent, it does so for a particular scenario. This enumererates those sceanrios

Enumerator
FIB_FORW_CHAIN_TYPE_UNICAST_IP4 

Contribute an object that is to be used to forward IP4 packets.

FIB_FORW_CHAIN_TYPE_UNICAST_IP6 

Contribute an object that is to be used to forward IP6 packets.

FIB_FORW_CHAIN_TYPE_MPLS_NON_EOS 

Contribute an object that is to be used to forward non-end-of-stack MPLS packets.

FIB_FORW_CHAIN_TYPE_BIER 

Contribute an object that is to be used to forward BIER packets.

FIB_FORW_CHAIN_TYPE_MPLS_EOS 

Contribute an object that is to be used to forward end-of-stack MPLS packets.

This is a convenient ID for clients. A real EOS chain must be pay-load protocol specific. This option is converted into one of the other three internally.

FIB_FORW_CHAIN_TYPE_MCAST_IP4 

Contribute an object that is to be used to forward IP4 packets.

FIB_FORW_CHAIN_TYPE_MCAST_IP6 

Contribute an object that is to be used to forward IP6 packets.

FIB_FORW_CHAIN_TYPE_ETHERNET 

Contribute an object that is to be used to forward Ethernet packets.

FIB_FORW_CHAIN_TYPE_NSH 

Contribute an object that is to be used to forward NSH packets.

This is last in the list since it is not valid for many FIB objects, and thus their array of per-chain-type DPOs can be sized smaller.

Definition at line 104 of file fib_types.h.

◆ fib_mpls_lsp_mode_t_

MPLS LSP mode - only valid at the head and tail.

Enumerator
FIB_MPLS_LSP_MODE_PIPE 

Pipe Mode - the default.

TTL and DSCP markings are not carried between the layers

FIB_MPLS_LSP_MODE_UNIFORM 

Uniform mode.

TTL and DSCP are copied between the layers

Definition at line 428 of file fib_types.h.

◆ fib_path_list_walk_rc_t_

return code to control pat-hlist walk

Enumerator
FIB_PATH_LIST_WALK_STOP 
FIB_PATH_LIST_WALK_CONTINUE 

Definition at line 630 of file fib_types.h.

◆ fib_protocol_t_

Protocol Type.

packed so it consumes a u8 only

Enumerator
FIB_PROTOCOL_IP4 
FIB_PROTOCOL_IP6 
FIB_PROTOCOL_MPLS 

Definition at line 35 of file fib_types.h.

◆ fib_route_path_flags_t_

Path flags from the control plane.

Enumerator
FIB_ROUTE_PATH_FLAG_NONE 
FIB_ROUTE_PATH_RESOLVE_VIA_HOST 

Recursion constraint of via a host prefix.

FIB_ROUTE_PATH_RESOLVE_VIA_ATTACHED 

Recursion constraint of via an attahced prefix.

FIB_ROUTE_PATH_LOCAL 

A for-us/local path.

FIB_ROUTE_PATH_ATTACHED 

Attached path.

FIB_ROUTE_PATH_DROP 

A Drop path - resolve the path on the drop DPO.

FIB_ROUTE_PATH_EXCLUSIVE 

Don't resolve the path, use the DPO the client provides.

FIB_ROUTE_PATH_INTF_RX 

A path that result in received traffic being recieved/recirculated so that it appears to have arrived on the new interface.

FIB_ROUTE_PATH_RPF_ID 

A local path with a RPF-ID => multicast traffic.

FIB_ROUTE_PATH_SOURCE_LOOKUP 

A deag path using the packet's source not destination address.

FIB_ROUTE_PATH_UDP_ENCAP 

A path via a UDP encap object.

FIB_ROUTE_PATH_BIER_FMASK 

A path that resolves via a BIER F-Mask.

FIB_ROUTE_PATH_BIER_TABLE 

A path that resolves via a BIER [ECMP] Table.

FIB_ROUTE_PATH_BIER_IMP 

A path that resolves via a BIER impostion object.

FIB_ROUTE_PATH_DEAG 

A path that resolves via another table.

FIB_ROUTE_PATH_DVR 

A path that resolves via a DVR DPO.

FIB_ROUTE_PATH_ICMP_UNREACH 
FIB_ROUTE_PATH_ICMP_PROHIBIT 
FIB_ROUTE_PATH_CLASSIFY 
FIB_ROUTE_PATH_POP_PW_CW 

Pop a Psuedo Wire Control Word.

FIB_ROUTE_PATH_GLEAN 

A path that resolves via a glean adjacency.

Definition at line 330 of file fib_types.h.

◆ fib_special_type_t_

Enurmeration of special path/entry types.

Enumerator
FIB_SPECIAL_TYPE_FIRST 

Marker.

Add new types after this one.

FIB_SPECIAL_TYPE_LOCAL 

Local/for-us paths.

FIB_SPECIAL_TYPE_DROP 

drop paths

FIB_SPECIAL_TYPE_LAST 

Marker.

Add new types before this one, then update it.

Definition at line 296 of file fib_types.h.

Function Documentation

◆ bier_hdr_proto_to_fib()

fib_protocol_t bier_hdr_proto_to_fib ( bier_hdr_proto_id_t  bproto)

Convert from BIER next-hop proto to FIB proto.

◆ dpo_proto_to_fib()

fib_protocol_t dpo_proto_to_fib ( dpo_proto_t  dpo_proto)

Definition at line 359 of file fib_types.c.

+ Here is the caller graph for this function:

◆ fib_forw_chain_type_from_dpo_proto()

fib_forward_chain_type_t fib_forw_chain_type_from_dpo_proto ( dpo_proto_t  proto)

Convert from a payload-protocol to a chain type.

Definition at line 427 of file fib_types.c.

+ Here is the caller graph for this function:

◆ fib_forw_chain_type_from_fib_proto()

fib_forward_chain_type_t fib_forw_chain_type_from_fib_proto ( fib_protocol_t  proto)

Convert from a fib-protocol to a chain type.

Definition at line 449 of file fib_types.c.

+ Here is the caller graph for this function:

◆ fib_forw_chain_type_from_link_type()

fib_forward_chain_type_t fib_forw_chain_type_from_link_type ( vnet_link_t  lt)

Convert from a adjacency's link type to chain type.

Definition at line 493 of file fib_types.c.

+ Here is the caller graph for this function:

◆ fib_forw_chain_type_to_dpo_proto()

dpo_proto_t fib_forw_chain_type_to_dpo_proto ( fib_forward_chain_type_t  fct)

Convert from a chain type to the DPO proto it will install.

Definition at line 516 of file fib_types.c.

+ Here is the caller graph for this function:

◆ fib_forw_chain_type_to_link_type()

vnet_link_t fib_forw_chain_type_to_link_type ( fib_forward_chain_type_t  fct)

Convert from a chain type to the adjacency's link type.

Definition at line 465 of file fib_types.c.

+ Here is the caller graph for this function:

◆ fib_ip_proto()

static fib_protocol_t fib_ip_proto ( bool  is_ip6)
inlinestatic

Convert from boolean is_ip6 to FIB protocol.

Drop MPLS on the floor in favor of IPv4.

Definition at line 79 of file fib_types.h.

+ Here is the caller graph for this function:

◆ fib_prefix_cmp()

int fib_prefix_cmp ( const fib_prefix_t p1,
const fib_prefix_t p2 
)

Compare two prefixes for equality.

Definition at line 177 of file fib_types.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fib_prefix_copy()

void fib_prefix_copy ( fib_prefix_t dst,
const fib_prefix_t src 
)

Copy a prefix.

Definition at line 170 of file fib_types.c.

+ Here is the caller graph for this function:

◆ fib_prefix_from_ip46_addr()

void fib_prefix_from_ip46_addr ( const ip46_address_t *  addr,
fib_prefix_t pfx 
)

Host prefix from ip.

Definition at line 81 of file fib_types.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fib_prefix_get_host_length()

u8 fib_prefix_get_host_length ( fib_protocol_t  proto)

Definition at line 234 of file fib_types.c.

+ Here is the caller graph for this function:

◆ fib_prefix_is_cover()

int fib_prefix_is_cover ( const fib_prefix_t p1,
const fib_prefix_t p2 
)

Compare two prefixes for covering relationship.

Returns
non-zero if the first prefix is a cover for the second

Definition at line 212 of file fib_types.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fib_prefix_is_host()

int fib_prefix_is_host ( const fib_prefix_t p)

Return true is the prefix is a host prefix.

Definition at line 249 of file fib_types.c.

+ Here is the caller graph for this function:

◆ fib_prefix_normalize()

void fib_prefix_normalize ( const fib_prefix_t p,
fib_prefix_t out 
)

normalise a prefix (i.e.

mask the host bits according to the prefix length)

Definition at line 264 of file fib_types.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fib_proto_from_ip46()

fib_protocol_t fib_proto_from_ip46 ( ip46_type_t  iproto)

Convert from ip46_type to fib_protocol.

Definition at line 409 of file fib_types.c.

+ Here is the caller graph for this function:

◆ fib_proto_to_dpo()

dpo_proto_t fib_proto_to_dpo ( fib_protocol_t  fib_proto)

Definition at line 343 of file fib_types.c.

+ Here is the caller graph for this function:

◆ fib_proto_to_ip46()

ip46_type_t fib_proto_to_ip46 ( fib_protocol_t  fproto)

Convert from fib_protocol to ip46_type.

Definition at line 393 of file fib_types.c.

+ Here is the caller graph for this function:

◆ fib_proto_to_link()

vnet_link_t fib_proto_to_link ( fib_protocol_t  proto)

Convert from a protocol to a link type.

Definition at line 377 of file fib_types.c.

+ Here is the caller graph for this function:

◆ format_fib_forw_chain_type()

u8* format_fib_forw_chain_type ( u8 s,
va_list *  args 
)

Definition at line 49 of file fib_types.c.

+ Here is the caller graph for this function:

◆ format_fib_mpls_label()

u8* format_fib_mpls_label ( u8 s,
va_list *  ap 
)

Format an MPLS label.

Definition at line 65 of file fib_types.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ format_fib_mpls_lsp_mode()

u8* format_fib_mpls_lsp_mode ( u8 s,
va_list *  ap 
)

Format an LSP mode type.

Definition at line 57 of file fib_types.c.

+ Here is the caller graph for this function:

◆ format_fib_prefix()

u8* format_fib_prefix ( u8 s,
va_list *  args 
)

Definition at line 283 of file fib_types.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ format_fib_protocol()

u8* format_fib_protocol ( u8 s,
va_list *  ap 
)

Definition at line 33 of file fib_types.c.

+ Here is the caller graph for this function:

◆ format_fib_route_path()

u8* format_fib_route_path ( u8 s,
va_list *  ap 
)

Format route path flags.

Definition at line 143 of file fib_types.c.

+ Here is the call graph for this function:

◆ format_fib_route_path_flags()

u8* format_fib_route_path_flags ( u8 s,
va_list *  ap 
)

Format route path flags.

Definition at line 96 of file fib_types.c.

+ Here is the caller graph for this function:

◆ format_vnet_link()

u8* format_vnet_link ( u8 s,
va_list *  ap 
)

Definition at line 41 of file fib_types.c.

+ Here is the caller graph for this function:

◆ STATIC_ASSERT()

STATIC_ASSERT ( STRUCT_OFFSET_OF(fib_prefix_t, fp_addr)  = =4,
"FIB Prefix's address is 4 byte aligned."   
)

◆ unformat_fib_route_path()

uword unformat_fib_route_path ( unformat_input_t input,
va_list *  args 
)

Unformat a fib_route_path_t from CLI input.

Definition at line 540 of file fib_types.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:
FIB_FORW_CHAIN_TYPE_MPLS_EOS
@ FIB_FORW_CHAIN_TYPE_MPLS_EOS
Contribute an object that is to be used to forward end-of-stack MPLS packets.
Definition: fib_types.h:128
FIB_FORW_CHAIN_TYPE_MCAST_IP4
@ FIB_FORW_CHAIN_TYPE_MCAST_IP4
Contribute an object that is to be used to forward IP4 packets.
Definition: fib_types.h:132
FIB_FORW_CHAIN_TYPE_ETHERNET
@ FIB_FORW_CHAIN_TYPE_ETHERNET
Contribute an object that is to be used to forward Ethernet packets.
Definition: fib_types.h:140
FIB_FORW_CHAIN_TYPE_NSH
@ FIB_FORW_CHAIN_TYPE_NSH
Contribute an object that is to be used to forward NSH packets.
Definition: fib_types.h:146
FIB_FORW_CHAIN_TYPE_UNICAST_IP4
@ FIB_FORW_CHAIN_TYPE_UNICAST_IP4
Contribute an object that is to be used to forward IP4 packets.
Definition: fib_types.h:108
FIB_PROTOCOL_IP4
@ FIB_PROTOCOL_IP4
Definition: fib_types.h:36
FIB_FORW_CHAIN_TYPE_MPLS_NON_EOS
@ FIB_FORW_CHAIN_TYPE_MPLS_NON_EOS
Contribute an object that is to be used to forward non-end-of-stack MPLS packets.
Definition: fib_types.h:117
FIB_PROTOCOL_MPLS
@ FIB_PROTOCOL_MPLS
Definition: fib_types.h:38
FIB_MPLS_LSP_MODE_UNIFORM
@ FIB_MPLS_LSP_MODE_UNIFORM
Uniform mode.
Definition: fib_types.h:439
FIB_PROTOCOL_IP6
@ FIB_PROTOCOL_IP6
Definition: fib_types.h:37
FIB_FORW_CHAIN_TYPE_BIER
@ FIB_FORW_CHAIN_TYPE_BIER
Contribute an object that is to be used to forward BIER packets.
Definition: fib_types.h:121
FIB_FORW_CHAIN_TYPE_MCAST_IP6
@ FIB_FORW_CHAIN_TYPE_MCAST_IP6
Contribute an object that is to be used to forward IP6 packets.
Definition: fib_types.h:136
FIB_FORW_CHAIN_TYPE_UNICAST_IP6
@ FIB_FORW_CHAIN_TYPE_UNICAST_IP6
Contribute an object that is to be used to forward IP6 packets.
Definition: fib_types.h:112
FIB_MPLS_LSP_MODE_PIPE
@ FIB_MPLS_LSP_MODE_PIPE
Pipe Mode - the default.
Definition: fib_types.h:434