From 728e03e344cad42bd8530cd053c81e6bf7fa0e79 Mon Sep 17 00:00:00 2001 From: Fredi Raspall Date: Wed, 5 Feb 2025 16:17:53 +0100 Subject: [PATCH] Add licensing heading Signed-off-by: Fredi Raspall --- routing/src/adjacency.rs | 5 +++++ routing/src/encapsulation.rs | 5 +++++ routing/src/errors.rs | 5 +++++ routing/src/interface.rs | 5 +++++ routing/src/lib.rs | 5 +++++ routing/src/nexthop.rs | 6 ++++++ routing/src/prefix.rs | 5 +++++ routing/src/rmac.rs | 5 +++++ 8 files changed, 41 insertions(+) diff --git a/routing/src/adjacency.rs b/routing/src/adjacency.rs index a492b680..c90b76cd 100644 --- a/routing/src/adjacency.rs +++ b/routing/src/adjacency.rs @@ -1,3 +1,8 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright Open Network Fabric Authors + +//! State objects to keep adjacency information + use crate::interface::IfIndex; use net::eth::mac::Mac; use std::collections::HashMap; diff --git a/routing/src/encapsulation.rs b/routing/src/encapsulation.rs index 2199e515..8688fce3 100644 --- a/routing/src/encapsulation.rs +++ b/routing/src/encapsulation.rs @@ -1,3 +1,8 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright Open Network Fabric Authors + +//! Objects to model packet encapsulations + use net::vxlan::Vni; use std::net::IpAddr; diff --git a/routing/src/errors.rs b/routing/src/errors.rs index c3c82684..19060928 100644 --- a/routing/src/errors.rs +++ b/routing/src/errors.rs @@ -1,3 +1,8 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright Open Network Fabric Authors + +//! The error results used by this library. + use thiserror::Error; #[allow(dead_code)] diff --git a/routing/src/interface.rs b/routing/src/interface.rs index a2b3a420..8788478f 100644 --- a/routing/src/interface.rs +++ b/routing/src/interface.rs @@ -1,3 +1,8 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright Open Network Fabric Authors + +//! State objects for network interfaces and interface table. + use crate::errors::RouterError; use net::eth::mac::Mac; use net::vlan::Vid; diff --git a/routing/src/lib.rs b/routing/src/lib.rs index 6c6ab233..a39ebab1 100644 --- a/routing/src/lib.rs +++ b/routing/src/lib.rs @@ -1,3 +1,8 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright Open Network Fabric Authors + +//! A library to implement routing functions. + mod adjacency; mod encapsulation; mod errors; diff --git a/routing/src/nexthop.rs b/routing/src/nexthop.rs index 7972241c..94fdecb7 100644 --- a/routing/src/nexthop.rs +++ b/routing/src/nexthop.rs @@ -1,3 +1,9 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright Open Network Fabric Authors + +//! Object definitions for (shared) routing next-hops. These +//! refer to other objects like Encapsulation. + use crate::encapsulation::Encapsulation; use std::cell::RefCell; use std::cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd}; diff --git a/routing/src/prefix.rs b/routing/src/prefix.rs index b9919330..35cd8b58 100644 --- a/routing/src/prefix.rs +++ b/routing/src/prefix.rs @@ -1,3 +1,8 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright Open Network Fabric Authors + +//! Type to represent IP-version neutral network prefixes. + use ipnet::{Ipv4Net, Ipv6Net}; use iptrie::{IpPrefix, Ipv4Prefix, Ipv6Prefix}; use std::fmt::Display; diff --git a/routing/src/rmac.rs b/routing/src/rmac.rs index 0d442e31..125b37f0 100644 --- a/routing/src/rmac.rs +++ b/routing/src/rmac.rs @@ -1,3 +1,8 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright Open Network Fabric Authors + +//! Submodule to implement a table of EVPN router macs. + use net::eth::mac::Mac; use net::vxlan::Vni; use std::collections::{hash_map::Entry, HashMap};