FD.io VPP  v20.09-64-g4f7b92f0a
Vector Packet Processing
mfib_types.h File Reference
+ Include dependency graph for mfib_types.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mfib_prefix_t_
 Aggregate type for a prefix. More...
 

Macros

#define FOR_EACH_MFIB_ATTRIBUTE(_item)
 
#define MFIB_ENTRY_NAMES_SHORT
 
#define MFIB_ENTRY_NAMES_LONG
 
#define FOR_EACH_MFIB_ITF_ATTRIBUTE(_item)
 
#define MFIB_ITF_NAMES_SHORT
 
#define MFIB_ITF_NAMES_LONG
 
#define MFIB_SOURCE_NAMES
 
#define FOREACH_MFIB_SOURCE(_ms)
 
#define MFIB_N_SOURCES   (MFIB_SOURCE_DEFAULT_ROUTE + 1)
 
#define MFIB_SOURCE_NONE   (MFIB_SOURCE_DEFAULT_ROUTE + 1)
 

Typedefs

typedef struct mfib_prefix_t_ mfib_prefix_t
 Aggregate type for a prefix. More...
 
typedef enum mfib_entry_attribute_t_ mfib_entry_attribute_t
 
typedef enum mfib_entry_flags_t_ mfib_entry_flags_t
 
typedef enum mfib_itf_attribute_t_ mfib_itf_attribute_t
 
typedef enum mfib_itf_flags_t_ mfib_itf_flags_t
 
typedef enum mfib_source_t_ mfib_source_t
 Possible [control plane] sources of MFIB entries. More...
 

Enumerations

enum  mfib_entry_attribute_t_ {
  MFIB_ENTRY_ATTRIBUTE_FIRST = 0, MFIB_ENTRY_SIGNAL = MFIB_ENTRY_ATTRIBUTE_FIRST, MFIB_ENTRY_DROP, MFIB_ENTRY_CONNECTED,
  MFIB_ENTRY_ACCEPT_ALL_ITF, MFIB_ENTRY_EXCLUSIVE, MFIB_ENTRY_INHERIT_ACCEPT, MFIB_ENTRY_ATTRIBUTE_LAST = MFIB_ENTRY_INHERIT_ACCEPT
}
 
enum  mfib_entry_flags_t_ {
  MFIB_ENTRY_FLAG_NONE, MFIB_ENTRY_FLAG_SIGNAL = (1 << MFIB_ENTRY_SIGNAL), MFIB_ENTRY_FLAG_DROP = (1 << MFIB_ENTRY_DROP), MFIB_ENTRY_FLAG_CONNECTED = (1 << MFIB_ENTRY_CONNECTED),
  MFIB_ENTRY_FLAG_ACCEPT_ALL_ITF = (1 << MFIB_ENTRY_ACCEPT_ALL_ITF), MFIB_ENTRY_FLAG_EXCLUSIVE = (1 << MFIB_ENTRY_EXCLUSIVE), MFIB_ENTRY_FLAG_INHERIT_ACCEPT = (1 << MFIB_ENTRY_INHERIT_ACCEPT)
}
 
enum  mfib_itf_attribute_t_ {
  MFIB_ITF_ATTRIBUTE_FIRST, MFIB_ITF_NEGATE_SIGNAL = MFIB_ITF_ATTRIBUTE_FIRST, MFIB_ITF_ACCEPT, MFIB_ITF_FORWARD,
  MFIB_ITF_SIGNAL_PRESENT, MFIB_ITF_DONT_PRESERVE, MFIB_ITF_ATTRIBUTE_LAST = MFIB_ITF_DONT_PRESERVE
}
 
enum  mfib_itf_flags_t_ {
  MFIB_ITF_FLAG_NONE, MFIB_ITF_FLAG_NEGATE_SIGNAL = (1 << MFIB_ITF_NEGATE_SIGNAL), MFIB_ITF_FLAG_ACCEPT = (1 << MFIB_ITF_ACCEPT), MFIB_ITF_FLAG_FORWARD = (1 << MFIB_ITF_FORWARD),
  MFIB_ITF_FLAG_SIGNAL_PRESENT = (1 << MFIB_ITF_SIGNAL_PRESENT), MFIB_ITF_FLAG_DONT_PRESERVE = (1 << MFIB_ITF_DONT_PRESERVE)
}
 
enum  mfib_source_t_ {
  MFIB_SOURCE_SPECIAL, MFIB_SOURCE_6RD, MFIB_SOURCE_API, MFIB_SOURCE_CLI,
  MFIB_SOURCE_VXLAN, MFIB_SOURCE_DHCP, MFIB_SOURCE_SRv6, MFIB_SOURCE_GTPU,
  MFIB_SOURCE_VXLAN_GPE, MFIB_SOURCE_GENEVE, MFIB_SOURCE_IGMP, MFIB_SOURCE_VXLAN_GBP,
  MFIB_SOURCE_PLUGIN_LOW, MFIB_SOURCE_RR, MFIB_SOURCE_DEFAULT_ROUTE
}
 Possible [control plane] sources of MFIB entries. More...
 

