FD.io VPP  v20.01-48-g3e0dafb74
Vector Packet Processing
ad.c File Reference
+ Include dependency graph for ad.c:

Go to the source code of this file.

Macros

#define SID_CREATE_IFACE_FEATURE_ERROR   -1
 
#define SID_CREATE_INVALID_IFACE_TYPE   -3
 
#define SID_CREATE_INVALID_IFACE_INDEX   -4
 
#define SID_CREATE_INVALID_ADJ_INDEX   -5
 
#define PARAM_AD_NH   (1 << 0)
 
#define PARAM_AD_OIF   (1 << 1)
 
#define PARAM_AD_IIF   (1 << 2)
 

Functions

static int srv6_ad_localsid_creation_fn (ip6_sr_localsid_t *localsid)
 
static int srv6_ad_localsid_removal_fn (ip6_sr_localsid_t *localsid)
 
u8format_srv6_ad_localsid (u8 *s, va_list *args)
 
uword unformat_srv6_ad_localsid (unformat_input_t *input, va_list *args)
 
static u8format_srv6_ad_dpo (u8 *s, va_list *args)
 
void srv6_ad_dpo_lock (dpo_id_t *dpo)
 
void srv6_ad_dpo_unlock (dpo_id_t *dpo)
 
static clib_error_tsrv6_ad_init (vlib_main_t *vm)
 
 VNET_FEATURE_INIT (srv6_ad2_rewrite, static)
 
 VNET_FEATURE_INIT (srv6_ad4_rewrite, static)
 
 VNET_FEATURE_INIT (srv6_ad6_rewrite, static)
 
 VLIB_PLUGIN_REGISTER ()
 

Variables

unsigned char function_name [] = "SRv6-AD-plugin"
 
unsigned char keyword_str [] = "End.AD"
 
unsigned char def_str []
 
unsigned char params_str [] = "nh <next-hop> oif <iface-out> iif <iface-in>"
 
srv6_ad_main_t srv6_ad_main
 
static const dpo_vft_t srv6_ad_vft
 
static const char *const srv6_ad_ip6_nodes []
 
static const char *const *const srv6_ad_nodes [DPO_PROTO_NUM]
 

Macro Definition Documentation

◆ PARAM_AD_IIF

#define PARAM_AD_IIF   (1 << 2)

◆ PARAM_AD_NH

#define PARAM_AD_NH   (1 << 0)

◆ PARAM_AD_OIF

#define PARAM_AD_OIF   (1 << 1)

◆ SID_CREATE_IFACE_FEATURE_ERROR

#define SID_CREATE_IFACE_FEATURE_ERROR   -1

Definition at line 27 of file ad.c.

◆ SID_CREATE_INVALID_ADJ_INDEX

#define SID_CREATE_INVALID_ADJ_INDEX   -5

Definition at line 30 of file ad.c.

◆ SID_CREATE_INVALID_IFACE_INDEX

#define SID_CREATE_INVALID_IFACE_INDEX   -4

Definition at line 29 of file ad.c.

◆ SID_CREATE_INVALID_IFACE_TYPE

#define SID_CREATE_INVALID_IFACE_TYPE   -3

Definition at line 28 of file ad.c.

Function Documentation

◆ format_srv6_ad_dpo()

static u8* format_srv6_ad_dpo ( u8 s,
va_list *  args 
)
static

Definition at line 376 of file ad.c.

+ Here is the call graph for this function:

◆ format_srv6_ad_localsid()

u8* format_srv6_ad_localsid ( u8 s,
va_list *  args 
)

Definition at line 250 of file ad.c.

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

◆ srv6_ad_dpo_lock()

void srv6_ad_dpo_lock ( dpo_id_t dpo)

Definition at line 385 of file ad.c.

◆ srv6_ad_dpo_unlock()

void srv6_ad_dpo_unlock ( dpo_id_t dpo)

Definition at line 390 of file ad.c.

◆ srv6_ad_init()

static clib_error_t* srv6_ad_init ( vlib_main_t vm)
static

Definition at line 411 of file ad.c.

+ Here is the call graph for this function:

◆ srv6_ad_localsid_creation_fn()

static int srv6_ad_localsid_creation_fn ( ip6_sr_localsid_t localsid)
static

Definition at line 43 of file ad.c.

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

◆ srv6_ad_localsid_removal_fn()

static int srv6_ad_localsid_removal_fn ( ip6_sr_localsid_t localsid)
static

Definition at line 183 of file ad.c.

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

◆ unformat_srv6_ad_localsid()

uword unformat_srv6_ad_localsid ( unformat_input_t input,
va_list *  args 
)

Definition at line 295 of file ad.c.

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

◆ VLIB_PLUGIN_REGISTER()

VLIB_PLUGIN_REGISTER ( )

◆ VNET_FEATURE_INIT() [1/3]

VNET_FEATURE_INIT ( srv6_ad2_rewrite  ,
static   
)
+ Here is the caller graph for this function:

◆ VNET_FEATURE_INIT() [2/3]

VNET_FEATURE_INIT ( srv6_ad4_rewrite  ,
static   
)

◆ VNET_FEATURE_INIT() [3/3]

VNET_FEATURE_INIT ( srv6_ad6_rewrite  ,
static   
)

Variable Documentation

◆ def_str

unsigned char def_str[]
Initial value:
=
"Endpoint with dynamic proxy to SR-unaware appliance"

Definition at line 34 of file ad.c.

◆ function_name

unsigned char function_name[] = "SRv6-AD-plugin"

Definition at line 32 of file ad.c.

◆ keyword_str

unsigned char keyword_str[] = "End.AD"

Definition at line 33 of file ad.c.

◆ params_str

unsigned char params_str[] = "nh <next-hop> oif <iface-out> iif <iface-in>"

Definition at line 36 of file ad.c.

◆ srv6_ad_ip6_nodes

const char* const srv6_ad_ip6_nodes[]
static
Initial value:
= {
"srv6-ad-localsid",
}
#define NULL
Definition: clib.h:58

Definition at line 400 of file ad.c.

◆ srv6_ad_main

srv6_ad_main_t srv6_ad_main

Definition at line 38 of file ad.c.

◆ srv6_ad_nodes

const char* const* const srv6_ad_nodes[DPO_PROTO_NUM]
static
Initial value:
= {
}

Definition at line 405 of file ad.c.

◆ srv6_ad_vft

const dpo_vft_t srv6_ad_vft
static
Initial value:
= {
.dv_lock = srv6_ad_dpo_lock,
.dv_unlock = srv6_ad_dpo_unlock,
.dv_format = format_srv6_ad_dpo,
}

Definition at line 394 of file ad.c.