microsoft/openvmm
Publicmirrored from https://github.com/microsoft/openvmmAvailable
openhcl/diag_proto/src/lib.rs
25lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | //! The Underhill diagnostics server protocol definitions. |
| 5 | |
| 6 | #![expect(missing_docs)] |
| 7 | #![forbid(unsafe_code)] |
| 8 | #![expect(clippy::allow_attributes)] |
| 9 | |
| 10 | // Crates used by generated code. Reference them explicitly to ensure that |
| 11 | // automated tools do not remove them. |
| 12 | use inspect as _; |
| 13 | use mesh_rpc as _; |
| 14 | use prost as _; |
| 15 | |
| 16 | include!(concat!(env!("OUT_DIR"), "/diag.rs")); |
| 17 | |
| 18 | /// The AF_VSOCK port number the server runs on. |
| 19 | /// |
| 20 | /// Happens to be the address of Bag End. |
| 21 | pub const VSOCK_CONTROL_PORT: u32 = 1; |
| 22 | pub const VSOCK_DATA_PORT: u32 = 2; |
| 23 | |
| 24 | /// The maximum length of a file line. |
| 25 | pub const FILE_LINE_MAX: usize = 2048; |
| 26 | |