diff --git a/holo-ldp/src/packet/message.rs b/holo-ldp/src/packet/message.rs index cf7b9ff4..f502e93b 100644 --- a/holo-ldp/src/packet/message.rs +++ b/holo-ldp/src/packet/message.rs @@ -31,15 +31,15 @@ use crate::packet::DecodeCxt; // | Message ID | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // | | -// + + +// + + // | Mandatory Parameters | -// + + +// + + // | | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // | | -// + + +// + + // | Optional Parameters | -// + + +// + + // | | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // diff --git a/holo-ldp/src/packet/messages/initialization.rs b/holo-ldp/src/packet/messages/initialization.rs index ca312f70..f69144d8 100644 --- a/holo-ldp/src/packet/messages/initialization.rs +++ b/holo-ldp/src/packet/messages/initialization.rs @@ -66,7 +66,7 @@ pub struct InitMsg { // |A|D| Reserved | PVLim | Max PDU Length | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // | Receiver LDP Identifier | -// + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +// + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // | | // -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++ // diff --git a/holo-ldp/src/packet/pdu.rs b/holo-ldp/src/packet/pdu.rs index ddda4b4b..0113c54f 100644 --- a/holo-ldp/src/packet/pdu.rs +++ b/holo-ldp/src/packet/pdu.rs @@ -27,7 +27,7 @@ use crate::packet::DecodeCxt; // | Version | PDU Length | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // | LDP Identifier | -// + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +// + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // | | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // diff --git a/holo-ospf/src/lib.rs b/holo-ospf/src/lib.rs index 1296a34e..c02a99f3 100644 --- a/holo-ospf/src/lib.rs +++ b/holo-ospf/src/lib.rs @@ -13,7 +13,7 @@ #![allow(type_alias_bounds)] #![feature(btree_extract_if, hash_extract_if, ip, let_chains, lazy_cell)] - pub mod area; +pub mod area; pub mod collections; pub mod debug; pub mod error; diff --git a/holo-ospf/src/ospfv3/packet/lsa.rs b/holo-ospf/src/ospfv3/packet/lsa.rs index fd92db67..edfec726 100644 --- a/holo-ospf/src/ospfv3/packet/lsa.rs +++ b/holo-ospf/src/ospfv3/packet/lsa.rs @@ -345,9 +345,9 @@ pub struct AdjSid { // +-+-+-+--+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // | 0 |Nt|x|V|E|B| Options | // +-+-+-+--+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// . . -// . TLVs . -// . . +// . . +// . TLVs . +// . . // +-+-+-+--+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // // Router-Link TLV. @@ -367,9 +367,9 @@ pub struct AdjSid { // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // | Neighbor Router ID | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// . . -// . Sub-TLVs . -// . . +// . . +// . Sub-TLVs . +// . . // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // #[derive(Clone, Debug, Eq, new, PartialEq)] @@ -447,9 +447,9 @@ pub struct LsaRouterLink { // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // | 0 | Options | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// . . -// . TLVs . -// . . +// . . +// . TLVs . +// . . // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // // Attached-Routers TLV. @@ -463,9 +463,9 @@ pub struct LsaRouterLink { // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // | Adjacent Neighbor Router ID | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// . . -// . Additional Adjacent Neighbors . -// . . +// . . +// . Additional Adjacent Neighbors . +// . . // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // #[derive(Clone, Debug, Eq, new, PartialEq)] @@ -501,9 +501,9 @@ pub struct LsaNetwork { // 0 1 2 3 // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// . . -// . TLVs . -// . . +// . . +// . TLVs . +// . . // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // // Inter-Area-Prefix TLV. @@ -522,9 +522,9 @@ pub struct LsaNetwork { // | Address Prefix | // | ... | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// . . -// . Sub-TLVs . -// . . +// . . +// . Sub-TLVs . +// . . // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // #[derive(Clone, Debug, Eq, new, PartialEq)] @@ -563,9 +563,9 @@ pub struct LsaInterAreaPrefix { // 0 1 2 3 // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// . . -// . TLVs . -// . . +// . . +// . TLVs . +// . . // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // // Inter-Area-Router TLV. @@ -583,9 +583,9 @@ pub struct LsaInterAreaPrefix { // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // | Destination Router ID | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// . . -// . Sub-TLVs . -// . . +// . . +// . Sub-TLVs . +// . . // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // #[derive(Clone, Debug, Eq, new, PartialEq)] @@ -636,9 +636,9 @@ pub struct LsaInterAreaRouter { // 0 1 2 3 // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// . . -// . TLVs . -// . . +// . . +// . TLVs . +// . . // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // // External-Prefix TLV. @@ -657,9 +657,9 @@ pub struct LsaInterAreaRouter { // | Address Prefix | // | ... | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// . . -// . Sub-TLVs . -// . . +// . . +// . Sub-TLVs . +// . . // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // #[derive(Clone, Debug, Eq, new, PartialEq)] @@ -735,9 +735,9 @@ bitflags! { // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // | Rtr Priority | Options | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// . . -// . TLVs . -// . . +// . . +// . TLVs . +// . . // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // // IPv6 Link-Local Address TLV. @@ -757,9 +757,9 @@ bitflags! { // +- -+ // | | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// . . -// . Sub-TLVs . -// . . +// . . +// . Sub-TLVs . +// . . // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // // IPv4 Link-Local Address TLV. @@ -773,9 +773,9 @@ bitflags! { // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // | IPv4 Link-Local Interface Address | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// . . -// . Sub-TLVs . -// . . +// . . +// . Sub-TLVs . +// . . // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // #[derive(Clone, Debug, Eq, new, PartialEq)] @@ -839,9 +839,9 @@ pub struct LsaLinkPrefix { // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // | Referenced Advertising Router | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// . . -// . TLVs . -// . . +// . . +// . TLVs . +// . . // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // // Intra-Area-Prefix TLV. @@ -860,9 +860,9 @@ pub struct LsaLinkPrefix { // | Address Prefix | // | ... | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// . . -// . Sub-TLVs . -// . . +// . . +// . Sub-TLVs . +// . . // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // #[derive(Clone, Debug, Eq, new, PartialEq)] diff --git a/holo-ospf/src/packet/tlv.rs b/holo-ospf/src/packet/tlv.rs index ab80a583..b8df630d 100644 --- a/holo-ospf/src/packet/tlv.rs +++ b/holo-ospf/src/packet/tlv.rs @@ -122,7 +122,7 @@ pub struct RouterFuncCapsTlv(RouterFuncCaps); // | Algorithm 1 | Algorithm... | Algorithm n | | // +- -+ // | | -// + + +// + + // #[derive(Clone, Debug, Default, Eq, new, PartialEq)] #[derive(Deserialize, Serialize)] @@ -143,7 +143,7 @@ pub struct SrAlgoTlv(BTreeSet); // | Sub-TLVs (variable) | // +- -+ // | | -// + + +// + + // #[derive(Clone, Debug, Eq, new, PartialEq)] #[derive(Deserialize, Serialize)] @@ -167,7 +167,7 @@ pub struct SidLabelRangeTlv { // | Sub-TLVs (variable) | // +- -+ // | | -// + + +// + + // #[derive(Clone, Debug, Eq, new, PartialEq)] #[derive(Deserialize, Serialize)] diff --git a/rustfmt.toml b/rustfmt.toml index a8a80570..b8b58ba7 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -4,4 +4,4 @@ group_imports = "StdExternalCrate" imports_granularity = "Module" max_width = 80 merge_derives = false -wrap_comments = true +wrap_comments = false