aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2020-09-18 12:58:40 +0000
committerOle Tr�an <otroan@employees.org>2020-09-21 15:34:56 +0000
commit3f9fdd98463bd926fc78a2b366875c929058e2db (patch)
treea38c26372ed7b1a433afbacf05e686044f1cf583 /src
parent4b1b13315a3c532d45fb41cc3ce34a48ad72a757 (diff)
lldp: Move to plugin
Type: refactor Change-Id: Ifd770ff4850e63474bf4682ad463021b03786b4b Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lisp/lisp-cp/control_main.c27
-rw-r--r--src/plugins/lldp/CMakeLists.txt32
-rw-r--r--src/plugins/lldp/FEATURE.yaml (renamed from src/vnet/lldp/FEATURE.yaml)0
-rw-r--r--src/plugins/lldp/dir.dox (renamed from src/vnet/lldp/dir.dox)0
-rw-r--r--src/plugins/lldp/lldp.api (renamed from src/vnet/lldp/lldp.api)0
-rw-r--r--src/plugins/lldp/lldp.h (renamed from src/vnet/lldp/lldp.h)0
-rw-r--r--src/plugins/lldp/lldp_api.c (renamed from src/vnet/lldp/lldp_api.c)70
-rw-r--r--src/plugins/lldp/lldp_cli.c (renamed from src/vnet/lldp/lldp_cli.c)6
-rw-r--r--src/plugins/lldp/lldp_doc.md (renamed from src/vnet/lldp/lldp_doc.md)0
-rw-r--r--src/plugins/lldp/lldp_input.c (renamed from src/vnet/lldp/lldp_input.c)4
-rw-r--r--src/plugins/lldp/lldp_node.c (renamed from src/vnet/lldp/lldp_node.c)2
-rw-r--r--src/plugins/lldp/lldp_node.h (renamed from src/vnet/lldp/lldp_node.h)2
-rw-r--r--src/plugins/lldp/lldp_output.c (renamed from src/vnet/lldp/lldp_output.c)2
-rw-r--r--src/plugins/lldp/lldp_protocol.h (renamed from src/vnet/lldp/lldp_protocol.h)0
-rw-r--r--src/plugins/lldp/lldp_test.c147
-rw-r--r--src/vat/api_format.c105
-rw-r--r--src/vnet/CMakeLists.txt18
-rw-r--r--src/vnet/vnet_all_api_h.h1
-rw-r--r--src/vpp/api/custom_dump.c43
19 files changed, 239 insertions, 220 deletions
diff --git a/src/plugins/lisp/lisp-cp/control_main.c b/src/plugins/lisp/lisp-cp/control_main.c
new file mode 100644
index 00000000000..0fa85deda9e
--- /dev/null
+++ b/src/plugins/lisp/lisp-cp/control_main.c
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2016 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 <lisp/lisp-cp/control.h>
+
+lisp_cp_main_t lisp_control_main;
+
+
+/*
+ * fd.io coding-style-patch-verification: ON
+ *
+ * Local Variables:
+ * eval: (c-set-style "gnu")
+ * End:
+ */
diff --git a/src/plugins/lldp/CMakeLists.txt b/src/plugins/lldp/CMakeLists.txt
new file mode 100644
index 00000000000..98df0bb0199
--- /dev/null
+++ b/src/plugins/lldp/CMakeLists.txt
@@ -0,0 +1,32 @@
+# 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.
+
+
+add_vpp_plugin(lldp
+ SOURCES
+ lldp_input.c
+ lldp_node.c
+ lldp_output.c
+ lldp_cli.c
+ lldp_api.c
+
+ API_FILES
+ lldp.api
+
+ INSTALL_HEADERS
+ lldp_protocol.h
+ lldp.h
+
+ API_TEST_SOURCES
+ lldp_test.c
+)
diff --git a/src/vnet/lldp/FEATURE.yaml b/src/plugins/lldp/FEATURE.yaml
index feda51ad4de..feda51ad4de 100644
--- a/src/vnet/lldp/FEATURE.yaml
+++ b/src/plugins/lldp/FEATURE.yaml
diff --git a/src/vnet/lldp/dir.dox b/src/plugins/lldp/dir.dox
index 84870f81901..84870f81901 100644
--- a/src/vnet/lldp/dir.dox
+++ b/src/plugins/lldp/dir.dox
diff --git a/src/vnet/lldp/lldp.api b/src/plugins/lldp/lldp.api
index 6be060b0dd1..6be060b0dd1 100644
--- a/src/vnet/lldp/lldp.api
+++ b/src/plugins/lldp/lldp.api
diff --git a/src/vnet/lldp/lldp.h b/src/plugins/lldp/lldp.h
index df03dcea6ce..df03dcea6ce 100644
--- a/src/vnet/lldp/lldp.h
+++ b/src/plugins/lldp/lldp.h
diff --git a/src/vnet/lldp/lldp_api.c b/src/plugins/lldp/lldp_api.c
index ecb75bcac4b..69eab6949c4 100644
--- a/src/vnet/lldp/lldp_api.c
+++ b/src/plugins/lldp/lldp_api.c
@@ -22,34 +22,25 @@
#include <vnet/interface.h>
#include <vnet/api_errno.h>
-#include <vnet/lldp/lldp.h>
+#include <lldp/lldp.h>
#include <vnet/ip/ip4_packet.h>
#include <vnet/ip/ip6_packet.h>
#include <vnet/ip/ip_types_api.h>
-#include <vnet/vnet_msg_enum.h>
+/* define message IDs */
+#include <vnet/format_fns.h>
+#include <lldp/lldp.api_enum.h>
+#include <lldp/lldp.api_types.h>
-#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 lldp_base_msg_id;
+#define REPLY_MSG_ID_BASE lldp_base_msg_id
#include <vlibapi/api_helper_macros.h>
-#define foreach_vpe_api_msg \
-_(LLDP_CONFIG, lldp_config) \
-_(SW_INTERFACE_SET_LLDP, sw_interface_set_lldp)
-
static void
vl_api_lldp_config_t_handler (vl_api_lldp_config_t * mp)
{
@@ -133,43 +124,32 @@ vl_api_sw_interface_set_lldp_t_handler (vl_api_sw_interface_set_lldp_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_lldp;
-#undef _
-}
+#include <lldp/lldp.api.c>
static clib_error_t *
lldp_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);
+ * Set up the (msg_name, crc, message-id) table
+ */
+ lldp_base_msg_id = setup_message_id_table ();
return 0;
}
VLIB_API_INIT_FUNCTION (lldp_api_hookup);
+#include <vlib/unix/plugin.h>
+#include <vpp/app/version.h>
+
+/* *INDENT-OFF* */
+VLIB_PLUGIN_REGISTER () = {
+ .version = VPP_BUILD_VER,
+ .description = "Link Layer Discovery Protocol (LLDP)",
+};
+/* *INDENT-ON* */
+
+
/*
* fd.io coding-style-patch-verification: ON
*
diff --git a/src/vnet/lldp/lldp_cli.c b/src/plugins/lldp/lldp_cli.c
index 5f63e4a2e4f..2a0891a2e48 100644
--- a/src/vnet/lldp/lldp_cli.c
+++ b/src/plugins/lldp/lldp_cli.c
@@ -19,9 +19,9 @@
*
*/
#include <vnet/ethernet/ethernet.h>
-#include <vnet/lisp-cp/lisp_types.h>
-#include <vnet/lldp/lldp.h>
-#include <vnet/lldp/lldp_node.h>
+#include <vnet/ip/ip.h>
+#include <lldp/lldp.h>
+#include <lldp/lldp_node.h>
#ifndef ETHER_ADDR_LEN
#include <net/ethernet.h>
diff --git a/src/vnet/lldp/lldp_doc.md b/src/plugins/lldp/lldp_doc.md
index 717de898c4e..717de898c4e 100644
--- a/src/vnet/lldp/lldp_doc.md
+++ b/src/plugins/lldp/lldp_doc.md
diff --git a/src/vnet/lldp/lldp_input.c b/src/plugins/lldp/lldp_input.c
index cfae30e32ca..327ef10f9de 100644
--- a/src/vnet/lldp/lldp_input.c
+++ b/src/plugins/lldp/lldp_input.c
@@ -16,8 +16,8 @@
* @file
* @brief LLDP packet parsing implementation
*/
-#include <vnet/lldp/lldp_node.h>
-#include <vnet/lldp/lldp_protocol.h>
+#include <lldp/lldp_node.h>
+#include <lldp/lldp_protocol.h>
#include <vlibmemory/api.h>
typedef struct
diff --git a/src/vnet/lldp/lldp_node.c b/src/plugins/lldp/lldp_node.c
index 043ca9f01b5..dbb54af91f0 100644
--- a/src/vnet/lldp/lldp_node.c
+++ b/src/plugins/lldp/lldp_node.c
@@ -16,7 +16,7 @@
* @file
* @brief LLDP nodes implementation
*/
-#include <vnet/lldp/lldp_node.h>
+#include <lldp/lldp_node.h>
#include <vnet/ethernet/ethernet.h>
#include <vnet/ethernet/packet.h>
diff --git a/src/vnet/lldp/lldp_node.h b/src/plugins/lldp/lldp_node.h
index f9bc9599827..887a70f137f 100644
--- a/src/vnet/lldp/lldp_node.h
+++ b/src/plugins/lldp/lldp_node.h
@@ -25,7 +25,7 @@
#include <vppinfra/format.h>
#include <vppinfra/hash.h>
-#include <vnet/lldp/lldp_protocol.h>
+#include <lldp/lldp_protocol.h>
typedef struct lldp_intf
{
diff --git a/src/vnet/lldp/lldp_output.c b/src/plugins/lldp/lldp_output.c
index 9c171c5da7b..dc03faf4d5c 100644
--- a/src/vnet/lldp/lldp_output.c
+++ b/src/plugins/lldp/lldp_output.c
@@ -16,7 +16,7 @@
* @file
* @brief LLDP packet generation implementation
*/
-#include <vnet/lldp/lldp_node.h>
+#include <lldp/lldp_node.h>
static void
lldp_build_mgmt_addr_tlv (u8 ** t0p, u8 subtype, u8 addr_len, u8 * addr,
diff --git a/src/vnet/lldp/lldp_protocol.h b/src/plugins/lldp/lldp_protocol.h
index e641b26e20d..e641b26e20d 100644
--- a/src/vnet/lldp/lldp_protocol.h
+++ b/src/plugins/lldp/lldp_protocol.h
diff --git a/src/plugins/lldp/lldp_test.c b/src/plugins/lldp/lldp_test.c
new file mode 100644
index 00000000000..661487c7835
--- /dev/null
+++ b/src/plugins/lldp/lldp_test.c
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 2015 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>
+#include <vppinfra/error.h>
+
+#include <vnet/ip/ip.h>
+#include <vnet/ip/ip_format_fns.h>
+#include <vnet/ethernet/ethernet_format_fns.h>
+
+/* define message IDs */
+#include <lldp/lldp.api_enum.h>
+#include <lldp/lldp.api_types.h>
+
+typedef struct
+{
+ /* API message ID base */
+ u16 msg_id_base;
+ vat_main_t *vat_main;
+} lldp_test_main_t;
+
+lldp_test_main_t lldp_test_main;
+
+#define __plugin_msg_base lldp_test_main.msg_id_base
+#include <vlibapi/vat_helper_macros.h>
+
+/* Macro to finish up custom dump fns */
+#define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
+#define FINISH \
+ vec_add1 (s, 0); \
+ vl_print (handle, (char *)s); \
+ vec_free (s); \
+ return handle;
+
+static int
+api_lldp_config (vat_main_t * vam)
+{
+ unformat_input_t *i = vam->input;
+ vl_api_lldp_config_t *mp;
+ int tx_hold = 0;
+ int tx_interval = 0;
+ u8 *sys_name = NULL;
+ int ret;
+
+ while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
+ {
+ if (unformat (i, "system-name %s", &sys_name))
+ ;
+ else if (unformat (i, "tx-hold %d", &tx_hold))
+ ;
+ else if (unformat (i, "tx-interval %d", &tx_interval))
+ ;
+ else
+ {
+ clib_warning ("parse error '%U'", format_unformat_error, i);
+ return -99;
+ }
+ }
+
+ vec_add1 (sys_name, 0);
+
+ M (LLDP_CONFIG, mp);
+ mp->tx_hold = htonl (tx_hold);
+ mp->tx_interval = htonl (tx_interval);
+ vl_api_vec_to_api_string (sys_name, &mp->system_name);
+ vec_free (sys_name);
+
+ S (mp);
+ W (ret);
+ return ret;
+}
+
+static int
+api_sw_interface_set_lldp (vat_main_t * vam)
+{
+ unformat_input_t *i = vam->input;
+ vl_api_sw_interface_set_lldp_t *mp;
+ u32 sw_if_index = ~0;
+ u32 enable = 1;
+ u8 *port_desc = NULL, *mgmt_oid = NULL;
+ ip4_address_t ip4_addr;
+ ip6_address_t ip6_addr;
+ int ret;
+
+ clib_memset (&ip4_addr, 0, sizeof (ip4_addr));
+ clib_memset (&ip6_addr, 0, sizeof (ip6_addr));
+
+ while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
+ {
+ if (unformat (i, "disable"))
+ enable = 0;
+ else
+ if (unformat (i, "%U", unformat_sw_if_index, vam, &sw_if_index))
+ ;
+ else if (unformat (i, "sw_if_index %d", &sw_if_index))
+ ;
+ else if (unformat (i, "port-desc %s", &port_desc))
+ ;
+ else if (unformat (i, "mgmt-ip4 %U", unformat_ip4_address, &ip4_addr))
+ ;
+ else if (unformat (i, "mgmt-ip6 %U", unformat_ip6_address, &ip6_addr))
+ ;
+ else if (unformat (i, "mgmt-oid %s", &mgmt_oid))
+ ;
+ else
+ break;
+ }
+
+ if (sw_if_index == ~0)
+ {
+ errmsg ("missing interface name or sw_if_index");
+ return -99;
+ }
+
+ /* Construct the API message */
+ vec_add1 (port_desc, 0);
+ vec_add1 (mgmt_oid, 0);
+ M (SW_INTERFACE_SET_LLDP, mp);
+ mp->sw_if_index = ntohl (sw_if_index);
+ mp->enable = enable;
+ vl_api_vec_to_api_string (port_desc, &mp->port_desc);
+ clib_memcpy (mp->mgmt_oid, mgmt_oid, vec_len (mgmt_oid));
+ clib_memcpy (mp->mgmt_ip4, &ip4_addr, sizeof (ip4_addr));
+ clib_memcpy (mp->mgmt_ip6, &ip6_addr, sizeof (ip6_addr));
+ vec_free (port_desc);
+ vec_free (mgmt_oid);
+
+ S (mp);
+ W (ret);
+ return ret;
+}
+
+#include <lldp/lldp.api_test.c>
diff --git a/src/vat/api_format.c b/src/vat/api_format.c
index 765f4f4e7da..0d0ec59d1f8 100644
--- a/src/vat/api_format.c
+++ b/src/vat/api_format.c
@@ -5196,8 +5196,6 @@ _(sw_interface_add_del_mac_address_reply) \
_(hw_interface_set_mtu_reply) \
_(p2p_ethernet_add_reply) \
_(p2p_ethernet_del_reply) \
-_(lldp_config_reply) \
-_(sw_interface_set_lldp_reply) \
_(tcp_configure_src_addresses_reply) \
_(session_rule_add_del_reply) \
_(ip_container_proxy_add_del_reply) \
@@ -5492,8 +5490,6 @@ _(HW_INTERFACE_SET_MTU_REPLY, hw_interface_set_mtu_reply) \
_(SW_INTERFACE_GET_TABLE_REPLY, sw_interface_get_table_reply) \
_(P2P_ETHERNET_ADD_REPLY, p2p_ethernet_add_reply) \
_(P2P_ETHERNET_DEL_REPLY, p2p_ethernet_del_reply) \
-_(LLDP_CONFIG_REPLY, lldp_config_reply) \
-_(SW_INTERFACE_SET_LLDP_REPLY, sw_interface_set_lldp_reply) \
_(TCP_CONFIGURE_SRC_ADDRESSES_REPLY, tcp_configure_src_addresses_reply) \
_(APP_NAMESPACE_ADD_DEL_REPLY, app_namespace_add_del_reply) \
_(SESSION_RULE_ADD_DEL_REPLY, session_rule_add_del_reply) \
@@ -19266,104 +19262,6 @@ api_p2p_ethernet_del (vat_main_t * vam)
}
static int
-api_lldp_config (vat_main_t * vam)
-{
- unformat_input_t *i = vam->input;
- vl_api_lldp_config_t *mp;
- int tx_hold = 0;
- int tx_interval = 0;
- u8 *sys_name = NULL;
- int ret;
-
- while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
- {
- if (unformat (i, "system-name %s", &sys_name))
- ;
- else if (unformat (i, "tx-hold %d", &tx_hold))
- ;
- else if (unformat (i, "tx-interval %d", &tx_interval))
- ;
- else
- {
- clib_warning ("parse error '%U'", format_unformat_error, i);
- return -99;
- }
- }
-
- vec_add1 (sys_name, 0);
-
- M (LLDP_CONFIG, mp);
- mp->tx_hold = htonl (tx_hold);
- mp->tx_interval = htonl (tx_interval);
- vl_api_vec_to_api_string (sys_name, &mp->system_name);
- vec_free (sys_name);
-
- S (mp);
- W (ret);
- return ret;
-}
-
-static int
-api_sw_interface_set_lldp (vat_main_t * vam)
-{
- unformat_input_t *i = vam->input;
- vl_api_sw_interface_set_lldp_t *mp;
- u32 sw_if_index = ~0;
- u32 enable = 1;
- u8 *port_desc = NULL, *mgmt_oid = NULL;
- ip4_address_t ip4_addr;
- ip6_address_t ip6_addr;
- int ret;
-
- clib_memset (&ip4_addr, 0, sizeof (ip4_addr));
- clib_memset (&ip6_addr, 0, sizeof (ip6_addr));
-
- while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
- {
- if (unformat (i, "disable"))
- enable = 0;
- else
- if (unformat (i, "%U", api_unformat_sw_if_index, vam, &sw_if_index))
- ;
- else if (unformat (i, "sw_if_index %d", &sw_if_index))
- ;
- else if (unformat (i, "port-desc %s", &port_desc))
- ;
- else if (unformat (i, "mgmt-ip4 %U", unformat_ip4_address, &ip4_addr))
- ;
- else if (unformat (i, "mgmt-ip6 %U", unformat_ip6_address, &ip6_addr))
- ;
- else if (unformat (i, "mgmt-oid %s", &mgmt_oid))
- ;
- else
- break;
- }
-
- if (sw_if_index == ~0)
- {
- errmsg ("missing interface name or sw_if_index");
- return -99;
- }
-
- /* Construct the API message */
- vec_add1 (port_desc, 0);
- vec_add1 (mgmt_oid, 0);
- M (SW_INTERFACE_SET_LLDP, mp);
- mp->sw_if_index = ntohl (sw_if_index);
- mp->enable = enable;
- vl_api_vec_to_api_string (port_desc, &mp->port_desc);
- clib_memcpy (mp->mgmt_oid, mgmt_oid, vec_len (mgmt_oid));
- clib_memcpy (mp->mgmt_ip4, &ip4_addr, sizeof (ip4_addr));
- clib_memcpy (mp->mgmt_ip6, &ip6_addr, sizeof (ip6_addr));
- vec_free (port_desc);
- vec_free (mgmt_oid);
-
- S (mp);
- W (ret);
- return ret;
-}
-
-static int
api_tcp_configure_src_addresses (vat_main_t * vam)
{
vl_api_tcp_configure_src_addresses_t *mp;
@@ -20797,9 +20695,6 @@ _(hw_interface_set_mtu, "<intfc> | hw_if_index <nn> mtu <nn>") \
_(sw_interface_get_table, "<intfc> | sw_if_index <id> [ipv6]") \
_(p2p_ethernet_add, "<intfc> | sw_if_index <nn> remote_mac <mac-address> sub_id <id>") \
_(p2p_ethernet_del, "<intfc> | sw_if_index <nn> remote_mac <mac-address>") \
-_(lldp_config, "system-name <name> tx-hold <nn> tx-interval <nn>") \
-_(sw_interface_set_lldp, "<intfc> | sw_if_index <nn> [port-desc <description>]\n" \
- " [mgmt-ip4 <ip4>] [mgmt-ip6 <ip6>] [mgmt-oid <object id>] [disable]") \
_(tcp_configure_src_addresses, "<ip4|6>first-<ip4|6>last [vrf <id>]") \
_(sock_init_shm, "size <nnn>") \
_(app_namespace_add_del, "[add] id <ns-id> secret <nn> sw_if_index <nn>")\
diff --git a/src/vnet/CMakeLists.txt b/src/vnet/CMakeLists.txt
index a2b965bed33..8c315ce5d73 100644
--- a/src/vnet/CMakeLists.txt
+++ b/src/vnet/CMakeLists.txt
@@ -362,24 +362,6 @@ list(APPEND VNET_MULTIARCH_SOURCES bonding/node.c bonding/device.c)
list(APPEND VNET_API_FILES bonding/bond.api)
##############################################################################
-# Layer 2 / LLDP
-##############################################################################
-list(APPEND VNET_SOURCES
- lldp/lldp_input.c
- lldp/lldp_node.c
- lldp/lldp_output.c
- lldp/lldp_cli.c
- lldp/lldp_api.c
-)
-
-list(APPEND VNET_HEADERS
- lldp/lldp_protocol.h
- lldp/lldp.h
-)
-
-list(APPEND VNET_API_FILES lldp/lldp.api)
-
-##############################################################################
# Layer 2/3 "classify"
##############################################################################
list(APPEND VNET_SOURCES
diff --git a/src/vnet/vnet_all_api_h.h b/src/vnet/vnet_all_api_h.h
index 88eaa851136..9daf5e95b4d 100644
--- a/src/vnet/vnet_all_api_h.h
+++ b/src/vnet/vnet_all_api_h.h
@@ -44,7 +44,6 @@
#include <vnet/span/span.api.h>
#include <vnet/ip/ip.api.h>
#include <vnet/vxlan/vxlan.api.h>
-#include <vnet/lldp/lldp.api.h>
#include <vnet/vxlan-gpe/vxlan_gpe.api.h>
#include <vnet/bfd/bfd.api.h>
#include <vnet/ipsec/ipsec.api.h>
diff --git a/src/vpp/api/custom_dump.c b/src/vpp/api/custom_dump.c
index 87729721fea..46beb685810 100644
--- a/src/vpp/api/custom_dump.c
+++ b/src/vpp/api/custom_dump.c
@@ -3410,47 +3410,6 @@ static void *vl_api_app_namespace_add_del_t_print
FINISH;
}
-static void *vl_api_sw_interface_set_lldp_t_print
- (vl_api_sw_interface_set_lldp_t * mp, void *handle)
-{
- u8 *s;
- u8 null_data[256];
-
- clib_memset (null_data, 0, sizeof (null_data));
-
- s = format (0, "SCRIPT: sw_interface_set_lldp ");
- s = format (s, "sw_if_index %d ", (mp->sw_if_index));
-
- if (memcmp (&mp->port_desc, null_data, sizeof (mp->port_desc)))
- s = format (s, "port_desc %s ", mp->port_desc);
-
- if (memcmp (mp->mgmt_ip4, null_data, sizeof (mp->mgmt_ip4)))
- s = format (s, "mgmt_ip4 %U ", format_ip4_address, mp->mgmt_ip4);
-
- if (memcmp (mp->mgmt_ip6, null_data, sizeof (mp->mgmt_ip6)))
- s = format (s, "mgmt_ip6 %U ", format_ip6_address, mp->mgmt_ip6);
-
- if (memcmp (mp->mgmt_oid, null_data, sizeof (mp->mgmt_oid)))
- s = format (s, "mgmt_oid %s ", mp->mgmt_oid);
-
- if (mp->enable == 0)
- s = format (s, "disable ");
-
- FINISH;
-}
-
-static void *vl_api_lldp_config_t_print
- (vl_api_lldp_config_t * mp, void *handle)
-{
- u8 *s;
-
- s = format (0, "SCRIPT: lldp_config ");
- s = format (s, "system_name %s ", mp->system_name);
- s = format (s, "tx_hold %d ", (mp->tx_hold));
- s = format (s, "tx_interval %d ", (mp->tx_interval));
- FINISH;
-}
-
static void *vl_api_session_rule_add_del_t_print
(vl_api_session_rule_add_del_t * mp, void *handle)
{
@@ -3717,8 +3676,6 @@ _(P2P_ETHERNET_ADD, p2p_ethernet_add) \
_(P2P_ETHERNET_DEL, p2p_ethernet_del) \
_(TCP_CONFIGURE_SRC_ADDRESSES, tcp_configure_src_addresses) \
_(APP_NAMESPACE_ADD_DEL, app_namespace_add_del) \
-_(LLDP_CONFIG, lldp_config) \
-_(SW_INTERFACE_SET_LLDP, sw_interface_set_lldp) \
_(SESSION_RULE_ADD_DEL, session_rule_add_del) \
_(OUTPUT_ACL_SET_INTERFACE, output_acl_set_interface) \
_(QOS_RECORD_ENABLE_DISABLE, qos_record_enable_disable) \