lisp: Move to plugin

Type: refactor

Change-Id: I54df533a8f863c4e49742903cf2457f18b4fc506
Signed-off-by: Neale Ranns <nranns@cisco.com>
This commit is contained in:
Neale Ranns
2020-09-21 08:17:51 +00:00
committed by Damjan Marion
parent b468773aa4
commit 2b202bc4b2
62 changed files with 6341 additions and 5801 deletions

View File

@ -0,0 +1,79 @@
# Copyright (c) 2020 Cisco and/or its affiliates.
# 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.
##############################################################################
# LISP control plane: lisp-cp
##############################################################################
##############################################################################
# Tunnel protocol: lisp-gpe
##############################################################################
add_vpp_plugin(lisp
SOURCES
lisp-cp/lisp_types.c
lisp-cp/lisp_cp_dpo.c
lisp-cp/control.c
lisp-cp/control_main.c
lisp-cp/gid_dictionary.c
lisp-cp/lisp_msg_serdes.c
lisp-cp/packets.c
lisp-cp/one_cli.c
lisp-cp/lisp_cli.c
lisp-cp/one_api.c
lisp-cp/lisp_api.c
lisp-cp/lisp_types_api.c
lisp-gpe/lisp_gpe.c
lisp-gpe/lisp_gpe_sub_interface.c
lisp-gpe/lisp_gpe_adjacency.c
lisp-gpe/lisp_gpe_tunnel.c
lisp-gpe/lisp_gpe_fwd_entry.c
lisp-gpe/lisp_gpe_tenant.c
lisp-gpe/interface.c
lisp-gpe/decap.c
lisp-gpe/lisp_gpe_api.c
API_FILES
lisp-cp/lisp_types.api
lisp-cp/lisp.api
lisp-cp/one.api
lisp-gpe/lisp_gpe.api
INSTALL_HEADERS
lisp-cp/lisp_types.h
lisp-cp/packets.h
lisp-cp/gid_dictionary.h
lisp-cp/lisp_cp_messages.h
lisp-cp/lisp_msg_serdes.h
lisp-cp/control.h
lisp-cp/lisp_types_api.h
lisp-gpe/lisp_gpe.h
lisp-gpe/lisp_gpe_fwd_entry.h
lisp-gpe/lisp_gpe_tenant.h
lisp-gpe/lisp_gpe_packet.h
lisp-gpe/lisp_gpe_error.def
API_TEST_SOURCES
lisp-cp/lisp_test.c
lisp-cp/lisp_cp_test.c
lisp-cp/one_test.c
lisp-gpe/lisp_gpe_test.c
)
add_vpp_plugin(lisp_unittest
SOURCES
lisp-cp/lisp_msg_serdes.c
lisp-cp/control_main.c
lisp-cp/lisp_types.c
test/lisp_cp_test.c
)

View File

@ -14,12 +14,12 @@
*/
#include <vlibmemory/api.h>
#include <vnet/lisp-cp/control.h>
#include <vnet/lisp-cp/packets.h>
#include <vnet/lisp-cp/lisp_msg_serdes.h>
#include <vnet/lisp-gpe/lisp_gpe_fwd_entry.h>
#include <vnet/lisp-gpe/lisp_gpe_tenant.h>
#include <vnet/lisp-gpe/lisp_gpe_tunnel.h>
#include <lisp/lisp-cp/control.h>
#include <lisp/lisp-cp/packets.h>
#include <lisp/lisp-cp/lisp_msg_serdes.h>
#include <lisp/lisp-gpe/lisp_gpe_fwd_entry.h>
#include <lisp/lisp-gpe/lisp_gpe_tenant.h>
#include <lisp/lisp-gpe/lisp_gpe_tunnel.h>
#include <vnet/fib/fib_entry.h>
#include <vnet/fib/fib_table.h>
#include <vnet/ethernet/arp_packet.h>
@ -34,8 +34,6 @@
#define TIME_UNTIL_REFETCH_OR_DELETE 20
#define MAPPING_TIMEOUT (((m->ttl) * 60) - TIME_UNTIL_REFETCH_OR_DELETE)
lisp_cp_main_t lisp_control_main;
u8 *format_lisp_cp_input_trace (u8 * s, va_list * args);
static void *send_map_request_thread_fn (void *arg);

