FD.io VPP  v17.07.01-10-g3be13f0
Vector Packet Processing
ip_api.c File Reference
+ Include dependency graph for ip_api.c:

Go to the source code of this file.

Data Structures

struct  vl_api_ip_fib_dump_walk_ctx_t_
 
struct  apt_ip6_fib_show_ctx_t_
 
struct  vl_api_ip_mfib_dump_ctc_t_
 
struct  vl_api_ip6_mfib_dump_ctc_t_
 
struct  api_ip6nd_proxy_fib_table_walk_ctx_t_
 

Macros

#define vl_typedefs   /* define message structures */
 
#define vl_endianfun   /* define message structures */
 
#define vl_print(handle, ...)   vlib_cli_output (handle, __VA_ARGS__)
 
#define vl_printfun
 
#define foreach_ip_api_msg
 
#define vl_msg_name_crc_list
 

Typedefs

typedef struct vl_api_ip_fib_dump_walk_ctx_t_ vl_api_ip_fib_dump_walk_ctx_t
 
typedef struct apt_ip6_fib_show_ctx_t_ api_ip6_fib_show_ctx_t
 
typedef struct vl_api_ip_mfib_dump_ctc_t_ vl_api_ip_mfib_dump_ctc_t
 
typedef struct vl_api_ip6_mfib_dump_ctc_t_ vl_api_ip6_mfib_dump_ctc_t
 
typedef struct api_ip6nd_proxy_fib_table_walk_ctx_t_ api_ip6nd_proxy_fib_table_walk_ctx_t
 

Functions

void stats_dslock_with_hint (int hint, int tag)
 
void stats_dsunlock (void)
 
static void send_ip_neighbor_details (u8 is_ipv6, u8 is_static, u8 *mac_address, u8 *ip_address, unix_shared_memory_queue_t *q, u32 context)
 
static void vl_api_ip_neighbor_dump_t_handler (vl_api_ip_neighbor_dump_t *mp)
 
void copy_fib_next_hop (fib_route_path_encode_t *api_rpath, void *fp_arg)
 
static void send_ip_fib_details (vpe_api_main_t *am, unix_shared_memory_queue_t *q, u32 table_id, fib_prefix_t *pfx, fib_route_path_encode_t *api_rpaths, u32 context)
 
static int vl_api_ip_fib_dump_walk (fib_node_index_t fei, void *arg)
 
static void vl_api_ip_fib_dump_t_handler (vl_api_ip_fib_dump_t *mp)
 
static void send_ip6_fib_details (vpe_api_main_t *am, unix_shared_memory_queue_t *q, u32 table_id, fib_prefix_t *pfx, fib_route_path_encode_t *api_rpaths, u32 context)
 
static void api_ip6_fib_table_put_entries (clib_bihash_kv_24_8_t *kvp, void *arg)
 
static void api_ip6_fib_table_get_all (unix_shared_memory_queue_t *q, vl_api_ip6_fib_dump_t *mp, fib_table_t *fib_table)
 
static void vl_api_ip6_fib_dump_t_handler (vl_api_ip6_fib_dump_t *mp)
 
static void send_ip_mfib_details (unix_shared_memory_queue_t *q, u32 context, u32 table_id, fib_node_index_t mfei)
 
static int vl_api_ip_mfib_table_dump_walk (fib_node_index_t fei, void *arg)
 
static void vl_api_ip_mfib_dump_t_handler (vl_api_ip_mfib_dump_t *mp)
 
static void send_ip6_mfib_details (vpe_api_main_t *am, unix_shared_memory_queue_t *q, u32 table_id, mfib_prefix_t *pfx, fib_route_path_encode_t *api_rpaths, u32 context)
 
static int vl_api_ip6_mfib_table_dump_walk (fib_node_index_t fei, void *arg)
 
static void vl_api_ip6_mfib_dump_t_handler (vl_api_ip6_mfib_dump_t *mp)
 
static void vl_api_ip_neighbor_add_del_t_handler (vl_api_ip_neighbor_add_del_t *mp, vlib_main_t *vm)
 
