Crate usb_vsock

Source
Expand description

A transport-agnostic library for implementing a vsock bridge over a usb bulk device.

Structs§

Address
An address for a vsock packet transmitted over USB. Since this library does not implement policy decisions, it includes all four components of a vsock address pair even though some may not be appropriate for some situations.
Connection
Manages the state of a vsock-over-usb connection and the sockets over which data is being transmitted for them.
ConnectionRequest
An outstanding connection request that needs to be either Connection::accepted or Connection::rejected.
ConnectionState
A handle for the state of a connection established with either Connection::connect or Connection::accept. Use this to get notified when the connection has been closed without needing to hold on to the Socket end.
Header
The packet header for a vsock packet passed over the usb vsock link. Each usb packet can contain one or more packets, each of which must start with a valid header and correct payload length.
Packet
A typed reference to the contents of a packet in a buffer.
PacketMut
A typed mutable reference to the contents of a packet in a buffer.
PacketTooBigError
the size of the packet would have been too large even if the buffer was empty
UsbPacketBuilder
Builds an aggregate usb packet out of vsock packets and gives readiness notifications when there is room to add another packet or data available to send.
VsockPacketIterator
Reads a sequence of vsock packets from a given usb packet buffer

Enums§

PacketType
The serializable enumeration of packet types that can be used over a usb vsock link. These roughly correspond to the state machine described by the fuchsia.hardware.vsock fidl library.

Traits§

PacketBuffer
A marker trait for types that are capable of being used as buffers for a Connection.