Functions

int mfib_prefix_cmp (const mfib_prefix_t *p1, const mfib_prefix_t *p2)
 Compare two prefixes for equality. More...
 
u8format_mfib_prefix (u8 *s, va_list *args)
 
u8format_mfib_entry_flags (u8 *s, va_list *args)
 
u8format_mfib_itf_flags (u8 *s, va_list *args)
 
uword unformat_mfib_itf_flags (unformat_input_t *input, va_list *args)
 
uword unformat_mfib_entry_flags (unformat_input_t *input, va_list *args)
 
int mfib_prefix_is_cover (const mfib_prefix_t *p1, const mfib_prefix_t *p2)
 Compare two prefixes for covering relationship. More...
 
int mfib_prefix_is_host (const mfib_prefix_t *p)
 Return true is the prefix is a host prefix. More...
 
fib_forward_chain_type_t mfib_forw_chain_type_from_dpo_proto (dpo_proto_t proto)
 
fib_forward_chain_type_t mfib_forw_chain_type_from_fib_proto (fib_protocol_t proto)
 

Macro Definition Documentation

◆ FOR_EACH_MFIB_ATTRIBUTE

#define FOR_EACH_MFIB_ATTRIBUTE (   _item)
Value:

Definition at line 82 of file mfib_types.h.

◆ FOR_EACH_MFIB_ITF_ATTRIBUTE

#define FOR_EACH_MFIB_ITF_ATTRIBUTE (   _item)
Value:

Definition at line 127 of file mfib_types.h.

◆ FOREACH_MFIB_SOURCE

#define FOREACH_MFIB_SOURCE (   _ms)
Value:

Definition at line 198 of file mfib_types.h.

◆ MFIB_ENTRY_NAMES_LONG

#define MFIB_ENTRY_NAMES_LONG
Value:
{ \
[MFIB_ENTRY_SIGNAL] = "Signal", \
[MFIB_ENTRY_CONNECTED] = "Connected", \
[MFIB_ENTRY_DROP] = "Drop", \
[MFIB_ENTRY_ACCEPT_ALL_ITF] = "Accept-all-itf", \
[MFIB_ENTRY_INHERIT_ACCEPT] = "Inherit-Accept", \
[MFIB_ENTRY_EXCLUSIVE] = "Exclusive", \
}
Exclusive - like its unicast counterpart.
Definition: mfib_types.h:76
The control planes needs packets mathing this entry to generate a signal.
Definition: mfib_types.h:57
The control plane needs to be informed of coneected sources.
Definition: mfib_types.h:65
Drop all traffic to this route.
Definition: mfib_types.h:61
Accept packets from any incpoming interface Use with extreme caution.
Definition: mfib_types.h:70

Definition at line 96 of file mfib_types.h.

◆ MFIB_ENTRY_NAMES_SHORT

#define MFIB_ENTRY_NAMES_SHORT
Value:
{ \
[MFIB_ENTRY_SIGNAL] = "S", \
[MFIB_ENTRY_DROP] = "D", \
}
Exclusive - like its unicast counterpart.
Definition: mfib_types.h:76
The control planes needs packets mathing this entry to generate a signal.
Definition: mfib_types.h:57
The control plane needs to be informed of coneected sources.
Definition: mfib_types.h:65
Drop all traffic to this route.
Definition: mfib_types.h:61
Accept packets from any incpoming interface Use with extreme caution.
Definition: mfib_types.h:70

Definition at line 87 of file mfib_types.h.

◆ MFIB_ITF_NAMES_LONG

#define MFIB_ITF_NAMES_LONG
Value:

Definition at line 140 of file mfib_types.h.

◆ MFIB_ITF_NAMES_SHORT

#define MFIB_ITF_NAMES_SHORT

◆ MFIB_N_SOURCES

#define MFIB_N_SOURCES   (MFIB_SOURCE_DEFAULT_ROUTE + 1)

Definition at line 203 of file mfib_types.h.

◆ MFIB_SOURCE_NAMES

#define MFIB_SOURCE_NAMES

◆ MFIB_SOURCE_NONE

#define MFIB_SOURCE_NONE   (MFIB_SOURCE_DEFAULT_ROUTE + 1)

Definition at line 204 of file mfib_types.h.

Typedef Documentation

◆ mfib_entry_attribute_t

◆ mfib_entry_flags_t

◆ mfib_itf_attribute_t

◆ mfib_itf_flags_t

◆ mfib_prefix_t

typedef struct mfib_prefix_t_ mfib_prefix_t

Aggregate type for a prefix.

◆ mfib_source_t

Possible [control plane] sources of MFIB entries.

Enumeration Type Documentation

◆ mfib_entry_attribute_t_

Enumerator
MFIB_ENTRY_ATTRIBUTE_FIRST 
MFIB_ENTRY_SIGNAL 

The control planes needs packets mathing this entry to generate a signal.

