diff options
-rw-r--r-- | src/core/or/protover.c | 6 | ||||
-rw-r--r-- | src/core/or/protover.h | 1 | ||||
-rw-r--r-- | src/rust/protover/ffi.rs | 1 | ||||
-rw-r--r-- | src/rust/protover/protover.rs | 8 |
4 files changed, 12 insertions, 4 deletions
diff --git a/src/core/or/protover.c b/src/core/or/protover.c index 1edf78ec87..e12919f0a8 100644 --- a/src/core/or/protover.c +++ b/src/core/or/protover.c @@ -53,7 +53,8 @@ static const struct { { PRT_DESC, "Desc" }, { PRT_MICRODESC, "Microdesc"}, { PRT_PADDING, "Padding"}, - { PRT_CONS, "Cons" } + { PRT_CONS, "Cons" }, + { PRT_FLOWCTRL, "FlowCtrl"}, }; #define N_PROTOCOL_NAMES ARRAY_LENGTH(PROTOCOL_NAMES) @@ -401,7 +402,8 @@ protover_get_supported_protocols(void) #endif "Microdesc=1-2 " "Relay=1-2 " - "Padding=1"; + "Padding=1 " + "FlowCtrl=1"; } /** The protocols from protover_get_supported_protocols(), as parsed into a diff --git a/src/core/or/protover.h b/src/core/or/protover.h index 567b94a168..d8e541735f 100644 --- a/src/core/or/protover.h +++ b/src/core/or/protover.h @@ -44,6 +44,7 @@ typedef enum protocol_type_t { PRT_MICRODESC = 8, PRT_CONS = 9, PRT_PADDING = 10, + PRT_FLOWCTRL = 11, } protocol_type_t; bool protover_contains_long_protocol_names(const char *s); diff --git a/src/rust/protover/ffi.rs b/src/rust/protover/ffi.rs index 066b08eddb..14170d0353 100644 --- a/src/rust/protover/ffi.rs +++ b/src/rust/protover/ffi.rs @@ -31,6 +31,7 @@ fn translate_to_rust(c_proto: uint32_t) -> Result<Protocol, ProtoverError> { 8 => Ok(Protocol::Microdesc), 9 => Ok(Protocol::Cons), 10 => Ok(Protocol::Padding), + 11 => Ok(Protocol::FlowCtrl), _ => Err(ProtoverError::UnknownProtocol), } } diff --git a/src/rust/protover/protover.rs b/src/rust/protover/protover.rs index 74158d9f6d..f7d9d6d15f 100644 --- a/src/rust/protover/protover.rs +++ b/src/rust/protover/protover.rs @@ -47,6 +47,7 @@ pub enum Protocol { Microdesc, Relay, Padding, + FlowCtrl, } impl fmt::Display for Protocol { @@ -75,6 +76,7 @@ impl FromStr for Protocol { "Microdesc" => Ok(Protocol::Microdesc), "Relay" => Ok(Protocol::Relay), "Padding" => Ok(Protocol::Padding), + "FlowCtrl" => Ok(Protocol::FlowCtrl), _ => Err(ProtoverError::UnknownProtocol), } } @@ -166,7 +168,8 @@ pub(crate) fn get_supported_protocols_cstr() -> &'static CStr { LinkAuth=3 \ Microdesc=1-2 \ Relay=1-2 \ - Padding=1" + Padding=1 \ + FlowCtrl=1" ) } else { cstr!( @@ -180,7 +183,8 @@ pub(crate) fn get_supported_protocols_cstr() -> &'static CStr { LinkAuth=1,3 \ Microdesc=1-2 \ Relay=1-2 \ - Padding=1" + Padding=1 \ + FlowCtrl=1" ) } } |