[rialto] Add communication protocol library for host and rialto

This cl adds a communication protocol library that includes
Request and Response definitions for communication between the
host and rialto. The Request and Response messages are
(de)serialized in CBOR format and exchanged via vsock, enabling
the handling of partial packets.

In addition, an end-to-end test has been included to cover this
functionality. The test verifies the following steps that
correspond to the intended usage of the library:

- The host sends a Request to rialto serialized in CBOR.
- rialto deserializes the Request, executes it, and prepares a
Response.
- rialto sends the Response to the host serialized in CBOR.
- The host deserializes the Response.

Bug: 291732060
Test: atest rialto_test
Change-Id: I5f6412949e34b2431d060703e6dea1b96c92fde5
diff --git a/rialto/src/main.rs b/rialto/src/main.rs
index 5c6649a..1c5090a 100644
--- a/rialto/src/main.rs
+++ b/rialto/src/main.rs
@@ -23,7 +23,7 @@
 
 extern crate alloc;
 
-use crate::communication::DataChannel;
+use crate::communication::VsockStream;
 use crate::error::{Error, Result};
 use core::num::NonZeroUsize;
 use core::slice;
@@ -31,6 +31,7 @@
 use hyp::{get_mem_sharer, get_mmio_guard};
 use libfdt::FdtError;
 use log::{debug, error, info};
+use service_vm_comm::{Request, Response};
 use virtio_drivers::{
     device::socket::VsockAddr,
     transport::{pci::bus::PciRoot, DeviceType, Transport},
@@ -137,10 +138,12 @@
     let socket_device = find_socket_device::<HalImpl>(&mut pci_root)?;
     debug!("Found socket device: guest cid = {:?}", socket_device.guest_cid());
 
-    let mut data_channel = DataChannel::from(socket_device);
-    data_channel.connect(host_addr())?;
-    data_channel.handle_incoming_request()?;
-    data_channel.force_close()?;
+    let mut vsock_stream = VsockStream::new(socket_device, host_addr())?;
+    let response = match vsock_stream.read_request()? {
+        Request::Reverse(v) => Response::Reverse(v.into_iter().rev().collect()),
+    };
+    vsock_stream.write_response(&response)?;
+    vsock_stream.shutdown()?;
 
     Ok(())
 }