Skip to main content

Module vsock

Module vsock 

Source
Expand description

Vsock Communication Layer

Host-to-guest communication via virtio-vsock for Firecracker microVMs. Uses a simple JSON-RPC protocol over length-prefixed messages.

Structs§

AgentRequest
Request sent from host to guest
AgentResponse
Response from guest to host
RunResult
Result of running a command in the guest
VsockClient
Vsock client for communicating with guest agent
VsockConnection
A persistent vsock connection that can be reused for multiple commands. This saves the overhead of reconnecting and re-handshaking for each command.

Enums§

RequestType
Request types supported by the guest agent
ShellEvent
Shell event types for async shell communication

Constants§

AGENT_PORT
Default port for the guest agent
HOST_CID
Host CID (always 2 for the host)

Functions§

wait_for_agent
Wait for the guest agent to become available