Revert "Add fields to BridgeLine"
This reverts commit 4a014725cdae582401f5d166a722317ed45b8bfe.
This commit is contained in:
parent
a76fdc98b9
commit
00aa9b0ab1
|
@ -36,20 +36,16 @@ pub const MAX_BRIDGES_PER_BUCKET: usize = 3;
|
||||||
/// level 1)
|
/// level 1)
|
||||||
pub const MIN_BUCKET_REACHABILITY: usize = 2;
|
pub const MIN_BUCKET_REACHABILITY: usize = 2;
|
||||||
|
|
||||||
|
|
||||||
/// A bridge information line
|
/// A bridge information line
|
||||||
#[serde_as]
|
#[serde_as]
|
||||||
#[derive(Serialize, Deserialize, Clone, Copy, Hash, Eq, PartialEq, Debug)]
|
#[derive(Serialize, Deserialize, Copy, Clone, Hash, Eq, PartialEq, Debug)]
|
||||||
pub struct BridgeLine {
|
pub struct BridgeLine {
|
||||||
/// pluggable transport protocol string as a byte array
|
|
||||||
pub pt_type: [u8; 25],
|
|
||||||
/// IPv4 or IPv6 address
|
/// IPv4 or IPv6 address
|
||||||
pub addr: [u8; 16],
|
pub addr: [u8; 16],
|
||||||
/// port
|
/// port
|
||||||
pub port: u16,
|
pub port: u16,
|
||||||
/// fingerprint as a byte array
|
/// other protocol information, including pluggable transport,
|
||||||
pub fingerprint: [u8; 20],
|
/// public key, etc.
|
||||||
/// other protocol information, including cert and iat mode
|
|
||||||
#[serde_as(as = "[_; BRIDGE_BYTES - 18]")]
|
#[serde_as(as = "[_; BRIDGE_BYTES - 18]")]
|
||||||
pub info: [u8; BRIDGE_BYTES - 18],
|
pub info: [u8; BRIDGE_BYTES - 18],
|
||||||
}
|
}
|
||||||
|
@ -72,10 +68,8 @@ impl Default for BridgeLine {
|
||||||
/// An "empty" BridgeLine is represented by all zeros
|
/// An "empty" BridgeLine is represented by all zeros
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
pt_type: [0; 25],
|
|
||||||
addr: [0; 16],
|
addr: [0; 16],
|
||||||
port: 0,
|
port: 0,
|
||||||
fingerprint: [0; 20],
|
|
||||||
info: [0; BRIDGE_BYTES - 18],
|
info: [0; BRIDGE_BYTES - 18],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue