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 _(IP_TABLE_ADD_DEL, ip_table_add_del) \ 73 _(SET_IP_FLOW_HASH,set_ip_flow_hash) \ 74 _(SW_INTERFACE_IP6ND_RA_CONFIG, sw_interface_ip6nd_ra_config) \ 75 _(SW_INTERFACE_IP6ND_RA_PREFIX, sw_interface_ip6nd_ra_prefix) \ 76 _(IP6ND_PROXY_ADD_DEL, ip6nd_proxy_add_del) \ 77 _(IP6ND_PROXY_DUMP, ip6nd_proxy_dump) \ 78 _(SW_INTERFACE_IP6_ENABLE_DISABLE, sw_interface_ip6_enable_disable ) \ 79 _(SW_INTERFACE_IP6_SET_LINK_LOCAL_ADDRESS, \ 80 sw_interface_ip6_set_link_local_address) 95 memset (mp, 0,
sizeof (*mp));
96 mp->_vl_msg_id = ntohs (VL_API_IP_NEIGHBOR_DETAILS);
101 memcpy (mp->
ip_address, ip_address, (is_ipv6) ? 16 : 4);
192 path_count =
vec_len (api_rpaths);
196 memset (mp, 0,
sizeof (*mp));
197 mp->_vl_msg_id = ntohs (VL_API_IP_FIB_DETAILS);
206 mp->
count = htonl (path_count);
210 memset (fp, 0,
sizeof (*fp));
285 fib_table_walk(fib_table->ft_index,
287 vl_api_ip_fib_dump_walk,
319 path_count =
vec_len (api_rpaths);
323 memset (mp, 0,
sizeof (*mp));
324 mp->_vl_msg_id = ntohs (VL_API_IP6_FIB_DETAILS);
331 mp->
count = htonl (path_count);
335 memset (fp, 0,
sizeof (*fp));
418 &pfx, api_rpaths, mp->
context);
439 api_ip6_fib_table_get_all(q, mp, fib_table);
459 path_count =
vec_len (api_rpaths);
463 memset (mp, 0,
sizeof (*mp));
464 mp->_vl_msg_id = ntohs (VL_API_IP_FIB_DETAILS);
476 mp->
count = htonl (path_count);
480 memset (fp, 0,
sizeof (*fp));
526 ip4_mfib_table_walk(&mfib_table->v4,
527 vl_api_ip_mfib_table_dump_walk,
530 vec_sort_with_function (ctx.entries, mfib_entry_cmp_for_sort);
532 vec_foreach (mfeip, ctx.entries)
534 send_ip_mfib_details (q, mp->context,
535 mfib_table->mft_table_id,
558 path_count =
vec_len (api_rpaths);
562 memset (mp, 0,
sizeof (*mp));
563 mp->_vl_msg_id = ntohs (VL_API_IP6_FIB_DETAILS);
573 mp->
count = htonl (path_count);
577 memset (fp, 0,
sizeof (*fp));
625 ip6_mfib_table_walk(&mfib_table->v6,
626 vl_api_ip6_mfib_table_dump_walk,
629 vec_sort_with_function (ctx.entries, mfib_entry_cmp_for_sort);
631 vec_foreach(mfeip, ctx.entries)
633 mfib_entry_get_prefix (*mfeip, &pfx);
634 mfib_entry_encode (*mfeip, &api_rpaths);
635 send_ip6_mfib_details (am, q,
636 mfib_table->mft_table_id,
654 vl_api_ip_neighbor_add_del_reply_t *rmp;
683 ethernet_arp_ip4_over_ethernet_address_t
a;
706 u32 fib_index, mfib_index;
730 if (~0 != mfib_index)
741 vl_api_ip_table_add_del_reply_t *rmp;
767 u32 classify_table_index,
769 u8 is_resolve_attached,
775 const ip46_address_t * next_hop,
776 u32 next_hop_sw_if_index,
777 u8 next_hop_fib_index,
779 u16 next_hop_preference,
788 .frp_sw_if_index = next_hop_sw_if_index,
789 .frp_fib_index = next_hop_fib_index,
790 .frp_weight = next_hop_weight,
791 .frp_preference = next_hop_preference,
792 .frp_label_stack = next_hop_out_label_stack,
811 if (is_resolve_attached)
844 if (is_drop || is_local || is_classify || is_unreach || is_prohibit)
863 else if (is_prohibit)
867 else if (is_classify)
870 ntohl (classify_table_index)))
873 return VNET_API_ERROR_NO_SUCH_TABLE;
878 ntohl (classify_table_index)));
883 return VNET_API_ERROR_NO_SUCH_TABLE;
919 u32 next_hop_sw_if_index,
921 u32 next_hop_table_id,
922 u8 is_rpf_id,
u32 * fib_index,
u32 * next_hop_fib_index)
927 u8 create_missing_tables = 1;
930 if (~0 == *fib_index)
932 if (create_missing_tables)
941 return VNET_API_ERROR_NO_SUCH_FIB;
945 if (!is_rpf_id && ~0 != ntohl (next_hop_sw_if_index))
948 ntohl (next_hop_sw_if_index)))
950 return VNET_API_ERROR_NO_MATCHING_INTERFACE;
964 ntohl (next_hop_table_id));
967 ntohl (next_hop_table_id));
969 if (~0 == *next_hop_fib_index)
971 if (create_missing_tables)
974 *next_hop_fib_index =
980 *next_hop_fib_index =
989 return VNET_API_ERROR_NO_SUCH_FIB;
1000 u32 fib_index, next_hop_fib_index;
1002 int rv, ii, n_labels;;
1009 0, &fib_index, &next_hop_fib_index);
1021 memset (&nh, 0,
sizeof (nh));
1027 else if (1 == n_labels)
1032 for (ii = 0; ii < n_labels; ii++)
1059 u32 fib_index, next_hop_fib_index;
1061 int rv, ii, n_labels;;
1068 0, &fib_index, &next_hop_fib_index);
1080 memset (&nh, 0,
sizeof (nh));
1086 else if (1 == n_labels)
1091 for (ii = 0; ii < n_labels; ii++)
1117 vl_api_ip_add_del_route_reply_t *rmp;
1135 u32 table_id,
u8 is_api,
const u8 * name)
1137 u32 fib_index, mfib_index;
1156 if (~0 == fib_index)
1163 if (~0 == mfib_index)
1176 u32 next_hop_sw_if_index,
u8 is_local,
u32 * fib_index)
1181 if (~0 == *fib_index)
1184 return VNET_API_ERROR_NO_SUCH_FIB;
1187 if (~0 != ntohl (next_hop_sw_if_index))
1190 ntohl (next_hop_sw_if_index)))
1192 return VNET_API_ERROR_NO_MATCHING_INTERFACE;
1206 u32 next_hop_sw_if_index,
u32 itf_flags)
1219 if (!is_local && ~0 == next_hop_sw_if_index)
1290 vl_api_ip_mroute_add_del_reply_t *rmp;
1306 u8 is_ipv6,
u32 context)
1311 memset (mp, 0,
sizeof (*mp));
1312 mp->_vl_msg_id = ntohs (VL_API_IP_DETAILS);
1324 u8 * ip,
u16 prefix_length,
1325 u32 sw_if_index,
u8 is_ipv6,
u32 context)
1330 memset (mp, 0,
sizeof (*mp));
1331 mp->_vl_msg_id = ntohs (VL_API_IP_ADDRESS_DETAILS);
1362 u32 sw_if_index = ~0;
1363 int rv __attribute__ ((unused)) = 0;
1411 u32 sw_if_index = ~0;
1421 _vec_len (sorted_sis) = 0;
1425 vec_add1 (sorted_sis, si[0]);
1446 vl_api_set_ip_flow_hash_reply_t *rmp;
1451 table_id = ntohl (mp->
vrf_id);
1453 #define _(a,b) if (mp->a) flow_hash_config |= b; 1465 vl_api_set_ip_flow_hash_reply_t *rmp;
1470 table_id = ntohl (mp->
vrf_id);
1472 #define _(a,b) if (mp->a) flow_hash_config |= b; 1495 vl_api_sw_interface_ip6nd_ra_config_reply_t *rmp;
1498 u8 is_no, suppress, managed, other, ll_option, send_unicast, cease,
1501 is_no = mp->
is_no == 1;
1504 other = mp->
other == 1;
1507 cease = mp->
cease == 1;
1513 suppress, managed, other,
1514 ll_option, send_unicast, cease,
1515 default_router, ntohl (mp->
lifetime),
1523 REPLY_MACRO (VL_API_SW_INTERFACE_IP6ND_RA_CONFIG_REPLY);
1531 vl_api_sw_interface_ip6nd_ra_prefix_reply_t *rmp;
1533 u8 is_no, use_default, no_advertise, off_link, no_autoconfig, no_onlink;
1537 is_no = mp->
is_no == 1;
1549 off_link, no_autoconfig, no_onlink, is_no);
1552 REPLY_MACRO (VL_API_SW_INTERFACE_IP6ND_RA_PREFIX_REPLY);
1558 const ip46_address_t *
addr,
u32 sw_if_index)
1563 memset (mp, 0,
sizeof (*mp));
1564 mp->_vl_msg_id = ntohs (VL_API_IP6ND_PROXY_DETAILS);
1567 memcpy (mp->
address, addr, 16);
1611 fib_table_walk(fib_table->ft_index,
1613 api_ip6nd_proxy_fib_table_walk,
1636 vl_api_ip6nd_proxy_add_del_reply_t *rmp;
1653 vl_api_sw_interface_ip6_enable_disable_reply_t *rmp;
1670 rv = VNET_API_ERROR_UNSPECIFIED;
1679 REPLY_MACRO (VL_API_SW_INTERFACE_IP6_ENABLE_DISABLE_REPLY);
1687 vl_api_sw_interface_ip6_set_link_local_address_reply_t *rmp;
1702 rv = VNET_API_ERROR_UNSPECIFIED;
1711 REPLY_MACRO (VL_API_SW_INTERFACE_IP6_SET_LINK_LOCAL_ADDRESS_REPLY);
1725 memset (mp, 0,
sizeof (*mp));
1726 mp->_vl_msg_id = ntohs (VL_API_MFIB_SIGNAL_DETAILS);
1782 #define vl_msg_name_crc_list 1783 #include <vnet/ip/ip.api.h> 1784 #undef vl_msg_name_crc_list 1789 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); 1790 foreach_vl_msg_name_crc_ip;
1800 vl_msg_api_set_handlers(VL_API_##N, #n, \ 1801 vl_api_##n##_t_handler, \ 1803 vl_api_##n##_t_endian, \ 1804 vl_api_##n##_t_print, \ 1805 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)
u32 mfib_table_find_or_create_and_lock(fib_protocol_t proto, u32 table_id, mfib_source_t src)
Get the index of the FIB for a Table-ID.
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.
u32 fib_table_find_or_create_and_lock_w_name(fib_protocol_t proto, u32 table_id, fib_source_t src, const u8 *name)
Get the index of the FIB for a Table-ID.
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)
void ip_table_delete(fib_protocol_t fproto, u32 table_id, u8 is_api)
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.
dpo_proto_t frp_proto
The protocol of the address below.
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)
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 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.
Add / del table request A table can be added multiple times, but need be deleted only once...
static int add_del_mroute_check(fib_protocol_t table_proto, u32 table_id, u32 next_hop_sw_if_index, u8 is_local, u32 *fib_index)
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)
u32 mfib_table_find_or_create_and_lock_w_name(fib_protocol_t proto, u32 table_id, mfib_source_t src, const u8 *name)
Get the index of the FIB for a Table-ID.
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.
fib_protocol_t dpo_proto_to_fib(dpo_proto_t dpo_proto)
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)
void mfib_table_unlock(u32 fib_index, fib_protocol_t proto, mfib_source_t source)
Take a reference counting lock on the table.
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)
void vl_api_ip_table_add_del_t_handler(vl_api_ip_table_add_del_t *mp)
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)
void fib_table_unlock(u32 fib_index, fib_protocol_t proto, fib_source_t source)
Take a reference counting lock on the table.
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)
API main structure, used by both vpp and binary API clients.
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
u8 * ft_desc
Table description.
fib_node_index_t * entries
#define clib_memcpy(a, b, c)
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)
u8 frp_preference
A path preference.
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.
u32 fib_table_find_or_create_and_lock(fib_protocol_t proto, u32 table_id, fib_source_t src)
Get the index of the FIB for a Table-ID.
fib_route_path_flags_t frp_flags
flags on the path
struct mfib_table_t_ * mfibs
Vector of MFIBs.
#define clib_error_report(e)
int add_del_route_check(fib_protocol_t table_proto, u32 table_id, u32 next_hop_sw_if_index, dpo_proto_t next_hop_table_proto, u32 next_hop_table_id, u8 is_rpf_id, u32 *fib_index, u32 *next_hop_fib_index)
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.
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)
static void send_ip_fib_details(vpe_api_main_t *am, unix_shared_memory_queue_t *q, const fib_table_t *table, const fib_prefix_t *pfx, fib_route_path_encode_t *api_rpaths, u32 context)
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)
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.
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, dpo_proto_t next_hop_proto, const ip46_address_t *next_hop, u32 next_hop_sw_if_index, u8 next_hop_fib_index, u16 next_hop_weight, u16 next_hop_preference, mpls_label_t next_hop_via_label, mpls_label_t *next_hop_out_label_stack)
A protocol Independent IP multicast FIB table.
ip4_main_t ip4_main
Global ip4 main structure.
IP6 FIB table entry response.
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.
void ip_table_create(fib_protocol_t fproto, u32 table_id, u8 is_api, const u8 *name)
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
u8 frp_weight
[un]equal cost path weight
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.