hsa: move session-apps to host-stack apps plugin 05/20305/3
authorFlorin Coras <fcoras@cisco.com>
Tue, 25 Jun 2019 00:31:33 +0000 (17:31 -0700)
committerDave Wallace <dwallacelf@gmail.com>
Tue, 25 Jun 2019 14:25:54 +0000 (14:25 +0000)
Type:refactor

Change-Id: I114fea3a54258797e961d8627a99ba2098674d20
Signed-off-by: Florin Coras <fcoras@cisco.com>
MAINTAINERS
src/plugins/hs_apps/CMakeLists.txt [new file with mode: 0644]
src/plugins/hs_apps/echo_client.c [moved from src/vnet/session-apps/echo_client.c with 99% similarity]
src/plugins/hs_apps/echo_client.h [moved from src/vnet/session-apps/echo_client.h with 100% similarity]
src/plugins/hs_apps/echo_server.c [moved from src/vnet/session-apps/echo_server.c with 100% similarity]
src/plugins/hs_apps/hs_apps.c [new file with mode: 0644]
src/plugins/hs_apps/http_server.c [moved from src/vnet/session-apps/http_server.c with 100% similarity]
src/plugins/hs_apps/proxy.c [moved from src/vnet/session-apps/proxy.c with 99% similarity]
src/plugins/hs_apps/proxy.h [moved from src/vnet/session-apps/proxy.h with 100% similarity]
src/vnet/CMakeLists.txt

index 20f68f1..4e6ccd0 100644 (file)
@@ -408,6 +408,11 @@ M: Neale Ranns <nranns@cisco.com>
 M:     Mohsin Kazmi <sykazmi@cisco.com>
 F:     extras/vom/vom/
 
+Plugin - Host Stack Applications
+I:     hsa
+M:     Florin Coras <fcoras@cisco.com>
+F:     src/plugins/hs_apps/
+
 THE REST
 I:     misc
 C:     Contact vpp-dev Mailing List <vpp-dev@fd.io>
diff --git a/src/plugins/hs_apps/CMakeLists.txt b/src/plugins/hs_apps/CMakeLists.txt
new file mode 100644 (file)
index 0000000..d27c851
--- /dev/null
@@ -0,0 +1,21 @@
+# Copyright (c) 2019 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(hs_apps
+  SOURCES
+  echo_client.c
+  echo_server.c
+  hs_apps.c
+  http_server.c
+  proxy.c
+)
similarity index 99%
rename from src/vnet/session-apps/echo_client.c
rename to src/plugins/hs_apps/echo_client.c
index 24a3433..bcf4176 100644 (file)
@@ -18,7 +18,7 @@
 #include <vnet/vnet.h>
 #include <vlibapi/api.h>
 #include <vlibmemory/api.h>
-#include <vnet/session-apps/echo_client.h>
+#include <hs_apps/echo_client.h>
 
 echo_client_main_t echo_client_main;
 
diff --git a/src/plugins/hs_apps/hs_apps.c b/src/plugins/hs_apps/hs_apps.c
new file mode 100644 (file)
index 0000000..5067919
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2019 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 <vnet/vnet.h>
+#include <vnet/plugin/plugin.h>
+#include <vpp/app/version.h>
+
+/* *INDENT-OFF* */
+VLIB_PLUGIN_REGISTER () =
+{
+  .version = VPP_BUILD_VER,
+  .description = "Host Stack Applications",
+};
+/* *INDENT-ON* */
+
+/*
+ * fd.io coding-style-patch-verification: ON
+ *
+ * Local Variables:
+ * eval: (c-set-style "gnu")
+ * End:
+ */
similarity index 99%
rename from src/vnet/session-apps/proxy.c
rename to src/plugins/hs_apps/proxy.c
index 6542c16..31dbfc5 100644 (file)
@@ -17,7 +17,7 @@
 #include <vlibmemory/api.h>
 #include <vnet/session/application.h>
 #include <vnet/session/application_interface.h>
-#include <vnet/session-apps/proxy.h>
+#include <hs_apps/proxy.h>
 
 proxy_main_t proxy_main;
 
index 462ced4..467d82b 100644 (file)
@@ -1202,22 +1202,6 @@ list(APPEND VNET_HEADERS
 
 list(APPEND VNET_API_FILES session/session.api)
 
-##############################################################################
-# session layer applications
-##############################################################################
-
-list(APPEND VNET_SOURCES
-  session-apps/echo_client.c
-  session-apps/echo_server.c
-  session-apps/http_server.c
-  session-apps/proxy.c
-)
-
-list(APPEND VNET_HEADERS
-  session-apps/echo_client.h
-  session-apps/proxy.h
-)
-
 ##############################################################################
 # TLS protocol
 ##############################################################################