#[repr(u32)]pub enum RpcMessageType {
Show 16 variants
Create = 257,
Start = 513,
ShutdownGraceful = 769,
ShutdownForced = 1_025,
ExecuteProcess = 1_281,
WaitForProcess = 1_537,
SignalProcess = 1_793,
ResizeConsole = 2_049,
GetProperties = 2_305,
ModifySettings = 2_561,
NegotiateProtocol = 2_817,
DumpStacks = 3_073,
DeleteContainerState = 3_329,
UpdateContainer = 3_585,
LifecycleNotification = 3_841,
ModifyServiceSettings = 65_793,
}Expand description
RPC type codes for the ComputeSystem category.
Each value already encodes (iota+1)<<8 | 1 per hcsshim’s
RPCProc = Category | (iota+1)<<8 | 1 formula in
internal/gcs/prot/protocol.go, so a NegotiateProtocol REQUEST frame’s
wire type is exactly MSG_TYPE_REQUEST | CATEGORY_COMPUTE_SYSTEM | (rpc as u32) = 0x10100B01. An earlier iteration of this enum used
0x0001..=0x000A and was missing both the per-RPC (iota+1)<<8 byte
AND the MSG_TYPE_REQUEST marker, causing the in-guest GCS to close
the bridge the moment it saw a frame with an unrecognized type
(verified via gcs-bridge-reader: header read failed after 0 frame(s): bridge closed against nanoserver:ltsc2022 with the dep-override
applied).
Variants§
Create = 257
Start = 513
ShutdownGraceful = 769
ShutdownForced = 1_025
ExecuteProcess = 1_281
WaitForProcess = 1_537
SignalProcess = 1_793
ResizeConsole = 2_049
GetProperties = 2_305
ModifySettings = 2_561
NegotiateProtocol = 2_817
DumpStacks = 3_073
DeleteContainerState = 3_329
UpdateContainer = 3_585
LifecycleNotification = 3_841
ModifyServiceSettings = 65_793
RPCModifyServiceSettings — the ONLY RPC in hcsshim’s ComputeService
category (internal/gcs/prot/protocol.go):
RPCModifyServiceSettings RPCProc = ComputeService | (iota+1)<<8 | 1.
iota RESETS to 0 in that second const block, so the per-RPC byte is
(0+1)<<8 = 0x100 and the low 16 bits are 0x0101 — identical to
Create’s low bits, but it lives in a DIFFERENT category
(ComputeService = 0x0020_0000, not ComputeSystem = 0x0010_0000).
Used to drive the in-guest GCS log-forward service
(internal/uvm/log_wcow.go). Because the category differs, the
discriminant alone cannot be OR’d with CATEGORY_COMPUTE_SYSTEM —
RpcMessageType::as_request_type special-cases it. The discriminant
is offset into a private range so it does not numerically collide with
Create = 0x0101 inside the Rust enum.
Implementations§
Source§impl RpcMessageType
impl RpcMessageType
Sourcepub const fn as_request_type(self) -> u32
pub const fn as_request_type(self) -> u32
Encode as the on-wire request type u32: MSG_TYPE_REQUEST | category | rpc.
Sourcepub const fn as_response_type(self) -> u32
pub const fn as_response_type(self) -> u32
Encode as the expected on-wire response type u32:
MSG_TYPE_RESPONSE | category | rpc.
Trait Implementations§
Source§impl Clone for RpcMessageType
impl Clone for RpcMessageType
Source§fn clone(&self) -> RpcMessageType
fn clone(&self) -> RpcMessageType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for RpcMessageType
Source§impl Debug for RpcMessageType
impl Debug for RpcMessageType
impl Eq for RpcMessageType
Source§impl Hash for RpcMessageType
impl Hash for RpcMessageType
Source§impl PartialEq for RpcMessageType
impl PartialEq for RpcMessageType
Source§fn eq(&self, other: &RpcMessageType) -> bool
fn eq(&self, other: &RpcMessageType) -> bool
self and other values to be equal, and is used by ==.