23 #include <sys/types.h> 26 #include <netinet/in.h> 83 #undef __included_bihash_template_h__ 105 #define f64_endian(a) 106 #define f64_print(a,b) 117 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 122 #define REPLY_MACRO(t) \ 124 unix_shared_memory_queue_t * q; \ 125 rv = vl_msg_api_pd_handler (mp, rv); \ 126 q = vl_api_client_index_to_input_queue (mp->client_index); \ 130 rmp = vl_msg_api_alloc (sizeof (*rmp)); \ 131 rmp->_vl_msg_id = ntohs((t)); \ 132 rmp->context = mp->context; \ 133 rmp->retval = ntohl(rv); \ 135 vl_msg_api_send_shmem (q, (u8 *)&rmp); \ 138 #define REPLY_MACRO2(t, body) \ 140 unix_shared_memory_queue_t * q; \ 141 rv = vl_msg_api_pd_handler (mp, rv); \ 142 q = vl_api_client_index_to_input_queue (mp->client_index); \ 146 rmp = vl_msg_api_alloc (sizeof (*rmp)); \ 147 rmp->_vl_msg_id = ntohs((t)); \ 148 rmp->context = mp->context; \ 149 rmp->retval = ntohl(rv); \ 150 do {body;} while (0); \ 151 vl_msg_api_send_shmem (q, (u8 *)&rmp); \ 154 #if (1 || CLIB_DEBUG > 0) 156 #define VALIDATE_SW_IF_INDEX(mp) \ 157 do { u32 __sw_if_index = ntohl(mp->sw_if_index); \ 158 vnet_main_t *__vnm = vnet_get_main(); \ 159 if (pool_is_free_index(__vnm->interface_main.sw_interfaces, \ 161 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX; \ 162 goto bad_sw_if_index; \ 166 #define BAD_SW_IF_INDEX_LABEL \ 172 #define VALIDATE_RX_SW_IF_INDEX(mp) \ 173 do { u32 __rx_sw_if_index = ntohl(mp->rx_sw_if_index); \ 174 vnet_main_t *__vnm = vnet_get_main(); \ 175 if (pool_is_free_index(__vnm->interface_main.sw_interfaces, \ 176 __rx_sw_if_index)) { \ 177 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX; \ 178 goto bad_rx_sw_if_index; \ 182 #define BAD_RX_SW_IF_INDEX_LABEL \ 184 bad_rx_sw_if_index: \ 188 #define VALIDATE_TX_SW_IF_INDEX(mp) \ 189 do { u32 __tx_sw_if_index = ntohl(mp->tx_sw_if_index); \ 190 vnet_main_t *__vnm = vnet_get_main(); \ 191 if (pool_is_free_index(__vnm->interface_main.sw_interfaces, \ 192 __tx_sw_if_index)) { \ 193 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX; \ 194 goto bad_tx_sw_if_index; \ 198 #define BAD_TX_SW_IF_INDEX_LABEL \ 200 bad_tx_sw_if_index: \ 206 #define VALIDATE_SW_IF_INDEX(mp) 207 #define BAD_SW_IF_INDEX_LABEL 208 #define VALIDATE_RX_SW_IF_INDEX(mp) 209 #define BAD_RX_SW_IF_INDEX_LABEL 210 #define VALIDATE_TX_SW_IF_INDEX(mp) 211 #define BAD_TX_SW_IF_INDEX_LABEL 215 #define foreach_vpe_api_msg \ 216 _(WANT_INTERFACE_EVENTS, want_interface_events) \ 217 _(WANT_OAM_EVENTS, want_oam_events) \ 218 _(OAM_ADD_DEL, oam_add_del) \ 219 _(SW_INTERFACE_DUMP, sw_interface_dump) \ 220 _(SW_INTERFACE_DETAILS, sw_interface_details) \ 221 _(SW_INTERFACE_SET_FLAGS, sw_interface_set_flags) \ 222 _(IP_ADD_DEL_ROUTE, ip_add_del_route) \ 223 _(IS_ADDRESS_REACHABLE, is_address_reachable) \ 224 _(SW_INTERFACE_ADD_DEL_ADDRESS, sw_interface_add_del_address) \ 225 _(SW_INTERFACE_SET_TABLE, sw_interface_set_table) \ 226 _(SW_INTERFACE_SET_VPATH, sw_interface_set_vpath) \ 227 _(SW_INTERFACE_SET_L2_XCONNECT, sw_interface_set_l2_xconnect) \ 228 _(SW_INTERFACE_SET_L2_BRIDGE, sw_interface_set_l2_bridge) \ 229 _(BRIDGE_DOMAIN_ADD_DEL, bridge_domain_add_del) \ 230 _(BRIDGE_DOMAIN_DUMP, bridge_domain_dump) \ 231 _(BRIDGE_DOMAIN_DETAILS, bridge_domain_details) \ 232 _(BRIDGE_DOMAIN_SW_IF_DETAILS, bridge_domain_sw_if_details) \ 233 _(L2FIB_ADD_DEL, l2fib_add_del) \ 234 _(L2_FLAGS, l2_flags) \ 235 _(BRIDGE_FLAGS, bridge_flags) \ 236 _(TAP_CONNECT, tap_connect) \ 237 _(TAP_MODIFY, tap_modify) \ 238 _(TAP_DELETE, tap_delete) \ 239 _(SW_INTERFACE_TAP_DUMP, sw_interface_tap_dump) \ 240 _(CREATE_VLAN_SUBIF, create_vlan_subif) \ 241 _(CREATE_SUBIF, create_subif) \ 242 _(MPLS_GRE_ADD_DEL_TUNNEL, mpls_gre_add_del_tunnel) \ 243 _(MPLS_ETHERNET_ADD_DEL_TUNNEL, mpls_ethernet_add_del_tunnel) \ 244 _(MPLS_ETHERNET_ADD_DEL_TUNNEL_2, mpls_ethernet_add_del_tunnel_2) \ 245 _(MPLS_ADD_DEL_ENCAP, mpls_add_del_encap) \ 246 _(MPLS_ADD_DEL_DECAP, mpls_add_del_decap) \ 247 _(PROXY_ARP_ADD_DEL, proxy_arp_add_del) \ 248 _(PROXY_ARP_INTFC_ENABLE_DISABLE, proxy_arp_intfc_enable_disable) \ 249 _(IP_NEIGHBOR_ADD_DEL, ip_neighbor_add_del) \ 250 _(VNET_GET_SUMMARY_STATS, vnet_get_summary_stats) \ 251 _(RESET_FIB, reset_fib) \ 252 _(DHCP_PROXY_CONFIG,dhcp_proxy_config) \ 253 _(DHCP_PROXY_CONFIG_2,dhcp_proxy_config_2) \ 254 _(DHCP_PROXY_SET_VSS,dhcp_proxy_set_vss) \ 255 _(DHCP_CLIENT_CONFIG, dhcp_client_config) \ 256 _(SET_IP_FLOW_HASH,set_ip_flow_hash) \ 257 _(SW_INTERFACE_IP6ND_RA_CONFIG, sw_interface_ip6nd_ra_config) \ 258 _(SW_INTERFACE_IP6ND_RA_PREFIX, sw_interface_ip6nd_ra_prefix) \ 259 _(SW_INTERFACE_IP6_ENABLE_DISABLE, sw_interface_ip6_enable_disable ) \ 260 _(SW_INTERFACE_IP6_SET_LINK_LOCAL_ADDRESS, \ 261 sw_interface_ip6_set_link_local_address) \ 262 _(SW_INTERFACE_SET_UNNUMBERED, sw_interface_set_unnumbered) \ 263 _(CREATE_LOOPBACK, create_loopback) \ 264 _(CONTROL_PING, control_ping) \ 265 _(CLI_REQUEST, cli_request) \ 266 _(SET_ARP_NEIGHBOR_LIMIT, set_arp_neighbor_limit) \ 267 _(L2_PATCH_ADD_DEL, l2_patch_add_del) \ 268 _(CLASSIFY_ADD_DEL_TABLE, classify_add_del_table) \ 269 _(CLASSIFY_ADD_DEL_SESSION, classify_add_del_session) \ 270 _(CLASSIFY_SET_INTERFACE_IP_TABLE, classify_set_interface_ip_table) \ 271 _(CLASSIFY_SET_INTERFACE_L2_TABLES, classify_set_interface_l2_tables) \ 272 _(GET_NODE_INDEX, get_node_index) \ 273 _(ADD_NODE_NEXT, add_node_next) \ 274 _(L2TPV3_CREATE_TUNNEL, l2tpv3_create_tunnel) \ 275 _(L2TPV3_SET_TUNNEL_COOKIES, l2tpv3_set_tunnel_cookies) \ 276 _(L2TPV3_INTERFACE_ENABLE_DISABLE, l2tpv3_interface_enable_disable) \ 277 _(L2TPV3_SET_LOOKUP_KEY, l2tpv3_set_lookup_key) \ 278 _(SW_IF_L2TPV3_TUNNEL_DUMP, sw_if_l2tpv3_tunnel_dump) \ 279 _(VXLAN_ADD_DEL_TUNNEL, vxlan_add_del_tunnel) \ 280 _(VXLAN_TUNNEL_DUMP, vxlan_tunnel_dump) \ 281 _(GRE_ADD_DEL_TUNNEL, gre_add_del_tunnel) \ 282 _(GRE_TUNNEL_DUMP, gre_tunnel_dump) \ 283 _(L2_FIB_CLEAR_TABLE, l2_fib_clear_table) \ 284 _(L2_INTERFACE_EFP_FILTER, l2_interface_efp_filter) \ 285 _(L2_INTERFACE_VLAN_TAG_REWRITE, l2_interface_vlan_tag_rewrite) \ 286 _(CREATE_VHOST_USER_IF, create_vhost_user_if) \ 287 _(MODIFY_VHOST_USER_IF, modify_vhost_user_if) \ 288 _(DELETE_VHOST_USER_IF, delete_vhost_user_if) \ 289 _(SW_INTERFACE_VHOST_USER_DUMP, sw_interface_vhost_user_dump) \ 290 _(IP_ADDRESS_DUMP, ip_address_dump) \ 291 _(IP_DUMP, ip_dump) \ 292 _(SW_INTERFACE_VHOST_USER_DETAILS, sw_interface_vhost_user_details) \ 293 _(SHOW_VERSION, show_version) \ 294 _(L2_FIB_TABLE_DUMP, l2_fib_table_dump) \ 295 _(L2_FIB_TABLE_ENTRY, l2_fib_table_entry) \ 296 _(VXLAN_GPE_ADD_DEL_TUNNEL, vxlan_gpe_add_del_tunnel) \ 297 _(INTERFACE_NAME_RENUMBER, interface_name_renumber) \ 298 _(WANT_IP4_ARP_EVENTS, want_ip4_arp_events) \ 299 _(INPUT_ACL_SET_INTERFACE, input_acl_set_interface) \ 300 _(IPSEC_SPD_ADD_DEL, ipsec_spd_add_del) \ 301 _(IPSEC_INTERFACE_ADD_DEL_SPD, ipsec_interface_add_del_spd) \ 302 _(IPSEC_SPD_ADD_DEL_ENTRY, ipsec_spd_add_del_entry) \ 303 _(IPSEC_SAD_ADD_DEL_ENTRY, ipsec_sad_add_del_entry) \ 304 _(IPSEC_SA_SET_KEY, ipsec_sa_set_key) \ 305 _(IKEV2_PROFILE_ADD_DEL, ikev2_profile_add_del) \ 306 _(IKEV2_PROFILE_SET_AUTH, ikev2_profile_set_auth) \ 307 _(IKEV2_PROFILE_SET_ID, ikev2_profile_set_id) \ 308 _(IKEV2_PROFILE_SET_TS, ikev2_profile_set_ts) \ 309 _(IKEV2_SET_LOCAL_KEY, ikev2_set_local_key) \ 310 _(DELETE_LOOPBACK, delete_loopback) \ 311 _(BD_IP_MAC_ADD_DEL, bd_ip_mac_add_del) \ 312 _(MAP_ADD_DOMAIN, map_add_domain) \ 313 _(MAP_DEL_DOMAIN, map_del_domain) \ 314 _(MAP_ADD_DEL_RULE, map_add_del_rule) \ 315 _(MAP_DOMAIN_DUMP, map_domain_dump) \ 316 _(MAP_RULE_DUMP, map_rule_dump) \ 317 _(MAP_SUMMARY_STATS, map_summary_stats) \ 318 _(COP_INTERFACE_ENABLE_DISABLE, cop_interface_enable_disable) \ 319 _(COP_WHITELIST_ENABLE_DISABLE, cop_whitelist_enable_disable) \ 320 _(GET_NODE_GRAPH, get_node_graph) \ 321 _(SW_INTERFACE_CLEAR_STATS, sw_interface_clear_stats) \ 322 _(TRACE_PROFILE_ADD, trace_profile_add) \ 323 _(TRACE_PROFILE_APPLY, trace_profile_apply) \ 324 _(TRACE_PROFILE_DEL, trace_profile_del) \ 325 _(LISP_ADD_DEL_LOCATOR_SET, lisp_add_del_locator_set) \ 326 _(LISP_ADD_DEL_LOCATOR, lisp_add_del_locator) \ 327 _(LISP_ADD_DEL_LOCAL_EID, lisp_add_del_local_eid) \ 328 _(LISP_GPE_ADD_DEL_FWD_ENTRY, lisp_gpe_add_del_fwd_entry) \ 329 _(LISP_ADD_DEL_MAP_RESOLVER, lisp_add_del_map_resolver) \ 330 _(LISP_GPE_ENABLE_DISABLE, lisp_gpe_enable_disable) \ 331 _(LISP_ENABLE_DISABLE, lisp_enable_disable) \ 332 _(LISP_GPE_ADD_DEL_IFACE, lisp_gpe_add_del_iface) \ 333 _(LISP_ADD_DEL_REMOTE_MAPPING, lisp_add_del_remote_mapping) \ 334 _(LISP_LOCATOR_SET_DUMP, lisp_locator_set_dump) \ 335 _(LISP_LOCAL_EID_TABLE_DUMP, lisp_local_eid_table_dump) \ 336 _(LISP_GPE_TUNNEL_DUMP, lisp_gpe_tunnel_dump) \ 337 _(LISP_MAP_RESOLVER_DUMP, lisp_map_resolver_dump) \ 338 _(LISP_ENABLE_DISABLE_STATUS_DUMP, \ 339 lisp_enable_disable_status_dump) \ 340 _(SR_MULTICAST_MAP_ADD_DEL, sr_multicast_map_add_del) \ 341 _(AF_PACKET_CREATE, af_packet_create) \ 342 _(AF_PACKET_DELETE, af_packet_delete) \ 343 _(POLICER_ADD_DEL, policer_add_del) 346 #define QUOTE(x) QUOTE_(x) 348 #define foreach_registration_hash \ 349 _(interface_events) \ 350 _(to_netconf_server) \ 351 _(from_netconf_server) \ 352 _(to_netconf_client) \ 353 _(from_netconf_client) \ 372 #define _(a) uword *a##_registration_hash; \ 373 vpe_client_registration_t * a##_registrations; 415 p = hash_get (vam->a##_registration_hash, client_index); \ 417 rp = pool_elt_at_index (vam->a##_registrations, p[0]); \ 418 pool_put (vam->a##_registrations, rp); \ 419 hash_unset (vam->a##_registration_hash, client_index); \ 426 #define API_LINK_STATE_EVENT 1 427 #define API_ADMIN_UP_DOWN_EVENT 2 446 uword * event_data = 0;
449 u32 prev_sw_if_index;
466 prev_sw_if_index = ~0;
468 for (i = 0; i <
vec_len(event_data); i++) {
470 if (prev_sw_if_index == event_data[i])
472 prev_sw_if_index = event_data[
i];
476 q = vl_api_client_index_to_input_queue (reg->client_index);
479 if (!pool_is_free_index (vnm->interface_main.sw_interfaces,
482 swif = vnet_get_sw_interface (vnm, event_data[i]);
483 send_sw_interface_flags (vam, q, swif);
502 .name =
"vpe-link-state-process",
540 #define pub_sub_handler(lca,UCA) \ 541 static void vl_api_want_##lca##_t_handler ( \ 542 vl_api_want_##lca##_t *mp) \ 544 vpe_api_main_t *vam = &vpe_api_main; \ 545 vpe_client_registration_t *rp; \ 546 vl_api_want_##lca##_reply_t *rmp; \ 550 p = hash_get (vam->lca##_registration_hash, mp->client_index); \ 552 if (mp->enable_disable) { \ 553 clib_warning ("pid %d: already enabled...", mp->pid); \ 554 rv = VNET_API_ERROR_INVALID_REGISTRATION; \ 557 rp = pool_elt_at_index (vam->lca##_registrations, p[0]); \ 558 pool_put (vam->lca##_registrations, rp); \ 559 hash_unset (vam->lca##_registration_hash, \ 564 if (mp->enable_disable == 0) { \ 565 clib_warning ("pid %d: already disabled...", mp->pid); \ 566 rv = VNET_API_ERROR_INVALID_REGISTRATION; \ 569 pool_get (vam->lca##_registrations, rp); \ 570 rp->client_index = mp->client_index; \ 571 rp->client_pid = mp->pid; \ 572 hash_set (vam->lca##_registration_hash, rp->client_index, \ 573 rp - vam->lca##_registrations); \ 576 REPLY_MACRO (VL_API_WANT_##UCA##_REPLY); \ 582 #define RESOLUTION_EVENT 1 583 #define RESOLUTION_PENDING_EVENT 2 584 #define IP4_ARP_EVENT 3 591 void handle_ip4_arp_event (
u32 pool_index)
616 if (q->cursize < q->maxsize) {
621 static f64 last_time;
627 clib_warning (
"arp event for %U to pid %d: queue stuffed!",
640 uword *event_data = 0;
646 u32 * resolution_failures = 0;
655 switch (event_type) {
661 for (i = 0; i <
vec_len(event_data); i++) {
683 (rv >= 0) ?
"succeeded" :
"failed");
694 (rv >= 0) ?
"succeeded" :
"failed");
702 (rv >= 0) ?
"succeeded" :
"failed");
713 for (i = 0; i <
vec_len(event_data); i++)
714 handle_ip4_arp_event (event_data[i]);
725 switch (pr->resolve_type) {
726 case RESOLVE_IP4_ADD_DEL_ROUTE:
727 e = ip4_probe_neighbor
728 (vm, (ip4_address_t *)&(adr->next_hop_address),
729 ntohl(adr->next_hop_sw_if_index));
732 case RESOLVE_IP6_ADD_DEL_ROUTE:
733 e = ip6_probe_neighbor
734 (vm, (ip6_address_t *)&(adr->next_hop_address),
735 ntohl(adr->next_hop_sw_if_index));
738 case RESOLVE_MPLS_ETHERNET_ADD_DEL:
740 e = ip4_probe_neighbor
742 (ip4_address_t *)&(pme->next_hop_ip4_address_in_outer_vrf),
743 pme->resolve_opaque);
747 e = clib_error_return (0,
"resolver: BOGUS TYPE %d",
771 for (i = 0; i <
vec_len (resolution_failures); i++) {
773 resolution_failures[i]);
779 clib_warning (
"resolver: add %U/%d via %U retry failure",
788 clib_warning (
"resolver: add %U/%d via %U retry failure",
797 clib_warning (
"resolver: add mpls-o-e via %U retry failure",
820 .name =
"vpe-route-resolver-process",
848 fib_index = f->
index;
851 return VNET_API_ERROR_NO_SUCH_FIB;
859 return VNET_API_ERROR_NO_MATCHING_INTERFACE;
862 sizeof (next_hop_address.
data));
870 (im, fib_index, &next_hop_address, 1 );
883 (vnm, &next_hop_address, vpe_resolver_process_node.index,
887 (vm, vpe_resolver_process_node.index,
898 return VNET_API_ERROR_IN_PROGRESS;
927 memset (&a, 0,
sizeof (a));
950 memset(&cadj, 0,
sizeof(cadj));
955 return VNET_API_ERROR_NO_SUCH_TABLE;
962 (im, fib_index, &next_hop_address,
966 return VNET_API_ERROR_NEXT_HOP_NOT_IN_FIB;
979 return VNET_API_ERROR_NO_SUCH_INNER_FIB;
984 int disable_default_route = 1;
989 disable_default_route = 0;
992 (im, fib_index, &a.
dst_address, disable_default_route);
995 return VNET_API_ERROR_UNKNOWN_DESTINATION;
1001 return VNET_API_ERROR_ADDRESS_MATCHES_INTERFACE_ADDRESS;
1043 fib_index = f->
index;
1046 return VNET_API_ERROR_NO_SUCH_FIB;
1054 return VNET_API_ERROR_NO_MATCHING_INTERFACE;
1057 sizeof (next_hop_address.
as_u8));
1065 (im, fib_index, &next_hop_address);
1078 (vnm, &next_hop_address, vpe_resolver_process_node.index,
1082 (vm, vpe_resolver_process_node.index,
1093 return VNET_API_ERROR_IN_PROGRESS;
1121 memset (&a, 0,
sizeof (a));
1144 (im, fib_index, &next_hop_address);
1147 return VNET_API_ERROR_NEXT_HOP_NOT_IN_FIB;
1160 return VNET_API_ERROR_NO_SUCH_INNER_FIB;
1170 return VNET_API_ERROR_UNKNOWN_DESTINATION;
1175 return VNET_API_ERROR_ADDRESS_MATCHES_INTERFACE_ADDRESS;
1210 u32 sw_if_index,
u8 *next_hop_addr)
1261 is_del = mp->
is_add == 0;
1276 REPLY_MACRO(VL_API_SW_INTERFACE_ADD_DEL_ADDRESS_REPLY);
1301 rv = VNET_API_ERROR_NO_SUCH_FIB;
1313 rv = VNET_API_ERROR_NO_SUCH_FIB;
1400 rx_sw_if_index, 0, 0, 0, tx_sw_if_index);
1408 REPLY_MACRO(VL_API_SW_INTERFACE_SET_L2_XCONNECT_REPLY);
1433 rx_sw_if_index, bd_index, bvi, shg, 0);
1440 REPLY_MACRO(VL_API_SW_INTERFACE_SET_L2_BRIDGE_REPLY);
1451 u32 enable_flags = 0, disable_flags = 0;
1515 memset (mp, 0,
sizeof (*mp));
1516 mp->_vl_msg_id = ntohs (VL_API_BRIDGE_DOMAIN_DETAILS);
1539 memset (mp, 0,
sizeof (*mp));
1540 mp->_vl_msg_id = ntohs (VL_API_BRIDGE_DOMAIN_SW_IF_DETAILS);
1541 mp->
bd_id = ntohl (bd_id);
1544 mp->
shg = input_cfg->
shg;
1557 u32 bd_id, bd_index;
1565 bd_id = ntohl(mp->
bd_id);
1569 for (; bd_index < end; bd_index++) {
1572 if (bd_config && (bd_config->
bd_id > 0)) {
1606 rv = VNET_API_ERROR_NO_SUCH_ENTRY;
1607 goto bad_sw_if_index;
1614 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
1615 goto bad_sw_if_index;
1619 if (config->
bridge == 0) {
1620 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
1621 goto bad_sw_if_index;
1650 if (flags & L2INPUT_FEAT_ ## a) \ 1651 rbm = l2input_intf_bitmap_enable (sw_if_index, L2INPUT_FEAT_ ## a, mp->is_set); 1675 rv = VNET_API_ERROR_NO_SUCH_ENTRY;
1701 rv = VNET_API_ERROR_NO_SUCH_ENTRY;
1708 rv = VNET_API_ERROR_UNSPECIFIED;
1720 u32 sw_if_index = (
u32)~0;
1732 rmp->_vl_msg_id = ntohs(VL_API_TAP_CONNECT_REPLY);
1746 u32 sw_if_index = (
u32)~0;
1758 rmp->_vl_msg_id = ntohs(VL_API_TAP_MODIFY_REPLY);
1782 rmp->_vl_msg_id = ntohs(VL_API_TAP_DELETE_REPLY);
1797 u32 hw_if_index, sw_if_index = (
u32)~0;
1804 u64 sup_and_sub_key;
1815 if (
id == 0 ||
id > 4095) {
1816 rv = VNET_API_ERROR_INVALID_VLAN;
1824 rv = VNET_API_ERROR_VLAN_ALREADY_EXISTS;
1829 *kp = sup_and_sub_key;
1831 memset (&
template, 0,
sizeof (
template));
1834 template.sub.id = id;
1835 template.sub.eth.raw_flags = 0;
1836 template.sub.eth.flags.one_tag = 1;
1837 template.sub.eth.outer_vlan_id = id;
1838 template.sub.eth.flags.exact_match = 1;
1843 rv = VNET_API_ERROR_INVALID_REGISTRATION;
1857 rmp->_vl_msg_id = ntohs(VL_API_CREATE_VLAN_SUBIF_REPLY);
1869 u32 sw_if_index = ~0;
1877 u64 sup_and_sub_key;
1887 rv = VNET_API_ERROR_BOND_SLAVE_NOT_ALLOWED;
1892 sub_id = ntohl(mp->
sub_id);
1894 sup_and_sub_key = ((
u64)(sw_if_index) << 32) | (
u64) sub_id;
1899 clib_warning (
"sup sw_if_index %d, sub id %d already exists\n",
1900 sw_if_index, sub_id);
1901 rv = VNET_API_ERROR_SUBIF_ALREADY_EXISTS;
1906 *kp = sup_and_sub_key;
1908 memset (&
template, 0,
sizeof (
template));
1910 template.sup_sw_if_index = sw_if_index;
1911 template.sub.id = sub_id;
1912 template.sub.eth.flags.no_tags = mp->
no_tags;
1913 template.sub.eth.flags.one_tag = mp->
one_tag;
1914 template.sub.eth.flags.two_tags = mp->
two_tags;
1915 template.sub.eth.flags.dot1ad = mp->
dot1ad;
1916 template.sub.eth.flags.exact_match = mp->
exact_match;
1917 template.sub.eth.flags.default_sub = mp->
default_sub;
1926 rv = VNET_API_ERROR_SUBIF_CREATE_FAILED;
1949 u32 tunnel_sw_if_index = ~0;
1959 &tunnel_sw_if_index,
1977 u32 tunnel_sw_if_index;
1985 &tunnel_sw_if_index,
1991 REPLY_MACRO2(VL_API_MPLS_ETHERNET_ADD_DEL_TUNNEL_REPLY,
2010 u32 inner_fib_index, outer_fib_index;
2016 u8 * dst_mac_address;
2020 u32 tunnel_sw_if_index;
2024 return VNET_API_ERROR_NO_SUCH_FIB;
2026 outer_fib_index = p[0];
2031 return VNET_API_ERROR_NO_SUCH_INNER_FIB;
2033 inner_fib_index = p[0];
2035 if (inner_fib_index == outer_fib_index)
2036 return VNET_API_ERROR_INVALID_VALUE;
2039 (im, outer_fib_index,
2044 tx_sw_if_index = adj->rewrite_header.sw_if_index;
2059 vpe_resolver_process_node.index,
2063 (vm, vpe_resolver_process_node.index,
2074 return VNET_API_ERROR_IN_PROGRESS;
2079 return VNET_API_ERROR_NEXT_HOP_NOT_IN_FIB;
2083 (&adj->rewrite_header, sizeof (adj->rewrite_data));
2090 tx_sw_if_index, &tunnel_sw_if_index, mp->
l2_only, mp->
is_add);
2106 REPLY_MACRO(VL_API_MPLS_ETHERNET_ADD_DEL_TUNNEL_2_REPLY);
2115 static u32 * labels;
2120 for (i = 0; i < mp->
nlabels; i++)
2125 ntohl(mp->
vrf_id), labels,
2158 u32 fib_index,
int is_del);
2166 rv = VNET_API_ERROR_NO_SUCH_FIB;
2174 fib_index, mp->
is_add == 0);
2197 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
2213 REPLY_MACRO(VL_API_PROXY_ARP_INTFC_ENABLE_DISABLE_REPLY);
2243 ethernet_arp_ip4_over_ethernet_address_t
a;
2249 rv = VNET_API_ERROR_NO_SUCH_FIB;
2270 rv = VNET_API_ERROR_ADDRESS_MATCHES_INTERFACE_ADDRESS;
2296 vpe_main_t *rm = &vpe_main;
2304 u32 adj_index, sw_if_index;
2311 increment_missing_api_client_counter (rm->vlib_main);
2329 if (adj_index == ~0) {
2336 && adj->rewrite_header.sw_if_index == sw_if_index) {
2340 && adj->rewrite_header.sw_if_index == sw_if_index) {
2398 int i, j, n_counters;
2415 for (j = 0; j < n_counters; j++)
2417 for (i = 0; i <
vec_len(my_vnet_mains); i++)
2430 for (j = 0; j < n_counters; j++)
2432 for (i = 0; i <
vec_len(my_vnet_mains); i++)
2443 REPLY_MACRO(VL_API_SW_INTERFACE_CLEAR_STATS_REPLY);
2449 u8 * interface_name,
2458 memset (mp, 0,
sizeof (*mp));
2459 mp->_vl_msg_id = ntohs(VL_API_SW_INTERFACE_DETAILS);
2500 u32 vtr_push_dot1q = 0, vtr_tag1 = 0, vtr_tag2 = 0;
2503 &vtr_op, &vtr_push_dot1q, &vtr_tag1, &vtr_tag2) != 0) {
2506 clib_warning(
"cannot get vlan tag rewrite for sw_if_index %d",
2509 mp->
vtr_op = ntohl(vtr_op);
2529 memset (mp, 0,
sizeof (*mp));
2530 mp->_vl_msg_id = ntohs(VL_API_SW_INTERFACE_SET_FLAGS);
2543 __attribute__((unused));
2552 memset (mp, 0,
sizeof (*mp));
2553 mp->_vl_msg_id = ntohs(VL_API_SW_INTERFACE_SET_FLAGS);
2568 u8 * filter_string = 0, * name_string = 0;
2570 char * strcasestr (
char *,
char *);
2584 name_string = format (name_string,
"%U%c",
2585 format_vnet_sw_interface_name,
2586 am->vnet_main, swif, 0);
2588 if (mp->name_filter_valid == 0 ||
2589 strcasestr((char *) name_string, (char *) filter_string)) {
2591 send_sw_interface_details (am, q, swif, name_string, mp->context);
2592 send_sw_interface_flags (am, q, swif);
2594 _vec_len (name_string) = 0;
2610 q = vl_api_client_index_to_input_queue (reg->client_index);
2612 mp = vl_msg_api_alloc (sizeof (*mp));
2613 mp->_vl_msg_id = ntohs (VL_API_OAM_EVENT);
2614 clib_memcpy (mp->dst_address, &t->dst_address, sizeof (mp->dst_address));
2615 mp->state = t->state;
2616 vl_msg_api_send_shmem (q, (u8 *)&mp);
2655 rmp->_vl_msg_id = ntohs(VL_API_VNET_SUMMARY_STATS_REPLY);
2659 memset (total_pkts, 0,
sizeof (total_pkts));
2660 memset (total_bytes, 0,
sizeof (total_bytes));
2669 total_pkts[which] += v.
packets;
2670 total_bytes[which] += v.
bytes;
2688 u32 address_length : 6;
2698 static ip4_route_t * routes;
2699 static u32 * sw_if_indices_to_shut;
2705 int rv = VNET_API_ERROR_NO_SUCH_FIB;
2713 if (fib->
table_id != target_fib_id)
2733 u32 sw_if_index = si->sw_if_index;
2735 if (sw_if_index < vec_len (im4->fib_index_by_sw_if_index)
2736 && (im4->fib_index_by_sw_if_index[si->sw_if_index] ==
2738 vec_add1 (sw_if_indices_to_shut, si->sw_if_index);
2741 for (i = 0; i <
vec_len (sw_if_indices_to_shut); i++) {
2742 sw_if_index = sw_if_indices_to_shut[
i];
2757 x.address_length =
i;
2761 x.address.data_u32 = p->
key;
2769 memset (&a, 0,
sizeof (a));
2822 static u32 * sw_if_indices_to_shut;
2827 int rv = VNET_API_ERROR_NO_SUCH_FIB;
2830 clib_bihash_24_8_t * h = &im6->ip6_lookup_table;
2837 if (fib->
table_id != target_fib_id)
2845 if (im6->fib_index_by_sw_if_index[si->sw_if_index] ==
2847 vec_add1 (sw_if_indices_to_shut, si->sw_if_index);
2850 for (i = 0; i <
vec_len (sw_if_indices_to_shut); i++) {
2851 sw_if_index = sw_if_indices_to_shut[
i];
2869 memset (&a, 0,
sizeof (a));
2898 rv = ip4_reset_fib_t_handler (mp);
2914 (
int) (mp->
is_add == 0));
2930 (
int) (mp->
is_add == 0));
2946 (
int) (mp->
is_add == 0));
2964 (
int) (mp->
is_add == 0));
2966 rv = VNET_API_ERROR_UNIMPLEMENTED;
3012 u8 is_ipv6,
u8 * host_address,
u8 * router_address,
u8 * host_mac)
3031 mp->_vl_msg_id = ntohs (VL_API_DHCP_COMPL_EVENT);
3061 u8 is_no, surpress, managed, other, ll_option, send_unicast, cease, default_router;
3063 is_no = mp->
is_no == 1;
3066 other = mp->
other == 1;
3069 cease = mp->
cease == 1;
3075 surpress, managed, other,
3076 ll_option, send_unicast, cease,
3077 default_router, ntohl (mp->
lifetime),
3084 REPLY_MACRO(VL_API_SW_INTERFACE_IP6ND_RA_CONFIG_REPLY);
3093 u8 is_no, use_default, no_advertise, off_link, no_autoconfig, no_onlink;
3097 is_no = mp->
is_no == 1;
3107 no_advertise, off_link, no_autoconfig, no_onlink,
3111 REPLY_MACRO(VL_API_SW_INTERFACE_IP6ND_RA_PREFIX_REPLY);
3132 rv = VNET_API_ERROR_UNSPECIFIED;
3139 REPLY_MACRO(VL_API_SW_INTERFACE_IP6_ENABLE_DISABLE_REPLY);
3161 rv = VNET_API_ERROR_UNSPECIFIED;
3168 REPLY_MACRO(VL_API_SW_INTERFACE_IP6_SET_LINK_LOCAL_ADDRESS_REPLY);
3174 int rv = VNET_API_ERROR_UNIMPLEMENTED;
3186 u32 flow_hash_config = 0;
3188 table_id = ntohl(mp->
vrf_id);
3190 #define _(a,b) if (mp->a) flow_hash_config |= b; 3216 u32 sw_if_index, unnumbered_sw_if_index;
3227 unnumbered_sw_if_index)) {
3228 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
3235 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX_2;
3250 REPLY_MACRO(VL_API_SW_INTERFACE_SET_UNNUMBERED_REPLY);
3289 rmp->
vpe_pid = ntohl (getpid());
3295 u8 **shmem_vecp = (
u8 **)arg;
3301 shmem_vec = *shmem_vecp;
3310 clib_memcpy (shmem_vec + offset, buffer, buffer_bytes);
3315 *shmem_vecp = shmem_vec;
3335 rp->_vl_msg_id = ntohs(VL_API_CLI_REPLY);
3372 rv = VNET_API_ERROR_UNSPECIFIED;
3399 memset (a, 0,
sizeof (*a));
3423 for (i = 0; i < mp->
n_tags; i++) {
3451 memset (a, 0,
sizeof (*a));
3457 rv = VNET_API_ERROR_NO_SUCH_NODE2;
3463 rv = VNET_API_ERROR_NO_SUCH_NODE2;
3470 deser_tun_names += 1;
3473 int tun_name_len = 0;
3475 for (i=0; i < num_tunnels; i++)
3477 tun_name_len= *deser_tun_names;
3478 deser_tun_names += 1;
3480 memcpy(tun_name, deser_tun_names, tun_name_len);
3482 deser_tun_names += tun_name_len;
3504 memset (a, 0,
sizeof (*a));
3525 clib_warning (
"multicast replication without DPDK not implemented");
3526 rv = VNET_API_ERROR_UNIMPLEMENTED;
3531 REPLY_MACRO(VL_API_SR_MULTICAST_MAP_ADD_DEL_REPLY);
3535 #define foreach_classify_add_del_table_field \ 3540 _(match_n_vectors) \ 3541 _(next_table_index) \ 3556 #define _(a) a = ntohl(mp->a); 3563 rv = VNET_API_ERROR_NO_SUCH_TABLE;
3568 (cm, mp->
mask, nbuckets, memory_size,
3569 skip_n_vectors, match_n_vectors,
3570 next_table_index, miss_next_index,
3571 &table_index, mp->
is_add);
3576 if (rv == 0 && mp->
is_add) {
3577 t = pool_elt_at_index (cm->tables, table_index);
3578 rmp->skip_n_vectors = ntohl(t->skip_n_vectors);
3579 rmp->match_n_vectors = ntohl(t->match_n_vectors);
3580 rmp->new_table_index = ntohl(table_index);
3582 rmp->skip_n_vectors = ~0;
3583 rmp->match_n_vectors = ~0;
3584 rmp->new_table_index = ~0;
3595 u32 table_index, hit_next_index, opaque_index;
3601 advance = ntohl (mp->
advance);
3604 (cm, table_index, mp->
match, hit_next_index, opaque_index,
3607 REPLY_MACRO(VL_API_CLASSIFY_ADD_DEL_SESSION_REPLY);
3616 u32 table_index, sw_if_index;
3630 REPLY_MACRO(VL_API_CLASSIFY_SET_INTERFACE_IP_TABLE_REPLY);
3638 u32 sw_if_index, ip4_table_index, ip6_table_index, other_table_index;
3649 ip6_table_index, other_table_index);
3652 if (ip4_table_index != ~0 || ip6_table_index != ~0
3653 || other_table_index != ~0)
3663 REPLY_MACRO(VL_API_CLASSIFY_SET_INTERFACE_L2_TABLES_REPLY);
3696 REPLY_MACRO(VL_API_L2_INTERFACE_EFP_FILTER_REPLY);
3710 vtr_op = ntohl(mp->
vtr_op);
3726 rv = VNET_API_ERROR_INVALID_VALUE;
3727 goto bad_sw_if_index;
3736 REPLY_MACRO(VL_API_L2_INTERFACE_VLAN_TAG_REWRITE_REPLY);
3745 u32 sw_if_index = (
u32)~0;
3814 static void send_sw_interface_vhost_user_details (
vpe_api_main_t * am,
3822 memset (mp, 0,
sizeof (*mp));
3823 mp->_vl_msg_id = ntohs(VL_API_SW_INTERFACE_VHOST_USER_DETAILS);
3863 send_sw_interface_vhost_user_details (am, q, vuid, mp->
context);
3881 if_name =
format(if_name,
"%U",
3885 memset (mp, 0,
sizeof (*mp));
3886 mp->_vl_msg_id = ntohs(VL_API_SW_IF_L2TPV3_TUNNEL_DETAILS);
3913 memset (mp, 0,
sizeof (*mp));
3914 mp->_vl_msg_id = ntohs(VL_API_IP_ADDRESS_DETAILS);
3920 *tp = ntohl(*(
u32*)ip);
3940 u32 sw_if_index = ~0;
3941 int rv __attribute__ ((unused)) = 0;
3980 memset (mp, 0,
sizeof (*mp));
3981 mp->_vl_msg_id = ntohs(VL_API_IP_DETAILS);
4004 send_sw_if_l2tpv3_tunnel_details (am, q, session, lm, mp->context);
4016 memset (mp, 0,
sizeof (*mp));
4017 mp->_vl_msg_id = ntohs(VL_API_SW_INTERFACE_TAP_DETAILS);
4060 u32 sw_if_index = ~0;
4069 _vec_len (sorted_sis) = 0;
4098 memset (mp, 0,
sizeof (*mp));
4099 mp->_vl_msg_id = ntohs(VL_API_L2_FIB_TABLE_ENTRY);
4168 strncpy ((
char *) rmp->
build_directory, vpe_api_get_build_directory(),
4170 strncpy ((
char *) rmp->
version, vpe_api_get_version(),
4172 strncpy ((
char *) rmp->
build_date, vpe_api_get_build_date(),
4184 u32 node_index = ~0;
4189 rv = VNET_API_ERROR_NO_SUCH_NODE;
4191 node_index = n->
index;
4206 u32 next_index = ~0;
4211 rv = VNET_API_ERROR_NO_SUCH_NODE;
4218 rv = VNET_API_ERROR_NO_SUCH_NODE2;
4234 u32 sw_if_index = (
u32)~0;
4238 rv = VNET_API_ERROR_UNIMPLEMENTED;
4274 REPLY_MACRO (VL_API_L2TPV3_SET_TUNNEL_COOKIES_REPLY);
4291 REPLY_MACRO (VL_API_L2TPV3_INTERFACE_ENABLE_DISABLE_REPLY);
4302 rv = VNET_API_ERROR_INVALID_VALUE;
4318 u32 encap_fib_index;
4321 u32 sw_if_index = ~0;
4325 rv = VNET_API_ERROR_NO_SUCH_FIB;
4328 encap_fib_index = p[0];
4333 rv = VNET_API_ERROR_SAME_SRC_DST;
4336 memset (a, 0,
sizeof (*a));
4371 memset (rmp, 0,
sizeof (*rmp));
4372 rmp->_vl_msg_id = ntohs(VL_API_VXLAN_TUNNEL_DETAILS);
4382 rmp->
vni = htonl(t->
vni);
4406 if (~0 == sw_if_index) {
4409 send_vxlan_tunnel_details(t, q, mp->context);
4430 u32 sw_if_index = ~0;
4434 rv = VNET_API_ERROR_NO_SUCH_FIB;
4437 outer_table_id = p[0];
4441 rv = VNET_API_ERROR_SAME_SRC_DST;
4445 memset (a, 0,
sizeof (*a));
4470 memset (rmp, 0,
sizeof (*rmp));
4471 rmp->_vl_msg_id = ntohs(VL_API_GRE_TUNNEL_DETAILS);
4496 if (~0 == sw_if_index) {
4499 send_gre_tunnel_details(t, q, mp->context);
4541 u32 encap_fib_index, decap_fib_index;
4545 u32 sw_if_index = ~0;
4550 rv = VNET_API_ERROR_NO_SUCH_FIB;
4553 encap_fib_index = p[0];
4558 if (protocol == VXLAN_GPE_INPUT_NEXT_IP4_INPUT) {
4561 rv = VNET_API_ERROR_NO_SUCH_INNER_FIB;
4564 decap_fib_index = p[0];
4569 memset (a, 0,
sizeof (*a));
4597 memset(a, 0,
sizeof(a[0]));
4601 a->
name = locator_name;
4610 REPLY_MACRO(VL_API_LISP_ADD_DEL_LOCATOR_SET_REPLY);
4624 memset(&locator, 0,
sizeof(locator));
4625 memset(a, 0,
sizeof(a[0]));
4635 a->
name = locator_name;
4655 ip_prefix_t *prefp =
NULL;
4656 ip_address_t *ip_eid =
NULL;
4659 u32 locator_set_index = ~0, map_index = ~0;
4681 rv = VNET_API_ERROR_INVALID_VALUE;
4684 locator_set_index = p[0];
4703 ip_address_t *slocator,
4704 ip_address_t *dlocator,
4707 ip_address_t *ip_eid =
NULL;
4708 ip_prefix_t *prefp =
NULL;
4747 ip_address_t slocator, dlocator;
4753 memset (&a, 0,
sizeof(a));
4761 REPLY_MACRO(VL_API_LISP_GPE_ADD_DEL_FWD_ENTRY_REPLY);
4770 ip_address_t *ip_addr =
NULL;
4788 REPLY_MACRO(VL_API_LISP_ADD_DEL_MAP_RESOLVER_REPLY);
4802 REPLY_MACRO(VL_API_LISP_GPE_ENABLE_DISABLE_REPLY);
4840 send_lisp_locator_set_details_set_address
4844 ip_prefix_t *ip_addr;
4861 ip_address_t rloc, * rlocs = 0;
4894 for (i = 0; i < mp->
rloc_num; i++) {
4895 rloc_t * r = &((rloc_t *) mp->
rlocs)[
i];
4927 memset (rmp, 0,
sizeof (*rmp));
4928 rmp->_vl_msg_id = ntohs(VL_API_LISP_LOCATOR_SET_DETAILS);
4936 str =
format(0,
"remote-%d", index);
4939 send_lisp_locator_set_details_set_address(rmp, &loc->
address);
4967 send_lisp_locator_set_details(lcm, lsit, q, mp->context, index++);
4980 ip_prefix_t *ip_prefix =
NULL;
4997 memset (rmp, 0,
sizeof (*rmp));
4998 rmp->_vl_msg_id = ntohs(VL_API_LISP_LOCAL_EID_TABLE_DETAILS);
5047 send_lisp_local_eid_table_details(mapit, q, mp->context);
5060 memset (rmp, 0,
sizeof (*rmp));
5061 rmp->_vl_msg_id = ntohs(VL_API_LISP_GPE_TUNNEL_DETAILS);
5077 rmp->
iid = htonl(tunnel->
vni);
5102 send_lisp_gpe_tunnel_details(tunnel, q, mp->context);
5114 memset (rmp, 0,
sizeof (*rmp));
5115 rmp->_vl_msg_id = ntohs(VL_API_LISP_MAP_RESOLVER_DETAILS);
5142 ip_address_t *ip =
NULL;
5162 memset (rmp, 0,
sizeof (*rmp));
5163 rmp->_vl_msg_id = ntohs(VL_API_LISP_ENABLE_DISABLE_STATUS_DETAILS);
5199 REPLY_MACRO(VL_API_INTERFACE_NAME_RENUMBER_REPLY);
5203 u32 sw_if_index,
u32 address)
5208 static f64 arp_event_last_time;
5215 if (memcmp (&event->
new_mac, new_mac, sizeof (event->
new_mac))) {
5221 ((address == event->
address) &&
5222 ((now - arp_event_last_time) < 10.0))))
5226 arp_event_last_time = now;
5228 if (address) event->
address = address;
5255 memset (event, 0,
sizeof (*event));
5257 event->_vl_msg_id = ntohs(VL_API_IP4_ARP_EVENT);
5267 vpe_resolver_process_node.index,
5274 vpe_resolver_process_node.index,
5286 u32 sw_if_index, ip4_table_index, ip6_table_index, l2_table_index;
5296 ip6_table_index, l2_table_index,
5301 REPLY_MACRO(VL_API_INPUT_ACL_SET_INTERFACE_REPLY);
5318 rv = VNET_API_ERROR_UNIMPLEMENTED;
5331 u32 sw_if_index __attribute__((unused));
5332 u32 spd_id __attribute__((unused));
5335 spd_id = ntohl(mp->
spd_id);
5342 rv = VNET_API_ERROR_UNIMPLEMENTED;
5347 REPLY_MACRO(VL_API_IPSEC_INTERFACE_ADD_DEL_SPD_REPLY);
5360 memset(&p, 0,
sizeof(p));
5378 if (mp->
policy == IPSEC_POLICY_ACTION_RESOLVE) {
5380 rv = VNET_API_ERROR_UNIMPLEMENTED;
5395 rv = VNET_API_ERROR_UNIMPLEMENTED;
5400 REPLY_MACRO(VL_API_IPSEC_SPD_ADD_DEL_ENTRY_REPLY);
5412 memset(&sa, 0,
sizeof(sa));
5419 rv = VNET_API_ERROR_UNIMPLEMENTED;
5428 rv = VNET_API_ERROR_UNIMPLEMENTED;
5439 rv = VNET_API_ERROR_UNIMPLEMENTED;
5453 rv = VNET_API_ERROR_UNIMPLEMENTED;
5458 REPLY_MACRO(VL_API_IPSEC_SAD_ADD_DEL_ENTRY_REPLY);
5475 rv = VNET_API_ERROR_UNSPECIFIED;
5477 rv = VNET_API_ERROR_UNIMPLEMENTED;
5500 rv = VNET_API_ERROR_UNSPECIFIED;
5502 rv = VNET_API_ERROR_UNIMPLEMENTED;
5525 rv = VNET_API_ERROR_UNSPECIFIED;
5527 rv = VNET_API_ERROR_UNIMPLEMENTED;
5549 rv = VNET_API_ERROR_UNSPECIFIED;
5551 rv = VNET_API_ERROR_UNIMPLEMENTED;
5570 rv = VNET_API_ERROR_UNSPECIFIED;
5572 rv = VNET_API_ERROR_UNIMPLEMENTED;
5593 rmp->
index = ntohl(index);
5640 rmp = vl_msg_api_alloc (sizeof (*rmp));
5641 rmp->_vl_msg_id = ntohs(VL_API_MAP_DOMAIN_DETAILS);
5642 rmp->domain_index = htonl(d - mm->domains);
5643 rmp->ea_bits_len = d->ea_bits_len;
5644 rmp->psid_offset = d->psid_offset;
5645 rmp->psid_length = d->psid_length;
5646 clib_memcpy(rmp->ip4_prefix, &d->ip4_prefix, sizeof(rmp->ip4_prefix));
5647 rmp->ip4_prefix_len = d->ip4_prefix_len;
5648 clib_memcpy(rmp->ip6_prefix, &d->ip6_prefix, sizeof(rmp->ip6_prefix));
5649 rmp->ip6_prefix_len = d->ip6_prefix_len;
5650 clib_memcpy(rmp->ip6_src, &d->ip6_src, sizeof(rmp->ip6_src));
5651 rmp->ip6_src_len = d->ip6_src_len;
5652 rmp->mtu = htons(d->mtu);
5653 rmp->is_translation = (d->flags & MAP_DOMAIN_TRANSLATION);
5654 rmp->context = mp->context;
5656 vl_msg_api_send_shmem (q, (u8 *)&rmp);
5676 if (!d || !d->
rules) {
5691 memset(rmp, 0,
sizeof(*rmp));
5692 rmp->_vl_msg_id = ntohs(VL_API_MAP_RULE_DETAILS);
5693 rmp->
psid = htons(i);
5718 rmp->_vl_msg_id = ntohs(VL_API_MAP_SUMMARY_STATS_REPLY);
5722 memset (total_pkts, 0,
sizeof (total_pkts));
5723 memset (total_bytes, 0,
sizeof (total_bytes));
5731 total_pkts[which] += v.
packets;
5732 total_bytes[which] += v.
bytes;
5767 rv = VNET_API_ERROR_UNIMPLEMENTED;
5789 REPLY_MACRO(VL_API_COP_INTERFACE_ENABLE_DISABLE_REPLY);
5812 REPLY_MACRO(VL_API_COP_WHITELIST_ENABLE_DISABLE_REPLY);
5953 memset (&cfg, 0,
sizeof (cfg));
5965 rv = VNET_API_ERROR_UNSPECIFIED;
5970 #define BOUNCE_HANDLER(nn) \ 5971 static void vl_api_##nn##_t_handler ( \ 5972 vl_api_##nn##_t *mp) \ 5974 vpe_client_registration_t *reg; \ 5975 vpe_api_main_t * vam = &vpe_api_main; \ 5976 unix_shared_memory_queue_t * q; \ 5979 pool_foreach(reg, vam->nn##_registrations, \ 5981 q = vl_api_client_index_to_input_queue (reg->client_index); \ 5988 if (q->cursize == q->maxsize) { \ 5989 clib_warning ("ERROR: receiver queue full, drop msg"); \ 5990 vl_msg_api_free (mp); \ 5993 vl_msg_api_send_shmem (q, (u8 *)&mp); \ 5997 vl_msg_api_free (mp); \ 6014 vl_msg_api_set_handlers(VL_API_##N, #n, \ 6015 vl_api_##n##_t_handler, \ 6017 vl_api_##n##_t_endian, \ 6018 vl_api_##n##_t_print, \ 6019 sizeof(vl_api_##n##_t), 1); 6028 "sr_tunnel_add_del",
6031 vl_api_sr_tunnel_add_del_t_endian,
6041 "sr_policy_add_del",
6044 vl_api_sr_policy_add_del_t_endian,
6053 += 5 *
sizeof (u32x4);
6055 += 5 *
sizeof (u32x4);
6057 += 16 *
sizeof (
u32);
6062 am->
is_mp_safe [VL_API_IP_ADD_DEL_ROUTE] = 1;
6078 am->from_netconf_server_registration_hash =
hash_create (0,
sizeof (
uword));
6080 am->from_netconf_client_registration_hash =
hash_create (0,
sizeof (
uword));
6099 struct passwd _pw, *pw;
6100 struct group _grp, *grp;
6105 if (
unformat (input,
"prefix %s", &chroot_path))
6110 else if (
unformat (input,
"uid %d", &uid))
6112 else if (
unformat (input,
"gid %d", &gid))
6114 else if (
unformat (input,
"uid %s", &s))
6118 rv = getpwnam_r(s, &_pw, buf,
sizeof(buf), &pw);
6123 "cannot fetch username %s", s);
6136 else if (
unformat (input,
"gid %s", &s))
6140 rv = getgrnam_r(s, &_grp, buf,
sizeof(buf), &grp);
6145 "cannot fetch group %s", s);
6171 #undef vl_api_version 6172 #define vl_api_version(n,v) static u32 vpe_api_version = v; 6173 #include <api/vpe.api.h> 6174 #undef vl_api_version 6178 if (clib_host_to_net_u32(mp->
api_versions[0]) != vpe_api_version) {
6179 clib_warning (
"vpe API mismatch: 0x%08x instead of 0x%08x",
6191 s =
format (s,
"pid %d: %U", event->
pid,
6211 vlib_cli_output (vm,
"%U", format_arp_event, event);
6218 .path =
"show arp event registrations",
6220 .short_help =
"Show arp event registrations",
struct vnet_sub_interface_t::@91 eth
static void vl_api_lisp_add_del_remote_mapping_t_handler(vl_api_lisp_add_del_remote_mapping_t *mp)
static void vl_api_sw_interface_set_flags_t_handler(vl_api_sw_interface_set_flags_t *mp)
static void vl_api_bridge_flags_t_handler(vl_api_bridge_flags_t *mp)
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
static void vl_api_af_packet_delete_t_handler(vl_api_af_packet_delete_t *mp)
#define foreach_ip_interface_address(lm, a, sw_if_index, loop, body)
Reply for IPsec: Add/delete Security Association Database entry.
IPv6 set link local address on interface request.
static void vl_api_map_rule_dump_t_handler(vl_api_map_rule_dump_t *mp)
#define VNET_SW_INTERFACE_FLAG_UNNUMBERED
static void vl_api_proxy_arp_add_del_t_handler(vl_api_proxy_arp_add_del_t *mp)
DHCP Proxy config response.
ip4_fib_t * find_ip4_fib_by_table_index_or_id(ip4_main_t *im, u32 table_index_or_id, u32 flags)
Get or create an IPv4 fib.
DHCP Proxy set / unset vss request.
Proxy ARP add / del request.
static void vl_api_lisp_enable_disable_t_handler(vl_api_lisp_enable_disable_t *mp)
#define VALIDATE_SW_IF_INDEX(mp)
u32 bd_set_flags(vlib_main_t *vm, u32 bd_index, u32 flags, u32 enable)
#define vec_foreach_index(var, v)
Iterate over vector indices.
static void send_lisp_gpe_tunnel_details(lisp_gpe_tunnel_t *tunnel, unix_shared_memory_queue_t *q, u32 context)
static void vl_api_lisp_gpe_add_del_iface_t_handler(vl_api_lisp_gpe_add_del_iface_t *mp)
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)
L2 interface vlan tag rewrite response.
LISP local eid table status.
#define foreach_registration_hash
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)
#define hash_set(h, key, value)
l2_input_config_t * configs
static void vl_api_mpls_add_del_decap_t_handler(vl_api_mpls_add_del_decap_t *mp)
Set bridge flags response.
int vnet_mpls_gre_delete_fib_tunnels(u32 fib_id)
DHCP Client config response.
sll srl srl sll sra u16x4 i
static void vl_api_trace_profile_add_t_handler(vl_api_trace_profile_add_t *mp)
static void vl_api_sw_interface_dump_t_handler(vl_api_sw_interface_dump_t *mp)
#define gid_address_type(_a)
void vl_enable_disable_memory_api(vlib_main_t *vm, int yesno)
u32 * config_index_by_sw_if_index
static void svm_pop_heap(void *oldheap)
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)
Add or Delete MAP rule from a domain (Only used for shared IPv4 per subscriber)
int map_delete_domain(u32 map_domain_index)
static int ip6_add_del_route_t_handler(vl_api_ip_add_del_route_t *mp)
ip46_address_t tunnel_src_addr
vpe parser cli string response
static void vl_api_lisp_add_del_map_resolver_t_handler(vl_api_lisp_add_del_map_resolver_t *mp)
always_inline uword vlib_process_get_events(vlib_main_t *vm, uword **data_vector)
add or delete lisp gpe maptunel
static void send_vxlan_tunnel_details(vxlan_tunnel_t *t, unix_shared_memory_queue_t *q, u32 context)
static void vl_api_set_arp_neighbor_limit_t_handler(vl_api_set_arp_neighbor_limit_t *mp)
static void vl_api_create_loopback_t_handler(vl_api_create_loopback_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)
int dpdk_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)
u8 vnet_lisp_gpe_enable_disable_status(void)
void vl_set_memory_gid(int gid)
int dhcpv6_proxy_set_server(ip6_address_t *addr, ip6_address_t *src_address, u32 fib_id, int insert_vss, int is_del)
void ip4_add_del_route_next_hop(ip4_main_t *im, u32 flags, ip4_address_t *dst_address, u32 dst_address_length, ip4_address_t *next_hop, u32 next_hop_sw_if_index, u32 next_hop_weight, u32 adj_index, u32 explicit_fib_index)
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(BVT(clib_bihash)*h, BVT(clib_bihash_value)*v)
clib_error_t * ikev2_add_del_profile(vlib_main_t *vm, u8 *name, int is_add)
static void vl_api_sw_interface_set_l2_bridge_t_handler(vl_api_sw_interface_set_l2_bridge_t *mp)
static void send_lisp_enable_disable_details(unix_shared_memory_queue_t *q, u32 context)
always_inline void * vnet_rewrite_get_data_internal(vnet_rewrite_header_t *rw, int max_size)
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
Reply for IKEv2: Set IKEv2 profile authentication method.
int af_packet_create_if(vlib_main_t *vm, u8 *host_if_name, u8 *hw_addr_set)
Vhost-user interface details structure (fix this)
u8 tunnel_dst_address[16]
ethernet_main_t * ethernet_get_main(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)
ip6_address_t * multicast_address
vnet_interface_main_t interface_main
static void vl_api_vxlan_add_del_tunnel_t_handler(vl_api_vxlan_add_del_tunnel_t *mp)
Control ping from client to api server request.
ip_lookup_next_t lookup_next_index
static void vl_api_sw_interface_vhost_user_details_t_handler(vl_api_sw_interface_vhost_user_details_t *mp)
LISP map resolver status.
static void vl_api_mpls_ethernet_add_del_tunnel_2_t_handler(vl_api_mpls_ethernet_add_del_tunnel_2_t *mp)
int vnet_lisp_gpe_add_del_fwd_entry(vnet_lisp_gpe_add_del_fwd_entry_args_t *a, u32 *hw_if_indexp)
static void vl_api_control_ping_t_handler(vl_api_control_ping_t *mp)
IPsec: Update Security Association keys.
u32 resulting_feature_bitmap
static void dhcpv4_proxy_config_2(vl_api_dhcp_proxy_config_2_t *mp)
Reply for gpe_iface add/del.
static void vl_api_lisp_enable_disable_status_dump_t_handler(vl_api_lisp_enable_disable_status_dump_t *mp)
static void vl_api_classify_set_interface_l2_tables_t_handler(vl_api_classify_set_interface_l2_tables_t *mp)
L2TP tunnel set cookies response.
int dpdk_vhost_user_delete_if(vnet_main_t *vnm, vlib_main_t *vm, u32 sw_if_index)
clib_error_t * vnet_lisp_gpe_enable_disable(vnet_lisp_gpe_enable_disable_args_t *a)
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)
always_inline u32 ip4_fib_lookup(ip4_main_t *im, u32 sw_if_index, ip4_address_t *dst)
Request for a single block of summary stats.
static void send_sw_interface_flags(vpe_api_main_t *am, unix_shared_memory_queue_t *q, vnet_sw_interface_t *swif)
Set max allowed ARP or ip6 neighbor entries request.
static void vl_api_sw_interface_set_vpath_t_handler(vl_api_sw_interface_set_vpath_t *mp)
static vlib_node_registration_t vpe_resolver_process_node
(constructor) VLIB_REGISTER_NODE (vpe_resolver_process_node)
lisp_gpe_tunnel_t * tunnels
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)
L2 bridge domain sw interface operational state response.
ip6_address_t our_address
u64 map_error_counter_get(u32 node_index, map_error_t map_error)
static void vl_api_gre_add_del_tunnel_t_handler(vl_api_gre_add_del_tunnel_t *mp)
int ip6_neighbor_ra_config(vlib_main_t *vm, u32 sw_if_index, u8 surpress, 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)
static void vl_api_l2_fib_table_entry_t_handler(vl_api_l2_fib_table_entry_t *mp)
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)
clib_error_t * ip4_set_arp_limit(u32 arp_limit)
Add / del gre tunnel request.
static void vl_api_af_packet_create_t_handler(vl_api_af_packet_create_t *mp)
ip_config_main_t rx_config_mains[VNET_N_CAST]
ipsec_integ_alg_t integ_alg
u32 l2fib_del_entry(u64 mac, u32 bd_index)
#define ip_prefix_len(_a)
static int arp_change_data_callback(u32 pool_index, u8 *new_mac, u32 sw_if_index, u32 address)
vnet_main_t ** vnet_mains
IPsec: Add/delete Security Policy Database entry.
Classify add / del session request.
int ip6_sr_add_del_policy(ip6_sr_add_del_policy_args_t *a)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
static void vl_api_delete_loopback_t_handler(vl_api_delete_loopback_t *mp)
int vnet_interface_name_renumber(u32 sw_if_index, u32 new_show_dev_instance)
static void lisp_gpe_add_del_fwd_entry_set_address(vl_api_lisp_gpe_add_del_fwd_entry_t *mp, ip_address_t *slocator, ip_address_t *dlocator, gid_address_t *eid)
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 *sw_if_index)
static void map_domain_counter_unlock(map_main_t *mm)
unix_shared_memory_queue_t * vl_api_client_index_to_input_queue(u32 index)
static void vl_api_sw_if_l2tpv3_tunnel_dump_t_handler(vl_api_sw_if_l2tpv3_tunnel_dump_t *mp)
struct _vlib_node_registration vlib_node_registration_t
u64 total_security_check[2]
#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.
l2_flood_member_t * members
static void vl_api_lisp_gpe_tunnel_dump_t_handler(vl_api_lisp_local_eid_table_dump_t *mp)
always_inline void vlib_process_signal_event(vlib_main_t *vm, uword node_index, uword type_opaque, uword data)
always_inline uword vlib_process_get_events_with_type(vlib_main_t *vm, uword **data_vector, uword with_type_opaque)
#define hash_set_mem(h, key, value)
static void vl_api_ikev2_profile_add_del_t_handler(vl_api_ikev2_profile_add_del_t *mp)
ip_lookup_main_t lookup_main
static void vl_api_l2tpv3_create_tunnel_t_handler(vl_api_l2tpv3_create_tunnel_t *mp)
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
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)
static void vl_api_vxlan_tunnel_dump_t_handler(vl_api_vxlan_tunnel_dump_t *mp)
vlib_node_registration_t ip4_map_node
(constructor) VLIB_REGISTER_NODE (ip4_map_node)
union sse2_qos_pol_cfg_params_st_::@153 rb
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_sw_interface_set_l2_xconnect_t_handler(vl_api_sw_interface_set_l2_xconnect_t *mp)
Add/Delete classification table request.
vl_api_ip4_arp_event_t * arp_events
unformat_function_t unformat_vnet_sw_interface
Reply for add / del tunnel request.
IPv6 router advertisement config request.
Reply for tap delete request.
static void vl_api_cop_whitelist_enable_disable_t_handler(vl_api_cop_whitelist_enable_disable_t *mp)
void * get_unformat_vnet_sw_interface(void)
L2 bridge domain request operational state details.
#define clib_error_report(e)
Set bridge domain ip to mac entry response.
static void vl_api_mpls_ethernet_add_del_tunnel_t_handler(vl_api_mpls_ethernet_add_del_tunnel_t *mp)
#define VNET_HW_INTERFACE_FLAG_LINK_UP
void ip4_maybe_remap_adjacencies(ip4_main_t *im, u32 table_index_or_table_id, u32 flags)
static void vl_api_bridge_domain_add_del_t_handler(vl_api_bridge_domain_add_del_t *mp)
int vnet_vxlan_gpe_add_del_tunnel(vnet_vxlan_gpe_add_del_tunnel_args_t *a, u32 *sw_if_indexp)
static uword resolver_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
vhost-user interface create request
IPv6 set link local address on interface response.
Reply for locator add/del.
Add/del policer response.
static void vl_api_lisp_gpe_add_del_fwd_entry_t_handler(vl_api_lisp_gpe_add_del_fwd_entry_t *mp)
vlib_cli_command_t show_ip4_arp_events
(constructor) VLIB_CLI_COMMAND (show_ip4_arp_events)
#define ip_prefix_version(_a)
L2 interface ethernet flow point filtering response.
void send_oam_event(oam_target_t *t)
static void vl_api_sw_interface_ip6nd_ra_config_t_handler(vl_api_sw_interface_ip6nd_ra_config_t *mp, vlib_main_t *vm)
trace_cfg_t * api_trace_cfg
ip_address_t * map_resolvers
always_inline vlib_main_t * vlib_get_main(void)
#define VNET_HW_INTERFACE_FLAG_DUPLEX_MASK
int vnet_create_loopback_interface(u32 *sw_if_indexp, u8 *mac_address)
u32 * tunnel_index_by_sw_if_index
#define vec_reset_length(v)
Reset vector length to zero NULL-pointer tolerant.
ip6_address_t client_address
Interface bridge mode response.
always_inline void * ip_interface_address_get_address(ip_lookup_main_t *lm, ip_interface_address_t *a)
int ip6_sr_add_del_multicastmap(ip6_sr_add_del_multicastmap_args_t *a)
IPv6 segment routing tunnel add / del response.
static void vl_api_l2_fib_table_dump_t_handler(vl_api_l2_fib_table_dump_t *mp)
static void vl_api_sw_interface_tap_dump_t_handler(vl_api_sw_interface_tap_dump_t *mp)
OAM add / del target response.
static void vl_api_ipsec_interface_add_del_spd_t_handler(vl_api_ipsec_interface_add_del_spd_t *mp)
static void vl_api_ip_dump_t_handler(vl_api_ip_dump_t *mp)
#define VNET_HW_INTERFACE_FLAG_SPEED_MASK
static void vl_api_map_add_del_rule_t_handler(vl_api_map_add_del_rule_t *mp)
Create host-interface response.
vnet_main_t * vnet_get_main(void)
L2 bridge domain operational state response.
u8 local_address_start[16]
Reply for interface events registration.
Get node index using name request.
static void vl_api_lisp_add_del_local_eid_t_handler(vl_api_lisp_add_del_local_eid_t *mp)
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.
clib_error_t * policer_add_del(vlib_main_t *vm, u8 *name, sse2_qos_pol_cfg_params_st *cfg, u8 is_add)
#define VNET_SW_INTERFACE_FLAG_PROXY_ARP
static void send_ip_details(vpe_api_main_t *am, unix_shared_memory_queue_t *q, u32 sw_if_index, u32 context)
void vlib_clear_combined_counters(vlib_combined_counter_main_t *cm)
Clear interface statistics.
#define pool_foreach(VAR, POOL, BODY)
static void vl_api_vnet_get_summary_stats_t_handler(vl_api_vnet_get_summary_stats_t *mp)
#define VLIB_INIT_FUNCTION(x)
static void vl_api_interface_name_renumber_t_handler(vl_api_interface_name_renumber_t *mp)
DHCP Proxy config 2 add / del request.
static void * svm_push_data_heap(svm_region_t *rp)
Reply for IPsec: Update Security Association keys.
static void vl_api_map_add_domain_t_handler(vl_api_map_add_domain_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 void vl_api_dhcp_client_config_t_handler(vl_api_dhcp_client_config_t *mp)
clib_error_t * ikev2_set_profile_auth(vlib_main_t *vm, u8 *name, u8 auth_method, u8 *auth_data, u8 data_hex_format)
static void vl_api_map_del_domain_t_handler(vl_api_map_del_domain_t *mp)
void vl_api_ip_add_del_route_t_handler(vl_api_ip_add_del_route_t *mp)
static void vl_api_l2tpv3_set_lookup_key_t_handler(vl_api_l2tpv3_set_lookup_key_t *mp)
Reply for the vlan subinterface create request.
static void vl_api_l2_flags_t_handler(vl_api_l2_flags_t *mp)
int dhcpv6_proxy_set_vss(u32 tbl_id, u32 oui, u32 fib_id, int is_del)
int mpls_fib_reset_labels(u32 fib_id)
#define clib_error_return_fatal(e, args...)
ip6_fib_t * find_ip6_fib_by_table_index_or_id(ip6_main_t *im, u32 table_index_or_id, u32 flags)
Get or create an IPv6 fib.
static void set_ip4_flow_hash(vl_api_set_ip_flow_hash_t *mp)
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
int ip6_interface_enabled(vlib_main_t *vm, u32 sw_if_index)
u32 ip4_fib_lookup_with_table(ip4_main_t *im, u32 fib_index, ip4_address_t *dst, u32 disable_default_route)
static void vl_api_sw_interface_set_unnumbered_t_handler(vl_api_sw_interface_set_unnumbered_t *mp)
int ipsec_add_del_policy(vlib_main_t *vm, ipsec_policy_t *policy, int is_add)
always_inline uword pool_elts(void *v)
static void vl_api_dhcp_proxy_config_t_handler(vl_api_dhcp_proxy_config_t *mp)
static void vl_api_get_node_graph_t_handler(vl_api_get_node_graph_t *mp)
Reply for add / del encapsulation request.
Reply for MPLS Ethernet add / delete tunnel request.
#define clib_warning(format, args...)
IPv6 interface enable / disable request.
u32 table_index_or_table_id
void ip_address_copy_addr(void *dst, ip_address_t *src)
clib_error_t * ip6_set_neighbor_limit(u32 neighbor_limit)
void vnet_l2_classify_enable_disable(u32 sw_if_index, int enable_disable)
static void vl_api_lisp_gpe_enable_disable_t_handler(vl_api_lisp_gpe_enable_disable_t *mp)
#define vec_resize(V, N)
Resize a vector (no header, unspecified alignment) Add N elements to end of given vector V...
static clib_error_t * admin_up_down_function(vnet_main_t *vm, u32 hw_if_index, u32 flags)
int vnet_arp_unset_ip4_over_ethernet(vnet_main_t *vnm, u32 sw_if_index, u32 fib_index, void *a_arg)
static void vl_api_l2fib_add_del_t_handler(vl_api_l2fib_add_del_t *mp)
void vnet_lisp_gpe_add_del_iface(vnet_lisp_gpe_add_del_iface_args_t *a, u32 *hw_if_indexp)
IKEv2: Set IKEv2 profile local/remote identification.
u8 * format_ipsec_integ_alg(u8 *s, va_list *args)
Trace profile apply response.
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)
static void add_routes_in_fib(clib_bihash_kv_24_8_t *kvp, void *arg)
int vnet_set_ip4_classify_intfc(vlib_main_t *vm, u32 sw_if_index, u32 table_index)
void ip6_add_del_route(ip6_main_t *im, ip6_add_del_route_args_t *args)
uword * bd_index_by_bd_id
Reply for tap connect request.
#define API_ADMIN_UP_DOWN_EVENT
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)
static void vl_api_l2_interface_efp_filter_t_handler(vl_api_l2_interface_efp_filter_t *mp)
int map_add_del_psid(u32 map_domain_index, u16 psid, ip6_address_t *tep, u8 is_add)
l2tpv3 tunnel interface create response
Dump l2 fib (aka bridge domain) table.
Interface set vpath response.
static void dhcpv6_proxy_config(vl_api_dhcp_proxy_config_t *mp)
u8 local_address_stop[16]
#define BAD_RX_SW_IF_INDEX_LABEL
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)
static void vl_api_is_address_reachable_t_handler(vl_api_is_address_reachable_t *mp)
int vnet_set_ip6_ethernet_neighbor(vlib_main_t *vm, u32 sw_if_index, ip6_address_t *a, u8 *link_layer_address, uword n_bytes_link_layer_address, int is_static)
int vnet_set_ip4_flow_hash(u32 table_id, u32 flow_hash_config)
Reply for gpe enable/disable.
static void vl_api_bridge_domain_details_t_handler(vl_api_bridge_domain_details_t *mp)
void vl_set_memory_root_path(char *root_path)
ip6_address_t dst_address
vl_api_ip_add_del_route_t r
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
#define pool_elt_at_index(p, i)
static void vl_api_ipsec_sad_add_del_entry_t_handler(vl_api_ipsec_sad_add_del_entry_t *mp)
int vnet_l2_classify_set_tables(u32 sw_if_index, u32 ip4_table_index, u32 ip6_table_index, u32 other_table_index)
L2 fib clear table request, clear all mac entries in the l2 fib.
void ip6_maybe_remap_adjacencies(ip6_main_t *im, u32 table_index_or_table_id, u32 flags)
static void vl_api_input_acl_set_interface_t_handler(vl_api_input_acl_set_interface_t *mp)
uword * fib_index_by_table_id
static void vl_api_l2tpv3_set_tunnel_cookies_t_handler(vl_api_l2tpv3_set_tunnel_cookies_t *mp)
Status of lisp-gpe protocol, enable or disable.
#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)
#define API_LINK_STATE_EVENT
static void vl_api_l2tpv3_interface_enable_disable_t_handler(vl_api_l2tpv3_interface_enable_disable_t *mp)
static int arp_change_delete_callback(u32 pool_index, u8 *notused)
static void vl_api_cop_interface_enable_disable_t_handler(vl_api_cop_interface_enable_disable_t *mp)
#define VNET_HW_INTERFACE_FLAG_SPEED_SHIFT
Trace profile add / del response.
int dpdk_vhost_user_dump_ifs(vnet_main_t *vnm, vlib_main_t *vm, vhost_user_intf_details_t **out_vuids)
u32 new_show_dev_instance
Set/unset l2 classification tables for an interface response.
char * vpe_api_get_version(void)
IPsec: Add/delete Security Policy Database.
always_inline uword * vlib_process_wait_for_event(vlib_main_t *vm)
IPv6 segment routing tunnel add / del request.
IPv6 segment routing multicast map to policy add / del request.
int vnet_lisp_add_del_local_mapping(vnet_lisp_add_del_mapping_args_t *a, u32 *map_index_result)
L2 FIB add entry response.
static void send_lisp_map_resolver_details(ip_address_t *ip, unix_shared_memory_queue_t *q, u32 context)
Set/unset l2 classification tables for an interface request.
int vl_api_memclnt_delete_callback(u32 client_index)
static clib_error_t * api_segment_config(vlib_main_t *vm, unformat_input_t *input)
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.
Set bridge domain ip to mac entry request.
int ipsec_add_del_sa(vlib_main_t *vm, ipsec_sa_t *new_sa, int is_add)
static void shmem_cli_output(uword arg, u8 *buffer, uword buffer_bytes)
always_inline u64 l2fib_make_key(u8 *mac_address, u16 bd_index)
vhost-user interface create response
uword * sw_if_index_by_sup_and_sub
always_inline f64 vlib_process_wait_for_event_or_clock(vlib_main_t *vm, f64 dt)
#define VALIDATE_TX_SW_IF_INDEX(mp)
add or delete lisp eid-table
IOAM Trace : Set TRACE profile.
int dpdk_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)
static int mpls_ethernet_add_del_tunnel_2_t_handler(vl_api_mpls_ethernet_add_del_tunnel_2_t *mp)
always_inline f64 vlib_last_vector_length_per_node(vlib_main_t *vm)
static void vlib_get_combined_counter(vlib_combined_counter_main_t *cm, u32 index, vlib_counter_t *result)
IPv6 router advertisement prefix config response.
int cop_whitelist_enable_disable(cop_whitelist_enable_disable_args_t *a)
struct sse2_qos_pol_cfg_params_st_::@153::@154 kbps
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)
static vpe_api_main_t vpe_api_main
static void vl_api_sw_interface_clear_stats_t_handler(vl_api_sw_interface_clear_stats_t *mp)
static void send_lisp_local_eid_table_details(mapping_t *mapit, unix_shared_memory_queue_t *q, u32 context)
vlib_simple_counter_main_t * sw_if_counters
static void vl_api_trace_profile_del_t_handler(vl_api_trace_profile_del_t *mp)
void dhcp_compl_event_callback(u32 client_index, u32 pid, u8 *hostname, u8 is_ipv6, u8 *host_address, u8 *router_address, u8 *host_mac)
clib_error_t * vnet_lisp_enable_disable(u8 is_enabled)
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.
static void vl_api_ikev2_set_local_key_t_handler(vl_api_ikev2_set_local_key_t *mp)
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 ip6_sr_add_del_tunnel(ip6_sr_add_del_tunnel_args_t *a)
Set or delete one or all ip addresses on a specified interface.
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
typedef CLIB_PACKED(struct{ip4_address_t address;u32 address_length:6;u32 index:26;})
Set/unset interface classification table response.
static void vl_api_cli_request_t_handler(vl_api_cli_request_t *mp)
cop: interface enable/disable junk filtration reply
#define foreach_vpe_api_msg
Reply to sw_interface_set_flags.
ip6_to_l2_lookup_t lookup_type
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)
ip46_address_t tunnel_dst_addr
IP Set the next node for a given node response.
uword * fib_index_by_table_id
ip6_address_t * src_address
Get node index using name request.
Reply for IPsec: Add/delete Security Policy Database entry.
L2 fib clear table response.
struct l2fib_entry_key_t::@124::@126 fields
#define VNET_HW_INTERFACE_BOND_INFO_SLAVE
static void vl_api_policer_add_del_t_handler(vl_api_policer_add_del_t *mp)
int vnet_vxlan_add_del_tunnel(vnet_vxlan_add_del_tunnel_args_t *a, u32 *sw_if_indexp)
Delete loopback interface response.
IPsec: Add/delete SPD from interface.
static void vl_api_tap_modify_t_handler(vl_api_tap_modify_t *mp, vlib_main_t *vm)
int ipsec_set_sa_key(vlib_main_t *vm, ipsec_sa_t *sa_update)
#define VLIB_EARLY_CONFIG_FUNCTION(x, n,...)
vl_api_mpls_ethernet_add_del_tunnel_2_t t
static void vl_api_tap_connect_t_handler(vl_api_tap_connect_t *mp, vlib_main_t *vm)
int vnet_lisp_add_del_remote_mapping(gid_address_t *deid, gid_address_t *seid, ip_address_t *rlocs, u8 action, u8 is_add)
Adds/removes/updates static remote mapping.
Set the ip flow hash config for a fib request.
void * vl_msg_api_alloc(int nbytes)
always_inline void * clib_mem_alloc(uword size)
Reply for Proxy ARP interface enable / disable request.
enable or disable LISP feature
Reply for interface events registration.
Reply for lisp_add_del_remote_mapping.
void l2fib_clear_table(uint keep_static)
vhost-user interface delete response
static void vl_api_ip_neighbor_add_del_t_handler(vl_api_ip_neighbor_add_del_t *mp, vlib_main_t *vm)
u8 remote_address_stop[16]
L2 interface patch add / del response.
pending_route_t * pending_routes
static void vl_api_set_ip_flow_hash_t_handler(vl_api_set_ip_flow_hash_t *mp)
int vnet_arp_set_ip4_over_ethernet(vnet_main_t *vnm, u32 sw_if_index, u32 fib_index, void *a_arg, int is_static)
static void vl_api_sr_multicast_map_add_del_t_handler(vl_api_sr_multicast_map_add_del_t *mp)
Request for local eid table summary status.
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)
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)
int vnet_delete_loopback_interface(u32 sw_if_index)
VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION(admin_up_down_function)
Set/unset the classification table for an interface request.
static void vl_api_l2_patch_add_del_t_handler(vl_api_l2_patch_add_del_t *mp)
Delete host-interface response.
IPv6 segment routing multicast map to policy add / del response.
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)
char * vpe_api_get_build_directory(void)
IPv6 interface enable / disable response.
#define clib_memcpy(a, b, c)
Reply for map_summary_stats request.
always_inline vnet_hw_interface_t * vnet_get_sup_hw_interface(vnet_main_t *vnm, u32 sw_if_index)
u8 remote_address_start[16]
int cop_interface_enable_disable(u32 sw_if_index, int enable_disable)
u32 ip6_fib_lookup_with_table(ip6_main_t *im, u32 fib_index, ip6_address_t *dst)
int vnet_mpls_add_del_decap(u32 rx_fib_id, u32 tx_fib_id, u32 label_host_byte_order, int s_bit, int next_index, int is_add)
#define IP6_ROUTE_FLAG_DEL
static void vnet_interface_counter_unlock(vnet_interface_main_t *im)
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)
add or delete map-resolver
static clib_error_t * show_ip4_arp_events_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Reply for IP Neighbor add / delete request.
static void vl_api_vxlan_gpe_add_del_tunnel_t_handler(vl_api_vxlan_gpe_add_del_tunnel_t *mp)
#define pool_is_free_index(P, I)
u8 tunnel_src_address[16]
int ipsec_add_del_spd(vlib_main_t *vm, u32 spd_id, int is_add)
always_inline vnet_hw_interface_t * vnet_get_hw_interface(vnet_main_t *vnm, u32 hw_if_index)
void vnet_register_ip4_arp_resolution_event(vnet_main_t *vnm, void *address_arg, uword node_index, uword type_opaque, uword data)
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)
static void vl_api_dhcp_proxy_set_vss_t_handler(vl_api_dhcp_proxy_set_vss_t *mp)
static clib_error_t * vpe_api_hookup(vlib_main_t *vm)
lisp_gpe_main_t lisp_gpe_main
void ip6_add_del_route_next_hop(ip6_main_t *im, u32 flags, ip6_address_t *dst_address, u32 dst_address_length, ip6_address_t *next_hop, u32 next_hop_sw_if_index, u32 next_hop_weight, u32 adj_index, u32 explicit_fib_index)
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)
int vnet_proxy_arp_add_del(ip4_address_t *lo_addr, ip4_address_t *hi_addr, u32 fib_index, int is_del)
VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION(link_up_down_function)
Delete loopback interface request.
#define IP4_ROUTE_FLAG_DEL
always_inline vnet_sw_interface_t * vnet_get_sup_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
always_inline lisp_cp_main_t * vnet_lisp_cp_get_main()
struct l2fib_entry_result_t::@128::@130 fields
static void map_domain_counter_lock(map_main_t *mm)
Reply for local_eid add/del.
u32 unnumbered_sw_if_index
int dhcp_proxy_set_server(ip4_address_t *addr, ip4_address_t *src_address, u32 fib_id, int insert_option_82, int is_del)
vhost-user interface modify request
#define VLIB_CLI_COMMAND(x,...)
struct _vnet_classify_main vnet_classify_main_t
u8 vnet_lisp_enable_disable_status(void)
u8 destination_ip_address[16]
#define foreach_flow_hash_bit
ip46_address_range_t raddr
Set L2 XConnect between two interfaces request.
static void send_bridge_domain_details(unix_shared_memory_queue_t *q, l2_bridge_domain_t *bd_config, u32 n_sw_ifs, u32 context)
static void vl_api_want_ip4_arp_events_t_handler(vl_api_want_ip4_arp_events_t *mp)
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.
#define VNET_SW_INTERFACE_FLAG_ADMIN_UP
l2 fib table entry structure
IP neighbor add / del request.
Set L2 XConnect response.
Reply for tap dump request.
#define pool_put_index(p, i)
Trace profile add / del response.
Reply for vnet_get_summary_stats request.
IPv6 router advertisement config response.
static void vl_api_ipsec_spd_add_del_t_handler(vl_api_ipsec_spd_add_del_t *mp)
static void vl_api_proxy_arp_intfc_enable_disable_t_handler(vl_api_proxy_arp_intfc_enable_disable_t *mp)
ip4_address_t dst_address
#define IP4_ROUTE_FLAG_ADD
Request for locator_set summary status.
ip_lookup_main_t lookup_main
static void dhcpv4_proxy_config(vl_api_dhcp_proxy_config_t *mp)
int vpe_oam_add_del_target(ip4_address_t *src_address, ip4_address_t *dst_address, u32 fib_id, int is_add)
#define IP6_ROUTE_FLAG_NOT_LAST_IN_GROUP
static void vl_api_lisp_local_eid_table_dump_t_handler(vl_api_lisp_local_eid_table_dump_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 add / del route request.
IPv6 router advertisement prefix config request.
static void vl_api_lisp_add_del_locator_t_handler(vl_api_lisp_add_del_locator_t *mp)
Reply for IPsec: Add/delete SPD from interface.
Reply for MPLS decap add / del request.
static void vl_api_classify_add_del_table_t_handler(vl_api_classify_add_del_table_t *mp)
Reply for tap modify request.
static void vl_api_ipsec_spd_add_del_entry_t_handler(vl_api_ipsec_spd_add_del_entry_t *mp)
static void set_ip6_flow_hash(vl_api_set_ip_flow_hash_t *mp)
int stats_memclnt_delete_callback(u32 client_index)
static void vl_api_sw_interface_vhost_user_dump_t_handler(vl_api_sw_interface_vhost_user_dump_t *mp)
Reply for proxy arp add / del request.
static void vl_api_get_node_index_t_handler(vl_api_get_node_index_t *mp)
Control ping from the client to the server response.
locator_set_t * locator_set_pool
static void vl_api_map_domain_dump_t_handler(vl_api_map_domain_dump_t *mp)
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_add_node_next_t_handler(vl_api_add_node_next_t *mp)
IKEv2: Set IKEv2 profile authentication method.
Set the next node for a given node request.
static void vl_api_sw_interface_details_t_handler(vl_api_sw_interface_details_t *mp)
Is Address Reachable request - DISABLED.
add or delete locator_set
static void vl_api_modify_vhost_user_if_t_handler(vl_api_modify_vhost_user_if_t *mp)
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)
int vnet_tap_delete(vlib_main_t *vm, u32 sw_if_index)
vnet_classify_main_t vnet_classify_main
Request for a single block of summary stats.
static void vl_api_delete_vhost_user_if_t_handler(vl_api_delete_vhost_user_if_t *mp)
Set max allowed ARP or ip6 neighbor entries response.
ipsec_protocol_t protocol
Reply for MAP domain add.
#define IP_FLOW_HASH_DEFAULT
void vnet_ip6_fib_init(ip6_main_t *im, u32 fib_index)
int vnet_unset_ip6_ethernet_neighbor(vlib_main_t *vm, u32 sw_if_index, ip6_address_t *a, u8 *link_layer_address, uword n_bytes_link_layer_address)
static void vl_api_lisp_locator_set_dump_t_handler(vl_api_lisp_locator_set_dump_t *mp)
IPv6 segment routing policy add / del response.
OAM add / del target request.
static void vl_api_trace_profile_apply_t_handler(vl_api_trace_profile_apply_t *mp)
always_inline uword vlib_node_add_next(vlib_main_t *vm, uword node, uword next_node)
static void send_gre_tunnel_details(gre_tunnel_t *t, unix_shared_memory_queue_t *q, u32 context)
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 void vl_api_create_subif_t_handler(vl_api_create_subif_t *mp)
#define IP6_ROUTE_FLAG_FIB_INDEX
static void vl_api_sr_tunnel_add_del_t_handler(vl_api_sr_tunnel_add_del_t *mp)
always_inline void vlib_zero_combined_counter(vlib_combined_counter_main_t *cm, u32 index)
u8 * vlib_node_serialize(vlib_node_main_t *nm, u8 *vector)
always_inline ip_adjacency_t * ip_get_adjacency(ip_lookup_main_t *lm, u32 adj_index)
Request for lisp-gpe protocol status.
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)
static void vl_api_sw_interface_set_table_t_handler(vl_api_sw_interface_set_table_t *mp)
void vl_set_memory_region_name(char *name)
void dslock(stats_main_t *sm, int release_hint, int tag)
static u8 * format_arp_event(u8 *s, va_list *args)
static void vl_api_classify_set_interface_ip_table_t_handler(vl_api_classify_set_interface_ip_table_t *mp)
u32 resulting_feature_bitmap
int vnet_lisp_add_del_locator_set(vnet_lisp_add_del_locator_set_args_t *a, u32 *ls_result)
static int ip4_add_del_route_t_handler(vl_api_ip_add_del_route_t *mp)
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
Interface bridge mode request.
void vnet_register_ip6_neighbor_resolution_event(vnet_main_t *vnm, void *address_arg, uword node_index, uword type_opaque, uword data)
static void vl_api_oam_add_del_t_handler(vl_api_oam_add_del_t *mp)
int vnet_gre_add_del_tunnel(vnet_gre_add_del_tunnel_args_t *a, u32 *sw_if_indexp)
clib_error_t * ip6_ioam_trace_profile_set(u32 trace_option_elts, u32 trace_type, u32 node_id, u32 app_data, int has_pow_option, u32 trace_tsp, int has_ppc_option)
static void * vl_api_sr_policy_add_del_t_print(vl_api_sr_policy_add_del_t *mp, void *handle)
static void vl_api_bridge_domain_sw_if_details_t_handler(vl_api_bridge_domain_sw_if_details_t *mp)
int vnet_proxy_arp_fib_reset(u32 fib_id)
IKEv2: Set IKEv2 local RSA private key.
static int ip6_reset_fib_t_handler(vl_api_reset_fib_t *mp)
u32 bd_find_or_add_bd_index(bd_main_t *bdm, u32 bd_id)
Get or create a bridge domain.
static void vl_api_ikev2_profile_set_ts_t_handler(vl_api_ikev2_profile_set_ts_t *mp)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
vnet_interface_main_t * interface_main
static void dhcpv6_proxy_config_2(vl_api_dhcp_proxy_config_2_t *mp)
#define hash_foreach_pair(p, v, body)
vlib_node_main_t node_main
Reply for gpe_fwd_entry add/del.
#define BAD_TX_SW_IF_INDEX_LABEL
always_inline vnet_sw_interface_t * vnet_get_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
static int event_data_cmp(void *a1, void *a2)
Process a vpe parser cli string request.
#define RESOLUTION_PENDING_EVENT
add or delete locator for locator_set
static void vl_api_ip_address_dump_t_handler(vl_api_ip_address_dump_t *mp)
IOAM Trace enable trace profile for a flow.
#define VXLAN_TUNNEL_IS_IPV4
struct vnet_sub_interface_t::@91::@92::@94 flags
L2 interface ethernet flow point filtering enable/disable request.
static void vl_api_bd_ip_mac_add_del_t_handler(vl_api_bd_ip_mac_add_del_t *mp)
#define vec_sort_with_function(vec, f)
Sort a vector using the supplied element comparison function.
#define IP4_ROUTE_FLAG_FIB_INDEX
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
struct ip_adjacency_t::@112::@115 classify
int vl_msg_api_version_check(vl_api_memclnt_create_t *mp)
int vnet_lisp_add_del_locator(vnet_lisp_add_del_locator_set_args_t *a, locator_set_t *ls, u32 *ls_result)
static void vl_api_mpls_add_del_encap_t_handler(vl_api_mpls_add_del_encap_t *mp)
void api_config_default_ip_route(u8 is_ipv6, u8 is_add, u32 vrf_id, u32 sw_if_index, u8 *next_hop_addr)
Create loopback interface request.
static void vl_api_l2_interface_vlan_tag_rewrite_t_handler(vl_api_l2_interface_vlan_tag_rewrite_t *mp)
Reply for interface events registration.
Set unnumbered interface add / del request.
uword * locator_set_index_by_name
add or delete remote static mapping
static void vl_api_lisp_map_resolver_dump_t_handler(vl_api_lisp_local_eid_table_dump_t *mp)
L2 interface vlan tag rewrite configure request.
u32 table_index_or_table_id
get_node_graph - get a copy of the vpp node graph including the current set of graph arcs...
l2_bridge_domain_t * bd_configs
ip6_address_t * dst_address
#define REPLY_MACRO2(t, body)
Add / del MPLS decapsulation request.
Create a new subinterface with the given vlan id.
Create loopback interface response.
u32 * tunnel_index_by_sw_if_index
static clib_error_t * link_up_down_function(vnet_main_t *vm, u32 hw_if_index, u32 flags)
L2 interface patch add / del request.
#define hash_get_mem(h, key)
void l2fib_table_dump(u32 bd_index, l2fib_entry_key_t **l2fe_key, l2fib_entry_result_t **l2fe_res)
static void vl_api_map_summary_stats_t_handler(vl_api_map_summary_stats_t *mp)
static void vl_api_mpls_gre_add_del_tunnel_t_handler(vl_api_mpls_gre_add_del_tunnel_t *mp)
static void vl_api_l2_fib_clear_table_t_handler(vl_api_l2_fib_clear_table_t *mp)
#define IP4_ROUTE_FLAG_NOT_LAST_IN_GROUP
static void vl_api_show_version_t_handler(vl_api_show_version_t *mp)
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)
Interface set vpath request.
always_inline void vlib_zero_simple_counter(vlib_simple_counter_main_t *cm, u32 index)
Modify a tap interface with the given paramters.
char * vpe_api_get_build_date(void)
static void vl_api_reset_fib_t_handler(vl_api_reset_fib_t *mp)
ipsec_crypto_alg_t crypto_alg
void vlib_clear_simple_counters(vlib_simple_counter_main_t *cm)
#define VLIB_REGISTER_NODE(x,...)
void vl_noop_handler(void *mp)
int vnet_lisp_add_del_map_resolver(vnet_lisp_add_del_map_resolver_args_t *a)
#define IP4_ROUTE_FLAG_TABLE_ID
static void vl_api_classify_add_del_session_t_handler(vl_api_classify_add_del_session_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)
#define gid_address_set_vni(_a, _val)
Register for ip4 arp resolution events.
#define IP6_ROUTE_FLAG_ADD
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 index)
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)
#define vec_foreach(var, vec)
Vector iterator.
static void vl_api_gre_tunnel_dump_t_handler(vl_api_gre_tunnel_dump_t *mp)
clib_error_t * clear_ioam_rewrite_fn(void)
static void vl_api_tap_delete_t_handler(vl_api_tap_delete_t *mp, vlib_main_t *vm)
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.
enable or disable lisp-gpe protocol
static void vl_api_sw_interface_ip6_enable_disable_t_handler(vl_api_sw_interface_ip6_enable_disable_t *mp, vlib_main_t *vm)
always_inline f64 vlib_time_now(vlib_main_t *vm)
clib_error_t * vnet_sw_interface_set_flags(vnet_main_t *vnm, u32 sw_if_index, u32 flags)
static void vl_api_create_vlan_subif_t_handler(vl_api_create_vlan_subif_t *mp)
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)
#define VALIDATE_RX_SW_IF_INDEX(mp)
#define pub_sub_handler(lca, UCA)
#define BAD_SW_IF_INDEX_LABEL
uword * adj_index_by_dst_address[33]
static void vl_api_sw_interface_add_del_address_t_handler(vl_api_sw_interface_add_del_address_t *mp)
#define foreach_classify_add_del_table_field
static void vl_api_ipsec_sa_set_key_t_handler(vl_api_ipsec_sa_set_key_t *mp)
#define clib_error_return(e, args...)
#define IP6_ROUTE_FLAG_TABLE_ID
vhost-user interface delete request
clib_error_t * vnet_create_sw_interface(vnet_main_t *vnm, vnet_sw_interface_t *template, u32 *sw_if_index)
Reply for IKEv2: Add/delete profile.
vhost-user interface modify response
void ip4_add_del_route(ip4_main_t *im, ip4_add_del_route_args_t *args)
static void vl_api_dhcp_proxy_config_2_t_handler(vl_api_dhcp_proxy_config_2_t *mp)
Interface details structure (fix this)
static void vl_api_sr_policy_add_del_t_handler(vl_api_sr_policy_add_del_t *mp)
static void vl_api_ikev2_profile_set_id_t_handler(vl_api_ikev2_profile_set_id_t *mp)
VLIB_API_INIT_FUNCTION(vpe_api_hookup)
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
Associate the specified interface with a fib table.
u8 * format_ipsec_crypto_alg(u8 *s, va_list *args)
vlib_node_registration_t link_state_process_node
(constructor) VLIB_REGISTER_NODE (link_state_process_node)
Tell client about a DHCP completion event.
int ip6_ioam_set_destination(ip6_address_t *addr, u32 mask_width, u32 vrf_id, int is_add, int is_pop, int is_none)
static clib_error_t * vpe_api_init(vlib_main_t *vm)
int vnet_mpls_gre_add_del_tunnel(ip4_address_t *src, ip4_address_t *dst, ip4_address_t *intfc, u32 mask_width, u32 inner_fib_id, u32 outer_fib_id, u32 *tunnel_sw_if_index, u8 l2_only, u8 is_add)
Add / del MPLS encapsulation request.
int vnet_tap_dump_ifs(tapcli_interface_details_t **out_tapids)
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
static void vl_api_bridge_domain_dump_t_handler(vl_api_bridge_domain_dump_t *mp)
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)
DHCP Client config add / del request.
void vlib_cli_input(vlib_main_t *vm, unformat_input_t *input, vlib_cli_output_function_t *function, uword function_arg)
int dhcp_proxy_set_option82_vss(u32 vrf_id, u32 oui, u32 fib_id, int is_del)
vnet_config_main_t config_main
static uword link_state_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
static void vl_api_ikev2_profile_set_auth_t_handler(vl_api_ikev2_profile_set_auth_t *mp)
void l2_efp_filter_configure(vnet_main_t *vnet_main, u32 sw_if_index, u32 enable)
clib_error_t * vl_api_init(vlib_main_t *vm)
static void vl_api_lisp_add_del_locator_set_t_handler(vl_api_lisp_add_del_locator_set_t *mp)
DHCP Proxy config add / del request.
#define ip_prefix_addr(_a)
CLIB vectors are ubiquitous dynamically resized arrays with by user defined "headers".
u32 ip6_fib_lookup(ip6_main_t *im, u32 sw_if_index, ip6_address_t *dst)
u32 unnumbered_sw_if_index
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)
struct _unix_shared_memory_queue unix_shared_memory_queue_t
always_inline uword vnet_sw_interface_get_flags(vnet_main_t *vnm, u32 sw_if_index)
int af_packet_delete_if(vlib_main_t *vm, u8 *host_if_name)
always_inline vnet_sw_interface_t * vnet_get_hw_sw_interface(vnet_main_t *vnm, u32 hw_if_index)
Reply for MAP domain del.
static void vl_api_create_vhost_user_if_t_handler(vl_api_create_vhost_user_if_t *mp)
L2 bridge domain add or delete request.
IPv6 segment routing policy add / del request.