diff --git a/src/config.rs b/src/config.rs index db9a2c8..21764ea 100644 --- a/src/config.rs +++ b/src/config.rs @@ -66,8 +66,6 @@ impl From for bool { pub enum MeasurementType { Icmp = 1, IcmpTimestamps, - Ntp, - TcpTimestamps, } impl Display for MeasurementType { @@ -75,8 +73,6 @@ impl Display for MeasurementType { match self { MeasurementType::Icmp => write!(f, "icmp"), MeasurementType::IcmpTimestamps => write!(f, "icmp-timestamps"), - MeasurementType::Ntp => write!(f, "ntp"), - MeasurementType::TcpTimestamps => write!(f, "tcp-timestamps"), } } } @@ -88,8 +84,6 @@ impl FromStr for MeasurementType { return match s.to_lowercase().as_str() { "icmp" => Ok(MeasurementType::Icmp), "icmp-timestamps" => Ok(MeasurementType::IcmpTimestamps), - "ntp" => Ok(MeasurementType::Ntp), - "tcp-timestamps" => Ok(MeasurementType::TcpTimestamps), &_ => Err(ConfigError::InvalidMeasurementType(s.to_string())), }; } diff --git a/src/main.rs b/src/main.rs index bed1f06..8a52cda 100644 --- a/src/main.rs +++ b/src/main.rs @@ -95,9 +95,6 @@ fn create_pinger(measurement_type: MeasurementType) -> (PingListenerBox, PingSen Box::new(PingerICMPTimestampListener {}), Box::new(PingerICMPTimestampSender {}), ), - MeasurementType::Ntp | MeasurementType::TcpTimestamps => { - todo!() - } } } diff --git a/src/pinger.rs b/src/pinger.rs index 2772d85..54e83a6 100644 --- a/src/pinger.rs +++ b/src/pinger.rs @@ -60,9 +60,6 @@ const INFLIGHT_PROBE_TTL: Duration = Duration::from_secs(30); fn open_socket(type_: MeasurementType) -> io::Result { match type_ { MeasurementType::Icmp | MeasurementType::IcmpTimestamps => IcmpSocket4::new(), - _ => { - unimplemented!() - } } }