2 * Copyright (c) 2015 Cisco and/or its affiliates.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
16 * This file and in fact the entire directory shouldn't even exist.
17 * Vnet ought to be a dynamic library.
19 * Unfortunately, various things malfunction when we try to go there.
20 * Plugin DLL's end up with their own copies of critical
21 * data structures. No one of these problems would be tough to fix,
22 * but there are quite a number of them.
26 * Make certain that plugin .dll's which reference the following functions
30 #define foreach_plugin_reference \
31 _(unformat_vnet_hw_interface) \
32 _(unformat_vnet_sw_interface) \
33 _(format_vnet_hw_interface) \
34 _(format_vnet_sw_interface) \
35 _(format_vnet_sw_interface_name_override) \
36 _(vnet_hw_interface_rx_redirect_to_node) \
37 _(vnet_config_add_feature) \
38 _(vnet_config_del_feature) \
40 _(_vlib_init_function_l2_init) \
41 _(_vlib_init_function_pg_init) \
42 _(_vlib_init_function_ip_main_init) \
43 _(_vlib_init_function_ethernet_init) \
44 _(_vlib_init_function_ethernet_arp_init) \
45 _(_vlib_config_function_dpdk_config) \
46 _(l2input_intf_bitmap_enable) \
49 _(format_ip4_address) \
50 _(unformat_ip4_address) \
51 _(ip4_address_compare) \
52 _(ip6_address_compare) \
53 _(format_ip6_address) \
54 _(format_ip6_address_and_length) \
55 _(udp_register_dst_port) \
56 _(ethernet_register_input_type) \
57 _(ethernet_set_flags) \
58 _(format_ip6_address) \
59 _(unformat_ip6_address) \
61 _(find_ip6_fib_by_table_index_or_id) \
62 _(format_ethernet_address) \
63 _(unformat_ethernet_address) \
64 _(unformat_ethernet_interface) \
65 _(ethernet_register_l2_input) \
66 _(ethernet_register_l3_redirect) \
67 _(unformat_pg_payload) \
68 _(format_ip4_address_and_length) \
69 _(ip_incremental_checksum) \
70 _(ethernet_sw_interface_set_l2_mode) \
71 _(vnet_create_loopback_interface) \
72 _(ethernet_set_rx_redirect) \
73 _(ethernet_set_flags) \
74 _(ethernet_get_main) \
75 _(ethernet_get_interface) \
76 _(vnet_hw_interface_set_flags) \
77 _(vnet_sw_interface_set_flags) \
78 _(vnet_create_sw_interface) \
79 _(vnet_delete_sw_interface) \
83 _(pg_stream_enable_disable) \
87 _(unformat_tcp_udp_port) \
88 _(unformat_pg_number) \
89 _(_vlib_init_function_ip4_lookup_init) \
90 _(_vlib_init_function_ip6_lookup_init) \
91 _(ip4_register_protocol) \
92 _(ip6_register_protocol) \
96 #define foreach_dpdk_plugin_reference \
97 _(dpdk_set_next_node) \
98 _(dpdk_worker_thread) \
100 _(dpdk_frame_queue_dequeue) \
101 _(vlib_get_handoff_queue_elt) \
102 _(dpdk_get_handoff_node_index) \
103 _(dpdk_set_flowcontrol_callback) \
104 _(dpdk_interface_tx_vector) \
109 _(rte_malloc_virt2phy) \
110 _(rte_eal_get_configuration) \
111 _(post_sw_interface_set_flags) \
112 _(dpdk_get_admin_up_down_in_progress) \
115 #define foreach_dpdk_plugin_reference
119 #define foreach_ip6_sr_plugin_reference \
120 _(vnet_register_sr_app_callback) \
121 _(format_ip6_sr_header)
123 #define foreach_ip6_sr_plugin_reference
126 #define _(a) void a (void);
127 foreach_plugin_reference
128 foreach_dpdk_plugin_reference
129 foreach_ip6_sr_plugin_reference
132 void *vnet_library_plugin_references[] =
135 foreach_plugin_reference
136 foreach_dpdk_plugin_reference
137 foreach_ip6_sr_plugin_reference
141 void vnet_library_plugin_reference(void) { }