MFIB_ENTRY_DROP 

Drop all traffic to this route.

MFIB_ENTRY_CONNECTED 

The control plane needs to be informed of coneected sources.

MFIB_ENTRY_ACCEPT_ALL_ITF 

Accept packets from any incpoming interface Use with extreme caution.

MFIB_ENTRY_EXCLUSIVE 

Exclusive - like its unicast counterpart.

the source has provided the forwarding DPO directly. The entry therefore does not resolve paths via a path-list

MFIB_ENTRY_INHERIT_ACCEPT 
MFIB_ENTRY_ATTRIBUTE_LAST 

Definition at line 50 of file mfib_types.h.

◆ mfib_entry_flags_t_

Enumerator
MFIB_ENTRY_FLAG_NONE 
MFIB_ENTRY_FLAG_SIGNAL 
MFIB_ENTRY_FLAG_DROP 
MFIB_ENTRY_FLAG_CONNECTED 
MFIB_ENTRY_FLAG_ACCEPT_ALL_ITF 
MFIB_ENTRY_FLAG_EXCLUSIVE 
MFIB_ENTRY_FLAG_INHERIT_ACCEPT 

Definition at line 105 of file mfib_types.h.

◆ mfib_itf_attribute_t_

Enumerator
MFIB_ITF_ATTRIBUTE_FIRST 
MFIB_ITF_NEGATE_SIGNAL 
MFIB_ITF_ACCEPT 
MFIB_ITF_FORWARD 
MFIB_ITF_SIGNAL_PRESENT 
MFIB_ITF_DONT_PRESERVE 
MFIB_ITF_ATTRIBUTE_LAST 

Definition at line 116 of file mfib_types.h.

◆ mfib_itf_flags_t_

Enumerator
MFIB_ITF_FLAG_NONE 
MFIB_ITF_FLAG_NEGATE_SIGNAL 
MFIB_ITF_FLAG_ACCEPT 
MFIB_ITF_FLAG_FORWARD 
MFIB_ITF_FLAG_SIGNAL_PRESENT 
MFIB_ITF_FLAG_DONT_PRESERVE 

Definition at line 148 of file mfib_types.h.

◆ mfib_source_t_

Possible [control plane] sources of MFIB entries.

Enumerator
MFIB_SOURCE_SPECIAL 
MFIB_SOURCE_6RD 
MFIB_SOURCE_API 
MFIB_SOURCE_CLI 
MFIB_SOURCE_VXLAN 
MFIB_SOURCE_DHCP 
MFIB_SOURCE_SRv6 
MFIB_SOURCE_GTPU 
MFIB_SOURCE_VXLAN_GPE 
MFIB_SOURCE_GENEVE 
MFIB_SOURCE_IGMP 
MFIB_SOURCE_VXLAN_GBP 
MFIB_SOURCE_PLUGIN_LOW 
MFIB_SOURCE_RR 
MFIB_SOURCE_DEFAULT_ROUTE 

Definition at line 161 of file mfib_types.h.

Function Documentation

◆ format_mfib_entry_flags()

u8* format_mfib_entry_flags ( u8 s,
va_list *  args 
)

Definition at line 161 of file mfib_types.c.

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

◆ format_mfib_itf_flags()

u8* format_mfib_itf_flags ( u8 s,
va_list *  args 
)

Definition at line 181 of file mfib_types.c.

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

◆ format_mfib_prefix()

u8* format_mfib_prefix ( u8 s,
va_list *  args 
)

Definition at line 106 of file mfib_types.c.

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

◆ mfib_forw_chain_type_from_dpo_proto()

fib_forward_chain_type_t mfib_forw_chain_type_from_dpo_proto ( dpo_proto_t  proto)

Definition at line 71 of file mfib_types.c.

+ Here is the caller graph for this function:

◆ mfib_forw_chain_type_from_fib_proto()

fib_forward_chain_type_t mfib_forw_chain_type_from_fib_proto ( fib_protocol_t  proto)

Definition at line 90 of file mfib_types.c.

◆ mfib_prefix_cmp()

int mfib_prefix_cmp ( const mfib_prefix_t p1,
const mfib_prefix_t p2 
)

Compare two prefixes for equality.

◆ mfib_prefix_is_cover()

int mfib_prefix_is_cover ( const mfib_prefix_t p1,
const mfib_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 30 of file mfib_types.c.

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

◆ mfib_prefix_is_host()

int mfib_prefix_is_host ( const mfib_prefix_t p)

Return true is the prefix is a host prefix.

Definition at line 55 of file mfib_types.c.

+ Here is the caller graph for this function:

◆ unformat_mfib_entry_flags()

uword unformat_mfib_entry_flags ( unformat_input_t input,
va_list *  args 
)

Definition at line 218 of file mfib_types.c.

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

◆ unformat_mfib_itf_flags()

uword unformat_mfib_itf_flags ( unformat_input_t input,
va_list *  args 
)

Definition at line 198 of file mfib_types.c.

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