FD.io VPP  v18.07-rc0-415-g6c78436
Vector Packet Processing
as.c File Reference
+ Include dependency graph for as.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_AS_NH   (1 << 0)
 
#define PARAM_AS_OIF   (1 << 1)
 
#define PARAM_AS_IIF   (1 << 2)
 
#define PARAM_AS_SRC   (1 << 3)
 

Functions

static u8prepare_rewrite (ip6_address_t src_addr, ip6_address_t *sid_list, u8 protocol)
 
static void free_ls_mem (srv6_as_localsid_t *ls_mem)
 
static int srv6_as_localsid_creation_fn (ip6_sr_localsid_t *localsid)
 
static int srv6_as_localsid_removal_fn (ip6_sr_localsid_t *localsid)
 
u8format_srv6_as_localsid (u8 *s, va_list *args)
 
uword unformat_srv6_as_localsid (unformat_input_t *input, va_list *args)
 
static u8format_srv6_as_dpo (u8 *s, va_list *args)
 
void srv6_as_dpo_lock (dpo_id_t *dpo)
 
void srv6_as_dpo_unlock (dpo_id_t *dpo)
 
static clib_error_tsrv6_as_init (vlib_main_t *vm)
 
 VNET_FEATURE_INIT (srv6_as4_rewrite, static)
 
 VNET_FEATURE_INIT (srv6_as6_rewrite, static)
 
 VLIB_PLUGIN_REGISTER ()
 

Variables

unsigned char function_name [] = "SRv6-AS-plugin"
 
unsigned char keyword_str [] = "End.AS"
 
unsigned char def_str []
 
unsigned char params_str []
 
static const dpo_vft_t srv6_as_vft
 
static const char *const srv6_as_ip6_nodes []
 
static const char *const *const srv6_as_nodes [DPO_PROTO_NUM]
 

Macro Definition Documentation

#define PARAM_AS_IIF   (1 << 2)
#define PARAM_AS_NH   (1 << 0)
#define PARAM_AS_OIF   (1 << 1)
#define PARAM_AS_SRC   (1 << 3)
#define SID_CREATE_IFACE_FEATURE_ERROR   -1

Definition at line 27 of file as.c.

#define SID_CREATE_INVALID_ADJ_INDEX   -5

Definition at line 30 of file as.c.

#define SID_CREATE_INVALID_IFACE_INDEX   -4

Definition at line 29 of file as.c.

#define SID_CREATE_INVALID_IFACE_TYPE   -3

Definition at line 28 of file as.c.

Function Documentation

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

Definition at line 409 of file as.c.

+ Here is the call graph for this function:

u8* format_srv6_as_localsid ( u8 s,
va_list *  args 
)

Definition at line 266 of file as.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void free_ls_mem ( srv6_as_localsid_t ls_mem)
inlinestatic

Definition at line 102 of file as.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* prepare_rewrite ( ip6_address_t  src_addr,
ip6_address_t sid_list,
u8  protocol 
)
inlinestatic

Definition at line 41 of file as.c.

+ Here is the caller graph for this function:

void srv6_as_dpo_lock ( dpo_id_t dpo)

Definition at line 418 of file as.c.

void srv6_as_dpo_unlock ( dpo_id_t dpo)

Definition at line 423 of file as.c.

static clib_error_t* srv6_as_init ( vlib_main_t vm)
static

Definition at line 444 of file as.c.

+ Here is the call graph for this function:

static int srv6_as_localsid_creation_fn ( ip6_sr_localsid_t localsid)
static

Definition at line 113 of file as.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int srv6_as_localsid_removal_fn ( ip6_sr_localsid_t localsid)
static

Definition at line 219 of file as.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword unformat_srv6_as_localsid ( unformat_input_t input,
va_list *  args 
)

Definition at line 311 of file as.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VLIB_PLUGIN_REGISTER ( )

+ Here is the caller graph for this function:

VNET_FEATURE_INIT ( srv6_as4_rewrite  ,
static   
)

+ Here is the caller graph for this function:

VNET_FEATURE_INIT ( srv6_as6_rewrite  ,
static   
)

Variable Documentation

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

Definition at line 34 of file as.c.

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

Definition at line 32 of file as.c.

unsigned char keyword_str[] = "End.AS"

Definition at line 33 of file as.c.

unsigned char params_str[]
Initial value:
=
"nh <next-hop> oif <iface-out> iif <iface-in> src <src-addr> next <sid> [next <sid> ...]"

Definition at line 36 of file as.c.

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

Definition at line 433 of file as.c.

const char* const* const srv6_as_nodes[DPO_PROTO_NUM]
static
Initial value:
= {
}
static const char *const srv6_as_ip6_nodes[]
Definition: as.c:433

Definition at line 438 of file as.c.

const dpo_vft_t srv6_as_vft
static
Initial value:
= {
.dv_lock = srv6_as_dpo_lock,
.dv_unlock = srv6_as_dpo_unlock,
.dv_format = format_srv6_as_dpo,
}
void srv6_as_dpo_lock(dpo_id_t *dpo)
Definition: as.c:418
void srv6_as_dpo_unlock(dpo_id_t *dpo)
Definition: as.c:423
static u8 * format_srv6_as_dpo(u8 *s, va_list *args)
Definition: as.c:409

Definition at line 427 of file as.c.