int add_del_route_t_handler (u8 is_multipath, u8 is_add, u8 is_drop, u8 is_unreach, u8 is_prohibit, u8 is_local, u8 is_multicast, u8 is_classify, u32 classify_table_index, u8 is_resolve_host, u8 is_resolve_attached, u8 is_interface_rx, u8 is_rpf_id, u32 fib_index, const fib_prefix_t *prefix, u8 next_hop_proto_is_ip4, const ip46_address_t *next_hop, u32 next_hop_sw_if_index, u8 next_hop_fib_index, u32 next_hop_weight, mpls_label_t next_hop_via_label, mpls_label_t *next_hop_out_label_stack)
 
int add_del_route_check (fib_protocol_t table_proto, u32 table_id, u32 next_hop_sw_if_index, fib_protocol_t next_hop_table_proto, u32 next_hop_table_id, u8 create_missing_tables, u8 is_rpf_id, u32 *fib_index, u32 *next_hop_fib_index)
 
static int ip4_add_del_route_t_handler (vl_api_ip_add_del_route_t *mp)
 
static int ip6_add_del_route_t_handler (vl_api_ip_add_del_route_t *mp)
 
void vl_api_ip_add_del_route_t_handler (vl_api_ip_add_del_route_t *mp)
 
static int add_del_mroute_check (fib_protocol_t table_proto, u32 table_id, u32 next_hop_sw_if_index, u8 is_local, u8 create_missing_tables, u32 *fib_index)
 
static int mroute_add_del_handler (u8 is_add, u8 is_local, u32 fib_index, const mfib_prefix_t *prefix, u32 entry_flags, fib_rpf_id_t rpf_id, u32 next_hop_sw_if_index, u32 itf_flags)
 
static int api_mroute_add_del_t_handler (vl_api_ip_mroute_add_del_t *mp)
 
void vl_api_ip_mroute_add_del_t_handler (vl_api_ip_mroute_add_del_t *mp)
 
static void send_ip_details (vpe_api_main_t *am, unix_shared_memory_queue_t *q, u32 sw_if_index, u8 is_ipv6, u32 context)
 
static void send_ip_address_details (vpe_api_main_t *am, unix_shared_memory_queue_t *q, u8 *ip, u16 prefix_length, u32 sw_if_index, u8 is_ipv6, u32 context)
 
static void vl_api_ip_address_dump_t_handler (vl_api_ip_address_dump_t *mp)
 
static void vl_api_ip_dump_t_handler (vl_api_ip_dump_t *mp)
 
static void set_ip6_flow_hash (vl_api_set_ip_flow_hash_t *mp)
 
static void set_ip4_flow_hash (vl_api_set_ip_flow_hash_t *mp)
 
static void vl_api_set_ip_flow_hash_t_handler (vl_api_set_ip_flow_hash_t *mp)
 
static void vl_api_sw_interface_ip6nd_ra_config_t_handler (vl_api_sw_interface_ip6nd_ra_config_t *mp)
 
static void vl_api_sw_interface_ip6nd_ra_prefix_t_handler (vl_api_sw_interface_ip6nd_ra_prefix_t *mp)
 
static void send_ip6nd_proxy_details (unix_shared_memory_queue_t *q, u32 context, const ip46_address_t *addr, u32 sw_if_index)
 
static int api_ip6nd_proxy_fib_table_walk (fib_node_index_t fei, void *arg)
 
static void vl_api_ip6nd_proxy_dump_t_handler (vl_api_ip6nd_proxy_dump_t *mp)
 
static void vl_api_ip6nd_proxy_add_del_t_handler (vl_api_ip6nd_proxy_add_del_t *mp)
 
static void vl_api_sw_interface_ip6_enable_disable_t_handler (vl_api_sw_interface_ip6_enable_disable_t *mp)
 
static void vl_api_sw_interface_ip6_set_link_local_address_t_handler (vl_api_sw_interface_ip6_set_link_local_address_t *mp)
 
void vl_mfib_signal_send_one (unix_shared_memory_queue_t *q, u32 context, const mfib_signal_t *mfs)
 
static void vl_api_mfib_signal_dump_t_handler (vl_api_mfib_signal_dump_t *mp)
 
