lldp: Move to plugin 67/28967/2
authorNeale Ranns <nranns@cisco.com>
Fri, 18 Sep 2020 12:58:40 +0000 (12:58 +0000)
committerOle Tr�an <otroan@employees.org>
Mon, 21 Sep 2020 15:34:56 +0000 (15:34 +0000)
Type: refactor

Change-Id: Ifd770ff4850e63474bf4682ad463021b03786b4b
Signed-off-by: Neale Ranns <nranns@cisco.com>
19 files changed:
src/plugins/lisp/lisp-cp/control_main.c [new file with mode: 0644]
src/plugins/lldp/CMakeLists.txt [new file with mode: 0644]
src/plugins/lldp/FEATURE.yaml [moved from src/vnet/lldp/FEATURE.yaml with 100% similarity]
src/plugins/lldp/dir.dox [moved from src/vnet/lldp/dir.dox with 100% similarity]
src/plugins/lldp/lldp.api [moved from src/vnet/lldp/lldp.api with 100% similarity]
src/plugins/lldp/lldp.h [moved from src/vnet/lldp/lldp.h with 100% similarity]
src/plugins/lldp/lldp_api.c [moved from src/vnet/lldp/lldp_api.c with 69% similarity]
src/plugins/lldp/lldp_cli.c [moved from src/vnet/lldp/lldp_cli.c with 99% similarity]
src/plugins/lldp/lldp_doc.md [moved from src/vnet/lldp/lldp_doc.md with 100% similarity]
src/plugins/lldp/lldp_input.c [moved from src/vnet/lldp/lldp_input.c with 99% similarity]
src/plugins/lldp/lldp_node.c [moved from src/vnet/lldp/lldp_node.c with 99% similarity]
src/plugins/lldp/lldp_node.h [moved from src/vnet/lldp/lldp_node.h with 99% similarity]
src/plugins/lldp/lldp_output.c [moved from src/vnet/lldp/lldp_output.c with 99% similarity]
src/plugins/lldp/lldp_protocol.h [moved from src/vnet/lldp/lldp_protocol.h with 100% similarity]
src/plugins/lldp/lldp_test.c [new file with mode: 0644]
src/vat/api_format.c
src/vnet/CMakeLists.txt
src/vnet/vnet_all_api_h.h
src/vpp/api/custom_dump.c

diff --git a/src/plugins/lisp/lisp-cp/control_main.c b/src/plugins/lisp/lisp-cp/control_main.c
new file mode 100644 (file)
index 0000000..0fa85de
--- /dev/null
@@ -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 (file)
index 0000000..98df0bb
--- /dev/null
@@ -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
+)
similarity index 100%
rename from src/vnet/lldp/lldp.h
rename to src/plugins/lldp/lldp.h
similarity index 69%
rename from src/vnet/lldp/lldp_api.c
rename to src/plugins/lldp/lldp_api.c
index ecb75bc..69eab69 100644 (file)
 
 #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
  *
similarity index 99%
rename from src/vnet/lldp/lldp_cli.c
rename to src/plugins/lldp/lldp_cli.c
index 5f63e4a..2a0891a 100644 (file)
@@ -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>
similarity index 99%
rename from src/vnet/lldp/lldp_input.c
rename to src/plugins/lldp/lldp_input.c
index cfae30e..327ef10 100644 (file)
@@ -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
similarity index 99%
rename from src/vnet/lldp/lldp_node.c
rename to src/plugins/lldp/lldp_node.c
index 043ca9f..dbb54af 100644 (file)
@@ -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>
 
similarity index 99%
rename from src/vnet/lldp/lldp_node.h
rename to src/plugins/lldp/lldp_node.h
index f9bc959..887a70f 100644 (file)
@@ -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
 {
similarity index 99%
rename from src/vnet/lldp/lldp_output.c
rename to src/plugins/lldp/lldp_output.c
index 9c171c5..dc03faf 100644 (file)
@@ -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/plugins/lldp/lldp_test.c b/src/plugins/lldp/lldp_test.c
new file mode 100644 (file)
index 0000000..661487c
--- /dev/null
@@ -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>
index 765f4f4..0d0ec59 100644 (file)
@@ -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)              \
@@ -19265,104 +19261,6 @@ api_p2p_ethernet_del (vat_main_t * vam)
   return ret;
 }
 
-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)
 {
@@ -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>")\
index a2b965b..8c315ce 100644 (file)
@@ -361,24 +361,6 @@ list(APPEND VNET_HEADERS
 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"
 ##############################################################################
index 88eaa85..9daf5e9 100644 (file)
@@ -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>
index 8772972..46beb68 100644 (file)
@@ -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)                        \