scion_proto/lib.rs
1// Copyright 2025 Mysten Labs
2// Copyright 2025 Anapaya Systems
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16//! Protocol-level types for an endhost in the SCION Internet architecture
17//!
18//! [SCION][scion-net] is an Internet architecture that provides path-aware, end-to-end
19//! communication, with failure isolation and explicit trust information. Within the SCION network,
20//! [*autonomous systems* (ASes)](https://docs.scion.org/en/latest/glossary.html#term-AS), in which
21//! endhosts reside, are organized into independent routing groups called
22//! [*isolation domains* (ISDs)][isd].
23//!
24//! This crate provides Rust implementations of the core types used by endhosts within the SCION
25//! network:
26//!
27//! - [addresses][address] which identify ISDs, ASes, and endhosts;
28//! - [paths][path] which allow a user to choose the route taken by their packets through the
29//! network and provide information about those routes;
30//! - [SCION packet][packet] and [UDP datagram][datagram] implementations for encoding packets on
31//! the wire;
32//! - [control messages][scmp] for sending informational and error control messages to endhosts and
33//! routers in the network; and
34//! - [parsing logic][reliable] for the endhost-to-SCION-dispatcher communication.
35//! - [control plane][control_plane] for implementing the SCION control plane.
36//!
37//! This crate does not perform any I/O. See the [**scion**](../scion/index.html) crate for
38//! (asynchronous) socket implementations that use these types.
39//!
40//! [scion-net]: https://scion-architecture.net/
41//! [scionproto-github]: https://github.com/scionproto/scion
42//! [isd]: https://docs.scion.org/en/latest/overview.html#isolation-domains-isds
43
44pub mod address;
45pub mod control_plane;
46pub mod datagram;
47pub mod packet;
48pub mod path;
49pub mod reliable;
50pub mod scmp;
51pub mod test;
52pub mod wire_encoding;
53
54pub(crate) mod utils;
55
56#[cfg(test)]
57pub(crate) mod test_utils;