static void setup_message_id_table (api_main_t *am)
 
static clib_error_tip_api_hookup (vlib_main_t *vm)
 
 VLIB_API_INIT_FUNCTION (ip_api_hookup)
 

Macro Definition Documentation

#define foreach_ip_api_msg
Value:
_(IP_FIB_DUMP, ip_fib_dump) \
_(IP6_FIB_DUMP, ip6_fib_dump) \
_(IP_MFIB_DUMP, ip_mfib_dump) \
_(IP6_MFIB_DUMP, ip6_mfib_dump) \
_(IP_NEIGHBOR_DUMP, ip_neighbor_dump) \
_(IP_MROUTE_ADD_DEL, ip_mroute_add_del) \
_(MFIB_SIGNAL_DUMP, mfib_signal_dump) \
_(IP_ADDRESS_DUMP, ip_address_dump) \
_(IP_DUMP, ip_dump) \
_(IP_NEIGHBOR_ADD_DEL, ip_neighbor_add_del) \
_(IP_ADD_DEL_ROUTE, ip_add_del_route) \
_(SET_IP_FLOW_HASH,set_ip_flow_hash) \
_(SW_INTERFACE_IP6ND_RA_CONFIG, sw_interface_ip6nd_ra_config) \
_(SW_INTERFACE_IP6ND_RA_PREFIX, sw_interface_ip6nd_ra_prefix) \
_(IP6ND_PROXY_ADD_DEL, ip6nd_proxy_add_del) \
_(IP6ND_PROXY_DUMP, ip6nd_proxy_dump) \
_(SW_INTERFACE_IP6_ENABLE_DISABLE, sw_interface_ip6_enable_disable ) \
_(SW_INTERFACE_IP6_SET_LINK_LOCAL_ADDRESS, \
sw_interface_ip6_set_link_local_address)

Definition at line 60 of file ip_api.c.

#define vl_endianfun   /* define message structures */

Definition at line 47 of file ip_api.c.

#define vl_msg_name_crc_list

Definition at line 1680 of file ip_api.c.

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

Definition at line 52 of file ip_api.c.

#define vl_printfun

Definition at line 53 of file ip_api.c.

#define vl_typedefs   /* define message structures */

Definition at line 43 of file ip_api.c.

Typedef Documentation

Function Documentation

static int add_del_mroute_check ( fib_protocol_t  table_proto,
u32  table_id,
u32  next_hop_sw_if_index,
u8  is_local,
u8  create_missing_tables,
u32 fib_index 
)
static

Definition at line 1062 of file ip_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int add_del_route_check ( fib_protocol_t  table_proto,
u32  table_id,
u32  next_hop_sw_if_index,
fib_protocol_t  next_hop_table_proto,
u32  next_hop_table_id,
u8  create_missing_tables,
u8  is_rpf_id,
u32 fib_index,
u32 next_hop_fib_index 
)

Definition at line 857 of file ip_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int add_del_route_t_handler ( u8  is_multipath,
u8  is_add,
u8  is_drop,
u8  is_unreach,
u8  is_prohibit,
u8  is_local,
u8  is_multicast,
u8  is_classify,
u32  classify_table_index,
u8  is_resolve_host,
u8  is_resolve_attached,
u8  is_interface_rx,
u8  is_rpf_id,
u32  fib_index,
const fib_prefix_t prefix,
u8  next_hop_proto_is_ip4,
const ip46_address_t *  next_hop,
u32  next_hop_sw_if_index,
u8  next_hop_fib_index,
u32  next_hop_weight,
mpls_label_t  next_hop_via_label,
mpls_label_t next_hop_out_label_stack 
)

Definition at line 700 of file ip_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void api_ip6_fib_table_get_all ( unix_shared_memory_queue_t q,
vl_api_ip6_fib_dump_t mp,
fib_table_t fib_table 
)
static

Definition at line 387 of file ip_api.c.

+ Here is the call graph for this function:

static void api_ip6_fib_table_put_entries ( clib_bihash_kv_24_8_t kvp,
void *  arg 
)
static

Definition at line 376 of file ip_api.c.

