Expand description
zlayer-overlayd — the standalone ZLayer overlay daemon.
This crate is the long-lived process that owns every mechanism touching the
overlay/network plane: the WireGuard/Wintun device + adapter, peers,
AllowedIPs/service subnets, IP allocation, DNS, NAT, Linux bridges +
veth/netns attach, and the Windows HCN Internal network + endpoints. The
main zlayer daemon keeps the cluster brain and drives overlayd over the
IPC contract in zlayer_types::overlayd.
Running overlayd as its own OS service decouples the overlay adapter’s
lifetime from the main binary: updating/reinstalling zlayer no longer
tears the adapter down, because overlayd is a separate process. The overlay
is removed only on a full uninstall.
§Layout
transport— length-prefixed JSON framing over UDS / named pipe.client—OverlaydClient, used by the main daemon (the agent’soverlay_managershim wraps it).server—OverlaydServer, the engine that executes everyOverlaydRequestby performing the same overlay mechanics the agent’sOverlayManagerdid (clusterWireGuardtransport, Linux bridges + veth/netns attach, Windows HCN Internal network + endpoints, IPAM, DNS, NAT).network_state— the on-disk marker for host-level networks (HCN).netlink— Linux RTNETLINK helpers for bridges, veth, routes, netns.
Re-exports§
pub use client::OverlaydClient;pub use error::OverlaydError;pub use error::Result;pub use error::MAX_FRAME_BYTES;pub use server::OverlaydServer;
Modules§
- client
- Client the main
zlayerdaemon uses to drive overlayd over IPC. - error
- Error type for the overlayd transport, server, and client.
- netlink
- Rust netlink helpers that replace shell-outs to
ip/nsenter/sysctlfor per-container overlay network setup. - network_
state - Persistent marker for host-level networks
ZLayercreates. - protocol
- The IPC wire contract, re-exported for convenience.
IPC wire protocol between the main
zlayerdaemon andzlayer-overlayd. - server
- The overlayd server engine.
- transport
- Length-prefixed JSON framing over a Unix domain socket (Unix) or a named pipe (Windows), plus the server accept loop and client connector.