23 #include <sys/types.h> 26 #include <netinet/in.h> 95 #undef __included_bihash_template_h__ 140 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 147 #define foreach_vpe_api_msg \ 148 _(WANT_OAM_EVENTS, want_oam_events) \ 149 _(OAM_ADD_DEL, oam_add_del) \ 150 _(MPLS_ROUTE_ADD_DEL, mpls_route_add_del) \ 151 _(MPLS_IP_BIND_UNBIND, mpls_ip_bind_unbind) \ 152 _(IS_ADDRESS_REACHABLE, is_address_reachable) \ 153 _(SW_INTERFACE_SET_MPLS_ENABLE, sw_interface_set_mpls_enable) \ 154 _(SW_INTERFACE_SET_VPATH, sw_interface_set_vpath) \ 155 _(SW_INTERFACE_SET_VXLAN_BYPASS, sw_interface_set_vxlan_bypass) \ 156 _(SW_INTERFACE_SET_L2_XCONNECT, sw_interface_set_l2_xconnect) \ 157 _(SW_INTERFACE_SET_L2_BRIDGE, sw_interface_set_l2_bridge) \ 158 _(SW_INTERFACE_SET_DPDK_HQOS_PIPE, sw_interface_set_dpdk_hqos_pipe) \ 159 _(SW_INTERFACE_SET_DPDK_HQOS_SUBPORT, sw_interface_set_dpdk_hqos_subport) \ 160 _(SW_INTERFACE_SET_DPDK_HQOS_TCTBL, sw_interface_set_dpdk_hqos_tctbl) \ 161 _(BRIDGE_DOMAIN_ADD_DEL, bridge_domain_add_del) \ 162 _(BRIDGE_DOMAIN_DUMP, bridge_domain_dump) \ 163 _(BRIDGE_DOMAIN_DETAILS, bridge_domain_details) \ 164 _(BRIDGE_DOMAIN_SW_IF_DETAILS, bridge_domain_sw_if_details) \ 165 _(L2FIB_ADD_DEL, l2fib_add_del) \ 166 _(L2_FLAGS, l2_flags) \ 167 _(BRIDGE_FLAGS, bridge_flags) \ 168 _(CREATE_VLAN_SUBIF, create_vlan_subif) \ 169 _(CREATE_SUBIF, create_subif) \ 170 _(MPLS_TUNNEL_ADD_DEL, mpls_tunnel_add_del) \ 171 _(PROXY_ARP_ADD_DEL, proxy_arp_add_del) \ 172 _(PROXY_ARP_INTFC_ENABLE_DISABLE, proxy_arp_intfc_enable_disable) \ 173 _(VNET_GET_SUMMARY_STATS, vnet_get_summary_stats) \ 174 _(RESET_FIB, reset_fib) \ 175 _(DHCP_PROXY_CONFIG,dhcp_proxy_config) \ 176 _(DHCP_PROXY_CONFIG_2,dhcp_proxy_config_2) \ 177 _(DHCP_PROXY_SET_VSS,dhcp_proxy_set_vss) \ 178 _(DHCP_CLIENT_CONFIG, dhcp_client_config) \ 179 _(CREATE_LOOPBACK, create_loopback) \ 180 _(CONTROL_PING, control_ping) \ 181 _(CLI_REQUEST, cli_request) \ 182 _(CLI_INBAND, cli_inband) \ 183 _(SET_ARP_NEIGHBOR_LIMIT, set_arp_neighbor_limit) \ 184 _(L2_PATCH_ADD_DEL, l2_patch_add_del) \ 185 _(CLASSIFY_ADD_DEL_TABLE, classify_add_del_table) \ 186 _(CLASSIFY_ADD_DEL_SESSION, classify_add_del_session) \ 187 _(CLASSIFY_SET_INTERFACE_IP_TABLE, classify_set_interface_ip_table) \ 188 _(CLASSIFY_SET_INTERFACE_L2_TABLES, classify_set_interface_l2_tables) \ 189 _(GET_NODE_INDEX, get_node_index) \ 190 _(ADD_NODE_NEXT, add_node_next) \ 191 _(L2TPV3_CREATE_TUNNEL, l2tpv3_create_tunnel) \ 192 _(L2TPV3_SET_TUNNEL_COOKIES, l2tpv3_set_tunnel_cookies) \ 193 _(L2TPV3_INTERFACE_ENABLE_DISABLE, l2tpv3_interface_enable_disable) \ 194 _(L2TPV3_SET_LOOKUP_KEY, l2tpv3_set_lookup_key) \ 195 _(SW_IF_L2TPV3_TUNNEL_DUMP, sw_if_l2tpv3_tunnel_dump) \ 196 _(VXLAN_ADD_DEL_TUNNEL, vxlan_add_del_tunnel) \ 197 _(VXLAN_TUNNEL_DUMP, vxlan_tunnel_dump) \ 198 _(GRE_ADD_DEL_TUNNEL, gre_add_del_tunnel) \ 199 _(GRE_TUNNEL_DUMP, gre_tunnel_dump) \ 200 _(L2_FIB_CLEAR_TABLE, l2_fib_clear_table) \ 201 _(L2_INTERFACE_EFP_FILTER, l2_interface_efp_filter) \ 202 _(L2_INTERFACE_VLAN_TAG_REWRITE, l2_interface_vlan_tag_rewrite) \ 203 _(CREATE_VHOST_USER_IF, create_vhost_user_if) \ 204 _(MODIFY_VHOST_USER_IF, modify_vhost_user_if) \ 205 _(DELETE_VHOST_USER_IF, delete_vhost_user_if) \ 206 _(SW_INTERFACE_VHOST_USER_DUMP, sw_interface_vhost_user_dump) \ 207 _(SW_INTERFACE_VHOST_USER_DETAILS, sw_interface_vhost_user_details) \ 208 _(SHOW_VERSION, show_version) \ 209 _(L2_FIB_TABLE_DUMP, l2_fib_table_dump) \ 210 _(L2_FIB_TABLE_ENTRY, l2_fib_table_entry) \ 211 _(VXLAN_GPE_ADD_DEL_TUNNEL, vxlan_gpe_add_del_tunnel) \ 212 _(VXLAN_GPE_TUNNEL_DUMP, vxlan_gpe_tunnel_dump) \ 213 _(INTERFACE_NAME_RENUMBER, interface_name_renumber) \ 214 _(WANT_IP4_ARP_EVENTS, want_ip4_arp_events) \ 215 _(WANT_IP6_ND_EVENTS, want_ip6_nd_events) \ 216 _(INPUT_ACL_SET_INTERFACE, input_acl_set_interface) \ 217 _(IPSEC_SPD_ADD_DEL, ipsec_spd_add_del) \ 218 _(IPSEC_INTERFACE_ADD_DEL_SPD, ipsec_interface_add_del_spd) \ 219 _(IPSEC_SPD_ADD_DEL_ENTRY, ipsec_spd_add_del_entry) \ 220 _(IPSEC_SAD_ADD_DEL_ENTRY, ipsec_sad_add_del_entry) \ 221 _(IPSEC_SA_SET_KEY, ipsec_sa_set_key) \ 222 _(IKEV2_PROFILE_ADD_DEL, ikev2_profile_add_del) \ 223 _(IKEV2_PROFILE_SET_AUTH, ikev2_profile_set_auth) \ 224 _(IKEV2_PROFILE_SET_ID, ikev2_profile_set_id) \ 225 _(IKEV2_PROFILE_SET_TS, ikev2_profile_set_ts) \ 226 _(IKEV2_SET_LOCAL_KEY, ikev2_set_local_key) \ 227 _(DELETE_LOOPBACK, delete_loopback) \ 228 _(BD_IP_MAC_ADD_DEL, bd_ip_mac_add_del) \ 229 _(COP_INTERFACE_ENABLE_DISABLE, cop_interface_enable_disable) \ 230 _(COP_WHITELIST_ENABLE_DISABLE, cop_whitelist_enable_disable) \ 231 _(GET_NODE_GRAPH, get_node_graph) \ 232 _(IOAM_ENABLE, ioam_enable) \ 233 _(IOAM_DISABLE, ioam_disable) \ 234 _(LISP_ADD_DEL_LOCATOR_SET, lisp_add_del_locator_set) \ 235 _(LISP_ADD_DEL_LOCATOR, lisp_add_del_locator) \ 236 _(LISP_ADD_DEL_LOCAL_EID, lisp_add_del_local_eid) \ 237 _(LISP_GPE_ADD_DEL_FWD_ENTRY, lisp_gpe_add_del_fwd_entry) \ 238 _(LISP_ADD_DEL_MAP_RESOLVER, lisp_add_del_map_resolver) \ 239 _(LISP_ADD_DEL_MAP_SERVER, lisp_add_del_map_server) \ 240 _(LISP_GPE_ENABLE_DISABLE, lisp_gpe_enable_disable) \ 241 _(LISP_ENABLE_DISABLE, lisp_enable_disable) \ 242 _(LISP_RLOC_PROBE_ENABLE_DISABLE, lisp_rloc_probe_enable_disable) \ 243 _(LISP_MAP_REGISTER_ENABLE_DISABLE, lisp_map_register_enable_disable) \ 244 _(LISP_GPE_ADD_DEL_IFACE, lisp_gpe_add_del_iface) \ 245 _(LISP_ADD_DEL_REMOTE_MAPPING, lisp_add_del_remote_mapping) \ 246 _(LISP_ADD_DEL_ADJACENCY, lisp_add_del_adjacency) \ 247 _(LISP_PITR_SET_LOCATOR_SET, lisp_pitr_set_locator_set) \ 248 _(LISP_MAP_REQUEST_MODE, lisp_map_request_mode) \ 249 _(LISP_EID_TABLE_ADD_DEL_MAP, lisp_eid_table_add_del_map) \ 250 _(LISP_LOCATOR_SET_DUMP, lisp_locator_set_dump) \ 251 _(LISP_LOCATOR_DUMP, lisp_locator_dump) \ 252 _(LISP_EID_TABLE_DUMP, lisp_eid_table_dump) \ 253 _(LISP_GPE_TUNNEL_DUMP, lisp_gpe_tunnel_dump) \ 254 _(LISP_MAP_RESOLVER_DUMP, lisp_map_resolver_dump) \ 255 _(LISP_MAP_SERVER_DUMP, lisp_map_server_dump) \ 256 _(LISP_EID_TABLE_MAP_DUMP, lisp_eid_table_map_dump) \ 257 _(LISP_EID_TABLE_VNI_DUMP, lisp_eid_table_vni_dump) \ 258 _(LISP_ADJACENCIES_GET, lisp_adjacencies_get) \ 259 _(SHOW_LISP_RLOC_PROBE_STATE, show_lisp_rloc_probe_state) \ 260 _(SHOW_LISP_MAP_REGISTER_STATE, show_lisp_map_register_state) \ 261 _(SHOW_LISP_STATUS, show_lisp_status) \ 262 _(LISP_ADD_DEL_MAP_REQUEST_ITR_RLOCS, \ 263 lisp_add_del_map_request_itr_rlocs) \ 264 _(LISP_GET_MAP_REQUEST_ITR_RLOCS, lisp_get_map_request_itr_rlocs) \ 265 _(SHOW_LISP_PITR, show_lisp_pitr) \ 266 _(SHOW_LISP_MAP_REQUEST_MODE, show_lisp_map_request_mode) \ 267 _(SR_MULTICAST_MAP_ADD_DEL, sr_multicast_map_add_del) \ 268 _(AF_PACKET_CREATE, af_packet_create) \ 269 _(AF_PACKET_DELETE, af_packet_delete) \ 270 _(POLICER_ADD_DEL, policer_add_del) \ 271 _(POLICER_DUMP, policer_dump) \ 272 _(POLICER_CLASSIFY_SET_INTERFACE, policer_classify_set_interface) \ 273 _(POLICER_CLASSIFY_DUMP, policer_classify_dump) \ 274 _(NETMAP_CREATE, netmap_create) \ 275 _(NETMAP_DELETE, netmap_delete) \ 276 _(MPLS_TUNNEL_DUMP, mpls_tunnel_dump) \ 277 _(MPLS_TUNNEL_DETAILS, mpls_tunnel_details) \ 278 _(MPLS_FIB_DUMP, mpls_fib_dump) \ 279 _(MPLS_FIB_DETAILS, mpls_fib_details) \ 280 _(CLASSIFY_TABLE_IDS,classify_table_ids) \ 281 _(CLASSIFY_TABLE_BY_INTERFACE, classify_table_by_interface) \ 282 _(CLASSIFY_TABLE_INFO,classify_table_info) \ 283 _(CLASSIFY_SESSION_DUMP,classify_session_dump) \ 284 _(CLASSIFY_SESSION_DETAILS,classify_session_details) \ 285 _(SET_IPFIX_EXPORTER, set_ipfix_exporter) \ 286 _(IPFIX_EXPORTER_DUMP, ipfix_exporter_dump) \ 287 _(SET_IPFIX_CLASSIFY_STREAM, set_ipfix_classify_stream) \ 288 _(IPFIX_CLASSIFY_STREAM_DUMP, ipfix_classify_stream_dump) \ 289 _(IPFIX_CLASSIFY_TABLE_ADD_DEL, ipfix_classify_table_add_del) \ 290 _(IPFIX_CLASSIFY_TABLE_DUMP, ipfix_classify_table_dump) \ 291 _(GET_NEXT_INDEX, get_next_index) \ 292 _(PG_CREATE_INTERFACE, pg_create_interface) \ 293 _(PG_CAPTURE, pg_capture) \ 294 _(PG_ENABLE_DISABLE, pg_enable_disable) \ 295 _(IP_SOURCE_AND_PORT_RANGE_CHECK_ADD_DEL, \ 296 ip_source_and_port_range_check_add_del) \ 297 _(IP_SOURCE_AND_PORT_RANGE_CHECK_INTERFACE_ADD_DEL, \ 298 ip_source_and_port_range_check_interface_add_del) \ 299 _(IPSEC_GRE_ADD_DEL_TUNNEL, ipsec_gre_add_del_tunnel) \ 300 _(IPSEC_GRE_TUNNEL_DUMP, ipsec_gre_tunnel_dump) \ 301 _(DELETE_SUBIF, delete_subif) \ 302 _(L2_INTERFACE_PBB_TAG_REWRITE, l2_interface_pbb_tag_rewrite) \ 304 _(FLOW_CLASSIFY_SET_INTERFACE, flow_classify_set_interface) \ 305 _(FLOW_CLASSIFY_DUMP, flow_classify_dump) \ 306 _(IPSEC_SPD_DUMP, ipsec_spd_dump) \ 307 _(FEATURE_ENABLE_DISABLE, feature_enable_disable) \ 308 _(BFD_UDP_ADD, bfd_udp_add) \ 309 _(BFD_UDP_DEL, bfd_udp_del) \ 310 _(BFD_UDP_SESSION_DUMP, bfd_udp_session_dump) \ 311 _(BFD_SESSION_SET_FLAGS, bfd_session_set_flags) \ 312 _(WANT_BFD_EVENTS, want_bfd_events) 315 #define QUOTE(x) QUOTE_(x) 341 p = hash_get (vam->a##_registration_hash, client_index); \ 343 rp = pool_elt_at_index (vam->a##_registrations, p[0]); \ 344 pool_put (vam->a##_registrations, rp); \ 345 hash_unset (vam->a##_registration_hash, client_index); \ 355 #define RESOLUTION_EVENT 1 356 #define RESOLUTION_PENDING_EVENT 2 357 #define IP4_ARP_EVENT 3 358 #define IP6_ND_EVENT 4 391 if (q->cursize < q->maxsize)
399 static f64 last_time;
406 clib_warning (
"arp event for %U to pid %d: queue stuffed!",
440 if (q->cursize < q->maxsize)
448 static f64 last_time;
455 clib_warning (
"ip6 nd event for %U to pid %d: queue stuffed!",
467 uword *event_data = 0;
488 for (i = 0; i <
vec_len (event_data); i++)
493 for (i = 0; i <
vec_len (event_data); i++)
510 .name =
"vpe-route-resolver-process",
518 u32 fib_index, next_hop_fib_index;
520 int rv, ii, n_labels;;
550 &fib_index, &next_hop_fib_index);
556 memset (&nh, 0,
sizeof (nh));
559 memcpy (&nh.ip4, mp->
mr_next_hop, sizeof (nh.ip4));
561 memcpy (&nh.ip6, mp->
mr_next_hop, sizeof (nh.ip6));
566 else if (1 == n_labels)
571 for (ii = 0; ii < n_labels; ii++)
613 u32 mpls_fib_index, ip_fib_index;
618 if (~0 == mpls_fib_index)
627 return VNET_API_ERROR_NO_SUCH_FIB;
634 if (~0 == ip_fib_index)
635 return VNET_API_ERROR_NO_SUCH_FIB;
692 sw_if_index, mp->
enable, 0, 0);
694 sw_if_index, mp->
enable, 0, 0);
696 sw_if_index, mp->
enable, 0, 0);
698 sw_if_index, mp->
enable, 0, 0);
721 sw_if_index, mp->
enable, 0, 0);
725 REPLY_MACRO (VL_API_SW_INTERFACE_SET_VXLAN_BYPASS_REPLY);
745 rx_sw_if_index, 0, 0, 0, tx_sw_if_index);
755 REPLY_MACRO (VL_API_SW_INTERFACE_SET_L2_XCONNECT_REPLY);
781 rx_sw_if_index, bd_index, bvi, shg, 0);
790 REPLY_MACRO (VL_API_SW_INTERFACE_SET_L2_BRIDGE_REPLY);
817 rv = rte_sched_pipe_config (xd->
hqos_ht->
hqos, subport, pipe, profile);
821 clib_warning (
"setting HQoS pipe parameters without DPDK not implemented");
822 rv = VNET_API_ERROR_UNIMPLEMENTED;
825 REPLY_MACRO (VL_API_SW_INTERFACE_SET_DPDK_HQOS_PIPE_REPLY);
838 struct rte_sched_subport_params p;
842 p.tb_rate = ntohl (mp->
tb_rate);
843 p.tb_size = ntohl (mp->
tb_size);
844 p.tc_rate[0] = ntohl (mp->
tc_rate[0]);
845 p.tc_rate[1] = ntohl (mp->
tc_rate[1]);
846 p.tc_rate[2] = ntohl (mp->
tc_rate[2]);
847 p.tc_rate[3] = ntohl (mp->
tc_rate[3]);
859 rv = rte_sched_subport_config (xd->
hqos_ht->
hqos, subport, &p);
864 (
"setting HQoS subport parameters without DPDK not implemented");
865 rv = VNET_API_ERROR_UNIMPLEMENTED;
868 REPLY_MACRO (VL_API_SW_INTERFACE_SET_DPDK_HQOS_SUBPORT_REPLY);
885 u32 tc = ntohl (mp->
tc);
898 if (tc >= RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE)
901 rv = VNET_API_ERROR_INVALID_VALUE;
904 if (queue >= RTE_SCHED_QUEUES_PER_TRAFFIC_CLASS)
907 rv = VNET_API_ERROR_INVALID_VALUE;
917 rv = VNET_API_ERROR_INVALID_VALUE_2;
923 int worker_thread_count = tr->
count;
925 val = tc * RTE_SCHED_QUEUES_PER_TRAFFIC_CLASS + queue;
926 for (i = 0; i < worker_thread_count; i++)
932 clib_warning (
"setting HQoS DSCP table entry without DPDK not implemented");
933 rv = VNET_API_ERROR_UNIMPLEMENTED;
936 REPLY_MACRO (VL_API_SW_INTERFACE_SET_DPDK_HQOS_TCTBL_REPLY);
946 u32 enable_flags = 0, disable_flags = 0;
1009 u32 n_sw_ifs,
u32 context)
1014 memset (mp, 0,
sizeof (*mp));
1015 mp->_vl_msg_id = ntohs (VL_API_BRIDGE_DOMAIN_DETAILS);
1039 memset (mp, 0,
sizeof (*mp));
1040 mp->_vl_msg_id = ntohs (VL_API_BRIDGE_DOMAIN_SW_IF_DETAILS);
1041 mp->
bd_id = ntohl (bd_id);
1044 mp->
shg = input_cfg->
shg;
1057 u32 bd_id, bd_index;
1065 bd_id = ntohl (mp->
bd_id);
1069 for (; bd_index < end; bd_index++)
1073 if (bd_config && (bd_config->
bd_id > 0))
1110 rv = VNET_API_ERROR_NO_SUCH_ENTRY;
1111 goto bad_sw_if_index;
1118 if (filter_mac == 0)
1123 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
1124 goto bad_sw_if_index;
1132 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
1133 goto bad_sw_if_index;
1138 bvi_mac = mp->
bvi_mac ? 1 : 0;
1164 if (flags & L2INPUT_FEAT_ ## a) \ 1165 rbm = l2input_intf_bitmap_enable (sw_if_index, L2INPUT_FEAT_ ## a, mp->is_set); 1194 rv = VNET_API_ERROR_NO_SUCH_ENTRY;
1224 rv = VNET_API_ERROR_NO_SUCH_ENTRY;
1231 rv = VNET_API_ERROR_UNSPECIFIED;
1242 u32 hw_if_index, sw_if_index = (
u32) ~ 0;
1249 u64 sup_and_sub_key;
1260 if (
id == 0 ||
id > 4095)
1262 rv = VNET_API_ERROR_INVALID_VLAN;
1271 rv = VNET_API_ERROR_VLAN_ALREADY_EXISTS;
1276 *kp = sup_and_sub_key;
1278 memset (&
template, 0,
sizeof (
template));
1281 template.sub.id = id;
1282 template.sub.eth.raw_flags = 0;
1283 template.sub.eth.flags.one_tag = 1;
1284 template.sub.eth.outer_vlan_id = id;
1285 template.sub.eth.flags.exact_match = 1;
1291 rv = VNET_API_ERROR_INVALID_REGISTRATION;
1305 rmp->_vl_msg_id = ntohs (VL_API_CREATE_VLAN_SUBIF_REPLY);
1307 rmp->
retval = ntohl (rv);
1317 u32 sw_if_index = ~0;
1325 u64 sup_and_sub_key;
1336 rv = VNET_API_ERROR_BOND_SLAVE_NOT_ALLOWED;
1341 sub_id = ntohl (mp->
sub_id);
1343 sup_and_sub_key = ((
u64) (sw_if_index) << 32) | (
u64) sub_id;
1349 clib_warning (
"sup sw_if_index %d, sub id %d already exists\n",
1350 sw_if_index, sub_id);
1351 rv = VNET_API_ERROR_SUBIF_ALREADY_EXISTS;
1356 *kp = sup_and_sub_key;
1358 memset (&
template, 0,
sizeof (
template));
1360 template.sup_sw_if_index = sw_if_index;
1361 template.sub.id = sub_id;
1362 template.sub.eth.flags.no_tags = mp->
no_tags;
1363 template.sub.eth.flags.one_tag = mp->
one_tag;
1364 template.sub.eth.flags.two_tags = mp->
two_tags;
1365 template.sub.eth.flags.dot1ad = mp->
dot1ad;
1366 template.sub.eth.flags.exact_match = mp->
exact_match;
1367 template.sub.eth.flags.default_sub = mp->
default_sub;
1377 rv = VNET_API_ERROR_SUBIF_CREATE_FAILED;
1402 u32 tunnel_sw_if_index;
1412 memset (&rpath, 0,
sizeof (rpath));
1464 u32 fib_index,
int is_del);
1473 rv = VNET_API_ERROR_NO_SUCH_FIB;
1481 fib_index, mp->
is_add == 0);
1504 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
1520 REPLY_MACRO (VL_API_PROXY_ARP_INTFC_ENABLE_DISABLE_REPLY);
1527 vpe_main_t *rm = &vpe_main;
1536 u32 adj_index, sw_if_index;
1544 increment_missing_api_client_counter (rm->vlib_main);
1556 adj_index = ip6_fib_lookup (im6, sw_if_index, &
addr.ip6);
1564 if (adj_index == ~0)
1572 && adj->rewrite_header.sw_if_index == sw_if_index)
1579 && adj->rewrite_header.sw_if_index == sw_if_index)
1612 REPLY_MACRO (VL_API_SW_INTERFACE_SET_MPLS_ENABLE_REPLY);
1626 memset (mp, 0,
sizeof (*mp));
1627 mp->_vl_msg_id = ntohs (VL_API_SW_INTERFACE_SET_FLAGS);
1647 q = vl_api_client_index_to_input_queue (reg->client_index);
1650 mp = vl_msg_api_alloc (sizeof (*mp));
1651 mp->_vl_msg_id = ntohs (VL_API_OAM_EVENT);
1652 clib_memcpy (mp->dst_address, &t->dst_address,
1653 sizeof (mp->dst_address));
1654 mp->state = t->state;
1655 vl_msg_api_send_shmem (q, (u8 *)&mp);
1693 rmp->_vl_msg_id = ntohs (VL_API_VNET_SUMMARY_STATS_REPLY);
1697 memset (total_pkts, 0,
sizeof (total_pkts));
1698 memset (total_bytes, 0,
sizeof (total_bytes));
1709 total_pkts[which] += v.
packets;
1710 total_bytes[which] += v.
bytes;
1728 u32 address_length: 6;
1739 static u32 *sw_if_indices_to_shut;
1745 int rv = VNET_API_ERROR_NO_SUCH_FIB;
1753 fib = &fib_table->v4;
1754 vnet_sw_interface_t * si;
1756 if (fib->table_id != target_fib_id)
1760 mpls_fib_reset_labels (fib->table_id);
1763 vnet_proxy_arp_fib_reset (fib->table_id);
1766 vnet_set_ip4_flow_hash (fib->table_id, IP_FLOW_HASH_DEFAULT);
1768 vec_reset_length (sw_if_indices_to_shut);
1771 pool_foreach (si, im->sw_interfaces,
1773 u32 sw_if_index = si->sw_if_index;
1775 if (sw_if_index < vec_len (im4->fib_index_by_sw_if_index)
1776 && (im4->fib_index_by_sw_if_index[si->sw_if_index] ==
1778 vec_add1 (sw_if_indices_to_shut, si->sw_if_index);
1781 for (i = 0; i <
vec_len (sw_if_indices_to_shut); i++) {
1782 sw_if_index = sw_if_indices_to_shut[
i];
1809 static u32 *sw_if_indices_to_shut;
1814 int rv = VNET_API_ERROR_NO_SUCH_FIB;
1822 vnet_sw_interface_t * si;
1823 fib = &(fib_table->v6);
1825 if (fib->table_id != target_fib_id)
1828 vec_reset_length (sw_if_indices_to_shut);
1831 pool_foreach (si, im->sw_interfaces,
1833 if (im6->fib_index_by_sw_if_index[si->sw_if_index] ==
1835 vec_add1 (sw_if_indices_to_shut, si->sw_if_index);
1838 for (i = 0; i <
vec_len (sw_if_indices_to_shut); i++) {
1839 sw_if_index = sw_if_indices_to_shut[
i];
1868 rv = ip4_reset_fib_t_handler (mp);
1884 (
int) (mp->
is_add == 0));
1900 (
int) (mp->
is_add == 0));
1916 (
int) (mp->
is_add == 0));
1933 (
int) (mp->
is_add == 0));
1978 u8 is_ipv6,
u8 * host_address,
u8 * router_address,
1997 if (
NULL != host_mac)
2000 mp->_vl_msg_id = ntohs (VL_API_DHCP_COMPL_EVENT);
2063 rmp->
vpe_pid = ntohl (getpid());
2071 u8 **shmem_vecp = (
u8 **) arg;
2077 shmem_vec = *shmem_vecp;
2086 clib_memcpy (shmem_vec + offset, buffer, buffer_bytes);
2091 *shmem_vecp = shmem_vec;
2111 rp->_vl_msg_id = ntohs (VL_API_CLI_REPLY);
2134 u8 **mem_vecp = (
u8 **) arg;
2135 u8 *mem_vec = *mem_vecp;
2139 clib_memcpy (mem_vec + offset, buffer, buffer_bytes);
2140 *mem_vecp = mem_vec;
2164 rmp->
length = htonl (len);
2189 rv = VNET_API_ERROR_UNSPECIFIED;
2196 REPLY_MACRO (VL_API_SET_ARP_NEIGHBOR_LIMIT_REPLY);
2219 memset (a, 0,
sizeof (*a));
2244 for (i = 0; i < mp->
n_tags; i++)
2273 memset (a, 0,
sizeof (*a));
2279 rv = VNET_API_ERROR_NO_SUCH_NODE2;
2285 rv = VNET_API_ERROR_NO_SUCH_NODE2;
2292 deser_tun_names += 1;
2295 int tun_name_len = 0;
2297 for (i = 0; i < num_tunnels; i++)
2299 tun_name_len = *deser_tun_names;
2300 deser_tun_names += 1;
2302 memcpy (tun_name, deser_tun_names, tun_name_len);
2304 deser_tun_names += tun_name_len;
2326 memset (a, 0,
sizeof (*a));
2347 clib_warning (
"multicast replication without DPDK not implemented");
2348 rv = VNET_API_ERROR_UNIMPLEMENTED;
2353 REPLY_MACRO (VL_API_SR_MULTICAST_MAP_ADD_DEL_REPLY);
2357 #define foreach_classify_add_del_table_field \ 2362 _(match_n_vectors) \ 2363 _(next_table_index) \ 2364 _(miss_next_index) \ 2365 _(current_data_flag) \ 2366 _(current_data_offset) 2380 #define _(a) a = ntohl(mp->a); 2389 rv = VNET_API_ERROR_NO_SUCH_TABLE;
2401 skip_n_vectors, match_n_vectors,
2402 next_table_index, miss_next_index, &table_index,
2409 if (rv == 0 && mp->
is_add)
2411 t = pool_elt_at_index (cm->tables, table_index);
2412 rmp->skip_n_vectors = ntohl(t->skip_n_vectors);
2413 rmp->match_n_vectors = ntohl(t->match_n_vectors);
2414 rmp->new_table_index = ntohl(table_index);
2418 rmp->skip_n_vectors = ~0;
2419 rmp->match_n_vectors = ~0;
2420 rmp->new_table_index = ~0;
2432 u32 table_index, hit_next_index, opaque_index, metadata;
2439 advance = ntohl (mp->
advance);
2444 (cm, table_index, mp->
match, hit_next_index, opaque_index,
2445 advance, action, metadata, mp->
is_add);
2447 REPLY_MACRO (VL_API_CLASSIFY_ADD_DEL_SESSION_REPLY);
2456 u32 table_index, sw_if_index;
2470 REPLY_MACRO (VL_API_CLASSIFY_SET_INTERFACE_IP_TABLE_REPLY);
2478 u32 sw_if_index, ip4_table_index, ip6_table_index, other_table_index;
2499 if (ip4_table_index != ~0 || ip6_table_index != ~0
2500 || other_table_index != ~0)
2513 REPLY_MACRO (VL_API_CLASSIFY_SET_INTERFACE_L2_TABLES_REPLY);
2532 u32 sw_if_index,
u32 enable);
2546 REPLY_MACRO (VL_API_L2_INTERFACE_EFP_FILTER_REPLY);
2561 vtr_op = ntohl (mp->
vtr_op);
2578 rv = VNET_API_ERROR_INVALID_VALUE;
2579 goto bad_sw_if_index;
2588 REPLY_MACRO (VL_API_L2_INTERFACE_VLAN_TAG_REWRITE_REPLY);
2596 u32 sw_if_index = (
u32) ~ 0;
2685 memset (mp, 0,
sizeof (*mp));
2686 mp->_vl_msg_id = ntohs (VL_API_SW_INTERFACE_VHOST_USER_DETAILS);
2742 if_name =
format (if_name,
"%U",
2746 memset (mp, 0,
sizeof (*mp));
2747 mp->_vl_msg_id = ntohs (VL_API_SW_IF_L2TPV3_TUNNEL_DETAILS);
2782 send_sw_if_l2tpv3_tunnel_details (am, q, session, lm, mp->context);
2802 memset (mp, 0,
sizeof (*mp));
2803 mp->_vl_msg_id = ntohs (VL_API_L2_FIB_TABLE_ENTRY);
2876 strncpy ((
char *) rmp->
build_directory, vpe_api_get_build_directory(),
2878 strncpy ((
char *) rmp->
version, vpe_api_get_version(),
2880 strncpy ((
char *) rmp->
build_date, vpe_api_get_build_date(),
2893 u32 node_index = ~0;
2898 rv = VNET_API_ERROR_NO_SUCH_NODE;
2900 node_index = n->
index;
2917 u32 next_node_index = ~0, next_index = ~0;
2924 rv = VNET_API_ERROR_NO_SUCH_NODE;
2932 rv = VNET_API_ERROR_NO_SUCH_NODE2;
2936 next_node_index = next_node->
index;
2942 rv = VNET_API_ERROR_NO_SUCH_ENTRY;
2964 u32 next_index = ~0;
2970 rv = VNET_API_ERROR_NO_SUCH_NODE;
2977 rv = VNET_API_ERROR_NO_SUCH_NODE2;
2995 u32 sw_if_index = (
u32) ~ 0;
3000 rv = VNET_API_ERROR_UNIMPLEMENTED;
3004 u32 encap_fib_index;
3014 rv = VNET_API_ERROR_NO_SUCH_FIB;
3017 encap_fib_index = p[0];
3021 encap_fib_index = ~0;
3032 encap_fib_index, &sw_if_index);
3054 clib_net_to_host_u64
3059 REPLY_MACRO (VL_API_L2TPV3_SET_TUNNEL_COOKIES_REPLY);
3076 REPLY_MACRO (VL_API_L2TPV3_INTERFACE_ENABLE_DISABLE_REPLY);
3088 rv = VNET_API_ERROR_INVALID_VALUE;
3104 u32 encap_fib_index;
3108 u32 sw_if_index = ~0;
3113 rv = VNET_API_ERROR_NO_SUCH_FIB;
3116 encap_fib_index = p[0];
3117 memset (a, 0,
sizeof (*a));
3129 rv = VNET_API_ERROR_SAME_SRC_DST;
3137 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
3142 a->
vni = ntohl (mp->
vni);
3163 memset (rmp, 0,
sizeof (*rmp));
3164 rmp->_vl_msg_id = ntohs (VL_API_VXLAN_TUNNEL_DETAILS);
3178 rmp->
vni = htonl (t->
vni);
3203 if (~0 == sw_if_index)
3208 send_vxlan_tunnel_details(t, q, mp->context);
3233 u32 sw_if_index = ~0;
3238 rv = VNET_API_ERROR_NO_SUCH_FIB;
3241 outer_fib_id = p[0];
3247 rv = VNET_API_ERROR_SAME_SRC_DST;
3250 memset (a, 0,
sizeof (*a));
3278 memset (rmp, 0,
sizeof (*rmp));
3279 rmp->_vl_msg_id = ntohs (VL_API_GRE_TUNNEL_DETAILS);
3306 if (~0 == sw_if_index)
3311 send_gre_tunnel_details(t, q, mp->context);
3342 (
int) (mp->
is_add != 0));
3357 u32 encap_fib_index, decap_fib_index;
3361 u32 sw_if_index = ~0;
3367 rv = VNET_API_ERROR_NO_SUCH_FIB;
3370 encap_fib_index = p[0];
3375 if (protocol == VXLAN_GPE_INPUT_NEXT_IP4_INPUT)
3380 rv = VNET_API_ERROR_NO_SUCH_INNER_FIB;
3383 decap_fib_index = p[0];
3394 rv = VNET_API_ERROR_SAME_SRC_DST;
3397 memset (a, 0,
sizeof (*a));
3415 a->
vni = ntohl (mp->
vni);
3436 memset (rmp, 0,
sizeof (*rmp));
3437 rmp->_vl_msg_id = ntohs (VL_API_VXLAN_GPE_TUNNEL_DETAILS);
3452 rmp->
vni = htonl (t->
vni);
3477 if (~0 == sw_if_index)
3482 send_vxlan_gpe_tunnel_details(t, q, mp->context);
3515 ls_locator_t *ls_loc;
3516 u32 ls_index = ~0, locator_num;
3520 memset (a, 0,
sizeof (a[0]));
3524 a->
name = locator_name;
3527 locator_num = clib_net_to_host_u32 (mp->
locator_num);
3529 memset (&locator, 0,
sizeof (locator));
3530 for (i = 0; i < locator_num; i++)
3532 ls_loc = &((ls_locator_t *) mp->
locators)[
i];
3535 locator.
sw_if_index = htonl (ls_loc->sw_if_index);
3536 locator.
priority = ls_loc->priority;
3537 locator.
weight = ls_loc->weight;
3552 rmp->
ls_index = clib_host_to_net_u32 (ls_index);
3567 memset (&locator, 0,
sizeof (locator));
3568 memset (a, 0,
sizeof (a[0]));
3578 a->
name = locator_name;
3615 return VNET_API_ERROR_INVALID_VALUE;
3631 u32 locator_set_index = ~0, map_index = ~0;
3634 memset (a, 0,
sizeof (a[0]));
3635 memset (eid, 0,
sizeof (eid[0]));
3646 rv = VNET_API_ERROR_INVALID_VALUE;
3649 locator_set_index = p[0];
3669 REPLY_MACRO (VL_API_LISP_ADD_DEL_LOCAL_EID_REPLY);
3679 clib_net_to_host_u32 (mp->
dp_table),
3681 REPLY_MACRO (VL_API_LISP_EID_TABLE_ADD_DEL_MAP_REPLY)}
3694 unformat_lisp_loc_pairs (
void *lcl_locs,
void *rmt_locs,
u32 rloc_num)
3700 for (i = 0; i < rloc_num; i++)
3703 r = &((rloc_t *) lcl_locs)[
i];
3704 memset (&pair.lcl_loc, 0, sizeof (pair.lcl_loc));
3708 r = &((rloc_t *) rmt_locs)[
i];
3709 memset (&pair.rmt_loc, 0, sizeof (pair.rmt_loc));
3712 pair.priority = r->priority;
3713 pair.weight = r->weight;
3727 for (i = 0; i < rloc_num; i++)
3730 r = &((rloc_t *) rmt_locs)[
i];
3731 memset (&loc, 0,
sizeof (loc));
3734 loc.priority = r->priority;
3735 loc.weight = r->weight;
3751 memset (a, 0,
sizeof (a[0]));
3760 if (rv || 0 == pairs)
3772 REPLY_MACRO (VL_API_LISP_GPE_ADD_DEL_FWD_ENTRY_REPLY);
3783 memset (&addr, 0,
sizeof (addr));
3788 REPLY_MACRO (VL_API_LISP_ADD_DEL_MAP_SERVER_REPLY);
3799 memset (a, 0,
sizeof (a[0]));
3806 REPLY_MACRO (VL_API_LISP_ADD_DEL_MAP_RESOLVER_REPLY);
3820 REPLY_MACRO (VL_API_LISP_GPE_ENABLE_DISABLE_REPLY);
3884 REPLY_MACRO (VL_API_LISP_GPE_ADD_DEL_IFACE_REPLY);
3925 REPLY_MACRO (VL_API_LISP_PITR_SET_LOCATOR_SET_REPLY);
3934 u8 *locator_set_name =
NULL;
3946 REPLY_MACRO (VL_API_LISP_ADD_DEL_MAP_REQUEST_ITR_RLOCS_REPLY);
3957 u32 rloc_num = clib_net_to_host_u32 (mp->
rloc_num);
3959 memset (eid, 0,
sizeof (eid[0]));
3991 REPLY_MACRO (VL_API_LISP_ADD_DEL_REMOTE_MAPPING_REPLY);
4001 memset (a, 0,
sizeof (a[0]));
4015 REPLY_MACRO (VL_API_LISP_ADD_DEL_ADJACENCY_REPLY);
4026 memset (rmp, 0,
sizeof (*rmp));
4027 rmp->_vl_msg_id = ntohs (VL_API_LISP_LOCATOR_DETAILS);
4054 u32 ls_index = ~0, *locit = 0;
4094 u32 context,
u32 ls_index)
4100 memset (rmp, 0,
sizeof (*rmp));
4101 rmp->_vl_msg_id = ntohs (VL_API_LISP_LOCATOR_SET_DETAILS);
4108 strncpy ((
char *) rmp->
ls_name, (
char *) lsit->
name,
4113 str =
format (0,
"<remote-%d>", ls_index);
4139 if (filter && !((1 == filter && lsit->local) ||
4140 (2 == filter && !lsit->local)))
4167 prefix_length[0] = 0;
4180 ip_prefix_t *ippref;
4203 u32 context,
u8 filter)
4211 ip_prefix_t *ip_prefix =
NULL;
4227 clib_warning (
"Filter error, unknown filter: %d", filter);
4236 memset (rmp, 0,
sizeof (*rmp));
4237 rmp->_vl_msg_id = ntohs (VL_API_LISP_EID_TABLE_DETAILS);
4246 rmp->
ttl = clib_host_to_net_u32 (mapit->
ttl);
4307 memset (eid, 0,
sizeof (*eid));
4313 if ((
u32) ~ 0 == mi)
4325 send_lisp_eid_table_details(mapit, q, mp->context,
4340 memset (rmp, 0,
sizeof (*rmp));
4341 rmp->_vl_msg_id = ntohs (VL_API_LISP_GPE_TUNNEL_DETAILS);
4380 send_lisp_gpe_fwd_entry_details(lfe, q, mp->context);
4392 memset (rmp, 0,
sizeof (*rmp));
4393 rmp->_vl_msg_id = ntohs (VL_API_LISP_MAP_SERVER_DETAILS);
4443 memset (rmp, 0,
sizeof (*rmp));
4444 rmp->_vl_msg_id = ntohs (VL_API_LISP_MAP_RESOLVER_DETAILS);
4494 memset (rmp, 0,
sizeof (*rmp));
4495 rmp->_vl_msg_id = ntohs (VL_API_LISP_EID_TABLE_MAP_DETAILS);
4497 rmp->
vni = clib_host_to_net_u32 (p->
key);
4510 uword *vni_table = 0;
4541 memset (rmp, 0,
sizeof (*rmp));
4542 rmp->_vl_msg_id = ntohs (VL_API_LISP_EID_TABLE_VNI_DETAILS);
4544 rmp->
vni = clib_host_to_net_u32 (vni);
4555 for (i = 0; i < n; i++)
4558 memset (&a, 0,
sizeof (a));
4613 REPLY_MACRO2 (VL_API_SHOW_LISP_MAP_REGISTER_STATE_REPLY,
4628 u32 vni = clib_net_to_host_u32 (mp->
vni);
4631 size =
vec_len (adjs) *
sizeof (
a);
4662 hash_set (vnis, p->key, 0);
4667 hash_set (vnis, p->key, 0);
4720 tmp_str =
format (0,
" ");
4730 REPLY_MACRO2(VL_API_LISP_GET_MAP_REQUEST_ITR_RLOCS_REPLY,
4759 tmp_str =
format (0,
"N/A");
4772 tmp_str =
format (0,
"N/A");
4801 REPLY_MACRO (VL_API_INTERFACE_NAME_RENUMBER_REPLY);
4806 u32 sw_if_index,
u32 address)
4811 static f64 arp_event_last_time;
4829 (now - arp_event_last_time) < 10.0)))
4834 arp_event_last_time = now;
4848 static f64 nd_event_last_time;
4868 (now - nd_event_last_time) < 10.0)))
4873 nd_event_last_time = now;
4916 memset (event, 0,
sizeof (*event));
4918 event->_vl_msg_id = ntohs (VL_API_IP4_ARP_EVENT);
4929 vpe_resolver_process_node.index,
4937 vpe_resolver_process_node.index,
4955 memset (event, 0,
sizeof (*event));
4957 event->_vl_msg_id = ntohs (VL_API_IP6_ND_EVENT);
4968 vpe_resolver_process_node.index,
4976 vpe_resolver_process_node.index,
4988 u32 sw_if_index, ip4_table_index, ip6_table_index, l2_table_index;
4998 ip6_table_index, l2_table_index, mp->
is_add);
5002 REPLY_MACRO (VL_API_INPUT_ACL_SET_INTERFACE_REPLY);
5019 rv = VNET_API_ERROR_UNIMPLEMENTED;
5032 u32 sw_if_index __attribute__ ((unused));
5033 u32 spd_id __attribute__ ((unused));
5036 spd_id = ntohl (mp->
spd_id);
5043 rv = VNET_API_ERROR_UNIMPLEMENTED;
5048 REPLY_MACRO (VL_API_IPSEC_INTERFACE_ADD_DEL_SPD_REPLY);
5061 memset (&p, 0,
sizeof (p));
5088 if (mp->
policy == IPSEC_POLICY_ACTION_RESOLVE)
5091 rv = VNET_API_ERROR_UNIMPLEMENTED;
5107 rv = VNET_API_ERROR_UNIMPLEMENTED;
5112 REPLY_MACRO (VL_API_IPSEC_SPD_ADD_DEL_ENTRY_REPLY);
5124 memset (&sa, 0,
sizeof (sa));
5127 sa.
spi = ntohl (mp->
spi);
5132 rv = VNET_API_ERROR_UNIMPLEMENTED;
5142 rv = VNET_API_ERROR_UNIMPLEMENTED;
5156 clib_warning (
"unsupported integ-alg: '%U'", format_ipsec_integ_alg,
5157 mp->integrity_algorithm);
5158 rv = VNET_API_ERROR_UNIMPLEMENTED;
5166 if (mp->integrity_algorithm != IPSEC_INTEG_ALG_NONE
5167 && mp->integrity_algorithm != IPSEC_INTEG_ALG_AES_GCM_128)
5170 (
"unsupported: aes-gcm-128 crypto-alg needs none as integ-alg");
5171 rv = VNET_API_ERROR_UNIMPLEMENTED;
5179 clib_warning (
"unsupported integ-alg: aes-gcm-128");
5180 rv = VNET_API_ERROR_UNIMPLEMENTED;
5185 clib_warning (
"unsupported integ-alg: none");
5186 rv = VNET_API_ERROR_UNIMPLEMENTED;
5197 if (sa.is_tunnel_ip6)
5199 clib_memcpy (&sa.tunnel_src_addr, mp->tunnel_src_address, 16);
5200 clib_memcpy (&sa.tunnel_dst_addr, mp->tunnel_dst_address, 16);
5204 clib_memcpy (&sa.tunnel_src_addr.ip4.data, mp->tunnel_src_address, 4);
5205 clib_memcpy (&sa.tunnel_dst_addr.ip4.data, mp->tunnel_dst_address, 4);
5210 rv = VNET_API_ERROR_UNIMPLEMENTED;
5215 REPLY_MACRO (VL_API_IPSEC_SAD_ADD_DEL_ENTRY_REPLY);
5231 rv = VNET_API_ERROR_UNSPECIFIED;
5233 rv = VNET_API_ERROR_UNIMPLEMENTED;
5256 rv = VNET_API_ERROR_UNSPECIFIED;
5258 rv = VNET_API_ERROR_UNIMPLEMENTED;
5261 REPLY_MACRO (VL_API_IKEV2_PROFILE_SET_AUTH_REPLY);
5280 rv = VNET_API_ERROR_UNSPECIFIED;
5282 rv = VNET_API_ERROR_UNIMPLEMENTED;
5303 rv = VNET_API_ERROR_UNSPECIFIED;
5305 rv = VNET_API_ERROR_UNIMPLEMENTED;
5323 rv = VNET_API_ERROR_UNSPECIFIED;
5325 rv = VNET_API_ERROR_UNIMPLEMENTED;
5347 rv = VNET_API_ERROR_UNIMPLEMENTED;
5369 REPLY_MACRO (VL_API_COP_INTERFACE_ENABLE_DISABLE_REPLY);
5392 REPLY_MACRO (VL_API_COP_WHITELIST_ENABLE_DISABLE_REPLY);
5489 rmp->
sw_if_index = clib_host_to_net_u32(sw_if_index);
5525 memset (&cfg, 0,
sizeof (cfg));
5544 rv = VNET_API_ERROR_UNSPECIFIED;
5549 if (rv == 0 && mp->
is_add)
5566 memset (mp, 0,
sizeof (*mp));
5567 mp->_vl_msg_id = ntohs (VL_API_POLICER_DETAILS);
5569 mp->
cir = htonl (config->
rb.
kbps.cir_kbps);
5570 mp->
eir = htonl (config->
rb.
kbps.eir_kbps);
5571 mp->
cb = htonl (config->
rb.
kbps.cb_bytes);
5572 mp->
eb = htonl (config->
rb.
kbps.eb_bytes);
5636 name = (u8 *) hp->key;
5637 pool_index = hp->value[0];
5638 config = pool_elt_at_index (pm->configs, pool_index);
5639 templ = pool_elt_at_index (pm->policer_templates, pool_index);
5640 send_policer_details(name, config, templ, q, mp->context);
5653 u32 sw_if_index, ip4_table_index, ip6_table_index, l2_table_index;
5663 ip6_table_index, l2_table_index,
5668 REPLY_MACRO (VL_API_POLICER_CLASSIFY_SET_INTERFACE_REPLY);
5679 memset (mp, 0,
sizeof (*mp));
5680 mp->_vl_msg_id = ntohs (VL_API_POLICER_CLASSIFY_DETAILS);
5704 for (i = 0; i <
vec_len (vec_tbl); i++)
5706 if (
vec_elt (vec_tbl, i) == ~0)
5783 memset (mp, 0,
sizeof (*mp));
5784 mp->_vl_msg_id = ntohs (VL_API_MPLS_TUNNEL_DETAILS);
5842 path_count =
vec_len (api_rpaths);
5846 memset (mp, 0,
sizeof (*mp));
5847 mp->_vl_msg_id = ntohs (VL_API_MPLS_FIB_DETAILS);
5852 mp->
label = htonl (label);
5854 mp->
count = htonl (path_count);
5858 memset (fp, 0,
sizeof (*fp));
5888 hash_foreach(key, lfei, fib_table->mpls.mf_entries,
5890 vec_add1(lfeis, lfei);
5903 fib_table->ft_table_id,
5931 vec_add1 (table_ids, ntohl(t - cm->tables));
5938 rmp->_vl_msg_id = ntohs (VL_API_CLASSIFY_TABLE_IDS_REPLY);
5940 rmp->
count = ntohl (count);
5974 for (if_idx = 0; if_idx <
vec_len (vec_tbl); if_idx++)
5976 if (
vec_elt (vec_tbl, if_idx) == ~0 || sw_if_index != if_idx)
6017 if (table_id == t - cm->tables)
6019 rmp = vl_msg_api_alloc_as_if_client
6020 (sizeof (*rmp) + t->match_n_vectors * sizeof (u32x4));
6021 rmp->_vl_msg_id = ntohs (VL_API_CLASSIFY_TABLE_INFO_REPLY);
6022 rmp->context = mp->context;
6023 rmp->table_id = ntohl(table_id);
6024 rmp->nbuckets = ntohl(t->nbuckets);
6025 rmp->match_n_vectors = ntohl(t->match_n_vectors);
6026 rmp->skip_n_vectors = ntohl(t->skip_n_vectors);
6027 rmp->active_sessions = ntohl(t->active_elements);
6028 rmp->next_table_index = ntohl(t->next_table_index);
6029 rmp->miss_next_index = ntohl(t->miss_next_index);
6030 rmp->mask_length = ntohl(t->match_n_vectors * sizeof (u32x4));
6031 clib_memcpy(rmp->mask, t->mask, t->match_n_vectors * sizeof(u32x4));
6041 rmp->_vl_msg_id = ntohs ((VL_API_CLASSIFY_TABLE_INFO_REPLY));
6043 rmp->retval = ntohl (VNET_API_ERROR_CLASSIFY_TABLE_NOT_FOUND);
6060 vnet_classify_entry_t * e,
u32 context)
6065 memset (rmp, 0,
sizeof (*rmp));
6066 rmp->_vl_msg_id = ntohs (VL_API_CLASSIFY_SESSION_DETAILS);
6070 rmp->
advance = ntohl (e->advance);
6094 if (table_id == t - cm->tables)
6096 vnet_classify_bucket_t * b;
6097 vnet_classify_entry_t * v, * save_v;
6100 for (i = 0; i < t->nbuckets; i++)
6102 b = &t->buckets [i];
6106 save_v = vnet_classify_get_entry (t, b->offset);
6107 for (j = 0; j < (1<<b->log2_pages); j++)
6109 for (k = 0; k < t->entries_per_page; k++)
6111 v = vnet_classify_entry_at_index
6112 (t, save_v, j*t->entries_per_page + k);
6113 if (vnet_classify_entry_is_free (v))
6116 send_classify_session_details
6117 (q, table_id, t->match_n_vectors * sizeof (u32x4),
6135 u16 collector_port = UDP_DST_PORT_ipfix;
6137 u32 template_interval;
6145 if (collector_port == (
u16) ~ 0)
6146 collector_port = UDP_DST_PORT_ipfix;
6148 fib_id = ntohl (mp->
vrf_id);
6160 rv = VNET_API_ERROR_NO_SUCH_FIB;
6170 if (template_interval == ~0)
6171 template_interval = 20;
6174 if (collector.
as_u32 == 0)
6176 rv = VNET_API_ERROR_INVALID_VALUE;
6182 rv = VNET_API_ERROR_INVALID_VALUE;
6186 if (path_mtu > 1450 )
6188 rv = VNET_API_ERROR_INVALID_VALUE;
6194 rv = VNET_API_ERROR_INVALID_VALUE;
6233 memset (rmp, 0,
sizeof (*rmp));
6234 rmp->_vl_msg_id = ntohs (VL_API_IPFIX_EXPORTER_DETAILS);
6245 rmp->
vrf_id = htonl (vrf_id);
6261 u32 src_port = UDP_DST_PORT_ipfix;
6271 domain_id, (
u16) src_port);
6278 REPLY_MACRO (VL_API_SET_IPFIX_CLASSIFY_STREAM_REPLY);
6294 memset (rmp, 0,
sizeof (*rmp));
6295 rmp->_vl_msg_id = ntohs (VL_API_IPFIX_CLASSIFY_STREAM_DETAILS);
6313 u32 classify_table_index;
6315 u8 transport_protocol;
6318 classify_table_index = ntohl (mp->
table_id);
6326 rv = VNET_API_ERROR_UNSPECIFIED;
6330 memset (&args, 0,
sizeof (args));
6346 rv = VNET_API_ERROR_VALUE_EXIST;
6356 rv = VNET_API_ERROR_NO_SUCH_ENTRY;
6374 if (is_add == 0 || (rv && is_add))
6378 REPLY_MACRO (VL_API_SET_IPFIX_CLASSIFY_STREAM_REPLY);
6392 memset (mp, 0,
sizeof (*mp));
6393 mp->_vl_msg_id = ntohs (VL_API_IPFIX_CLASSIFY_TABLE_DETAILS);
6448 u32 hw_if_index = ~0;
6454 if (hw_if_index != ~0)
6473 rv = VNET_API_ERROR_CANNOT_CREATE_PCAP_FILE;
6488 u32 stream_index = ~0;
6521 u16 *high_ports = 0;
6523 u16 tmp_low, tmp_high;
6529 if (num_ranges > 32)
6531 rv = VNET_API_ERROR_EXCEEDED_NUMBER_OF_RANGES_CAPACITY;
6538 for (i = 0; i < num_ranges; i++)
6544 if (tmp_low > tmp_high || tmp_low == 0 || tmp_high > 65535)
6546 rv = VNET_API_ERROR_INVALID_VALUE;
6550 vec_add1 (high_ports, tmp_high + 1);
6554 if ((is_ipv6 && mask_length > 128) || (!is_ipv6 && mask_length > 32))
6556 rv = VNET_API_ERROR_ADDRESS_LENGTH_MISMATCH;
6560 vrf_id = ntohl (mp->
vrf_id);
6564 rv = VNET_API_ERROR_INVALID_VALUE;
6576 high_ports, is_add);
6585 high_ports, is_add);
6591 REPLY_MACRO (VL_API_IP_SOURCE_AND_PORT_RANGE_CHECK_ADD_DEL_REPLY);
6620 if (vrf_id[i] != 0 && vrf_id[i] != ~0)
6626 rv = VNET_API_ERROR_INVALID_VALUE;
6630 fib_index[
i] = p[0];
6646 REPLY_MACRO (VL_API_IP_SOURCE_AND_PORT_RANGE_CHECK_INTERFACE_ADD_DEL_REPLY);
6656 u32 sw_if_index = ~0;
6661 rv = VNET_API_ERROR_SAME_SRC_DST;
6665 memset (a, 0,
sizeof (*a));
6691 memset (rmp, 0,
sizeof (*rmp));
6692 rmp->_vl_msg_id = ntohs (VL_API_IPSEC_GRE_TUNNEL_DETAILS);
6719 if (~0 == sw_if_index)
6724 send_ipsec_gre_tunnel_details(t, q, mp->context);
6763 vtr_op = ntohl (mp->
vtr_op);
6774 rv = VNET_API_ERROR_INVALID_VALUE;
6775 goto bad_sw_if_index;
6784 REPLY_MACRO (VL_API_L2_INTERFACE_PBB_TAG_REWRITE_REPLY);
6796 ip46_address_t local_addr;
6797 memset (&local_addr, 0,
sizeof (local_addr));
6798 ip46_address_t peer_addr;
6799 memset (&peer_addr, 0,
sizeof (peer_addr));
6828 ip46_address_t local_addr;
6829 memset (&local_addr, 0,
sizeof (local_addr));
6830 ip46_address_t peer_addr;
6831 memset (&peer_addr, 0,
sizeof (peer_addr));
6855 if (bs->
transport != BFD_TRANSPORT_UDP4 &&
6862 memset (mp, 0,
sizeof (*mp));
6863 mp->_vl_msg_id = ntohs (VL_API_BFD_UDP_SESSION_DETAILS);
6868 bfd_udp_key_t *key = &bus->
key;
6869 mp->
sw_if_index = clib_host_to_net_u32 (key->sw_if_index);
6874 sizeof (key->local_addr));
6880 sizeof (key->local_addr.ip4.data));
6882 sizeof (key->peer_addr.ip4.data));
6896 q = vl_api_client_index_to_input_queue (reg->client_index);
6899 switch (bs->transport)
6901 case BFD_TRANSPORT_UDP4:
6903 case BFD_TRANSPORT_UDP6:
6904 send_bfd_udp_session_details (q, 0, bs);
6924 if (bs->transport == BFD_TRANSPORT_UDP4 ||
6925 bs->transport == BFD_TRANSPORT_UDP6)
6926 send_bfd_udp_session_details (q, mp->context, bs);
6970 u32 sw_if_index, ip4_table_index, ip6_table_index;
6979 ip6_table_index, mp->
is_add);
6983 REPLY_MACRO (VL_API_FLOW_CLASSIFY_SET_INTERFACE_REPLY);
6994 memset (mp, 0,
sizeof (*mp));
6995 mp->_vl_msg_id = ntohs (VL_API_FLOW_CLASSIFY_DETAILS);
7019 for (i = 0; i <
vec_len (vec_tbl); i++)
7021 if (
vec_elt (vec_tbl, i) == ~0)
7037 memset (mp, 0,
sizeof (*mp));
7038 mp->_vl_msg_id = ntohs (VL_API_IPSEC_SPD_DETAILS);
7096 if (mp->sa_id == ~(0) || ntohl (mp->sa_id) == policy->sa_id)
7097 send_ipsec_spd_details (policy, q,
7111 u8 *arc_name, *feature_name;
7121 (
const char *) feature_name);
7123 rv = VNET_API_ERROR_INVALID_VALUE;
7130 if (reg->enable_disable_cb)
7131 error = reg->enable_disable_cb (sw_if_index, mp->
enable);
7134 (
const char *) feature_name,
7135 sw_if_index, mp->
enable, 0, 0);
7139 rv = VNET_API_ERROR_CANNOT_ENABLE_DISABLE_FEATURE;
7148 REPLY_MACRO (VL_API_FEATURE_ENABLE_DISABLE_REPLY);
7151 #define BOUNCE_HANDLER(nn) \ 7152 static void vl_api_##nn##_t_handler ( \ 7153 vl_api_##nn##_t *mp) \ 7155 vpe_client_registration_t *reg; \ 7156 vpe_api_main_t * vam = &vpe_api_main; \ 7157 unix_shared_memory_queue_t * q; \ 7160 pool_foreach(reg, vam->nn##_registrations, \ 7162 q = vl_api_client_index_to_input_queue (reg->client_index); \ 7169 if (q->cursize == q->maxsize) { \ 7170 clib_warning ("ERROR: receiver queue full, drop msg"); \ 7171 vl_msg_api_free (mp); \ 7174 vl_msg_api_send_shmem (q, (u8 *)&mp); \ 7178 vl_msg_api_free (mp); \ 7196 vl_msg_api_set_handlers(VL_API_##N, #n, \ 7197 vl_api_##n##_t_handler, \ 7199 vl_api_##n##_t_endian, \ 7200 vl_api_##n##_t_print, \ 7201 sizeof(vl_api_##n##_t), 1); 7210 "sr_tunnel_add_del",
7213 vl_api_sr_tunnel_add_del_t_endian,
7222 "sr_policy_add_del",
7225 vl_api_sr_policy_add_del_t_endian,
7234 += 5 *
sizeof (
u32x4);
7262 am->from_netconf_server_registration_hash =
hash_create (0,
sizeof (
uword));
7264 am->from_netconf_client_registration_hash =
hash_create (0,
sizeof (
uword));
7282 u64 baseva,
size, pvt_heap_size;
7284 const int max_buf_size = 4096;
7286 struct passwd _pw, *pw;
7287 struct group _grp, *grp;
7292 if (
unformat (input,
"prefix %s", &chroot_path))
7297 else if (
unformat (input,
"uid %d", &uid))
7299 else if (
unformat (input,
"gid %d", &gid))
7301 else if (
unformat (input,
"baseva %llx", &baseva))
7303 else if (
unformat (input,
"global-size %lldM", &size))
7305 else if (
unformat (input,
"global-size %lldG", &size))
7307 else if (
unformat (input,
"global-size %lld", &size))
7309 else if (
unformat (input,
"global-pvt-heap-size %lldM", &pvt_heap_size))
7311 else if (
unformat (input,
"global-pvt-heap-size size %lld",
7314 else if (
unformat (input,
"api-pvt-heap-size %lldM", &pvt_heap_size))
7316 else if (
unformat (input,
"api-pvt-heap-size size %lld",
7319 else if (
unformat (input,
"api-size %lldM", &size))
7321 else if (
unformat (input,
"api-size %lldG", &size))
7323 else if (
unformat (input,
"api-size %lld", &size))
7325 else if (
unformat (input,
"uid %s", &s))
7330 getpwnam_r (s, &_pw, buf,
vec_len (buf), &pw)) == ERANGE)
7331 && (
vec_len (buf) <= max_buf_size))
7340 "cannot fetch username %s", s);
7356 else if (
unformat (input,
"gid %s", &s))
7361 getgrnam_r (s, &_grp, buf,
vec_len (buf), &grp)) == ERANGE)
7362 && (
vec_len (buf) <= max_buf_size))
7371 "cannot fetch group %s", s);
7409 s =
format (s,
"bd mac/ip4 binding events");
7422 s =
format (s,
"bd mac/ip6 binding events");
7445 vlib_cli_output (vm,
"%U", format_arp_event, arp_event);
7450 vlib_cli_output (vm,
"%U", format_nd_event, nd_event);
7459 .path =
"show arp-nd-event registrations",
7461 .short_help =
"Show ip4 arp and ip6 nd event registrations",
7465 #define vl_msg_name_crc_list 7467 #undef vl_msg_name_crc_list 7472 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); 7473 foreach_vl_msg_name_crc_memclnt;
7474 foreach_vl_msg_name_crc_vpe;
void lisp_gpe_tenant_l2_iface_unlock(u32 vni)
Release the lock held on the tenant's L3 interface.
static u32 ip4_fib_lookup(ip4_main_t *im, u32 sw_if_index, ip4_address_t *dst)
Bind/Unbind an MPLS local label to an IP prefix.
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
DPDK interface HQoS subport parameters set request.
Reply for IPsec: Add/delete Security Association Database entry.
Reply for show_lisp_map_register_state.
Reply for classify table session dump request.
fib_protocol_t fp_proto
protocol type
struct l2fib_entry_key_t::@189::@191 fields
static void send_policer_details(u8 *name, sse2_qos_pol_cfg_params_st *config, policer_read_response_type_st *templ, unix_shared_memory_queue_t *q, u32 context)
DHCP Proxy config response.
Policer operational state response.
static void vl_api_dhcp_proxy_set_vss_t_handler(vl_api_dhcp_proxy_set_vss_t *mp)
static u8 * format_arp_event(u8 *s, va_list *args)
u32 fib_entry_get_fib_index(fib_node_index_t fib_entry_index)
#define BAD_RX_SW_IF_INDEX_LABEL
fib_protocol_t frp_proto
The protocol of the address below.
DHCP Proxy set / unset vss request.
static void vl_api_classify_session_dump_t_handler(vl_api_classify_session_dump_t *mp)
Proxy ARP add / del request.
void pg_enable_disable(u32 stream_index, int is_enable)
Classify get table IDs request.
static void vl_api_set_arp_neighbor_limit_t_handler(vl_api_set_arp_neighbor_limit_t *mp)
#define gid_address_ip_version(_a)
u32 bd_set_flags(vlib_main_t *vm, u32 bd_index, u32 flags, u32 enable)
Set the learn/forward/flood flags for the bridge domain.
#define vec_foreach_index(var, v)
Iterate over vector indices.
ip46_address_t frp_addr
The next-hop address.
Add / del ipsec gre tunnel request.
void mpls_sw_interface_enable_disable(mpls_main_t *mm, u32 sw_if_index, u8 is_enable)
u64 packets
packet counter
L2 interface vlan tag rewrite response.
L2 FIB add entry request.
#define clib_error_return_code(e, code, flags, args...)
u8 use_extended_sequence_number
cop: enable/disable whitelist filtration features on an interface Note: the supplied fib_id must matc...
static void * vl_api_sr_tunnel_add_del_t_print(vl_api_sr_tunnel_add_del_t *mp, void *handle)
static void send_flow_classify_details(u32 sw_if_index, u32 table_index, unix_shared_memory_queue_t *q, u32 context)
void dhcp_compl_event_callback(u32 client_index, u32 pid, u8 *hostname, u8 is_ipv6, u8 *host_address, u8 *router_address, u8 *host_mac)
sse2_qos_pol_cfg_params_st * configs
#define hash_set(h, key, value)
l2_input_config_t * configs
Set bridge flags response.
Register for ip6 nd resolution events.
#define VALIDATE_TX_SW_IF_INDEX(mp)
static void vl_api_l2_fib_table_entry_t_handler(vl_api_l2_fib_table_entry_t *mp)
ip4_address_t tunnel_dst
tunnel IPv4 dst address
vpe_api_main_t vpe_api_main
static void vl_api_l2_patch_add_del_t_handler(vl_api_l2_patch_add_del_t *mp)
static clib_error_t * api_segment_config(vlib_main_t *vm, unformat_input_t *input)
DHCP Client config response.
sll srl srl sll sra u16x4 i
static void send_ipsec_spd_details(ipsec_policy_t *p, unix_shared_memory_queue_t *q, u32 context)
static int nd_change_data_callback(u32 pool_index, u8 *new_mac, u32 sw_if_index, ip6_address_t *address)
Delete UDP BFD session response.
enable/disable LISP RLOC probing
#define gid_address_type(_a)
Args for creating a policy.
void vl_enable_disable_memory_api(vlib_main_t *vm, int yesno)
static void svm_pop_heap(void *oldheap)
static u8 * format_nd_event(u8 *s, va_list *args)
IPFIX classify tables dump request.
A representation of a fib path for fib_path_encode to convey the information to the caller...
Add UDP BFD session on interface.
Reply for get next node index.
int ip6_add_del_route_t_handler(vl_api_ip_add_del_route_t *mp)
vpe parser cli string response
static f64 vlib_process_wait_for_event_or_clock(vlib_main_t *vm, f64 dt)
Suspend a cooperative multi-tasking thread Waits for an event, or for the indicated number of seconds...
add or delete lisp gpe tunnel
mpls_label_t * mt_label_stack
The Label stack to apply to egress packets.
vlib_node_registration_t flow_report_process_node
(constructor) VLIB_REGISTER_NODE (flow_report_process_node)
static void vl_api_lisp_add_del_remote_mapping_t_handler(vl_api_lisp_add_del_remote_mapping_t *mp)
static uword ip46_address_is_multicast(ip46_address_t *a)
u32 l2vtr_configure(vlib_main_t *vlib_main, vnet_main_t *vnet_main, u32 sw_if_index, u32 vtr_op, u32 push_dot1q, u32 vtr_tag1, u32 vtr_tag2)
Configure vtag tag rewrite on the given interface.
sse2_qos_pol_action_params_st conform_action
u8 vnet_lisp_gpe_enable_disable_status(void)
Check if LISP-GPE is enabled.
void vl_set_memory_gid(int gid)
static void vl_api_gre_add_del_tunnel_t_handler(vl_api_gre_add_del_tunnel_t *mp)
int dhcpv6_proxy_set_server(ip6_address_t *addr, ip6_address_t *src_address, u32 fib_id, int insert_vss, int is_del)
u16 udp_checksum(udp_header_t *uh, u32 udp_len, void *ih, u8 version)
A representation of a path as described by a route producer.
static void send_vxlan_gpe_tunnel_details(vxlan_gpe_tunnel_t *t, unix_shared_memory_queue_t *q, u32 context)
Reply for IKEv2: Set IKEv2 profile traffic selector parameters.
void vl_msg_api_send_shmem(unix_shared_memory_queue_t *q, u8 *elem)
static void vl_api_lisp_eid_table_add_del_map_t_handler(vl_api_lisp_eid_table_add_del_map_t *mp)
static vlib_main_t * vlib_get_main(void)
clib_error_t * ikev2_add_del_profile(vlib_main_t *vm, u8 *name, int is_add)
iOAM Trace profile add / del response
static_always_inline void ipfix_classify_delete_table(u32 index)
static void vl_api_bridge_flags_t_handler(vl_api_bridge_flags_t *mp)
static void ip46_from_addr_buf(u32 is_ipv6, u8 *buf, ip46_address_t *ip)
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
Reply for IKEv2: Set IKEv2 profile authentication method.
u8 mt_next_hop_n_out_labels
static vnet_hw_interface_t * vnet_get_sup_hw_interface(vnet_main_t *vnm, u32 sw_if_index)
lisp_msmr_t * map_resolvers
uword * policer_config_by_name
Vhost-user interface details structure (fix this)
vnet_api_error_t bfd_udp_add_session(u32 sw_if_index, u32 desired_min_tx_us, u32 required_min_rx_us, u8 detect_mult, const ip46_address_t *local_addr, const ip46_address_t *peer_addr)
vnet_api_error_t bfd_session_set_flags(u32 bs_index, u8 admin_up_down)
static_always_inline u8 ipfix_classify_table_index_valid(u32 index)
Set/unset policer classify interface.
static void vl_api_l2_interface_pbb_tag_rewrite_t_handler(vl_api_l2_interface_pbb_tag_rewrite_t *mp)
void vl_set_global_pvt_heap_size(u64 size)
configure or disable LISP PITR node
Set flags on the interface.
Reply for locator_set add/del.
IKEv2: Add/delete profile.
int vnet_set_ip6_classify_intfc(vlib_main_t *vm, u32 sw_if_index, u32 table_index)
L2-GRE over IPSec packet processing.
static void vl_api_ipfix_classify_table_add_del_t_handler(vl_api_ipfix_classify_table_add_del_t *mp)
u32 * classify_table_index_by_sw_if_index[INPUT_ACL_N_TABLES]
ip6_address_t * multicast_address
multicast IP6 address
static void vl_api_show_lisp_map_register_state_t_handler(vl_api_show_lisp_map_register_state_t *mp)
vnet_interface_main_t interface_main
Add UDP BFD session response.
#define REPLY_MACRO4(t, n, body)
Control ping from client to api server request.
static void vl_api_classify_session_details_t_handler(vl_api_classify_session_details_t *mp)
static void send_classify_session_details(unix_shared_memory_queue_t *q, u32 table_id, u32 match_length, vnet_classify_entry_t *e, u32 context)
static void vl_api_show_lisp_rloc_probe_state_t_handler(vl_api_show_lisp_rloc_probe_state_t *mp)
int ipsec_set_interface_spd(vlib_main_t *vm, u32 sw_if_index, u32 spd_id, int is_add)
LISP map resolver status.
vl_api_lisp_adjacency_t adjacencies[count]
u32 mr_next_hop_out_label_stack[mr_next_hop_n_out_labels]
static void vl_api_set_ipfix_exporter_t_handler(vl_api_set_ipfix_exporter_t *mp)
void fib_entry_get_prefix(fib_node_index_t fib_entry_index, fib_prefix_t *pfx)
IPsec: Update Security Association keys.
void send_oam_event(oam_target_t *t)
static int arp_change_data_callback(u32 pool_index, u8 *new_mac, u32 sw_if_index, u32 address)
static void vl_api_vnet_get_summary_stats_t_handler(vl_api_vnet_get_summary_stats_t *mp)
u32 resulting_feature_bitmap
void lisp_gpe_tenant_l3_iface_unlock(u32 vni)
Release the lock held on the tenant's L3 interface.
Reply for gpe_iface add/del.
static void send_l2fib_table_entry(vpe_api_main_t *am, unix_shared_memory_queue_t *q, l2fib_entry_key_t *l2fe_key, l2fib_entry_result_t *l2fe_res, u32 context)
Fixed length block allocator.
static void vl_api_cli_inband_t_handler(vl_api_cli_inband_t *mp)
static void vl_api_create_loopback_t_handler(vl_api_create_loopback_t *mp)
L2TP tunnel set cookies response.
int ip4_add_del_route_t_handler(vl_api_ip_add_del_route_t *mp)
#define REPLY_MACRO2(t, body)
clib_error_t * vnet_lisp_gpe_enable_disable(vnet_lisp_gpe_enable_disable_args_t *a)
Enable/disable LISP-GPE.
static void vl_api_bridge_domain_details_t_handler(vl_api_bridge_domain_details_t *mp)
static void vl_api_policer_add_del_t_handler(vl_api_policer_add_del_t *mp)
Reply to IPFIX classify tables dump request.
vlib_counter_t * maxi
Shared wide counter pairs.
Request for a single block of summary stats.
static void vl_api_ipfix_classify_table_dump_t_handler(vl_api_ipfix_classify_table_dump_t *mp)
static void vl_api_classify_add_del_table_t_handler(vl_api_classify_add_del_table_t *mp)
Set max allowed ARP or ip6 neighbor entries request.
static f64 vlib_time_now(vlib_main_t *vm)
u32 * tunnel_index_by_sw_if_index
Mapping from sw_if_index to tunnel index.
static void vl_api_bfd_udp_del_t_handler(vl_api_bfd_udp_del_t *mp)
Interface set vxlan-bypass request.
int vnet_add_del_ip6_nd_change_event(vnet_main_t *vnm, void *data_callback, u32 pid, void *address_arg, uword node_index, uword type_opaque, uword data, int is_add)
static void vl_api_l2tpv3_create_tunnel_t_handler(vl_api_l2tpv3_create_tunnel_t *mp)
L2 bridge domain sw interface operational state response.
ip6_address_t our_address
void handle_ip4_arp_event(u32 pool_index)
static void lisp_fid_put_api(u8 *dst, fid_address_t *src, u8 *prefix_length)
Reply for IPsec: Add/delete Security Policy Database entry.
uword * stream_index_by_name
clib_error_t * ip4_set_arp_limit(u32 arp_limit)
u8 vnet_lisp_get_map_request_mode(void)
static void vl_api_classify_set_interface_l2_tables_t_handler(vl_api_classify_set_interface_l2_tables_t *mp)
u32 l2fib_del_entry(u64 mac, u32 bd_index)
Delete an entry from the l2fib.
A uni-directional MPLS tunnel.
u32 mpls_label_t
A label value only, i.e.
static int ip6_reset_fib_t_handler(vl_api_reset_fib_t *mp)
static clib_error_t * show_ip_arp_nd_events_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static vnet_hw_interface_t * vnet_get_hw_interface(vnet_main_t *vnm, u32 hw_if_index)
#define ip_prefix_len(_a)
u32 outer_fib_index
The FIB in which the src.dst address are present.
static void vl_api_dhcp_proxy_config_t_handler(vl_api_dhcp_proxy_config_t *mp)
void vl_api_mpls_ip_bind_unbind_t_handler(vl_api_mpls_ip_bind_unbind_t *mp)
IPsec: Add/delete Security Policy Database entry.
Classify add / del session request.
IPFIX exporter dump request.
u32 mr_classify_table_index
static void vl_api_ikev2_profile_set_id_t_handler(vl_api_ikev2_profile_set_id_t *mp)
Reply for lisp_add_del_map_request_itr_rlocs.
int ip6_sr_add_del_policy(ip6_sr_add_del_policy_args_t *a)
Add or Delete a Segment Routing policy.
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
int vnet_interface_name_renumber(u32 sw_if_index, u32 new_show_dev_instance)
u8 mb_create_table_if_needed
static void vnet_clear_sw_interface_tag(vnet_main_t *vnm, u32 sw_if_index)
static void vl_api_ioam_disable_t_handler(vl_api_ioam_disable_t *mp)
static void vl_api_lisp_add_del_adjacency_t_handler(vl_api_lisp_add_del_adjacency_t *mp)
unix_shared_memory_queue_t * vl_api_client_index_to_input_queue(u32 index)
Combined counter to hold both packets and byte differences.
struct _vlib_node_registration vlib_node_registration_t
void vnet_l2_input_classify_enable_disable(u32 sw_if_index, int enable_disable)
Enable/disable l2 input classification on a specific interface.
#define vec_add2(V, P, N)
Add N elements to end of vector V, return pointer to new elements in P.
static void vl_api_ipsec_gre_add_del_tunnel_t_handler(vl_api_ipsec_gre_add_del_tunnel_t *mp)
lisp_gpe_fwd_entry_key_t * key
The Entry's key: {lEID,r-EID,vni}.
l2_flood_member_t * members
ip4_address_t src_address
static void vl_api_sr_multicast_map_add_del_t_handler(vl_api_sr_multicast_map_add_del_t *mp)
ip6_address_t * tags
"Tag" list, aka segments inserted at the end of the list, past last_seg
u8 mr_next_hop_proto_is_ip4
#define hash_set_mem(h, key, value)
ip_lookup_main_t lookup_main
int ipsec_set_sa_key(vlib_main_t *vm, ipsec_sa_t *sa_update)
static void vl_api_ikev2_profile_set_ts_t_handler(vl_api_ikev2_profile_set_ts_t *mp)
void vl_set_global_memory_baseva(u64 baseva)
static vnet_sw_interface_t * vnet_get_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
uword * sub_interface_sw_if_index_by_id
cop: interface enable/disable junk filtration reply
static void vl_api_l2_fib_table_dump_t_handler(vl_api_l2_fib_table_dump_t *mp)
Set flags of BFD session.
struct rte_sched_port * hqos
Request for lisp_eid_table_map_details.
static void dhcpv6_proxy_config_2(vl_api_dhcp_proxy_config_2_t *mp)
u32 pir_tokens_per_period
u32 pir_tokens_per_period
static void vl_api_bridge_domain_add_del_t_handler(vl_api_bridge_domain_add_del_t *mp)
Add/Delete classification table request.
unformat_function_t unformat_vnet_sw_interface
L2 bridge domain request operational state details.
void vl_set_api_pvt_heap_size(u64 size)
#define clib_error_report(e)
Set bridge domain ip to mac entry response.
u8 * vlib_node_serialize(vlib_node_main_t *nm, u8 *vector, u32 max_threads, int include_nexts, int include_stats)
Reply for classify get table IDs request.
static void vl_api_ip_source_and_port_range_check_interface_add_del_t_handler(vl_api_ip_source_and_port_range_check_interface_add_del_t *mp)
static void vl_api_sw_if_l2tpv3_tunnel_dump_t_handler(vl_api_sw_if_l2tpv3_tunnel_dump_t *mp)
static void dhcpv6_proxy_config(vl_api_dhcp_proxy_config_t *mp)
static void vl_api_classify_set_interface_ip_table_t_handler(vl_api_classify_set_interface_ip_table_t *mp)
u32 mt_next_hop_sw_if_index
static void vl_api_flow_classify_set_interface_t_handler(vl_api_flow_classify_set_interface_t *mp)
Enable / disable packet generator request.
Request for gpe tunnel summary status.
int vnet_vxlan_gpe_add_del_tunnel(vnet_vxlan_gpe_add_del_tunnel_args_t *a, u32 *sw_if_indexp)
Add or Del a VXLAN GPE tunnel.
void ip_address_set(ip_address_t *dst, const void *src, u8 version)
vl_api_fib_path2_t path[count]
vhost-user interface create request
pub_sub_handler(oam_events, OAM_EVENTS)
typedef CLIB_PACKED(struct{ip4_address_t address;u32 address_length:6;u32 index:26;})
static void setup_message_id_table(api_main_t *am)
const mpls_tunnel_t * mpls_tunnel_get(u32 mti)
Reply for locator add/del.
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
static void vl_api_sr_policy_add_del_t_handler(vl_api_sr_policy_add_del_t *mp)
static void vl_api_reset_fib_t_handler(vl_api_reset_fib_t *mp)
Add/del policer response.
#define ip_prefix_version(_a)
L2 interface ethernet flow point filtering response.
#define ip46_address_cmp(ip46_1, ip46_2)
void fib_table_entry_local_label_remove(u32 fib_index, const fib_prefix_t *prefix, mpls_label_t label)
remove a MPLS local label for the prefix/route.
static uword vlib_node_add_next(vlib_main_t *vm, uword node, uword next_node)
static void vl_api_interface_name_renumber_t_handler(vl_api_interface_name_renumber_t *mp)
trace_cfg_t * api_trace_cfg
u32 cir_tokens_per_period
u8 vnet_lisp_map_register_state_get(void)
static void vl_api_proxy_arp_add_del_t_handler(vl_api_proxy_arp_add_del_t *mp)
static void vl_api_bfd_udp_session_dump_t_handler(vl_api_bfd_udp_session_dump_t *mp)
int vnet_create_loopback_interface(u32 *sw_if_indexp, u8 *mac_address)
int vnet_lisp_set_map_request_mode(u8 mode)
static void vl_api_lisp_eid_table_vni_dump_t_handler(vl_api_lisp_eid_table_vni_dump_t *mp)
u32 * tunnel_index_by_sw_if_index
Mapping from sw_if_index to tunnel index.
Reply for show_lisp_map_request_mode.
int vnet_lisp_add_del_adjacency(vnet_lisp_add_del_adjacency_args_t *a)
#define vec_reset_length(v)
Reset vector length to zero NULL-pointer tolerant.
ip4_address_t ipfix_collector
Request for map resolver summary status.
ip6_address_t client_address
static void vl_api_lisp_locator_dump_t_handler(vl_api_lisp_locator_dump_t *mp)
Delete sub interface response.
Adjacency to drop this packet.
Interface bridge mode response.
static u8 fid_type_to_api_type(fid_address_t *fid)
int ip6_sr_add_del_multicastmap(ip6_sr_add_del_multicastmap_args_t *a)
Add or Delete a mapping of IP6 multicast address to Segment Routing policy.
IPv6 segment routing tunnel add / del response.
static vnet_sw_interface_t * vnet_get_hw_sw_interface(vnet_main_t *vnm, u32 hw_if_index)
ip4_address_t tunnel_dst
The tunnel's destination/remote address.
static f64 vlib_last_vector_length_per_node(vlib_main_t *vm)
OAM add / del target response.
static locator_t * unformat_lisp_locs(void *rmt_locs, u32 rloc_num)
bfd_transport_t transport
lisp_msmr_t * map_servers
Dump ipsec gre tunnel table.
static void vl_api_pg_enable_disable_t_handler(vl_api_pg_enable_disable_t *mp)
ip6_address_t * segments
segment list, when inserting an ip6 SR header
dpo_proto_t fp_payload_proto
This protocol determines the payload protocol of packets that will be forwarded by this entry once th...
add or delete LISP adjacency adjacency
ipsec_gre_tunnel_t * tunnels
pool of tunnel instances
u8 pcap_file_name[pcap_name_length]
static void send_lisp_gpe_fwd_entry_details(lisp_gpe_fwd_entry_t *lfe, unix_shared_memory_queue_t *q, u32 context)
PacketGenerator capture packets on given interface request.
Create host-interface response.
vnet_main_t * vnet_get_main(void)
static void vl_api_ipsec_gre_tunnel_dump_t_handler(vl_api_ipsec_gre_tunnel_dump_t *mp)
L2 bridge domain operational state response.
u8 local_address_start[16]
static void dhcpv4_proxy_config(vl_api_dhcp_proxy_config_t *mp)
static void vl_api_l2fib_add_del_t_handler(vl_api_l2fib_add_del_t *mp)
static uword resolver_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
static void vl_api_create_vhost_user_if_t_handler(vl_api_create_vhost_user_if_t *mp)
Get node index using name request.
int bd_delete_bd_index(bd_main_t *bdm, u32 bd_id)
Delete a bridge domain.
void vl_msg_api_set_handlers(int msg_id, char *msg_name, void *handler, void *cleanup, void *endian, void *print, int msg_size, int traced)
Proxy ARP add / del request.
static void vl_api_ipsec_spd_add_del_entry_t_handler(vl_api_ipsec_spd_add_del_entry_t *mp)
vnet_api_error_t bfd_udp_del_session(u32 sw_if_index, const ip46_address_t *local_addr, const ip46_address_t *peer_addr)
#define VNET_SW_INTERFACE_FLAG_PROXY_ARP
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
u32 frp_sw_if_index
The interface.
static void vl_api_get_node_graph_t_handler(vl_api_get_node_graph_t *mp)
void vl_set_global_memory_size(u64 size)
#define VLIB_INIT_FUNCTION(x)
Reply for add / del ipsec gre tunnel request.
ip46_address_t local
tunnel local address
static void vl_api_af_packet_delete_t_handler(vl_api_af_packet_delete_t *mp)
static uword vlib_process_get_events(vlib_main_t *vm, uword **data_vector)
Return the first event type which has occurred and a vector of per-event data of that type...
DHCP Proxy config 2 add / del request.
static void vl_api_mpls_fib_details_t_handler(vl_api_mpls_fib_details_t *mp)
static void * svm_push_data_heap(svm_region_t *rp)
Classify sessions dump request.
static void vl_api_lisp_gpe_tunnel_dump_t_handler(vl_api_lisp_gpe_tunnel_dump_t *mp)
Reply for IPsec: Update Security Association keys.
static int arp_change_delete_callback(u32 pool_index, u8 *notused)
u32 * classify_table_index_by_sw_if_index[FLOW_CLASSIFY_N_TABLES]
static void vl_api_l2_fib_clear_table_t_handler(vl_api_l2_fib_clear_table_t *mp)
void vl_set_memory_uid(int uid)
Reply for gpe enable/disable.
vnet_feature_registration_t * vnet_get_feature_reg(const char *arc_name, const char *node_name)
#define vec_new(T, N)
Create new vector of given type and length (unspecified alignment, no header).
vlib_combined_counter_main_t * combined_sw_if_counters
static uword ip6_address_is_equal(ip6_address_t *a, ip6_address_t *b)
ipsec_gre_main_t ipsec_gre_main
clib_error_t * ikev2_set_profile_auth(vlib_main_t *vm, u8 *name, u8 auth_method, u8 *auth_data, u8 data_hex_format)
static void vl_api_lisp_add_del_local_eid_t_handler(vl_api_lisp_add_del_local_eid_t *mp)
Set interface source and L4 port-range request.
Reply for the vlan subinterface create request.
int dhcpv6_proxy_set_vss(u32 tbl_id, u32 oui, u32 fib_id, int is_del)
vnet_flow_rewrite_callback_t * rewrite_callback
struct _vl_api_ip4_arp_event * arp_events
int vl_api_memclnt_delete_callback(u32 client_index)
#define clib_error_return_fatal(e, args...)
#define gid_address_sd_src(_a)
u8 * name
optional name argument - for referencing SR tunnel/policy by name
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
static vnet_sw_interface_t * vnet_get_sup_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
static clib_error_t * vpe_api_hookup(vlib_main_t *vm)
void fib_table_flush(u32 fib_index, fib_protocol_t proto, fib_source_t source)
Flush all entries from a table for the source.
Aggregrate type for a prefix.
static void vl_api_pg_capture_t_handler(vl_api_pg_capture_t *mp)
static vlib_node_registration_t vpe_resolver_process_node
(constructor) VLIB_REGISTER_NODE (vpe_resolver_process_node)
static void vl_api_ikev2_set_local_key_t_handler(vl_api_ikev2_set_local_key_t *mp)
Get LISP map request itr rlocs status.
Reply for show_lisp_rloc_probe_state.
DPDK interface HQoS subport parameters set reply.
add or delete map request itr rlocs
#define clib_warning(format, args...)
clib_error_t * ip6_set_neighbor_limit(u32 neighbor_limit)
int vnet_l2_output_classify_set_tables(u32 sw_if_index, u32 ip4_table_index, u32 ip6_table_index, u32 other_table_index)
Set l2 per-protocol, per-interface output classification tables.
static void inband_cli_output(uword arg, u8 *buffer, uword buffer_bytes)
DPDK interface HQoS pipe profile set reply.
int vnet_lisp_eid_table_map(u32 vni, u32 dp_id, u8 is_l2, u8 is_add)
#define vec_resize(V, N)
Resize a vector (no header, unspecified alignment) Add N elements to end of given vector V...
IKEv2: Set IKEv2 profile local/remote identification.
Reply for classify table id by interface index request.
u32 lisp_gpe_tenant_l2_iface_add_or_lock(u32 vni, u32 bd_id)
Add/create and lock a new or find and lock the existing L2 interface for the tenant.
IKEv2: Set IKEv2 profile traffic selector parameters.
int l2tpv3_interface_enable_disable(vnet_main_t *vnm, u32 sw_if_index, int enable_disable)
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 lisp_cp_main_t * vnet_lisp_cp_get_main()
u16 fp_len
The mask length.
int vnet_set_ip4_classify_intfc(vlib_main_t *vm, u32 sw_if_index, u32 table_index)
void bfd_event(bfd_main_t *bm, bfd_session_t *bs)
Reply to IPFIX exporter dump request.
Dump mpls eth tunnel table.
static void vl_api_sw_interface_vhost_user_details_t_handler(vl_api_sw_interface_vhost_user_details_t *mp)
DPDK interface HQoS tctbl entry set reply.
uword * bd_index_by_bd_id
ipsec_policy_t * policies
int fib_entry_cmp_for_sort(void *i1, void *i2)
u32 * classify_table_index_by_sw_if_index[POLICER_CLASSIFY_N_TABLES]
static void vl_api_delete_loopback_t_handler(vl_api_delete_loopback_t *mp)
dpdk_device_hqos_per_worker_thread_t * hqos_wt
u32 mr_next_hop_via_label
flow_classify_main_t flow_classify_main
clib_error_t * ip6_probe_neighbor(vlib_main_t *vm, ip6_address_t *dst, u32 sw_if_index)
Classify add / del session response.
#define ip_addr_version(_a)
l2tpv3 tunnel interface create response
static void vl_api_bridge_domain_sw_if_details_t_handler(vl_api_bridge_domain_sw_if_details_t *mp)
u32 sw_if_index
hardware interface index
u32 remote_sa_id
remote IPSec SA id
Dump l2 fib (aka bridge domain) table.
IPSec-GRE tunnel add/del arguments.
Configure IP source and L4 port-range check.
Interface set vpath response.
Reply for lisp_add_del_map_server.
static void vl_api_policer_classify_set_interface_t_handler(vl_api_policer_classify_set_interface_t *mp)
uword * hw_interface_by_name
clib_error_t * vnet_lisp_enable_disable(u8 is_enable)
u8 local_address_stop[16]
int vnet_classify_add_del_session(vnet_classify_main_t *cm, u32 table_index, u8 *match, u32 hit_next_index, u32 opaque_index, i32 advance, u8 action, u32 metadata, int is_add)
Get state of LISP map-register.
clib_error_t * ip4_probe_neighbor(vlib_main_t *vm, ip4_address_t *dst, u32 sw_if_index)
vnet_api_error_t api_errno
void dsunlock(stats_main_t *sm)
Reply for gpe enable/disable.
void vl_set_memory_root_path(char *root_path)
u32 gid_dictionary_lookup(gid_dictionary_t *db, gid_address_t *key)
Args required for add/del tunnel.
struct mpls_tunnel_send_walk_ctx_t_ mpls_tunnel_send_walk_ctx_t
flow_report_main_t flow_report_main
Get state of LISP RLOC probing.
void ip_address_copy_addr(void *dst, const ip_address_t *src)
clib_error_t * ikev2_set_profile_id(vlib_main_t *vm, u8 *name, u8 id_type, u8 *data, int is_local)
Set L2 flags request !!! TODO - need more info, feature bits in l2_input.h.
format_function_t format_vnet_sw_interface_name
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)
void vnet_mpls_tunnel_del(u32 sw_if_index)
u8 is_del
Delete the tunnnel?
Reply for lisp_pitr_set_locator_set.
int vnet_lisp_pitr_set_locator_set(u8 *locator_set_name, u8 is_add)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
u8 vnet_lisp_rloc_probe_state_get(void)
A representation of a GRE tunnel.
static void vl_api_lisp_map_request_mode_t_handler(vl_api_lisp_map_request_mode_t *mp)
static void vl_api_ikev2_profile_set_auth_t_handler(vl_api_ikev2_profile_set_auth_t *mp)
static void dhcpv4_proxy_config_2(vl_api_dhcp_proxy_config_2_t *mp)
L2 fib clear table request, clear all mac entries in the l2 fib.
Flow classify operational state response.
flow_report_classify_main_t flow_report_classify_main
uword * fib_index_by_table_id
Hash table mapping table id to fib index.
Configure IP source and L4 port-range check reply.
Args for mapping of multicast address to policy name.
static void vlib_process_signal_event(vlib_main_t *vm, uword node_index, uword type_opaque, uword data)
static void vl_api_lisp_add_del_locator_t_handler(vl_api_lisp_add_del_locator_t *mp)
BFD session details structure.
#define clib_error_get_code(err)
static void vl_api_bfd_udp_add_t_handler(vl_api_bfd_udp_add_t *mp)
u8 mr_next_hop_n_out_labels
ip46_address_t fp_addr
The address type is not deriveable from the fp_addr member.
static void vl_api_lisp_gpe_enable_disable_t_handler(vl_api_lisp_gpe_enable_disable_t *mp)
u32 mt_next_hop_out_labels[mt_next_hop_n_labels]
int vhost_user_delete_if(vnet_main_t *vnm, vlib_main_t *vm, u32 sw_if_index)
#define gid_address_mac(_a)
static void vl_api_lisp_rloc_probe_enable_disable_t_handler(vl_api_lisp_rloc_probe_enable_disable_t *mp)
Struct for VXLAN GPE tunnel.
set LISP map-request mode.
u32 new_show_dev_instance
Set/unset l2 classification tables for an interface response.
char * vpe_api_get_version(void)
Reply to bfd_session_set_flags.
static clib_error_t * vpe_api_init(vlib_main_t *vm)
IPsec: Add/delete Security Policy Database.
static void vl_api_control_ping_t_handler(vl_api_control_ping_t *mp)
IPv6 segment routing tunnel add / del request.
IPv6 segment routing multicast map to policy add / del request.
int vnet_lisp_add_del_local_mapping(vnet_lisp_add_del_mapping_args_t *a, u32 *map_index_result)
Add/update/delete mapping to/in/from map-cache.
L2 FIB add entry response.
u8 mt_next_hop_proto_is_ip4
Request for LISP adjacencies.
Set/unset l2 classification tables for an interface request.
static void vl_api_lisp_eid_table_map_dump_t_handler(vl_api_lisp_eid_table_map_dump_t *mp)
Add/Delete classification table response.
struct l2fib_entry_result_t::@193::@195 fields
L2 bridge domain add or delete response.
static void vl_api_classify_table_by_interface_t_handler(vl_api_classify_table_by_interface_t *mp)
Set bridge domain ip to mac entry request.
void gid_address_free(gid_address_t *a)
static void vl_api_l2_flags_t_handler(vl_api_l2_flags_t *mp)
sse2_qos_pol_action_params_st violate_action
static void vl_api_bd_ip_mac_add_del_t_handler(vl_api_bd_ip_mac_add_del_t *mp)
u8 stream_name[stream_name_length]
vhost-user interface create response
uword * sw_if_index_by_sup_and_sub
vxlan_gpe_main_t vxlan_gpe_main
add or delete lisp eid-table
static void vl_api_mpls_tunnel_add_del_t_handler(vl_api_mpls_tunnel_add_del_t *mp)
MPLS Route Add / del route.
static void vl_api_delete_vhost_user_if_t_handler(vl_api_delete_vhost_user_if_t *mp)
Reply to the eature path enable/disable request.
static void vlib_get_combined_counter(vlib_combined_counter_main_t *cm, u32 index, vlib_counter_t *result)
Get the value of a combined counter, never called in the speed path Scrapes the entire set of mini co...
u16 flags_net_byte_order
Flags, e.g.
#define BAD_TX_SW_IF_INDEX_LABEL
int cop_whitelist_enable_disable(cop_whitelist_enable_disable_args_t *a)
static void vl_api_lisp_add_del_map_resolver_t_handler(vl_api_lisp_add_del_map_resolver_t *mp)
u8 protocol
encapsulated protocol
u32 pg_interface_add_or_get(pg_main_t *pg, uword stream_index)
clib_error_t * vnet_punt_add_del(vlib_main_t *vm, u8 ipv, u8 protocol, u16 port, int is_add)
Request IP traffic punt to the local TCP/IP stack.
ip46_address_range_t laddr
Tell client about an ip4 arp resolution event.
Get list of flow classify interfaces and tables.
int ipsec_add_del_policy(vlib_main_t *vm, ipsec_policy_t *policy, int is_add)
static void vl_api_policer_dump_t_handler(vl_api_policer_dump_t *mp)
int ip6_sr_add_del_tunnel(ip6_sr_add_del_tunnel_args_t *a)
Add or Delete a Segment Routing tunnel.
mpls gre tunnel operational state response
Enable or Disable MPLS on and interface.
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
static int unformat_lisp_eid_api(gid_address_t *dst, u32 vni, u8 type, void *src, u8 len)
ip46_address_t remote
tunnel remote address
int vnet_lisp_add_del_mapping(gid_address_t *eid, locator_t *rlocs, u8 action, u8 authoritative, u32 ttl, u8 is_add, u8 is_static, u32 *res_map_index)
Adds/removes/updates mapping.
void ip_prefix_normalize(ip_prefix_t *a)
int vhost_user_dump_ifs(vnet_main_t *vnm, vlib_main_t *vm, vhost_user_intf_details_t **out_vuids)
Set/unset interface classification table response.
IPFIX classify stream configure response.
uword * spd_index_by_spd_id
struct fib_table_t_ * fibs
A pool of all the MPLS FIBs.
IOAM enable : Enable in-band OAM.
u32 vni
VXLAN GPE VNI in HOST byte order, shifted left 8 bits.
cop: interface enable/disable junk filtration reply
ip6_to_l2_lookup_t lookup_type
#define REPLY_MACRO3(t, n, body)
clib_error_t * ikev2_set_local_key(vlib_main_t *vm, u8 *file)
struct _vl_api_ip6_nd_event * nd_events
clib_error_t * ikev2_set_profile_ts(vlib_main_t *vm, u8 *name, u8 protocol_id, u16 start_port, u16 end_port, ip4_address_t start_addr, ip4_address_t end_addr, int is_local)
#define gid_address_ippref(_a)
static void vl_api_l2_interface_efp_filter_t_handler(vl_api_l2_interface_efp_filter_t *mp)
sse2_qos_pol_action_params_st exceed_action
static void shmem_cli_output(uword arg, u8 *buffer, uword buffer_bytes)
IP Set the next node for a given node response.
lisp_adjacency_t * vnet_lisp_adjacencies_get_by_vni(u32 vni)
Returns vector of adjacencies.
uword * fib_index_by_table_id
ip6_address_t * src_address
Key (header imposition case)
static void vl_api_set_ipfix_classify_stream_t_handler(vl_api_set_ipfix_classify_stream_t *mp)
#define foreach_vpe_api_msg
u32 mt_next_hop_out_label_stack[mt_next_hop_n_out_labels]
u32 l2pbb_configure(vlib_main_t *vlib_main, vnet_main_t *vnet_main, u32 sw_if_index, u32 vtr_op, u8 *b_dmac, u8 *b_smac, u16 b_vlanid, u32 i_sid, u16 vlan_outer_tag)
Get node index using name request.
#define ip46_address_is_ip4(ip46)
static int mpls_route_add_del_t_handler(vnet_main_t *vnm, vl_api_mpls_route_add_del_t *mp)
Reply for IPsec: Add/delete Security Policy Database entry.
Reply for lisp_add_del_adjacency.
L2 fib clear table response.
u8 * policy_name
optional policy name
void bd_set_mac_age(vlib_main_t *vm, u32 bd_index, u8 age)
Set the mac age for the bridge domain.
Reply for lisp_map_request_mode.
#define VNET_HW_INTERFACE_BOND_INFO_SLAVE
#define BAD_SW_IF_INDEX_LABEL
int vnet_vxlan_add_del_tunnel(vnet_vxlan_add_del_tunnel_args_t *a, u32 *sw_if_indexp)
#define foreach_classify_add_del_table_field
Delete loopback interface response.
static void vl_api_cop_whitelist_enable_disable_t_handler(vl_api_cop_whitelist_enable_disable_t *mp)
IPsec: Add/delete SPD from interface.
Reply for MPLS tunnel add / del request.
IPFIX classify stream configure request.
Request for lisp-gpe protocol status.
ipfix_classify_table_t * tables
static void vl_api_lisp_eid_table_dump_t_handler(vl_api_lisp_eid_table_dump_t *mp)
u32 vni
VNI/tenant id in HOST byte order.
#define VLIB_EARLY_CONFIG_FUNCTION(x, n,...)
int vhost_user_create_if(vnet_main_t *vnm, vlib_main_t *vm, const char *sock_filename, u8 is_server, u32 *sw_if_index, u64 feature_mask, u8 renumber, u32 custom_dev_instance, u8 *hwaddr)
u8 is_add
1 - add, 0 - delete
PacketGenerator create interface request.
u32 * tunnel_index_by_sw_if_index
mapping from sw_if_index to tunnel index
Struct for VXLAN GPE add/del args.
void * vl_msg_api_alloc(int nbytes)
int vnet_lisp_add_del_mreq_itr_rlocs(vnet_lisp_add_del_mreq_itr_rloc_args_t *a)
static void vl_api_ipfix_exporter_dump_t_handler(vl_api_ipfix_exporter_dump_t *mp)
Reply for Proxy ARP interface enable / disable request.
enable or disable LISP feature
fib_node_index_t fib_table_entry_local_label_add(u32 fib_index, const fib_prefix_t *prefix, mpls_label_t label)
Add a MPLS local label for the prefix/route.
Reply for interface events registration.
Reply to IPFIX exporter configure request.
Reply for lisp_add_del_remote_mapping.
u32 ft_table_id
Table ID (hash key) for this FIB.
void l2fib_clear_table(uint keep_static)
vhost-user interface delete response
static void vl_api_vxlan_gpe_add_del_tunnel_t_handler(vl_api_vxlan_gpe_add_del_tunnel_t *mp)
int vnet_set_flow_classify_intfc(vlib_main_t *vm, u32 sw_if_index, u32 ip4_table_index, u32 ip6_table_index, u32 is_add)
u8 remote_address_stop[16]
Shows relationship between vni and vrf/bd.
L2 interface patch add / del response.
void gid_address_ip_set(gid_address_t *dst, void *src, u8 version)
int vnet_delete_sub_interface(u32 sw_if_index)
static void vl_api_ikev2_profile_add_del_t_handler(vl_api_ikev2_profile_add_del_t *mp)
cop: enable/disable junk filtration features on an interface
u32 bd_add_del_ip_mac(u32 bd_index, u8 *ip_addr, u8 *mac_addr, u8 is_ip6, u8 is_add)
Add/delete IP address to MAC address mapping.
IPsec: Add/delete Security Association Database entry.
#define vec_free(V)
Free vector's memory (no header).
static void vl_api_bridge_domain_dump_t_handler(vl_api_bridge_domain_dump_t *mp)
int vnet_delete_loopback_interface(u32 sw_if_index)
#define gid_address_ippref_len(_a)
void send_bfd_udp_session_details(unix_shared_memory_queue_t *q, u32 context, bfd_session_t *bs)
Set/unset the classification table for an interface request.
u32 frp_weight
[un]equal cost path weight
Delete host-interface response.
static vlib_thread_main_t * vlib_get_thread_main()
DPDK interface HQoS tctbl entry set request.
int vhost_user_modify_if(vnet_main_t *vnm, vlib_main_t *vm, const char *sock_filename, u8 is_server, u32 sw_if_index, u64 feature_mask, u8 renumber, u32 custom_dev_instance)
static void vl_api_bfd_session_set_flags_t_handler(vl_api_bfd_session_set_flags_t *mp)
IPv6 segment routing multicast map to policy add / del response.
char * vpe_api_get_build_directory(void)
#define clib_memcpy(a, b, c)
u8 remote_address_start[16]
int cop_interface_enable_disable(u32 sw_if_index, int enable_disable)
int netmap_create_if(vlib_main_t *vm, u8 *if_name, u8 *hw_addr_set, u8 is_pipe, u8 is_master, u32 *sw_if_index)
Feature path enable/disable request.
ip4_address_t tunnel_src
The tunnel's source/local address.
clib_error_t * ip6_ioam_enable(int has_trace_option, int has_pot_option, int has_seqno_option, int has_analyse_option)
static void vnet_interface_counter_unlock(vnet_interface_main_t *im)
int vnet_lisp_map_register_enable_disable(u8 is_enable)
static void send_lisp_map_resolver_details(ip_address_t *ip, unix_shared_memory_queue_t *q, u32 context)
u32 fib_node_index_t
A typedef of a node index.
add or delete map-resolver
Set/unset flow classify interface.
Definitions for punt infrastructure.
void mpls_tunnel_walk(mpls_tunnel_walk_cb_t cb, void *ctx)
Walk all the MPLS tunnels.
int vnet_l2_input_classify_set_tables(u32 sw_if_index, u32 ip4_table_index, u32 ip6_table_index, u32 other_table_index)
Set l2 per-protocol, per-interface input classification tables.
static void vl_api_get_node_index_t_handler(vl_api_get_node_index_t *mp)
Reply for lisp_eid_table_add_del_map.
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
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)
Delete sub interface request.
static void vl_api_lisp_gpe_add_del_fwd_entry_t_handler(vl_api_lisp_gpe_add_del_fwd_entry_t *mp)
static void send_eid_table_vni(u32 vni, unix_shared_memory_queue_t *q, u32 context)
This packet matches an "incomplete adjacency" and packets need to be passed to ARP to find rewrite st...
u32 rsa
remote IPSec SA id
Request for map lisp locator status.
#define VALIDATE_RX_SW_IF_INDEX(mp)
void l2fib_add_entry(u64 mac, u32 bd_index, u32 sw_if_index, u32 static_mac, u32 filter_mac, u32 bvi_mac)
Add an entry to the l2fib.
lisp_gpe_main_t lisp_gpe_main
LISP-GPE global state.
static void vl_api_cop_interface_enable_disable_t_handler(vl_api_cop_interface_enable_disable_t *mp)
static_always_inline ipfix_classify_table_t * ipfix_classify_add_table(void)
PacketGenerator capture packets response.
int vnet_proxy_arp_add_del(ip4_address_t *lo_addr, ip4_address_t *hi_addr, u32 fib_index, int is_del)
Delete loopback interface request.
static void vl_api_ipsec_spd_add_del_t_handler(vl_api_ipsec_spd_add_del_t *mp)
Reply for MPLS route add / del request.
static void vl_api_lisp_map_register_enable_disable_t_handler(vl_api_lisp_map_register_enable_disable_t *mp)
static void vl_api_mpls_fib_details_t_print(vl_api_mpls_fib_details_t *mp)
static void vl_api_ipsec_spd_dump_t_handler(vl_api_ipsec_spd_dump_t *mp)
unix_shared_memory_queue_t * q
static void vl_api_lisp_locator_set_dump_t_handler(vl_api_lisp_locator_set_dump_t *mp)
static void vl_api_sw_interface_set_dpdk_hqos_pipe_t_handler(vl_api_sw_interface_set_dpdk_hqos_pipe_t *mp)
Reply for local_eid add/del.
Set/unset policer classify interface response.
u8 * policy_name
name of policy to map to
int dhcp_proxy_set_server(ip4_address_t *addr, ip4_address_t *src_address, u32 fib_id, int insert_option_82, int is_del)
void handle_ip6_nd_event(u32 pool_index)
#define fid_addr_ippref(_a)
static void vl_api_sw_interface_set_l2_bridge_t_handler(vl_api_sw_interface_set_l2_bridge_t *mp)
vhost-user interface modify request
int vnet_ipsec_gre_add_del_tunnel(vnet_ipsec_gre_add_del_tunnel_args_t *a, u32 *sw_if_indexp)
Add or delete ipsec-gre tunnel interface.
#define VLIB_CLI_COMMAND(x,...)
int vnet_lisp_gpe_add_del_fwd_entry(vnet_lisp_gpe_add_del_fwd_entry_args_t *a, u32 *hw_if_indexp)
Forwarding entry create/remove dispatcher.
struct _vnet_classify_main vnet_classify_main_t
u8 vnet_lisp_enable_disable_status(void)
ip46_address_range_t raddr
Set L2 XConnect between two interfaces request.
static void vl_api_feature_enable_disable_t_handler(vl_api_feature_enable_disable_t *mp)
static void vl_api_ipfix_classify_stream_dump_t_handler(vl_api_ipfix_classify_stream_dump_t *mp)
Policer iclassify operational state response.
static void vnet_interface_counter_lock(vnet_interface_main_t *im)
#define hash_create(elts, value_bytes)
struct _gid_address_t gid_address_t
DHCP proxy set / unset vss response.
static void vl_api_sw_interface_set_vpath_t_handler(vl_api_sw_interface_set_vpath_t *mp)
static void send_ipsec_gre_tunnel_details(ipsec_gre_tunnel_t *t, unix_shared_memory_queue_t *q, u32 context)
ip4_address_t src
tunnel IPv4 src address
#define VNET_SW_INTERFACE_FLAG_ADMIN_UP
l2 fib table entry structure
Set L2 XConnect response.
static void vl_api_modify_vhost_user_if_t_handler(vl_api_modify_vhost_user_if_t *mp)
#define pool_put_index(p, i)
Free pool element with given index.
int vnet_lisp_add_del_map_server(ip_address_t *addr, u8 is_add)
#define fid_addr_type(_a)
Reply for vnet_get_summary_stats request.
static uword ip6_address_is_zero(ip6_address_t *a)
static void vl_api_add_node_next_t_handler(vl_api_add_node_next_t *mp)
static void lisp_adjacency_copy(vl_api_lisp_adjacency_t *dst, lisp_adjacency_t *adjs)
u8 * format_ipsec_crypto_alg(u8 *s, va_list *args)
void vnet_mpls_tunnel_add(fib_route_path_t *rpaths, mpls_label_t *label_stack, u8 l2_only, u32 *sw_if_index)
Create a new MPLS tunnel.
Request for eid table summary status.
u32 cir_tokens_per_period
static void vl_api_lisp_adjacencies_get_t_handler(vl_api_lisp_adjacencies_get_t *mp)
static void vl_api_gre_tunnel_dump_t_handler(vl_api_gre_tunnel_dump_t *mp)
enable/disable LISP map-register
static void vl_api_lisp_get_map_request_itr_rlocs_t_handler(vl_api_lisp_get_map_request_itr_rlocs_t *mp)
int vnet_lisp_clear_all_remote_adjacencies(void)
static void vl_api_ipsec_sa_set_key_t_handler(vl_api_ipsec_sa_set_key_t *mp)
Request for locator_set summary status.
Reply for enable / disable packet generator.
ip_lookup_main_t lookup_main
#define gid_address_sd_dst(_a)
clib_error_t * policer_add_del(vlib_main_t *vm, u8 *name, sse2_qos_pol_cfg_params_st *cfg, u32 *policer_index, u8 is_add)
Struct for VXLAN GPE node state.
Get list of policer classify interfaces and tables.
int vpe_oam_add_del_target(ip4_address_t *src_address, ip4_address_t *dst_address, u32 fib_id, int is_add)
map/unmap vni/bd_index to vrf
MPLS tunnel Add / del route.
IPSec-GRE tunnel parameters.
int create_l2tpv3_ipv6_tunnel(l2t_main_t *lm, ip6_address_t *client_address, ip6_address_t *our_address, u32 local_session_id, u32 remote_session_id, u64 local_cookie, u64 remote_cookie, int l2_sublayer_present, u32 encap_fib_index, u32 *sw_if_index)
gid_dictionary_t mapping_index_by_gid
static void vl_api_lisp_add_del_map_server_t_handler(vl_api_lisp_add_del_map_server_t *mp)
static void vl_api_show_version_t_handler(vl_api_show_version_t *mp)
static void vl_api_lisp_enable_disable_t_handler(vl_api_lisp_enable_disable_t *mp)
union sse2_qos_pol_cfg_params_st_::@238 rb
Reply for IPsec: Add/delete SPD from interface.
gre_tunnel_t * tunnels
pool of tunnel instances
static void vl_api_mpls_fib_details_t_endian(vl_api_mpls_fib_details_t *mp)
int stats_memclnt_delete_callback(u32 client_index)
static void vnet_set_sw_interface_tag(vnet_main_t *vnm, u8 *tag, u32 sw_if_index)
Reply for proxy arp add / del request.
Control ping from the client to the server response.
clib_error_t * pg_capture(pg_capture_args_t *a)
locator_set_t * locator_set_pool
void l2_efp_filter_configure(vnet_main_t *vnet_main, u32 sw_if_index, u32 enable)
Enable/disable the EFP Filter check on the subinterface.
int dhcp_client_config(vlib_main_t *vm, u32 sw_if_index, u8 *hostname, u32 is_add, u32 client_index, void *event_callback, u32 pid)
static void vl_api_classify_table_ids_t_handler(vl_api_classify_table_ids_t *mp)
Status of lisp pitr, enable or disable.
static void vl_api_lisp_add_del_map_request_itr_rlocs_t_handler(vl_api_lisp_add_del_map_request_itr_rlocs_t *mp)
static void vl_api_delete_subif_t_handler(vl_api_delete_subif_t *mp)
static void vl_api_vxlan_tunnel_dump_t_handler(vl_api_vxlan_tunnel_dump_t *mp)
static void vl_api_sw_interface_set_vxlan_bypass_t_handler(vl_api_sw_interface_set_vxlan_bypass_t *mp)
IKEv2: Set IKEv2 profile authentication method.
Bitmaps built as vectors of machine words.
Set the next node for a given node request.
uword * next_slot_by_node
static void send_bridge_domain_details(unix_shared_memory_queue_t *q, l2_bridge_domain_t *bd_config, u32 n_sw_ifs, u32 context)
void vnet_flow_reports_reset(flow_report_main_t *frm)
dpdk_device_hqos_per_hqos_thread_t * hqos_ht
Dump ipsec policy database data.
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.
Query relative index via node names.
Is Address Reachable request - DISABLED.
int vnet_lisp_rloc_probe_enable_disable(u8 is_enable)
u8 is_del
Delete the policy?
u8 mr_is_resolve_attached
add or delete locator_set
vnet_classify_main_t vnet_classify_main
Set max allowed ARP or ip6 neighbor entries response.
ipsec_protocol_t protocol
uword * thread_registrations_by_name
static void vl_api_sw_interface_vhost_user_dump_t_handler(vl_api_sw_interface_vhost_user_dump_t *mp)
gid_address_t rmt_eid
remote eid
From the control plane API.
#define vec_set(v, val)
Set all vector elements to given value.
IPv6 segment routing policy add / del response.
OAM add / del target request.
static void vl_api_input_acl_set_interface_t_handler(vl_api_input_acl_set_interface_t *mp)
Route added as a result of interface configuration.
static void * clib_mem_alloc(uword size)
static int mpls_ip_bind_unbind_handler(vnet_main_t *vnm, vl_api_mpls_ip_bind_unbind_t *mp)
static void vl_api_mpls_fib_dump_t_handler(vl_api_mpls_fib_dump_t *mp)
Classify table ids by interface index request.
static void send_eid_table_map_pair(hash_pair_t *p, unix_shared_memory_queue_t *q, u32 context)
static void send_bd_sw_if_details(l2input_main_t *l2im, unix_shared_memory_queue_t *q, l2_flood_member_t *member, u32 bd_id, u32 context)
vxlan_gpe_tunnel_t * tunnels
vector of encap tunnel instances
u32 mr_next_hop_sw_if_index
int dhcpv6_proxy_set_server_2(ip6_address_t *addr, ip6_address_t *src_address, u32 rx_fib_id, u32 server_fib_id, int insert_vss, int is_del)
void fib_entry_encode(fib_node_index_t fib_entry_index, fib_route_path_encode_t **api_rpaths)
int vnet_classify_add_del_table(vnet_classify_main_t *cm, u8 *mask, u32 nbuckets, u32 memory_size, u32 skip, u32 match, u32 next_table_index, u32 miss_next_index, u32 *table_index, u8 current_data_flag, i16 current_data_offset, int is_add, int del_chain)
static void vl_api_punt_t_handler(vl_api_punt_t *mp)
IPsec policy database response.
#define vec_elt(v, i)
Get vector value at index i.
void vl_set_memory_region_name(char *name)
void dslock(stats_main_t *sm, int release_hint, int tag)
static void send_lisp_eid_table_details(mapping_t *mapit, unix_shared_memory_queue_t *q, u32 context, u8 filter)
static void send_policer_classify_details(u32 sw_if_index, u32 table_index, unix_shared_memory_queue_t *q, u32 context)
template key/value backing page structure
u32 resulting_feature_bitmap
static void vl_api_want_ip6_nd_events_t_handler(vl_api_want_ip6_nd_events_t *mp)
int vnet_lisp_add_del_locator_set(vnet_lisp_add_del_locator_set_args_t *a, u32 *ls_result)
#define gid_address_ip(_a)
Delete UDP BFD session on interface.
Status of lisp, enable or disable.
static void vl_api_want_ip4_arp_events_t_handler(vl_api_want_ip4_arp_events_t *mp)
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
static void vl_api_l2tpv3_set_tunnel_cookies_t_handler(vl_api_l2tpv3_set_tunnel_cookies_t *mp)
Interface bridge mode request.
negative_fwd_actions_e action
action for negative mappings
static void vl_api_cli_request_t_handler(vl_api_cli_request_t *mp)
static void vl_api_af_packet_create_t_handler(vl_api_af_packet_create_t *mp)
#define gid_address_vni(_a)
u32 decap_fib_index
FIB indices - inner IP packet lookup here.
int vnet_gre_add_del_tunnel(vnet_gre_add_del_tunnel_args_t *a, u32 *sw_if_indexp)
static void vl_api_lisp_pitr_set_locator_set_t_handler(vl_api_lisp_pitr_set_locator_set_t *mp)
u32 local_sa_id
local IPSec SA id
static void vl_api_classify_table_info_t_handler(vl_api_classify_table_info_t *mp)
Request for map server summary status.
static void * vl_api_sr_policy_add_del_t_print(vl_api_sr_policy_add_del_t *mp, void *handle)
u32 eid_fib_index
The FIB index for the overlay, i.e.
int ipsec_add_del_sa(vlib_main_t *vm, ipsec_sa_t *new_sa, int is_add)
static void vl_api_sw_interface_set_l2_xconnect_t_handler(vl_api_sw_interface_set_l2_xconnect_t *mp)
ip4_address_t dst
tunnel IPv4 dst address
static void vl_api_show_lisp_status_t_handler(vl_api_show_lisp_status_t *mp)
struct lisp_gpe_fwd_entry_t_ * lisp_fwd_entry_pool
A Pool of all LISP forwarding entries.
IKEv2: Set IKEv2 local RSA private key.
u32 bd_find_or_add_bd_index(bd_main_t *bdm, u32 bd_id)
Get or create a bridge domain.
static void vl_api_classify_add_del_session_t_handler(vl_api_classify_add_del_session_t *mp)
#define RESOLUTION_PENDING_EVENT
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
Reply to IPFIX classify stream dump request.
vnet_interface_main_t * interface_main
static void vl_api_lisp_map_server_dump_t_handler(vl_api_lisp_map_server_dump_t *mp)
ip_lookup_next_t lookup_next_index
static void vl_api_l2tpv3_interface_enable_disable_t_handler(vl_api_l2tpv3_interface_enable_disable_t *mp)
#define hash_foreach_pair(p, v, body)
Iterate over hash pairs.
vlib_node_main_t node_main
Reply for gpe_fwd_entry add/del.
static void vl_api_ipsec_interface_add_del_spd_t_handler(vl_api_ipsec_interface_add_del_spd_t *mp)
static void vl_api_show_lisp_pitr_t_handler(vl_api_show_lisp_pitr_t *mp)
static void send_ipfix_classify_table_details(u32 table_index, unix_shared_memory_queue_t *q, u32 context)
Process a vpe parser cli string request.
int vnet_stream_change(flow_report_main_t *frm, u32 old_domain_id, u16 old_src_port, u32 new_domain_id, u16 new_src_port)
static void send_vxlan_tunnel_details(vxlan_tunnel_t *t, unix_shared_memory_queue_t *q, u32 context)
add or delete locator for locator_set
Configure IPFIX exporter process request.
u32 dp_table
generic access
Transparent Ethernet Bridging - the tunnel is in L2 mode.
L2 interface ethernet flow point filtering enable/disable request.
#define vec_sort_with_function(vec, f)
Sort a vector using the supplied element comparison function.
u8 * ipfix_classify_template_rewrite(flow_report_main_t *frm, flow_report_t *fr, ip4_address_t *collector_address, ip4_address_t *src_address, u16 collector_port)
int ipsec_add_del_spd(vlib_main_t *vm, u32 spd_id, int is_add)
int vnet_l2_patch_add_del(u32 rx_sw_if_index, u32 tx_sw_if_index, int is_add)
vnet_sw_interface_t * sw_interfaces
static void vl_api_sw_interface_set_dpdk_hqos_subport_t_handler(vl_api_sw_interface_set_dpdk_hqos_subport_t *mp)
int vnet_lisp_add_del_locator(vnet_lisp_add_del_locator_set_args_t *a, locator_set_t *ls, u32 *ls_result)
locator_pair_t * locator_pairs
vector of locator pairs
PacketGenerator create interface response.
void vnet_l2_output_classify_enable_disable(u32 sw_if_index, int enable_disable)
Enable/disable l2 input classification on a specific interface.
Create loopback interface request.
uword * locator_set_index_by_name
static int nd_change_delete_callback(u32 pool_index, u8 *notused)
add or delete remote static mapping
void copy_fib_next_hop(fib_route_path_encode_t *api_rpath, void *fp_arg)
int ip4_source_and_port_range_check_add_del(ip4_address_t *address, u32 length, u32 vrf_id, u16 *low_ports, u16 *high_ports, int is_add)
L2 interface vlan tag rewrite configure request.
static void vl_api_pg_create_interface_t_handler(vl_api_pg_create_interface_t *mp)
void * get_unformat_vnet_sw_interface(void)
fib_table_t * fib_table_get(fib_node_index_t index, fib_protocol_t proto)
Get a pointer to a FIB table.
get_node_graph - get a copy of the vpp node graph including the current set of graph arcs...
static u64 l2fib_make_key(u8 *mac_address, u16 bd_index)
void gid_address_copy(gid_address_t *dst, gid_address_t *src)
l2_bridge_domain_t * bd_configs
ip6_address_t * dst_address
A collection of combined counters.
IPFIX add classifier table response.
Create a new subinterface with the given vlan id.
static void send_mpls_fib_details(vpe_api_main_t *am, unix_shared_memory_queue_t *q, u32 table_id, u32 label, u32 eos, fib_route_path_encode_t *api_rpaths, u32 context)
static void send_sw_interface_flags_deleted(vpe_api_main_t *am, unix_shared_memory_queue_t *q, u32 sw_if_index)
static void vl_api_l2tpv3_set_lookup_key_t_handler(vl_api_l2tpv3_set_lookup_key_t *mp)
vnet_flow_data_callback_t * flow_data_callback
u8 ** tunnel_names
tunnel names
static void send_lisp_map_server_details(ip_address_t *ip, unix_shared_memory_queue_t *q, u32 context)
static void send_sw_if_l2tpv3_tunnel_details(vpe_api_main_t *am, unix_shared_memory_queue_t *q, l2t_session_t *s, l2t_main_t *lm, u32 context)
Create loopback interface response.
u32 * tunnel_index_by_sw_if_index
L2 interface patch add / del request.
#define hash_get_mem(h, key)
void mac_copy(void *dst, void *src)
Tell client about an ip6 nd resolution or mac/ip event.
void l2fib_table_dump(u32 bd_index, l2fib_entry_key_t **l2fe_key, l2fib_entry_result_t **l2fe_res)
struct clib_bihash_value offset
template key/value backing page structure
static void vl_api_lisp_gpe_add_del_iface_t_handler(vl_api_lisp_gpe_add_del_iface_t *mp)
static void vl_api_ipsec_sad_add_del_entry_t_handler(vl_api_ipsec_sad_add_del_entry_t *mp)
policer_read_response_type_st * policer_templates
static void send_mpls_tunnel_entry(u32 mti, void *arg)
u32 encap_fib_index
FIB indices - tunnel partner lookup here.
Interface set vpath request.
static void send_gre_tunnel_details(gre_tunnel_t *t, unix_shared_memory_queue_t *q, u32 context)
static void vl_api_mpls_tunnel_dump_t_handler(vl_api_mpls_tunnel_dump_t *mp)
static void vl_api_get_next_index_t_handler(vl_api_get_next_index_t *mp)
char * vpe_api_get_build_date(void)
policer_classify_main_t policer_classify_main
ipsec_crypto_alg_t crypto_alg
#define VLIB_REGISTER_NODE(x,...)
L2 interface pbb tag rewrite configure request.
void vl_noop_handler(void *mp)
int vnet_lisp_add_del_map_resolver(vnet_lisp_add_del_map_resolver_args_t *a)
ip4_main_t ip4_main
Global ip4 main structure.
static void vl_api_dhcp_proxy_config_2_t_handler(vl_api_dhcp_proxy_config_2_t *mp)
u32 sw_if_index
vnet intfc sw_if_index
Register for ip4 arp resolution events.
struct fib_table_t_ * fibs
Vector of FIBs.
DPDK interface HQoS pipe profile set request.
This packet is to be rewritten and forwarded to the next processing node.
int dhcp_proxy_set_server_2(ip4_address_t *addr, ip4_address_t *src_address, u32 rx_fib_id, u32 server_fib_id, int insert_option_82, int is_del)
static void vl_api_dhcp_client_config_t_handler(vl_api_dhcp_client_config_t *mp)
static void vl_api_netmap_create_t_handler(vl_api_netmap_create_t *mp)
L2 interface pbb tag rewrite response.
#define vec_foreach(var, vec)
Vector iterator.
Dumps all VNIs used in mappings.
clib_error_t * clear_ioam_rewrite_fn(void)
Set bridge flags (such as L2_LEARN, L2_FWD, L2_FLOOD, L2_UU_FLOOD, or L2_ARP_TERM) request...
Reply for map_resolver add/del.
Request for map request itr rlocs summary status.
Reply for ip6 nd resolution events registration.
static void vl_api_is_address_reachable_t_handler(vl_api_is_address_reachable_t *mp)
enable or disable lisp-gpe protocol
VLIB_API_INIT_FUNCTION(vpe_api_hookup)
static void vl_api_l2_interface_vlan_tag_rewrite_t_handler(vl_api_l2_interface_vlan_tag_rewrite_t *mp)
clib_error_t * vnet_sw_interface_set_flags(vnet_main_t *vnm, u32 sw_if_index, u32 flags)
Reply for lisp_rloc_probe_enable_disable.
static void vl_api_proxy_arp_intfc_enable_disable_t_handler(vl_api_proxy_arp_intfc_enable_disable_t *mp)
IPFIX classify stream dump request.
static void vl_api_create_vlan_subif_t_handler(vl_api_create_vlan_subif_t *mp)
static void vl_api_vxlan_add_del_tunnel_t_handler(vl_api_vxlan_add_del_tunnel_t *mp)
int vnet_set_policer_classify_intfc(vlib_main_t *vm, u32 sw_if_index, u32 ip4_table_index, u32 ip6_table_index, u32 l2_table_index, u32 is_add)
Set/unset flow classify interface response.
mpls eth tunnel operational state response
Request for LISP map-request mode.
void * vl_msg_api_alloc_as_if_client(int nbytes)
static void vl_api_flow_classify_dump_t_handler(vl_api_flow_classify_dump_t *mp)
#define clib_error_return(e, args...)
struct sse2_qos_pol_cfg_params_st_::@238::@239 kbps
Set interface source and L4 port-range response.
static void vl_api_vxlan_gpe_tunnel_dump_t_handler(vl_api_vxlan_gpe_tunnel_dump_t *mp)
vhost-user interface delete request
clib_error_t * vnet_create_sw_interface(vnet_main_t *vnm, vnet_sw_interface_t *template, u32 *sw_if_index)
Reply for IKEv2: Add/delete profile.
Reply for lisp_map_register_enable_disable.
vhost-user interface modify response
static void vl_api_policer_classify_dump_t_handler(vl_api_policer_classify_dump_t *mp)
int af_packet_create_if(vlib_main_t *vm, u8 *host_if_name, u8 *hw_addr_set, u32 *sw_if_index)
Reply for MPLS state on an interface.
l2tpv3 tunnel interface create request
#define VXLAN_GPE_TUNNEL_IS_IPV4
Flags for vxlan_gpe_tunnel_t.
int ip6_source_and_port_range_check_add_del(ip6_address_t *address, u32 length, u32 vrf_id, u16 *low_ports, u16 *high_ports, int is_add)
static void vl_api_netmap_delete_t_handler(vl_api_netmap_delete_t *mp)
static uword vnet_sw_interface_get_flags(vnet_main_t *vnm, u32 sw_if_index)
Reply for classify table info request.
Tell client about a DHCP completion event.
static void send_sw_interface_vhost_user_details(vpe_api_main_t *am, unix_shared_memory_queue_t *q, vhost_user_intf_details_t *vui, u32 context)
static void vl_api_oam_add_del_t_handler(vl_api_oam_add_del_t *mp)
gid_address_t lcl_eid
local eid
Interface set vxlan-bypass response.
void vl_set_api_memory_size(u64 size)
u8 is_del
Delete the mapping.
struct fib_table_t_ * fibs
reply to lisp_eid_table_vni_dump
vnet_policer_main_t vnet_policer_main
static void vl_api_ioam_enable_t_handler(vl_api_ioam_enable_t *mp)
Reply to the punt request.
int vnet_add_del_ip4_arp_change_event(vnet_main_t *vnm, void *data_callback, u32 pid, void *address_arg, uword node_index, uword type_opaque, uword data, int is_add)
u32 lisp_gpe_tenant_l3_iface_add_or_lock(u32 vni, u32 table_id)
Add/create and lock a new or find and lock the existing L3 interface for the tenant.
DHCP Client config add / del request.
static void vl_api_sw_interface_set_mpls_enable_t_handler(vl_api_sw_interface_set_mpls_enable_t *mp)
static void vl_api_sr_tunnel_add_del_t_handler(vl_api_sr_tunnel_add_del_t *mp)
static void vl_api_create_subif_t_handler(vl_api_create_subif_t *mp)
void vlib_cli_input(vlib_main_t *vm, unformat_input_t *input, vlib_cli_output_function_t *function, uword function_arg)
Punt traffic to the host.
int dhcp_proxy_set_option82_vss(u32 vrf_id, u32 oui, u32 fib_id, int is_del)
u8 mr_create_table_if_needed
vlib_frame_t * ipfix_classify_send_flows(flow_report_main_t *frm, flow_report_t *fr, vlib_frame_t *f, u32 *to_next, u32 node_index)
static void vl_api_show_lisp_map_request_mode_t_handler(vl_api_show_lisp_map_request_mode_t *mp)
static void send_lisp_locator_details(lisp_cp_main_t *lcm, locator_t *loc, unix_shared_memory_queue_t *q, u32 context)
pg_interface_t * interfaces
IPFIX add or delete classifier table request.
static void send_lisp_locator_set_details(lisp_cp_main_t *lcm, locator_set_t *lsit, unix_shared_memory_queue_t *q, u32 context, u32 ls_index)
Request for lisp pitr status.
static void vl_api_mpls_tunnel_details_t_handler(vl_api_mpls_fib_details_t *mp)
#define foreach_registration_hash
clib_error_t * vl_api_init(vlib_main_t *vm)
DHCP Proxy config add / del request.
void vl_api_mpls_route_add_del_t_handler(vl_api_mpls_route_add_del_t *mp)
ip4_address_t tunnel_src
tunnel IPv4 src address
int vnet_feature_enable_disable(const char *arc_name, const char *node_name, u32 sw_if_index, int enable_disable, void *feature_config, u32 n_feature_config_bytes)
#define ip_prefix_addr(_a)
CLIB vectors are ubiquitous dynamically resized arrays with by user defined "headers".
static ip_adjacency_t * ip_get_adjacency(ip_lookup_main_t *lm, u32 adj_index)
#define VALIDATE_SW_IF_INDEX(mp)
A protocol Independent FIB table.
static void vl_api_sw_interface_set_dpdk_hqos_tctbl_t_handler(vl_api_sw_interface_set_dpdk_hqos_tctbl_t *mp)
struct _vnet_feature_registration vnet_feature_registration_t
feature registration object
int vnet_flow_report_add_del(flow_report_main_t *frm, vnet_flow_report_add_del_args_t *a)
int l2tpv3_set_tunnel_cookies(l2t_main_t *lm, u32 sw_if_index, u64 new_local_cookie, u64 new_remote_cookie)
static void vl_api_ip_source_and_port_range_check_add_del_t_handler(vl_api_ip_source_and_port_range_check_add_del_t *mp)
struct _unix_shared_memory_queue unix_shared_memory_queue_t
static void vl_api_lisp_map_resolver_dump_t_handler(vl_api_lisp_map_resolver_dump_t *mp)
int netmap_delete_if(vlib_main_t *vm, u8 *host_if_name)
int af_packet_delete_if(vlib_main_t *vm, u8 *host_if_name)
int set_ip_source_and_port_range_check(vlib_main_t *vm, u32 *fib_index, u32 sw_if_index, u32 is_add)
L2 bridge domain add or delete request.
IPv6 segment routing policy add / del request.
static uword pool_elts(void *v)
Number of active elements in a pool.