23 #include <sys/types.h> 26 #include <netinet/in.h> 94 #undef __included_bihash_template_h__ 122 #define f64_endian(a) 123 #define f64_print(a,b) 134 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 139 #define REPLY_MACRO(t) \ 141 unix_shared_memory_queue_t * q; \ 142 rv = vl_msg_api_pd_handler (mp, rv); \ 143 q = vl_api_client_index_to_input_queue (mp->client_index); \ 147 rmp = vl_msg_api_alloc (sizeof (*rmp)); \ 148 rmp->_vl_msg_id = ntohs((t)); \ 149 rmp->context = mp->context; \ 150 rmp->retval = ntohl(rv); \ 152 vl_msg_api_send_shmem (q, (u8 *)&rmp); \ 155 #define REPLY_MACRO2(t, body) \ 157 unix_shared_memory_queue_t * q; \ 158 rv = vl_msg_api_pd_handler (mp, rv); \ 159 q = vl_api_client_index_to_input_queue (mp->client_index); \ 163 rmp = vl_msg_api_alloc (sizeof (*rmp)); \ 164 rmp->_vl_msg_id = ntohs((t)); \ 165 rmp->context = mp->context; \ 166 rmp->retval = ntohl(rv); \ 167 do {body;} while (0); \ 168 vl_msg_api_send_shmem (q, (u8 *)&rmp); \ 171 #define REPLY_MACRO3(t, n, body) \ 173 unix_shared_memory_queue_t * q; \ 174 rv = vl_msg_api_pd_handler (mp, rv); \ 175 q = vl_api_client_index_to_input_queue (mp->client_index); \ 179 rmp = vl_msg_api_alloc (sizeof (*rmp) + n); \ 180 rmp->_vl_msg_id = ntohs((t)); \ 181 rmp->context = mp->context; \ 182 rmp->retval = ntohl(rv); \ 183 do {body;} while (0); \ 184 vl_msg_api_send_shmem (q, (u8 *)&rmp); \ 187 #define REPLY_MACRO4(t, n, body) \ 189 unix_shared_memory_queue_t * q; \ 191 rv = vl_msg_api_pd_handler (mp, rv); \ 192 q = vl_api_client_index_to_input_queue (mp->client_index); \ 196 rmp = vl_msg_api_alloc_or_null (sizeof (*rmp) + n); \ 201 rmp = vl_msg_api_alloc (sizeof (*rmp)); \ 205 memset (rmp, 0, sizeof (*rmp)); \ 206 rv = VNET_API_ERROR_TABLE_TOO_BIG; \ 209 rmp->_vl_msg_id = ntohs((t)); \ 210 rmp->context = mp->context; \ 211 rmp->retval = ntohl(rv); \ 213 do {body;} while (0); \ 214 vl_msg_api_send_shmem (q, (u8 *)&rmp); \ 217 #if (1 || CLIB_DEBUG > 0) 219 #define VALIDATE_SW_IF_INDEX(mp) \ 220 do { u32 __sw_if_index = ntohl(mp->sw_if_index); \ 221 vnet_main_t *__vnm = vnet_get_main(); \ 222 if (pool_is_free_index(__vnm->interface_main.sw_interfaces, \ 224 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX; \ 225 goto bad_sw_if_index; \ 229 #define BAD_SW_IF_INDEX_LABEL \ 235 #define VALIDATE_RX_SW_IF_INDEX(mp) \ 236 do { u32 __rx_sw_if_index = ntohl(mp->rx_sw_if_index); \ 237 vnet_main_t *__vnm = vnet_get_main(); \ 238 if (pool_is_free_index(__vnm->interface_main.sw_interfaces, \ 239 __rx_sw_if_index)) { \ 240 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX; \ 241 goto bad_rx_sw_if_index; \ 245 #define BAD_RX_SW_IF_INDEX_LABEL \ 247 bad_rx_sw_if_index: \ 251 #define VALIDATE_TX_SW_IF_INDEX(mp) \ 252 do { u32 __tx_sw_if_index = ntohl(mp->tx_sw_if_index); \ 253 vnet_main_t *__vnm = vnet_get_main(); \ 254 if (pool_is_free_index(__vnm->interface_main.sw_interfaces, \ 255 __tx_sw_if_index)) { \ 256 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX; \ 257 goto bad_tx_sw_if_index; \ 261 #define BAD_TX_SW_IF_INDEX_LABEL \ 263 bad_tx_sw_if_index: \ 269 #define VALIDATE_SW_IF_INDEX(mp) 270 #define BAD_SW_IF_INDEX_LABEL 271 #define VALIDATE_RX_SW_IF_INDEX(mp) 272 #define BAD_RX_SW_IF_INDEX_LABEL 273 #define VALIDATE_TX_SW_IF_INDEX(mp) 274 #define BAD_TX_SW_IF_INDEX_LABEL 278 #define foreach_vpe_api_msg \ 279 _(WANT_INTERFACE_EVENTS, want_interface_events) \ 280 _(WANT_OAM_EVENTS, want_oam_events) \ 281 _(OAM_ADD_DEL, oam_add_del) \ 282 _(SW_INTERFACE_DUMP, sw_interface_dump) \ 283 _(SW_INTERFACE_DETAILS, sw_interface_details) \ 284 _(SW_INTERFACE_SET_FLAGS, sw_interface_set_flags) \ 285 _(IP_ADD_DEL_ROUTE, ip_add_del_route) \ 286 _(MPLS_ROUTE_ADD_DEL, mpls_route_add_del) \ 287 _(MPLS_IP_BIND_UNBIND, mpls_ip_bind_unbind) \ 288 _(IS_ADDRESS_REACHABLE, is_address_reachable) \ 289 _(SW_INTERFACE_ADD_DEL_ADDRESS, sw_interface_add_del_address) \ 290 _(SW_INTERFACE_SET_TABLE, sw_interface_set_table) \ 291 _(SW_INTERFACE_SET_MPLS_ENABLE, sw_interface_set_mpls_enable) \ 292 _(SW_INTERFACE_SET_VPATH, sw_interface_set_vpath) \ 293 _(SW_INTERFACE_SET_L2_XCONNECT, sw_interface_set_l2_xconnect) \ 294 _(SW_INTERFACE_SET_L2_BRIDGE, sw_interface_set_l2_bridge) \ 295 _(SW_INTERFACE_SET_DPDK_HQOS_PIPE, sw_interface_set_dpdk_hqos_pipe) \ 296 _(SW_INTERFACE_SET_DPDK_HQOS_SUBPORT, sw_interface_set_dpdk_hqos_subport) \ 297 _(SW_INTERFACE_SET_DPDK_HQOS_TCTBL, sw_interface_set_dpdk_hqos_tctbl) \ 298 _(BRIDGE_DOMAIN_ADD_DEL, bridge_domain_add_del) \ 299 _(BRIDGE_DOMAIN_DUMP, bridge_domain_dump) \ 300 _(BRIDGE_DOMAIN_DETAILS, bridge_domain_details) \ 301 _(BRIDGE_DOMAIN_SW_IF_DETAILS, bridge_domain_sw_if_details) \ 302 _(L2FIB_ADD_DEL, l2fib_add_del) \ 303 _(L2_FLAGS, l2_flags) \ 304 _(BRIDGE_FLAGS, bridge_flags) \ 305 _(TAP_CONNECT, tap_connect) \ 306 _(TAP_MODIFY, tap_modify) \ 307 _(TAP_DELETE, tap_delete) \ 308 _(SW_INTERFACE_TAP_DUMP, sw_interface_tap_dump) \ 309 _(CREATE_VLAN_SUBIF, create_vlan_subif) \ 310 _(CREATE_SUBIF, create_subif) \ 311 _(MPLS_ETHERNET_ADD_DEL_TUNNEL, mpls_ethernet_add_del_tunnel) \ 312 _(MPLS_ETHERNET_ADD_DEL_TUNNEL_2, mpls_ethernet_add_del_tunnel_2) \ 313 _(MPLS_ADD_DEL_ENCAP, mpls_add_del_encap) \ 314 _(PROXY_ARP_ADD_DEL, proxy_arp_add_del) \ 315 _(PROXY_ARP_INTFC_ENABLE_DISABLE, proxy_arp_intfc_enable_disable) \ 316 _(IP_NEIGHBOR_ADD_DEL, ip_neighbor_add_del) \ 317 _(VNET_GET_SUMMARY_STATS, vnet_get_summary_stats) \ 318 _(RESET_FIB, reset_fib) \ 319 _(DHCP_PROXY_CONFIG,dhcp_proxy_config) \ 320 _(DHCP_PROXY_CONFIG_2,dhcp_proxy_config_2) \ 321 _(DHCP_PROXY_SET_VSS,dhcp_proxy_set_vss) \ 322 _(DHCP_CLIENT_CONFIG, dhcp_client_config) \ 323 _(SET_IP_FLOW_HASH,set_ip_flow_hash) \ 324 _(SW_INTERFACE_IP6ND_RA_CONFIG, sw_interface_ip6nd_ra_config) \ 325 _(SW_INTERFACE_IP6ND_RA_PREFIX, sw_interface_ip6nd_ra_prefix) \ 326 _(SW_INTERFACE_IP6_ENABLE_DISABLE, sw_interface_ip6_enable_disable ) \ 327 _(SW_INTERFACE_IP6_SET_LINK_LOCAL_ADDRESS, \ 328 sw_interface_ip6_set_link_local_address) \ 329 _(SW_INTERFACE_SET_UNNUMBERED, sw_interface_set_unnumbered) \ 330 _(CREATE_LOOPBACK, create_loopback) \ 331 _(CONTROL_PING, control_ping) \ 332 _(CLI_REQUEST, cli_request) \ 333 _(CLI_INBAND, cli_inband) \ 334 _(SET_ARP_NEIGHBOR_LIMIT, set_arp_neighbor_limit) \ 335 _(L2_PATCH_ADD_DEL, l2_patch_add_del) \ 336 _(CLASSIFY_ADD_DEL_TABLE, classify_add_del_table) \ 337 _(CLASSIFY_ADD_DEL_SESSION, classify_add_del_session) \ 338 _(CLASSIFY_SET_INTERFACE_IP_TABLE, classify_set_interface_ip_table) \ 339 _(CLASSIFY_SET_INTERFACE_L2_TABLES, classify_set_interface_l2_tables) \ 340 _(GET_NODE_INDEX, get_node_index) \ 341 _(ADD_NODE_NEXT, add_node_next) \ 342 _(L2TPV3_CREATE_TUNNEL, l2tpv3_create_tunnel) \ 343 _(L2TPV3_SET_TUNNEL_COOKIES, l2tpv3_set_tunnel_cookies) \ 344 _(L2TPV3_INTERFACE_ENABLE_DISABLE, l2tpv3_interface_enable_disable) \ 345 _(L2TPV3_SET_LOOKUP_KEY, l2tpv3_set_lookup_key) \ 346 _(SW_IF_L2TPV3_TUNNEL_DUMP, sw_if_l2tpv3_tunnel_dump) \ 347 _(VXLAN_ADD_DEL_TUNNEL, vxlan_add_del_tunnel) \ 348 _(VXLAN_TUNNEL_DUMP, vxlan_tunnel_dump) \ 349 _(GRE_ADD_DEL_TUNNEL, gre_add_del_tunnel) \ 350 _(GRE_TUNNEL_DUMP, gre_tunnel_dump) \ 351 _(L2_FIB_CLEAR_TABLE, l2_fib_clear_table) \ 352 _(L2_INTERFACE_EFP_FILTER, l2_interface_efp_filter) \ 353 _(L2_INTERFACE_VLAN_TAG_REWRITE, l2_interface_vlan_tag_rewrite) \ 354 _(CREATE_VHOST_USER_IF, create_vhost_user_if) \ 355 _(MODIFY_VHOST_USER_IF, modify_vhost_user_if) \ 356 _(DELETE_VHOST_USER_IF, delete_vhost_user_if) \ 357 _(SW_INTERFACE_VHOST_USER_DUMP, sw_interface_vhost_user_dump) \ 358 _(IP_ADDRESS_DUMP, ip_address_dump) \ 359 _(IP_DUMP, ip_dump) \ 360 _(SW_INTERFACE_VHOST_USER_DETAILS, sw_interface_vhost_user_details) \ 361 _(SHOW_VERSION, show_version) \ 362 _(L2_FIB_TABLE_DUMP, l2_fib_table_dump) \ 363 _(L2_FIB_TABLE_ENTRY, l2_fib_table_entry) \ 364 _(VXLAN_GPE_ADD_DEL_TUNNEL, vxlan_gpe_add_del_tunnel) \ 365 _(VXLAN_GPE_TUNNEL_DUMP, vxlan_gpe_tunnel_dump) \ 366 _(INTERFACE_NAME_RENUMBER, interface_name_renumber) \ 367 _(WANT_IP4_ARP_EVENTS, want_ip4_arp_events) \ 368 _(WANT_IP6_ND_EVENTS, want_ip6_nd_events) \ 369 _(INPUT_ACL_SET_INTERFACE, input_acl_set_interface) \ 370 _(IPSEC_SPD_ADD_DEL, ipsec_spd_add_del) \ 371 _(IPSEC_INTERFACE_ADD_DEL_SPD, ipsec_interface_add_del_spd) \ 372 _(IPSEC_SPD_ADD_DEL_ENTRY, ipsec_spd_add_del_entry) \ 373 _(IPSEC_SAD_ADD_DEL_ENTRY, ipsec_sad_add_del_entry) \ 374 _(IPSEC_SA_SET_KEY, ipsec_sa_set_key) \ 375 _(IKEV2_PROFILE_ADD_DEL, ikev2_profile_add_del) \ 376 _(IKEV2_PROFILE_SET_AUTH, ikev2_profile_set_auth) \ 377 _(IKEV2_PROFILE_SET_ID, ikev2_profile_set_id) \ 378 _(IKEV2_PROFILE_SET_TS, ikev2_profile_set_ts) \ 379 _(IKEV2_SET_LOCAL_KEY, ikev2_set_local_key) \ 380 _(DELETE_LOOPBACK, delete_loopback) \ 381 _(BD_IP_MAC_ADD_DEL, bd_ip_mac_add_del) \ 382 _(MAP_ADD_DOMAIN, map_add_domain) \ 383 _(MAP_DEL_DOMAIN, map_del_domain) \ 384 _(MAP_ADD_DEL_RULE, map_add_del_rule) \ 385 _(MAP_DOMAIN_DUMP, map_domain_dump) \ 386 _(MAP_RULE_DUMP, map_rule_dump) \ 387 _(MAP_SUMMARY_STATS, map_summary_stats) \ 388 _(COP_INTERFACE_ENABLE_DISABLE, cop_interface_enable_disable) \ 389 _(COP_WHITELIST_ENABLE_DISABLE, cop_whitelist_enable_disable) \ 390 _(GET_NODE_GRAPH, get_node_graph) \ 391 _(SW_INTERFACE_CLEAR_STATS, sw_interface_clear_stats) \ 392 _(IOAM_ENABLE, ioam_enable) \ 393 _(IOAM_DISABLE, ioam_disable) \ 394 _(LISP_ADD_DEL_LOCATOR_SET, lisp_add_del_locator_set) \ 395 _(LISP_ADD_DEL_LOCATOR, lisp_add_del_locator) \ 396 _(LISP_ADD_DEL_LOCAL_EID, lisp_add_del_local_eid) \ 397 _(LISP_GPE_ADD_DEL_FWD_ENTRY, lisp_gpe_add_del_fwd_entry) \ 398 _(LISP_ADD_DEL_MAP_RESOLVER, lisp_add_del_map_resolver) \ 399 _(LISP_GPE_ENABLE_DISABLE, lisp_gpe_enable_disable) \ 400 _(LISP_ENABLE_DISABLE, lisp_enable_disable) \ 401 _(LISP_GPE_ADD_DEL_IFACE, lisp_gpe_add_del_iface) \ 402 _(LISP_ADD_DEL_REMOTE_MAPPING, lisp_add_del_remote_mapping) \ 403 _(LISP_ADD_DEL_ADJACENCY, lisp_add_del_adjacency) \ 404 _(LISP_PITR_SET_LOCATOR_SET, lisp_pitr_set_locator_set) \ 405 _(LISP_MAP_REQUEST_MODE, lisp_map_request_mode) \ 406 _(LISP_EID_TABLE_ADD_DEL_MAP, lisp_eid_table_add_del_map) \ 407 _(LISP_LOCATOR_SET_DUMP, lisp_locator_set_dump) \ 408 _(LISP_LOCATOR_DUMP, lisp_locator_dump) \ 409 _(LISP_EID_TABLE_DUMP, lisp_eid_table_dump) \ 410 _(LISP_GPE_TUNNEL_DUMP, lisp_gpe_tunnel_dump) \ 411 _(LISP_MAP_RESOLVER_DUMP, lisp_map_resolver_dump) \ 412 _(LISP_EID_TABLE_MAP_DUMP, lisp_eid_table_map_dump) \ 413 _(LISP_EID_TABLE_VNI_DUMP, lisp_eid_table_vni_dump) \ 414 _(LISP_ADJACENCIES_GET, lisp_adjacencies_get) \ 415 _(SHOW_LISP_STATUS, show_lisp_status) \ 416 _(LISP_ADD_DEL_MAP_REQUEST_ITR_RLOCS, \ 417 lisp_add_del_map_request_itr_rlocs) \ 418 _(LISP_GET_MAP_REQUEST_ITR_RLOCS, lisp_get_map_request_itr_rlocs) \ 419 _(SHOW_LISP_PITR, show_lisp_pitr) \ 420 _(SHOW_LISP_MAP_REQUEST_MODE, show_lisp_map_request_mode) \ 421 _(SR_MULTICAST_MAP_ADD_DEL, sr_multicast_map_add_del) \ 422 _(AF_PACKET_CREATE, af_packet_create) \ 423 _(AF_PACKET_DELETE, af_packet_delete) \ 424 _(POLICER_ADD_DEL, policer_add_del) \ 425 _(POLICER_DUMP, policer_dump) \ 426 _(POLICER_CLASSIFY_SET_INTERFACE, policer_classify_set_interface) \ 427 _(POLICER_CLASSIFY_DUMP, policer_classify_dump) \ 428 _(NETMAP_CREATE, netmap_create) \ 429 _(NETMAP_DELETE, netmap_delete) \ 430 _(MPLS_ETH_TUNNEL_DUMP, mpls_eth_tunnel_dump) \ 431 _(MPLS_ETH_TUNNEL_DETAILS, mpls_eth_tunnel_details) \ 432 _(MPLS_FIB_ENCAP_DUMP, mpls_fib_encap_dump) \ 433 _(MPLS_FIB_ENCAP_DETAILS, mpls_fib_encap_details) \ 434 _(MPLS_FIB_DUMP, mpls_fib_dump) \ 435 _(MPLS_FIB_DETAILS, mpls_fib_details) \ 436 _(CLASSIFY_TABLE_IDS,classify_table_ids) \ 437 _(CLASSIFY_TABLE_BY_INTERFACE, classify_table_by_interface) \ 438 _(CLASSIFY_TABLE_INFO,classify_table_info) \ 439 _(CLASSIFY_SESSION_DUMP,classify_session_dump) \ 440 _(CLASSIFY_SESSION_DETAILS,classify_session_details) \ 441 _(SET_IPFIX_EXPORTER, set_ipfix_exporter) \ 442 _(IPFIX_EXPORTER_DUMP, ipfix_exporter_dump) \ 443 _(SET_IPFIX_CLASSIFY_STREAM, set_ipfix_classify_stream) \ 444 _(IPFIX_CLASSIFY_STREAM_DUMP, ipfix_classify_stream_dump) \ 445 _(IPFIX_CLASSIFY_TABLE_ADD_DEL, ipfix_classify_table_add_del) \ 446 _(IPFIX_CLASSIFY_TABLE_DUMP, ipfix_classify_table_dump) \ 447 _(GET_NEXT_INDEX, get_next_index) \ 448 _(PG_CREATE_INTERFACE, pg_create_interface) \ 449 _(PG_CAPTURE, pg_capture) \ 450 _(PG_ENABLE_DISABLE, pg_enable_disable) \ 451 _(IP_SOURCE_AND_PORT_RANGE_CHECK_ADD_DEL, \ 452 ip_source_and_port_range_check_add_del) \ 453 _(IP_SOURCE_AND_PORT_RANGE_CHECK_INTERFACE_ADD_DEL, \ 454 ip_source_and_port_range_check_interface_add_del) \ 455 _(IPSEC_GRE_ADD_DEL_TUNNEL, ipsec_gre_add_del_tunnel) \ 456 _(IPSEC_GRE_TUNNEL_DUMP, ipsec_gre_tunnel_dump) \ 457 _(DELETE_SUBIF, delete_subif) \ 458 _(L2_INTERFACE_PBB_TAG_REWRITE, l2_interface_pbb_tag_rewrite) \ 460 _(FLOW_CLASSIFY_SET_INTERFACE, flow_classify_set_interface) \ 461 _(FLOW_CLASSIFY_DUMP, flow_classify_dump) 464 #define QUOTE(x) QUOTE_(x) 466 #define foreach_registration_hash \ 467 _(interface_events) \ 468 _(to_netconf_server) \ 469 _(from_netconf_server) \ 470 _(to_netconf_client) \ 471 _(from_netconf_client) \ 494 #define _(a) uword *a##_registration_hash; \ 495 vpe_client_registration_t * a##_registrations; 541 p = hash_get (vam->a##_registration_hash, client_index); \ 543 rp = pool_elt_at_index (vam->a##_registrations, p[0]); \ 544 pool_put (vam->a##_registrations, rp); \ 545 hash_unset (vam->a##_registration_hash, client_index); \ 552 #define API_LINK_STATE_EVENT 1 553 #define API_ADMIN_UP_DOWN_EVENT 2 571 uword *event_data = 0;
574 u32 prev_sw_if_index;
592 prev_sw_if_index = ~0;
594 for (i = 0; i <
vec_len (event_data); i++)
597 if (prev_sw_if_index == event_data[i])
599 prev_sw_if_index = event_data[
i];
604 q = vl_api_client_index_to_input_queue (reg->client_index);
608 if (!pool_is_free_index (vnm->interface_main.sw_interfaces,
611 swif = vnet_get_sw_interface (vnm, event_data[i]);
612 send_sw_interface_flags (vam, q, swif);
627 u32 hw_if_index,
u32 flags);
633 .name =
"vpe-link-state-process",
670 #define pub_sub_handler(lca,UCA) \ 671 static void vl_api_want_##lca##_t_handler ( \ 672 vl_api_want_##lca##_t *mp) \ 674 vpe_api_main_t *vam = &vpe_api_main; \ 675 vpe_client_registration_t *rp; \ 676 vl_api_want_##lca##_reply_t *rmp; \ 680 p = hash_get (vam->lca##_registration_hash, mp->client_index); \ 682 if (mp->enable_disable) { \ 683 clib_warning ("pid %d: already enabled...", mp->pid); \ 684 rv = VNET_API_ERROR_INVALID_REGISTRATION; \ 687 rp = pool_elt_at_index (vam->lca##_registrations, p[0]); \ 688 pool_put (vam->lca##_registrations, rp); \ 689 hash_unset (vam->lca##_registration_hash, \ 694 if (mp->enable_disable == 0) { \ 695 clib_warning ("pid %d: already disabled...", mp->pid); \ 696 rv = VNET_API_ERROR_INVALID_REGISTRATION; \ 699 pool_get (vam->lca##_registrations, rp); \ 700 rp->client_index = mp->client_index; \ 701 rp->client_pid = mp->pid; \ 702 hash_set (vam->lca##_registration_hash, rp->client_index, \ 703 rp - vam->lca##_registrations); \ 706 REPLY_MACRO (VL_API_WANT_##UCA##_REPLY); \ 714 #define RESOLUTION_EVENT 1 715 #define RESOLUTION_PENDING_EVENT 2 716 #define IP4_ARP_EVENT 3 717 #define IP6_ND_EVENT 4 727 handle_ip4_arp_event (
u32 pool_index)
753 if (q->cursize < q->maxsize)
761 static f64 last_time;
768 clib_warning (
"arp event for %U to pid %d: queue stuffed!",
802 if (q->cursize < q->maxsize)
810 static f64 last_time;
817 clib_warning (
"ip6 nd event for %U to pid %d: queue stuffed!",
829 uword *event_data = 0;
835 u32 *resolution_failures = 0;
852 for (i = 0; i <
vec_len (event_data); i++)
876 (rv >= 0) ?
"succeeded" :
"failed");
887 (rv >= 0) ?
"succeeded" :
"failed");
896 (rv >= 0) ?
"succeeded" :
"failed");
907 for (i = 0; i <
vec_len (event_data); i++)
908 handle_ip4_arp_event (event_data[i]);
912 for (i = 0; i <
vec_len (event_data); i++)
925 switch (pr->resolve_type)
927 case RESOLVE_IP4_ADD_DEL_ROUTE:
928 e = ip4_probe_neighbor
929 (vm, (ip4_address_t *)&(adr->next_hop_address),
930 ntohl(adr->next_hop_sw_if_index));
933 case RESOLVE_IP6_ADD_DEL_ROUTE:
934 e = ip6_probe_neighbor
935 (vm, (ip6_address_t *)&(adr->next_hop_address),
936 ntohl(adr->next_hop_sw_if_index));
939 case RESOLVE_MPLS_ETHERNET_ADD_DEL:
941 e = ip4_probe_neighbor
943 (ip4_address_t *)&(pme->next_hop_ip4_address_in_outer_vrf),
944 pme->resolve_opaque);
948 e = clib_error_return (0,
"resolver: BOGUS TYPE %d",
975 for (i = 0; i <
vec_len (resolution_failures); i++)
978 resolution_failures[i]);
985 clib_warning (
"resolver: add %U/%d via %U retry failure",
994 clib_warning (
"resolver: add %U/%d via %U retry failure",
1003 clib_warning (
"resolver: add mpls-o-e via %U retry failure",
1028 .name =
"vpe-route-resolver-process",
1040 u32 classify_table_index,
1042 u8 is_resolve_attached,
1045 u8 next_hop_proto_is_ip4,
1046 const ip46_address_t * next_hop,
1047 u32 next_hop_sw_if_index,
1048 u8 next_hop_fib_index,
1049 u32 next_hop_weight,
u32 next_hop_out_label)
1060 if (is_resolve_host)
1062 if (is_resolve_attached)
1070 (next_hop_proto_is_ip4 ?
1074 next_hop_sw_if_index,
1077 next_hop_out_label, path_flags);
1082 (next_hop_proto_is_ip4 ?
1086 next_hop_sw_if_index,
1088 next_hop_weight, path_flags);
1096 if (is_drop || is_local || is_classify || is_unreach || is_prohibit)
1112 else if (is_unreach)
1115 else if (is_prohibit)
1119 else if (is_classify)
1122 ntohl (classify_table_index)))
1125 return VNET_API_ERROR_NO_SUCH_TABLE;
1130 ntohl (classify_table_index)));
1135 return VNET_API_ERROR_NO_SUCH_TABLE;
1155 if (is_resolve_host)
1157 if (is_resolve_attached)
1164 (next_hop_proto_is_ip4 ?
1168 next_hop_sw_if_index,
1171 next_hop_out_label, path_flags);
1186 u32 next_hop_sw_if_index,
1188 u32 next_hop_table_id,
1189 u8 create_missing_tables,
1190 u32 * fib_index,
u32 * next_hop_fib_index)
1195 if (~0 == *fib_index)
1197 if (create_missing_tables)
1205 return VNET_API_ERROR_NO_SUCH_FIB;
1209 if (~0 != ntohl (next_hop_sw_if_index))
1212 ntohl (next_hop_sw_if_index)))
1214 return VNET_API_ERROR_NO_MATCHING_INTERFACE;
1220 ntohl (next_hop_table_id));
1222 if (~0 == *next_hop_fib_index)
1224 if (create_missing_tables)
1226 *next_hop_fib_index =
1228 ntohl (next_hop_table_id));
1233 return VNET_API_ERROR_NO_SUCH_FIB;
1244 u32 fib_index, next_hop_fib_index;
1253 &fib_index, &next_hop_fib_index);
1265 memset (&nh, 0,
sizeof (nh));
1289 u32 fib_index, next_hop_fib_index;
1298 &fib_index, &next_hop_fib_index);
1310 memset (&nh, 0,
sizeof (nh));
1334 u32 fib_index, next_hop_fib_index;
1366 &fib_index, &next_hop_fib_index);
1372 memset (&nh, 0,
sizeof (nh));
1375 memcpy (&nh.ip4, mp->
mr_next_hop, sizeof (nh.ip4));
1377 memcpy (&nh.ip6, mp->
mr_next_hop, sizeof (nh.ip6));
1435 u32 mpls_fib_index, ip_fib_index;
1440 if (~0 == mpls_fib_index)
1449 return VNET_API_ERROR_NO_SUCH_FIB;
1456 if (~0 == ip_fib_index)
1457 return VNET_API_ERROR_NO_SUCH_FIB;
1514 is_del = mp->
is_add == 0;
1529 REPLY_MACRO (VL_API_SW_INTERFACE_ADD_DEL_ADDRESS_REPLY);
1567 REPLY_MACRO (VL_API_SW_INTERFACE_SET_TABLE_REPLY);
1649 REPLY_MACRO (VL_API_SW_INTERFACE_SET_VPATH_REPLY);
1669 rx_sw_if_index, 0, 0, 0, tx_sw_if_index);
1679 REPLY_MACRO (VL_API_SW_INTERFACE_SET_L2_XCONNECT_REPLY);
1705 rx_sw_if_index, bd_index, bvi, shg, 0);
1714 REPLY_MACRO (VL_API_SW_INTERFACE_SET_L2_BRIDGE_REPLY);
1741 rv = rte_sched_pipe_config (xd->
hqos_ht->
hqos, subport, pipe, profile);
1745 clib_warning (
"setting HQoS pipe parameters without DPDK not implemented");
1746 rv = VNET_API_ERROR_UNIMPLEMENTED;
1749 REPLY_MACRO (VL_API_SW_INTERFACE_SET_DPDK_HQOS_PIPE_REPLY);
1762 struct rte_sched_subport_params p;
1766 p.tb_rate = ntohl (mp->
tb_rate);
1767 p.tb_size = ntohl (mp->
tb_size);
1768 p.tc_rate[0] = ntohl (mp->
tc_rate[0]);
1769 p.tc_rate[1] = ntohl (mp->
tc_rate[1]);
1770 p.tc_rate[2] = ntohl (mp->
tc_rate[2]);
1771 p.tc_rate[3] = ntohl (mp->
tc_rate[3]);
1783 rv = rte_sched_subport_config (xd->
hqos_ht->
hqos, subport, &p);
1788 (
"setting HQoS subport parameters without DPDK not implemented");
1789 rv = VNET_API_ERROR_UNIMPLEMENTED;
1792 REPLY_MACRO (VL_API_SW_INTERFACE_SET_DPDK_HQOS_SUBPORT_REPLY);
1809 u32 tc = ntohl (mp->
tc);
1822 if (tc >= RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE)
1825 rv = VNET_API_ERROR_INVALID_VALUE;
1828 if (queue >= RTE_SCHED_QUEUES_PER_TRAFFIC_CLASS)
1831 rv = VNET_API_ERROR_INVALID_VALUE;
1841 rv = VNET_API_ERROR_INVALID_VALUE_2;
1847 int worker_thread_count = tr->
count;
1849 val = tc * RTE_SCHED_QUEUES_PER_TRAFFIC_CLASS + queue;
1850 for (i = 0; i < worker_thread_count; i++)
1856 clib_warning (
"setting HQoS DSCP table entry without DPDK not implemented");
1857 rv = VNET_API_ERROR_UNIMPLEMENTED;
1860 REPLY_MACRO (VL_API_SW_INTERFACE_SET_DPDK_HQOS_TCTBL_REPLY);
1870 u32 enable_flags = 0, disable_flags = 0;
1932 u32 n_sw_ifs,
u32 context)
1937 memset (mp, 0,
sizeof (*mp));
1938 mp->_vl_msg_id = ntohs (VL_API_BRIDGE_DOMAIN_DETAILS);
1961 memset (mp, 0,
sizeof (*mp));
1962 mp->_vl_msg_id = ntohs (VL_API_BRIDGE_DOMAIN_SW_IF_DETAILS);
1963 mp->
bd_id = ntohl (bd_id);
1966 mp->
shg = input_cfg->
shg;
1979 u32 bd_id, bd_index;
1987 bd_id = ntohl (mp->
bd_id);
1991 for (; bd_index < end; bd_index++)
1995 if (bd_config && (bd_config->
bd_id > 0))
2032 rv = VNET_API_ERROR_NO_SUCH_ENTRY;
2033 goto bad_sw_if_index;
2042 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
2043 goto bad_sw_if_index;
2051 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
2052 goto bad_sw_if_index;
2057 bvi_mac = mp->
bvi_mac ? 1 : 0;
2083 if (flags & L2INPUT_FEAT_ ## a) \ 2084 rbm = l2input_intf_bitmap_enable (sw_if_index, L2INPUT_FEAT_ ## a, mp->is_set); 2113 rv = VNET_API_ERROR_NO_SUCH_ENTRY;
2143 rv = VNET_API_ERROR_NO_SUCH_ENTRY;
2150 rv = VNET_API_ERROR_UNSPECIFIED;
2162 u32 sw_if_index = (
u32) ~ 0;
2174 rmp->_vl_msg_id = ntohs (VL_API_TAP_CONNECT_REPLY);
2176 rmp->
retval = ntohl (rv);
2188 u32 sw_if_index = (
u32) ~ 0;
2200 rmp->_vl_msg_id = ntohs (VL_API_TAP_MODIFY_REPLY);
2202 rmp->
retval = ntohl (rv);
2224 rmp->_vl_msg_id = ntohs (VL_API_TAP_DELETE_REPLY);
2226 rmp->
retval = ntohl (rv);
2239 u32 hw_if_index, sw_if_index = (
u32) ~ 0;
2246 u64 sup_and_sub_key;
2257 if (
id == 0 ||
id > 4095)
2259 rv = VNET_API_ERROR_INVALID_VLAN;
2268 rv = VNET_API_ERROR_VLAN_ALREADY_EXISTS;
2273 *kp = sup_and_sub_key;
2275 memset (&
template, 0,
sizeof (
template));
2278 template.sub.id = id;
2279 template.sub.eth.raw_flags = 0;
2280 template.sub.eth.flags.one_tag = 1;
2281 template.sub.eth.outer_vlan_id = id;
2282 template.sub.eth.flags.exact_match = 1;
2288 rv = VNET_API_ERROR_INVALID_REGISTRATION;
2302 rmp->_vl_msg_id = ntohs (VL_API_CREATE_VLAN_SUBIF_REPLY);
2304 rmp->
retval = ntohl (rv);
2314 u32 sw_if_index = ~0;
2322 u64 sup_and_sub_key;
2333 rv = VNET_API_ERROR_BOND_SLAVE_NOT_ALLOWED;
2338 sub_id = ntohl (mp->
sub_id);
2340 sup_and_sub_key = ((
u64) (sw_if_index) << 32) | (
u64) sub_id;
2346 clib_warning (
"sup sw_if_index %d, sub id %d already exists\n",
2347 sw_if_index, sub_id);
2348 rv = VNET_API_ERROR_SUBIF_ALREADY_EXISTS;
2353 *kp = sup_and_sub_key;
2355 memset (&
template, 0,
sizeof (
template));
2357 template.sup_sw_if_index = sw_if_index;
2358 template.sub.id = sub_id;
2359 template.sub.eth.flags.no_tags = mp->
no_tags;
2360 template.sub.eth.flags.one_tag = mp->
one_tag;
2361 template.sub.eth.flags.two_tags = mp->
two_tags;
2362 template.sub.eth.flags.dot1ad = mp->
dot1ad;
2363 template.sub.eth.flags.exact_match = mp->
exact_match;
2364 template.sub.eth.flags.default_sub = mp->
default_sub;
2374 rv = VNET_API_ERROR_SUBIF_CREATE_FAILED;
2400 u32 tunnel_sw_if_index;
2413 REPLY_MACRO2(VL_API_MPLS_ETHERNET_ADD_DEL_TUNNEL_REPLY,
2433 u32 inner_fib_index, outer_fib_index;
2439 u8 *dst_mac_address;
2443 u32 tunnel_sw_if_index;
2447 return VNET_API_ERROR_NO_SUCH_FIB;
2449 outer_fib_index = p[0];
2454 return VNET_API_ERROR_NO_SUCH_INNER_FIB;
2456 inner_fib_index = p[0];
2458 if (inner_fib_index == outer_fib_index)
2459 return VNET_API_ERROR_INVALID_VALUE;
2467 tx_sw_if_index = adj->rewrite_header.sw_if_index;
2484 vpe_resolver_process_node.index,
2488 (vm, vpe_resolver_process_node.index,
2499 return VNET_API_ERROR_IN_PROGRESS;
2504 return VNET_API_ERROR_NEXT_HOP_NOT_IN_FIB;
2508 (&adj->rewrite_header, sizeof (adj->rewrite_data));
2515 tx_sw_if_index, &tunnel_sw_if_index, mp->
l2_only, mp->
is_add);
2531 REPLY_MACRO (VL_API_MPLS_ETHERNET_ADD_DEL_TUNNEL_2_REPLY);
2545 for (i = 0; i < mp->
nlabels; i++)
2550 ntohl (mp->
vrf_id), labels,
2569 u32 fib_index,
int is_del);
2578 rv = VNET_API_ERROR_NO_SUCH_FIB;
2586 fib_index, mp->
is_add == 0);
2609 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
2625 REPLY_MACRO (VL_API_PROXY_ARP_INTFC_ENABLE_DISABLE_REPLY);
2661 ethernet_arp_ip4_over_ethernet_address_t
a;
2684 vpe_main_t *rm = &vpe_main;
2693 u32 adj_index, sw_if_index;
2701 increment_missing_api_client_counter (rm->vlib_main);
2713 adj_index = ip6_fib_lookup (im6, sw_if_index, &
addr.ip6);
2721 if (adj_index == ~0)
2729 && adj->rewrite_header.sw_if_index == sw_if_index)
2736 && adj->rewrite_header.sw_if_index == sw_if_index)
2783 REPLY_MACRO (VL_API_SW_INTERFACE_SET_FLAGS_REPLY);
2799 REPLY_MACRO (VL_API_SW_INTERFACE_SET_MPLS_ENABLE_REPLY);
2813 int i, j, n_counters;
2832 for (j = 0; j < n_counters; j++)
2834 for (i = 0; i <
vec_len (my_vnet_mains); i++)
2847 for (j = 0; j < n_counters; j++)
2849 for (i = 0; i <
vec_len (my_vnet_mains); i++)
2862 REPLY_MACRO (VL_API_SW_INTERFACE_CLEAR_STATS_REPLY);
2869 u8 * interface_name,
u32 context)
2877 memset (mp, 0,
sizeof (*mp));
2878 mp->_vl_msg_id = ntohs (VL_API_SW_INTERFACE_DETAILS);
2921 u32 vtr_push_dot1q = 0, vtr_tag1 = 0, vtr_tag2 = 0;
2924 &vtr_op, &vtr_push_dot1q, &vtr_tag1, &vtr_tag2) != 0)
2928 clib_warning (
"cannot get vlan tag rewrite for sw_if_index %d",
2933 mp->
vtr_op = ntohl (vtr_op);
2954 memset (mp, 0,
sizeof (*mp));
2955 mp->_vl_msg_id = ntohs (VL_API_SW_INTERFACE_SET_FLAGS);
2966 __attribute__ ((unused));
2976 memset (mp, 0,
sizeof (*mp));
2977 mp->_vl_msg_id = ntohs (VL_API_SW_INTERFACE_SET_FLAGS);
2992 u8 *filter_string = 0, *name_string = 0;
2994 char *strcasestr (
char *,
char *);
3010 name_string = format (name_string,
"%U%c",
3011 format_vnet_sw_interface_name,
3012 am->vnet_main, swif, 0);
3014 if (mp->name_filter_valid == 0 ||
3015 strcasestr((char *) name_string, (char *) filter_string)) {
3017 send_sw_interface_details (am, q, swif, name_string, mp->context);
3019 _vec_len (name_string) = 0;
3038 q = vl_api_client_index_to_input_queue (reg->client_index);
3041 mp = vl_msg_api_alloc (sizeof (*mp));
3042 mp->_vl_msg_id = ntohs (VL_API_OAM_EVENT);
3043 clib_memcpy (mp->dst_address, &t->dst_address,
3044 sizeof (mp->dst_address));
3045 mp->state = t->state;
3046 vl_msg_api_send_shmem (q, (u8 *)&mp);
3084 rmp->_vl_msg_id = ntohs (VL_API_VNET_SUMMARY_STATS_REPLY);
3088 memset (total_pkts, 0,
sizeof (total_pkts));
3089 memset (total_bytes, 0,
sizeof (total_bytes));
3100 total_pkts[which] += v.
packets;
3101 total_bytes[which] += v.
bytes;
3119 u32 address_length: 6;
3130 static u32 *sw_if_indices_to_shut;
3136 int rv = VNET_API_ERROR_NO_SUCH_FIB;
3144 fib = &fib_table->v4;
3145 vnet_sw_interface_t * si;
3147 if (fib->table_id != target_fib_id)
3151 mpls_fib_reset_labels (fib->table_id);
3154 vnet_proxy_arp_fib_reset (fib->table_id);
3157 vnet_set_ip4_flow_hash (fib->table_id, IP_FLOW_HASH_DEFAULT);
3159 vec_reset_length (sw_if_indices_to_shut);
3162 pool_foreach (si, im->sw_interfaces,
3164 u32 sw_if_index = si->sw_if_index;
3166 if (sw_if_index < vec_len (im4->fib_index_by_sw_if_index)
3167 && (im4->fib_index_by_sw_if_index[si->sw_if_index] ==
3169 vec_add1 (sw_if_indices_to_shut, si->sw_if_index);
3172 for (i = 0; i <
vec_len (sw_if_indices_to_shut); i++) {
3173 sw_if_index = sw_if_indices_to_shut[
i];
3200 static u32 *sw_if_indices_to_shut;
3205 int rv = VNET_API_ERROR_NO_SUCH_FIB;
3213 vnet_sw_interface_t * si;
3214 fib = &(fib_table->v6);
3216 if (fib->table_id != target_fib_id)
3219 vec_reset_length (sw_if_indices_to_shut);
3222 pool_foreach (si, im->sw_interfaces,
3224 if (im6->fib_index_by_sw_if_index[si->sw_if_index] ==
3226 vec_add1 (sw_if_indices_to_shut, si->sw_if_index);
3229 for (i = 0; i <
vec_len (sw_if_indices_to_shut); i++) {
3230 sw_if_index = sw_if_indices_to_shut[
i];
3259 rv = ip4_reset_fib_t_handler (mp);
3275 (
int) (mp->
is_add == 0));
3291 (
int) (mp->
is_add == 0));
3307 (
int) (mp->
is_add == 0));
3325 (
int) (mp->
is_add == 0));
3327 rv = VNET_API_ERROR_UNIMPLEMENTED;
3373 u8 is_ipv6,
u8 * host_address,
u8 * router_address,
3392 if (
NULL != host_mac)
3395 mp->_vl_msg_id = ntohs (VL_API_DHCP_COMPL_EVENT);
3425 u8 is_no, suppress, managed, other, ll_option, send_unicast, cease,
3428 is_no = mp->
is_no == 1;
3431 other = mp->
other == 1;
3434 cease = mp->
cease == 1;
3440 suppress, managed, other,
3441 ll_option, send_unicast, cease,
3442 default_router, ntohl (mp->
lifetime),
3450 REPLY_MACRO (VL_API_SW_INTERFACE_IP6ND_RA_CONFIG_REPLY);
3459 u8 is_no, use_default, no_advertise, off_link, no_autoconfig, no_onlink;
3463 is_no = mp->
is_no == 1;
3475 off_link, no_autoconfig, no_onlink, is_no);
3478 REPLY_MACRO (VL_API_SW_INTERFACE_IP6ND_RA_PREFIX_REPLY);
3502 rv = VNET_API_ERROR_UNSPECIFIED;
3511 REPLY_MACRO (VL_API_SW_INTERFACE_IP6_ENABLE_DISABLE_REPLY);
3534 rv = VNET_API_ERROR_UNSPECIFIED;
3543 REPLY_MACRO (VL_API_SW_INTERFACE_IP6_SET_LINK_LOCAL_ADDRESS_REPLY);
3550 int rv = VNET_API_ERROR_UNIMPLEMENTED;
3565 table_id = ntohl (mp->
vrf_id);
3567 #define _(a,b) if (mp->a) flow_hash_config |= b; 3593 u32 sw_if_index, unnumbered_sw_if_index;
3604 unnumbered_sw_if_index))
3606 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
3614 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX_2;
3636 REPLY_MACRO (VL_API_SW_INTERFACE_SET_UNNUMBERED_REPLY);
3678 rmp->
vpe_pid = ntohl (getpid());
3686 u8 **shmem_vecp = (
u8 **) arg;
3692 shmem_vec = *shmem_vecp;
3701 clib_memcpy (shmem_vec + offset, buffer, buffer_bytes);
3706 *shmem_vecp = shmem_vec;
3726 rp->_vl_msg_id = ntohs (VL_API_CLI_REPLY);
3749 u8 **mem_vecp = (
u8 **) arg;
3750 u8 *mem_vec = *mem_vecp;
3754 clib_memcpy (mem_vec + offset, buffer, buffer_bytes);
3755 *mem_vecp = mem_vec;
3779 rmp->
length = htonl (len);
3804 rv = VNET_API_ERROR_UNSPECIFIED;
3811 REPLY_MACRO (VL_API_SET_ARP_NEIGHBOR_LIMIT_REPLY);
3834 memset (a, 0,
sizeof (*a));
3859 for (i = 0; i < mp->
n_tags; i++)
3888 memset (a, 0,
sizeof (*a));
3894 rv = VNET_API_ERROR_NO_SUCH_NODE2;
3900 rv = VNET_API_ERROR_NO_SUCH_NODE2;
3907 deser_tun_names += 1;
3910 int tun_name_len = 0;
3912 for (i = 0; i < num_tunnels; i++)
3914 tun_name_len = *deser_tun_names;
3915 deser_tun_names += 1;
3917 memcpy (tun_name, deser_tun_names, tun_name_len);
3919 deser_tun_names += tun_name_len;
3941 memset (a, 0,
sizeof (*a));
3962 clib_warning (
"multicast replication without DPDK not implemented");
3963 rv = VNET_API_ERROR_UNIMPLEMENTED;
3968 REPLY_MACRO (VL_API_SR_MULTICAST_MAP_ADD_DEL_REPLY);
3972 #define foreach_classify_add_del_table_field \ 3977 _(match_n_vectors) \ 3978 _(next_table_index) \ 3993 #define _(a) a = ntohl(mp->a); 4001 rv = VNET_API_ERROR_NO_SUCH_TABLE;
4006 (cm, mp->
mask, nbuckets, memory_size,
4007 skip_n_vectors, match_n_vectors,
4008 next_table_index, miss_next_index, &table_index, mp->
is_add);
4014 if (rv == 0 && mp->
is_add)
4016 t = pool_elt_at_index (cm->tables, table_index);
4017 rmp->skip_n_vectors = ntohl(t->skip_n_vectors);
4018 rmp->match_n_vectors = ntohl(t->match_n_vectors);
4019 rmp->new_table_index = ntohl(table_index);
4023 rmp->skip_n_vectors = ~0;
4024 rmp->match_n_vectors = ~0;
4025 rmp->new_table_index = ~0;
4037 u32 table_index, hit_next_index, opaque_index;
4043 advance = ntohl (mp->
advance);
4046 (cm, table_index, mp->
match, hit_next_index, opaque_index,
4049 REPLY_MACRO (VL_API_CLASSIFY_ADD_DEL_SESSION_REPLY);
4058 u32 table_index, sw_if_index;
4072 REPLY_MACRO (VL_API_CLASSIFY_SET_INTERFACE_IP_TABLE_REPLY);
4080 u32 sw_if_index, ip4_table_index, ip6_table_index, other_table_index;
4101 if (ip4_table_index != ~0 || ip6_table_index != ~0
4102 || other_table_index != ~0)
4115 REPLY_MACRO (VL_API_CLASSIFY_SET_INTERFACE_L2_TABLES_REPLY);
4134 u32 sw_if_index,
u32 enable);
4148 REPLY_MACRO (VL_API_L2_INTERFACE_EFP_FILTER_REPLY);
4163 vtr_op = ntohl (mp->
vtr_op);
4180 rv = VNET_API_ERROR_INVALID_VALUE;
4181 goto bad_sw_if_index;
4190 REPLY_MACRO (VL_API_L2_INTERFACE_VLAN_TAG_REWRITE_REPLY);
4198 u32 sw_if_index = (
u32) ~ 0;
4273 memset (mp, 0,
sizeof (*mp));
4274 mp->_vl_msg_id = ntohs (VL_API_SW_INTERFACE_VHOST_USER_DETAILS);
4330 if_name =
format (if_name,
"%U",
4334 memset (mp, 0,
sizeof (*mp));
4335 mp->_vl_msg_id = ntohs (VL_API_SW_IF_L2TPV3_TUNNEL_DETAILS);
4356 u8 * ip,
u16 prefix_length,
u8 is_ipv6,
u32 context)
4361 memset (mp, 0,
sizeof (*mp));
4362 mp->_vl_msg_id = ntohs (VL_API_IP_ADDRESS_DETAILS);
4371 *tp = ntohl (*(
u32 *) ip);
4391 u32 sw_if_index = ~0;
4392 int rv __attribute__ ((unused)) = 0;
4438 memset (mp, 0,
sizeof (*mp));
4439 mp->_vl_msg_id = ntohs (VL_API_IP_DETAILS);
4463 send_sw_if_l2tpv3_tunnel_details (am, q, session, lm, mp->context);
4477 memset (mp, 0,
sizeof (*mp));
4478 mp->_vl_msg_id = ntohs (VL_API_SW_INTERFACE_TAP_DETAILS);
4521 u32 sw_if_index = ~0;
4531 _vec_len (sorted_sis) = 0;
4535 vec_add1 (sorted_sis, si[0]);
4568 memset (mp, 0,
sizeof (*mp));
4569 mp->_vl_msg_id = ntohs (VL_API_L2_FIB_TABLE_ENTRY);
4642 strncpy ((
char *) rmp->
build_directory, vpe_api_get_build_directory(),
4644 strncpy ((
char *) rmp->
version, vpe_api_get_version(),
4646 strncpy ((
char *) rmp->
build_date, vpe_api_get_build_date(),
4659 u32 node_index = ~0;
4664 rv = VNET_API_ERROR_NO_SUCH_NODE;
4666 node_index = n->
index;
4683 u32 next_node_index = ~0, next_index = ~0;
4690 rv = VNET_API_ERROR_NO_SUCH_NODE;
4698 rv = VNET_API_ERROR_NO_SUCH_NODE2;
4702 next_node_index = next_node->
index;
4708 rv = VNET_API_ERROR_NO_SUCH_ENTRY;
4730 u32 next_index = ~0;
4736 rv = VNET_API_ERROR_NO_SUCH_NODE;
4743 rv = VNET_API_ERROR_NO_SUCH_NODE2;
4761 u32 sw_if_index = (
u32) ~ 0;
4766 rv = VNET_API_ERROR_UNIMPLEMENTED;
4770 u32 encap_fib_index;
4780 rv = VNET_API_ERROR_NO_SUCH_FIB;
4783 encap_fib_index = p[0];
4787 encap_fib_index = ~0;
4798 encap_fib_index, &sw_if_index);
4820 clib_net_to_host_u64
4825 REPLY_MACRO (VL_API_L2TPV3_SET_TUNNEL_COOKIES_REPLY);
4842 REPLY_MACRO (VL_API_L2TPV3_INTERFACE_ENABLE_DISABLE_REPLY);
4854 rv = VNET_API_ERROR_INVALID_VALUE;
4870 u32 encap_fib_index;
4873 u32 sw_if_index = ~0;
4878 rv = VNET_API_ERROR_NO_SUCH_FIB;
4881 encap_fib_index = p[0];
4887 rv = VNET_API_ERROR_SAME_SRC_DST;
4890 memset (a, 0,
sizeof (*a));
4909 a->
vni = ntohl (mp->
vni);
4930 memset (rmp, 0,
sizeof (*rmp));
4931 rmp->_vl_msg_id = ntohs (VL_API_VXLAN_TUNNEL_DETAILS);
4944 rmp->
vni = htonl (t->
vni);
4969 if (~0 == sw_if_index)
4974 send_vxlan_tunnel_details(t, q, mp->context);
4999 u32 sw_if_index = ~0;
5004 rv = VNET_API_ERROR_NO_SUCH_FIB;
5007 outer_fib_id = p[0];
5013 rv = VNET_API_ERROR_SAME_SRC_DST;
5016 memset (a, 0,
sizeof (*a));
5044 memset (rmp, 0,
sizeof (*rmp));
5045 rmp->_vl_msg_id = ntohs (VL_API_GRE_TUNNEL_DETAILS);
5072 if (~0 == sw_if_index)
5077 send_gre_tunnel_details(t, q, mp->context);
5108 (
int) (mp->
is_add != 0));
5123 u32 encap_fib_index, decap_fib_index;
5127 u32 sw_if_index = ~0;
5133 rv = VNET_API_ERROR_NO_SUCH_FIB;
5136 encap_fib_index = p[0];
5141 if (protocol == VXLAN_GPE_INPUT_NEXT_IP4_INPUT)
5146 rv = VNET_API_ERROR_NO_SUCH_INNER_FIB;
5149 decap_fib_index = p[0];
5160 rv = VNET_API_ERROR_SAME_SRC_DST;
5163 memset (a, 0,
sizeof (*a));
5181 a->
vni = ntohl (mp->
vni);
5202 memset (rmp, 0,
sizeof (*rmp));
5203 rmp->_vl_msg_id = ntohs (VL_API_VXLAN_GPE_TUNNEL_DETAILS);
5218 rmp->
vni = htonl (t->
vni);
5243 if (~0 == sw_if_index)
5248 send_vxlan_gpe_tunnel_details(t, q, mp->context);
5281 ls_locator_t *ls_loc;
5282 u32 ls_index = ~0, locator_num;
5286 memset (a, 0,
sizeof (a[0]));
5290 a->
name = locator_name;
5293 locator_num = clib_net_to_host_u32 (mp->
locator_num);
5295 memset (&locator, 0,
sizeof (locator));
5296 for (i = 0; i < locator_num; i++)
5298 ls_loc = &((ls_locator_t *) mp->
locators)[
i];
5301 locator.
sw_if_index = htonl (ls_loc->sw_if_index);
5302 locator.
priority = ls_loc->priority;
5303 locator.
weight = ls_loc->weight;
5318 rmp->
ls_index = clib_host_to_net_u32 (ls_index);
5333 memset (&locator, 0,
sizeof (locator));
5334 memset (a, 0,
sizeof (a[0]));
5344 a->
name = locator_name;
5381 return VNET_API_ERROR_INVALID_VALUE;
5397 u32 locator_set_index = ~0, map_index = ~0;
5400 memset (a, 0,
sizeof (a[0]));
5401 memset (eid, 0,
sizeof (eid[0]));
5412 rv = VNET_API_ERROR_INVALID_VALUE;
5415 locator_set_index = p[0];
5428 REPLY_MACRO (VL_API_LISP_ADD_DEL_LOCAL_EID_REPLY);
5438 clib_net_to_host_u32 (mp->
dp_table),
5440 REPLY_MACRO (VL_API_LISP_EID_TABLE_ADD_DEL_MAP_REPLY)}
5453 unformat_lisp_loc_pairs (
void *lcl_locs,
void *rmt_locs,
u32 rloc_num)
5459 for (i = 0; i < rloc_num; i++)
5462 r = &((rloc_t *) lcl_locs)[
i];
5463 memset (&pair.lcl_loc, 0, sizeof (pair.lcl_loc));
5467 r = &((rloc_t *) rmt_locs)[
i];
5468 memset (&pair.rmt_loc, 0, sizeof (pair.rmt_loc));
5471 pair.priority = r->priority;
5472 pair.weight = r->weight;
5486 for (i = 0; i < rloc_num; i++)
5489 r = &((rloc_t *) rmt_locs)[
i];
5490 memset (&loc, 0,
sizeof (loc));
5493 loc.priority = r->priority;
5494 loc.weight = r->weight;
5510 memset (a, 0,
sizeof (a[0]));
5519 if (rv || 0 == pairs)
5531 REPLY_MACRO (VL_API_LISP_GPE_ADD_DEL_FWD_ENTRY_REPLY);
5542 memset (a, 0,
sizeof (a[0]));
5549 REPLY_MACRO (VL_API_LISP_ADD_DEL_MAP_RESOLVER_REPLY);
5563 REPLY_MACRO (VL_API_LISP_GPE_ENABLE_DISABLE_REPLY);
5605 REPLY_MACRO (VL_API_LISP_GPE_ADD_DEL_IFACE_REPLY);
5646 REPLY_MACRO (VL_API_LISP_PITR_SET_LOCATOR_SET_REPLY);
5655 u8 *locator_set_name =
NULL;
5667 REPLY_MACRO (VL_API_LISP_ADD_DEL_MAP_REQUEST_ITR_RLOCS_REPLY);
5678 u32 rloc_num = clib_net_to_host_u32 (mp->
rloc_num);
5680 memset (eid, 0,
sizeof (eid[0]));
5712 REPLY_MACRO (VL_API_LISP_ADD_DEL_REMOTE_MAPPING_REPLY);
5722 memset (a, 0,
sizeof (a[0]));
5736 REPLY_MACRO (VL_API_LISP_ADD_DEL_ADJACENCY_REPLY);
5747 memset (rmp, 0,
sizeof (*rmp));
5748 rmp->_vl_msg_id = ntohs (VL_API_LISP_LOCATOR_DETAILS);
5775 u32 ls_index = ~0, *locit = 0;
5815 u32 context,
u32 ls_index)
5821 memset (rmp, 0,
sizeof (*rmp));
5822 rmp->_vl_msg_id = ntohs (VL_API_LISP_LOCATOR_SET_DETAILS);
5829 strncpy ((
char *) rmp->
ls_name, (
char *) lsit->
name,
5834 str =
format (0,
"<remote-%d>", ls_index);
5860 if (filter && !((1 == filter && lsit->local) ||
5861 (2 == filter && !lsit->local)))
5888 prefix_length[0] = 0;
5901 ip_prefix_t *ippref;
5924 u32 context,
u8 filter)
5932 ip_prefix_t *ip_prefix =
NULL;
5948 clib_warning (
"Filter error, unknown filter: %d", filter);
5957 memset (rmp, 0,
sizeof (*rmp));
5958 rmp->_vl_msg_id = ntohs (VL_API_LISP_EID_TABLE_DETAILS);
5967 rmp->
ttl = clib_host_to_net_u32 (mapit->
ttl);
6026 memset (eid, 0,
sizeof (*eid));
6032 if ((
u32) ~ 0 == mi)
6044 send_lisp_eid_table_details(mapit, q, mp->context,
6059 memset (rmp, 0,
sizeof (*rmp));
6060 rmp->_vl_msg_id = ntohs (VL_API_LISP_GPE_TUNNEL_DETAILS);
6099 send_lisp_gpe_fwd_entry_details(lfe, q, mp->context);
6111 memset (rmp, 0,
sizeof (*rmp));
6112 rmp->_vl_msg_id = ntohs (VL_API_LISP_MAP_RESOLVER_DETAILS);
6162 memset (rmp, 0,
sizeof (*rmp));
6163 rmp->_vl_msg_id = ntohs (VL_API_LISP_EID_TABLE_MAP_DETAILS);
6165 rmp->
vni = clib_host_to_net_u32 (p->
key);
6178 uword *vni_table = 0;
6209 memset (rmp, 0,
sizeof (*rmp));
6210 rmp->_vl_msg_id = ntohs (VL_API_LISP_EID_TABLE_VNI_DETAILS);
6212 rmp->
vni = clib_host_to_net_u32 (vni);
6223 for (i = 0; i < n; i++)
6226 memset (&a, 0,
sizeof (a));
6266 u32 vni = clib_net_to_host_u32 (mp->
vni);
6269 size =
vec_len (adjs) *
sizeof (
a);
6300 hash_set (vnis, p->key, 0);
6305 hash_set (vnis, p->key, 0);
6358 tmp_str =
format (0,
" ");
6368 REPLY_MACRO2(VL_API_LISP_GET_MAP_REQUEST_ITR_RLOCS_REPLY,
6397 tmp_str =
format (0,
"N/A");
6410 tmp_str =
format (0,
"N/A");
6439 REPLY_MACRO (VL_API_INTERFACE_NAME_RENUMBER_REPLY);
6444 u32 sw_if_index,
u32 address)
6449 static f64 arp_event_last_time;
6467 (now - arp_event_last_time) < 10.0)))
6472 arp_event_last_time = now;
6486 static f64 nd_event_last_time;
6506 (now - nd_event_last_time) < 10.0)))
6511 nd_event_last_time = now;
6554 memset (event, 0,
sizeof (*event));
6556 event->_vl_msg_id = ntohs (VL_API_IP4_ARP_EVENT);
6567 vpe_resolver_process_node.index,
6575 vpe_resolver_process_node.index,
6593 memset (event, 0,
sizeof (*event));
6595 event->_vl_msg_id = ntohs (VL_API_IP6_ND_EVENT);
6606 vpe_resolver_process_node.index,
6614 vpe_resolver_process_node.index,
6626 u32 sw_if_index, ip4_table_index, ip6_table_index, l2_table_index;
6636 ip6_table_index, l2_table_index, mp->
is_add);
6640 REPLY_MACRO (VL_API_INPUT_ACL_SET_INTERFACE_REPLY);
6657 rv = VNET_API_ERROR_UNIMPLEMENTED;
6670 u32 sw_if_index __attribute__ ((unused));
6671 u32 spd_id __attribute__ ((unused));
6674 spd_id = ntohl (mp->
spd_id);
6681 rv = VNET_API_ERROR_UNIMPLEMENTED;
6686 REPLY_MACRO (VL_API_IPSEC_INTERFACE_ADD_DEL_SPD_REPLY);
6699 memset (&p, 0,
sizeof (p));
6726 if (mp->
policy == IPSEC_POLICY_ACTION_RESOLVE)
6729 rv = VNET_API_ERROR_UNIMPLEMENTED;
6745 rv = VNET_API_ERROR_UNIMPLEMENTED;
6750 REPLY_MACRO (VL_API_IPSEC_SPD_ADD_DEL_ENTRY_REPLY);
6762 memset (&sa, 0,
sizeof (sa));
6765 sa.
spi = ntohl (mp->
spi);
6770 rv = VNET_API_ERROR_UNIMPLEMENTED;
6780 rv = VNET_API_ERROR_UNIMPLEMENTED;
6792 rv = VNET_API_ERROR_UNIMPLEMENTED;
6814 rv = VNET_API_ERROR_UNIMPLEMENTED;
6819 REPLY_MACRO (VL_API_IPSEC_SAD_ADD_DEL_ENTRY_REPLY);
6835 rv = VNET_API_ERROR_UNSPECIFIED;
6837 rv = VNET_API_ERROR_UNIMPLEMENTED;
6860 rv = VNET_API_ERROR_UNSPECIFIED;
6862 rv = VNET_API_ERROR_UNIMPLEMENTED;
6865 REPLY_MACRO (VL_API_IKEV2_PROFILE_SET_AUTH_REPLY);
6884 rv = VNET_API_ERROR_UNSPECIFIED;
6886 rv = VNET_API_ERROR_UNIMPLEMENTED;
6907 rv = VNET_API_ERROR_UNSPECIFIED;
6909 rv = VNET_API_ERROR_UNIMPLEMENTED;
6927 rv = VNET_API_ERROR_UNSPECIFIED;
6929 rv = VNET_API_ERROR_UNIMPLEMENTED;
6948 ntohs (mp->
mtu), flags);
6953 rmp->
index = ntohl(index);
7003 rmp = vl_msg_api_alloc (sizeof (*rmp));
7004 rmp->_vl_msg_id = ntohs(VL_API_MAP_DOMAIN_DETAILS);
7005 rmp->domain_index = htonl(d - mm->domains);
7006 rmp->ea_bits_len = d->ea_bits_len;
7007 rmp->psid_offset = d->psid_offset;
7008 rmp->psid_length = d->psid_length;
7009 clib_memcpy(rmp->ip4_prefix, &d->ip4_prefix, sizeof(rmp->ip4_prefix));
7010 rmp->ip4_prefix_len = d->ip4_prefix_len;
7011 clib_memcpy(rmp->ip6_prefix, &d->ip6_prefix, sizeof(rmp->ip6_prefix));
7012 rmp->ip6_prefix_len = d->ip6_prefix_len;
7013 clib_memcpy(rmp->ip6_src, &d->ip6_src, sizeof(rmp->ip6_src));
7014 rmp->ip6_src_len = d->ip6_src_len;
7015 rmp->mtu = htons(d->mtu);
7016 rmp->is_translation = (d->flags & MAP_DOMAIN_TRANSLATION);
7017 rmp->context = mp->context;
7019 vl_msg_api_send_shmem (q, (u8 *)&rmp);
7039 if (!d || !d->
rules)
7058 memset (rmp, 0,
sizeof (*rmp));
7059 rmp->_vl_msg_id = ntohs (VL_API_MAP_RULE_DETAILS);
7060 rmp->
psid = htons (i);
7084 rmp->_vl_msg_id = ntohs (VL_API_MAP_SUMMARY_STATS_REPLY);
7088 memset (total_pkts, 0,
sizeof (total_pkts));
7089 memset (total_bytes, 0,
sizeof (total_bytes));
7099 total_pkts[which] += v.
packets;
7100 total_bytes[which] += v.
bytes;
7110 clib_host_to_net_u64 (total_bytes[MAP_DOMAIN_COUNTER_RX]);
7114 clib_host_to_net_u64 (total_bytes[MAP_DOMAIN_COUNTER_TX]);
7143 rv = VNET_API_ERROR_UNIMPLEMENTED;
7165 REPLY_MACRO (VL_API_COP_INTERFACE_ENABLE_DISABLE_REPLY);
7188 REPLY_MACRO (VL_API_COP_WHITELIST_ENABLE_DISABLE_REPLY);
7285 rmp->
sw_if_index = clib_host_to_net_u32(sw_if_index);
7321 memset (&cfg, 0,
sizeof (cfg));
7340 rv = VNET_API_ERROR_UNSPECIFIED;
7345 if (rv == 0 && mp->
is_add)
7362 memset (mp, 0,
sizeof (*mp));
7363 mp->_vl_msg_id = ntohs (VL_API_POLICER_DETAILS);
7365 mp->
cir = htonl (config->
rb.
kbps.cir_kbps);
7366 mp->
eir = htonl (config->
rb.
kbps.eir_kbps);
7367 mp->
cb = htonl (config->
rb.
kbps.cb_bytes);
7368 mp->
eb = htonl (config->
rb.
kbps.eb_bytes);
7432 name = (u8 *) hp->key;
7433 pool_index = hp->value[0];
7434 config = pool_elt_at_index (pm->configs, pool_index);
7435 templ = pool_elt_at_index (pm->policer_templates, pool_index);
7436 send_policer_details(name, config, templ, q, mp->context);
7449 u32 sw_if_index, ip4_table_index, ip6_table_index, l2_table_index;
7459 ip6_table_index, l2_table_index,
7464 REPLY_MACRO (VL_API_POLICER_CLASSIFY_SET_INTERFACE_REPLY);
7475 memset (mp, 0,
sizeof (*mp));
7476 mp->_vl_msg_id = ntohs (VL_API_POLICER_CLASSIFY_DETAILS);
7500 for (i = 0; i <
vec_len (vec_tbl); i++)
7502 if (
vec_elt (vec_tbl, i) == ~0)
7571 memset (mp, 0,
sizeof (*mp));
7572 mp->_vl_msg_id = ntohs (VL_API_MPLS_ETH_TUNNEL_DETAILS);
7584 mp->
nlabels = htonl (nlabels);
7586 for (i = 0; i < nlabels; i++)
7623 send_mpls_eth_tunnel_entry (am, q, et, et - mm->eth_tunnels,
7644 memset (mp, 0,
sizeof (*mp));
7645 mp->_vl_msg_id = ntohs (VL_API_MPLS_FIB_DETAILS);
7650 mp->
label = htonl (label);
7674 hash_foreach(key, lfei, fib_table->mpls.mf_entries,
7676 vec_add1(lfeis, lfei);
7689 fib_table->ft_table_id,
7719 memset (mp, 0,
sizeof (*mp));
7720 mp->_vl_msg_id = ntohs (VL_API_MPLS_FIB_ENCAP_DETAILS);
7728 mp->
nlabels = htonl (nlabels);
7730 for (i = 0; i < nlabels; i++)
7760 vec_add2 (records, s, 1);
7761 s->fib_index = (u32)(key>>32);
7762 s->dest = (u32)(key & 0xFFFFFFFF);
7763 s->entry_index = (u32) value;
7777 vlib_cli_output (vm,
"%=6s%=16s%=16s",
"Table",
"Dest address",
"Labels");
7808 vec_add1 (table_ids, ntohl(t - cm->tables));
7815 rmp->_vl_msg_id = ntohs (VL_API_CLASSIFY_TABLE_IDS_REPLY);
7817 rmp->
count = ntohl (count);
7851 for (if_idx = 0; if_idx <
vec_len (vec_tbl); if_idx++)
7853 if (
vec_elt (vec_tbl, if_idx) == ~0 || sw_if_index != if_idx)
7894 if (table_id == t - cm->tables)
7896 rmp = vl_msg_api_alloc_as_if_client
7897 (sizeof (*rmp) + t->match_n_vectors * sizeof (u32x4));
7898 rmp->_vl_msg_id = ntohs (VL_API_CLASSIFY_TABLE_INFO_REPLY);
7899 rmp->context = mp->context;
7900 rmp->table_id = ntohl(table_id);
7901 rmp->nbuckets = ntohl(t->nbuckets);
7902 rmp->match_n_vectors = ntohl(t->match_n_vectors);
7903 rmp->skip_n_vectors = ntohl(t->skip_n_vectors);
7904 rmp->active_sessions = ntohl(t->active_elements);
7905 rmp->next_table_index = ntohl(t->next_table_index);
7906 rmp->miss_next_index = ntohl(t->miss_next_index);
7907 rmp->mask_length = ntohl(t->match_n_vectors * sizeof (u32x4));
7908 clib_memcpy(rmp->mask, t->mask, t->match_n_vectors * sizeof(u32x4));
7918 rmp->_vl_msg_id = ntohs ((VL_API_CLASSIFY_TABLE_INFO_REPLY));
7920 rmp->retval = ntohl (VNET_API_ERROR_CLASSIFY_TABLE_NOT_FOUND);
7937 vnet_classify_entry_t * e,
u32 context)
7942 memset (rmp, 0,
sizeof (*rmp));
7943 rmp->_vl_msg_id = ntohs (VL_API_CLASSIFY_SESSION_DETAILS);
7947 rmp->
advance = ntohl (e->advance);
7971 if (table_id == t - cm->tables)
7973 vnet_classify_bucket_t * b;
7974 vnet_classify_entry_t * v, * save_v;
7977 for (i = 0; i < t->nbuckets; i++)
7979 b = &t->buckets [i];
7983 save_v = vnet_classify_get_entry (t, b->offset);
7984 for (j = 0; j < (1<<b->log2_pages); j++)
7986 for (k = 0; k < t->entries_per_page; k++)
7988 v = vnet_classify_entry_at_index
7989 (t, save_v, j*t->entries_per_page + k);
7990 if (vnet_classify_entry_is_free (v))
7993 send_classify_session_details
7994 (q, table_id, t->match_n_vectors * sizeof (u32x4),
8012 u16 collector_port = UDP_DST_PORT_ipfix;
8014 u32 template_interval;
8022 if (collector_port == (
u16) ~ 0)
8023 collector_port = UDP_DST_PORT_ipfix;
8025 fib_id = ntohl (mp->
vrf_id);
8037 rv = VNET_API_ERROR_NO_SUCH_FIB;
8047 if (template_interval == ~0)
8048 template_interval = 20;
8051 if (collector.
as_u32 == 0)
8053 rv = VNET_API_ERROR_INVALID_VALUE;
8059 rv = VNET_API_ERROR_INVALID_VALUE;
8063 if (path_mtu > 1450 )
8065 rv = VNET_API_ERROR_INVALID_VALUE;
8071 rv = VNET_API_ERROR_INVALID_VALUE;
8110 memset (rmp, 0,
sizeof (*rmp));
8111 rmp->_vl_msg_id = ntohs (VL_API_IPFIX_EXPORTER_DETAILS);
8122 rmp->
vrf_id = htonl (vrf_id);
8138 u32 src_port = UDP_DST_PORT_ipfix;
8148 domain_id, (
u16) src_port);
8155 REPLY_MACRO (VL_API_SET_IPFIX_CLASSIFY_STREAM_REPLY);
8171 memset (rmp, 0,
sizeof (*rmp));
8172 rmp->_vl_msg_id = ntohs (VL_API_IPFIX_CLASSIFY_STREAM_DETAILS);
8190 u32 classify_table_index;
8192 u8 transport_protocol;
8195 classify_table_index = ntohl (mp->
table_id);
8203 rv = VNET_API_ERROR_UNSPECIFIED;
8207 memset (&args, 0,
sizeof (args));
8223 rv = VNET_API_ERROR_VALUE_EXIST;
8233 rv = VNET_API_ERROR_NO_SUCH_ENTRY;
8251 if (is_add == 0 || (rv && is_add))
8255 REPLY_MACRO (VL_API_SET_IPFIX_CLASSIFY_STREAM_REPLY);
8269 memset (mp, 0,
sizeof (*mp));
8270 mp->_vl_msg_id = ntohs (VL_API_IPFIX_CLASSIFY_TABLE_DETAILS);
8325 u32 hw_if_index = ~0;
8331 if (hw_if_index != ~0)
8350 rv = VNET_API_ERROR_CANNOT_CREATE_PCAP_FILE;
8365 u32 stream_index = ~0;
8398 u16 *high_ports = 0;
8400 u16 tmp_low, tmp_high;
8406 if (num_ranges > 32)
8408 rv = VNET_API_ERROR_EXCEEDED_NUMBER_OF_RANGES_CAPACITY;
8415 for (i = 0; i < num_ranges; i++)
8421 if (tmp_low > tmp_high || tmp_low == 0 || tmp_high > 65535)
8423 rv = VNET_API_ERROR_INVALID_VALUE;
8427 vec_add1 (high_ports, tmp_high + 1);
8431 if ((is_ipv6 && mask_length > 128) || (!is_ipv6 && mask_length > 32))
8433 rv = VNET_API_ERROR_ADDRESS_LENGTH_MISMATCH;
8437 vrf_id = ntohl (mp->
vrf_id);
8441 rv = VNET_API_ERROR_INVALID_VALUE;
8453 high_ports, is_add);
8462 high_ports, is_add);
8468 REPLY_MACRO (VL_API_IP_SOURCE_AND_PORT_RANGE_CHECK_ADD_DEL_REPLY);
8497 if (vrf_id[i] != 0 && vrf_id[i] != ~0)
8503 rv = VNET_API_ERROR_INVALID_VALUE;
8507 fib_index[
i] = p[0];
8523 REPLY_MACRO (VL_API_IP_SOURCE_AND_PORT_RANGE_CHECK_INTERFACE_ADD_DEL_REPLY);
8533 u32 sw_if_index = ~0;
8538 rv = VNET_API_ERROR_SAME_SRC_DST;
8542 memset (a, 0,
sizeof (*a));
8568 memset (rmp, 0,
sizeof (*rmp));
8569 rmp->_vl_msg_id = ntohs (VL_API_IPSEC_GRE_TUNNEL_DETAILS);
8596 if (~0 == sw_if_index)
8601 send_ipsec_gre_tunnel_details(t, q, mp->context);
8640 vtr_op = ntohl (mp->
vtr_op);
8651 rv = VNET_API_ERROR_INVALID_VALUE;
8652 goto bad_sw_if_index;
8661 REPLY_MACRO (VL_API_L2_INTERFACE_PBB_TAG_REWRITE_REPLY);
8690 u32 sw_if_index, ip4_table_index, ip6_table_index;
8699 ip6_table_index, mp->
is_add);
8703 REPLY_MACRO (VL_API_FLOW_CLASSIFY_SET_INTERFACE_REPLY);
8714 memset (mp, 0,
sizeof (*mp));
8715 mp->_vl_msg_id = ntohs (VL_API_FLOW_CLASSIFY_DETAILS);
8739 for (i = 0; i <
vec_len (vec_tbl); i++)
8741 if (
vec_elt (vec_tbl, i) == ~0)
8750 #define BOUNCE_HANDLER(nn) \ 8751 static void vl_api_##nn##_t_handler ( \ 8752 vl_api_##nn##_t *mp) \ 8754 vpe_client_registration_t *reg; \ 8755 vpe_api_main_t * vam = &vpe_api_main; \ 8756 unix_shared_memory_queue_t * q; \ 8759 pool_foreach(reg, vam->nn##_registrations, \ 8761 q = vl_api_client_index_to_input_queue (reg->client_index); \ 8768 if (q->cursize == q->maxsize) { \ 8769 clib_warning ("ERROR: receiver queue full, drop msg"); \ 8770 vl_msg_api_free (mp); \ 8773 vl_msg_api_send_shmem (q, (u8 *)&mp); \ 8777 vl_msg_api_free (mp); \ 8794 vl_msg_api_set_handlers(VL_API_##N, #n, \ 8795 vl_api_##n##_t_handler, \ 8797 vl_api_##n##_t_endian, \ 8798 vl_api_##n##_t_print, \ 8799 sizeof(vl_api_##n##_t), 1); 8808 "sr_tunnel_add_del",
8811 vl_api_sr_tunnel_add_del_t_endian,
8820 "sr_policy_add_del",
8823 vl_api_sr_policy_add_del_t_endian,
8832 += 5 *
sizeof (
u32x4);
8855 am->from_netconf_server_registration_hash =
hash_create (0,
sizeof (
uword));
8857 am->from_netconf_client_registration_hash =
hash_create (0,
sizeof (
uword));
8874 u64 baseva,
size, pvt_heap_size;
8876 const int max_buf_size = 4096;
8878 struct passwd _pw, *pw;
8879 struct group _grp, *grp;
8884 if (
unformat (input,
"prefix %s", &chroot_path))
8889 else if (
unformat (input,
"uid %d", &uid))
8891 else if (
unformat (input,
"gid %d", &gid))
8893 else if (
unformat (input,
"baseva %llx", &baseva))
8895 else if (
unformat (input,
"global-size %lldM", &size))
8897 else if (
unformat (input,
"global-size %lldG", &size))
8899 else if (
unformat (input,
"global-size %lld", &size))
8901 else if (
unformat (input,
"global-pvt-heap-size %lldM", &pvt_heap_size))
8903 else if (
unformat (input,
"global-pvt-heap-size size %lld",
8906 else if (
unformat (input,
"api-pvt-heap-size %lldM", &pvt_heap_size))
8908 else if (
unformat (input,
"api-pvt-heap-size size %lld",
8911 else if (
unformat (input,
"api-size %lldM", &size))
8913 else if (
unformat (input,
"api-size %lldG", &size))
8915 else if (
unformat (input,
"api-size %lld", &size))
8917 else if (
unformat (input,
"uid %s", &s))
8922 getpwnam_r (s, &_pw, buf,
vec_len (buf), &pw)) == ERANGE)
8923 && (
vec_len (buf) <= max_buf_size))
8932 "cannot fetch username %s", s);
8948 else if (
unformat (input,
"gid %s", &s))
8953 getgrnam_r (s, &_grp, buf,
vec_len (buf), &grp)) == ERANGE)
8954 && (
vec_len (buf) <= max_buf_size))
8963 "cannot fetch group %s", s);
8994 #undef vl_api_version 8995 #define vl_api_version(n,v) static u32 vpe_api_version = v; 8996 #include <vpp-api/vpe.api.h> 8997 #undef vl_api_version 9002 if (clib_host_to_net_u32 (mp->
api_versions[0]) != vpe_api_version)
9004 clib_warning (
"vpe API mismatch: 0x%08x instead of 0x%08x",
9019 s =
format (s,
"bd mac/ip4 binding events");
9032 s =
format (s,
"bd mac/ip6 binding events");
9055 vlib_cli_output (vm,
"%U", format_arp_event, arp_event);
9060 vlib_cli_output (vm,
"%U", format_nd_event, nd_event);
9069 .path =
"show arp-nd-event registrations",
9071 .short_help =
"Show ip4 arp and ip6 nd event registrations",
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)
vnet_config_main_t config_main
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.
#define foreach_ip_interface_address(lm, a, sw_if_index, loop, body)
Reply for IPsec: Add/delete Security Association Database entry.
Reply for classify table session dump request.
IPv6 set link local address on interface request.
fib_protocol_t fp_proto
protocol type
#define VNET_SW_INTERFACE_FLAG_UNNUMBERED
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)
static void send_ip_address_details(vpe_api_main_t *am, unix_shared_memory_queue_t *q, u8 *ip, u16 prefix_length, u8 is_ipv6, 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)
DHCP Proxy set / unset vss request.
static void vl_api_classify_session_dump_t_handler(vl_api_classify_session_dump_t *mp)
static void vl_api_tap_delete_t_handler(vl_api_tap_delete_t *mp, vlib_main_t *vm)
Proxy ARP add / del request.
void pg_enable_disable(u32 stream_index, int is_enable)
Classify get table IDs request.
void ip_null_dpo_add_and_lock(dpo_proto_t proto, ip_null_dpo_action_t action, dpo_id_t *dpo)
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.
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.
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
static 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
void receive_dpo_add_or_lock(dpo_proto_t proto, u32 sw_if_index, const ip46_address_t *nh_addr, dpo_id_t *dpo)
static int nd_change_data_callback(u32 pool_index, u8 *new_mac, u32 sw_if_index, ip6_address_t *address)
u32 ip4_multicast_rx_feature_vpath
Built-in multicast feature path index.
#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.
int vnet_tap_modify(vlib_main_t *vm, u32 orig_sw_if_index, u8 *intfc_name, u8 *hwaddr_arg, u32 *sw_if_indexp, u8 renumber, u32 custom_dev_instance)
Modifies tap interface - can result in new interface being created.
Add or Delete MAP rule from a domain (Only used for shared IPv4 per subscriber)
int map_delete_domain(u32 map_domain_index)
Reply for get next node index.
ip46_address_t tunnel_src_addr
static int mpls_ethernet_add_del_tunnel_2_t_handler(vl_api_mpls_ethernet_add_del_tunnel_2_t *mp)
int vnet_set_ip4_flow_hash(u32 table_id, flow_hash_config_t flow_hash_config)
#define BAD_SW_IF_INDEX_LABEL
static void vl_api_sw_interface_set_unnumbered_t_handler(vl_api_sw_interface_set_unnumbered_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
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)
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.
VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION(admin_up_down_function)
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)
static uword * vlib_process_wait_for_event(vlib_main_t *vm)
u16 udp_checksum(udp_header_t *uh, u32 udp_len, void *ih, u8 version)
static int ip6_add_del_route_t_handler(vl_api_ip_add_del_route_t *mp)
static void vl_api_set_ip_flow_hash_t_handler(vl_api_set_ip_flow_hash_t *mp)
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)
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
Reply for IKEv2: Set IKEv2 profile authentication method.
static vnet_hw_interface_t * vnet_get_sup_hw_interface(vnet_main_t *vnm, u32 sw_if_index)
uword * policer_config_by_name
Vhost-user interface details structure (fix this)
u8 tunnel_dst_address[16]
static void vl_api_sw_interface_add_del_address_t_handler(vl_api_sw_interface_add_del_address_t *mp)
ethernet_main_t * ethernet_get_main(vlib_main_t *vm)
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
static void vl_api_tap_connect_t_handler(vl_api_tap_connect_t *mp, vlib_main_t *vm)
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
vnet_interface_main_t interface_main
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 int ip4_add_del_route_t_handler(vl_api_ip_add_del_route_t *mp)
#define BAD_RX_SW_IF_INDEX_LABEL
LISP map resolver status.
vl_api_lisp_adjacency_t adjacencies[count]
#define REPLY_MACRO2(t, body)
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)
static void vl_api_ip_neighbor_add_del_t_handler(vl_api_ip_neighbor_add_del_t *mp, vlib_main_t *vm)
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
#define VALIDATE_SW_IF_INDEX(mp)
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.
clib_error_t * vnet_lisp_gpe_enable_disable(vnet_lisp_gpe_enable_disable_args_t *a)
Enable/disable LISP-GPE.
static void vl_api_sw_interface_details_t_handler(vl_api_sw_interface_details_t *mp)
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.
int ip6_neighbor_ra_prefix(vlib_main_t *vm, u32 sw_if_index, ip6_address_t *prefix_addr, u8 prefix_len, u8 use_default, u32 val_lifetime, u32 pref_lifetime, u8 no_advertise, u8 off_link, u8 no_autoconfig, u8 no_onlink, u8 is_no)
static void vl_api_sw_interface_ip6_enable_disable_t_handler(vl_api_sw_interface_ip6_enable_disable_t *mp, vlib_main_t *vm)
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.
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
static uword link_state_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
u64 map_error_counter_get(u32 node_index, map_error_t map_error)
static void lisp_fid_put_api(u8 *dst, fid_address_t *src, u8 *prefix_length)
Reply for IPsec: Add/delete Security Policy Database entry.
u32 vnet_config_del_feature(vlib_main_t *vm, vnet_config_main_t *cm, u32 config_string_heap_index, u32 feature_index, void *feature_config, u32 n_feature_config_bytes)
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)
ipsec_integ_alg_t integ_alg
u32 l2fib_del_entry(u64 mac, u32 bd_index)
Delete an entry from the l2fib.
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 void vl_api_sw_interface_dump_t_handler(vl_api_sw_interface_dump_t *mp)
static vnet_hw_interface_t * vnet_get_hw_interface(vnet_main_t *vnm, u32 hw_if_index)
#define ip_prefix_len(_a)
u32 * config_index_by_sw_if_index
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)
vnet_main_t ** vnet_mains
void vl_api_mpls_ip_bind_unbind_t_handler(vl_api_mpls_ip_bind_unbind_t *mp)
static void send_mpls_eth_tunnel_entry(vpe_api_main_t *am, unix_shared_memory_queue_t *q, mpls_eth_tunnel_t *et, u32 index, u32 context)
IPsec: Add/delete Security Policy Database entry.
Classify add / del session request.
#define BAD_TX_SW_IF_INDEX_LABEL
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 map_domain_counter_unlock(map_main_t *mm)
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)
struct l2fib_entry_result_t::@182::@184 fields
Combined counter to hold both packets and byte differences.
struct _vlib_node_registration vlib_node_registration_t
u64 total_security_check[2]
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.
Dump tap interfaces request.
void fib_table_entry_path_remove(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_protocol_t next_hop_proto, const ip46_address_t *next_hop, u32 next_hop_sw_if_index, u32 next_hop_fib_index, u32 next_hop_weight, fib_route_path_flags_t path_flags)
remove one path to an entry (aka route) in the FIB.
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
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)
Reply to sw_interface_clear_stats.
uword * sub_interface_sw_if_index_by_id
cop: interface enable/disable junk filtration reply
u32 * fib_index_by_sw_if_index
Table index indexed by software interface.
static void vl_api_l2_fib_table_dump_t_handler(vl_api_l2_fib_table_dump_t *mp)
struct rte_sched_port * hqos
Request for lisp_eid_table_map_details.
static vlib_node_registration_t link_state_process_node
(constructor) VLIB_REGISTER_NODE (link_state_process_node)
static void dhcpv6_proxy_config_2(vl_api_dhcp_proxy_config_2_t *mp)
static void send_mpls_fib_encap_details(vpe_api_main_t *am, unix_shared_memory_queue_t *q, show_mpls_fib_t *s, u32 context)
u32 pir_tokens_per_period
vlib_node_registration_t ip4_map_node
(constructor) VLIB_REGISTER_NODE (ip4_map_node)
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.
vl_api_ip4_arp_event_t * arp_events
unformat_function_t unformat_vnet_sw_interface
IPv6 router advertisement config request.
Reply for tap delete request.
L2 bridge domain request operational state details.
int mpls_dest_cmp(void *a1, void *a2)
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)
#define VNET_HW_INTERFACE_FLAG_LINK_UP
static void vl_api_map_summary_stats_t_handler(vl_api_map_summary_stats_t *mp)
static void vl_api_sw_if_l2tpv3_tunnel_dump_t_handler(vl_api_sw_if_l2tpv3_tunnel_dump_t *mp)
uword * mpls_encap_by_fib_and_dest
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)
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)
vhost-user interface create request
typedef CLIB_PACKED(struct{ip4_address_t address;u32 address_length:6;u32 index:26;})
IPv6 set link local address on interface response.
Reply for locator add/del.
TAP CLI interface details struct.
#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.
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
static void vl_api_proxy_arp_add_del_t_handler(vl_api_proxy_arp_add_del_t *mp)
#define VNET_HW_INTERFACE_FLAG_DUPLEX_MASK
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
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)
static void vl_api_map_del_domain_t_handler(vl_api_map_del_domain_t *mp)
u32 * tunnel_index_by_sw_if_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.
map_resolver_t * map_resolvers
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 void vl_api_ip_address_dump_t_handler(vl_api_ip_address_dump_t *mp)
fib_node_index_t fib_table_entry_path_add(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags, fib_protocol_t next_hop_proto, const ip46_address_t *next_hop, u32 next_hop_sw_if_index, u32 next_hop_fib_index, u32 next_hop_weight, mpls_label_t next_hop_label, fib_route_path_flags_t path_flags)
Add one path to an entry (aka route) in the FIB.
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)
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]
#define VNET_HW_INTERFACE_FLAG_SPEED_MASK
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_sw_interface_ip6nd_ra_prefix_t_handler(vl_api_sw_interface_ip6nd_ra_prefix_t *mp, vlib_main_t *vm)
Reply for interface events registration.
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)
#define VNET_SW_INTERFACE_FLAG_PROXY_ARP
void vlib_clear_combined_counters(vlib_combined_counter_main_t *cm)
Clear a collection of combined counters.
Clear interface statistics.
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
static void vl_api_map_add_del_rule_t_handler(vl_api_map_add_del_rule_t *mp)
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.
void fib_table_entry_special_remove(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source)
Remove a 'special' entry from the FIB.
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.
#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
vlib_combined_counter_main_t * domain_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)
Recursion constraint of via a host prefix.
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
#define hash_foreach(key_var, value_var, h, body)
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.
int ip6_interface_enabled(vlib_main_t *vm, u32 sw_if_index)
static 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, u32 next_hop_out_label)
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)
int ipsec_add_del_policy(vlib_main_t *vm, ipsec_policy_t *policy, int is_add)
static void vl_api_ikev2_set_local_key_t_handler(vl_api_ikev2_set_local_key_t *mp)
static void vl_api_mpls_ethernet_add_del_tunnel_2_t_handler(vl_api_mpls_ethernet_add_del_tunnel_2_t *mp)
Get LISP map request itr rlocs status.
DPDK interface HQoS subport parameters set reply.
add or delete map request itr rlocs
Reply for add / del encapsulation request.
Reply for MPLS Ethernet add / delete tunnel request.
#define clib_warning(format, args...)
IPv6 interface enable / disable request.
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)
static vlib_cli_command_t show_ip_arp_nd_events
(constructor) VLIB_CLI_COMMAND (show_ip_arp_nd_events)
DPDK interface HQoS pipe profile set reply.
enum fib_route_path_flags_t_ fib_route_path_flags_t
Path flags from the control plane.
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.
u8 * format_ipsec_integ_alg(u8 *s, va_list *args)
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.
Initialize a new tap interface with the given paramters.
IKEv2: Set IKEv2 profile traffic selector parameters.
int l2tpv3_interface_enable_disable(vnet_main_t *vnm, u32 sw_if_index, int enable_disable)
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
u32 fib_table_find(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
A collection of simple counters.
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)
Reply to IPFIX exporter dump request.
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
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)
int vnet_arp_unset_ip4_over_ethernet(vnet_main_t *vnm, u32 sw_if_index, void *a_arg)
Control Plane hook to remove an ARP entry.
dpdk_device_hqos_per_worker_thread_t * hqos_wt
Reply for tap connect request.
#define REPLY_MACRO4(t, n, body)
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)
int map_add_del_psid(u32 map_domain_index, u16 psid, ip6_address_t *tep, u8 is_add)
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.
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]
void vl_api_ip_add_del_route_t_handler(vl_api_ip_add_del_route_t *mp)
clib_error_t * ip4_add_del_interface_address(vlib_main_t *vm, u32 sw_if_index, ip4_address_t *address, u32 address_length, u32 is_del)
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)
int vnet_set_ip6_ethernet_neighbor(vlib_main_t *vm, u32 sw_if_index, ip6_address_t *a, u8 *link_layer_address, uword n_bytes_link_layer_address, int is_static)
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
Reply for gpe enable/disable.
ip4_address_t intfc_address
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.
flow_report_main_t flow_report_main
vl_api_ip_add_del_route_t r
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
u8 next_hop_ip4_address_in_outer_vrf[4]
#define VNET_HW_INTERFACE_FLAG_DUPLEX_SHIFT
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.
static void vlib_zero_combined_counter(vlib_combined_counter_main_t *cm, u32 index)
Clear a combined counter Clears the set of per-thread u16 counters, and the shared vlib_counter_t...
union sse2_qos_pol_cfg_params_st_::@224 rb
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
void ip4_sw_interface_enable_disable(u32 sw_if_index, u32 is_enable)
uword * fib_index_by_table_id
Hash table mapping table id to fib index.
Configure IP source and L4 port-range check reply.
static void send_mpls_fib_details(vpe_api_main_t *am, unix_shared_memory_queue_t *q, u32 table_id, u32 label, u32 eos, u32 context)
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)
#define clib_error_get_code(err)
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, int is_add)
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)
index_t classify_dpo_create(dpo_proto_t proto, u32 classify_table_index)
mpls eth tunnel operational state response
static void vl_api_mpls_eth_tunnel_dump_t_handler(vl_api_mpls_eth_tunnel_dump_t *mp)
#define VNET_HW_INTERFACE_FLAG_SPEED_SHIFT
int vhost_user_delete_if(vnet_main_t *vnm, vlib_main_t *vm, u32 sw_if_index)
#define gid_address_mac(_a)
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)
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)
struct sse2_qos_pol_cfg_params_st_::@224::@225 kbps
IPv6 segment routing tunnel add / del request.
IPv6 segment routing multicast map to policy add / del request.
static void vl_api_sw_interface_ip6_set_link_local_address_t_handler(vl_api_sw_interface_ip6_set_link_local_address_t *mp, vlib_main_t *vm)
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.
u32 mr_next_hop_out_label
Request for LISP adjacencies.
static void send_ip_details(vpe_api_main_t *am, unix_shared_memory_queue_t *q, u32 sw_if_index, u32 context)
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.
clib_error_t * set_ip6_link_local_address(vlib_main_t *vm, u32 sw_if_index, ip6_address_t *address, u8 address_length)
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)
int ipsec_add_del_sa(vlib_main_t *vm, ipsec_sa_t *new_sa, int is_add)
static void vl_api_l2_flags_t_handler(vl_api_l2_flags_t *mp)
sse2_qos_pol_action_params_st violate_action
#define pool_put(P, E)
Free an object E in pool P.
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_fib_encap_dump_t_handler(vl_api_mpls_fib_encap_dump_t *mp)
static void send_sw_interface_details(vpe_api_main_t *am, unix_shared_memory_queue_t *q, vnet_sw_interface_t *swif, u8 *interface_name, u32 context)
int vnet_mpls_ethernet_add_del_tunnel(u8 *dst, ip4_address_t *intfc, u32 mask_width, u32 inner_fib_id, u32 tx_sw_if_index, u32 *tunnel_sw_if_index, u8 l2_only, u8 is_add)
MPLS Route Add / del route.
static void vl_api_delete_vhost_user_if_t_handler(vl_api_delete_vhost_user_if_t *mp)
struct vnet_sub_interface_t::@143::@144::@146 flags
VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION(link_up_down_function)
static void * vnet_rewrite_get_data_internal(vnet_rewrite_header_t *rw, int max_size)
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...
static u32 vnet_mpls_uc_get_label(mpls_label_t label_exp_s_ttl)
IPv6 router advertisement prefix config response.
u16 flags_net_byte_order
Flags, e.g.
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
Recursion constraint of via an attahced prefix.
static clib_error_t * link_up_down_function(vnet_main_t *vm, u32 hw_if_index, u32 flags)
u32 pg_interface_add_or_get(pg_main_t *pg, uword stream_index)
vlib_simple_counter_main_t * sw_if_counters
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
void ip_del_all_interface_addresses(vlib_main_t *vm, u32 sw_if_index)
Tell client about an ip4 arp resolution event.
MPLS Ethernet add/ del tunnel 2.
Set unnumbered interface add / del response.
Get list of flow classify interfaces and tables.
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.
Set or delete one or all ip addresses on a specified interface.
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.
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.
int ip6_neighbor_ra_config(vlib_main_t *vm, u32 sw_if_index, u8 suppress, u8 managed, u8 other, u8 ll_option, u8 send_unicast, u8 cease, u8 use_lifetime, u32 lifetime, u32 initial_count, u32 initial_interval, u32 max_interval, u32 min_interval, u8 is_no)
cop: interface enable/disable junk filtration reply
Reply to sw_interface_set_flags.
ip6_to_l2_lookup_t lookup_type
Call from VLIB_INIT_FUNCTION to set the Linux kernel inject node name.
clib_error_t * ikev2_set_local_key(vlib_main_t *vm, u8 *file)
vnet_hw_interface_class_t ethernet_hw_interface_class
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
ip46_address_t tunnel_dst_addr
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
static void vl_api_mpls_eth_tunnel_details_t_handler(vl_api_mpls_eth_tunnel_details_t *mp)
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.
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.
static uword vlib_process_get_events_with_type(vlib_main_t *vm, uword **data_vector, uword with_type_opaque)
L2 fib clear table response.
static void vl_api_sw_interface_set_table_t_handler(vl_api_sw_interface_set_table_t *mp)
u8 * policy_name
optional policy name
static clib_error_t * admin_up_down_function(vnet_main_t *vm, u32 hw_if_index, u32 flags)
Reply for lisp_map_request_mode.
#define VNET_HW_INTERFACE_BOND_INFO_SLAVE
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
mpls fib encap table response
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.
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.
int ipsec_set_sa_key(vlib_main_t *vm, ipsec_sa_t *sa_update)
#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
vl_api_mpls_ethernet_add_del_tunnel_2_t t
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.
#define pub_sub_handler(lca, UCA)
vnet_feature_config_main_t feature_config_mains[VNET_N_IP_FEAT]
rx unicast, multicast, tx interface/feature configuration.
Set the ip flow hash config for a fib request.
fib_node_index_t fib_table_entry_special_dpo_update(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
Update a 'special' entry to the FIB that links to the DPO passed A special entry is an entry that the...
void * vl_msg_api_alloc(int nbytes)
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.
static void send_sw_interface_tap_details(vpe_api_main_t *am, unix_shared_memory_queue_t *q, tapcli_interface_details_t *tap_if, u32 context)
L2 interface patch add / del response.
pending_route_t * pending_routes
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)
static void vl_api_sw_interface_set_flags_t_handler(vl_api_sw_interface_set_flags_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).
int map_create_domain(ip4_address_t *ip4_prefix, u8 ip4_prefix_len, ip6_address_t *ip6_prefix, u8 ip6_prefix_len, ip6_address_t *ip6_src, u8 ip6_src_len, u8 ea_bits_len, u8 psid_offset, u8 psid_length, u32 *map_domain_index, u16 mtu, u8 flags)
void fib_table_entry_delete(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source)
Delete a FIB entry.
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)
static ip4_fib_t * ip4_fib_get(u32 index)
Get the FIB at the given index.
Set/unset the classification table for an interface request.
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)
IPv6 segment routing multicast map to policy add / del response.
vl_api_ip6_nd_event_t * nd_events
static void set_ip4_flow_hash(vl_api_set_ip_flow_hash_t *mp)
char * vpe_api_get_build_directory(void)
IPv6 interface enable / disable response.
#define clib_memcpy(a, b, c)
Reply for map_summary_stats request.
u8 remote_address_start[16]
int cop_interface_enable_disable(u32 sw_if_index, int enable_disable)
struct vnet_sub_interface_t::@143 eth
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)
ip4_address_t tunnel_src
The tunnel's source/local address.
static void vl_api_sw_interface_tap_dump_t_handler(vl_api_sw_interface_tap_dump_t *mp)
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)
static void send_lisp_map_resolver_details(ip_address_t *ip, unix_shared_memory_queue_t *q, u32 context)
int vnet_mpls_add_del_encap(ip4_address_t *dest, u32 fib_id, u32 *labels_host_byte_order, u32 policy_tunnel_index, int no_dst_hash, u32 *indexp, int is_add)
u32 fib_node_index_t
A typedef of a node index.
struct l2fib_entry_key_t::@178::@180 fields
add or delete map-resolver
Set/unset flow classify interface.
Definitions for punt infrastructure.
Reply for IP Neighbor add / delete request.
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.
vlib_main_t vlib_global_main
u8 tunnel_src_address[16]
#define REPLY_MACRO3(t, n, body)
int ipsec_add_del_spd(vlib_main_t *vm, u32 spd_id, int is_add)
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...
void vnet_register_ip4_arp_resolution_event(vnet_main_t *vnm, void *address_arg, uword node_index, uword type_opaque, uword data)
mpls_eth_tunnel_t * eth_tunnels
void dpo_set(dpo_id_t *dpo, dpo_type_t type, dpo_proto_t proto, index_t index)
Set/create a DPO ID The DPO will be locked.
u32 rsa
remote IPSec SA id
Request for map lisp locator status.
static void vl_api_tap_modify_t_handler(vl_api_tap_modify_t *mp, vlib_main_t *vm)
clib_error_t * enable_ip6_interface(vlib_main_t *vm, u32 sw_if_index)
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.
static void vl_api_mpls_add_del_encap_t_handler(vl_api_mpls_add_del_encap_t *mp)
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 map_domain_counter_lock(map_main_t *mm)
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)
static void vl_api_mpls_fib_encap_details_t_handler(vl_api_mpls_fib_encap_details_t *mp)
Reply for local_eid add/del.
Set/unset policer classify interface response.
u32 unnumbered_sw_if_index
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)
#define foreach_flow_hash_bit
ip46_address_range_t raddr
int vnet_arp_set_ip4_over_ethernet(vnet_main_t *vnm, u32 sw_if_index, void *a_arg, int is_static)
u32 ip6_multicast_rx_feature_vpath
Set L2 XConnect between two interfaces request.
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 send_sw_interface_flags(vpe_api_main_t *am, unix_shared_memory_queue_t *q, vnet_sw_interface_t *swif)
#define API_LINK_STATE_EVENT
static void vnet_interface_counter_lock(vnet_interface_main_t *im)
#define hash_create(elts, value_bytes)
foreach_registration_hash u8 link_state_process_up
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
#define VALIDATE_RX_SW_IF_INDEX(mp)
l2 fib table entry structure
IP neighbor add / del request.
Set L2 XConnect response.
static void vl_api_modify_vhost_user_if_t_handler(vl_api_modify_vhost_user_if_t *mp)
Reply for tap dump request.
#define pool_put_index(p, i)
Free pool element with given index.
#define fid_addr_type(_a)
Reply for vnet_get_summary_stats request.
IPv6 router advertisement config response.
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)
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)
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 set_ip6_flow_hash(vl_api_set_ip_flow_hash_t *mp)
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
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)
Reply for add / del route request.
gid_dictionary_t mapping_index_by_gid
IPv6 router advertisement prefix config request.
static int event_data_cmp(void *a1, void *a2)
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)
Reply for IPsec: Add/delete SPD from interface.
Reply for tap modify request.
int stats_memclnt_delete_callback(u32 client_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
u32 ip6_unicast_rx_feature_vpath
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)
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
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.
u8 is_del
Delete the policy?
u8 mr_is_resolve_attached
add or delete locator_set
u32 vnet_config_add_feature(vlib_main_t *vm, vnet_config_main_t *cm, u32 config_string_heap_index, u32 feature_index, void *feature_config, u32 n_feature_config_bytes)
static void vlib_zero_simple_counter(vlib_simple_counter_main_t *cm, u32 index)
Clear a simple counter Clears the set of per-thread u16 counters, and the u64 counter.
int vnet_tap_delete(vlib_main_t *vm, u32 sw_if_index)
Delete TAP interface.
vnet_classify_main_t vnet_classify_main
Request for a single block of summary stats.
Set max allowed ARP or ip6 neighbor entries response.
dpo_proto_t fib_proto_to_dpo(fib_protocol_t fib_proto)
ipsec_protocol_t protocol
uword * thread_registrations_by_name
Reply for MAP domain add.
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.
int vnet_unset_ip6_ethernet_neighbor(vlib_main_t *vm, u32 sw_if_index, ip6_address_t *a, u8 *link_layer_address, uword n_bytes_link_layer_address)
IPv6 segment routing policy add / del response.
static void vl_api_map_rule_dump_t_handler(vl_api_map_rule_dump_t *mp)
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)
u32 flow_hash_config_t
A flow hash configuration is a mask of the flow hash options.
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, int is_add)
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
static void vl_api_punt_t_handler(vl_api_punt_t *mp)
#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
fib_node_index_t fib_table_entry_update_one_path(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags, fib_protocol_t next_hop_proto, const ip46_address_t *next_hop, u32 next_hop_sw_if_index, u32 next_hop_fib_index, u32 next_hop_weight, mpls_label_t next_hop_label, fib_route_path_flags_t path_flags)
Update the entry to have just one path.
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)
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)
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.
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)
static void vl_api_map_add_domain_t_handler(vl_api_map_add_domain_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
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.
#define API_ADMIN_UP_DOWN_EVENT
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
#define VXLAN_TUNNEL_IS_IPV4
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 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.
#define DPO_INVALID
An initialiser for DPos declared on the stack.
static void vl_api_map_domain_dump_t_handler(vl_api_map_domain_dump_t *mp)
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.
Reply for interface events registration.
Set unnumbered interface add / del request.
uword * locator_set_index_by_name
static int nd_change_delete_callback(u32 pool_index, u8 *notused)
add or delete remote static mapping
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_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_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_sw_interface_clear_stats_t_handler(vl_api_sw_interface_clear_stats_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
u32 l2vtr_get(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)
Get vtag tag rewrite on the given interface.
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)
Modify a tap interface with the given paramters.
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
void vlib_clear_simple_counters(vlib_simple_counter_main_t *cm)
Clear a collection of simple counters.
#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.
u32 ip4_unicast_rx_feature_vpath
Built-in unicast feature path index, see vnet_feature_arc_init()
static void vl_api_dhcp_proxy_config_2_t_handler(vl_api_dhcp_proxy_config_2_t *mp)
int vnet_tap_connect_renumber(vlib_main_t *vm, u8 *intfc_name, u8 *hwaddr_arg, u32 *sw_if_indexp, u8 renumber, u32 custom_dev_instance)
Renumber a TAP interface.
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.
static void vl_api_ip_dump_t_handler(vl_api_ip_dump_t *mp)
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)
void dpo_reset(dpo_id_t *dpo)
reset a DPO ID The DPO will be unlocked.
L2 interface pbb tag rewrite response.
#define vec_foreach(var, vec)
Vector iterator.
#define foreach_registration_hash
Dumps all VNIs used in mappings.
clib_error_t * clear_ioam_rewrite_fn(void)
#define VALIDATE_TX_SW_IF_INDEX(mp)
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.
index_t ip4_fib_table_lookup_lb(ip4_fib_t *fib, const ip4_address_t *addr)
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)
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)
clib_error_t * ip6_add_del_interface_address(vlib_main_t *vm, u32 sw_if_index, ip6_address_t *address, u32 address_length, u32 is_del)
Set/unset flow classify interface response.
Request for LISP map-request mode.
format_function_t format_mpls_encap_index
void * vl_msg_api_alloc_as_if_client(int nbytes)
int vl_msg_api_version_check(vl_api_memclnt_create_t *mp)
static void vl_api_mpls_ethernet_add_del_tunnel_t_handler(vl_api_mpls_ethernet_add_del_tunnel_t *mp)
static void vl_api_flow_classify_dump_t_handler(vl_api_flow_classify_dump_t *mp)
#define clib_error_return(e, args...)
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)
static void * ip_interface_address_get_address(ip_lookup_main_t *lm, ip_interface_address_t *a)
Reply for IKEv2: Add/delete profile.
vhost-user interface modify response
static void vl_api_policer_classify_dump_t_handler(vl_api_policer_classify_dump_t *mp)
Interface details structure (fix this)
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.
MPLS Ethernet add / del tunnel request.
clib_error_t * disable_ip6_interface(vlib_main_t *vm, u32 sw_if_index)
ethernet_interface_t * interfaces
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)
Associate the specified interface with a fib table.
static uword vnet_sw_interface_get_flags(vnet_main_t *vnm, u32 sw_if_index)
u8 * format_ipsec_crypto_alg(u8 *s, va_list *args)
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 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)
Dump mpls eth tunnel table.
static void vl_api_oam_add_del_t_handler(vl_api_oam_add_del_t *mp)
gid_address_t lcl_eid
local eid
Add / del MPLS encapsulation request.
void vl_set_api_memory_size(u64 size)
u8 is_del
Delete the mapping.
int vnet_tap_dump_ifs(tapcli_interface_details_t **out_tapids)
Dump TAP interfaces.
struct fib_table_t_ * fibs
reply to lisp_eid_table_vni_dump
int ipsec_set_interface_spd(vlib_main_t *vm, u32 sw_if_index, u32 spd_id, int is_add)
u32 * fib_index_by_sw_if_index
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 mpls_fib_index_cmp(void *a1, void *a2)
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)
static void vl_api_sw_interface_ip6nd_ra_config_t_handler(vl_api_sw_interface_ip6nd_ra_config_t *mp, vlib_main_t *vm)
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)
void ip6_sw_interface_enable_disable(u32 sw_if_index, u32 is_enable)
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)
mpls_unicast_header_t * labels
Request for lisp pitr status.
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
#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)
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)
u32 unnumbered_sw_if_index
int vnet_flow_report_add_del(flow_report_main_t *frm, vnet_flow_report_add_del_args_t *a)
Set the ip flow hash config for a fib response.
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)
Reply for MAP domain del.
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.