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

Go to the source code of this file.

Macros

#define vl_msg_id(n, h)   n,
 
#define vl_typedefs
 
#define vl_endianfun
 
#define vl_print(handle, ...)   vlib_cli_output (handle, __VA_ARGS__)
 
#define vl_printfun
 
#define vl_api_version(n, v)   static u32 api_version=(v);
 
#define vl_msg_name_crc_list
 
#define REPLY_MSG_ID_BASE   nm->msg_id_base
 
#define foreach_nsh_plugin_api_msg
 

Enumerations

enum  vl_msg_id_t {
  VL_MSG_FIRST_AVAILABLE, VL_ILLEGAL_MESSAGE_ID = 0, VL_MSG_FIRST_AVAILABLE, VL_ILLEGAL_MESSAGE_ID = 0,
  VL_ILLEGAL_MESSAGE_ID = 0, VL_MSG_FIRST_AVAILABLE, VL_MSG_FIRST_AVAILABLE
}
 

Functions

static clib_error_tnsh_interface_admin_up_down (vnet_main_t *vnm, u32 nsh_hw_if, u32 flags)
 CLI function for NSH admin up/down. More...
 
static u8format_nsh_name (u8 *s, va_list *args)
 Naming for NSH tunnel. More...
 
 VNET_DEVICE_CLASS (nsh_device_class, static)
 
static void send_nsh_entry_details (nsh_entry_t *t, vl_api_registration_t *rp, u32 context)
 
static void send_nsh_map_details (nsh_map_t *t, vl_api_registration_t *rp, u32 context)
 
static void vl_api_nsh_map_dump_t_handler (vl_api_nsh_map_dump_t *mp)
 
static void vl_api_nsh_add_del_map_t_handler (vl_api_nsh_add_del_map_t *mp)
 API message handler. More...
 
int nsh_header_rewrite (nsh_entry_t *nsh_entry)
 
int nsh_add_del_map (nsh_add_del_map_args_t *a, u32 *map_indexp)
 Action function to add or del an nsh map. More...
 
int nsh_add_del_proxy_session (nsh_add_del_map_args_t *a)
 Action function to add or del an nsh-proxy-session. More...
 
int nsh_add_del_entry (nsh_add_del_entry_args_t *a, u32 *entry_indexp)
 Action function for adding an NSH entry nsh_add_del_entry_args_t *a: host order. More...
 
static void vl_api_nsh_add_del_entry_t_handler (vl_api_nsh_add_del_entry_t *mp)
 API message handler. More...
 
static void vl_api_nsh_entry_dump_t_handler (vl_api_nsh_entry_dump_t *mp)
 
static void setup_message_id_table (nsh_main_t *nm, api_main_t *am)
 
static clib_error_tnsh_plugin_api_hookup (vlib_main_t *vm)
 
clib_error_tnsh_api_init (vlib_main_t *vm, nsh_main_t *nm)
 

Variables

vnet_hw_interface_class_t nsh_hw_class
 

Macro Definition Documentation

◆ foreach_nsh_plugin_api_msg

#define foreach_nsh_plugin_api_msg
Value:
_(NSH_ADD_DEL_ENTRY, nsh_add_del_entry) \
_(NSH_ENTRY_DUMP, nsh_entry_dump) \
_(NSH_ADD_DEL_MAP, nsh_add_del_map) \
_(NSH_MAP_DUMP, nsh_map_dump)
int nsh_add_del_map(nsh_add_del_map_args_t *a, u32 *map_indexp)
Action function to add or del an nsh map.
Definition: nsh_api.c:347
int nsh_add_del_entry(nsh_add_del_entry_args_t *a, u32 *entry_indexp)
Action function for adding an NSH entry nsh_add_del_entry_args_t *a: host order.
Definition: nsh_api.c:511

Definition at line 65 of file nsh_api.c.

◆ REPLY_MSG_ID_BASE

#define REPLY_MSG_ID_BASE   nm->msg_id_base

Definition at line 60 of file nsh_api.c.

◆ vl_api_version

#define vl_api_version (   n,
 
)    static u32 api_version=(v);

Definition at line 52 of file nsh_api.c.

◆ vl_endianfun

#define vl_endianfun

Definition at line 41 of file nsh_api.c.

◆ vl_msg_id

#define vl_msg_id (   n,
  h 
)    n,

Definition at line 26 of file nsh_api.c.

◆ vl_msg_name_crc_list

#define vl_msg_name_crc_list

Definition at line 56 of file nsh_api.c.

◆ vl_print

#define vl_print (   handle,
  ... 
)    vlib_cli_output (handle, __VA_ARGS__)

