Hyper.Node.FireVMM.Agent.RelayDialer (Hyper v0.1.0)

Copy Markdown View Source

Connects to a Firecracker vsock Unix-domain socket and performs the host-initiated CONNECT/OK handshake, returning the open socket ready for use as a transparent byte pipe to the guest agent.

Firecracker exposes its guest vsock as a host UDS. Before the connection becomes a transparent pipe, the host must send "CONNECT <port>\n" and receive a line starting with "OK ". This module implements that handshake.

Summary

Functions

dial(vsock_uds, port, timeout_ms)

@spec dial(Path.t(), pos_integer(), non_neg_integer()) ::
  {:ok, :socket.socket()} | {:error, term()}