aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/protover.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2019-03-01 13:50:00 -0500
committerDavid Goulet <dgoulet@torproject.org>2019-03-05 12:33:43 -0500
commita999cb43df3dc4e64820347486a2d861636bfc2e (patch)
treecefceee5b049b12f427fc8bcad1c6e071df531ab /src/core/or/protover.h
parent955a622391192ff9cb65dddcb110532616f890ff (diff)
downloadtor-a999cb43df3dc4e64820347486a2d861636bfc2e.tar.gz
tor-a999cb43df3dc4e64820347486a2d861636bfc2e.zip
protover: Add missing Padding to translate_to_rust
This commit also explicitly set the value of the PRT enum so we can match/pin the C enum values to the Rust one in protover/ffi.rs. Fixes #29631 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/core/or/protover.h')
-rw-r--r--src/core/or/protover.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/core/or/protover.h b/src/core/or/protover.h
index 27106d4bec..567b94a168 100644
--- a/src/core/or/protover.h
+++ b/src/core/or/protover.h
@@ -33,17 +33,17 @@ struct smartlist_t;
/// C_RUST_COUPLED: src/rust/protover/ffi.rs `translate_to_rust`
/// C_RUST_COUPLED: src/rust/protover/protover.rs `Proto`
typedef enum protocol_type_t {
- PRT_LINK,
- PRT_LINKAUTH,
- PRT_RELAY,
- PRT_DIRCACHE,
- PRT_HSDIR,
- PRT_HSINTRO,
- PRT_HSREND,
- PRT_DESC,
- PRT_MICRODESC,
- PRT_CONS,
- PRT_PADDING,
+ PRT_LINK = 0,
+ PRT_LINKAUTH = 1,
+ PRT_RELAY = 2,
+ PRT_DIRCACHE = 3,
+ PRT_HSDIR = 4,
+ PRT_HSINTRO = 5,
+ PRT_HSREND = 6,
+ PRT_DESC = 7,
+ PRT_MICRODESC = 8,
+ PRT_CONS = 9,
+ PRT_PADDING = 10,
} protocol_type_t;
bool protover_contains_long_protocol_names(const char *s);