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

Go to the source code of this file.

Data Structures

struct  tunnel_t_
 A representation of an IP tunnel config. More...
 

Macros

#define foreach_tunnel_mode
 
#define foreach_tunnel_encap_decap_flag
 Keep these idenitical to those in ipip.api. More...
 
#define foreach_tunnel_flag
 

Typedefs

typedef enum tunnel_mode_t_ tunnel_mode_t
 
typedef enum tunnel_encap_decap_flags_t_ tunnel_encap_decap_flags_t
 
typedef enum tunnel_flags_t_ tunnel_flags_t
 
typedef struct tunnel_t_ tunnel_t
 A representation of an IP tunnel config. More...
 

Enumerations

enum  tunnel_mode_t_ { foreach_tunnel_mode }
 
enum  tunnel_encap_decap_flags_t_ { foreach_tunnel_encap_decap_flag }
 
enum  tunnel_flags_t_ { TUNNEL_FLAG_NONE = 0, foreach_tunnel_flag }
 

Functions

u8format_tunnel_mode (u8 *s, va_list *args)
 
uword unformat_tunnel_mode (unformat_input_t *input, va_list *args)
 
u8format_tunnel_encap_decap_flags (u8 *s, va_list *args)
 
uword unformat_tunnel_encap_decap_flags (unformat_input_t *input, va_list *args)
 
u8format_tunnel_flags (u8 *s, va_list *args)
 
uword unformat_tunnel_flags (unformat_input_t *input, va_list *args)
 
u8format_tunnel (u8 *s, va_list *args)
 
uword unformat_tunnel (unformat_input_t *input, va_list *args)
 
void tunnel_copy (const tunnel_t *src, tunnel_t *dst)
 
int tunnel_resolve (tunnel_t *t, fib_node_type_t child_type, index_t child_index)
 
void tunnel_unresolve (tunnel_t *t)
 
ip_address_family_t tunnel_get_af (const tunnel_t *t)
 
void tunnel_contribute_forwarding (const tunnel_t *t, dpo_id_t *dpo)
 
void tunnel_build_v6_hdr (const tunnel_t *t, ip_protocol_t next_proto, ip6_header_t *ip)
 
void tunnel_build_v4_hdr (const tunnel_t *t, ip_protocol_t next_proto, ip4_header_t *ip)
 

Variables

const u8 TUNNEL_ENCAP_DECAP_FLAG_MASK
 
const u8 TUNNEL_FLAG_MASK
 

Macro Definition Documentation

◆ foreach_tunnel_encap_decap_flag

#define foreach_tunnel_encap_decap_flag
Value:
_ (NONE, "none", 0x0) \
_ (ENCAP_COPY_DF, "encap-copy-df", 0x1) \
_ (ENCAP_SET_DF, "encap-set-df", 0x2) \
_ (ENCAP_COPY_DSCP, "encap-copy-dscp", 0x4) \
_ (ENCAP_COPY_ECN, "encap-copy-ecn", 0x8) \
_ (DECAP_COPY_ECN, "decap-copy-ecn", 0x10) \
_ (ENCAP_INNER_HASH, "encap-inner-hash", 0x20) \
_ (ENCAP_COPY_HOP_LIMIT, "encap-copy-hop-limit", 0x40) \
_ (ENCAP_COPY_FLOW_LABEL, "encap-copy-flow-label", 0x80)

Keep these idenitical to those in ipip.api.

Definition at line 41 of file tunnel.h.

◆ foreach_tunnel_flag

#define foreach_tunnel_flag
Value:
_ (RESOLVED, 0, "resolved") \
_ (TRACK_MTU, 1, "track-mtu")

Definition at line 65 of file tunnel.h.

◆ foreach_tunnel_mode

#define foreach_tunnel_mode
Value:
_(P2P, "point-to-point") \
_(MP, "multi-point") \

Definition at line 24 of file tunnel.h.

Typedef Documentation

◆ tunnel_encap_decap_flags_t

