52 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 60 #define foreach_ip_api_msg \ 61 _(IP_FIB_DUMP, ip_fib_dump) \ 62 _(IP6_FIB_DUMP, ip6_fib_dump) \ 63 _(IP_MFIB_DUMP, ip_mfib_dump) \ 64 _(IP6_MFIB_DUMP, ip6_mfib_dump) \ 65 _(IP_NEIGHBOR_DUMP, ip_neighbor_dump) \ 66 _(IP_MROUTE_ADD_DEL, ip_mroute_add_del) \ 67 _(MFIB_SIGNAL_DUMP, mfib_signal_dump) \ 68 _(IP_ADDRESS_DUMP, ip_address_dump) \ 70 _(IP_NEIGHBOR_ADD_DEL, ip_neighbor_add_del) \ 71 _(IP_ADD_DEL_ROUTE, ip_add_del_route) \ 72 _(SET_IP_FLOW_HASH,set_ip_flow_hash) \ 73 _(SW_INTERFACE_IP6ND_RA_CONFIG, sw_interface_ip6nd_ra_config) \ 74 _(SW_INTERFACE_IP6ND_RA_PREFIX, sw_interface_ip6nd_ra_prefix) \ 75 _(IP6ND_PROXY_ADD_DEL, ip6nd_proxy_add_del) \ 76 _(IP6ND_PROXY_DUMP, ip6nd_proxy_dump) \ 77 _(SW_INTERFACE_IP6_ENABLE_DISABLE, sw_interface_ip6_enable_disable ) \ 78 _(SW_INTERFACE_IP6_SET_LINK_LOCAL_ADDRESS, \ 79 sw_interface_ip6_set_link_local_address) 94 memset (mp, 0,
sizeof (*mp));
95 mp->_vl_msg_id = ntohs (VL_API_IP_NEIGHBOR_DETAILS);
100 memcpy (mp->
ip_address, ip_address, (is_ipv6) ? 16 : 4);
190 path_count =
vec_len (api_rpaths);
194 memset (mp, 0,
sizeof (*mp));
195 mp->_vl_msg_id = ntohs (VL_API_IP_FIB_DETAILS);
202 mp->
count = htonl (path_count);
206 memset (fp, 0,
sizeof (*fp));
264 for (i = 0; i < ARRAY_LEN (fib_table->v4.fib_entry_by_dst_address); i++)
266 hash_foreach(key, lfei, fib_table->v4.fib_entry_by_dst_address[i],
268 vec_add1(lfeis, lfei);
284 fib_table->ft_table_id, &pfx, api_rpaths,
303 path_count =
vec_len (api_rpaths);
307 memset (mp, 0,
sizeof (*mp));
308 mp->_vl_msg_id = ntohs (VL_API_IP6_FIB_DETAILS);
315 mp->
count = htonl (path_count);
319 memset (fp, 0,
sizeof (*fp));
401 &pfx, api_rpaths, mp->
context);
422 api_ip6_fib_table_get_all(q, mp, fib_table);
439 path_count =
vec_len (api_rpaths);
443 memset (mp, 0,
sizeof (*mp));
444 mp->_vl_msg_id = ntohs (VL_API_IP_FIB_DETAILS);
454 mp->
count = htonl (path_count);
458 memset (fp, 0,
sizeof (*fp));
506 ip4_mfib_table_walk(&mfib_table->v4,
507 vl_api_ip_mfib_table_dump_walk,
510 vec_sort_with_function (ctx.entries, mfib_entry_cmp_for_sort);
512 vec_foreach (mfeip, ctx.entries)
514 mfib_entry_get_prefix (*mfeip, &pfx);
515 mfib_entry_encode (*mfeip, &api_rpaths);
516 send_ip_mfib_details (am, q,
517 mfib_table->mft_table_id,
543 path_count =
vec_len (api_rpaths);
547 memset (mp, 0,
sizeof (*mp));
548 mp->_vl_msg_id = ntohs (VL_API_IP6_FIB_DETAILS);
558 mp->
count = htonl (path_count);
562 memset (fp, 0,
sizeof (*fp));
610 ip6_mfib_table_walk(&mfib_table->v6,
611 vl_api_ip6_mfib_table_dump_walk,
614 vec_sort_with_function (ctx.entries, mfib_entry_cmp_for_sort);
616 vec_foreach(mfeip, ctx.entries)
618 mfib_entry_get_prefix (*mfeip, &pfx);
619 mfib_entry_encode (*mfeip, &api_rpaths);
620 send_ip6_mfib_details (am, q,
621 mfib_table->mft_table_id,
668 ethernet_arp_ip4_over_ethernet_address_t
a;
696 u32 classify_table_index,
698 u8 is_resolve_attached,
701 u8 next_hop_proto_is_ip4,
702 const ip46_address_t * next_hop,
703 u32 next_hop_sw_if_index,
704 u8 next_hop_fib_index,
715 .frp_sw_if_index = next_hop_sw_if_index,
716 .frp_fib_index = next_hop_fib_index,
717 .frp_weight = next_hop_weight,
718 .frp_label_stack = next_hop_out_label_stack,
729 if (is_resolve_attached)
757 if (is_drop || is_local || is_classify || is_unreach || is_prohibit)
776 else if (is_prohibit)
780 else if (is_classify)
783 ntohl (classify_table_index)))
786 return VNET_API_ERROR_NO_SUCH_TABLE;
791 ntohl (classify_table_index)));
796 return VNET_API_ERROR_NO_SUCH_TABLE;
833 u32 next_hop_sw_if_index,
835 u32 next_hop_table_id,
836 u8 create_missing_tables,
842 if (~0 == *fib_index)
844 if (create_missing_tables)
852 return VNET_API_ERROR_NO_SUCH_FIB;
856 if (~0 != ntohl (next_hop_sw_if_index))
859 ntohl (next_hop_sw_if_index)))
861 return VNET_API_ERROR_NO_MATCHING_INTERFACE;
867 ntohl (next_hop_table_id));
869 if (~0 == *next_hop_fib_index)
871 if (create_missing_tables)
873 *next_hop_fib_index =
875 ntohl (next_hop_table_id));
880 return VNET_API_ERROR_NO_SUCH_FIB;
893 int rv, ii, n_labels;;
901 &fib_index, &next_hop_fib_index);
913 memset (&nh, 0,
sizeof (nh));
919 else if (1 == n_labels)
924 for (ii = 0; ii < n_labels; ii++)
952 int rv, ii, n_labels;;
960 &fib_index, &next_hop_fib_index);
972 memset (&nh, 0,
sizeof (nh));
978 else if (1 == n_labels)
983 for (ii = 0; ii < n_labels; ii++)
1027 u32 next_hop_sw_if_index,
1033 if (~0 == *fib_index)
1035 if (create_missing_tables)
1043 return VNET_API_ERROR_NO_SUCH_FIB;
1047 if (~0 != ntohl (next_hop_sw_if_index))
1050 ntohl (next_hop_sw_if_index)))
1052 return VNET_API_ERROR_NO_MATCHING_INTERFACE;
1065 u32 next_hop_sw_if_index,
u32 itf_flags)
1078 if (!is_local && ~0 == next_hop_sw_if_index)
1165 u8 is_ipv6,
u32 context)
1170 memset (mp, 0,
sizeof (*mp));
1171 mp->_vl_msg_id = ntohs (VL_API_IP_DETAILS);
1183 u8 * ip,
u16 prefix_length,
1184 u32 sw_if_index,
u8 is_ipv6,
u32 context)
1189 memset (mp, 0,
sizeof (*mp));
1190 mp->_vl_msg_id = ntohs (VL_API_IP_ADDRESS_DETAILS);
1221 u32 sw_if_index = ~0;
1222 int rv __attribute__ ((unused)) = 0;
1270 u32 sw_if_index = ~0;
1280 _vec_len (sorted_sis) = 0;
1284 vec_add1 (sorted_sis, si[0]);
1306 int rv = VNET_API_ERROR_UNIMPLEMENTED;
1321 table_id = ntohl (mp->
vrf_id);
1323 #define _(a,b) if (mp->a) flow_hash_config |= b; 1349 u8 is_no, suppress, managed, other, ll_option, send_unicast, cease,
1352 is_no = mp->
is_no == 1;
1355 other = mp->
other == 1;
1358 cease = mp->
cease == 1;
1364 suppress, managed, other,
1365 ll_option, send_unicast, cease,
1366 default_router, ntohl (mp->
lifetime),
1374 REPLY_MACRO (VL_API_SW_INTERFACE_IP6ND_RA_CONFIG_REPLY);
1384 u8 is_no, use_default, no_advertise, off_link, no_autoconfig, no_onlink;
1388 is_no = mp->
is_no == 1;
1400 off_link, no_autoconfig, no_onlink, is_no);
1403 REPLY_MACRO (VL_API_SW_INTERFACE_IP6ND_RA_PREFIX_REPLY);
1409 const ip46_address_t *
addr,
u32 sw_if_index)
1414 memset (mp, 0,
sizeof (*mp));
1415 mp->_vl_msg_id = ntohs (VL_API_IP6ND_PROXY_DETAILS);
1418 memcpy (mp->
address, addr, 16);
1462 fib_table_walk(fib_table->ft_index,
1464 api_ip6nd_proxy_fib_table_walk,
1521 rv = VNET_API_ERROR_UNSPECIFIED;
1530 REPLY_MACRO (VL_API_SW_INTERFACE_IP6_ENABLE_DISABLE_REPLY);
1553 rv = VNET_API_ERROR_UNSPECIFIED;
1562 REPLY_MACRO (VL_API_SW_INTERFACE_IP6_SET_LINK_LOCAL_ADDRESS_REPLY);
1576 memset (mp, 0,
sizeof (*mp));
1577 mp->_vl_msg_id = ntohs (VL_API_MFIB_SIGNAL_DETAILS);
1633 #define vl_msg_name_crc_list 1634 #include <vnet/ip/ip.api.h> 1635 #undef vl_msg_name_crc_list 1640 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); 1641 foreach_vl_msg_name_crc_ip;
1651 vl_msg_api_set_handlers(VL_API_##N, #n, \ 1652 vl_api_##n##_t_handler, \ 1654 vl_api_##n##_t_endian, \ 1655 vl_api_##n##_t_print, \ 1656 sizeof(vl_api_##n##_t), 1);
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
#define foreach_ip_interface_address(lm, a, sw_if_index, loop, body)
IPv6 set link local address on interface request.
fib_protocol_t fp_proto
protocol type
#define VNET_SW_INTERFACE_FLAG_UNNUMBERED
static int mroute_add_del_handler(u8 is_add, u8 is_local, u32 fib_index, const mfib_prefix_t *prefix, u32 entry_flags, u32 next_hop_sw_if_index, u32 itf_flags)
u32 fib_entry_get_fib_index(fib_node_index_t fib_entry_index)
fib_protocol_t frp_proto
The protocol of the address below.
void ip_null_dpo_add_and_lock(dpo_proto_t proto, ip_null_dpo_action_t action, dpo_id_t *dpo)
ip46_address_t frp_addr
The next-hop address.
ip46_address_t fp_src_addr
static void vl_api_ip6nd_proxy_add_del_t_handler(vl_api_ip6nd_proxy_add_del_t *mp)
sll srl srl sll sra u16x4 i
void receive_dpo_add_or_lock(dpo_proto_t proto, u32 sw_if_index, const ip46_address_t *nh_addr, dpo_id_t *dpo)
A representation of a fib path for fib_path_encode to convey the information to the caller...
int vnet_set_ip4_flow_hash(u32 table_id, flow_hash_config_t flow_hash_config)
vl_api_fib_path_t path[count]
vl_api_fib_path_t path[count]
int ip6_neighbor_ra_prefix(vlib_main_t *vm, u32 sw_if_index, ip6_address_t *prefix_addr, u8 prefix_len, u8 use_default, u32 val_lifetime, u32 pref_lifetime, u8 no_advertise, u8 off_link, u8 no_autoconfig, u8 no_onlink, u8 is_no)
A representation of a path as described by a route producer.
static void vl_api_ip_neighbor_add_del_t_handler(vl_api_ip_neighbor_add_del_t *mp, vlib_main_t *vm)
void vl_msg_api_send_shmem(unix_shared_memory_queue_t *q, u8 *elem)
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)
vnet_main_t * vnet_get_main(void)
vnet_interface_main_t interface_main
The table that stores ALL routes learned by the DP.
A pair of indicies, for the entry and interface resp.
void fib_entry_get_prefix(fib_node_index_t fib_entry_index, fib_prefix_t *pfx)
Dump IP multicast fib table.
fib_node_index_t fib_table_entry_update(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags, fib_route_path_t *paths)
Update an entry to have a new set of paths.
fib_node_index_t fib_table_entry_path_add2(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags, fib_route_path_t *rpath)
Add n paths to an entry (aka route) in the FIB.
ip6_neighbor_t * ip6_neighbors_entries(u32 sw_if_index)
u32 mpls_label_t
A label value only, i.e.
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
#define IP_NULL_DPO_ACTION_NUM
unix_shared_memory_queue_t * vl_api_client_index_to_input_queue(u32 index)
int ip6_neighbor_proxy_add_del(u32 sw_if_index, ip6_address_t *addr, u8 is_del)
ip_lookup_main_t lookup_main
IPv6 router advertisement config request.
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, u32 *fib_index, u32 *next_hop_fib_index)
static void send_ip6nd_proxy_details(unix_shared_memory_queue_t *q, u32 context, const ip46_address_t *addr, u32 sw_if_index)
struct api_ip6nd_proxy_fib_table_walk_ctx_t_ api_ip6nd_proxy_fib_table_walk_ctx_t
IPv6 set link local address on interface response.
static void vl_api_ip6nd_proxy_dump_t_handler(vl_api_ip6nd_proxy_dump_t *mp)
static void api_ip6_fib_table_put_entries(clib_bihash_kv_24_8_t *kvp, void *arg)
int mfib_signal_send_one(struct _unix_shared_memory_queue *q, u32 context)
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
#define vec_reset_length(v)
Reset vector length to zero NULL-pointer tolerant.
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 void vl_api_ip_mfib_dump_t_handler(vl_api_ip_mfib_dump_t *mp)
ip6_neighbor_flags_t flags
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
u32 frp_sw_if_index
The interface.
Dump IP6 multicast fib table.
void fib_table_entry_special_remove(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source)
Remove a 'special' entry from the FIB.
vl_api_fib_path_t path[count]
#define vec_new(T, N)
Create new vector of given type and length (unspecified alignment, no header).
Recursion constraint of via a host prefix.
static void vl_api_ip6_mfib_dump_t_handler(vl_api_ip6_mfib_dump_t *mp)
fib_node_index_t mfib_table_entry_update(u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source, mfib_entry_flags_t entry_flags)
Add a new (with no replication) or lock an existing entry.
int vnet_set_ip6_ethernet_neighbor(vlib_main_t *vm, u32 sw_if_index, ip6_address_t *a, u8 *link_layer_address, uword n_bytes_link_layer_address, int is_static, int is_no_fib_entry)
Aggregrate type for a prefix.
int ip6_interface_enabled(vlib_main_t *vm, u32 sw_if_index)
static void vl_api_ip_dump_t_handler(vl_api_ip_dump_t *mp)
struct vl_api_ip_mfib_dump_ctc_t_ vl_api_ip_mfib_dump_ctc_t
static int ip6_add_del_route_t_handler(vl_api_ip_add_del_route_t *mp)
fib_node_index_t mfib_table_entry_path_update(u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source, const fib_route_path_t *rpath, mfib_itf_flags_t itf_flags)
Add n paths to an entry (aka route) in the FIB.
IPv6 interface enable / disable request.
enum fib_route_path_flags_t_ fib_route_path_flags_t
Path flags from the control plane.
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)
struct mfib_table_t_ * mfibs
Vector of MFIBs.
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
u32 fib_table_find(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
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)
u16 fp_len
The mask length.
static void vl_api_mfib_signal_dump_t_handler(vl_api_mfib_signal_dump_t *mp)
int fib_entry_cmp_for_sort(void *i1, void *i2)
int vnet_arp_unset_ip4_over_ethernet(vnet_main_t *vnm, u32 sw_if_index, void *a_arg)
Control Plane hook to remove an ARP entry.
u32 mfib_entry_get_fib_index(fib_node_index_t mfib_entry_index)
vnet_api_error_t api_errno
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
static int vl_api_ip6_mfib_table_dump_walk(fib_node_index_t fei, void *arg)
static mfib_itf_t * mfib_itf_get(index_t mi)
ip46_address_t fp_addr
The address type is not deriveable from the fp_addr member.
index_t classify_dpo_create(dpo_proto_t proto, u32 classify_table_index)
dpo_type_t dpoi_type
the type
ip4_address_t ip4_address
int vnet_unset_ip6_ethernet_neighbor(vlib_main_t *vm, u32 sw_if_index, ip6_address_t *a, u8 *link_layer_address, uword n_bytes_link_layer_address)
static void vl_api_sw_interface_ip6nd_ra_prefix_t_handler(vl_api_sw_interface_ip6nd_ra_prefix_t *mp)
IP6 Multicast FIB table response.
void fib_table_entry_path_remove2(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_route_path_t *rpath)
Remove n paths to an entry (aka route) in the FIB.
vl_api_fib_path_t path[count]
IPv6 router advertisement prefix config response.
static int api_ip6nd_proxy_fib_table_walk(fib_node_index_t fei, void *arg)
Recursion constraint of via an attahced prefix.
fib_node_index_t * entries
VLIB_API_INIT_FUNCTION(ip_api_hookup)
static void vl_api_sw_interface_ip6_enable_disable_t_handler(vl_api_sw_interface_ip6_enable_disable_t *mp)
static void vl_api_set_ip_flow_hash_t_handler(vl_api_set_ip_flow_hash_t *mp)
static void send_ip_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)
void stats_dsunlock(void)
u32 fib_entry_get_resolving_interface(fib_node_index_t entry_index)
#define ip46_address_is_ip4(ip46)
void clib_bihash_foreach_key_value_pair(clib_bihash *h, void *callback, void *arg)
Visit active (key,value) pairs in a bi-hash table.
Reply for add / del mroute request.
#define BAD_SW_IF_INDEX_LABEL
struct vl_api_ip6_mfib_dump_ctc_t_ vl_api_ip6_mfib_dump_ctc_t
int fib_entry_is_sourced(fib_node_index_t fib_entry_index, fib_source_t source)
Set the ip flow hash config for a fib request.
fib_node_index_t fib_table_entry_special_dpo_update(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
Update a 'special' entry to the FIB that links to the DPO passed A special entry is an entry that the...
void * vl_msg_api_alloc(int nbytes)
u32 ft_table_id
Table ID (hash key) for this FIB.
#define MPLS_LABEL_INVALID
#define vec_free(V)
Free vector's memory (no header).
void copy_fib_next_hop(fib_route_path_encode_t *api_rpath, void *fp_arg)
void fib_table_entry_delete(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source)
Delete a FIB entry.
u32 frp_weight
[un]equal cost path weight
#define clib_warning(format, args...)
fib_node_index_t * entries
IPv6 interface enable / disable response.
#define clib_memcpy(a, b, c)
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)
u32 fib_node_index_t
A typedef of a node index.
Reply for IP Neighbor add / delete request.
static void set_ip6_flow_hash(vl_api_set_ip_flow_hash_t *mp)
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
void dpo_set(dpo_id_t *dpo, dpo_type_t type, dpo_proto_t proto, index_t index)
Set/create a DPO ID The DPO will be locked.
clib_error_t * enable_ip6_interface(vlib_main_t *vm, u32 sw_if_index)
Aggregrate type for a prefix.
struct _vnet_classify_main vnet_classify_main_t
#define foreach_flow_hash_bit
void vl_api_ip_mroute_add_del_t_handler(vl_api_ip_mroute_add_del_t *mp)
IP neighbor add / del request.
void mfib_entry_get_prefix(fib_node_index_t mfib_entry_index, mfib_prefix_t *pfx)
IPv6 router advertisement config response.
static int api_mroute_add_del_t_handler(vl_api_ip_mroute_add_del_t *mp)
IP Multicast FIB table response.
ip6_address_t ip6_address
ip_lookup_main_t lookup_main
fib_node_index_t * entries
static int vl_api_ip_mfib_table_dump_walk(fib_node_index_t fei, void *arg)
static int ip4_add_del_route_t_handler(vl_api_ip_add_del_route_t *mp)
Reply for add / del route request.
IPv6 router advertisement prefix config request.
IPv6 ND proxy details returned after request.
static void set_ip4_flow_hash(vl_api_set_ip_flow_hash_t *mp)
An interface associated with a particular MFIB entry.
IPv6 ND proxy dump request.
fib_route_path_flags_t frp_flags
flags on the path
struct mfib_table_t_ * mfibs
Vector of MFIBs.
#define clib_error_report(e)
u32 fib_table_find_or_create_and_lock(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
vnet_classify_main_t vnet_classify_main
dpo_proto_t fib_proto_to_dpo(fib_protocol_t fib_proto)
u32 mft_table_id
Table ID (hash key) for this FIB.
From the control plane API.
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)
void stats_dslock_with_hint(int hint, int tag)
ethernet_arp_entry_flags_t flags
static clib_error_t * ip_api_hookup(vlib_main_t *vm)
u32 flow_hash_config_t
A flow hash configuration is a mask of the flow hash options.
static void vl_api_ip_fib_dump_t_handler(vl_api_ip_fib_dump_t *mp)
ip6_fib_table_instance_t ip6_table[IP6_FIB_NUM_TABLES]
The two FIB tables; fwding and non-fwding.
IP neighboors dump response.
static vlib_main_t * vlib_get_main(void)
void fib_entry_encode(fib_node_index_t fib_entry_index, fib_route_path_encode_t **api_rpaths)
mpls_label_t frp_local_label
The MPLS local Label to reursively resolve through.
fib_protocol_t fp_proto
protocol type
static void setup_message_id_table(api_main_t *am)
u32 mfib_table_find_or_create_and_lock(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
index_t dpoi_index
the index of objects of that type
mfib_table_t * mfib_table_get(fib_node_index_t index, fib_protocol_t proto)
Get a pointer to a FIB table.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
u32 mfib_table_find(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
#define vec_sort_with_function(vec, f)
Sort a vector using the supplied element comparison function.
int ip6_neighbor_ra_config(vlib_main_t *vm, u32 sw_if_index, u8 suppress, u8 managed, u8 other, u8 ll_option, u8 send_unicast, u8 cease, u8 use_lifetime, u32 lifetime, u32 initial_count, u32 initial_interval, u32 max_interval, u32 min_interval, u8 is_no)
vnet_sw_interface_t * sw_interfaces
#define DPO_INVALID
An initialiser for DPOs declared on the stack.
u32 next_hop_out_label_stack[next_hop_n_out_labels]
u8 mfs_buffer[MFIB_SIGNAL_BUFFER_SIZE]
A buffer copied from the DP plane that triggered the signal.
fib_table_t * fib_table_get(fib_node_index_t index, fib_protocol_t proto)
Get a pointer to a FIB table.
clib_error_t * set_ip6_link_local_address(vlib_main_t *vm, u32 sw_if_index, ip6_address_t *address)
static void vl_api_sw_interface_ip6nd_ra_config_t_handler(vl_api_sw_interface_ip6nd_ra_config_t *mp)
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_classify, u32 classify_table_index, u8 is_resolve_host, u8 is_resolve_attached, 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)
u32 mfi_sw_if_index
The SW IF index that this MFIB interface represents.
A protocol Independent IP multicast FIB table.
ip4_main_t ip4_main
Global ip4 main structure.
struct fib_table_t_ * fibs
Vector of FIBs.
void dpo_reset(dpo_id_t *dpo)
reset a DPO ID The DPO will be unlocked.
#define vec_foreach(var, vec)
Vector iterator.
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 void vl_api_ip_address_dump_t_handler(vl_api_ip_address_dump_t *mp)
ethernet_arp_ip4_entry_t * ip4_neighbor_entries(u32 sw_if_index)
int vnet_arp_set_ip4_over_ethernet(vnet_main_t *vnm, u32 sw_if_index, void *a_arg, int is_static, int is_no_fib_entry)
static void * ip_interface_address_get_address(ip_lookup_main_t *lm, ip_interface_address_t *a)
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 api_ip6_fib_table_get_all(unix_shared_memory_queue_t *q, vl_api_ip6_fib_dump_t *mp, fib_table_t *fib_table)
struct apt_ip6_fib_show_ctx_t_ api_ip6_fib_show_ctx_t
u16 fp_len
The mask length.
void vl_mfib_signal_send_one(unix_shared_memory_queue_t *q, u32 context, const mfib_signal_t *mfs)
void mfib_table_entry_path_remove(u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source, const fib_route_path_t *rpath)
Remove n paths to an entry (aka route) in the FIB.
clib_error_t * disable_ip6_interface(vlib_main_t *vm, u32 sw_if_index)
fib_node_index_t mfs_entry
vpe_api_main_t vpe_api_main
void vl_api_ip_add_del_route_t_handler(vl_api_ip_add_del_route_t *mp)
struct fib_table_t_ * fibs
#define foreach_ip_api_msg
const ip46_address_t zero_addr
ip46_address_t fp_grp_addr
The address type is not deriveable from the fp_addr member.
static void vl_api_ip6_fib_dump_t_handler(vl_api_ip6_fib_dump_t *mp)
#define VALIDATE_SW_IF_INDEX(mp)
A protocol Independent FIB table.
Set the ip flow hash config for a fib response.
struct _unix_shared_memory_queue unix_shared_memory_queue_t
static void vl_api_ip_neighbor_dump_t_handler(vl_api_ip_neighbor_dump_t *mp)
static uword pool_elts(void *v)
Number of active elements in a pool.