+ Here is the caller graph for this function:

static int api_ip6nd_proxy_fib_table_walk ( fib_node_index_t  fei,
void *  arg 
)
static

Definition at line 1476 of file ip_api.c.

+ Here is the call graph for this function:

static int api_mroute_add_del_t_handler ( vl_api_ip_mroute_add_del_t mp)
static

Definition at line 1140 of file ip_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void copy_fib_next_hop ( fib_route_path_encode_t api_rpath,
void *  fp_arg 
)

Definition at line 154 of file ip_api.c.

+ Here is the caller graph for this function:

static int ip4_add_del_route_t_handler ( vl_api_ip_add_del_route_t mp)
static

Definition at line 926 of file ip_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int ip6_add_del_route_t_handler ( vl_api_ip_add_del_route_t mp)
static

Definition at line 985 of file ip_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* ip_api_hookup ( vlib_main_t vm)
static

Definition at line 1693 of file ip_api.c.

+ Here is the call graph for this function:

static int mroute_add_del_handler ( u8  is_add,
u8  is_local,
u32  fib_index,
const mfib_prefix_t prefix,
u32  entry_flags,
fib_rpf_id_t  rpf_id,
u32  next_hop_sw_if_index,
u32  itf_flags 
)
static

Definition at line 1097 of file ip_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void send_ip6_fib_details ( vpe_api_main_t am,
unix_shared_memory_queue_t q,
u32  table_id,
fib_prefix_t pfx,
fib_route_path_encode_t api_rpaths,
u32  context 
)
static

Definition at line 306 of file ip_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void send_ip6_mfib_details ( vpe_api_main_t am,
unix_shared_memory_queue_t q,
u32  table_id,
mfib_prefix_t pfx,
fib_route_path_encode_t api_rpaths,
u32  context 
)
static

Definition at line 543 of file ip_api.c.

+ Here is the call graph for this function:

static void send_ip6nd_proxy_details ( unix_shared_memory_queue_t q,
u32  context,
const ip46_address_t *  addr,
u32  sw_if_index 
)
static

Definition at line 1454 of file ip_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void send_ip_address_details ( vpe_api_main_t am,
unix_shared_memory_queue_t q,
u8 ip,
u16  prefix_length,
u32  sw_if_index,
u8  is_ipv6,
u32  context 
)
static

Definition at line 1220 of file ip_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void send_ip_details ( vpe_api_main_t am,
unix_shared_memory_queue_t q,
u32  sw_if_index,
u8  is_ipv6,
u32  context 
)
static

Definition at line 1202 of file ip_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void send_ip_fib_details ( vpe_api_main_t am,
unix_shared_memory_queue_t q,
u32  table_id,
fib_prefix_t pfx,
fib_route_path_encode_t api_rpaths,
u32  context 
)
static

Definition at line 180 of file ip_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void send_ip_mfib_details ( unix_shared_memory_queue_t q,
u32  context,
u32  table_id,
fib_node_index_t  mfei 
)
static

Definition at line 441 of file ip_api.c.

+ Here is the call graph for this function:

static void send_ip_neighbor_details ( u8  is_ipv6,
u8  is_static,
u8 mac_address,
u8 ip_address,
unix_shared_memory_queue_t q,
u32  context 
)
static

Definition at line 85 of file ip_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void set_ip4_flow_hash ( vl_api_set_ip_flow_hash_t mp)
static

Definition at line 1361 of file ip_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void set_ip6_flow_hash ( vl_api_set_ip_flow_hash_t mp)
static

Definition at line 1342 of file ip_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void setup_message_id_table ( api_main_t am)
static

Definition at line 1685 of file ip_api.c.

+ Here is the caller graph for this function:

void stats_dslock_with_hint ( int  hint,
int  tag 
)

Definition at line 310 of file interface_api.c.

+ Here is the caller graph for this function:

void stats_dsunlock ( void  )

Definition at line 316 of file interface_api.c.

+ Here is the caller graph for this function:

static void vl_api_ip6_fib_dump_t_handler ( vl_api_ip6_fib_dump_t mp)
static

Definition at line 422 of file ip_api.c.