◆ tunnel_flags_t

◆ tunnel_mode_t

◆ tunnel_t

typedef struct tunnel_t_ tunnel_t

A representation of an IP tunnel config.

Enumeration Type Documentation

◆ tunnel_encap_decap_flags_t_

Enumerator
foreach_tunnel_encap_decap_flag 

Definition at line 52 of file tunnel.h.

◆ tunnel_flags_t_

Enumerator
TUNNEL_FLAG_NONE 
foreach_tunnel_flag 

Definition at line 69 of file tunnel.h.

◆ tunnel_mode_t_

Enumerator
foreach_tunnel_mode 

Definition at line 28 of file tunnel.h.

Function Documentation

◆ format_tunnel()

u8* format_tunnel ( u8 s,
va_list *  args 
)

Definition at line 150 of file tunnel.c.

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

◆ format_tunnel_encap_decap_flags()

u8* format_tunnel_encap_decap_flags ( u8 s,
va_list *  args 
)

Definition at line 67 of file tunnel.c.

+ Here is the caller graph for this function:

◆ format_tunnel_flags()

u8* format_tunnel_flags ( u8 s,
va_list *  args 
)

Definition at line 96 of file tunnel.c.

+ Here is the caller graph for this function:

◆ format_tunnel_mode()

u8* format_tunnel_mode ( u8 s,
va_list *  args 
)

Definition at line 36 of file tunnel.c.

+ Here is the caller graph for this function:

◆ tunnel_build_v4_hdr()

void tunnel_build_v4_hdr ( const tunnel_t t,
ip_protocol_t  next_proto,
ip4_header_t ip 
)

Definition at line 247 of file tunnel.c.

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

◆ tunnel_build_v6_hdr()

void tunnel_build_v6_hdr ( const tunnel_t t,
ip_protocol_t  next_proto,
ip6_header_t ip 
)

Definition at line 229 of file tunnel.c.

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

◆ tunnel_contribute_forwarding()

void tunnel_contribute_forwarding ( const tunnel_t t,
dpo_id_t dpo 
)

Definition at line 218 of file tunnel.c.

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

◆ tunnel_copy()

void tunnel_copy ( const tunnel_t src,
tunnel_t dst 
)

Definition at line 131 of file tunnel.c.

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

◆ tunnel_get_af()

ip_address_family_t tunnel_get_af ( const tunnel_t t)

Definition at line 125 of file tunnel.c.

+ Here is the caller graph for this function:

◆ tunnel_resolve()

int tunnel_resolve ( tunnel_t t,
fib_node_type_t  child_type,
index_t  child_index 
)

Definition at line 189 of file tunnel.c.

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

◆ tunnel_unresolve()

void tunnel_unresolve ( tunnel_t t)

Definition at line 209 of file tunnel.c.

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

◆ unformat_tunnel()

uword unformat_tunnel ( unformat_input_t input,
va_list *  args 
)

Definition at line 168 of file tunnel.c.

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

◆ unformat_tunnel_encap_decap_flags()

uword unformat_tunnel_encap_decap_flags ( unformat_input_t input,
va_list *  args 
)

Definition at line 82 of file tunnel.c.

+ Here is the caller graph for this function:

◆ unformat_tunnel_flags()

uword unformat_tunnel_flags ( unformat_input_t input,
va_list *  args 
)

Definition at line 110 of file tunnel.c.

+ Here is the caller graph for this function:

◆ unformat_tunnel_mode()

uword unformat_tunnel_mode ( unformat_input_t input,
va_list *  args 
)

Definition at line 53 of file tunnel.c.

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

Variable Documentation

◆ TUNNEL_ENCAP_DECAP_FLAG_MASK

const u8 TUNNEL_ENCAP_DECAP_FLAG_MASK

Definition at line 24 of file tunnel.c.

◆ TUNNEL_FLAG_MASK

const u8 TUNNEL_FLAG_MASK

Definition at line 29 of file tunnel.c.