HomeFreeBSD

bhyve/snapshot: use SOCK_DGRAM instead of SOCK_STREAM

Description

bhyve/snapshot: use SOCK_DGRAM instead of SOCK_STREAM

The save/restore feature uses a unix domain socket to send messages
from bhyvectl(8) to a bhyve(8) process. A datagram socket will suffice
for this.

An added benefit of using a datagram socket is simplified code. For
bhyve, the listen/accept calls are dropped; and for bhyvectl, the
connect() call is dropped.

EPRINTLN handles raw mode for bhyve(8), use it to print error messages.

Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D28983

(cherry picked from commit 38dfb0626fd35c64b2e2d5faae2c90e7981a3307)

Details

Provenance
rewAuthored on Mar 8 2021, 12:23 AM
jhbCommitted on Jan 26 2023, 6:46 PM
Reviewer
jhb
Differential Revision
D28983: bhyve/snapshot: use SOCK_DGRAM instead of SOCK_STREAM
Parents
rGbcf297e86e16: bhyve/snapshot: rename and bump size of MAX_SNAPSHOT_VMNAME
Branches
Unknown
Tags
Unknown