Definition at line 46 of file nsh_api.c.

◆ vl_printfun

#define vl_printfun

Definition at line 47 of file nsh_api.c.

◆ vl_typedefs

#define vl_typedefs

Definition at line 36 of file nsh_api.c.

Enumeration Type Documentation

◆ vl_msg_id_t

Enumerator
VL_MSG_FIRST_AVAILABLE 
VL_ILLEGAL_MESSAGE_ID 
VL_MSG_FIRST_AVAILABLE 
VL_ILLEGAL_MESSAGE_ID 
VL_ILLEGAL_MESSAGE_ID 
VL_MSG_FIRST_AVAILABLE 
VL_MSG_FIRST_AVAILABLE 

Definition at line 27 of file nsh_api.c.

Function Documentation

◆ format_nsh_name()

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

Naming for NSH tunnel.

Parameters
*sformatting string
*args
Returns
*s formatted string

Definition at line 103 of file nsh_api.c.

+ Here is the call graph for this function:

◆ nsh_add_del_entry()

int nsh_add_del_entry ( nsh_add_del_entry_args_t a,
u32 entry_indexp 
)

Action function for adding an NSH entry nsh_add_del_entry_args_t *a: host order.

Definition at line 511 of file nsh_api.c.

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

◆ nsh_add_del_map()

int nsh_add_del_map ( nsh_add_del_map_args_t a,
u32 map_indexp 
)

Action function to add or del an nsh map.

Shared by both CLI and binary API

Definition at line 347 of file nsh_api.c.

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

◆ nsh_add_del_proxy_session()

int nsh_add_del_proxy_session ( nsh_add_del_map_args_t a)

Action function to add or del an nsh-proxy-session.

Shared by both CLI and binary API

Definition at line 449 of file nsh_api.c.

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

◆ nsh_api_init()

clib_error_t* nsh_api_init ( vlib_main_t vm,
nsh_main_t nm 
)

Definition at line 702 of file nsh_api.c.

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

◆ nsh_header_rewrite()

int nsh_header_rewrite ( nsh_entry_t nsh_entry)

Definition at line 245 of file nsh_api.c.

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

◆ nsh_interface_admin_up_down()

static clib_error_t* nsh_interface_admin_up_down ( vnet_main_t vnm,
u32  nsh_hw_if,
u32  flags 
)
static

CLI function for NSH admin up/down.

Parameters
*vnm
nsh_hw_if
flag
Returns
*rc

Definition at line 82 of file nsh_api.c.

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

◆ nsh_plugin_api_hookup()

static clib_error_t* nsh_plugin_api_hookup ( vlib_main_t vm)
static

Definition at line 684 of file nsh_api.c.

+ Here is the caller graph for this function:

◆ send_nsh_entry_details()

static void send_nsh_entry_details ( nsh_entry_t t,
vl_api_registration_t rp,
u32  context 
)
static

Definition at line 118 of file nsh_api.c.

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

◆ send_nsh_map_details()

static void send_nsh_map_details ( nsh_map_t t,
vl_api_registration_t rp,
u32  context 
)
static

Definition at line 155 of file nsh_api.c.

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

◆ setup_message_id_table()

static void setup_message_id_table ( nsh_main_t nm,
api_main_t am 
)
static

Definition at line 674 of file nsh_api.c.

+ Here is the caller graph for this function:

◆ vl_api_nsh_add_del_entry_t_handler()

static void vl_api_nsh_add_del_entry_t_handler ( vl_api_nsh_add_del_entry_t mp)
static

API message handler.

Definition at line 594 of file nsh_api.c.

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

◆ vl_api_nsh_add_del_map_t_handler()

static void vl_api_nsh_add_del_map_t_handler ( vl_api_nsh_add_del_map_t mp)
static

API message handler.

Definition at line 212 of file nsh_api.c.

+ Here is the call graph for this function:

◆ vl_api_nsh_entry_dump_t_handler()

static void vl_api_nsh_entry_dump_t_handler ( vl_api_nsh_entry_dump_t mp)
static

Definition at line 640 of file nsh_api.c.

+ Here is the call graph for this function:

◆ vl_api_nsh_map_dump_t_handler()

static void vl_api_nsh_map_dump_t_handler ( vl_api_nsh_map_dump_t mp)
static

Definition at line 177 of file nsh_api.c.

+ Here is the call graph for this function:

◆ VNET_DEVICE_CLASS()

VNET_DEVICE_CLASS ( nsh_device_class  ,
static   
)
+ Here is the caller graph for this function:

Variable Documentation

◆ nsh_hw_class