View File

@ -17,8 +17,8 @@
#define VNET_CONTROL_H_
#include <vnet/vnet.h>
#include <vnet/lisp-cp/gid_dictionary.h>
#include <vnet/lisp-cp/lisp_types.h>
#include <lisp/lisp-cp/gid_dictionary.h>
#include <lisp/lisp-cp/lisp_types.h>
#include <vppinfra/timing_wheel.h>
#include <vppinfra/tw_timer_1t_3w_1024sl_ov.h>

View File

@ -13,7 +13,7 @@
* limitations under the License.
*/
#include <vnet/lisp-cp/gid_dictionary.h>
#include <lisp/lisp-cp/gid_dictionary.h>
typedef struct
{

View File

@ -17,7 +17,7 @@
#define VNET_LISP_GPE_GID_DICTIONARY_H_
#include <vnet/vnet.h>
#include <vnet/lisp-cp/lisp_types.h>
#include <lisp/lisp-cp/lisp_types.h>
#include <vppinfra/bihash_24_8.h>
#include <vppinfra/bihash_template.h>

View File

@ -16,7 +16,7 @@
option version = "2.0.0";
import "vnet/interface_types.api";
import "vnet/lisp-cp/lisp_types.api";
import "plugins/lisp/lisp-cp/lisp_types.api";
/** \brief add or delete locator_set
@param client_index - opaque cookie to identify the sender
@ -26,7 +26,7 @@ import "vnet/lisp-cp/lisp_types.api";
@param locator_num - number of locators
@param locators - LISP locator records
*/
manual_endian manual_print define lisp_add_del_locator_set
define lisp_add_del_locator_set
{
u32 client_index;
u32 context;
@ -294,7 +294,7 @@ define show_lisp_map_request_mode_reply
@param rloc_num - number of remote locators
@param rlocs - remote locator records
*/
autoreply manual_print manual_endian define lisp_add_del_remote_mapping
autoreply define lisp_add_del_remote_mapping
{
u32 client_index;
u32 context;
@ -501,7 +501,7 @@ typedef lisp_adjacency
@param count - number of adjacencies
@param adjacencies - array of adjacencies
*/
manual_endian manual_print define lisp_adjacencies_get_reply
define lisp_adjacencies_get_reply
{
u32 context;
i32 retval;

View File

@ -22,74 +22,25 @@
#include <vnet/interface.h>
#include <vnet/api_errno.h>
#include <vnet/lisp-cp/control.h>
#include <vnet/lisp-gpe/lisp_gpe.h>
#include <lisp/lisp-cp/control.h>
#include <lisp/lisp-gpe/lisp_gpe.h>
#include <vnet/ip/ip_types_api.h>
#include <vnet/ethernet/ethernet_types_api.h>
#include <vnet/lisp-cp/lisp_types_api.h>
#include <lisp/lisp-cp/lisp_types_api.h>
#include <vnet/vnet_msg_enum.h>
/* define message IDs */
#include <vnet/format_fns.h>
#include <lisp/lisp-cp/lisp.api_enum.h>
#include <lisp/lisp-cp/lisp.api_types.h>
#define vl_api_lisp_add_del_locator_set_t_endian vl_noop_handler
#define vl_api_lisp_add_del_locator_set_t_print vl_noop_handler
#define vl_api_lisp_add_del_remote_mapping_t_endian vl_noop_handler
#define vl_api_lisp_add_del_remote_mapping_t_print vl_noop_handler
#define vl_api_one_add_del_locator_set_t_endian vl_noop_handler
#define vl_api_one_add_del_locator_set_t_print vl_noop_handler
#define vl_api_one_add_del_remote_mapping_t_endian vl_noop_handler
#define vl_api_one_add_del_remote_mapping_t_print vl_noop_handler
#define vl_typedefs /* define message structures */
#include <vnet/vnet_all_api_h.h>
#undef vl_typedefs
#define vl_endianfun /* define message structures */
#include <vnet/vnet_all_api_h.h>
#undef vl_endianfun
/* instantiate all the print functions we know about */
#define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
#define vl_printfun
#include <vnet/vnet_all_api_h.h>
#undef vl_printfun
/**
* Base message ID fot the plugin
*/
static u32 lisp_base_msg_id;
#define REPLY_MSG_ID_BASE lisp_base_msg_id
#include <vlibapi/api_helper_macros.h>
#define foreach_vpe_api_msg \
_(LISP_ADD_DEL_LOCATOR_SET, lisp_add_del_locator_set) \
_(LISP_ADD_DEL_LOCATOR, lisp_add_del_locator) \
_(LISP_ADD_DEL_LOCAL_EID, lisp_add_del_local_eid) \
_(LISP_ADD_DEL_MAP_RESOLVER, lisp_add_del_map_resolver) \
_(LISP_ADD_DEL_MAP_SERVER, lisp_add_del_map_server) \
_(LISP_ENABLE_DISABLE, lisp_enable_disable) \
_(LISP_RLOC_PROBE_ENABLE_DISABLE, lisp_rloc_probe_enable_disable) \
_(LISP_MAP_REGISTER_ENABLE_DISABLE, lisp_map_register_enable_disable) \
_(LISP_ADD_DEL_REMOTE_MAPPING, lisp_add_del_remote_mapping) \
_(LISP_ADD_DEL_ADJACENCY, lisp_add_del_adjacency) \
_(LISP_PITR_SET_LOCATOR_SET, lisp_pitr_set_locator_set) \
_(LISP_MAP_REQUEST_MODE, lisp_map_request_mode) \
_(LISP_EID_TABLE_ADD_DEL_MAP, lisp_eid_table_add_del_map) \
_(LISP_LOCATOR_SET_DUMP, lisp_locator_set_dump) \
_(LISP_LOCATOR_DUMP, lisp_locator_dump) \
_(LISP_EID_TABLE_DUMP, lisp_eid_table_dump) \
_(LISP_MAP_RESOLVER_DUMP, lisp_map_resolver_dump) \
_(LISP_MAP_SERVER_DUMP, lisp_map_server_dump) \
_(LISP_EID_TABLE_MAP_DUMP, lisp_eid_table_map_dump) \
_(LISP_EID_TABLE_VNI_DUMP, lisp_eid_table_vni_dump) \
_(LISP_ADJACENCIES_GET, lisp_adjacencies_get) \
_(SHOW_LISP_RLOC_PROBE_STATE, show_lisp_rloc_probe_state) \
_(SHOW_LISP_MAP_REGISTER_STATE, show_lisp_map_register_state) \
_(SHOW_LISP_STATUS, show_lisp_status) \
_(LISP_ADD_DEL_MAP_REQUEST_ITR_RLOCS, \
lisp_add_del_map_request_itr_rlocs) \
_(LISP_GET_MAP_REQUEST_ITR_RLOCS, lisp_get_map_request_itr_rlocs) \
_(SHOW_LISP_PITR, show_lisp_pitr) \
_(SHOW_LISP_MAP_REQUEST_MODE, show_lisp_map_request_mode) \
_(LISP_USE_PETR, lisp_use_petr) \
_(SHOW_LISP_USE_PETR, show_lisp_use_petr) \
static locator_t *
unformat_lisp_locs (vl_api_remote_locator_t * rmt_locs, u32 rloc_num)
{
@ -532,7 +483,7 @@ send_lisp_locator_details (lisp_cp_main_t * lcm,
rmp = vl_msg_api_alloc (sizeof (*rmp));
clib_memset (rmp, 0, sizeof (*rmp));
rmp->_vl_msg_id = ntohs (VL_API_LISP_LOCATOR_DETAILS);
rmp->_vl_msg_id = ntohs (VL_API_LISP_LOCATOR_DETAILS + REPLY_MSG_ID_BASE);
rmp->context = context;
rmp->local = loc->local;
@ -604,7 +555,8 @@ send_lisp_locator_set_details (lisp_cp_main_t * lcm,
rmp = vl_msg_api_alloc (sizeof (*rmp));
clib_memset (rmp, 0, sizeof (*rmp));
rmp->_vl_msg_id = ntohs (VL_API_LISP_LOCATOR_SET_DETAILS);
rmp->_vl_msg_id =
ntohs (VL_API_LISP_LOCATOR_SET_DETAILS + REPLY_MSG_ID_BASE);
rmp->context = context;
rmp->ls_index = htonl (ls_index);
@ -687,7 +639,7 @@ send_lisp_eid_table_details (mapping_t * mapit,
rmp = vl_msg_api_alloc (sizeof (*rmp));
clib_memset (rmp, 0, sizeof (*rmp));
rmp->_vl_msg_id = ntohs (VL_API_LISP_EID_TABLE_DETAILS);
rmp->_vl_msg_id = ntohs (VL_API_LISP_EID_TABLE_DETAILS + REPLY_MSG_ID_BASE);
ls = pool_elt_at_index (lcm->locator_set_pool, mapit->locator_set_index);
if (vec_len (ls->locator_indices) == 0)
@ -769,7 +721,8 @@ send_lisp_map_server_details (ip_address_t * ip, vl_api_registration_t * reg,
rmp = vl_msg_api_alloc (sizeof (*rmp));
clib_memset (rmp, 0, sizeof (*rmp));
rmp->_vl_msg_id = ntohs (VL_API_LISP_MAP_SERVER_DETAILS);
rmp->_vl_msg_id =
ntohs (VL_API_LISP_MAP_SERVER_DETAILS + REPLY_MSG_ID_BASE);
ip_address_encode2 (ip, &rmp->ip_address);
rmp->context = context;
@ -802,7 +755,8 @@ send_lisp_map_resolver_details (ip_address_t * ip,
rmp = vl_msg_api_alloc (sizeof (*rmp));
clib_memset (rmp, 0, sizeof (*rmp));
rmp->_vl_msg_id = ntohs (VL_API_LISP_MAP_RESOLVER_DETAILS);
rmp->_vl_msg_id =
ntohs (VL_API_LISP_MAP_RESOLVER_DETAILS + REPLY_MSG_ID_BASE);
ip_address_encode2 (ip, &rmp->ip_address);
rmp->context = context;
@ -835,7 +789,8 @@ send_eid_table_map_pair (hash_pair_t * p, vl_api_registration_t * reg,
rmp = vl_msg_api_alloc (sizeof (*rmp));
clib_memset (rmp, 0, sizeof (*rmp));
rmp->_vl_msg_id = ntohs (VL_API_LISP_EID_TABLE_MAP_DETAILS);
rmp->_vl_msg_id =
ntohs (VL_API_LISP_EID_TABLE_MAP_DETAILS + REPLY_MSG_ID_BASE);
rmp->vni = clib_host_to_net_u32 (p->key);
rmp->dp_table = clib_host_to_net_u32 (p->value[0]);
@ -880,7 +835,8 @@ send_eid_table_vni (u32 vni, vl_api_registration_t * reg, u32 context)
rmp = vl_msg_api_alloc (sizeof (*rmp));
clib_memset (rmp, 0, sizeof (*rmp));
rmp->_vl_msg_id = ntohs (VL_API_LISP_EID_TABLE_VNI_DETAILS);
rmp->_vl_msg_id =
ntohs (VL_API_LISP_EID_TABLE_VNI_DETAILS + REPLY_MSG_ID_BASE);
rmp->context = context;
rmp->vni = clib_host_to_net_u32 (vni);
vl_api_send_msg (reg, (u8 *) rmp);
@ -1088,39 +1044,17 @@ vl_api_show_lisp_pitr_t_handler (vl_api_show_lisp_pitr_t * mp)
* added the client registration handlers.
* See .../vlib-api/vlibmemory/memclnt_vlib.c:memclnt_process()
*/
#define vl_msg_name_crc_list
#include <vnet/vnet_all_api_h.h>
#undef vl_msg_name_crc_list
static void
setup_message_id_table (api_main_t * am)
{
#define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id);
foreach_vl_msg_name_crc_lisp;
#undef _
}
#include <lisp/lisp-cp/lisp.api.c>
static clib_error_t *
lisp_api_hookup (vlib_main_t * vm)
{
api_main_t *am = vlibapi_get_main ();
#define _(N,n) \
vl_msg_api_set_handlers(VL_API_##N, #n, \
vl_api_##n##_t_handler, \
vl_noop_handler, \
vl_api_##n##_t_endian, \
vl_api_##n##_t_print, \
sizeof(vl_api_##n##_t), 1);
foreach_vpe_api_msg;
#undef _
/*
* Set up the (msg_name, crc, message-id) table
*/
setup_message_id_table (am);
lisp_base_msg_id = setup_message_id_table ();
return 0;
return NULL;
}
VLIB_API_INIT_FUNCTION (lisp_api_hookup);

View File

@ -13,8 +13,8 @@
* limitations under the License.
*/
#include <vnet/lisp-cp/control.h>
#include <vnet/lisp-gpe/lisp_gpe.h>
#include <lisp/lisp-cp/control.h>
#include <lisp/lisp-gpe/lisp_gpe.h>
static clib_error_t *
lisp_show_adjacencies_command_fn (vlib_main_t * vm,

View File

@ -14,8 +14,8 @@
*/
#include <vnet/dpo/dpo.h>
#include <vnet/lisp-gpe/lisp_gpe.h>
#include <vnet/lisp-cp/control.h>
#include <lisp/lisp-gpe/lisp_gpe.h>
#include <lisp/lisp-cp/control.h>
/**
* The static array of LISP punt DPOs

File diff suppressed because it is too large Load Diff

View File

@ -13,8 +13,8 @@
* limitations under the License.
*/
#include <vnet/lisp-cp/lisp_msg_serdes.h>
#include <vnet/lisp-cp/packets.h>
#include <lisp/lisp-cp/lisp_msg_serdes.h>
#include <lisp/lisp-cp/packets.h>
#include <vppinfra/time.h>
void *lisp_msg_put_gid (vlib_buffer_t * b, gid_address_t * gid);

View File

@ -17,8 +17,8 @@
#define VNET_LISP_GPE_LISP_MSG_BUILDER_H_
#include <vnet/vnet.h>
#include <vnet/lisp-cp/lisp_cp_messages.h>
#include <vnet/lisp-cp/control.h>
#include <lisp/lisp-cp/lisp_cp_messages.h>
#include <lisp/lisp-cp/control.h>
void *lisp_msg_put_mreq (lisp_cp_main_t * lcm, vlib_buffer_t * b,
gid_address_t * seid, gid_address_t * deid,

View File

@ -0,0 +1,45 @@
/*
* Copyright (c) 2020 Cisco and/or its affiliates.
* 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 <vat/vat.h>
#include <vlibapi/api.h>
#include <vlibmemory/api.h>
clib_error_t *vat_plugin_register_one (vat_main_t * vam);
clib_error_t *vat_plugin_register_cp (vat_main_t * vam);
clib_error_t *vat_plugin_register_gpe (vat_main_t * vam);
clib_error_t *
vat_plugin_register (vat_main_t * vam)
{
clib_error_t *err;
if ((err = vat_plugin_register_gpe (vam)))
return err;
if ((err = vat_plugin_register_cp (vam)))
return err;
if ((err = vat_plugin_register_one (vam)))
return err;
return NULL;
}
/*
* fd.io coding-style-patch-verification: ON
*
* Local Variables:
* eval: (c-set-style "gnu")
* End:
*/

View File

@ -14,7 +14,7 @@
*/
#include <vnet/ethernet/ethernet.h>
#include <vnet/lisp-cp/lisp_types.h>
#include <lisp/lisp-cp/lisp_types.h>
static u16 gid_address_put_no_vni (u8 * b, gid_address_t * gid);
static u16 gid_address_size_to_put_no_vni (gid_address_t * gid);

View File

@ -17,7 +17,7 @@
#define VNET_LISP_GPE_LISP_TYPES_H_
#include <vnet/ip/ip.h>
#include <vnet/lisp-cp/lisp_cp_messages.h>
#include <lisp/lisp-cp/lisp_cp_messages.h>
#define SHA1_AUTH_DATA_LEN 20
#define SHA256_AUTH_DATA_LEN 32

View File

@ -16,7 +16,7 @@
*------------------------------------------------------------------
*/
#include <vnet/lisp-cp/lisp_types_api.h>
#include <lisp/lisp-cp/lisp_types_api.h>
#include <vnet/ip/ip_types_api.h>
#include <vnet/ethernet/ethernet_types_api.h>

View File

@ -16,8 +16,8 @@
*------------------------------------------------------------------
*/
#include <vnet/lisp-cp/lisp_types.h>
#include <vnet/lisp-cp/lisp.api_types.h>
#include <lisp/lisp-cp/lisp_types.h>
#include <lisp/lisp-cp/lisp.api_types.h>
int unformat_lisp_eid_api (gid_address_t * dst, u32 vni, const vl_api_eid_t * eid);

View File

@ -16,7 +16,7 @@
option version = "2.0.0";
import "vnet/interface_types.api";
import "vnet/lisp-cp/lisp_types.api";
import "plugins/lisp/lisp-cp/lisp_types.api";
/** \brief add or delete locator_set
@param client_index - opaque cookie to identify the sender
@ -26,7 +26,7 @@ import "vnet/lisp-cp/lisp_types.api";
@param locator_num - number of locators
@param locators - locator records
*/
manual_endian manual_print define one_add_del_locator_set
define one_add_del_locator_set
{
u32 client_index;
u32 context;
@ -355,7 +355,7 @@ define show_one_map_request_mode_reply
@param rloc_num - number of remote locators
@param rlocs - remote locator records
*/
autoreply manual_print manual_endian define one_add_del_remote_mapping
autoreply define one_add_del_remote_mapping
{
u32 client_index;
u32 context;
@ -410,7 +410,7 @@ define one_l2_arp_entries_get
@param count - number of elements in the list
@param vl_api_one_arp_entry_t - list of entries
*/
manual_print manual_endian define one_l2_arp_entries_get_reply
define one_l2_arp_entries_get_reply
{
u32 context;
i32 retval;
@ -441,7 +441,7 @@ define one_ndp_entries_get
u32 bd;
};
manual_print manual_endian define one_ndp_entries_get_reply
define one_ndp_entries_get_reply
{
u32 context;
i32 retval;
@ -491,7 +491,7 @@ define one_ndp_bd_get
@param count - number of elements in the list
@param bridge_domains - list of BDs
*/
manual_print manual_endian define one_ndp_bd_get_reply
define one_ndp_bd_get_reply
{
u32 context;
i32 retval;
@ -514,7 +514,7 @@ define one_l2_arp_bd_get
@param count - number of elements in the list
@param bridge_domains - list of BDs
*/
manual_print manual_endian define one_l2_arp_bd_get_reply
define one_l2_arp_bd_get_reply
{
u32 context;
i32 retval;
@ -708,7 +708,7 @@ typedef one_adjacency
@param count - number of adjacencies
@param adjacencies - array of adjacencies
*/
manual_endian manual_print define one_adjacencies_get_reply
define one_adjacencies_get_reply
{
u32 context;
i32 retval;

View File

@ -22,43 +22,22 @@
#include <vnet/interface.h>
#include <vnet/api_errno.h>
#include <vnet/lisp-cp/control.h>
#include <vnet/lisp-gpe/lisp_gpe.h>
#include <lisp/lisp-cp/control.h>
#include <lisp/lisp-gpe/lisp_gpe.h>
#include <vnet/ip/ip_types_api.h>
#include <vnet/ethernet/ethernet_types_api.h>
#include <vnet/vnet_msg_enum.h>
/* define message IDs */
#include <vnet/format_fns.h>
#include <lisp/lisp-cp/one.api_enum.h>
#include <lisp/lisp-cp/one.api_types.h>
#define vl_api_one_add_del_locator_set_t_endian vl_noop_handler
#define vl_api_one_add_del_locator_set_t_print vl_noop_handler
#define vl_api_one_add_del_remote_mapping_t_endian vl_noop_handler
#define vl_api_one_add_del_remote_mapping_t_print vl_noop_handler
#define vl_api_one_add_del_locator_set_t_endian vl_noop_handler
#define vl_api_one_add_del_locator_set_t_print vl_noop_handler
#define vl_api_one_add_del_remote_mapping_t_endian vl_noop_handler
#define vl_api_one_add_del_remote_mapping_t_print vl_noop_handler
#define vl_api_one_add_del_l2_arp_entry vl_noop_handler
#define vl_api_one_l2_arp_bd_get vl_noop_handler
#define vl_api_one_ndp_entries_get_reply_t_endian vl_noop_handler
#define vl_api_one_ndp_entries_get_reply_t_print vl_noop_handler
#define vl_typedefs /* define message structures */
#include <vnet/vnet_all_api_h.h>
#undef vl_typedefs
#define vl_endianfun /* define message structures */
#include <vnet/vnet_all_api_h.h>
#undef vl_endianfun
/* instantiate all the print functions we know about */
#define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
#define vl_printfun
#include <vnet/vnet_all_api_h.h>
#undef vl_printfun
/**
* Base message ID fot the plugin
*/
static u32 one_base_msg_id;
#define REPLY_MSG_ID_BASE one_base_msg_id
#include <vlibapi/api_helper_macros.h>
@ -1695,43 +1674,28 @@ vl_api_one_show_petr_mode_t_handler (vl_api_one_show_petr_mode_t * mp)
* added the client registration handlers.
* See .../vlib-api/vlibmemory/memclnt_vlib.c:memclnt_process()
*/
#define vl_msg_name_crc_list
#include <vnet/vnet_all_api_h.h>
#undef vl_msg_name_crc_list
static void
setup_message_id_table (api_main_t * am)
{
#define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id);
foreach_vl_msg_name_crc_one;
#undef _
}
#include <lisp/lisp-cp/one.api.c>
static clib_error_t *
one_api_hookup (vlib_main_t * vm)
{
api_main_t *am = vlibapi_get_main ();
#define _(N,n) \
vl_msg_api_set_handlers(VL_API_##N, #n, \
vl_api_##n##_t_handler, \
vl_noop_handler, \
vl_api_##n##_t_endian, \
vl_api_##n##_t_print, \
sizeof(vl_api_##n##_t), 1);
foreach_vpe_api_msg;
#undef _
/*
* Set up the (msg_name, crc, message-id) table
*/
setup_message_id_table (am);
one_base_msg_id = setup_message_id_table ();
return 0;
}
VLIB_API_INIT_FUNCTION (one_api_hookup);
#include <vlib/unix/plugin.h>
#include <vpp/app/version.h>
/* *INDENT-OFF* */
VLIB_PLUGIN_REGISTER () = {
.version = VPP_BUILD_VER,
.description = "Locator ID Separation Protocol (LISP)",
};
/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON
*

View File

@ -13,8 +13,8 @@
* limitations under the License.
*/
#include <vnet/lisp-cp/control.h>
#include <vnet/lisp-gpe/lisp_gpe.h>
#include <lisp/lisp-cp/control.h>
#include <lisp/lisp-gpe/lisp_gpe.h>
static clib_error_t *
lisp_show_adjacencies_command_fn (vlib_main_t * vm,

File diff suppressed because it is too large Load Diff

View File

@ -13,8 +13,8 @@
* limitations under the License.
*/
#include <vnet/lisp-cp/packets.h>
#include <vnet/lisp-cp/lisp_cp_messages.h>
#include <lisp/lisp-cp/packets.h>
#include <lisp/lisp-cp/lisp_cp_messages.h>
#include <vnet/udp/udp_packet.h>
/* Returns IP ID for the packet */

View File

@ -14,7 +14,7 @@
*/
#include <vnet/vnet.h>
#include <vnet/lisp-cp/lisp_types.h>
#include <lisp/lisp-cp/lisp_types.h>
#define IP_DF 0x4000 /* don't fragment */

View File

@ -19,7 +19,7 @@
*/
#include <vlib/vlib.h>
#include <vnet/pg/pg.h>
#include <vnet/lisp-gpe/lisp_gpe.h>
#include <lisp/lisp-gpe/lisp_gpe.h>
typedef struct
{
@ -453,7 +453,7 @@ lisp_gpe_ip6_input (vlib_main_t * vm, vlib_node_runtime_t * node,
static char *lisp_gpe_ip4_input_error_strings[] = {
#define lisp_gpe_error(n,s) s,
#include <vnet/lisp-gpe/lisp_gpe_error.def>
#include <lisp/lisp-gpe/lisp_gpe_error.def>
#undef lisp_gpe_error
};

Some files were not shown because too many files have changed in this diff Show More