mod.rs 816 B

12345678910111213141516171819202122
  1. //! Driver for VirtIO socket devices.
  2. //!
  3. //! To use the driver, you should first create a [`VirtIOSocket`] instance with your VirtIO
  4. //! transport, and then create a [`VsockConnectionManager`] wrapping it to keep track of
  5. //! connections. If you only want to have a single outgoing vsock connection at once, you can use
  6. //! [`SingleConnectionManager`] for a slightly simpler interface.
  7. //!
  8. //! See [`VsockConnectionManager`] for a usage example.
  9. #[cfg(feature = "alloc")]
  10. mod connectionmanager;
  11. mod error;
  12. mod protocol;
  13. #[cfg(feature = "alloc")]
  14. mod vsock;
  15. #[cfg(feature = "alloc")]
  16. pub use connectionmanager::VsockConnectionManager;
  17. pub use error::SocketError;
  18. pub use protocol::{VsockAddr, VMADDR_CID_HOST};
  19. #[cfg(feature = "alloc")]
  20. pub use vsock::{DisconnectReason, VirtIOSocket, VsockEvent, VsockEventType};