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));
280 fib_table_walk(fib_table->ft_index,
282 vl_api_ip_fib_dump_walk,
316 path_count =
vec_len (api_rpaths);
320 memset (mp, 0,
sizeof (*mp));
321 mp->_vl_msg_id = ntohs (VL_API_IP6_FIB_DETAILS);
328 mp->
count = htonl (path_count);
332 memset (fp, 0,
sizeof (*fp));
414 &pfx, api_rpaths, mp->
context);
435 api_ip6_fib_table_get_all(q, mp, fib_table);
455 path_count =
vec_len (api_rpaths);
459 memset (mp, 0,
sizeof (*mp));
460 mp->_vl_msg_id = ntohs (VL_API_IP_FIB_DETAILS);
472 mp->
count = htonl (path_count);
476 memset (fp, 0,
sizeof (*fp));
522 ip4_mfib_table_walk(&mfib_table->v4,
523 vl_api_ip_mfib_table_dump_walk,
526 vec_sort_with_function (ctx.entries, mfib_entry_cmp_for_sort);
528 vec_foreach (mfeip, ctx.entries)
530 send_ip_mfib_details (q, mp->context,
531 mfib_table->mft_table_id,
554 path_count =
vec_len (api_rpaths);
558 memset (mp, 0,
sizeof (*mp));
559 mp->_vl_msg_id = ntohs (VL_API_IP6_FIB_DETAILS);
569 mp->
count = htonl (path_count);
573 memset (fp, 0,
sizeof (*fp));
621 ip6_mfib_table_walk(&mfib_table->v6,
622 vl_api_ip6_mfib_table_dump_walk,
625 vec_sort_with_function (ctx.entries, mfib_entry_cmp_for_sort);
627 vec_foreach(mfeip, ctx.entries)
629 mfib_entry_get_prefix (*mfeip, &pfx);
630 mfib_entry_encode (*mfeip, &api_rpaths);
631 send_ip6_mfib_details (am, q,
632 mfib_table->mft_table_id,
650 vl_api_ip_neighbor_add_del_reply_t *rmp;
679 ethernet_arp_ip4_over_ethernet_address_t
a;
708 u32 classify_table_index,
710 u8 is_resolve_attached,
715 u8 next_hop_proto_is_ip4,
716 const ip46_address_t * next_hop,
717 u32 next_hop_sw_if_index,
718 u8 next_hop_fib_index,
729 .frp_sw_if_index = next_hop_sw_if_index,
730 .frp_fib_index = next_hop_fib_index,
731 .frp_weight = next_hop_weight,
732 .frp_label_stack = next_hop_out_label_stack,
751 if (is_resolve_attached)
784 if (is_drop || is_local || is_classify || is_unreach || is_prohibit)
803 else if (is_prohibit)
807 else if (is_classify)
810 ntohl (classify_table_index)))
813 return VNET_API_ERROR_NO_SUCH_TABLE;
818 ntohl (classify_table_index)));
823 return VNET_API_ERROR_NO_SUCH_TABLE;
859 u32 next_hop_sw_if_index,
861 u32 next_hop_table_id,
862 u8 create_missing_tables,
863 u8 is_rpf_id,
u32 * fib_index,
u32 * next_hop_fib_index)
868 if (~0 == *fib_index)
870 if (create_missing_tables)
878 return VNET_API_ERROR_NO_SUCH_FIB;
882 if (!is_rpf_id && ~0 != ntohl (next_hop_sw_if_index))
885 ntohl (next_hop_sw_if_index)))
887 return VNET_API_ERROR_NO_MATCHING_INTERFACE;
894 ntohl (next_hop_table_id));
897 ntohl (next_hop_table_id));
899 if (~0 == *next_hop_fib_index)
901 if (create_missing_tables)
904 *next_hop_fib_index =
907 (next_hop_table_id));
909 *next_hop_fib_index =
912 (next_hop_table_id));
917 return VNET_API_ERROR_NO_SUCH_FIB;
928 u32 fib_index, next_hop_fib_index;
930 int rv, ii, n_labels;;
938 &fib_index, &next_hop_fib_index);
950 memset (&nh, 0,
sizeof (nh));
956 else if (1 == n_labels)
961 for (ii = 0; ii < n_labels; ii++)
987 u32 fib_index, next_hop_fib_index;
989 int rv, ii, n_labels;;
997 &fib_index, &next_hop_fib_index);
1009 memset (&nh, 0,
sizeof (nh));
1015 else if (1 == n_labels)
1020 for (ii = 0; ii < n_labels; ii++)
1045 vl_api_ip_add_del_route_reply_t *rmp;
1064 u32 next_hop_sw_if_index,
1065 u8 is_local,
u8 create_missing_tables,
u32 * fib_index)
1070 if (~0 == *fib_index)
1072 if (create_missing_tables)
1080 return VNET_API_ERROR_NO_SUCH_FIB;
1084 if (~0 != ntohl (next_hop_sw_if_index))
1087 ntohl (next_hop_sw_if_index)))
1089 return VNET_API_ERROR_NO_MATCHING_INTERFACE;
1103 u32 next_hop_sw_if_index,
u32 itf_flags)
1116 if (!is_local && ~0 == next_hop_sw_if_index)
1188 vl_api_ip_mroute_add_del_reply_t *rmp;
1204 u8 is_ipv6,
u32 context)
1209 memset (mp, 0,
sizeof (*mp));
1210 mp->_vl_msg_id = ntohs (VL_API_IP_DETAILS);
1222 u8 * ip,
u16 prefix_length,
1223 u32 sw_if_index,
u8 is_ipv6,
u32 context)
1228 memset (mp, 0,
sizeof (*mp));
1229 mp->_vl_msg_id = ntohs (VL_API_IP_ADDRESS_DETAILS);
1260 u32 sw_if_index = ~0;
1261 int rv __attribute__ ((unused)) = 0;
1309 u32 sw_if_index = ~0;
1319 _vec_len (sorted_sis) = 0;
1323 vec_add1 (sorted_sis, si[0]);
1344 vl_api_set_ip_flow_hash_reply_t *rmp;
1349 table_id = ntohl (mp->
vrf_id);
1351 #define _(a,b) if (mp->a) flow_hash_config |= b; 1363 vl_api_set_ip_flow_hash_reply_t *rmp;
1368 table_id = ntohl (mp->
vrf_id);
1370 #define _(a,b) if (mp->a) flow_hash_config |= b; 1393 vl_api_sw_interface_ip6nd_ra_config_reply_t *rmp;
1396 u8 is_no, suppress, managed, other, ll_option, send_unicast, cease,
1399 is_no = mp->
is_no == 1;
1402 other = mp->
other == 1;
1405 cease = mp->
cease == 1;
1411 suppress, managed, other,
1412 ll_option, send_unicast, cease,
1413 default_router, ntohl (mp->
lifetime),
1421 REPLY_MACRO (VL_API_SW_INTERFACE_IP6ND_RA_CONFIG_REPLY);
1429 vl_api_sw_interface_ip6nd_ra_prefix_reply_t *rmp;
1431 u8 is_no, use_default, no_advertise, off_link, no_autoconfig, no_onlink;
1435 is_no = mp->
is_no == 1;
1447 off_link, no_autoconfig, no_onlink, is_no);
1450 REPLY_MACRO (VL_API_SW_INTERFACE_IP6ND_RA_PREFIX_REPLY);
1456 const ip46_address_t *
addr,
u32 sw_if_index)
1461 memset (mp, 0,
sizeof (*mp));
1462 mp->_vl_msg_id = ntohs (VL_API_IP6ND_PROXY_DETAILS);
1465 memcpy (mp->
address, addr, 16);
1509 fib_table_walk(fib_table->ft_index,
1511 api_ip6nd_proxy_fib_table_walk,
1534 vl_api_ip6nd_proxy_add_del_reply_t *rmp;
1551 vl_api_sw_interface_ip6_enable_disable_reply_t *rmp;
1568 rv = VNET_API_ERROR_UNSPECIFIED;
1577 REPLY_MACRO (VL_API_SW_INTERFACE_IP6_ENABLE_DISABLE_REPLY);
1585 vl_api_sw_interface_ip6_set_link_local_address_reply_t *rmp;
1600 rv = VNET_API_ERROR_UNSPECIFIED;
1609 REPLY_MACRO (VL_API_SW_INTERFACE_IP6_SET_LINK_LOCAL_ADDRESS_REPLY);
1623 memset (mp, 0,
sizeof (*mp));
1624 mp->_vl_msg_id = ntohs (VL_API_MFIB_SIGNAL_DETAILS);
1680 #define vl_msg_name_crc_list 1681 #include <vnet/ip/ip.api.h> 1682 #undef vl_msg_name_crc_list 1687 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); 1688 foreach_vl_msg_name_crc_ip;
1698 vl_msg_api_set_handlers(VL_API_##N, #n, \ 1699 vl_api_##n##_t_handler, \ 1701 vl_api_##n##_t_endian, \ 1702 vl_api_##n##_t_print, \ 1703 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
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)
void receive_dpo_add_or_lock(dpo_proto_t proto, u32 sw_if_index, const ip46_address_t *nh_addr, dpo_id_t *dpo)
static int vl_api_ip_fib_dump_walk(fib_node_index_t fei, void *arg)
A representation of a fib path for fib_path_encode to convey the information to the caller...
mpls_eos_bit_t frp_eos
EOS bit for the resolving label.
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)
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.
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)
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
int ip6_neighbor_proxy_add_del(u32 sw_if_index, ip6_address_t *addr, u8 is_del)
ip_lookup_main_t lookup_main
fib_node_index_t mfib_table_entry_update(u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source, fib_rpf_id_t rpf_id, mfib_entry_flags_t entry_flags)
Add a new (with no replication) or lock an existing entry.
IPv6 router advertisement config request.
static void send_ip6nd_proxy_details(unix_shared_memory_queue_t *q, u32 context, const ip46_address_t *addr, u32 sw_if_index)
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)
struct api_ip6nd_proxy_fib_table_walk_ctx_t_ api_ip6nd_proxy_fib_table_walk_ctx_t
A path that result in received traffic being recieved/recirculated so that it appears to have arrived...
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)
A local path with a RPF-ID => multicast traffic.
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)
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.
void * vl_msg_api_alloc(int nbytes)
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]
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 mfib_entry_t * mfib_entry_get(fib_node_index_t index)
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.
#define BAD_SW_IF_INDEX_LABEL
static void send_ip_mfib_details(unix_shared_memory_queue_t *q, u32 context, u32 table_id, fib_node_index_t mfei)
struct vl_api_ip6_mfib_dump_ctc_t_ vl_api_ip6_mfib_dump_ctc_t
fib_node_index_t ft_index
Index into FIB vector.
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...
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.
struct vl_api_ip_fib_dump_walk_ctx_t_ vl_api_ip_fib_dump_walk_ctx_t
u32 frp_weight
[un]equal cost path weight
fib_node_index_t * entries
#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)
unix_shared_memory_queue_t * vl_api_client_index_to_input_queue(u32 index)
u32 fib_node_index_t
A typedef of a node index.
mfib_entry_flags_t mfe_flags
Route flags.
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.
enum fib_entry_flag_t_ fib_entry_flag_t
u32 fib_rpf_id_t
An RPF-ID is numerical value that is used RPF validate.
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)
void vl_msg_api_send_shmem(unix_shared_memory_queue_t *q, u8 *elem)
IP neighbor add / del request.
void mfib_entry_get_prefix(fib_node_index_t mfib_entry_index, mfib_prefix_t *pfx)
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)
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)
fib_rpf_id_t mfe_rpf_id
RPF-ID used when the packets ingress not from an interface.
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)
int vnet_set_ip6_flow_hash(u32 table_id, flow_hash_config_t flow_hash_config)
ip6_fib_table_instance_t ip6_table[IP6_FIB_NUM_TABLES]
The two FIB tables; fwding and non-fwding.
IP neighboors dump response.
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 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)
void mfib_entry_encode(fib_node_index_t mfib_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)
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.
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.