+ Here is the call graph for this function:

static void vl_api_ip6_mfib_dump_t_handler ( vl_api_ip6_mfib_dump_t mp)
static

Definition at line 600 of file ip_api.c.

+ Here is the call graph for this function:

static int vl_api_ip6_mfib_table_dump_walk ( fib_node_index_t  fei,
void *  arg 
)
static

Definition at line 590 of file ip_api.c.

static void vl_api_ip6nd_proxy_add_del_t_handler ( vl_api_ip6nd_proxy_add_del_t mp)
static

Definition at line 1532 of file ip_api.c.

+ Here is the call graph for this function:

static void vl_api_ip6nd_proxy_dump_t_handler ( vl_api_ip6nd_proxy_dump_t mp)
static

Definition at line 1489 of file ip_api.c.

+ Here is the call graph for this function:

void vl_api_ip_add_del_route_t_handler ( vl_api_ip_add_del_route_t mp)

Definition at line 1043 of file ip_api.c.

+ Here is the call graph for this function:

static void vl_api_ip_address_dump_t_handler ( vl_api_ip_address_dump_t mp)
static

Definition at line 1249 of file ip_api.c.

+ Here is the call graph for this function:

static void vl_api_ip_dump_t_handler ( vl_api_ip_dump_t mp)
static

Definition at line 1301 of file ip_api.c.

+ Here is the call graph for this function:

static void vl_api_ip_fib_dump_t_handler ( vl_api_ip_fib_dump_t mp)
static

Definition at line 259 of file ip_api.c.

+ Here is the call graph for this function:

static int vl_api_ip_fib_dump_walk ( fib_node_index_t  fei,
void *  arg 
)
static

Definition at line 249 of file ip_api.c.

static void vl_api_ip_mfib_dump_t_handler ( vl_api_ip_mfib_dump_t mp)
static

Definition at line 504 of file ip_api.c.

+ Here is the call graph for this function:

static int vl_api_ip_mfib_table_dump_walk ( fib_node_index_t  fei,
void *  arg 
)
static

Definition at line 494 of file ip_api.c.

void vl_api_ip_mroute_add_del_t_handler ( vl_api_ip_mroute_add_del_t mp)

Definition at line 1186 of file ip_api.c.

+ Here is the call graph for this function:

static void vl_api_ip_neighbor_add_del_t_handler ( vl_api_ip_neighbor_add_del_t mp,
vlib_main_t vm 
)
static

Definition at line 647 of file ip_api.c.

+ Here is the call graph for this function:

static void vl_api_ip_neighbor_dump_t_handler ( vl_api_ip_neighbor_dump_t mp)
static

Definition at line 106 of file ip_api.c.

+ Here is the call graph for this function:

static void vl_api_mfib_signal_dump_t_handler ( vl_api_mfib_signal_dump_t mp)
static

Definition at line 1666 of file ip_api.c.

+ Here is the call graph for this function:

static void vl_api_set_ip_flow_hash_t_handler ( vl_api_set_ip_flow_hash_t mp)
static

Definition at line 1381 of file ip_api.c.

+ Here is the call graph for this function:

static void vl_api_sw_interface_ip6_enable_disable_t_handler ( vl_api_sw_interface_ip6_enable_disable_t mp)
static

Definition at line 1548 of file ip_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void vl_api_sw_interface_ip6_set_link_local_address_t_handler ( vl_api_sw_interface_ip6_set_link_local_address_t mp)
static

Definition at line 1582 of file ip_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void vl_api_sw_interface_ip6nd_ra_config_t_handler ( vl_api_sw_interface_ip6nd_ra_config_t mp)
static

Definition at line 1391 of file ip_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void vl_api_sw_interface_ip6nd_ra_prefix_t_handler ( vl_api_sw_interface_ip6nd_ra_prefix_t mp)
static

Definition at line 1426 of file ip_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vl_mfib_signal_send_one ( unix_shared_memory_queue_t q,
u32  context,
const mfib_signal_t mfs 
)

Definition at line 1613 of file ip_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VLIB_API_INIT_FUNCTION ( ip_api_hookup  )

+ Here is the caller graph for this function: