vm_websocket: Add websocket handler

On receiving a websocket request on endpoint /vm/0/0,
connect to the nbd-proxy app and send/receive stdio.

Tested: Verified that the host could see the virtual
media usb device, mounted it manually and checked
the contents of the iso file used for the test were
there. To test, used the html and js script:
https://github.com/openbmc/jsnbd/tree/master/web
and an Ubuntu iso image file.
Verified that it worked after closing the websocket
(using the stop function from the html file), to
check that the processes were cleaned up and freed
up for a subsequent request.

Change-Id: I0b070310b070c086d67d0ae3e2c165551d6b87cc
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3c801dc..8361e90 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,6 +10,9 @@
 
 option (BMCWEB_ENABLE_KVM "Enable the KVM host video WebSocket.  Path is
        '/kvm/0'.  Video is from the BMC's '/dev/video' device." ON)
+option (BMCWEB_ENABLE_VM_WEBSOCKET "Enable the Virtual Media WebSocket. Path is
+        '/vm/0/0'to open the websocket. See
+        https://github.com/openbmc/jsnbd/blob/master/README." ON)
 option (BMCWEB_ENABLE_DBUS_REST "Enable Phosphor REST (D-Bus) APIs.  Paths
        directly map Phosphor D-Bus object paths, for example,
        '/xyz/openbmc_project/logging/entry/enumerate'.  See
@@ -257,6 +260,7 @@
 target_compile_definitions (
     bmcweb PRIVATE
     $<$<BOOL:${BMCWEB_ENABLE_KVM}>: -DBMCWEB_ENABLE_KVM>
+    $<$<BOOL:${BMCWEB_ENABLE_VM_WEBSOCKET}>: -DBMCWEB_ENABLE_VM_WEBSOCKET>
     $<$<BOOL:${BMCWEB_ENABLE_DBUS_REST}>: -DBMCWEB_ENABLE_DBUS_REST>
     $<$<BOOL:${BMCWEB_ENABLE_REDFISH}>: -DBMCWEB_ENABLE_REDFISH>
     $<$<BOOL:${BMCWEB_ENABLE_STATIC_HOSTING}>: -DBMCWEB_ENABLE_STATIC_HOSTING>