# NB NB NB NB NB NB NB NB NB NB NB # # NOTE: The API binary wrappers in this file are in the process of being # deprecated. DO NOT ADD NEW WRAPPERS HERE. Call the functions using # named arguments directly instead. # import os import time from collections import deque from six import moves, iteritems from vpp_papi import VPPApiClient, mac_pton from hook import Hook from vpp_ip_route import MPLS_IETF_MAX_LABEL, MPLS_LABEL_INVALID # # Dictionary keyed on message name to override default values for # named parameters # defaultmapping = { 'map_add_domain': {'mtu': 1280}, 'syslog_set_sender': {'collector_port': 514, 'max_msg_size': 480}, 'acl_interface_add_del': {'is_add': 1, 'is_input': 1}, 'acl_interface_list_dump': {'sw_if_index': 4294967295, }, 'app_namespace_add_del': {'sw_if_index': 4294967295, }, 'bd_ip_mac_add_del': {'is_add': 1, }, 'bfd_udp_add': {'is_authenticated': False, 'bfd_key_id': None, 'conf_key_id': None}, 'bfd_udp_auth_activate': {'bfd_key_id': None, 'conf_key_id': None, 'is_delayed': False}, 'bier_disp_entry_add_del': {'next_hop_rpf_id': -1, 'next_hop_is_ip4': 1, 'is_add': 1, }, 'bier_disp_table_add_del': {'is_add': 1, }, 'bier_imp_add': {'is_add': 1, }, 'bier_route_add_del': {'is_add': 1, }, 'bier_table_add_del': {'is_add': 1, }, 'bond_create': {'mac_address': '', 'id': 0xFFFFFFFF}, 'bridge_domain_add_del': {'flood': 1, 'uu_flood': 1, 'forward': 1, 'learn': 1, 'is_add': 1, }, 'bvi_create': {'user_instance': 4294967295, }, 'bvi_delete': {}, 'gbp_subnet_add_del': {'sw_if_index': 4294967295, 'epg_id': 65535, }, 'geneve_add_del_tunnel': {'mcast_sw_if_index': 4294967295, 'is_add': 1, 'decap_next_index': 4294967295, }, 'gre_tunnel_add_del': {'instance': 4294967295, 'is_add': 1, }, 'input_acl_set_interface': {'ip4_table_index': 4294967295, 'ip6_table_index': 4294967295, 'l2_table_index': 4294967295, }, 'ip6_add_del_address_using_prefix': {'is_add': 1, }, 'ip6nd_send_router_solicitation': {'irt': 1, 'mrt': 120, }, 'ip_add_del_route': {'next_hop_sw_if_index': 4294967295, 'next_hop_weight': 1, 'next_hop_via_label': 1048576, 'classify_table_index': 4294967295, 'is_add': 1, }, 'ip_mroute_add_del': {'is_add': 1, }, 'ip_neighbor_add_del': {'is_add': 1, }, 'ip_punt_police': {'is_add': 1, }, 'ip_punt_redirect': {'is_add': 1, }, 'ip_route_add_del': {'is_add': 1, }, 'ip_unnumbered_dump': {'sw_if_index': 4294967295, }, 'ipsec_interface_add_del_spd': {'is_add': 1, }, 'ipsec_sad_entry_add_del': {'is_add': 1, }, 'ipsec_spd_add_del': {'is_add': 1, }, 'ipsec_spd_dump': {'sa_id': 4294967295, }, 'ipsec_spd_entry_add_del': {'local_port_stop': 65535, 'remote_port_stop': 65535, 'priority': 100, 'is_outbound': 1, 'is_add': 1, }, 'ipsec_tunnel_if_add_del': {'is_add': 1, 'anti_replay': 1, }, 'l2_emulation': {'enable': 1, }, 'l2fib_add_del': {'is_add': 1, }, 'lb_conf': {'sticky_buckets_per_core': 4294967295, 'flow_timeout': 4294967295}, 'lisp_add_del_adjacency': {'is_add': 1, }, 'lisp_add_del_local_eid': {'is_add': 1, }, 'lisp_add_del_locator': {'priority': 1, 'weight': 1, 'is_add': 1, }, 'lisp_add_del_locator_set': {'is_add': 1, }, 'lisp_add_del_remote_mapping': {'is_add': 1, }, 'macip_acl_add_replace': {'acl_index': 4294967295, }, 'macip_acl_dump': {'acl_index': 4294967295, }, 'macip_acl_interface_add_del': {'is_add': 1, }, 'mpls_ip_bind_unbind': {'is_ip4': 1, 'is_bind': 1, }, 'mpls_route_add_del': {'mr_next_hop_sw_if_index': 4294967295, 'mr_next_hop_weight': 1, 'mr_next_hop_via_label': 1048576, 'mr_is_add': 1, 'mr_classify_table_index': 4294967295, }, 'mpls_table_add_del': {'is_add': 1, }, 'mpls_tunnel_add_del': {'next_hop_sw_if_index': 4294967295, 'next_hop_weight': 1, 'next_hop_via_label': 1048576, 'is_add': 1, }, 'mpls_tunnel_dump': {'sw_if_index': 4294967295, }, 'output_acl_set_interface': {'ip4_table_index': 4294967295, 'ip6_table_index': 4294967295, 'l2_table_index': 4294967295, }, 'pppoe_add_del_session': {'is_add': 1, }, 'policer_add_del': {'is_add': 1, 'conform_action_type': 1, }, 'proxy_arp_add_del': {'is_add': 1, }, 'proxy_arp_intfc_enable_disable': {'is_enable': 1, }, 'set_ip_flow_hash': {'src': 1, 'dst': 1, 'sport': 1, 'dport': 1, 'proto': 1, }, 'set_ipfix_exporter': {'collector_port': 4739, }, 'sr_localsid_add_del': {'sw_if_index': 4294967295, }, 'sr_policy_add': {'weight': 1, 'is_encap': 1, }, 'svs_enable_disable': {'is_enable': 1, }, 'svs_route_add_del': {'is_add': 1, }, 'svs_table_add_del': {'is_add': 1, }, 'sw_interface_add_del_address': {'is_add': 1, }, 'sw_interface_dump': {'sw_if_index': 4294967295, }, 'sw_in
/*
* memif_all_api_h.h - plug-in api #include file
*
* Copyright (c) <current-year> <your-organization>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Include the generated file, see BUILT_SOURCES in Makefile.am */
#include <memif/memif.api.h>